@sixb/server 0.1.1 → 0.1.3

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 (178) hide show
  1. package/README.md +3 -3
  2. package/dist/auth/application-access.d.ts +2 -2
  3. package/dist/auth/application-access.d.ts.map +1 -1
  4. package/dist/auth/connector-callback-cookie.d.ts +12 -0
  5. package/dist/auth/connector-callback-cookie.d.ts.map +1 -0
  6. package/dist/auth/experience.d.ts +33 -0
  7. package/dist/auth/experience.d.ts.map +1 -0
  8. package/dist/auth/guard.d.ts +3 -3
  9. package/dist/auth/guard.d.ts.map +1 -1
  10. package/dist/auth/public-routes.d.ts.map +1 -1
  11. package/dist/auth/scope.d.ts +13 -27
  12. package/dist/auth/scope.d.ts.map +1 -1
  13. package/dist/auth/session-cookies.d.ts +2 -2
  14. package/dist/auth/session-cookies.d.ts.map +1 -1
  15. package/dist/connectors/http.d.ts +16 -0
  16. package/dist/connectors/http.d.ts.map +1 -0
  17. package/dist/index.d.ts +1 -0
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +3903 -2760
  20. package/dist/index.js.map +58 -50
  21. package/dist/openapi/tags.d.ts +15 -3
  22. package/dist/openapi/tags.d.ts.map +1 -1
  23. package/dist/registerRoutes.d.ts +6 -2
  24. package/dist/registerRoutes.d.ts.map +1 -1
  25. package/dist/routes/action-runs.d.ts +21 -31
  26. package/dist/routes/action-runs.d.ts.map +1 -1
  27. package/dist/routes/actions.d.ts +12 -11
  28. package/dist/routes/actions.d.ts.map +1 -1
  29. package/dist/routes/agent-api-gateway.d.ts +2 -2
  30. package/dist/routes/agent-api-gateway.d.ts.map +1 -1
  31. package/dist/routes/agents.d.ts +230 -159
  32. package/dist/routes/agents.d.ts.map +1 -1
  33. package/dist/routes/ai-accounting.d.ts +31 -0
  34. package/dist/routes/ai-accounting.d.ts.map +1 -0
  35. package/dist/routes/auth.d.ts +149 -92
  36. package/dist/routes/auth.d.ts.map +1 -1
  37. package/dist/routes/connector-connection-runs.d.ts +794 -0
  38. package/dist/routes/connector-connection-runs.d.ts.map +1 -0
  39. package/dist/routes/connector-connections.d.ts +219 -0
  40. package/dist/routes/connector-connections.d.ts.map +1 -0
  41. package/dist/routes/connectors.d.ts +10 -4
  42. package/dist/routes/connectors.d.ts.map +1 -1
  43. package/dist/routes/datasets.d.ts +16 -12
  44. package/dist/routes/datasets.d.ts.map +1 -1
  45. package/dist/routes/events.d.ts +9 -9
  46. package/dist/routes/events.d.ts.map +1 -1
  47. package/dist/routes/files.d.ts +19 -18
  48. package/dist/routes/files.d.ts.map +1 -1
  49. package/dist/routes/links.d.ts +11 -11
  50. package/dist/routes/links.d.ts.map +1 -1
  51. package/dist/routes/logs.d.ts +5 -5
  52. package/dist/routes/logs.d.ts.map +1 -1
  53. package/dist/routes/objects.d.ts +37 -37
  54. package/dist/routes/objects.d.ts.map +1 -1
  55. package/dist/routes/ontology.d.ts +50 -50
  56. package/dist/routes/ontology.d.ts.map +1 -1
  57. package/dist/routes/pipelines.d.ts +28 -38
  58. package/dist/routes/pipelines.d.ts.map +1 -1
  59. package/dist/routes/project.d.ts +2 -2
  60. package/dist/routes/project.d.ts.map +1 -1
  61. package/dist/routes/projections.d.ts +145 -85
  62. package/dist/routes/projections.d.ts.map +1 -1
  63. package/dist/routes/rules.d.ts +6 -6
  64. package/dist/routes/rules.d.ts.map +1 -1
  65. package/dist/routes/status.d.ts +2 -2
  66. package/dist/routes/status.d.ts.map +1 -1
  67. package/dist/routes/syncs.d.ts +23 -28
  68. package/dist/routes/syncs.d.ts.map +1 -1
  69. package/dist/routes/telemetry.d.ts +9 -9
  70. package/dist/routes/telemetry.d.ts.map +1 -1
  71. package/dist/routes/webhook-runs.d.ts +9 -9
  72. package/dist/routes/webhook-runs.d.ts.map +1 -1
  73. package/dist/routes/webhooks.d.ts +2 -2
  74. package/dist/routes/webhooks.d.ts.map +1 -1
  75. package/dist/routes/workflows.d.ts +177 -66
  76. package/dist/routes/workflows.d.ts.map +1 -1
  77. package/dist/routes/ws/agents.d.ts +11 -5
  78. package/dist/routes/ws/agents.d.ts.map +1 -1
  79. package/dist/routes/ws/events.d.ts +8 -8
  80. package/dist/routes/ws/events.d.ts.map +1 -1
  81. package/dist/routes/ws/log-subscription-hub.d.ts +6 -3
  82. package/dist/routes/ws/log-subscription-hub.d.ts.map +1 -1
  83. package/dist/routes/ws/logs.d.ts +10 -10
  84. package/dist/routes/ws/logs.d.ts.map +1 -1
  85. package/dist/schemas/actions.d.ts +89 -194
  86. package/dist/schemas/actions.d.ts.map +1 -1
  87. package/dist/schemas/agents.d.ts +791 -471
  88. package/dist/schemas/agents.d.ts.map +1 -1
  89. package/dist/schemas/ai-accounting.d.ts +2393 -0
  90. package/dist/schemas/ai-accounting.d.ts.map +1 -0
  91. package/dist/schemas/ai-usage.d.ts +34 -0
  92. package/dist/schemas/ai-usage.d.ts.map +1 -0
  93. package/dist/schemas/auth.d.ts +102 -102
  94. package/dist/schemas/common.d.ts +37 -0
  95. package/dist/schemas/common.d.ts.map +1 -1
  96. package/dist/schemas/connectors.d.ts +713 -2
  97. package/dist/schemas/connectors.d.ts.map +1 -1
  98. package/dist/schemas/datasets.d.ts +2 -2
  99. package/dist/schemas/event-payloads.d.ts +12 -12
  100. package/dist/schemas/events.d.ts +40 -40
  101. package/dist/schemas/links.d.ts +2 -2
  102. package/dist/schemas/logs.d.ts +22 -22
  103. package/dist/schemas/objects.d.ts +10 -10
  104. package/dist/schemas/ontology.d.ts +118 -118
  105. package/dist/schemas/pipelines.d.ts +89 -184
  106. package/dist/schemas/pipelines.d.ts.map +1 -1
  107. package/dist/schemas/projections.d.ts +1030 -563
  108. package/dist/schemas/projections.d.ts.map +1 -1
  109. package/dist/schemas/rules.d.ts +6 -6
  110. package/dist/schemas/syncs.d.ts +65 -108
  111. package/dist/schemas/syncs.d.ts.map +1 -1
  112. package/dist/schemas/webhook-runs.d.ts +41 -41
  113. package/dist/schemas/webhook-runs.d.ts.map +1 -1
  114. package/dist/schemas/workflows.d.ts +1189 -185
  115. package/dist/schemas/workflows.d.ts.map +1 -1
  116. package/dist/server.d.ts +11 -6
  117. package/dist/server.d.ts.map +1 -1
  118. package/dist/utils/http.d.ts +2 -0
  119. package/dist/utils/http.d.ts.map +1 -1
  120. package/dist/utils/ws.d.ts +4 -3
  121. package/dist/utils/ws.d.ts.map +1 -1
  122. package/package.json +5 -5
  123. package/src/auth/access-token-boundary.ts +4 -4
  124. package/src/auth/application-access.ts +8 -9
  125. package/src/auth/connector-callback-cookie.ts +95 -0
  126. package/src/auth/experience.ts +190 -0
  127. package/src/auth/guard.ts +11 -11
  128. package/src/auth/public-routes.ts +20 -0
  129. package/src/auth/scope.ts +26 -36
  130. package/src/auth/session-cookies.ts +3 -3
  131. package/src/connectors/http.ts +110 -0
  132. package/src/index.ts +1 -0
  133. package/src/openapi/tags.ts +13 -1
  134. package/src/registerRoutes.ts +36 -23
  135. package/src/routes/action-runs.ts +39 -39
  136. package/src/routes/actions.ts +7 -13
  137. package/src/routes/agent-api-gateway.ts +41 -38
  138. package/src/routes/agents.ts +90 -200
  139. package/src/routes/ai-accounting.ts +166 -0
  140. package/src/routes/auth.ts +274 -122
  141. package/src/routes/connector-connection-runs.ts +346 -0
  142. package/src/routes/connector-connections.ts +135 -0
  143. package/src/routes/connectors.ts +24 -12
  144. package/src/routes/datasets.ts +55 -54
  145. package/src/routes/events.ts +5 -5
  146. package/src/routes/files.ts +22 -30
  147. package/src/routes/links.ts +31 -35
  148. package/src/routes/logs.ts +6 -11
  149. package/src/routes/objects.ts +51 -114
  150. package/src/routes/ontology.ts +27 -38
  151. package/src/routes/pipelines.ts +28 -62
  152. package/src/routes/project.ts +3 -3
  153. package/src/routes/projections.ts +44 -42
  154. package/src/routes/rules.ts +11 -25
  155. package/src/routes/status.ts +5 -5
  156. package/src/routes/syncs.ts +19 -45
  157. package/src/routes/telemetry.ts +18 -29
  158. package/src/routes/webhook-runs.ts +5 -5
  159. package/src/routes/webhooks.ts +259 -341
  160. package/src/routes/workflows.ts +242 -248
  161. package/src/routes/ws/agents.ts +196 -66
  162. package/src/routes/ws/events.ts +11 -10
  163. package/src/routes/ws/log-subscription-hub.ts +6 -12
  164. package/src/routes/ws/logs.ts +13 -5
  165. package/src/schemas/actions.ts +58 -25
  166. package/src/schemas/agents.ts +23 -23
  167. package/src/schemas/ai-accounting.ts +182 -0
  168. package/src/schemas/ai-usage.ts +16 -0
  169. package/src/schemas/common.ts +24 -0
  170. package/src/schemas/connectors.ts +164 -0
  171. package/src/schemas/pipelines.ts +23 -15
  172. package/src/schemas/projections.ts +23 -3
  173. package/src/schemas/syncs.ts +13 -8
  174. package/src/schemas/webhook-runs.ts +10 -5
  175. package/src/schemas/workflows.ts +23 -8
  176. package/src/server.ts +75 -26
  177. package/src/utils/http.ts +34 -6
  178. package/src/utils/ws.ts +10 -5
