web/docs/schemas/offer.v1.schema.json

193 lines
3.9 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",
"internal_use_only",
"multi_tenant"
],
"properties": {
"member_only": {
"type": "boolean"
},
"workspace_bound": {
"type": "boolean"
},
"transferable": {
"type": "boolean"
},
"internal_use_only": {
"type": "boolean"
},
"multi_tenant": {
"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"
}
}
},
"execution_profile": {
"type": "object",
"additionalProperties": false,
"required": [
"connector_surface",
"pacing_tier"
],
"properties": {
"connector_surface": {
"type": "string",
"enum": [
"edut_native",
"external_connector",
"hybrid"
]
},
"pacing_tier": {
"type": "string",
"enum": [
"governed_human_pace",
"local_hardware_speed"
]
},
"human_pace_floor_ms": {
"type": "integer",
"minimum": 0
},
"notes": {
"type": "string",
"maxLength": 300
}
}
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
},
"metadata": {
"type": "object",
"additionalProperties": true
}
}
}