@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
@@ -22,20 +22,34 @@ You should see `project_id` and `instance_id` from `attach`.
22
22
 
23
23
  ---
24
24
 
25
- ## Phase 2 — Create your data product
25
+ ## Phase 2 — Create your data product (local package)
26
26
 
27
27
  Pick a name your app will use (example: `app-events`):
28
28
 
29
29
  ```bash
30
+ pnpm exec loxtep connectors list --type sdk # optional: see existing SDK connectors
30
31
  pnpm exec loxtep ingest provision --name app-events
32
+ pnpm exec loxtep lint
31
33
  ```
32
34
 
33
- That is all you need for SDK writes one command, one name.
35
+ `ingest provision` reuses an existing SDK connector when one exists (or creates one),
36
+ then writes a **local** workflow package under `connectors/` and `workflows/<id>/`.
37
+ It does **not** deploy by default. Validate with `loxtep lint`, then publish:
38
+
39
+ ```bash
40
+ pnpm exec loxtep deploy --dry-run # lint only
41
+ pnpm exec loxtep deploy # lint + compile/deploy modules
42
+ # or: pnpm exec loxtep ingest provision --name app-events --deploy
43
+ ```
44
+
45
+ That local package is what you iterate on; deploy pushes it to your instance.
34
46
 
35
47
  ---
36
48
 
37
49
  ## Phase 3 — Confirm it exists
38
50
 
51
+ After deploy:
52
+
39
53
  ```bash
40
54
  pnpm exec loxtep data-products list
41
55
  ```
@@ -90,6 +104,8 @@ pnpm exec loxtep login
90
104
  pnpm exec loxtep init
91
105
  pnpm exec loxtep attach --instance <instance-id>
92
106
  pnpm exec loxtep ingest provision --name app-events
107
+ pnpm exec loxtep lint
108
+ pnpm exec loxtep deploy
93
109
  pnpm exec loxtep data-products list