@@ -1,6 +1,6 @@
1
- import type { OntologySource, Sixb } from "@sixb/core";
1
+ import type { SixbHostView } from "@sixb/core";
2
2
  import type { Elysia } from "elysia";
3
- export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonly OntologySource[]>): Elysia<"", {
3
+ export declare function registerProjectionRoutes(app: Elysia, host: SixbHostView): Elysia<"", {
4
4
  decorator: {};
5
5
  store: {};
6
6
  derive: {};
@@ -26,21 +26,22 @@ export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonl
26
26
  response: {
27
27
  200: {
28
28
  objectProjections: {
29
+ id: string;
29
30
  links: Record<string, {
30
31
  targetObjectTypeId: string;
31
32
  linkId: string;
32
33
  sourcePropertyId?: string | undefined;
33
34
  sourceField?: string | undefined;
34
35
  }>;
35
- objectTypeId: string;
36
- id: string;
37
36
  properties: Record<string, string>;
37
+ objectTypeId: string;
38
38
  datasetId: string;
39
39
  latestRun: {
40
- status: "running" | "succeeded" | "failed" | "cancelled";
40
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
41
41
  projectId: string;
42
42
  id: string;
43
- startedAt: string;
43
+ queuedAt: string;
44
+ executionId: string;
44
45
  attempt: number;
45
46
  progress: {
46
47
  sourceRowsRead: number;
@@ -62,13 +63,15 @@ export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonl
62
63
  target: {
63
64
  objectTypeId: string;
64
65
  };
66
+ error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "projection.execution_failed" | "runtime.cancelled"> | undefined;
67
+ startedAt?: string | undefined;
65
68
  finishedAt?: string | undefined;
66
- errorMessage?: string | undefined;
67
69
  } | {
68
- status: "running" | "succeeded" | "failed" | "cancelled";
70
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
69
71
  projectId: string;
70
72
  id: string;
71
- startedAt: string;
73
+ queuedAt: string;
74
+ executionId: string;
72
75
  attempt: number;
73
76
  progress: {
74
77
  sourceRowsRead: number;
@@ -91,13 +94,15 @@ export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonl
91
94
  targetObjectTypeId: string;
92
95
  sourceObjectTypeId: string;
93
96
  };
97
+ error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "projection.execution_failed" | "runtime.cancelled"> | undefined;
98
+ startedAt?: string | undefined;
94
99
  finishedAt?: string | undefined;
95
- errorMessage?: string | undefined;
96
100
  } | {
97
- status: "running" | "succeeded" | "failed" | "cancelled";
101
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
98
102
  projectId: string;
99
103
  id: string;
100
- startedAt: string;
104
+ queuedAt: string;
105
+ executionId: string;
101
106
  attempt: number;
102
107
  progress: {
103
108
  sourceRowsRead: number;
@@ -119,10 +124,17 @@ export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonl
119
124
  target: {
120
125
  objectTypeId: string;
121
126
  };
127
+ error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "projection.execution_failed" | "runtime.cancelled"> | undefined;
128
+ startedAt?: string | undefined;
122
129
  finishedAt?: string | undefined;
123
- errorMessage?: string | undefined;
124
130
  } | null;
125
131
  _tag: "ObjectProjectionDefinition";
132
+ conflictResolution: {
133
+ strategy: "editsWin";
134
+ } | {
135
+ strategy: "mostRecent";
136
+ sourceTimestamp: string;
137
+ };
126
138
  }[];
127
139
  linkProjections: {
128
140
  id: string;
@@ -131,10 +143,11 @@ export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonl
131
143
  linkId: string;
132
144
  sourceObjectTypeId: string;
133
145
  latestRun: {
134
- status: "running" | "succeeded" | "failed" | "cancelled";
146
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
135
147
  projectId: string;
136
148
  id: string;
137
- startedAt: string;
149
+ queuedAt: string;
150
+ executionId: string;
138
151
  attempt: number;
139
152
  progress: {
140
153
  sourceRowsRead: number;
@@ -156,13 +169,15 @@ export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonl
156
169
  target: {
157
170
  objectTypeId: string;
158
171
  };
172
+ error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "projection.execution_failed" | "runtime.cancelled"> | undefined;
173
+ startedAt?: string | undefined;
159
174
  finishedAt?: string | undefined;
160
- errorMessage?: string | undefined;
161
175
  } | {
162
- status: "running" | "succeeded" | "failed" | "cancelled";
176
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
163
177
  projectId: string;
164
178
  id: string;
165
- startedAt: string;
179
+ queuedAt: string;
180
+ executionId: string;
166
181
  attempt: number;
167
182
  progress: {
168
183
  sourceRowsRead: number;
@@ -185,13 +200,15 @@ export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonl
185
200
  targetObjectTypeId: string;
186
201
  sourceObjectTypeId: string;
187
202
  };
203
+ error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "projection.execution_failed" | "runtime.cancelled"> | undefined;
204
+ startedAt?: string | undefined;
188
205
  finishedAt?: string | undefined;
189
- errorMessage?: string | undefined;
190
206
  } | {
191
- status: "running" | "succeeded" | "failed" | "cancelled";
207
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
192
208
  projectId: string;
193
209
  id: string;
194
- startedAt: string;
210
+ queuedAt: string;
211
+ executionId: string;
195
212
  attempt: number;
196
213
  progress: {
197
214
  sourceRowsRead: number;
@@ -213,23 +230,25 @@ export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonl
213
230
  target: {
214
231
  objectTypeId: string;
215
232
  };
233
+ error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "projection.execution_failed" | "runtime.cancelled"> | undefined;
234
+ startedAt?: string | undefined;
216
235
  finishedAt?: string | undefined;
217
- errorMessage?: string | undefined;
218
236
  } | null;
219
237
  sourceField: string;
220
238
  _tag: "LinkProjectionDefinition";
221
239
  targetField: string;
222
240
  }[];
223
241
  telemetryProjections: {
224
- objectTypeId: string;
225
242
  id: string;
243
+ objectTypeId: string;
226
244
  datasetId: string;
227
245
  propertyId: string;
228
246
  latestRun: {
229
- status: "running" | "succeeded" | "failed" | "cancelled";
247
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
230
248
  projectId: string;
231
249
  id: string;
232
- startedAt: string;
250
+ queuedAt: string;
251
+ executionId: string;
233
252
  attempt: number;
234
253
  progress: {
235
254
  sourceRowsRead: number;
@@ -251,13 +270,15 @@ export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonl
251
270
  target: {
252
271
  objectTypeId: string;
253
272
  };
273
+ error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "projection.execution_failed" | "runtime.cancelled"> | undefined;
274
+ startedAt?: string | undefined;
254
275
  finishedAt?: string | undefined;
255
- errorMessage?: string | undefined;
256
276
  } | {
257
- status: "running" | "succeeded" | "failed" | "cancelled";
277
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
258
278
  projectId: string;
259
279
  id: string;
260
- startedAt: string;
280
+ queuedAt: string;
281
+ executionId: string;
261
282
  attempt: number;
262
283
  progress: {
263
284
  sourceRowsRead: number;
@@ -280,13 +301,15 @@ export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonl
280
301
  targetObjectTypeId: string;
281
302
  sourceObjectTypeId: string;
282
303
  };
304
+ error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "projection.execution_failed" | "runtime.cancelled"> | undefined;
305
+ startedAt?: string | undefined;
283
306
  finishedAt?: string | undefined;
284
- errorMessage?: string | undefined;
285
307
  } | {
286
- status: "running" | "succeeded" | "failed" | "cancelled";
308
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
287
309
  projectId: string;
288
310
  id: string;
289
- startedAt: string;
311
+ queuedAt: string;
312
+ executionId: string;
290
313
  attempt: number;
291
314
  progress: {
292
315
  sourceRowsRead: number;
@@ -308,8 +331,9 @@ export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonl
308
331
  target: {
309
332
  objectTypeId: string;
310
333
  };
334
+ error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "projection.execution_failed" | "runtime.cancelled"> | undefined;
335
+ startedAt?: string | undefined;
311
336
  finishedAt?: string | undefined;
312
- errorMessage?: string | undefined;
313
337
  } | null;
314
338
  _tag: "TelemetryProjectionDefinition";
315
339
  objectIdField: string;
@@ -344,21 +368,22 @@ export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonl
344
368
  headers: unknown;
345
369
  response: {
346
370
  200: {
371
+ id: string;
347
372
  links: Record<string, {
348
373
  targetObjectTypeId: string;
349
374
  linkId: string;
350
375
  sourcePropertyId?: string | undefined;
351
376
  sourceField?: string | undefined;
352
377
  }>;
353
- objectTypeId: string;
354
- id: string;
355
378
  properties: Record<string, string>;
379
+ objectTypeId: string;
356
380
  datasetId: string;
357
381
  latestRun: {
358
- status: "running" | "succeeded" | "failed" | "cancelled";
382
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
359
383
  projectId: string;
360
384
  id: string;
361
- startedAt: string;
385
+ queuedAt: string;
386
+ executionId: string;
362
387
  attempt: number;
363
388
  progress: {
364
389
  sourceRowsRead: number;
@@ -380,13 +405,15 @@ export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonl
380
405
  target: {
381
406
  objectTypeId: string;
382
407
  };
408
+ error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "projection.execution_failed" | "runtime.cancelled"> | undefined;
409
+ startedAt?: string | undefined;
383
410
  finishedAt?: string | undefined;
384
- errorMessage?: string | undefined;
385
411
  } | {
386
- status: "running" | "succeeded" | "failed" | "cancelled";
412
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
387
413
  projectId: string;
388
414
  id: string;
389
- startedAt: string;
415
+ queuedAt: string;
416
+ executionId: string;
390
417
  attempt: number;
391
418
  progress: {
392
419
  sourceRowsRead: number;
@@ -409,13 +436,15 @@ export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonl
409
436
  targetObjectTypeId: string;
410
437
  sourceObjectTypeId: string;
411
438
  };
439
+ error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "projection.execution_failed" | "runtime.cancelled"> | undefined;
440
+ startedAt?: string | undefined;
412
441
  finishedAt?: string | undefined;
413
- errorMessage?: string | undefined;
414
442
  } | {
415
- status: "running" | "succeeded" | "failed" | "cancelled";
443
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
416
444
  projectId: string;
417
445
  id: string;
418
- startedAt: string;
446
+ queuedAt: string;
447
+ executionId: string;
419
448
  attempt: number;
420
449
  progress: {
421
450
  sourceRowsRead: number;
@@ -437,10 +466,17 @@ export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonl
437
466
  target: {
438
467
  objectTypeId: string;
439
468
  };
469
+ error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "projection.execution_failed" | "runtime.cancelled"> | undefined;
470
+ startedAt?: string | undefined;
440
471
  finishedAt?: string | undefined;
441
- errorMessage?: string | undefined;
442
472
  } | null;
443
473
  _tag: "ObjectProjectionDefinition";
474
+ conflictResolution: {
475
+ strategy: "editsWin";
476
+ } | {
477
+ strategy: "mostRecent";
478
+ sourceTimestamp: string;
479
+ };
444
480
  } | {
445
481
  id: string;
446
482
  targetObjectTypeId: string;
@@ -448,10 +484,11 @@ export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonl
448
484
  linkId: string;
449
485
  sourceObjectTypeId: string;
450
486
  latestRun: {
451
- status: "running" | "succeeded" | "failed" | "cancelled";
487
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
452
488
  projectId: string;
453
489
  id: string;
454
- startedAt: string;
490
+ queuedAt: string;
491
+ executionId: string;
455
492
  attempt: number;
456
493
  progress: {
457
494
  sourceRowsRead: number;
@@ -473,13 +510,15 @@ export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonl
473
510
  target: {
474
511
  objectTypeId: string;
475
512
  };
513
+ error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "projection.execution_failed" | "runtime.cancelled"> | undefined;
514
+ startedAt?: string | undefined;
476
515
  finishedAt?: string | undefined;
477
- errorMessage?: string | undefined;
478
516
  } | {
479
- status: "running" | "succeeded" | "failed" | "cancelled";
517
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
480
518
  projectId: string;
481
519
  id: string;
482
- startedAt: string;
520
+ queuedAt: string;
521
+ executionId: string;
483
522
  attempt: number;
484
523
  progress: {
485
524
  sourceRowsRead: number;
@@ -502,13 +541,15 @@ export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonl
502
541
  targetObjectTypeId: string;
503
542
  sourceObjectTypeId: string;
504
543
  };
544
+ error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "projection.execution_failed" | "runtime.cancelled"> | undefined;
545
+ startedAt?: string | undefined;
505
546
  finishedAt?: string | undefined;
506
- errorMessage?: string | undefined;
507
547
  } | {
508
- status: "running" | "succeeded" | "failed" | "cancelled";
548
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
509
549
  projectId: string;
510
550
  id: string;
511
- startedAt: string;
551
+ queuedAt: string;
552
+ executionId: string;
512
553
  attempt: number;
513
554
  progress: {
514
555
  sourceRowsRead: number;
@@ -530,22 +571,24 @@ export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonl
530
571
  target: {
531
572
  objectTypeId: string;
532
573
  };
574
+ error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "projection.execution_failed" | "runtime.cancelled"> | undefined;
575
+ startedAt?: string | undefined;
533
576
  finishedAt?: string | undefined;
534
- errorMessage?: string | undefined;
535
577
  } | null;
536
578
  sourceField: string;
537
579
  _tag: "LinkProjectionDefinition";
538
580
  targetField: string;
539
581
  } | {
540
- objectTypeId: string;
541
582
  id: string;
583
+ objectTypeId: string;
542
584
  datasetId: string;
543
585
  propertyId: string;
544
586
  latestRun: {
545
- status: "running" | "succeeded" | "failed" | "cancelled";
587
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
546
588
  projectId: string;
547
589
  id: string;
548
- startedAt: string;
590
+ queuedAt: string;
591
+ executionId: string;
549
592
  attempt: number;
550
593
  progress: {
551
594
  sourceRowsRead: number;
@@ -567,13 +610,15 @@ export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonl
567
610
  target: {
568
611
  objectTypeId: string;
569
612
  };
613
+ error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "projection.execution_failed" | "runtime.cancelled"> | undefined;
614
+ startedAt?: string | undefined;
570
615
  finishedAt?: string | undefined;
571
- errorMessage?: string | undefined;
572
616
  } | {
573
- status: "running" | "succeeded" | "failed" | "cancelled";
617
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
574
618
  projectId: string;
575
619
  id: string;
576
- startedAt: string;
620
+ queuedAt: string;
621
+ executionId: string;
577
622
  attempt: number;
578
623
  progress: {
579
624
  sourceRowsRead: number;
@@ -596,13 +641,15 @@ export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonl
596
641
  targetObjectTypeId: string;
597
642
  sourceObjectTypeId: string;
598
643
  };
644
+ error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "projection.execution_failed" | "runtime.cancelled"> | undefined;
645
+ startedAt?: string | undefined;
599
646
  finishedAt?: string | undefined;
600
- errorMessage?: string | undefined;
601
647
  } | {
602
- status: "running" | "succeeded" | "failed" | "cancelled";
648
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
603
649
  projectId: string;
604
650
  id: string;
605
- startedAt: string;
651
+ queuedAt: string;
652
+ executionId: string;
606
653
  attempt: number;
607
654
  progress: {
608
655
  sourceRowsRead: number;
@@ -624,8 +671,9 @@ export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonl
624
671
  target: {
625
672
  objectTypeId: string;
626
673
  };
674
+ error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "projection.execution_failed" | "runtime.cancelled"> | undefined;
675
+ startedAt?: string | undefined;
627
676
  finishedAt?: string | undefined;
628
- errorMessage?: string | undefined;
629
677
  } | null;
630
678
  _tag: "TelemetryProjectionDefinition";
631
679
  objectIdField: string;
@@ -657,12 +705,12 @@ export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonl
657
705
  body: unknown;
658
706
  params: {};
659
707
  query: {
660
- status?: "running" | "succeeded" | "failed" | "cancelled" | undefined;
708
+ status?: "queued" | "running" | "succeeded" | "failed" | "cancelled" | undefined;
709
+ startedAfter?: string | undefined;
710
+ startedBefore?: string | undefined;
661
711
  limit?: string | undefined;
662
712
  offset?: string | undefined;
663
713
  order?: "asc" | "desc" | undefined;
664
- startedAfter?: string | undefined;
665
- startedBefore?: string | undefined;
666
714
  datasetId?: string | undefined;
667
715
  projectionId?: string | undefined;
668
716
  datasetVersionId?: string | undefined;
@@ -672,10 +720,11 @@ export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonl
672
720
  response: {
673
721
  200: {
674
722
  runs: ({
675
- status: "running" | "succeeded" | "failed" | "cancelled";
723
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
676
724
  projectId: string;
677
725
  id: string;
678
- startedAt: string;
726
+ queuedAt: string;
727
+ executionId: string;
679
728
  attempt: number;
680
729
  progress: {
681
730
  sourceRowsRead: number;
@@ -697,13 +746,15 @@ export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonl
697
746
  target: {
698
747
  objectTypeId: string;
699
748
  };
749
+ error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "projection.execution_failed" | "runtime.cancelled"> | undefined;
750
+ startedAt?: string | undefined;
700
751
  finishedAt?: string | undefined;
701
- errorMessage?: string | undefined;
702
752
  } | {
703
- status: "running" | "succeeded" | "failed" | "cancelled";
753
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
704
754
  projectId: string;
705
755
  id: string;
706
- startedAt: string;
756
+ queuedAt: string;
757
+ executionId: string;
707
758
  attempt: number;
708
759
  progress: {
709
760
  sourceRowsRead: number;
@@ -726,13 +777,15 @@ export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonl
726
777
  targetObjectTypeId: string;
727
778
  sourceObjectTypeId: string;
728
779
  };
780
+ error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "projection.execution_failed" | "runtime.cancelled"> | undefined;
781
+ startedAt?: string | undefined;
729
782
  finishedAt?: string | undefined;
730
- errorMessage?: string | undefined;
731
783
  } | {
732
- status: "running" | "succeeded" | "failed" | "cancelled";
784
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
733
785
  projectId: string;
734
786
  id: string;
735
- startedAt: string;
787
+ queuedAt: string;
788
+ executionId: string;
736
789
  attempt: number;
737
790
  progress: {
738
791
  sourceRowsRead: number;
@@ -754,8 +807,9 @@ export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonl
754
807
  target: {
755
808
  objectTypeId: string;
756
809
  };
810
+ error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "projection.execution_failed" | "runtime.cancelled"> | undefined;
811
+ startedAt?: string | undefined;
757
812
  finishedAt?: string | undefined;
758
- errorMessage?: string | undefined;
759
813
  })[];
760
814
  hasMore: boolean;
761
815
  total: number;
@@ -792,10 +846,11 @@ export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonl
792
846
  headers: unknown;
793
847
  response: {
794
848
  200: {
795
- status: "running" | "succeeded" | "failed" | "cancelled";
849
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
796
850
  projectId: string;
797
851
  id: string;
798
- startedAt: string;
852
+ queuedAt: string;
853
+ executionId: string;
799
854
  attempt: number;
800
855
  progress: {
801
856
  sourceRowsRead: number;
@@ -817,13 +872,15 @@ export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonl
817
872
  target: {
818
873
  objectTypeId: string;
819
874
  };
875
+ error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "projection.execution_failed" | "runtime.cancelled"> | undefined;
876
+ startedAt?: string | undefined;
820
877
  finishedAt?: string | undefined;
821
- errorMessage?: string | undefined;
822
878
  } | {
823
- status: "running" | "succeeded" | "failed" | "cancelled";
879
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
824
880
  projectId: string;
825
881
  id: string;
826
- startedAt: string;
882
+ queuedAt: string;
883
+ executionId: string;
827
884
  attempt: number;
828
885
  progress: {
829
886
  sourceRowsRead: number;
@@ -846,13 +903,15 @@ export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonl
846
903
  targetObjectTypeId: string;
847
904
  sourceObjectTypeId: string;
848
905
  };
906
+ error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "projection.execution_failed" | "runtime.cancelled"> | undefined;
907
+ startedAt?: string | undefined;
849
908
  finishedAt?: string | undefined;
850
- errorMessage?: string | undefined;
851
909
  } | {
852
- status: "running" | "succeeded" | "failed" | "cancelled";
910
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
853
911
  projectId: string;
854
912
  id: string;
855
- startedAt: string;
913
+ queuedAt: string;
914
+ executionId: string;
856
915
  attempt: number;
857
916
  progress: {
858
917
  sourceRowsRead: number;
@@ -874,13 +933,14 @@ export declare function registerProjectionRoutes(app: Elysia, sixb: Sixb<readonl
874
933
  target: {
875
934
  objectTypeId: string;
876
935
  };
936
+ error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "projection.execution_failed" | "runtime.cancelled"> | undefined;
937
+ startedAt?: string | undefined;
877
938
  finishedAt?: string | undefined;
878
- errorMessage?: string | undefined;
879
939
  };
880
- 400: {
940
+ 404: {
881
941
  error: string;
882
942
  };
883
- 404: {
943
+ 400: {
884
944
  error: string;
885
945
  };
886
946
  501: {
@@ -1 +1 @@
1
- {"version":3,"file":"projections.d.ts","sourceRoot":"","sources":["../../src/routes/projections.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,cAAc,EAEd,IAAI,EAEL,MAAM,YAAY,CAAA;AAGnB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AA8GpC,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,cAAc,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkI1F"}
1
+ {"version":3,"file":"projections.d.ts","sourceRoot":"","sources":["../../src/routes/projections.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIV,YAAY,EAGb,MAAM,YAAY,CAAA;AAEnB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAmHpC,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgIvE"}
@@ -1,6 +1,6 @@
1
- import { type OntologySource, type Sixb } from "@sixb/core";
1
+ import type { SixbHostView } from "@sixb/core";
2
2
  import type { Elysia } from "elysia";
3
- export declare function registerRuleRoutes(app: Elysia, sixb: Sixb<readonly OntologySource[]>): Elysia<"", {
3
+ export declare function registerRuleRoutes(app: Elysia, host: SixbHostView): Elysia<"", {
4
4
  decorator: {};
5
5
  store: {};
6
6
  derive: {};
@@ -25,8 +25,8 @@ export declare function registerRuleRoutes(app: Elysia, sixb: Sixb<readonly Onto
25
25
  headers: unknown;
26
26
  response: {
27
27
  200: {
28
- kind: "rule";
29
28
  id: string;
29
+ kind: "rule";
30
30
  subject: {
31
31
  kind: "object";
32
32
  objectTypeId: string;
@@ -67,8 +67,8 @@ export declare function registerRuleRoutes(app: Elysia, sixb: Sixb<readonly Onto
67
67
  headers: unknown;
68
68
  response: {
69
69
  200: {
70
- kind: "rule";
71
70
  id: string;
71
+ kind: "rule";
72
72
  subject: {
73
73
  kind: "object";
74
74
  objectTypeId: string;
@@ -107,11 +107,11 @@ export declare function registerRuleRoutes(app: Elysia, sixb: Sixb<readonly Onto
107
107
  body: unknown;
108
108
  params: {};
109
109
  query: {
110
+ objectTypeId?: string | undefined;
111
+ primaryId?: string | undefined;
110
112
  limit?: string | undefined;
111
113
  offset?: string | undefined;
112
114
  order?: "asc" | "desc" | undefined;
113
- objectTypeId?: string | undefined;
114
- primaryId?: string | undefined;
115
115
  ruleId?: string | undefined;
116
116
  };
117
117
  headers: unknown;
@@ -1 +1 @@
1
- {"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../src/routes/rules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,cAAc,EAAuB,KAAK,IAAI,EAAE,MAAM,YAAY,CAAA;AAG3F,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAwBpC,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,cAAc,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgGpF"}
1
+ {"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../src/routes/rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,YAAY,EAAE,MAAM,YAAY,CAAA;AAG9D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAwBpC,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkFjE"}