@sixb/server 0.2.5 → 0.2.7

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 (106) hide show
  1. package/dist/auth/run-token.d.ts.map +1 -1
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +596 -92
  5. package/dist/index.js.map +36 -35
  6. package/dist/registerRoutes.d.ts +1 -0
  7. package/dist/registerRoutes.d.ts.map +1 -1
  8. package/dist/routes/actions.d.ts +2 -0
  9. package/dist/routes/actions.d.ts.map +1 -1
  10. package/dist/routes/agent-approvals.d.ts +23 -1
  11. package/dist/routes/agent-approvals.d.ts.map +1 -1
  12. package/dist/routes/agent-computers.d.ts +36 -0
  13. package/dist/routes/agent-computers.d.ts.map +1 -1
  14. package/dist/routes/agent-thread-reads.d.ts +82 -0
  15. package/dist/routes/agent-thread-reads.d.ts.map +1 -0
  16. package/dist/routes/agents.d.ts +795 -13
  17. package/dist/routes/agents.d.ts.map +1 -1
  18. package/dist/routes/ai-accounting.d.ts.map +1 -1
  19. package/dist/routes/connectors.d.ts +2 -0
  20. package/dist/routes/connectors.d.ts.map +1 -1
  21. package/dist/routes/datasets.d.ts +2 -0
  22. package/dist/routes/datasets.d.ts.map +1 -1
  23. package/dist/routes/model-generations.d.ts +6 -0
  24. package/dist/routes/model-generations.d.ts.map +1 -1
  25. package/dist/routes/observed-agent-threads.d.ts +24 -2
  26. package/dist/routes/observed-agent-threads.d.ts.map +1 -1
  27. package/dist/routes/ontology.d.ts +2 -0
  28. package/dist/routes/ontology.d.ts.map +1 -1
  29. package/dist/routes/pipelines.d.ts +2 -0
  30. package/dist/routes/pipelines.d.ts.map +1 -1
  31. package/dist/routes/projections.d.ts +6 -0
  32. package/dist/routes/projections.d.ts.map +1 -1
  33. package/dist/routes/rules.d.ts +2 -0
  34. package/dist/routes/rules.d.ts.map +1 -1
  35. package/dist/routes/status.d.ts +5 -2
  36. package/dist/routes/status.d.ts.map +1 -1
  37. package/dist/routes/syncs.d.ts +177 -12
  38. package/dist/routes/syncs.d.ts.map +1 -1
  39. package/dist/routes/workflows.d.ts +8 -6
  40. package/dist/routes/workflows.d.ts.map +1 -1
  41. package/dist/routes/ws/agents.d.ts.map +1 -1
  42. package/dist/schemas/actions.d.ts +6 -0
  43. package/dist/schemas/actions.d.ts.map +1 -1
  44. package/dist/schemas/activity.d.ts +4 -4
  45. package/dist/schemas/agents.d.ts +2657 -61
  46. package/dist/schemas/agents.d.ts.map +1 -1
  47. package/dist/schemas/ai-accounting.d.ts +3 -0
  48. package/dist/schemas/ai-accounting.d.ts.map +1 -1
  49. package/dist/schemas/common.d.ts +5 -0
  50. package/dist/schemas/common.d.ts.map +1 -1
  51. package/dist/schemas/connectors.d.ts +3 -0
  52. package/dist/schemas/connectors.d.ts.map +1 -1
  53. package/dist/schemas/datasets.d.ts +3 -0
  54. package/dist/schemas/datasets.d.ts.map +1 -1
  55. package/dist/schemas/models.d.ts +46 -0
  56. package/dist/schemas/models.d.ts.map +1 -1
  57. package/dist/schemas/ontology.d.ts +3 -0
  58. package/dist/schemas/ontology.d.ts.map +1 -1
  59. package/dist/schemas/pipelines.d.ts +3 -0
  60. package/dist/schemas/pipelines.d.ts.map +1 -1
  61. package/dist/schemas/projections.d.ts +33 -0
  62. package/dist/schemas/projections.d.ts.map +1 -1
  63. package/dist/schemas/rules.d.ts +3 -0
  64. package/dist/schemas/rules.d.ts.map +1 -1
  65. package/dist/schemas/status.d.ts +2 -2
  66. package/dist/schemas/syncs.d.ts +727 -25
  67. package/dist/schemas/syncs.d.ts.map +1 -1
  68. package/dist/schemas/workflows.d.ts +25 -22
  69. package/dist/schemas/workflows.d.ts.map +1 -1
  70. package/dist/server.d.ts +16 -1
  71. package/dist/server.d.ts.map +1 -1
  72. package/package.json +5 -5
  73. package/src/auth/run-token.ts +59 -9
  74. package/src/index.ts +6 -1
  75. package/src/registerRoutes.ts +4 -1
  76. package/src/routes/actions.ts +7 -3
  77. package/src/routes/agent-computers.ts +7 -6
  78. package/src/routes/agent-thread-reads.ts +67 -0
  79. package/src/routes/agents.ts +129 -16
  80. package/src/routes/ai-accounting.ts +1 -0
  81. package/src/routes/connectors.ts +1 -0
  82. package/src/routes/datasets.ts +11 -3
  83. package/src/routes/model-generations.ts +1 -1
  84. package/src/routes/observed-agent-threads.ts +3 -4
  85. package/src/routes/ontology.ts +17 -3
  86. package/src/routes/pipelines.ts +13 -3
  87. package/src/routes/projections.ts +14 -9
  88. package/src/routes/rules.ts +9 -3
  89. package/src/routes/status.ts +18 -1
  90. package/src/routes/syncs.ts +139 -8
  91. package/src/routes/workflows.ts +13 -3
  92. package/src/routes/ws/agents.ts +43 -3
  93. package/src/schemas/actions.ts +7 -1
  94. package/src/schemas/agents.ts +80 -10
  95. package/src/schemas/ai-accounting.ts +12 -0
  96. package/src/schemas/common.ts +24 -9
  97. package/src/schemas/connectors.ts +2 -1
  98. package/src/schemas/datasets.ts +2 -1
  99. package/src/schemas/models.ts +10 -0
  100. package/src/schemas/ontology.ts +2 -0
  101. package/src/schemas/pipelines.ts +2 -1
  102. package/src/schemas/projections.ts +4 -1
  103. package/src/schemas/rules.ts +2 -0
  104. package/src/schemas/syncs.ts +65 -2
  105. package/src/schemas/workflows.ts +7 -1
  106. package/src/server.ts +205 -13
