@loxtep/sdk 0.7.22 → 0.7.26

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.
Files changed (143) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/README.md +6 -1
  3. package/dist/authoring/toolbox.d.ts.map +1 -1
  4. package/dist/authoring/toolbox.js +15 -3
  5. package/dist/authoring/toolbox.js.map +1 -1
  6. package/dist/cli/commands/connectors-cmd.d.ts +23 -0
  7. package/dist/cli/commands/connectors-cmd.d.ts.map +1 -0
  8. package/dist/cli/commands/connectors-cmd.js +32 -0
  9. package/dist/cli/commands/connectors-cmd.js.map +1 -0
  10. package/dist/cli/commands/delivery-cmd.d.ts +23 -0
  11. package/dist/cli/commands/delivery-cmd.d.ts.map +1 -0
  12. package/dist/cli/commands/delivery-cmd.js +151 -0
  13. package/dist/cli/commands/delivery-cmd.js.map +1 -0
  14. package/dist/cli/commands/deploy-cmd.d.ts +5 -1
  15. package/dist/cli/commands/deploy-cmd.d.ts.map +1 -1
  16. package/dist/cli/commands/deploy-cmd.js +39 -4
  17. package/dist/cli/commands/deploy-cmd.js.map +1 -1
  18. package/dist/cli/commands/ingest-cmd.d.ts +13 -3
  19. package/dist/cli/commands/ingest-cmd.d.ts.map +1 -1
  20. package/dist/cli/commands/ingest-cmd.js +136 -31
  21. package/dist/cli/commands/ingest-cmd.js.map +1 -1
  22. package/dist/cli/commands/lint-cmd.d.ts +17 -0
  23. package/dist/cli/commands/lint-cmd.d.ts.map +1 -0
  24. package/dist/cli/commands/lint-cmd.js +61 -0
  25. package/dist/cli/commands/lint-cmd.js.map +1 -0
  26. package/dist/cli/commands/login.d.ts.map +1 -1
  27. package/dist/cli/commands/login.js +1 -0
  28. package/dist/cli/commands/login.js.map +1 -1
  29. package/dist/cli/commands/push-cmd.d.ts +21 -0
  30. package/dist/cli/commands/push-cmd.d.ts.map +1 -0
  31. package/dist/cli/commands/push-cmd.js +108 -0
  32. package/dist/cli/commands/push-cmd.js.map +1 -0
  33. package/dist/cli/commands/transform-cmd.d.ts +22 -0
  34. package/dist/cli/commands/transform-cmd.d.ts.map +1 -0
  35. package/dist/cli/commands/transform-cmd.js +148 -0
  36. package/dist/cli/commands/transform-cmd.js.map +1 -0
  37. package/dist/cli/commands/triggers-cmd.d.ts +4 -0
  38. package/dist/cli/commands/triggers-cmd.d.ts.map +1 -1
  39. package/dist/cli/commands/triggers-cmd.js +41 -9
  40. package/dist/cli/commands/triggers-cmd.js.map +1 -1
  41. package/dist/cli/commands/workflows-cmd.d.ts +2 -0
  42. package/dist/cli/commands/workflows-cmd.d.ts.map +1 -1
  43. package/dist/cli/commands/workflows-cmd.js +13 -0
  44. package/dist/cli/commands/workflows-cmd.js.map +1 -1
  45. package/dist/cli/credentials.d.ts.map +1 -1
  46. package/dist/cli/credentials.js +7 -2
  47. package/dist/cli/credentials.js.map +1 -1
  48. package/dist/cli/help.d.ts.map +1 -1
  49. package/dist/cli/help.js +26 -6
  50. package/dist/cli/help.js.map +1 -1
  51. package/dist/cli/index.js +131 -19
  52. package/dist/cli/index.js.map +1 -1
  53. package/dist/cli/update-notifier.d.ts +45 -0
  54. package/dist/cli/update-notifier.d.ts.map +1 -0
  55. package/dist/cli/update-notifier.js +154 -0
  56. package/dist/cli/update-notifier.js.map +1 -0
  57. package/dist/client/connectors.d.ts.map +1 -1
  58. package/dist/client/connectors.js +7 -1
  59. package/dist/client/connectors.js.map +1 -1
  60. package/dist/client/data-products-types.d.ts +2 -2
  61. package/dist/client/data-products-types.d.ts.map +1 -1
  62. package/dist/client/data-products.d.ts.map +1 -1
  63. package/dist/client/data-products.js +30 -11
  64. package/dist/client/data-products.js.map +1 -1
  65. package/dist/client/flow-types.d.ts +4 -0
  66. package/dist/client/flow-types.d.ts.map +1 -1
  67. package/dist/client/projects.d.ts +2 -0
  68. package/dist/client/projects.d.ts.map +1 -1
  69. package/dist/client/projects.js +4 -0
  70. package/dist/client/projects.js.map +1 -1
  71. package/dist/client/queues.d.ts.map +1 -1
  72. package/dist/client/queues.js +26 -3
  73. package/dist/client/queues.js.map +1 -1
  74. package/dist/client/target-types.d.ts +82 -79
  75. package/dist/client/target-types.d.ts.map +1 -1
  76. package/dist/client/target-types.js +2 -6
  77. package/dist/client/target-types.js.map +1 -1
  78. package/dist/client/targets.d.ts +27 -12
  79. package/dist/client/targets.d.ts.map +1 -1
  80. package/dist/client/targets.js +130 -84
  81. package/dist/client/targets.js.map +1 -1
  82. package/dist/client/trigger-types.d.ts +12 -1
  83. package/dist/client/trigger-types.d.ts.map +1 -1
  84. package/dist/client/trigger-types.js +1 -1
  85. package/dist/client/triggers.d.ts +20 -6
  86. package/dist/client/triggers.d.ts.map +1 -1
  87. package/dist/client/triggers.js +128 -45
  88. package/dist/client/triggers.js.map +1 -1
  89. package/dist/config/platform-request-url.d.ts +1 -5
  90. package/dist/config/platform-request-url.d.ts.map +1 -1
  91. package/dist/config/platform-request-url.js +22 -13
  92. package/dist/config/platform-request-url.js.map +1 -1
  93. package/dist/config/resolve-sdk-urls.d.ts.map +1 -1
  94. package/dist/config/resolve-sdk-urls.js +6 -4
  95. package/dist/config/resolve-sdk-urls.js.map +1 -1
  96. package/dist/errors/parse-http.d.ts.map +1 -1
  97. package/dist/errors/parse-http.js +50 -12
  98. package/dist/errors/parse-http.js.map +1 -1
  99. package/dist/index.d.ts +5 -2
  100. package/dist/index.d.ts.map +1 -1
  101. package/dist/index.js +3 -1
  102. package/dist/index.js.map +1 -1
  103. package/dist/lib/entity-json-schemas/ajv-loader.cjs +17 -0
  104. package/dist/lib/entity-json-schemas/index.d.ts +5 -0
  105. package/dist/lib/entity-json-schemas/index.d.ts.map +1 -0
  106. package/dist/lib/entity-json-schemas/index.js +3 -0
  107. package/dist/lib/entity-json-schemas/index.js.map +1 -0
  108. package/dist/lib/entity-json-schemas/types.d.ts +21 -0
  109. package/dist/lib/entity-json-schemas/types.d.ts.map +1 -0
  110. package/dist/lib/entity-json-schemas/types.js +32 -0
  111. package/dist/lib/entity-json-schemas/types.js.map +1 -0
  112. package/dist/lib/entity-json-schemas/validate-entity.d.ts +39 -0
  113. package/dist/lib/entity-json-schemas/validate-entity.d.ts.map +1 -0
  114. package/dist/lib/entity-json-schemas/validate-entity.js +143 -0
  115. package/dist/lib/entity-json-schemas/validate-entity.js.map +1 -0
  116. package/dist/lib/sdk-ingest-bundle.d.ts +62 -4
  117. package/dist/lib/sdk-ingest-bundle.d.ts.map +1 -1
  118. package/dist/lib/sdk-ingest-bundle.js +147 -51
  119. package/dist/lib/sdk-ingest-bundle.js.map +1 -1
  120. package/dist/lib/workspace-lint.d.ts +28 -0
  121. package/dist/lib/workspace-lint.d.ts.map +1 -0
  122. package/dist/lib/workspace-lint.js +199 -0
  123. package/dist/lib/workspace-lint.js.map +1 -0
  124. package/dist/skills/loader.d.ts +10 -10
  125. package/docs/getting-started.md +2 -0
  126. package/docs/quick-reference.md +1 -0
  127. package/docs/sdk-first-ingest.md +19 -3
  128. package/package.json +6 -2
  129. package/schemas/entity-json-schemas/SCHEMA_SYNC.md +18 -0
  130. package/schemas/entity-json-schemas/connection.json +310 -0
  131. package/schemas/entity-json-schemas/connector.json +188 -0
  132. package/schemas/entity-json-schemas/container.json +71 -0
  133. package/schemas/entity-json-schemas/contract.json +228 -0
  134. package/schemas/entity-json-schemas/data-product.json +163 -0
  135. package/schemas/entity-json-schemas/domain.json +74 -0
  136. package/schemas/entity-json-schemas/export.json +126 -0
  137. package/schemas/entity-json-schemas/odps-product.json +150 -0
  138. package/schemas/entity-json-schemas/quality-rule.json +115 -0
  139. package/schemas/entity-json-schemas/schema.json +206 -0
  140. package/schemas/entity-json-schemas/transformation.json +166 -0
  141. package/schemas/entity-json-schemas/validation.json +152 -0
  142. package/schemas/entity-json-schemas/workflow-graph.json +116 -0
  143. package/schemas/entity-json-schemas/workflow.json +193 -0