94
110
  ```
95
111
 
@@ -102,7 +118,7 @@ Then `get_writer('app-events')` in your app.
102
118
  | What you see | What to do |
103
119
  | ------------ | ---------- |
104
120
  | Data product not found | Run `data-products list`. Check the name matches `get_writer('…')` exactly. |
105
- | Not ready to accept writes | Run `ingest provision` again for that name. Make sure you ran `attach` first. |
121
+ | Not ready to accept writes | Run `ingest provision`, then `deploy` (or `ingest provision --deploy`). Make sure you ran `attach` first. |
106
122
  | Multiple products with the same name | Pass the data product id to `get_writer`, or ensure `attach` points at the right instance. |
107
123
  | No domain available | Create a domain in the Loxtep UI, or pass `--domain-id` to `ingest provision`. |
108
124
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loxtep/sdk",
3
- "version": "0.7.22",
3
+ "version": "0.7.26",
4
4
  "description": "Loxtep SDK for Node.js — the Enterprise Context Layer: data products, workflows, projects, queues, and machine-usable context for AI",
5
5
  "author": "Loxtep <engineering@loxtep.io>",
6
6
  "homepage": "https://loxtep.io",
@@ -33,13 +33,15 @@
33
33
  "files": [
34
34
  "dist",
35
35
  "docs",
36
+ "schemas",
36
37
  "CHANGELOG.md"
37
38
  ],
38
39
  "scripts": {
39
- "build": "tsc",
40
+ "build": "tsc && mkdir -p dist/lib/entity-json-schemas && cp src/lib/entity-json-schemas/ajv-loader.cjs dist/lib/entity-json-schemas/ajv-loader.cjs",
40
41
  "prepublishOnly": "npm run build",
41
42
  "test": "jest --config jest.config.cjs",
42
43
  "lint": "eslint src --ext .ts",
44
+ "sync:entity-schemas": "node scripts/sync-entity-schemas.mjs",
43
45
  "generate:api-types": "tsx scripts/generate-api-types.ts",
44
46
  "docs": "typedoc"
45
47
  },
@@ -82,6 +84,8 @@
82
84
  "@smithy/protocol-http": "^5.4.3",
83
85
  "@smithy/signature-v4": "^5.4.3",
84
86
  "@smithy/types": "^4.14.2",
87
+ "ajv": "^8.20.0",
88
+ "ajv-formats": "^3.0.1",
85
89
  "js-yaml": "^4.3.0",
86
90
  "leo-sdk": "7.1.21",
87
91
  "zod": "^4.4.3"
@@ -0,0 +1,18 @@
1
+ # Entity JSON schemas (vendored)
2
+
3
+ These JSON Schema draft-07 files are a copy of the Loxtep platform schemas used
4
+ for customer workspace entity validation.
5
+
6
+ **Source (canonical):**
7
+ `loxtep/platform-backend/_core/src/customer-workspace/entity-json-schemas/`
8
+
9
+ **Sync command** (from `nodejs/`):
10
+
11
+ ```bash
12
+ node scripts/sync-entity-schemas.mjs /path/to/loxtep
13
+ ```
14
+
15
+ When platform schemas change, re-run the sync script and note the date/source
16
+ commit in the SDK CHANGELOG.
17
+
18
+ **Last synced:** 2026-07-24 (from local loxtep checkout)
@@ -0,0 +1,310 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://loxtep.io/schemas/entity/connection.json",
4
+ "title": "Connection Entity",
5
+ "description": "JSON Schema for Connection entity in customer workspace. Connections are configured instances of connectors with credentials and settings.",
6
+ "type": "object",
7
+ "required": [
8
+ "connection_id",
9
+ "organization_id",
10
+ "project_id",
11
+ "key",
12
+ "name",
13
+ "type",
14
+ "status"
15
+ ],
16
+ "properties": {
17
+ "connection_id": {
18
+ "type": "string",
19
+ "format": "uuid",
20
+ "description": "Unique identifier for the connection"
21
+ },
22
+ "organization_id": {
23
+ "type": "string",
24
+ "format": "uuid",
25
+ "description": "Organization that owns this connection"
26
+ },
27
+ "project_id": {
28
+ "type": "string",
29
+ "format": "uuid",
30
+ "description": "Project that contains this connection"
31
+ },
32
+ "workflow_id": {
33
+ "type": ["string", "null"],
34
+ "format": "uuid",
35
+ "description": "Workflow this connection belongs to; null for project-level/draft connections"
36
+ },
37
+ "connector_id": {
38
+ "type": ["string", "null"],
39
+ "format": "uuid",
40
+ "description": "Reference to the connector definition this connection uses; null for project-level/draft connections"
41
+ },
42
+ "sync_entity": {
43
+ "type": ["string", "null"],
44
+ "pattern": "^[a-z0-9-_]+$",
45
+ "description": "For API poll connectors: which entity (e.g. orders, customers) this connection syncs. Must match connector supported_entities when present."
46
+ },
47
+ "key": {
48
+ "type": "string",
49
+ "minLength": 1,
50
+ "maxLength": 255,
51
+ "pattern": "^[a-z0-9-_]+$",
52
+ "description": "Unique key for the connection within the organization"
53
+ },
54
+ "name": {
55
+ "type": "string",
56
+ "minLength": 1,
57
+ "maxLength": 255,
58
+ "description": "Display name for the connection"
59
+ },
60
+ "description": {
61
+ "type": ["string", "null"],
62
+ "maxLength": 1000,
63
+ "description": "Connection description"
64
+ },
65
+ "type": {
66
+ "type": "string",
67
+ "minLength": 1,
68
+ "description": "Connection type: database, api, webhook, file, or connector type (e.g. spotify, shopify)"
69
+ },
70
+ "status": {
71
+ "type": "string",
72
+ "enum": ["active", "inactive", "error"],
73
+ "description": "Connection status"
74
+ },
75
+ "credential_fields": {
76
+ "type": "object",
77
+ "description": "Encrypted credential fields for the connection (structure depends on connector auth_type)",
78
+ "properties": {
79
+ "api_key": {
80
+ "type": ["string", "null"],
81
+ "description": "API key (encrypted)"
82
+ },
83
+ "api_secret": {
84
+ "type": ["string", "null"],
85
+ "description": "API secret (encrypted)"
86
+ },
87
+ "oauth_access_token": {
88
+ "type": ["string", "null"],
89
+ "description": "OAuth access token (encrypted)"
90
+ },
91
+ "oauth_refresh_token": {
92
+ "type": ["string", "null"],
93
+ "description": "OAuth refresh token (encrypted)"
94
+ },
95
+ "oauth_expires_at": {
96
+ "type": ["string", "null"],
97
+ "format": "date-time",
98
+ "description": "OAuth token expiration time"
99
+ },
100
+ "username": {
101
+ "type": ["string", "null"],
102
+ "description": "Username for basic auth (encrypted)"
103
+ },
104
+ "password": {
105
+ "type": ["string", "null"],
106
+ "description": "Password for basic auth (encrypted)"
107
+ },
108
+ "bearer_token": {
109
+ "type": ["string", "null"],
110
+ "description": "Bearer token (encrypted)"
111
+ },
112
+ "custom_credentials": {
113
+ "type": ["object", "null"],
114
+ "additionalProperties": {
115
+ "type": "string"
116
+ },
117
+ "description": "Custom credential fields (encrypted)"
118
+ }
119
+ },
120
+ "additionalProperties": false
121
+ },
122
+ "credential_parameter_store_refs": {
123
+ "type": "object",
124
+ "description": "SSM Parameter Store paths for OAuth/credentials (keyed by credential name)",
125
+ "additionalProperties": {
126
+ "type": "string"
127
+ }
128
+ },
129
+ "configuration": {
130
+ "type": "object",
131
+ "additionalProperties": true,
132
+ "default": {},
133
+ "description": "Connection configuration (non-sensitive settings)"
134
+ },
135
+ "metadata": {
136
+ "type": "object",
137
+ "additionalProperties": true,
138
+ "default": {},
139
+ "description": "Additional metadata for the connection"
140
+ },
141
+ "verified": {
142
+ "type": "boolean",
143
+ "default": false,
144
+ "description": "Whether the connection has been verified/tested"
145
+ },
146
+ "draft": {
147
+ "type": "boolean",
148
+ "default": true,
149
+ "description": "Whether this connection is still in draft state"
150
+ },
151
+ "last_tested": {
152
+ "type": ["string", "null"],
153
+ "format": "date-time",
154
+ "description": "ISO 8601 timestamp when connection was last tested"
155
+ },
156
+ "created_by": {
157
+ "type": ["string", "null"],
158
+ "format": "uuid",
159
+ "description": "User ID who created the connection"
160
+ },
161
+ "updated_by": {
162
+ "type": ["string", "null"],
163
+ "format": "uuid",
164
+ "description": "User ID who last updated the connection"
165
+ },
166
+ "created_at": {
167
+ "type": "string",
168
+ "format": "date-time",
169
+ "description": "ISO 8601 timestamp when connection was created"
170
+ },
171
+ "updated_at": {
172
+ "type": "string",
173
+ "format": "date-time",
174
+ "description": "ISO 8601 timestamp when connection was last updated"
175
+ },
176
+ "deleted_at": {
177
+ "type": ["string", "null"],
178
+ "format": "date-time",
179
+ "description": "ISO 8601 timestamp when connection was deleted (soft delete)"
180
+ },
181
+ "ingestion_config": {
182
+ "type": ["object", "null"],
183
+ "description": "Structured ingestion settings (schedule, batch, polling). Extensible per connection type.",
184
+ "properties": {
185
+ "schedule": {
186
+ "type": ["string", "null"],
187
+ "description": "Cron expression (LeoCron `time`) or platform-supported schedule string for this connection's registered bot. Distinct from `polling_interval_ms`, which is a millisecond gap for application-level throttling between requests—not the Leo schedule field."
188
+ },
189
+ "runtime_memory_mb": {
190
+ "description": "Shared runtimes tier for trigger registration (256–2048). Defaults to 256 when unset. LeoCron `lambdaName`: `w-{org4}-{inst4}-bot-connectors-{mb}-rtime`; bot id: `w-{org4}-{inst4}-{workflow4}-bot-connectors-{mb}-{container_id}`. Instance `connection_details.runtimes_stack_identifier` may override the org/instance middle segment (CDK `microserviceIdentifier` = `w-{that middle}`).",
191
+ "oneOf": [
192
+ { "type": "null" },
193
+ { "type": "integer", "enum": [256, 512, 1024, 2048] }
194
+ ]
195
+ },
196
+ "fetch_action_key": {
197
+ "type": ["string", "null"],
198
+ "description": "Declarative connector package action key used for polling fetches (e.g. shopify_get_orders). Often matches sync_plan entity fetch_action_key."
199
+ },
200
+ "batch_size": {
201
+ "type": ["integer", "null"],
202
+ "description": "Batch size for polling (default 100)"
203
+ },
204
+ "polling_interval_ms": {
205
+ "type": ["integer", "null"],
206
+ "description": "Polling interval in milliseconds"
207
+ },
208
+ "max_retries": {
209
+ "type": ["integer", "null"],
210
+ "description": "Max retries on failure"
211
+ },
212
+ "timeout_ms": {
213
+ "type": ["integer", "null"],
214
+ "description": "Request/timeout in milliseconds"
215
+ }
216
+ },
217
+ "additionalProperties": true
218
+ },
219
+ "runtime_status": {
220
+ "type": ["string", "null"],
221
+ "enum": ["not_deployed", "deploying", "running", "paused", "error", null],
222
+ "description": "Deployment state of the connection's bot (written at deploy time)"
223
+ },
224
+ "auth_type": {
225
+ "type": ["string", "null"],
226
+ "enum": [
227
+ "oauth2",
228
+ "api_key",
229
+ "webhook",
230
+ "data_product_rbac",
231
+ "none",
232
+ null
233
+ ],
234
+ "description": "Authentication type for the connection (optional, backwards compat)."
235
+ },
236
+ "ingestion_type": {
237
+ "type": ["string", "null"],
238
+ "enum": [
239
+ "polling",
240
+ "webhook",
241
+ "data_product",
242
+ "database_cdc",
243
+ "file",
244
+ "api_sdk",
245
+ "stream",
246
+ "other",
247
+ null
248
+ ],
249
+ "description": "How data is ingested (optional)."
250
+ },
251
+ "export_type": {
252
+ "type": ["string", "null"],
253
+ "enum": ["file", "database", "stream", "api_sdk", "other", null],
254
+ "description": "How data is exported (optional)."
255
+ },
256
+ "source_schema": {
257
+ "type": ["object", "null"],
258
+ "description": "Source schema reference (optional)."
259
+ },
260
+ "destination_schema": {
261
+ "type": ["object", "null"],
262
+ "description": "Destination schema reference (optional)."
263
+ },
264
+ "retry_policy": {
265
+ "type": ["object", "null"],
266
+ "description": "Retry policy (max_retries, backoff, etc.).",
267
+ "properties": {
268
+ "max_retries": { "type": ["integer", "null"] },
269
+ "backoff_ms": { "type": ["integer", "null"] }
270
+ },
271
+ "additionalProperties": true
272
+ },
273
+ "timeout": {
274
+ "type": ["integer", "null"],
275
+ "description": "Timeout in milliseconds (optional)."
276
+ },
277
+ "concurrency": {
278
+ "type": ["integer", "null"],
279
+ "minimum": 1,
280
+ "description": "Concurrency limit (optional)."
281
+ },
282
+ "batch_size": {
283
+ "type": ["integer", "null"],
284
+ "minimum": 1,
285
+ "description": "Batch size for sync (optional)."
286
+ },
287
+ "connector_mode": {
288
+ "type": ["string", "null"],
289
+ "enum": ["inbound", "outbound", "bidirectional", null],
290
+ "description": "For enrichment workflows: mid-flow connection must be 'bidirectional'. For ingestion head use 'inbound'; for consumption tail use 'outbound'. Must match connector supported_directions."
291
+ }
292
+ },
293
+ "upstream_entity_id": {
294
+ "type": ["string", "null"],
295
+ "format": "uuid",
296
+ "description": "Upstream entity in the flow graph (e.g. data-product in consumption flows). Null for source connections."
297
+ },
298
+ "upstream_entity_type": {
299
+ "type": ["string", "null"],
300
+ "enum": [
301
+ "connections",
302
+ "transformations",
303
+ "validations",
304
+ "data-products",
305
+ null
306
+ ],
307
+ "description": "Entity type of the upstream entity."
308
+ },
309
+ "additionalProperties": false
310
+ }
@@ -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
+ }