@@ -10,6 +10,7 @@ export declare const SyncParamsSchema: z.ZodObject<{
10
10
  export declare const SyncRunStatusSchema: z.ZodEnum<["queued", "running", "succeeded", "failed", "cancelled"]>;
11
11
  export declare const SyncRunsQuerySchema: z.ZodObject<{
12
12
  syncId: z.ZodOptional<z.ZodString>;
13
+ connectionId: z.ZodOptional<z.ZodString>;
13
14
  datasetId: z.ZodOptional<z.ZodString>;
14
15
  status: z.ZodOptional<z.ZodEnum<["queued", "running", "succeeded", "failed", "cancelled"]>>;
15
16
  startedAfter: z.ZodOptional<z.ZodString>;
@@ -25,6 +26,7 @@ export declare const SyncRunsQuerySchema: z.ZodObject<{
25
26
  offset?: string | undefined;
26
27
  order?: "asc" | "desc" | undefined;
27
28
  datasetId?: string | undefined;
29
+ connectionId?: string | undefined;
28
30
  syncId?: string | undefined;
29
31
  }, {
30
32
  status?: "succeeded" | "failed" | "cancelled" | "running" | "queued" | undefined;
@@ -34,15 +36,20 @@ export declare const SyncRunsQuerySchema: z.ZodObject<{
34
36
  offset?: string | undefined;
35
37
  order?: "asc" | "desc" | undefined;
36
38
  datasetId?: string | undefined;
39
+ connectionId?: string | undefined;
37
40
  syncId?: string | undefined;
38
41
  }>;
39
42
  export declare const RequestSyncRunBodySchema: z.ZodObject<{
43
+ /** One connection to run, on a sync of an OAuth connector. Without it, every one you can run. */
44
+ connectionId: z.ZodOptional<z.ZodString>;
40
45
  expectedLatestVersionId: z.ZodOptional<z.ZodString>;
41
46
  commitMessage: z.ZodOptional<z.ZodString>;
42
47
  }, "strip", z.ZodTypeAny, {
48
+ connectionId?: string | undefined;
43
49
  expectedLatestVersionId?: string | undefined;
44
50
  commitMessage?: string | undefined;
45
51
  }, {
52
+ connectionId?: string | undefined;
46
53
  expectedLatestVersionId?: string | undefined;
47
54
  commitMessage?: string | undefined;
48
55
  }>;
@@ -50,6 +57,8 @@ export declare const SyncRunSchema: z.ZodObject<{
50
57
  id: z.ZodString;
51
58
  projectId: z.ZodString;
52
59
  syncId: z.ZodString;
60
+ /** The connection the run reads, on a sync of an OAuth connector. */
61
+ connectionId: z.ZodOptional<z.ZodString>;
53
62
  datasetId: z.ZodString;
54
63
  mode: z.ZodEnum<["snapshot", "append", "merge"]>;
55
64
  status: z.ZodEnum<["queued", "running", "succeeded", "failed", "cancelled"]>;
@@ -71,7 +80,7 @@ export declare const SyncRunSchema: z.ZodObject<{
71
80
  }>>;
72
81
  expectedLatestVersionId: z.ZodOptional<z.ZodString>;
73
82
  commitMessage: z.ZodOptional<z.ZodString>;
74
- error: z.ZodOptional<z.ZodType<SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed">, z.ZodTypeDef, SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed">>>;
83
+ error: z.ZodOptional<z.ZodType<SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed">, z.ZodTypeDef, SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed">>>;
75
84
  }, "strip", z.ZodTypeAny, {
76
85
  status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
77
86
  projectId: string;
@@ -81,13 +90,14 @@ export declare const SyncRunSchema: z.ZodObject<{
81
90
  attempt: number;
82
91
  datasetId: string;
83
92
  syncId: string;
84
- error?: SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
93
+ error?: SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
85
94
  startedAt?: string | undefined;
86
95
  finishedAt?: string | undefined;
87
96
  output?: {
88
97
  datasetId: string;
89
98
  versionId: string;
90
99
  } | undefined;
100
+ connectionId?: string | undefined;
91
101
  expectedLatestVersionId?: string | undefined;
92
102
  commitMessage?: string | undefined;
93
103
  rowsRead?: number | undefined;
@@ -100,19 +110,505 @@ export declare const SyncRunSchema: z.ZodObject<{
100
110
  attempt: number;
101
111
  datasetId: string;
102
112
  syncId: string;
103
- error?: SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
113
+ error?: SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
104
114
  startedAt?: string | undefined;
105
115
  finishedAt?: string | undefined;
106
116
  output?: {
107
117
  datasetId: string;
108
118
  versionId: string;
109
119
  } | undefined;
120
+ connectionId?: string | undefined;
110
121
  expectedLatestVersionId?: string | undefined;
111
122
  commitMessage?: string | undefined;
112
123
  rowsRead?: number | undefined;
113
124
  }>;
125
+ /** One connected account of an OAuth connector, and the latest run of each of its syncs. */
126
+ export declare const ConnectorAccountSchema: z.ZodObject<{
127
+ connection: z.ZodObject<{
128
+ id: z.ZodString;
129
+ owner: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
130
+ type: z.ZodLiteral<"project">;
131
+ }, "strip", z.ZodTypeAny, {
132
+ type: "project";
133
+ }, {
134
+ type: "project";
135
+ }>, z.ZodObject<{
136
+ type: z.ZodLiteral<"user">;
137
+ id: z.ZodString;
138
+ }, "strip", z.ZodTypeAny, {
139
+ id: string;
140
+ type: "user";
141
+ }, {
142
+ id: string;
143
+ type: "user";
144
+ }>]>;
145
+ slot: z.ZodString;
146
+ account: z.ZodObject<{
147
+ id: z.ZodString;
148
+ label: z.ZodString;
149
+ }, "strip", z.ZodTypeAny, {
150
+ id: string;
151
+ label: string;
152
+ }, {
153
+ id: string;
154
+ label: string;
155
+ }>;
156
+ }, "strip", z.ZodTypeAny, {
157
+ id: string;
158
+ owner: {
159
+ type: "project";
160
+ } | {
161
+ id: string;
162
+ type: "user";
163
+ };
164
+ slot: string;
165
+ account: {
166
+ id: string;
167
+ label: string;
168
+ };
169
+ }, {
170
+ id: string;
171
+ owner: {
172
+ type: "project";
173
+ } | {
174
+ id: string;
175
+ type: "user";
176
+ };
177
+ slot: string;
178
+ account: {
179
+ id: string;
180
+ label: string;
181
+ };
182
+ }>;
183
+ latestRuns: z.ZodArray<z.ZodObject<{
184
+ id: z.ZodString;
185
+ projectId: z.ZodString;
186
+ syncId: z.ZodString;
187
+ /** The connection the run reads, on a sync of an OAuth connector. */
188
+ connectionId: z.ZodOptional<z.ZodString>;
189
+ datasetId: z.ZodString;
190
+ mode: z.ZodEnum<["snapshot", "append", "merge"]>;
191
+ status: z.ZodEnum<["queued", "running", "succeeded", "failed", "cancelled"]>;
192
+ /** How many executions took the run: above one, it resumed after losing its worker. */
193
+ attempt: z.ZodNumber;
194
+ queuedAt: z.ZodString;
195
+ startedAt: z.ZodOptional<z.ZodString>;
196
+ finishedAt: z.ZodOptional<z.ZodString>;
197
+ rowsRead: z.ZodOptional<z.ZodNumber>;
198
+ output: z.ZodOptional<z.ZodObject<{
199
+ datasetId: z.ZodString;
200
+ versionId: z.ZodString;
201
+ }, "strip", z.ZodTypeAny, {
202
+ datasetId: string;
203
+ versionId: string;
204
+ }, {
205
+ datasetId: string;
206
+ versionId: string;
207
+ }>>;
208
+ expectedLatestVersionId: z.ZodOptional<z.ZodString>;
209
+ commitMessage: z.ZodOptional<z.ZodString>;
210
+ error: z.ZodOptional<z.ZodType<SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed">, z.ZodTypeDef, SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed">>>;
211
+ }, "strip", z.ZodTypeAny, {
212
+ status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
213
+ projectId: string;
214
+ id: string;
215
+ mode: "append" | "merge" | "snapshot";
216
+ queuedAt: string;
217
+ attempt: number;
218
+ datasetId: string;
219
+ syncId: string;
220
+ error?: SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
221
+ startedAt?: string | undefined;
222
+ finishedAt?: string | undefined;
223
+ output?: {
224
+ datasetId: string;
225
+ versionId: string;
226
+ } | undefined;
227
+ connectionId?: string | undefined;
228
+ expectedLatestVersionId?: string | undefined;
229
+ commitMessage?: string | undefined;
230
+ rowsRead?: number | undefined;
231
+ }, {
232
+ status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
233
+ projectId: string;
234
+ id: string;
235
+ mode: "append" | "merge" | "snapshot";
236
+ queuedAt: string;
237
+ attempt: number;
238
+ datasetId: string;
239
+ syncId: string;
240
+ error?: SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
241
+ startedAt?: string | undefined;
242
+ finishedAt?: string | undefined;
243
+ output?: {
244
+ datasetId: string;
245
+ versionId: string;
246
+ } | undefined;
247
+ connectionId?: string | undefined;
248
+ expectedLatestVersionId?: string | undefined;
249
+ commitMessage?: string | undefined;
250
+ rowsRead?: number | undefined;
251
+ }>, "many">;
252
+ }, "strip", z.ZodTypeAny, {
253
+ connection: {
254
+ id: string;
255
+ owner: {
256
+ type: "project";
257
+ } | {
258
+ id: string;
259
+ type: "user";
260
+ };
261
+ slot: string;
262
+ account: {
263
+ id: string;
264
+ label: string;
265
+ };
266
+ };
267
+ latestRuns: {
268
+ status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
269
+ projectId: string;
270
+ id: string;
271
+ mode: "append" | "merge" | "snapshot";
272
+ queuedAt: string;
273
+ attempt: number;
274
+ datasetId: string;
275
+ syncId: string;
276
+ error?: SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
277
+ startedAt?: string | undefined;
278
+ finishedAt?: string | undefined;
279
+ output?: {
280
+ datasetId: string;
281
+ versionId: string;
282
+ } | undefined;
283
+ connectionId?: string | undefined;
284
+ expectedLatestVersionId?: string | undefined;
285
+ commitMessage?: string | undefined;
286
+ rowsRead?: number | undefined;
287
+ }[];
288
+ }, {
289
+ connection: {
290
+ id: string;
291
+ owner: {
292
+ type: "project";
293
+ } | {
294
+ id: string;
295
+ type: "user";
296
+ };
297
+ slot: string;
298
+ account: {
299
+ id: string;
300
+ label: string;
301
+ };
302
+ };
303
+ latestRuns: {
304
+ status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
305
+ projectId: string;
306
+ id: string;
307
+ mode: "append" | "merge" | "snapshot";
308
+ queuedAt: string;
309
+ attempt: number;
310
+ datasetId: string;
311
+ syncId: string;
312
+ error?: SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
313
+ startedAt?: string | undefined;
314
+ finishedAt?: string | undefined;
315
+ output?: {
316
+ datasetId: string;
317
+ versionId: string;
318
+ } | undefined;
319
+ connectionId?: string | undefined;
320
+ expectedLatestVersionId?: string | undefined;
321
+ commitMessage?: string | undefined;
322
+ rowsRead?: number | undefined;
323
+ }[];
324
+ }>;
325
+ export declare const ConnectorAccountListResponseSchema: z.ZodObject<{
326
+ accounts: z.ZodArray<z.ZodObject<{
327
+ connection: z.ZodObject<{
328
+ id: z.ZodString;
329
+ owner: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
330
+ type: z.ZodLiteral<"project">;
331
+ }, "strip", z.ZodTypeAny, {
332
+ type: "project";
333
+ }, {
334
+ type: "project";
335
+ }>, z.ZodObject<{
336
+ type: z.ZodLiteral<"user">;
337
+ id: z.ZodString;
338
+ }, "strip", z.ZodTypeAny, {
339
+ id: string;
340
+ type: "user";
341
+ }, {
342
+ id: string;
343
+ type: "user";
344
+ }>]>;
345
+ slot: z.ZodString;
346
+ account: z.ZodObject<{
347
+ id: z.ZodString;
348
+ label: z.ZodString;
349
+ }, "strip", z.ZodTypeAny, {
350
+ id: string;
351
+ label: string;
352
+ }, {
353
+ id: string;
354
+ label: string;
355
+ }>;
356
+ }, "strip", z.ZodTypeAny, {
357
+ id: string;
358
+ owner: {
359
+ type: "project";
360
+ } | {
361
+ id: string;
362
+ type: "user";
363
+ };
364
+ slot: string;
365
+ account: {
366
+ id: string;
367
+ label: string;
368
+ };
369
+ }, {
370
+ id: string;
371
+ owner: {
372
+ type: "project";
373
+ } | {
374
+ id: string;
375
+ type: "user";
376
+ };
377
+ slot: string;
378
+ account: {
379
+ id: string;
380
+ label: string;
381
+ };
382
+ }>;
383
+ latestRuns: z.ZodArray<z.ZodObject<{
384
+ id: z.ZodString;
385
+ projectId: z.ZodString;
386
+ syncId: z.ZodString;
387
+ /** The connection the run reads, on a sync of an OAuth connector. */
388
+ connectionId: z.ZodOptional<z.ZodString>;
389
+ datasetId: z.ZodString;
390
+ mode: z.ZodEnum<["snapshot", "append", "merge"]>;
391
+ status: z.ZodEnum<["queued", "running", "succeeded", "failed", "cancelled"]>;
392
+ /** How many executions took the run: above one, it resumed after losing its worker. */
393
+ attempt: z.ZodNumber;
394
+ queuedAt: z.ZodString;
395
+ startedAt: z.ZodOptional<z.ZodString>;
396
+ finishedAt: z.ZodOptional<z.ZodString>;
397
+ rowsRead: z.ZodOptional<z.ZodNumber>;
398
+ output: z.ZodOptional<z.ZodObject<{
399
+ datasetId: z.ZodString;
400
+ versionId: z.ZodString;
401
+ }, "strip", z.ZodTypeAny, {
402
+ datasetId: string;
403
+ versionId: string;
404
+ }, {
405
+ datasetId: string;
406
+ versionId: string;
407
+ }>>;
408
+ expectedLatestVersionId: z.ZodOptional<z.ZodString>;
409
+ commitMessage: z.ZodOptional<z.ZodString>;
410
+ error: z.ZodOptional<z.ZodType<SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed">, z.ZodTypeDef, SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed">>>;
411
+ }, "strip", z.ZodTypeAny, {
412
+ status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
413
+ projectId: string;
414
+ id: string;
415
+ mode: "append" | "merge" | "snapshot";
416
+ queuedAt: string;
417
+ attempt: number;
418
+ datasetId: string;
419
+ syncId: string;
420
+ error?: SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
421
+ startedAt?: string | undefined;
422
+ finishedAt?: string | undefined;
423
+ output?: {
424
+ datasetId: string;
425
+ versionId: string;
426
+ } | undefined;
427
+ connectionId?: string | undefined;
428
+ expectedLatestVersionId?: string | undefined;
429
+ commitMessage?: string | undefined;
430
+ rowsRead?: number | undefined;
431
+ }, {
432
+ status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
433
+ projectId: string;
434
+ id: string;
435
+ mode: "append" | "merge" | "snapshot";
436
+ queuedAt: string;
437
+ attempt: number;
438
+ datasetId: string;
439
+ syncId: string;
440
+ error?: SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
441
+ startedAt?: string | undefined;
442
+ finishedAt?: string | undefined;
443
+ output?: {
444
+ datasetId: string;
445
+ versionId: string;
446
+ } | undefined;
447
+ connectionId?: string | undefined;
448
+ expectedLatestVersionId?: string | undefined;
449
+ commitMessage?: string | undefined;
450
+ rowsRead?: number | undefined;
451
+ }>, "many">;
452
+ }, "strip", z.ZodTypeAny, {
453
+ connection: {
454
+ id: string;
455
+ owner: {
456
+ type: "project";
457
+ } | {
458
+ id: string;
459
+ type: "user";
460
+ };
461
+ slot: string;
462
+ account: {
463
+ id: string;
464
+ label: string;
465
+ };
466
+ };
467
+ latestRuns: {
468
+ status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
469
+ projectId: string;
470
+ id: string;
471
+ mode: "append" | "merge" | "snapshot";
472
+ queuedAt: string;
473
+ attempt: number;
474
+ datasetId: string;
475
+ syncId: string;
476
+ error?: SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
477
+ startedAt?: string | undefined;
478
+ finishedAt?: string | undefined;
479
+ output?: {
480
+ datasetId: string;
481
+ versionId: string;
482
+ } | undefined;
483
+ connectionId?: string | undefined;
484
+ expectedLatestVersionId?: string | undefined;
485
+ commitMessage?: string | undefined;
486
+ rowsRead?: number | undefined;
487
+ }[];
488
+ }, {
489
+ connection: {
490
+ id: string;
491
+ owner: {
492
+ type: "project";
493
+ } | {
494
+ id: string;
495
+ type: "user";
496
+ };
497
+ slot: string;
498
+ account: {
499
+ id: string;
500
+ label: string;
501
+ };
502
+ };
503
+ latestRuns: {
504
+ status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
505
+ projectId: string;
506
+ id: string;
507
+ mode: "append" | "merge" | "snapshot";
508
+ queuedAt: string;
509
+ attempt: number;
510
+ datasetId: string;
511
+ syncId: string;
512
+ error?: SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
513
+ startedAt?: string | undefined;
514
+ finishedAt?: string | undefined;
515
+ output?: {
516
+ datasetId: string;
517
+ versionId: string;
518
+ } | undefined;
519
+ connectionId?: string | undefined;
520
+ expectedLatestVersionId?: string | undefined;
521
+ commitMessage?: string | undefined;
522
+ rowsRead?: number | undefined;
523
+ }[];
524
+ }>, "many">;
525
+ }, "strip", z.ZodTypeAny, {
526
+ accounts: {
527
+ connection: {
528
+ id: string;
529
+ owner: {
530
+ type: "project";
531
+ } | {
532
+ id: string;
533
+ type: "user";
534
+ };
535
+ slot: string;
536
+ account: {
537
+ id: string;
538
+ label: string;
539
+ };
540
+ };
541
+ latestRuns: {
542
+ status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
543
+ projectId: string;
544
+ id: string;
545
+ mode: "append" | "merge" | "snapshot";
546
+ queuedAt: string;
547
+ attempt: number;
548
+ datasetId: string;
549
+ syncId: string;
550
+ error?: SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
551
+ startedAt?: string | undefined;
552
+ finishedAt?: string | undefined;
553
+ output?: {
554
+ datasetId: string;
555
+ versionId: string;
556
+ } | undefined;
557
+ connectionId?: string | undefined;
558
+ expectedLatestVersionId?: string | undefined;
559
+ commitMessage?: string | undefined;
560
+ rowsRead?: number | undefined;
561
+ }[];
562
+ }[];
563
+ }, {
564
+ accounts: {
565
+ connection: {
566
+ id: string;
567
+ owner: {
568
+ type: "project";
569
+ } | {
570
+ id: string;
571
+ type: "user";
572
+ };
573
+ slot: string;
574
+ account: {
575
+ id: string;
576
+ label: string;
577
+ };
578
+ };
579
+ latestRuns: {
580
+ status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
581
+ projectId: string;
582
+ id: string;
583
+ mode: "append" | "merge" | "snapshot";
584
+ queuedAt: string;
585
+ attempt: number;
586
+ datasetId: string;
587
+ syncId: string;
588
+ error?: SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
589
+ startedAt?: string | undefined;
590
+ finishedAt?: string | undefined;
591
+ output?: {
592
+ datasetId: string;
593
+ versionId: string;
594
+ } | undefined;
595
+ connectionId?: string | undefined;
596
+ expectedLatestVersionId?: string | undefined;
597
+ commitMessage?: string | undefined;
598
+ rowsRead?: number | undefined;
599
+ }[];
600
+ }[];
601
+ }>;
602
+ export declare const ConnectorAccountsParamsSchema: z.ZodObject<{
603
+ connectorId: z.ZodString;
604
+ }, "strip", z.ZodTypeAny, {
605
+ connectorId: string;
606
+ }, {
607
+ connectorId: string;
608
+ }>;
114
609
  export declare const SyncSchema: z.ZodObject<{
115
610
  id: z.ZodString;
611
+ folder: z.ZodOptional<z.ZodString>;
116
612
  mode: z.ZodEnum<["snapshot", "append", "merge"]>;
117
613
  connector: z.ZodObject<{
118
614
  id: z.ZodString;
@@ -233,6 +729,8 @@ export declare const SyncSchema: z.ZodObject<{
233
729
  id: z.ZodString;
234
730
  projectId: z.ZodString;
235
731
  syncId: z.ZodString;
732
+ /** The connection the run reads, on a sync of an OAuth connector. */
733
+ connectionId: z.ZodOptional<z.ZodString>;
236
734
  datasetId: z.ZodString;
237
735
  mode: z.ZodEnum<["snapshot", "append", "merge"]>;
238
736
  status: z.ZodEnum<["queued", "running", "succeeded", "failed", "cancelled"]>;
@@ -254,7 +752,7 @@ export declare const SyncSchema: z.ZodObject<{
254
752
  }>>;
255
753
  expectedLatestVersionId: z.ZodOptional<z.ZodString>;
256
754
  commitMessage: z.ZodOptional<z.ZodString>;
257
- error: z.ZodOptional<z.ZodType<SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed">, z.ZodTypeDef, SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed">>>;
755
+ error: z.ZodOptional<z.ZodType<SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed">, z.ZodTypeDef, SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed">>>;
258
756
  }, "strip", z.ZodTypeAny, {
259
757
  status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
260
758
  projectId: string;
@@ -264,13 +762,14 @@ export declare const SyncSchema: z.ZodObject<{
264
762
  attempt: number;
265
763
  datasetId: string;
266
764
  syncId: string;
267
- error?: SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
765
+ error?: SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
268
766
  startedAt?: string | undefined;
269
767
  finishedAt?: string | undefined;
270
768
  output?: {
271
769
  datasetId: string;
272
770
  versionId: string;
273
771
  } | undefined;
772
+ connectionId?: string | undefined;
274
773
  expectedLatestVersionId?: string | undefined;
275
774
  commitMessage?: string | undefined;
276
775
  rowsRead?: number | undefined;
@@ -283,17 +782,46 @@ export declare const SyncSchema: z.ZodObject<{
283
782
  attempt: number;
284
783
  datasetId: string;
285
784
  syncId: string;
286
- error?: SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
785
+ error?: SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
287
786
  startedAt?: string | undefined;
288
787
  finishedAt?: string | undefined;
289
788
  output?: {
290
789
  datasetId: string;
291
790
  versionId: string;
292
791
  } | undefined;
792
+ connectionId?: string | undefined;
293
793
  expectedLatestVersionId?: string | undefined;
294
794
  commitMessage?: string | undefined;
295
795
  rowsRead?: number | undefined;
296
796
  }>>;
797
+ /** On a sync of an OAuth connector: the accounts the caller may see. */
798
+ accounts: z.ZodOptional<z.ZodObject<{
799
+ total: z.ZodNumber;
800
+ /** Their latest run is queued or running. */
801
+ running: z.ZodNumber;
802
+ /** Their latest run failed because the account needs reconnecting. */
803
+ needsReconnecting: z.ZodNumber;
804
+ /** Their latest run failed for any other reason. */
805
+ failing: z.ZodNumber;
806
+ /** Their latest run succeeded. */
807
+ synced: z.ZodNumber;
808
+ /** When the most recent of those successful runs finished. */
809
+ lastSyncedAt: z.ZodOptional<z.ZodString>;
810
+ }, "strip", z.ZodTypeAny, {
811
+ total: number;
812
+ running: number;
813
+ failing: number;
814
+ needsReconnecting: number;
815
+ synced: number;
816
+ lastSyncedAt?: string | undefined;
817
+ }, {
818
+ total: number;
819
+ running: number;
820
+ failing: number;
821
+ needsReconnecting: number;
822
+ synced: number;
823
+ lastSyncedAt?: string | undefined;
824
+ }>>;
297
825
  }, "strip", z.ZodTypeAny, {
298
826
  id: string;
299
827
  connector: {
@@ -314,13 +842,14 @@ export declare const SyncSchema: z.ZodObject<{
314
842
  attempt: number;
315
843
  datasetId: string;
316
844
  syncId: string;
317
- error?: SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
845
+ error?: SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
318
846
  startedAt?: string | undefined;
319
847
  finishedAt?: string | undefined;
320
848
  output?: {
321
849
  datasetId: string;
322
850
  versionId: string;
323
851
  } | undefined;
852
+ connectionId?: string | undefined;
324
853
  expectedLatestVersionId?: string | undefined;
325
854
  commitMessage?: string | undefined;
326
855
  rowsRead?: number | undefined;
@@ -342,6 +871,15 @@ export declare const SyncSchema: z.ZodObject<{
342
871
  partitionBy?: string[] | undefined;
343
872
  };
344
873
  };
874
+ folder?: string | undefined;
875
+ accounts?: {
876
+ total: number;
877
+ running: number;
878
+ failing: number;
879
+ needsReconnecting: number;
880
+ synced: number;
881
+ lastSyncedAt?: string | undefined;
882
+ } | undefined;
345
883
  }, {
346
884
  id: string;
347
885
  connector: {
@@ -362,13 +900,14 @@ export declare const SyncSchema: z.ZodObject<{
362
900
  attempt: number;
363
901
  datasetId: string;
364
902
  syncId: string;
365
- error?: SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
903
+ error?: SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
366
904
  startedAt?: string | undefined;
367
905
  finishedAt?: string | undefined;
368
906
  output?: {
369
907
  datasetId: string;
370
908
  versionId: string;
371
909
  } | undefined;
910
+ connectionId?: string | undefined;
372
911
  expectedLatestVersionId?: string | undefined;
373
912
  commitMessage?: string | undefined;
374
913
  rowsRead?: number | undefined;
@@ -390,12 +929,148 @@ export declare const SyncSchema: z.ZodObject<{
390
929
  partitionBy?: string[] | undefined;
391
930
  };
392
931
  };
932
+ folder?: string | undefined;
933
+ accounts?: {
934
+ total: number;
935
+ running: number;
936
+ failing: number;
937
+ needsReconnecting: number;
938
+ synced: number;
939
+ lastSyncedAt?: string | undefined;
940
+ } | undefined;
941
+ }>;
942
+ export declare const ConnectionSyncRunsParamsSchema: z.ZodObject<{
943
+ connectorId: z.ZodString;
944
+ connectionId: z.ZodString;
945
+ }, "strip", z.ZodTypeAny, {
946
+ connectorId: string;
947
+ connectionId: string;
948
+ }, {
949
+ connectorId: string;
950
+ connectionId: string;
951
+ }>;
952
+ export declare const ConnectionSyncRunsResponseSchema: z.ZodObject<{
953
+ runs: z.ZodArray<z.ZodObject<{
954
+ id: z.ZodString;
955
+ projectId: z.ZodString;
956
+ syncId: z.ZodString;
957
+ /** The connection the run reads, on a sync of an OAuth connector. */
958
+ connectionId: z.ZodOptional<z.ZodString>;
959
+ datasetId: z.ZodString;
960
+ mode: z.ZodEnum<["snapshot", "append", "merge"]>;
961
+ status: z.ZodEnum<["queued", "running", "succeeded", "failed", "cancelled"]>;
962
+ /** How many executions took the run: above one, it resumed after losing its worker. */
963
+ attempt: z.ZodNumber;
964
+ queuedAt: z.ZodString;
965
+ startedAt: z.ZodOptional<z.ZodString>;
966
+ finishedAt: z.ZodOptional<z.ZodString>;
967
+ rowsRead: z.ZodOptional<z.ZodNumber>;
968
+ output: z.ZodOptional<z.ZodObject<{
969
+ datasetId: z.ZodString;
970
+ versionId: z.ZodString;
971
+ }, "strip", z.ZodTypeAny, {
972
+ datasetId: string;
973
+ versionId: string;
974
+ }, {
975
+ datasetId: string;
976
+ versionId: string;
977
+ }>>;
978
+ expectedLatestVersionId: z.ZodOptional<z.ZodString>;
979
+ commitMessage: z.ZodOptional<z.ZodString>;
980
+ error: z.ZodOptional<z.ZodType<SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed">, z.ZodTypeDef, SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed">>>;
981
+ }, "strip", z.ZodTypeAny, {
982
+ status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
983
+ projectId: string;
984
+ id: string;
985
+ mode: "append" | "merge" | "snapshot";
986
+ queuedAt: string;
987
+ attempt: number;
988
+ datasetId: string;
989
+ syncId: string;
990
+ error?: SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
991
+ startedAt?: string | undefined;
992
+ finishedAt?: string | undefined;
993
+ output?: {
994
+ datasetId: string;
995
+ versionId: string;
996
+ } | undefined;
997
+ connectionId?: string | undefined;
998
+ expectedLatestVersionId?: string | undefined;
999
+ commitMessage?: string | undefined;
1000
+ rowsRead?: number | undefined;
1001
+ }, {
1002
+ status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
1003
+ projectId: string;
1004
+ id: string;
1005
+ mode: "append" | "merge" | "snapshot";
1006
+ queuedAt: string;
1007
+ attempt: number;
1008
+ datasetId: string;
1009
+ syncId: string;
1010
+ error?: SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
1011
+ startedAt?: string | undefined;
1012
+ finishedAt?: string | undefined;
1013
+ output?: {
1014
+ datasetId: string;
1015
+ versionId: string;
1016
+ } | undefined;
1017
+ connectionId?: string | undefined;
1018
+ expectedLatestVersionId?: string | undefined;
1019
+ commitMessage?: string | undefined;
1020
+ rowsRead?: number | undefined;
1021
+ }>, "many">;
1022
+ }, "strip", z.ZodTypeAny, {
1023
+ runs: {
1024
+ status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
1025
+ projectId: string;
1026
+ id: string;
1027
+ mode: "append" | "merge" | "snapshot";
1028
+ queuedAt: string;
1029
+ attempt: number;
1030
+ datasetId: string;
1031
+ syncId: string;
1032
+ error?: SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
1033
+ startedAt?: string | undefined;
1034
+ finishedAt?: string | undefined;
1035
+ output?: {
1036
+ datasetId: string;
1037
+ versionId: string;
1038
+ } | undefined;
1039
+ connectionId?: string | undefined;
1040
+ expectedLatestVersionId?: string | undefined;
1041
+ commitMessage?: string | undefined;
1042
+ rowsRead?: number | undefined;
1043
+ }[];
1044
+ }, {
1045
+ runs: {
1046
+ status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
1047
+ projectId: string;
1048
+ id: string;
1049
+ mode: "append" | "merge" | "snapshot";
1050
+ queuedAt: string;
1051
+ attempt: number;
1052
+ datasetId: string;
1053
+ syncId: string;
1054
+ error?: SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
1055
+ startedAt?: string | undefined;
1056
+ finishedAt?: string | undefined;
1057
+ output?: {
1058
+ datasetId: string;
1059
+ versionId: string;
1060
+ } | undefined;
1061
+ connectionId?: string | undefined;
1062
+ expectedLatestVersionId?: string | undefined;
1063
+ commitMessage?: string | undefined;
1064
+ rowsRead?: number | undefined;
1065
+ }[];
393
1066
  }>;
394
1067
  export declare const SyncRunListResponseSchema: z.ZodObject<{
395
1068
  runs: z.ZodArray<z.ZodObject<{
396
1069
  id: z.ZodString;
397
1070
  projectId: z.ZodString;
398
1071
  syncId: z.ZodString;
1072
+ /** The connection the run reads, on a sync of an OAuth connector. */
1073
+ connectionId: z.ZodOptional<z.ZodString>;
399
1074
  datasetId: z.ZodString;
400
1075
  mode: z.ZodEnum<["snapshot", "append", "merge"]>;
401
1076
  status: z.ZodEnum<["queued", "running", "succeeded", "failed", "cancelled"]>;
@@ -417,7 +1092,7 @@ export declare const SyncRunListResponseSchema: z.ZodObject<{
417
1092
  }>>;
418
1093
  expectedLatestVersionId: z.ZodOptional<z.ZodString>;
419
1094
  commitMessage: z.ZodOptional<z.ZodString>;
420
- error: z.ZodOptional<z.ZodType<SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed">, z.ZodTypeDef, SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed">>>;
1095
+ error: z.ZodOptional<z.ZodType<SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed">, z.ZodTypeDef, SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed">>>;
421
1096
  }, "strip", z.ZodTypeAny, {
422
1097
  status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
423
1098
  projectId: string;
@@ -427,13 +1102,14 @@ export declare const SyncRunListResponseSchema: z.ZodObject<{
427
1102
  attempt: number;
428
1103
  datasetId: string;
429
1104
  syncId: string;
430
- error?: SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
1105
+ error?: SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
431
1106
  startedAt?: string | undefined;
432
1107
  finishedAt?: string | undefined;
433
1108
  output?: {
434
1109
  datasetId: string;
435
1110
  versionId: string;
436
1111
  } | undefined;
1112
+ connectionId?: string | undefined;
437
1113
  expectedLatestVersionId?: string | undefined;
438
1114
  commitMessage?: string | undefined;
439
1115
  rowsRead?: number | undefined;
@@ -446,13 +1122,14 @@ export declare const SyncRunListResponseSchema: z.ZodObject<{
446
1122
  attempt: number;
447
1123
  datasetId: string;
448
1124
  syncId: string;
449
- error?: SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
1125
+ error?: SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
450
1126
  startedAt?: string | undefined;
451
1127
  finishedAt?: string | undefined;
452
1128
  output?: {
453
1129
  datasetId: string;
454
1130
  versionId: string;
455
1131
  } | undefined;
1132
+ connectionId?: string | undefined;
456
1133
  expectedLatestVersionId?: string | undefined;
457
1134
  commitMessage?: string | undefined;
458
1135
  rowsRead?: number | undefined;
@@ -469,13 +1146,14 @@ export declare const SyncRunListResponseSchema: z.ZodObject<{
469
1146
  attempt: number;
470
1147
  datasetId: string;
471
1148
  syncId: string;
472
- error?: SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
1149
+ error?: SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
473
1150
  startedAt?: string | undefined;
474
1151
  finishedAt?: string | undefined;
475
1152
  output?: {
476
1153
  datasetId: string;
477
1154
  versionId: string;
478
1155
  } | undefined;
1156
+ connectionId?: string | undefined;
479
1157
  expectedLatestVersionId?: string | undefined;
480
1158
  commitMessage?: string | undefined;
481
1159
  rowsRead?: number | undefined;
@@ -492,13 +1170,14 @@ export declare const SyncRunListResponseSchema: z.ZodObject<{
492
1170
  attempt: number;
493
1171
  datasetId: string;
494
1172
  syncId: string;
495
- error?: SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
1173
+ error?: SixbFailure<"connector.authorization_required" | "internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
496
1174
  startedAt?: string | undefined;
497
1175
  finishedAt?: string | undefined;
498
1176
  output?: {
499
1177
  datasetId: string;
500
1178
  versionId: string;
501
1179
  } | undefined;
1180
+ connectionId?: string | undefined;
502
1181
  expectedLatestVersionId?: string | undefined;
503
1182
  commitMessage?: string | undefined;
504
1183
  rowsRead?: number | undefined;
@@ -506,20 +1185,43 @@ export declare const SyncRunListResponseSchema: z.ZodObject<{
506
1185
  hasMore: boolean;
507
1186
  total: number;
508
1187
  }>;
1188
+ /** One run for a static connector's sync; one per connection for an OAuth connector's sync. */
509
1189
  export declare const RequestSyncRunResponseSchema: z.ZodObject<{
510
- runId: z.ZodString;
511
- jobId: z.ZodString;
512
- syncId: z.ZodString;
513
- queuedAt: z.ZodString;
1190
+ runs: z.ZodArray<z.ZodObject<{
1191
+ runId: z.ZodString;
1192
+ jobId: z.ZodString;
1193
+ syncId: z.ZodString;
1194
+ /** The connection the run reads, on a sync of an OAuth connector. */
1195
+ connectionId: z.ZodOptional<z.ZodString>;
1196
+ queuedAt: z.ZodString;
1197
+ }, "strip", z.ZodTypeAny, {
1198
+ runId: string;
1199
+ queuedAt: string;
1200
+ jobId: string;
1201
+ syncId: string;
1202
+ connectionId?: string | undefined;
1203
+ }, {
1204
+ runId: string;
1205
+ queuedAt: string;
1206
+ jobId: string;
1207
+ syncId: string;
1208
+ connectionId?: string | undefined;
1209
+ }>, "many">;
514
1210
  }, "strip", z.ZodTypeAny, {
515
- runId: string;
516
- queuedAt: string;
517
- jobId: string;
518
- syncId: string;
1211
+ runs: {
1212
+ runId: string;
1213
+ queuedAt: string;
1214
+ jobId: string;
1215
+ syncId: string;
1216
+ connectionId?: string | undefined;
1217
+ }[];
519
1218
  }, {
520
- runId: string;
521
- queuedAt: string;
522
- jobId: string;
523
- syncId: string;
1219
+ runs: {
1220
+ runId: string;
1221
+ queuedAt: string;
1222
+ jobId: string;
1223
+ syncId: string;
1224
+ connectionId?: string | undefined;
1225
+ }[];
524
1226
  }>;
525
1227
  //# sourceMappingURL=syncs.d.ts.map