@@ -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
+ }
@@ -0,0 +1,166 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://loxtep.io/schemas/entity/transformation.json",
4
+ "title": "Transformation Entity",
5
+ "description": "JSON Schema for Transformation entity in customer workspace. Transformations are pure functions that mutate/enrich events within a workflow flow. Each transformation references its workflow via workflow_id and its upstream entity (connection or previous transformation) via upstream_entity_id.",
6
+ "type": "object",
7
+ "required": [
8
+ "transformation_id",
9
+ "organization_id",
10
+ "project_id",
11
+ "workflow_id",
12
+ "name",
13
+ "transform_type",
14
+ "operation_config",
15
+ "created_at",
16
+ "updated_at"
17
+ ],
18
+ "properties": {
19
+ "transformation_id": {
20
+ "type": "string",
21
+ "format": "uuid",
22
+ "description": "Unique identifier for the transformation"
23
+ },
24
+ "organization_id": {
25
+ "type": "string",
26
+ "format": "uuid",
27
+ "description": "Organization that owns this transformation"
28
+ },
29
+ "project_id": {
30
+ "type": "string",
31
+ "format": "uuid",
32
+ "description": "Project that contains this transformation"
33
+ },
34
+ "workflow_id": {
35
+ "type": "string",
36
+ "format": "uuid",
37
+ "description": "Workflow this transformation belongs to"
38
+ },
39
+ "upstream_entity_id": {
40
+ "type": ["string", "null"],
41
+ "format": "uuid",
42
+ "description": "Reference to the upstream entity in the flow graph (connection or previous transformation). Null only when this is the first transformation directly after the trigger connection."
43
+ },
44
+ "upstream_entity_type": {
45
+ "type": ["string", "null"],
46
+ "enum": ["connections", "transformations", null],
47
+ "description": "Entity type of the upstream entity (connections or transformations)"
48
+ },
49
+ "name": {
50
+ "type": "string",
51
+ "minLength": 1,
52
+ "maxLength": 255,
53
+ "description": "Transformation name"
54
+ },
55
+ "description": {
56
+ "type": ["string", "null"],
57
+ "maxLength": 1000,
58
+ "description": "Transformation description"
59
+ },
60
+ "transform_type": {
61
+ "type": "string",
62
+ "enum": [
63
+ "drop_fields",
64
+ "select_fields",
65
+ "rename_field",
66
+ "drop_null_fields",
67
+ "drop_duplicates",
68
+ "flatten",
69
+ "explode_array",
70
+ "array_to_column",
71
+ "capitalize",
72
+ "format_timestamp",
73
+ "add_current_timestamp",
74
+ "parse_json",
75
+ "xml_to_json",
76
+ "extract_json_path",
77
+ "regex_extractor",
78
+ "concatenate_columns",
79
+ "derived_columns",
80
+ "fill_missing_values",
81
+ "detect_sensitive_data",
82
+ "evaluate_data_quality",
83
+ "change_schema",
84
+ "filter",
85
+ "batch",
86
+ "delay",
87
+ "split",
88
+ "execute_code_function",
89
+ "crypto",
90
+ "formatter",
91
+ "assign_identifier",
92
+ "remove_null_events",
93
+ "map",
94
+ "enrich",
95
+ "add_fields",
96
+ "rename_fields",
97
+ "custom"
98
+ ],
99
+ "description": "Type of transformation operation"
100
+ },
101
+ "operation_config": {
102
+ "type": "object",
103
+ "additionalProperties": true,
104
+ "description": "Transformation-specific configuration parameters",
105
+ "examples": [
106
+ {
107
+ "fields": ["field1", "field2"]
108
+ },
109
+ {
110
+ "condition": "status === 'active'"
111
+ },
112
+ {
113
+ "field": "name",
114
+ "case": "upper"
115
+ }
116
+ ]
117
+ },
118
+ "input_schema": {
119
+ "type": ["object", "null"],
120
+ "description": "Optional: JSON Schema of input events (for validation and type checking). Any JSON Schema object.",
121
+ "additionalProperties": true
122
+ },
123
+ "output_schema": {
124
+ "type": ["object", "null"],
125
+ "description": "Optional: JSON Schema of output events after transformation (typically inferred). Any JSON Schema object.",
126
+ "additionalProperties": true
127
+ },
128
+ "order": {
129
+ "type": ["integer", "null"],
130
+ "minimum": 0,
131
+ "description": "Default execution order when used in workflows (lower = earlier)"
132
+ },
133
+ "metadata": {
134
+ "type": "object",
135
+ "additionalProperties": true,
136
+ "default": {},
137
+ "description": "Additional metadata for the transformation"
138
+ },
139
+ "created_by": {
140
+ "type": ["string", "null"],
141
+ "format": "uuid",
142
+ "description": "User ID who created the transformation"
143
+ },
144
+ "updated_by": {
145
+ "type": ["string", "null"],
146
+ "format": "uuid",
147
+ "description": "User ID who last updated the transformation"
148
+ },
149
+ "created_at": {
150
+ "type": "string",
151
+ "format": "date-time",
152
+ "description": "ISO 8601 timestamp when transformation was created"
153
+ },
154
+ "updated_at": {
155
+ "type": "string",
156
+ "format": "date-time",
157
+ "description": "ISO 8601 timestamp when transformation was last updated"
158
+ },
159
+ "deleted_at": {
160
+ "type": ["string", "null"],
161
+ "format": "date-time",
162
+ "description": "ISO 8601 timestamp when transformation was deleted (soft delete)"
163
+ }
164
+ },
165
+ "additionalProperties": false
166
+ }