diff --git a/examples/events/instances/gts.x.core.events.topic.v1~x.core._.default.v1.json b/examples/events/instances/gts.x.core.events.topic.v1~x.core._.default.v1.json new file mode 100644 index 0000000..2c4dae6 --- /dev/null +++ b/examples/events/instances/gts.x.core.events.topic.v1~x.core._.default.v1.json @@ -0,0 +1,10 @@ +{ + "id": "gts.x.core.events.topic.v1~x.core._.default.v1", + "name": "default", + "description": "Default platform event topic. Used when an event type does not declare a specific topicRef trait.", + "retention": "P30D", + "ordering": "global", + "partitions": 1, + "dedup": { "strategy": "none" }, + "storage": { "kind": "db", "config": { "table": "events_default" } } +} \ No newline at end of file diff --git a/examples/events/types/gts.x.core.events.type.v1~x.commerce.orders.order_placed.v1.0~.schema.json b/examples/events/types/gts.x.core.events.type.v1~x.commerce.orders.order_placed.v1.0~.schema.json index 955b749..c70fedd 100644 --- a/examples/events/types/gts.x.core.events.type.v1~x.commerce.orders.order_placed.v1.0~.schema.json +++ b/examples/events/types/gts.x.core.events.type.v1~x.commerce.orders.order_placed.v1.0~.schema.json @@ -31,7 +31,7 @@ } ], "x-gts-traits": { - "topicRef": "gts.x.core.events.topic.v1~x.commerce._.orders.v1", + "topicRef": "gts.x.core.events.topic.v1~x.commerce._.orders.v1.0", "retention": "P90D" } } diff --git a/examples/events/types/gts.x.core.events.type.v1~x.commerce.orders.order_placed.v1.1~.schema.json b/examples/events/types/gts.x.core.events.type.v1~x.commerce.orders.order_placed.v1.1~.schema.json index 905add1..9d9da3d 100644 --- a/examples/events/types/gts.x.core.events.type.v1~x.commerce.orders.order_placed.v1.1~.schema.json +++ b/examples/events/types/gts.x.core.events.type.v1~x.commerce.orders.order_placed.v1.1~.schema.json @@ -32,7 +32,7 @@ } ], "x-gts-traits": { - "topicRef": "gts.x.core.events.topic.v1~x.commerce._.orders.v1", + "topicRef": "gts.x.core.events.topic.v1~x.commerce._.orders.v1.0", "retention": "P90D" } } diff --git a/examples/mcp/types/gts.x.ai.mcp.tool.v1~x.ai.mcp.http_outbound.v1~.schema.jsonc b/examples/mcp/types/gts.x.ai.mcp.tool.v1~x.ai.mcp.http_outbound.v1~.schema.jsonc index 8717b02..730e39f 100644 --- a/examples/mcp/types/gts.x.ai.mcp.tool.v1~x.ai.mcp.http_outbound.v1~.schema.jsonc +++ b/examples/mcp/types/gts.x.ai.mcp.tool.v1~x.ai.mcp.http_outbound.v1~.schema.jsonc @@ -46,8 +46,7 @@ "additionalProperties": false } }, - "required": ["security", "capabilities"], - "additionalProperties": false + "required": ["security", "capabilities"] } ] } diff --git a/examples/settings/instances/gts.x.core.settings.type.v1~x.platform._.feature_new_dashboard.v1~.examples.jsonc b/examples/settings/instances/gts.x.core.settings.type.v1~x.platform._.feature_new_dashboard.v1~.examples.jsonc index 35b08fd..55fead7 100644 --- a/examples/settings/instances/gts.x.core.settings.type.v1~x.platform._.feature_new_dashboard.v1~.examples.jsonc +++ b/examples/settings/instances/gts.x.core.settings.type.v1~x.platform._.feature_new_dashboard.v1~.examples.jsonc @@ -1,38 +1,33 @@ [ - // Platform-scope default: new dashboard is disabled platform-wide. + // Per-user default at platform scope: new dashboard disabled for this user. { "type": "gts.x.core.settings.type.v1~x.platform._.feature_new_dashboard.v1~", "tenant_id": "00000000-0000-0000-0000-000000000000", + "subject_type": "gts.x.core.idp.user.v1~", + "subject_id": "f0e1d2c3-b4a5-6789-0123-456789abcdef", "value": { "enabled": false } }, - // Platform-scope override: platform administrator has enabled the new dashboard globally. + // Per-user override at platform scope: platform admin has opted in. { "type": "gts.x.core.settings.type.v1~x.platform._.feature_new_dashboard.v1~", "tenant_id": "00000000-0000-0000-0000-000000000000", + "subject_type": "gts.x.core.idp.user.v1~", + "subject_id": "a1b2c3d4-e5f6-7890-abcd-000000000001", "value": { "enabled": true } }, - // Tenant-scope override: tenant 'acme-corp' has opted out while the platform default is true. - // Cascading — this tenant and its non-overriding descendants see enabled=false. - { - "type": "gts.x.core.settings.type.v1~x.platform._.feature_new_dashboard.v1~", - "tenant_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "value": { - "enabled": false - } - }, - // Subject-scoped override: setting attached to a specific user within tenant 'acme-corp'. - // subject_type is a GTS type reference; subject_id identifies the user. + // Per-user override at tenant scope: user within tenant 'acme-corp' has opted out + // while the cascading default is true. { "type": "gts.x.core.settings.type.v1~x.platform._.feature_new_dashboard.v1~", "tenant_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "subject_type": "gts.x.core.idp.user.v1~", "subject_id": "f0e1d2c3-b4a5-6789-0123-456789abcdef", "value": { - "enabled": true + "enabled": false } } ] diff --git a/examples/settings/types/gts.x.core.settings.type.v1~.schema.json b/examples/settings/types/gts.x.core.settings.type.v1~.schema.json index b56e777..172902c 100644 --- a/examples/settings/types/gts.x.core.settings.type.v1~.schema.json +++ b/examples/settings/types/gts.x.core.settings.type.v1~.schema.json @@ -75,4 +75,4 @@ } } } -} +} \ No newline at end of file diff --git a/examples/settings/types/gts.x.core.settings.type.v1~x.platform._.feature_new_dashboard.v1~.schema.json b/examples/settings/types/gts.x.core.settings.type.v1~x.platform._.feature_new_dashboard.v1~.schema.json index e29334f..e7c3a59 100644 --- a/examples/settings/types/gts.x.core.settings.type.v1~x.platform._.feature_new_dashboard.v1~.schema.json +++ b/examples/settings/types/gts.x.core.settings.type.v1~x.platform._.feature_new_dashboard.v1~.schema.json @@ -8,11 +8,15 @@ { "$ref": "gts://gts.x.core.settings.type.v1~" }, { "type": "object", - "required": ["type", "value"], + "required": ["type", "subject_type", "subject_id", "value"], "properties": { "type": { "const": "gts.x.core.settings.type.v1~x.platform._.feature_new_dashboard.v1~" }, + "subject_type": { + "type": "string", + "x-gts-ref": "gts.x.core.idp.user.v1~" + }, "value": { "type": "object", "required": ["enabled"], diff --git a/examples/typespec/vms/types/states/gts.x.infra.compute.vm_state.v1~.schema.json b/examples/typespec/vms/types/states/gts.x.infra.compute.vm_state.v1~.schema.json index 8ea914b..77c91df 100644 --- a/examples/typespec/vms/types/states/gts.x.infra.compute.vm_state.v1~.schema.json +++ b/examples/typespec/vms/types/states/gts.x.infra.compute.vm_state.v1~.schema.json @@ -6,11 +6,11 @@ "description": "Base type for all VM power states. Final: no derived types allowed.", "type": "object", "required": [ - "gtsId", + "id", "description" ], "properties": { - "gtsId": { + "id": { "type": "string", "description": "GTS identifier of the power state type", "x-gts-ref": "/$id" @@ -28,4 +28,4 @@ "description": "Icon name for UI representation (optional)" } } -} \ No newline at end of file +} diff --git a/examples/users/types/gts.x.core.idp.user.v2~.schema.json b/examples/users/types/gts.x.core.idp.user.v2~.schema.json new file mode 100644 index 0000000..a23d384 --- /dev/null +++ b/examples/users/types/gts.x.core.idp.user.v2~.schema.json @@ -0,0 +1,57 @@ +{ + "$id": "gts://gts.x.core.idp.user.v2~", + "$schema": "http://json-schema.org/draft-07/schema#", + "x-gts-abstract": true, + "title": "User (Base)", + "description": "Abstract base type for platform user identities. Derived types add vendor- or role-specific fields via the open 'properties' container.", + "type": "object", + "required": ["id", "type", "tenant_id", "email", "display_name", "status"], + "properties": { + "id": { + "description": "Unique user identifier.", + "type": "string", + "format": "uuid" + }, + "type": { + "description": "GTS Type Identifier of this user.", + "type": "string", + "x-gts-ref": "/$id" + }, + "tenant_id": { + "description": "UUID of the tenant this user belongs to.", + "type": "string", + "format": "uuid" + }, + "email": { + "description": "Primary email address.", + "type": "string", + "format": "email" + }, + "display_name": { + "description": "Human-readable display name.", + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "status": { + "description": "Account lifecycle status. Backward incompatible change from v1.", + "type": "string", + "enum": ["active", "inactive", "suspended", "deleted"] + }, + "created_at": { + "description": "Timestamp when the user was created.", + "type": "string", + "format": "date-time" + }, + "updated_at": { + "description": "Timestamp of the last update.", + "type": "string", + "format": "date-time" + }, + "properties": { + "description": "Extension point for derived types. Vendor- or role-specific fields go here.", + "type": "object" + } + }, + "additionalProperties": false +} diff --git a/examples/yaml/ui/types/gts.x.ui.core.item.v1~.schema.yaml b/examples/yaml/ui/types/gts.x.ui.core.item.v1~.schema.yaml index 731b788..b67255f 100644 --- a/examples/yaml/ui/types/gts.x.ui.core.item.v1~.schema.yaml +++ b/examples/yaml/ui/types/gts.x.ui.core.item.v1~.schema.yaml @@ -9,13 +9,13 @@ description: | type: object required: - - gtsId + - gtsType - id - type - label properties: - gtsId: + gtsType: type: string description: GTS identifier of the UI item type x-gts-ref: /$id diff --git a/examples/yaml/ui/types/gts.x.ui.core.item.v1~x.ui.components.grid.v1~.schema.yaml b/examples/yaml/ui/types/gts.x.ui.core.item.v1~x.ui.components.grid.v1~.schema.yaml index 6f11dc2..f83b78b 100644 --- a/examples/yaml/ui/types/gts.x.ui.core.item.v1~x.ui.components.grid.v1~.schema.yaml +++ b/examples/yaml/ui/types/gts.x.ui.core.item.v1~x.ui.components.grid.v1~.schema.yaml @@ -15,7 +15,7 @@ allOf: - type - metadata properties: - gtsId: + gtsType: type: string const: gts.x.ui.core.item.v1~x.ui.components.grid.v1~ description: GTS identifier of the UI item type diff --git a/examples/yaml/ui/types/gts.x.ui.core.item.v1~x.ui.components.menu_item.v1~.schema.yaml b/examples/yaml/ui/types/gts.x.ui.core.item.v1~x.ui.components.menu_item.v1~.schema.yaml index 376ed20..7be9649 100644 --- a/examples/yaml/ui/types/gts.x.ui.core.item.v1~x.ui.components.menu_item.v1~.schema.yaml +++ b/examples/yaml/ui/types/gts.x.ui.core.item.v1~x.ui.components.menu_item.v1~.schema.yaml @@ -15,7 +15,7 @@ allOf: - type - metadata properties: - gtsId: + gtsType: type: string const: gts.x.ui.core.item.v1~x.ui.components.menu_item.v1~ description: GTS identifier of the UI item type