152 lines
3.0 KiB
JSON
152 lines
3.0 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://edut.ai/schemas/offer.v1.schema.json",
|
|
"title": "EDUT Offer Schema v1",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"schema_version",
|
|
"offer_id",
|
|
"issuer_id",
|
|
"title",
|
|
"status",
|
|
"pricing",
|
|
"policies",
|
|
"created_at",
|
|
"updated_at"
|
|
],
|
|
"properties": {
|
|
"schema_version": {
|
|
"type": "string",
|
|
"const": "offer.v1"
|
|
},
|
|
"offer_id": {
|
|
"type": "string",
|
|
"pattern": "^[a-z0-9][a-z0-9._-]{2,127}$"
|
|
},
|
|
"issuer_id": {
|
|
"type": "string",
|
|
"pattern": "^[a-z0-9][a-z0-9._-]{2,127}$"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 160
|
|
},
|
|
"summary": {
|
|
"type": "string",
|
|
"maxLength": 400
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"draft",
|
|
"active",
|
|
"paused",
|
|
"retired"
|
|
]
|
|
},
|
|
"pricing": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"currency",
|
|
"amount_atomic",
|
|
"decimals"
|
|
],
|
|
"properties": {
|
|
"currency": {
|
|
"type": "string",
|
|
"enum": [
|
|
"USDC",
|
|
"ETH"
|
|
]
|
|
},
|
|
"amount_atomic": {
|
|
"type": "string",
|
|
"pattern": "^[0-9]{1,78}$"
|
|
},
|
|
"decimals": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 18
|
|
},
|
|
"chain_id": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
}
|
|
}
|
|
},
|
|
"policies": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"member_only",
|
|
"workspace_bound",
|
|
"transferable"
|
|
],
|
|
"properties": {
|
|
"member_only": {
|
|
"type": "boolean"
|
|
},
|
|
"workspace_bound": {
|
|
"type": "boolean"
|
|
},
|
|
"transferable": {
|
|
"type": "boolean"
|
|
},
|
|
"max_per_wallet": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"minimum": 1
|
|
},
|
|
"requires_admin_approval": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"entitlement": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"type",
|
|
"scope"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"module_license",
|
|
"service_plan",
|
|
"access_pass"
|
|
]
|
|
},
|
|
"scope": {
|
|
"type": "string",
|
|
"enum": [
|
|
"wallet",
|
|
"workspace"
|
|
]
|
|
},
|
|
"runtime_policy_ref": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"created_at": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"updated_at": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"metadata": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|