@loxtep/sdk 0.7.22 → 0.7.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/README.md +6 -1
- package/dist/cli/commands/connectors-cmd.d.ts +23 -0
- package/dist/cli/commands/connectors-cmd.d.ts.map +1 -0
- package/dist/cli/commands/connectors-cmd.js +32 -0
- package/dist/cli/commands/connectors-cmd.js.map +1 -0
- package/dist/cli/commands/deploy-cmd.d.ts +5 -1
- package/dist/cli/commands/deploy-cmd.d.ts.map +1 -1
- package/dist/cli/commands/deploy-cmd.js +25 -2
- package/dist/cli/commands/deploy-cmd.js.map +1 -1
- package/dist/cli/commands/ingest-cmd.d.ts +7 -2
- package/dist/cli/commands/ingest-cmd.d.ts.map +1 -1
- package/dist/cli/commands/ingest-cmd.js +119 -29
- package/dist/cli/commands/ingest-cmd.js.map +1 -1
- package/dist/cli/commands/lint-cmd.d.ts +17 -0
- package/dist/cli/commands/lint-cmd.d.ts.map +1 -0
- package/dist/cli/commands/lint-cmd.js +61 -0
- package/dist/cli/commands/lint-cmd.js.map +1 -0
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +11 -3
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/index.js +24 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/client/connectors.d.ts.map +1 -1
- package/dist/client/connectors.js +7 -1
- package/dist/client/connectors.js.map +1 -1
- package/dist/errors/parse-http.d.ts.map +1 -1
- package/dist/errors/parse-http.js +33 -10
- package/dist/errors/parse-http.js.map +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/entity-json-schemas/ajv-loader.cjs +17 -0
- package/dist/lib/entity-json-schemas/index.d.ts +5 -0
- package/dist/lib/entity-json-schemas/index.d.ts.map +1 -0
- package/dist/lib/entity-json-schemas/index.js +3 -0
- package/dist/lib/entity-json-schemas/index.js.map +1 -0
- package/dist/lib/entity-json-schemas/types.d.ts +21 -0
- package/dist/lib/entity-json-schemas/types.d.ts.map +1 -0
- package/dist/lib/entity-json-schemas/types.js +32 -0
- package/dist/lib/entity-json-schemas/types.js.map +1 -0
- package/dist/lib/entity-json-schemas/validate-entity.d.ts +39 -0
- package/dist/lib/entity-json-schemas/validate-entity.d.ts.map +1 -0
- package/dist/lib/entity-json-schemas/validate-entity.js +143 -0
- package/dist/lib/entity-json-schemas/validate-entity.js.map +1 -0
- package/dist/lib/sdk-ingest-bundle.d.ts +60 -4
- package/dist/lib/sdk-ingest-bundle.d.ts.map +1 -1
- package/dist/lib/sdk-ingest-bundle.js +144 -51
- package/dist/lib/sdk-ingest-bundle.js.map +1 -1
- package/dist/lib/workspace-lint.d.ts +28 -0
- package/dist/lib/workspace-lint.d.ts.map +1 -0
- package/dist/lib/workspace-lint.js +199 -0
- package/dist/lib/workspace-lint.js.map +1 -0
- package/docs/getting-started.md +2 -0
- package/docs/quick-reference.md +1 -0
- package/docs/sdk-first-ingest.md +19 -3
- package/package.json +6 -2
- package/schemas/entity-json-schemas/SCHEMA_SYNC.md +18 -0
- package/schemas/entity-json-schemas/connection.json +310 -0
- package/schemas/entity-json-schemas/connector.json +188 -0
- package/schemas/entity-json-schemas/container.json +71 -0
- package/schemas/entity-json-schemas/contract.json +228 -0
- package/schemas/entity-json-schemas/data-product.json +163 -0
- package/schemas/entity-json-schemas/domain.json +74 -0
- package/schemas/entity-json-schemas/export.json +126 -0
- package/schemas/entity-json-schemas/odps-product.json +150 -0
- package/schemas/entity-json-schemas/quality-rule.json +115 -0
- package/schemas/entity-json-schemas/schema.json +206 -0
- package/schemas/entity-json-schemas/transformation.json +166 -0
- package/schemas/entity-json-schemas/validation.json +152 -0
- package/schemas/entity-json-schemas/workflow-graph.json +116 -0
- package/schemas/entity-json-schemas/workflow.json +193 -0
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://loxtep.io/schemas/entity/connector.json",
|
|
4
|
+
"title": "Connector Entity",
|
|
5
|
+
"description": "JSON Schema for Connector entity in customer workspace. Connectors define reusable integration templates (e.g., Shopify, Stripe, HubSpot).",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"connector_id",
|
|
9
|
+
"organization_id",
|
|
10
|
+
"connector_type",
|
|
11
|
+
"name",
|
|
12
|
+
"description",
|
|
13
|
+
"category",
|
|
14
|
+
"auth_type",
|
|
15
|
+
"version",
|
|
16
|
+
"created_at",
|
|
17
|
+
"updated_at"
|
|
18
|
+
],
|
|
19
|
+
"properties": {
|
|
20
|
+
"connector_id": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"format": "uuid",
|
|
23
|
+
"description": "Unique identifier for the connector"
|
|
24
|
+
},
|
|
25
|
+
"organization_id": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"format": "uuid",
|
|
28
|
+
"description": "Organization that owns this connector definition"
|
|
29
|
+
},
|
|
30
|
+
"connector_type": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"minLength": 1,
|
|
33
|
+
"maxLength": 100,
|
|
34
|
+
"pattern": "^[a-z0-9-_]+$",
|
|
35
|
+
"description": "Connector type identifier (e.g., 'shopify', 'stripe', 'hubspot')"
|
|
36
|
+
},
|
|
37
|
+
"name": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"minLength": 1,
|
|
40
|
+
"maxLength": 255,
|
|
41
|
+
"description": "Display name for the connector"
|
|
42
|
+
},
|
|
43
|
+
"description": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"maxLength": 1000,
|
|
46
|
+
"description": "Connector description"
|
|
47
|
+
},
|
|
48
|
+
"category": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"enum": [
|
|
51
|
+
"e_commerce",
|
|
52
|
+
"crm",
|
|
53
|
+
"marketing",
|
|
54
|
+
"finance",
|
|
55
|
+
"database",
|
|
56
|
+
"file_storage",
|
|
57
|
+
"analytics",
|
|
58
|
+
"communication",
|
|
59
|
+
"productivity",
|
|
60
|
+
"custom"
|
|
61
|
+
],
|
|
62
|
+
"description": "Connector category"
|
|
63
|
+
},
|
|
64
|
+
"icon_url": {
|
|
65
|
+
"type": ["string", "null"],
|
|
66
|
+
"format": "uri",
|
|
67
|
+
"description": "URL to connector icon"
|
|
68
|
+
},
|
|
69
|
+
"documentation_url": {
|
|
70
|
+
"type": ["string", "null"],
|
|
71
|
+
"format": "uri",
|
|
72
|
+
"description": "URL to connector documentation"
|
|
73
|
+
},
|
|
74
|
+
"auth_type": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"enum": ["oauth2", "api_key", "basic", "bearer", "custom", "none"],
|
|
77
|
+
"description": "Authentication type required for this connector"
|
|
78
|
+
},
|
|
79
|
+
"oauth_config": {
|
|
80
|
+
"type": ["object", "null"],
|
|
81
|
+
"description": "OAuth2 configuration (required if auth_type is oauth2)",
|
|
82
|
+
"properties": {
|
|
83
|
+
"authorization_url": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"format": "uri"
|
|
86
|
+
},
|
|
87
|
+
"token_url": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"format": "uri"
|
|
90
|
+
},
|
|
91
|
+
"scopes": {
|
|
92
|
+
"type": "array",
|
|
93
|
+
"items": {
|
|
94
|
+
"type": "string"
|
|
95
|
+
},
|
|
96
|
+
"minItems": 0
|
|
97
|
+
},
|
|
98
|
+
"response_type": {
|
|
99
|
+
"type": ["string", "null"]
|
|
100
|
+
},
|
|
101
|
+
"grant_type": {
|
|
102
|
+
"type": ["string", "null"]
|
|
103
|
+
},
|
|
104
|
+
"additional_params": {
|
|
105
|
+
"type": ["object", "null"],
|
|
106
|
+
"additionalProperties": {
|
|
107
|
+
"type": "string"
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"additionalProperties": false
|
|
112
|
+
},
|
|
113
|
+
"supported_directions": {
|
|
114
|
+
"type": "array",
|
|
115
|
+
"items": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"enum": ["inbound", "outbound", "bidirectional"]
|
|
118
|
+
},
|
|
119
|
+
"minItems": 1,
|
|
120
|
+
"description": "Data sync directions supported by this connector"
|
|
121
|
+
},
|
|
122
|
+
"supported_entities": {
|
|
123
|
+
"type": "array",
|
|
124
|
+
"items": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"minLength": 1
|
|
127
|
+
},
|
|
128
|
+
"minItems": 0,
|
|
129
|
+
"description": "Entity types supported by this connector (e.g., ['orders', 'customers', 'products'])"
|
|
130
|
+
},
|
|
131
|
+
"supports_webhooks": {
|
|
132
|
+
"type": "boolean",
|
|
133
|
+
"default": false,
|
|
134
|
+
"description": "Whether this connector supports webhook-based sync"
|
|
135
|
+
},
|
|
136
|
+
"supports_polling": {
|
|
137
|
+
"type": "boolean",
|
|
138
|
+
"default": false,
|
|
139
|
+
"description": "Whether this connector supports polling-based sync"
|
|
140
|
+
},
|
|
141
|
+
"required_scopes": {
|
|
142
|
+
"type": ["array", "null"],
|
|
143
|
+
"items": {
|
|
144
|
+
"type": "string"
|
|
145
|
+
},
|
|
146
|
+
"description": "OAuth scopes required for this connector"
|
|
147
|
+
},
|
|
148
|
+
"required_permissions": {
|
|
149
|
+
"type": ["array", "null"],
|
|
150
|
+
"items": {
|
|
151
|
+
"type": "string"
|
|
152
|
+
},
|
|
153
|
+
"description": "Permissions required for this connector"
|
|
154
|
+
},
|
|
155
|
+
"version": {
|
|
156
|
+
"type": "string",
|
|
157
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$",
|
|
158
|
+
"description": "Connector version (semantic versioning)"
|
|
159
|
+
},
|
|
160
|
+
"is_beta": {
|
|
161
|
+
"type": "boolean",
|
|
162
|
+
"default": false,
|
|
163
|
+
"description": "Whether this connector is in beta"
|
|
164
|
+
},
|
|
165
|
+
"metadata": {
|
|
166
|
+
"type": "object",
|
|
167
|
+
"additionalProperties": true,
|
|
168
|
+
"default": {},
|
|
169
|
+
"description": "Additional metadata for the connector"
|
|
170
|
+
},
|
|
171
|
+
"created_at": {
|
|
172
|
+
"type": "string",
|
|
173
|
+
"format": "date-time",
|
|
174
|
+
"description": "ISO 8601 timestamp when connector was created"
|
|
175
|
+
},
|
|
176
|
+
"updated_at": {
|
|
177
|
+
"type": "string",
|
|
178
|
+
"format": "date-time",
|
|
179
|
+
"description": "ISO 8601 timestamp when connector was last updated"
|
|
180
|
+
},
|
|
181
|
+
"deleted_at": {
|
|
182
|
+
"type": ["string", "null"],
|
|
183
|
+
"format": "date-time",
|
|
184
|
+
"description": "ISO 8601 timestamp when connector was deleted (soft delete)"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"additionalProperties": false
|
|
188
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://loxtep.io/schemas/entity/container.json",
|
|
4
|
+
"title": "Container Entity",
|
|
5
|
+
"description": "JSON Schema for Container entity in customer workspace. A container represents one logical node that maps to one or more bots/queues at runtime. It wraps another project entity (connection, transformation, validation, data-product, export).",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"container_id",
|
|
9
|
+
"organization_id",
|
|
10
|
+
"project_id",
|
|
11
|
+
"workflow_id",
|
|
12
|
+
"wrapped_entity_type",
|
|
13
|
+
"wrapped_entity_id"
|
|
14
|
+
],
|
|
15
|
+
"properties": {
|
|
16
|
+
"container_id": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"pattern": "^[a-z0-9-]+$",
|
|
19
|
+
"minLength": 1,
|
|
20
|
+
"maxLength": 64,
|
|
21
|
+
"description": "Unique identifier for the container (e.g. conn-a1b2c3d4, xfm-e5f6g7h8)"
|
|
22
|
+
},
|
|
23
|
+
"organization_id": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"format": "uuid",
|
|
26
|
+
"description": "Organization that owns this container"
|
|
27
|
+
},
|
|
28
|
+
"project_id": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"format": "uuid",
|
|
31
|
+
"description": "Project that contains this container"
|
|
32
|
+
},
|
|
33
|
+
"workflow_id": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"format": "uuid",
|
|
36
|
+
"description": "Workflow this container belongs to"
|
|
37
|
+
},
|
|
38
|
+
"wrapped_entity_type": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"enum": [
|
|
41
|
+
"connections",
|
|
42
|
+
"transformations",
|
|
43
|
+
"validations",
|
|
44
|
+
"data-products",
|
|
45
|
+
"exports",
|
|
46
|
+
"workflows"
|
|
47
|
+
],
|
|
48
|
+
"description": "Entity type of the wrapped project entity"
|
|
49
|
+
},
|
|
50
|
+
"wrapped_entity_id": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"description": "Entity ID of the wrapped project entity (e.g. connection_id, transformation_id)"
|
|
53
|
+
},
|
|
54
|
+
"runtime": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"description": "Optional runtime slice written at deploy time; when present, project is self-describing",
|
|
57
|
+
"properties": {
|
|
58
|
+
"bot_ids": {
|
|
59
|
+
"type": "array",
|
|
60
|
+
"items": { "type": "string" },
|
|
61
|
+
"description": "rstreams bot IDs registered for this container"
|
|
62
|
+
},
|
|
63
|
+
"queue_ids": {
|
|
64
|
+
"type": "array",
|
|
65
|
+
"items": { "type": "string" },
|
|
66
|
+
"description": "rstreams queue names for this container"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://loxtep.io/schemas/entity/contract.json",
|
|
4
|
+
"title": "Contract Entity",
|
|
5
|
+
"description": "JSON Schema for Contract entity in customer workspace. Contracts are versioned agreements that define guarantees (SLA/SLO) for a Data Product.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"contract_id",
|
|
9
|
+
"organization_id",
|
|
10
|
+
"data_product_id",
|
|
11
|
+
"name",
|
|
12
|
+
"version",
|
|
13
|
+
"status",
|
|
14
|
+
"created_at",
|
|
15
|
+
"updated_at"
|
|
16
|
+
],
|
|
17
|
+
"properties": {
|
|
18
|
+
"contract_id": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"format": "uuid",
|
|
21
|
+
"description": "Unique identifier for the contract"
|
|
22
|
+
},
|
|
23
|
+
"organization_id": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"format": "uuid",
|
|
26
|
+
"description": "Organization that owns this contract"
|
|
27
|
+
},
|
|
28
|
+
"data_product_id": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"format": "uuid",
|
|
31
|
+
"description": "Reference to the data product this contract applies to"
|
|
32
|
+
},
|
|
33
|
+
"name": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"minLength": 1,
|
|
36
|
+
"maxLength": 255,
|
|
37
|
+
"description": "Contract name"
|
|
38
|
+
},
|
|
39
|
+
"description": {
|
|
40
|
+
"type": ["string", "null"],
|
|
41
|
+
"maxLength": 2000,
|
|
42
|
+
"description": "Contract description"
|
|
43
|
+
},
|
|
44
|
+
"version": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$",
|
|
47
|
+
"description": "Contract version (semantic versioning, e.g., 1.0.0)"
|
|
48
|
+
},
|
|
49
|
+
"status": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"enum": ["draft", "proposed", "active", "deprecated", "violated"],
|
|
52
|
+
"description": "Contract status"
|
|
53
|
+
},
|
|
54
|
+
"schema_ref": {
|
|
55
|
+
"type": ["object", "null"],
|
|
56
|
+
"description": "Reference to the schema version this contract applies to",
|
|
57
|
+
"properties": {
|
|
58
|
+
"schema_version_id": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"format": "uuid"
|
|
61
|
+
},
|
|
62
|
+
"version": {
|
|
63
|
+
"type": "string"
|
|
64
|
+
},
|
|
65
|
+
"format": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"enum": ["json-schema", "avro", "protobuf", "custom"]
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"additionalProperties": false
|
|
71
|
+
},
|
|
72
|
+
"guarantees": {
|
|
73
|
+
"type": "object",
|
|
74
|
+
"properties": {
|
|
75
|
+
"availability": {
|
|
76
|
+
"type": ["string", "null"],
|
|
77
|
+
"description": "Availability guarantee (e.g., '99.9%')"
|
|
78
|
+
},
|
|
79
|
+
"freshness": {
|
|
80
|
+
"type": ["string", "null"],
|
|
81
|
+
"description": "Freshness guarantee (e.g., '< 5 minutes')"
|
|
82
|
+
},
|
|
83
|
+
"completeness": {
|
|
84
|
+
"type": ["string", "null"],
|
|
85
|
+
"description": "Completeness guarantee (e.g., '99%')"
|
|
86
|
+
},
|
|
87
|
+
"accuracy": {
|
|
88
|
+
"type": ["string", "null"],
|
|
89
|
+
"description": "Accuracy guarantee (e.g., '99.5%')"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"additionalProperties": false,
|
|
93
|
+
"default": {}
|
|
94
|
+
},
|
|
95
|
+
"sla_definitions": {
|
|
96
|
+
"type": "array",
|
|
97
|
+
"items": {
|
|
98
|
+
"type": "object",
|
|
99
|
+
"required": ["metric_type", "target_value"],
|
|
100
|
+
"properties": {
|
|
101
|
+
"metric_type": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"enum": [
|
|
104
|
+
"availability",
|
|
105
|
+
"freshness",
|
|
106
|
+
"completeness",
|
|
107
|
+
"accuracy",
|
|
108
|
+
"response_time",
|
|
109
|
+
"throughput"
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
"target_value": {
|
|
113
|
+
"type": "number"
|
|
114
|
+
},
|
|
115
|
+
"unit": {
|
|
116
|
+
"type": ["string", "null"]
|
|
117
|
+
},
|
|
118
|
+
"measurement_window": {
|
|
119
|
+
"type": ["string", "null"]
|
|
120
|
+
},
|
|
121
|
+
"description": {
|
|
122
|
+
"type": ["string", "null"]
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"additionalProperties": false
|
|
126
|
+
},
|
|
127
|
+
"default": [],
|
|
128
|
+
"description": "Detailed SLA definitions"
|
|
129
|
+
},
|
|
130
|
+
"sla": {
|
|
131
|
+
"type": "object",
|
|
132
|
+
"properties": {
|
|
133
|
+
"response_time": {
|
|
134
|
+
"type": ["string", "null"],
|
|
135
|
+
"description": "Response time SLA (e.g., '< 100ms p95')"
|
|
136
|
+
},
|
|
137
|
+
"throughput": {
|
|
138
|
+
"type": ["string", "null"],
|
|
139
|
+
"description": "Throughput SLA (e.g., '10000 events/sec')"
|
|
140
|
+
},
|
|
141
|
+
"support_level": {
|
|
142
|
+
"type": ["string", "null"],
|
|
143
|
+
"description": "Support level (e.g., '24x7', 'business_hours')"
|
|
144
|
+
},
|
|
145
|
+
"escalation_contact": {
|
|
146
|
+
"type": ["string", "null"],
|
|
147
|
+
"format": "email"
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"additionalProperties": false,
|
|
151
|
+
"default": {}
|
|
152
|
+
},
|
|
153
|
+
"terms": {
|
|
154
|
+
"type": ["object", "null"],
|
|
155
|
+
"properties": {
|
|
156
|
+
"data_retention_days": {
|
|
157
|
+
"type": ["integer", "null"],
|
|
158
|
+
"minimum": 1
|
|
159
|
+
},
|
|
160
|
+
"usage_restrictions": {
|
|
161
|
+
"type": ["array", "null"],
|
|
162
|
+
"items": {
|
|
163
|
+
"type": "string"
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"compliance_requirements": {
|
|
167
|
+
"type": ["array", "null"],
|
|
168
|
+
"items": {
|
|
169
|
+
"type": "string"
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"additionalProperties": false
|
|
174
|
+
},
|
|
175
|
+
"effective_date": {
|
|
176
|
+
"type": ["string", "null"],
|
|
177
|
+
"format": "date-time",
|
|
178
|
+
"description": "ISO 8601 timestamp when contract becomes effective"
|
|
179
|
+
},
|
|
180
|
+
"expiration_date": {
|
|
181
|
+
"type": ["string", "null"],
|
|
182
|
+
"format": "date-time",
|
|
183
|
+
"description": "ISO 8601 timestamp when contract expires"
|
|
184
|
+
},
|
|
185
|
+
"metadata": {
|
|
186
|
+
"type": "object",
|
|
187
|
+
"additionalProperties": true,
|
|
188
|
+
"default": {},
|
|
189
|
+
"description": "Additional metadata for the contract"
|
|
190
|
+
},
|
|
191
|
+
"created_by": {
|
|
192
|
+
"type": ["string", "null"],
|
|
193
|
+
"format": "uuid",
|
|
194
|
+
"description": "User ID who created the contract"
|
|
195
|
+
},
|
|
196
|
+
"updated_by": {
|
|
197
|
+
"type": ["string", "null"],
|
|
198
|
+
"format": "uuid",
|
|
199
|
+
"description": "User ID who last updated the contract"
|
|
200
|
+
},
|
|
201
|
+
"approved_by": {
|
|
202
|
+
"type": ["string", "null"],
|
|
203
|
+
"format": "uuid",
|
|
204
|
+
"description": "User ID who approved the contract"
|
|
205
|
+
},
|
|
206
|
+
"approved_at": {
|
|
207
|
+
"type": ["string", "null"],
|
|
208
|
+
"format": "date-time",
|
|
209
|
+
"description": "ISO 8601 timestamp when contract was approved"
|
|
210
|
+
},
|
|
211
|
+
"created_at": {
|
|
212
|
+
"type": "string",
|
|
213
|
+
"format": "date-time",
|
|
214
|
+
"description": "ISO 8601 timestamp when contract was created"
|
|
215
|
+
},
|
|
216
|
+
"updated_at": {
|
|
217
|
+
"type": "string",
|
|
218
|
+
"format": "date-time",
|
|
219
|
+
"description": "ISO 8601 timestamp when contract was last updated"
|
|
220
|
+
},
|
|
221
|
+
"deleted_at": {
|
|
222
|
+
"type": ["string", "null"],
|
|
223
|
+
"format": "date-time",
|
|
224
|
+
"description": "ISO 8601 timestamp when contract was deleted (soft delete)"
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
"additionalProperties": false
|
|
228
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://loxtep.io/schemas/entity/data-product.json",
|
|
4
|
+
"title": "Data Product Entity",
|
|
5
|
+
"description": "JSON Schema for Data Product entity in customer workspace (Studio / S3 graph). Flow-graph fields (workflow_id, upstream_entity_id, etc.) describe placement in the workflow canvas. The canonical interoperable catalog and API representation is ODPS v4.1 (Open Data Products Standard): include `odps_document` aligned with https://opendataproducts.org/v4.1/schema/odps.json — see `odps-product.json` and .kiro/specs/odps-data-product-standard in the Loxtep repo.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"data_product_id",
|
|
9
|
+
"organization_id",
|
|
10
|
+
"workflow_id",
|
|
11
|
+
"name",
|
|
12
|
+
"status",
|
|
13
|
+
"created_at",
|
|
14
|
+
"updated_at"
|
|
15
|
+
],
|
|
16
|
+
"properties": {
|
|
17
|
+
"data_product_id": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"format": "uuid",
|
|
20
|
+
"description": "Unique identifier for the data product"
|
|
21
|
+
},
|
|
22
|
+
"organization_id": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"format": "uuid",
|
|
25
|
+
"description": "Organization that owns this data product"
|
|
26
|
+
},
|
|
27
|
+
"workflow_id": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"format": "uuid",
|
|
30
|
+
"description": "Reference to the workflow that produces this data product"
|
|
31
|
+
},
|
|
32
|
+
"domain_id": {
|
|
33
|
+
"type": ["string", "null"],
|
|
34
|
+
"format": "uuid",
|
|
35
|
+
"description": "Optional reference to the domain this data product belongs to"
|
|
36
|
+
},
|
|
37
|
+
"upstream_entity_id": {
|
|
38
|
+
"type": ["string", "null"],
|
|
39
|
+
"format": "uuid",
|
|
40
|
+
"description": "Reference to the upstream entity in the flow graph (last transformation, validation, or connection before this data product; source data product in an enrichment flow)"
|
|
41
|
+
},
|
|
42
|
+
"upstream_entity_type": {
|
|
43
|
+
"type": ["string", "null"],
|
|
44
|
+
"enum": [
|
|
45
|
+
"connections",
|
|
46
|
+
"transformations",
|
|
47
|
+
"validations",
|
|
48
|
+
"data-products",
|
|
49
|
+
null
|
|
50
|
+
],
|
|
51
|
+
"description": "Entity type of the upstream entity"
|
|
52
|
+
},
|
|
53
|
+
"name": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"minLength": 1,
|
|
56
|
+
"maxLength": 255,
|
|
57
|
+
"description": "Data product name"
|
|
58
|
+
},
|
|
59
|
+
"description": {
|
|
60
|
+
"type": ["string", "null"],
|
|
61
|
+
"maxLength": 2000,
|
|
62
|
+
"description": "Data product description"
|
|
63
|
+
},
|
|
64
|
+
"owner": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"required": ["user_id"],
|
|
67
|
+
"properties": {
|
|
68
|
+
"user_id": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"format": "uuid",
|
|
71
|
+
"description": "User ID of the data product owner"
|
|
72
|
+
},
|
|
73
|
+
"team": {
|
|
74
|
+
"type": ["string", "null"],
|
|
75
|
+
"description": "Team name (optional)"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"additionalProperties": false
|
|
79
|
+
},
|
|
80
|
+
"status": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"enum": ["draft", "active", "deprecated", "archived"],
|
|
83
|
+
"description": "Data product status"
|
|
84
|
+
},
|
|
85
|
+
"governance": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"required": ["classification"],
|
|
88
|
+
"properties": {
|
|
89
|
+
"classification": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"enum": ["public", "internal", "confidential", "restricted"]
|
|
92
|
+
},
|
|
93
|
+
"pii_fields": {
|
|
94
|
+
"type": "array",
|
|
95
|
+
"items": {
|
|
96
|
+
"type": "string"
|
|
97
|
+
},
|
|
98
|
+
"default": []
|
|
99
|
+
},
|
|
100
|
+
"compliance_requirements": {
|
|
101
|
+
"type": "array",
|
|
102
|
+
"items": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"enum": ["GDPR", "CCPA", "HIPAA", "SOX", "PCI_DSS"]
|
|
105
|
+
},
|
|
106
|
+
"default": []
|
|
107
|
+
},
|
|
108
|
+
"tags": {
|
|
109
|
+
"type": "array",
|
|
110
|
+
"items": {
|
|
111
|
+
"type": "string"
|
|
112
|
+
},
|
|
113
|
+
"default": []
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"additionalProperties": false,
|
|
117
|
+
"default": {
|
|
118
|
+
"classification": "internal",
|
|
119
|
+
"pii_fields": [],
|
|
120
|
+
"compliance_requirements": [],
|
|
121
|
+
"tags": []
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"metadata": {
|
|
125
|
+
"type": "object",
|
|
126
|
+
"additionalProperties": true,
|
|
127
|
+
"default": {},
|
|
128
|
+
"description": "Additional metadata for the data product"
|
|
129
|
+
},
|
|
130
|
+
"created_by": {
|
|
131
|
+
"type": ["string", "null"],
|
|
132
|
+
"format": "uuid",
|
|
133
|
+
"description": "User ID who created the data product"
|
|
134
|
+
},
|
|
135
|
+
"updated_by": {
|
|
136
|
+
"type": ["string", "null"],
|
|
137
|
+
"format": "uuid",
|
|
138
|
+
"description": "User ID who last updated the data product"
|
|
139
|
+
},
|
|
140
|
+
"created_at": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"format": "date-time",
|
|
143
|
+
"description": "ISO 8601 timestamp when data product was created"
|
|
144
|
+
},
|
|
145
|
+
"updated_at": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"format": "date-time",
|
|
148
|
+
"description": "ISO 8601 timestamp when data product was last updated"
|
|
149
|
+
},
|
|
150
|
+
"deleted_at": {
|
|
151
|
+
"type": ["string", "null"],
|
|
152
|
+
"format": "date-time",
|
|
153
|
+
"description": "ISO 8601 timestamp when data product was deleted (soft delete)"
|
|
154
|
+
},
|
|
155
|
+
"odps_document": {
|
|
156
|
+
"description": "Canonical ODPS v4.1 document (`{ product: ... }`). Preferred for platform catalog, governance, and ecosystem interoperability. Validated in the dataproducts API; Loxtep-specific fields under product.custom.loxtep.",
|
|
157
|
+
"allOf": [
|
|
158
|
+
{ "$ref": "https://loxtep.io/schemas/entity/odps-product.json" }
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"additionalProperties": false
|
|
163
|
+
}
|