@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,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://loxtep.io/schemas/entity/domain.json",
|
|
4
|
+
"title": "Domain Entity",
|
|
5
|
+
"description": "JSON Schema for Domain entity in customer workspace. Domains are logical, business-oriented subdivisions for organizing Data Products.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"domain_id",
|
|
9
|
+
"organization_id",
|
|
10
|
+
"name",
|
|
11
|
+
"created_at",
|
|
12
|
+
"updated_at"
|
|
13
|
+
],
|
|
14
|
+
"properties": {
|
|
15
|
+
"domain_id": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"format": "uuid",
|
|
18
|
+
"description": "Unique identifier for the domain"
|
|
19
|
+
},
|
|
20
|
+
"organization_id": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"format": "uuid",
|
|
23
|
+
"description": "Organization that owns this domain"
|
|
24
|
+
},
|
|
25
|
+
"name": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"minLength": 1,
|
|
28
|
+
"maxLength": 255,
|
|
29
|
+
"description": "Domain name"
|
|
30
|
+
},
|
|
31
|
+
"description": {
|
|
32
|
+
"type": ["string", "null"],
|
|
33
|
+
"maxLength": 1000,
|
|
34
|
+
"description": "Domain description"
|
|
35
|
+
},
|
|
36
|
+
"owner_user_id": {
|
|
37
|
+
"type": ["string", "null"],
|
|
38
|
+
"format": "uuid",
|
|
39
|
+
"description": "User ID of the domain owner"
|
|
40
|
+
},
|
|
41
|
+
"parent_domain_id": {
|
|
42
|
+
"type": ["string", "null"],
|
|
43
|
+
"format": "uuid",
|
|
44
|
+
"description": "Parent domain ID for hierarchical organization"
|
|
45
|
+
},
|
|
46
|
+
"is_council": {
|
|
47
|
+
"type": "boolean",
|
|
48
|
+
"default": false,
|
|
49
|
+
"description": "True if this is the Data Council domain"
|
|
50
|
+
},
|
|
51
|
+
"metadata": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"additionalProperties": true,
|
|
54
|
+
"default": {},
|
|
55
|
+
"description": "Additional metadata for the domain"
|
|
56
|
+
},
|
|
57
|
+
"created_at": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"format": "date-time",
|
|
60
|
+
"description": "ISO 8601 timestamp when domain was created"
|
|
61
|
+
},
|
|
62
|
+
"updated_at": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"format": "date-time",
|
|
65
|
+
"description": "ISO 8601 timestamp when domain was last updated"
|
|
66
|
+
},
|
|
67
|
+
"deleted_at": {
|
|
68
|
+
"type": ["string", "null"],
|
|
69
|
+
"format": "date-time",
|
|
70
|
+
"description": "ISO 8601 timestamp when domain was deleted (soft delete)"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"additionalProperties": false
|
|
74
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://loxtep.io/schemas/entity/export.json",
|
|
4
|
+
"title": "Export Entity",
|
|
5
|
+
"description": "JSON Schema for Export entity in customer workspace. Exports define reusable export configurations for data products.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"export_id",
|
|
9
|
+
"organization_id",
|
|
10
|
+
"data_product_id",
|
|
11
|
+
"name",
|
|
12
|
+
"format",
|
|
13
|
+
"compression",
|
|
14
|
+
"destination",
|
|
15
|
+
"created_at",
|
|
16
|
+
"updated_at"
|
|
17
|
+
],
|
|
18
|
+
"properties": {
|
|
19
|
+
"export_id": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"format": "uuid",
|
|
22
|
+
"description": "Unique identifier for the export configuration"
|
|
23
|
+
},
|
|
24
|
+
"organization_id": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"format": "uuid",
|
|
27
|
+
"description": "Organization that owns this export"
|
|
28
|
+
},
|
|
29
|
+
"data_product_id": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"format": "uuid",
|
|
32
|
+
"description": "Reference to the data product this export applies to"
|
|
33
|
+
},
|
|
34
|
+
"name": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"minLength": 1,
|
|
37
|
+
"maxLength": 255,
|
|
38
|
+
"description": "Export configuration name"
|
|
39
|
+
},
|
|
40
|
+
"description": {
|
|
41
|
+
"type": ["string", "null"],
|
|
42
|
+
"maxLength": 1000,
|
|
43
|
+
"description": "Export description"
|
|
44
|
+
},
|
|
45
|
+
"format": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"enum": ["csv", "parquet", "json", "jsonl", "avro"],
|
|
48
|
+
"description": "Export file format"
|
|
49
|
+
},
|
|
50
|
+
"compression": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"enum": ["none", "gzip", "snappy", "zstd"],
|
|
53
|
+
"default": "none",
|
|
54
|
+
"description": "Compression type"
|
|
55
|
+
},
|
|
56
|
+
"destination": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"enum": ["download", "s3", "gcs", "azure_blob"],
|
|
59
|
+
"description": "Export destination type"
|
|
60
|
+
},
|
|
61
|
+
"destination_config": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"additionalProperties": true,
|
|
64
|
+
"default": {},
|
|
65
|
+
"description": "Destination-specific configuration (S3 bucket, GCS path, etc.)"
|
|
66
|
+
},
|
|
67
|
+
"fields": {
|
|
68
|
+
"type": "array",
|
|
69
|
+
"items": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"minLength": 1
|
|
72
|
+
},
|
|
73
|
+
"minItems": 0,
|
|
74
|
+
"description": "Field names to include in export (empty = all fields)"
|
|
75
|
+
},
|
|
76
|
+
"date_filter": {
|
|
77
|
+
"type": "object",
|
|
78
|
+
"additionalProperties": true,
|
|
79
|
+
"default": {},
|
|
80
|
+
"description": "Date range filter configuration"
|
|
81
|
+
},
|
|
82
|
+
"schedule": {
|
|
83
|
+
"type": ["object", "null"],
|
|
84
|
+
"additionalProperties": true,
|
|
85
|
+
"description": "Schedule configuration for recurring exports (cron expression)"
|
|
86
|
+
},
|
|
87
|
+
"options": {
|
|
88
|
+
"type": "object",
|
|
89
|
+
"additionalProperties": true,
|
|
90
|
+
"default": {},
|
|
91
|
+
"description": "Additional export options (delimiter, headers, etc.)"
|
|
92
|
+
},
|
|
93
|
+
"metadata": {
|
|
94
|
+
"type": "object",
|
|
95
|
+
"additionalProperties": true,
|
|
96
|
+
"default": {},
|
|
97
|
+
"description": "Additional metadata for the export"
|
|
98
|
+
},
|
|
99
|
+
"created_by": {
|
|
100
|
+
"type": ["string", "null"],
|
|
101
|
+
"format": "uuid",
|
|
102
|
+
"description": "User ID who created the export"
|
|
103
|
+
},
|
|
104
|
+
"updated_by": {
|
|
105
|
+
"type": ["string", "null"],
|
|
106
|
+
"format": "uuid",
|
|
107
|
+
"description": "User ID who last updated the export"
|
|
108
|
+
},
|
|
109
|
+
"created_at": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"format": "date-time",
|
|
112
|
+
"description": "ISO 8601 timestamp when export was created"
|
|
113
|
+
},
|
|
114
|
+
"updated_at": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"format": "date-time",
|
|
117
|
+
"description": "ISO 8601 timestamp when export was last updated"
|
|
118
|
+
},
|
|
119
|
+
"deleted_at": {
|
|
120
|
+
"type": ["string", "null"],
|
|
121
|
+
"format": "date-time",
|
|
122
|
+
"description": "ISO 8601 timestamp when export was deleted (soft delete)"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"additionalProperties": false
|
|
126
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://loxtep.io/schemas/entity/odps-product.json",
|
|
4
|
+
"title": "ODPS v4.1 Data Product Document",
|
|
5
|
+
"x-canonical-json-schema": "https://opendataproducts.org/v4.1/schema/odps.json",
|
|
6
|
+
"description": "Open Data Products Standard (ODPS) v4.1 root document (`product.*`). Authoritative JSON Schema: https://opendataproducts.org/v4.1/schema/odps.json . Loxtep platform types and mapping: platform-backend/_core/src/types/odps/ and .kiro/specs/odps-data-product-standard. Platform-specific fields live under `product.custom.loxtep` (medallion, storage, ingestion, organization_id, domain_id, project_id, workflow_id, etc.). For strict full-schema validation in toolchains that resolve remote $ref, compose with allOf + $ref to x-canonical-json-schema (requires network or bundled copy).",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"required": ["product"],
|
|
9
|
+
"additionalProperties": false,
|
|
10
|
+
"properties": {
|
|
11
|
+
"product": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"required": ["details"],
|
|
14
|
+
"additionalProperties": true,
|
|
15
|
+
"properties": {
|
|
16
|
+
"details": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"minProperties": 1,
|
|
19
|
+
"description": "Localized product details; keys MUST be valid BCP-47 language tags (e.g. en, fr-CA). At least one locale required.",
|
|
20
|
+
"additionalProperties": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"required": ["name"],
|
|
23
|
+
"additionalProperties": true,
|
|
24
|
+
"properties": {
|
|
25
|
+
"name": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"minLength": 1,
|
|
28
|
+
"description": "Human-readable product name for this locale"
|
|
29
|
+
},
|
|
30
|
+
"description": { "type": "string" },
|
|
31
|
+
"status": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"description": "Lifecycle status (e.g. draft, active, deprecated, archived)"
|
|
34
|
+
},
|
|
35
|
+
"tags": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"items": { "type": "string" }
|
|
38
|
+
},
|
|
39
|
+
"type": { "type": "string" },
|
|
40
|
+
"governanceProfile": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"description": "e.g. public, internal, confidential, restricted"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"dataHolder": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"additionalProperties": true,
|
|
50
|
+
"properties": {
|
|
51
|
+
"businessDomain": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"description": "Business domain identifier (Loxtep: domain_id UUID)"
|
|
54
|
+
},
|
|
55
|
+
"dataProductOwner": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"description": "Owner identifier (Loxtep: user_id UUID)"
|
|
58
|
+
},
|
|
59
|
+
"email": { "type": "string" }
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"dataAccess": {
|
|
63
|
+
"type": "object",
|
|
64
|
+
"additionalProperties": true,
|
|
65
|
+
"properties": {
|
|
66
|
+
"outputPorts": {
|
|
67
|
+
"type": "array",
|
|
68
|
+
"items": {
|
|
69
|
+
"type": "object",
|
|
70
|
+
"additionalProperties": true
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"dataQuality": {
|
|
76
|
+
"type": "object",
|
|
77
|
+
"additionalProperties": true,
|
|
78
|
+
"properties": {
|
|
79
|
+
"declarative": {
|
|
80
|
+
"type": "object",
|
|
81
|
+
"additionalProperties": { "type": "number" }
|
|
82
|
+
},
|
|
83
|
+
"executable": { "type": "object", "additionalProperties": true }
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"SLA": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"additionalProperties": true,
|
|
89
|
+
"properties": {
|
|
90
|
+
"declarative": {
|
|
91
|
+
"type": "array",
|
|
92
|
+
"items": {
|
|
93
|
+
"type": "object",
|
|
94
|
+
"required": ["dimension", "value"],
|
|
95
|
+
"additionalProperties": true,
|
|
96
|
+
"properties": {
|
|
97
|
+
"dimension": { "type": "string" },
|
|
98
|
+
"value": { "type": ["string", "number"] },
|
|
99
|
+
"unit": { "type": "string" }
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"executable": { "type": "object", "additionalProperties": true }
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"contract": {
|
|
107
|
+
"type": "object",
|
|
108
|
+
"additionalProperties": true,
|
|
109
|
+
"properties": {
|
|
110
|
+
"contractId": { "type": "string" },
|
|
111
|
+
"contractVersion": { "type": "string" },
|
|
112
|
+
"contractStatus": { "type": "string" }
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"pricingPlans": {
|
|
116
|
+
"type": "array",
|
|
117
|
+
"items": { "type": "object", "additionalProperties": true }
|
|
118
|
+
},
|
|
119
|
+
"license": {
|
|
120
|
+
"type": "object",
|
|
121
|
+
"additionalProperties": true,
|
|
122
|
+
"properties": {
|
|
123
|
+
"name": { "type": "string" },
|
|
124
|
+
"url": { "type": "string", "format": "uri" }
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"productStrategy": {
|
|
128
|
+
"type": "object",
|
|
129
|
+
"additionalProperties": true,
|
|
130
|
+
"properties": {
|
|
131
|
+
"objectives": {
|
|
132
|
+
"type": "array",
|
|
133
|
+
"items": { "type": "string" }
|
|
134
|
+
},
|
|
135
|
+
"kpis": {
|
|
136
|
+
"type": "array",
|
|
137
|
+
"items": { "type": "object", "additionalProperties": true }
|
|
138
|
+
},
|
|
139
|
+
"strategicAlignment": { "type": "string" }
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"custom": {
|
|
143
|
+
"type": "object",
|
|
144
|
+
"description": "Open extension; Loxtep uses `custom.loxtep` for platform fields.",
|
|
145
|
+
"additionalProperties": true
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://loxtep.io/schemas/entity/quality-rule.json",
|
|
4
|
+
"title": "Quality Rule Entity",
|
|
5
|
+
"description": "JSON Schema for Quality Rule entity in customer workspace. Quality rules are reusable assertions that measure data quality metrics.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"quality_rule_id",
|
|
9
|
+
"organization_id",
|
|
10
|
+
"name",
|
|
11
|
+
"rule_type",
|
|
12
|
+
"condition",
|
|
13
|
+
"threshold",
|
|
14
|
+
"severity",
|
|
15
|
+
"created_at",
|
|
16
|
+
"updated_at"
|
|
17
|
+
],
|
|
18
|
+
"properties": {
|
|
19
|
+
"quality_rule_id": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"format": "uuid",
|
|
22
|
+
"description": "Unique identifier for the quality rule"
|
|
23
|
+
},
|
|
24
|
+
"organization_id": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"format": "uuid",
|
|
27
|
+
"description": "Organization that owns this quality rule"
|
|
28
|
+
},
|
|
29
|
+
"data_product_id": {
|
|
30
|
+
"type": ["string", "null"],
|
|
31
|
+
"format": "uuid",
|
|
32
|
+
"description": "Reference to data product this rule applies to (null for reusable rules)"
|
|
33
|
+
},
|
|
34
|
+
"name": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"minLength": 1,
|
|
37
|
+
"maxLength": 255,
|
|
38
|
+
"description": "Quality rule name"
|
|
39
|
+
},
|
|
40
|
+
"description": {
|
|
41
|
+
"type": ["string", "null"],
|
|
42
|
+
"maxLength": 1000,
|
|
43
|
+
"description": "Quality rule description"
|
|
44
|
+
},
|
|
45
|
+
"rule_type": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"enum": [
|
|
48
|
+
"completeness",
|
|
49
|
+
"accuracy",
|
|
50
|
+
"consistency",
|
|
51
|
+
"timeliness",
|
|
52
|
+
"validity",
|
|
53
|
+
"uniqueness",
|
|
54
|
+
"format"
|
|
55
|
+
],
|
|
56
|
+
"description": "Type of quality rule"
|
|
57
|
+
},
|
|
58
|
+
"condition": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"minLength": 1,
|
|
61
|
+
"description": "SQL-like expression or validation condition (e.g., 'field IS NOT NULL', 'field > 0')"
|
|
62
|
+
},
|
|
63
|
+
"threshold": {
|
|
64
|
+
"type": "number",
|
|
65
|
+
"description": "Threshold value for the rule (e.g., 0.95 for 95% completeness)"
|
|
66
|
+
},
|
|
67
|
+
"severity": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"enum": ["critical", "high", "medium", "low"],
|
|
70
|
+
"description": "Severity level when rule fails"
|
|
71
|
+
},
|
|
72
|
+
"enabled": {
|
|
73
|
+
"type": "boolean",
|
|
74
|
+
"default": true,
|
|
75
|
+
"description": "Whether this rule is enabled"
|
|
76
|
+
},
|
|
77
|
+
"error_message": {
|
|
78
|
+
"type": ["string", "null"],
|
|
79
|
+
"maxLength": 500,
|
|
80
|
+
"description": "Custom error message when rule fails"
|
|
81
|
+
},
|
|
82
|
+
"metadata": {
|
|
83
|
+
"type": "object",
|
|
84
|
+
"additionalProperties": true,
|
|
85
|
+
"default": {},
|
|
86
|
+
"description": "Additional metadata for the quality rule"
|
|
87
|
+
},
|
|
88
|
+
"created_by": {
|
|
89
|
+
"type": ["string", "null"],
|
|
90
|
+
"format": "uuid",
|
|
91
|
+
"description": "User ID who created the quality rule"
|
|
92
|
+
},
|
|
93
|
+
"updated_by": {
|
|
94
|
+
"type": ["string", "null"],
|
|
95
|
+
"format": "uuid",
|
|
96
|
+
"description": "User ID who last updated the quality rule"
|
|
97
|
+
},
|
|
98
|
+
"created_at": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"format": "date-time",
|
|
101
|
+
"description": "ISO 8601 timestamp when quality rule was created"
|
|
102
|
+
},
|
|
103
|
+
"updated_at": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"format": "date-time",
|
|
106
|
+
"description": "ISO 8601 timestamp when quality rule was last updated"
|
|
107
|
+
},
|
|
108
|
+
"deleted_at": {
|
|
109
|
+
"type": ["string", "null"],
|
|
110
|
+
"format": "date-time",
|
|
111
|
+
"description": "ISO 8601 timestamp when quality rule was deleted (soft delete)"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"additionalProperties": false
|
|
115
|
+
}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://loxtep.io/schemas/entity/schema.json",
|
|
4
|
+
"title": "Schema Entity",
|
|
5
|
+
"description": "JSON Schema for Schema entity in customer workspace. Schemas define the structural definition of events or tables in a Data Product.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"schema_id",
|
|
9
|
+
"organization_id",
|
|
10
|
+
"data_product_id",
|
|
11
|
+
"name",
|
|
12
|
+
"version",
|
|
13
|
+
"format",
|
|
14
|
+
"fields",
|
|
15
|
+
"status",
|
|
16
|
+
"created_at",
|
|
17
|
+
"updated_at"
|
|
18
|
+
],
|
|
19
|
+
"properties": {
|
|
20
|
+
"schema_id": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"format": "uuid",
|
|
23
|
+
"description": "Unique identifier for the schema"
|
|
24
|
+
},
|
|
25
|
+
"organization_id": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"format": "uuid",
|
|
28
|
+
"description": "Organization that owns this schema"
|
|
29
|
+
},
|
|
30
|
+
"data_product_id": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"format": "uuid",
|
|
33
|
+
"description": "Reference to the data product this schema belongs to"
|
|
34
|
+
},
|
|
35
|
+
"name": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"minLength": 1,
|
|
38
|
+
"maxLength": 255,
|
|
39
|
+
"description": "Schema name"
|
|
40
|
+
},
|
|
41
|
+
"description": {
|
|
42
|
+
"type": ["string", "null"],
|
|
43
|
+
"maxLength": 1000,
|
|
44
|
+
"description": "Schema description"
|
|
45
|
+
},
|
|
46
|
+
"version": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$",
|
|
49
|
+
"description": "Schema version (semantic versioning, e.g., 1.0.0)"
|
|
50
|
+
},
|
|
51
|
+
"version_number": {
|
|
52
|
+
"type": "integer",
|
|
53
|
+
"minimum": 1,
|
|
54
|
+
"description": "Sequential version number (1, 2, 3, ...)"
|
|
55
|
+
},
|
|
56
|
+
"format": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"enum": ["json-schema", "avro", "protobuf", "custom"],
|
|
59
|
+
"description": "Schema format"
|
|
60
|
+
},
|
|
61
|
+
"fields": {
|
|
62
|
+
"type": "array",
|
|
63
|
+
"items": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"required": ["name", "type", "required"],
|
|
66
|
+
"properties": {
|
|
67
|
+
"name": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"minLength": 1
|
|
70
|
+
},
|
|
71
|
+
"type": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"enum": [
|
|
74
|
+
"string",
|
|
75
|
+
"number",
|
|
76
|
+
"boolean",
|
|
77
|
+
"date",
|
|
78
|
+
"datetime",
|
|
79
|
+
"timestamp",
|
|
80
|
+
"object",
|
|
81
|
+
"array",
|
|
82
|
+
"uuid",
|
|
83
|
+
"json",
|
|
84
|
+
"enum"
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
"required": {
|
|
88
|
+
"type": "boolean"
|
|
89
|
+
},
|
|
90
|
+
"nullable": {
|
|
91
|
+
"type": "boolean",
|
|
92
|
+
"default": false
|
|
93
|
+
},
|
|
94
|
+
"description": {
|
|
95
|
+
"type": ["string", "null"]
|
|
96
|
+
},
|
|
97
|
+
"constraints": {
|
|
98
|
+
"type": ["object", "null"],
|
|
99
|
+
"additionalProperties": true
|
|
100
|
+
},
|
|
101
|
+
"is_pii": {
|
|
102
|
+
"type": ["boolean", "null"]
|
|
103
|
+
},
|
|
104
|
+
"pii_type": {
|
|
105
|
+
"type": ["string", "null"],
|
|
106
|
+
"enum": [
|
|
107
|
+
"email",
|
|
108
|
+
"phone",
|
|
109
|
+
"ssn",
|
|
110
|
+
"name",
|
|
111
|
+
"address",
|
|
112
|
+
"financial",
|
|
113
|
+
"health",
|
|
114
|
+
"other"
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
"fields": {
|
|
118
|
+
"type": ["array", "null"],
|
|
119
|
+
"items": {
|
|
120
|
+
"$ref": "#/properties/fields/items"
|
|
121
|
+
},
|
|
122
|
+
"description": "Nested fields for object/array types"
|
|
123
|
+
},
|
|
124
|
+
"enum_values": {
|
|
125
|
+
"type": ["array", "null"],
|
|
126
|
+
"items": {
|
|
127
|
+
"type": "string"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"additionalProperties": false
|
|
132
|
+
},
|
|
133
|
+
"minItems": 0,
|
|
134
|
+
"description": "Schema field definitions"
|
|
135
|
+
},
|
|
136
|
+
"raw_schema": {
|
|
137
|
+
"type": ["string", "null"],
|
|
138
|
+
"description": "Original schema definition (JSON, Avro, etc.) as string"
|
|
139
|
+
},
|
|
140
|
+
"is_backwards_compatible": {
|
|
141
|
+
"type": "boolean",
|
|
142
|
+
"default": true,
|
|
143
|
+
"description": "Whether this version is backwards compatible with previous versions"
|
|
144
|
+
},
|
|
145
|
+
"breaking_changes": {
|
|
146
|
+
"type": "array",
|
|
147
|
+
"items": {
|
|
148
|
+
"type": "string"
|
|
149
|
+
},
|
|
150
|
+
"default": [],
|
|
151
|
+
"description": "List of breaking changes from previous version"
|
|
152
|
+
},
|
|
153
|
+
"migration_notes": {
|
|
154
|
+
"type": ["string", "null"],
|
|
155
|
+
"maxLength": 2000,
|
|
156
|
+
"description": "Migration notes for consumers"
|
|
157
|
+
},
|
|
158
|
+
"status": {
|
|
159
|
+
"type": "string",
|
|
160
|
+
"enum": ["draft", "active", "deprecated", "archived"],
|
|
161
|
+
"description": "Schema status"
|
|
162
|
+
},
|
|
163
|
+
"published_at": {
|
|
164
|
+
"type": ["string", "null"],
|
|
165
|
+
"format": "date-time",
|
|
166
|
+
"description": "ISO 8601 timestamp when schema was published"
|
|
167
|
+
},
|
|
168
|
+
"deprecated_at": {
|
|
169
|
+
"type": ["string", "null"],
|
|
170
|
+
"format": "date-time",
|
|
171
|
+
"description": "ISO 8601 timestamp when schema was deprecated"
|
|
172
|
+
},
|
|
173
|
+
"metadata": {
|
|
174
|
+
"type": "object",
|
|
175
|
+
"additionalProperties": true,
|
|
176
|
+
"default": {},
|
|
177
|
+
"description": "Additional metadata for the schema"
|
|
178
|
+
},
|
|
179
|
+
"created_by": {
|
|
180
|
+
"type": ["string", "null"],
|
|
181
|
+
"format": "uuid",
|
|
182
|
+
"description": "User ID who created the schema"
|
|
183
|
+
},
|
|
184
|
+
"updated_by": {
|
|
185
|
+
"type": ["string", "null"],
|
|
186
|
+
"format": "uuid",
|
|
187
|
+
"description": "User ID who last updated the schema"
|
|
188
|
+
},
|
|
189
|
+
"created_at": {
|
|
190
|
+
"type": "string",
|
|
191
|
+
"format": "date-time",
|
|
192
|
+
"description": "ISO 8601 timestamp when schema was created"
|
|
193
|
+
},
|
|
194
|
+
"updated_at": {
|
|
195
|
+
"type": "string",
|
|
196
|
+
"format": "date-time",
|
|
197
|
+
"description": "ISO 8601 timestamp when schema was last updated"
|
|
198
|
+
},
|
|
199
|
+
"deleted_at": {
|
|
200
|
+
"type": ["string", "null"],
|
|
201
|
+
"format": "date-time",
|
|
202
|
+
"description": "ISO 8601 timestamp when schema was deleted (soft delete)"
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"additionalProperties": false
|
|
206
|
+
}
|