@sixb/server 0.1.0 → 0.1.2

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 (171) 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/guard.d.ts +3 -3
  7. package/dist/auth/guard.d.ts.map +1 -1
  8. package/dist/auth/public-routes.d.ts.map +1 -1
  9. package/dist/auth/scope.d.ts +21 -27
  10. package/dist/auth/scope.d.ts.map +1 -1
  11. package/dist/auth/session-cookies.d.ts +2 -2
  12. package/dist/auth/session-cookies.d.ts.map +1 -1
  13. package/dist/connectors/http.d.ts +16 -0
  14. package/dist/connectors/http.d.ts.map +1 -0
  15. package/dist/files/content.d.ts +11 -0
  16. package/dist/files/content.d.ts.map +1 -1
  17. package/dist/index.js +4164 -3541
  18. package/dist/index.js.map +57 -52
  19. package/dist/openapi/tags.d.ts +11 -3
  20. package/dist/openapi/tags.d.ts.map +1 -1
  21. package/dist/registerRoutes.d.ts +6 -2
  22. package/dist/registerRoutes.d.ts.map +1 -1
  23. package/dist/routes/action-runs.d.ts +21 -31
  24. package/dist/routes/action-runs.d.ts.map +1 -1
  25. package/dist/routes/actions.d.ts +9 -8
  26. package/dist/routes/actions.d.ts.map +1 -1
  27. package/dist/routes/agent-api-gateway.d.ts +2 -2
  28. package/dist/routes/agent-api-gateway.d.ts.map +1 -1
  29. package/dist/routes/agents.d.ts +130 -131
  30. package/dist/routes/agents.d.ts.map +1 -1
  31. package/dist/routes/auth.d.ts +90 -90
  32. package/dist/routes/auth.d.ts.map +1 -1
  33. package/dist/routes/connector-connection-runs.d.ts +794 -0
  34. package/dist/routes/connector-connection-runs.d.ts.map +1 -0
  35. package/dist/routes/connector-connections.d.ts +219 -0
  36. package/dist/routes/connector-connections.d.ts.map +1 -0
  37. package/dist/routes/connectors.d.ts +10 -4
  38. package/dist/routes/connectors.d.ts.map +1 -1
  39. package/dist/routes/datasets.d.ts +15 -9
  40. package/dist/routes/datasets.d.ts.map +1 -1
  41. package/dist/routes/events.d.ts +8 -8
  42. package/dist/routes/events.d.ts.map +1 -1
  43. package/dist/routes/files.d.ts +11 -10
  44. package/dist/routes/files.d.ts.map +1 -1
  45. package/dist/routes/links.d.ts +2 -2
  46. package/dist/routes/links.d.ts.map +1 -1
  47. package/dist/routes/logs.d.ts +5 -5
  48. package/dist/routes/logs.d.ts.map +1 -1
  49. package/dist/routes/objects.d.ts +34 -34
  50. package/dist/routes/objects.d.ts.map +1 -1
  51. package/dist/routes/ontology.d.ts +62 -62
  52. package/dist/routes/ontology.d.ts.map +1 -1
  53. package/dist/routes/pipelines.d.ts +28 -34
  54. package/dist/routes/pipelines.d.ts.map +1 -1
  55. package/dist/routes/project.d.ts +2 -2
  56. package/dist/routes/project.d.ts.map +1 -1
  57. package/dist/routes/projections.d.ts +131 -83
  58. package/dist/routes/projections.d.ts.map +1 -1
  59. package/dist/routes/rules.d.ts +6 -6
  60. package/dist/routes/rules.d.ts.map +1 -1
  61. package/dist/routes/status.d.ts +2 -2
  62. package/dist/routes/status.d.ts.map +1 -1
  63. package/dist/routes/syncs.d.ts +27 -30
  64. package/dist/routes/syncs.d.ts.map +1 -1
  65. package/dist/routes/telemetry.d.ts +2 -2
  66. package/dist/routes/telemetry.d.ts.map +1 -1
  67. package/dist/routes/webhook-runs.d.ts +9 -9
  68. package/dist/routes/webhook-runs.d.ts.map +1 -1
  69. package/dist/routes/webhooks.d.ts +2 -2
  70. package/dist/routes/webhooks.d.ts.map +1 -1
  71. package/dist/routes/workflows.d.ts +132 -107
  72. package/dist/routes/workflows.d.ts.map +1 -1
  73. package/dist/routes/ws/agents.d.ts +11 -5
  74. package/dist/routes/ws/agents.d.ts.map +1 -1
  75. package/dist/routes/ws/events.d.ts +8 -8
  76. package/dist/routes/ws/events.d.ts.map +1 -1
  77. package/dist/routes/ws/log-subscription-hub.d.ts +6 -3
  78. package/dist/routes/ws/log-subscription-hub.d.ts.map +1 -1
  79. package/dist/routes/ws/logs.d.ts +10 -10
  80. package/dist/routes/ws/logs.d.ts.map +1 -1
  81. package/dist/schemas/actions.d.ts +97 -202
  82. package/dist/schemas/actions.d.ts.map +1 -1
  83. package/dist/schemas/agents.d.ts +443 -440
  84. package/dist/schemas/agents.d.ts.map +1 -1
  85. package/dist/schemas/ai-usage.d.ts +34 -0
  86. package/dist/schemas/ai-usage.d.ts.map +1 -0
  87. package/dist/schemas/auth.d.ts +168 -168
  88. package/dist/schemas/common.d.ts +37 -0
  89. package/dist/schemas/common.d.ts.map +1 -1
  90. package/dist/schemas/connectors.d.ts +713 -2
  91. package/dist/schemas/connectors.d.ts.map +1 -1
  92. package/dist/schemas/datasets.d.ts +29 -23
  93. package/dist/schemas/datasets.d.ts.map +1 -1
  94. package/dist/schemas/event-payloads.d.ts +6 -6
  95. package/dist/schemas/events.d.ts +34 -34
  96. package/dist/schemas/logs.d.ts +22 -22
  97. package/dist/schemas/objects.d.ts +10 -10
  98. package/dist/schemas/ontology.d.ts +174 -174
  99. package/dist/schemas/pipelines.d.ts +131 -190
  100. package/dist/schemas/pipelines.d.ts.map +1 -1
  101. package/dist/schemas/projections.d.ts +918 -563
  102. package/dist/schemas/projections.d.ts.map +1 -1
  103. package/dist/schemas/rules.d.ts +6 -6
  104. package/dist/schemas/status.d.ts +2 -2
  105. package/dist/schemas/syncs.d.ts +88 -124
  106. package/dist/schemas/syncs.d.ts.map +1 -1
  107. package/dist/schemas/webhook-runs.d.ts +41 -41
  108. package/dist/schemas/webhook-runs.d.ts.map +1 -1
  109. package/dist/schemas/workflows.d.ts +792 -406
  110. package/dist/schemas/workflows.d.ts.map +1 -1
  111. package/dist/server.d.ts +6 -6
  112. package/dist/server.d.ts.map +1 -1
  113. package/dist/utils/http.d.ts +2 -0
  114. package/dist/utils/http.d.ts.map +1 -1
  115. package/dist/utils/ws.d.ts +4 -3
  116. package/dist/utils/ws.d.ts.map +1 -1
  117. package/package.json +8 -5
  118. package/src/auth/access-token-boundary.ts +4 -4
  119. package/src/auth/application-access.ts +8 -9
  120. package/src/auth/connector-callback-cookie.ts +95 -0
  121. package/src/auth/guard.ts +11 -11
  122. package/src/auth/public-routes.ts +13 -0
  123. package/src/auth/scope.ts +34 -30
  124. package/src/auth/session-cookies.ts +3 -3
  125. package/src/connectors/http.ts +110 -0
  126. package/src/files/content.ts +11 -0
  127. package/src/openapi/tags.ts +9 -1
  128. package/src/registerRoutes.ts +34 -23
  129. package/src/routes/action-runs.ts +49 -42
  130. package/src/routes/actions.ts +7 -13
  131. package/src/routes/agent-api-gateway.ts +87 -42
  132. package/src/routes/agents.ts +89 -200
  133. package/src/routes/auth.ts +87 -91
  134. package/src/routes/connector-connection-runs.ts +346 -0
  135. package/src/routes/connector-connections.ts +135 -0
  136. package/src/routes/connectors.ts +24 -12
  137. package/src/routes/datasets.ts +55 -54
  138. package/src/routes/events.ts +5 -5
  139. package/src/routes/files.ts +24 -31
  140. package/src/routes/links.ts +32 -35
  141. package/src/routes/logs.ts +6 -11
  142. package/src/routes/objects.ts +51 -114
  143. package/src/routes/ontology.ts +27 -38
  144. package/src/routes/pipelines.ts +28 -62
  145. package/src/routes/project.ts +3 -3
  146. package/src/routes/projections.ts +26 -38
  147. package/src/routes/rules.ts +11 -25
  148. package/src/routes/status.ts +5 -5
  149. package/src/routes/syncs.ts +19 -45
  150. package/src/routes/telemetry.ts +18 -29
  151. package/src/routes/webhook-runs.ts +5 -5
  152. package/src/routes/webhooks.ts +259 -341
  153. package/src/routes/workflows.ts +260 -259
  154. package/src/routes/ws/agents.ts +196 -66
  155. package/src/routes/ws/events.ts +11 -10
  156. package/src/routes/ws/log-subscription-hub.ts +6 -12
  157. package/src/routes/ws/logs.ts +13 -5
  158. package/src/schemas/actions.ts +58 -25
  159. package/src/schemas/agents.ts +19 -14
  160. package/src/schemas/ai-usage.ts +16 -0
  161. package/src/schemas/common.ts +24 -0
  162. package/src/schemas/connectors.ts +164 -0
  163. package/src/schemas/datasets.ts +3 -2
  164. package/src/schemas/pipelines.ts +24 -40
  165. package/src/schemas/projections.ts +17 -3
  166. package/src/schemas/syncs.ts +16 -10
  167. package/src/schemas/webhook-runs.ts +10 -5
  168. package/src/schemas/workflows.ts +42 -25
  169. package/src/server.ts +65 -26
  170. package/src/utils/http.ts +34 -6
  171. package/src/utils/ws.ts +10 -5
@@ -0,0 +1,794 @@
1
+ import type { SixbHostView } from "@sixb/core";
2
+ import type { Elysia } from "elysia";
3
+ export interface ConnectorConnectionRouteOptions {
4
+ readonly resolveReturnTo: (request: Request, returnTo: string) => string;
5
+ readonly resolveCallbackUrl: (request: Request) => string;
6
+ }
7
+ export declare function registerConnectorConnectionRunRoutes(app: Elysia, host: SixbHostView, options: ConnectorConnectionRouteOptions): Elysia<"", {
8
+ decorator: {};
9
+ store: {};
10
+ derive: {};
11
+ resolve: {};
12
+ }, {
13
+ typebox: {};
14
+ error: {};
15
+ }, {
16
+ schema: {};
17
+ standaloneSchema: {};
18
+ macro: {};
19
+ macroFn: {};
20
+ parser: {};
21
+ response: {};
22
+ }, {
23
+ api: {
24
+ connectors: {
25
+ ":connectorId": {
26
+ "connection-runs": {
27
+ post: {
28
+ body: {
29
+ returnTo: string;
30
+ slot: string;
31
+ };
32
+ params: {
33
+ connectorId: string;
34
+ };
35
+ query: unknown;
36
+ headers: unknown;
37
+ response: {
38
+ 200: {
39
+ error: string;
40
+ } | {
41
+ runId: string;
42
+ authorizationUrl: string;
43
+ affectedConnections: {
44
+ id: string;
45
+ status: "connected" | "needs_reauthorization" | "disconnected";
46
+ connectorId: string;
47
+ owner: {
48
+ type: "project";
49
+ };
50
+ slot: string;
51
+ account: {
52
+ id: string;
53
+ label: string;
54
+ description?: string | undefined;
55
+ avatarUrl?: string | undefined;
56
+ };
57
+ }[];
58
+ };
59
+ 403: {
60
+ error: string;
61
+ };
62
+ 400: {
63
+ error: string;
64
+ code?: "connector.authorization_invalid" | "connector.configuration_invalid" | undefined;
65
+ };
66
+ 404: {
67
+ error: string;
68
+ code?: "connector.not_found" | undefined;
69
+ };
70
+ 502: {
71
+ error: string;
72
+ code?: "connector.adapter_invalid" | "connector.provider_failed" | undefined;
73
+ };
74
+ 409: {
75
+ error: string;
76
+ code?: "connector.authorization_required" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.replacement_required" | "connector.revocation_pending" | undefined;
77
+ };
78
+ 503: {
79
+ error: string;
80
+ code?: "connector.credentials_unavailable" | "connector.provider_unavailable" | undefined;
81
+ };
82
+ 500: {
83
+ error: string;
84
+ code?: "internal.unexpected" | undefined;
85
+ };
86
+ 201: {
87
+ runId: string;
88
+ authorizationUrl: string;
89
+ affectedConnections: {
90
+ id: string;
91
+ status: "connected" | "needs_reauthorization" | "disconnected";
92
+ connectorId: string;
93
+ owner: {
94
+ type: "project";
95
+ };
96
+ slot: string;
97
+ account: {
98
+ id: string;
99
+ label: string;
100
+ description?: string | undefined;
101
+ avatarUrl?: string | undefined;
102
+ };
103
+ }[];
104
+ };
105
+ 422: {
106
+ type: "validation";
107
+ on: string;
108
+ summary?: string;
109
+ message?: string;
110
+ found?: unknown;
111
+ property?: string;
112
+ expected?: string;
113
+ };
114
+ };
115
+ };
116
+ };
117
+ };
118
+ };
119
+ };
120
+ } & {
121
+ api: {
122
+ connectors: {
123
+ ":connectorId": {
124
+ "connection-runs": {
125
+ ":runId": {
126
+ get: {
127
+ body: unknown;
128
+ params: {
129
+ runId: string;
130
+ connectorId: string;
131
+ };
132
+ query: unknown;
133
+ headers: unknown;
134
+ response: {
135
+ 200: {
136
+ id: string;
137
+ status: "waiting";
138
+ kind: "connect" | "reauthorize";
139
+ expiresAt: string;
140
+ createdAt: string;
141
+ updatedAt: string;
142
+ connectorId: string;
143
+ owner: {
144
+ type: "project";
145
+ };
146
+ slot: string;
147
+ waitingFor: "provider_authorization";
148
+ } | {
149
+ id: string;
150
+ status: "running";
151
+ kind: "connect" | "reauthorize";
152
+ createdAt: string;
153
+ updatedAt: string;
154
+ connectorId: string;
155
+ owner: {
156
+ type: "project";
157
+ };
158
+ slot: string;
159
+ } | {
160
+ id: string;
161
+ status: "waiting";
162
+ kind: "connect" | "reauthorize";
163
+ expiresAt: string;
164
+ createdAt: string;
165
+ updatedAt: string;
166
+ connectorId: string;
167
+ owner: {
168
+ type: "project";
169
+ };
170
+ slot: string;
171
+ waitingFor: "account_selection";
172
+ accounts: {
173
+ id: string;
174
+ label: string;
175
+ description?: string | undefined;
176
+ avatarUrl?: string | undefined;
177
+ }[];
178
+ } | {
179
+ id: string;
180
+ status: "succeeded";
181
+ kind: "connect" | "reauthorize";
182
+ finishedAt: string;
183
+ createdAt: string;
184
+ updatedAt: string;
185
+ connectorId: string;
186
+ owner: {
187
+ type: "project";
188
+ };
189
+ slot: string;
190
+ connections: {
191
+ id: string;
192
+ status: "connected" | "needs_reauthorization" | "disconnected";
193
+ connectorId: string;
194
+ owner: {
195
+ type: "project";
196
+ };
197
+ slot: string;
198
+ account: {
199
+ id: string;
200
+ label: string;
201
+ description?: string | undefined;
202
+ avatarUrl?: string | undefined;
203
+ };
204
+ }[];
205
+ } | {
206
+ id: string;
207
+ status: "failed";
208
+ kind: "connect" | "reauthorize";
209
+ error: import("@sixb/core/storage").ConnectorConnectionRunFailure;
210
+ finishedAt: string;
211
+ createdAt: string;
212
+ updatedAt: string;
213
+ connectorId: string;
214
+ owner: {
215
+ type: "project";
216
+ };
217
+ slot: string;
218
+ } | {
219
+ id: string;
220
+ status: "cancelled" | "expired";
221
+ kind: "connect" | "reauthorize";
222
+ finishedAt: string;
223
+ createdAt: string;
224
+ updatedAt: string;
225
+ connectorId: string;
226
+ owner: {
227
+ type: "project";
228
+ };
229
+ slot: string;
230
+ };
231
+ 403: {
232
+ error: string;
233
+ };
234
+ 400: {
235
+ error: string;
236
+ code?: "connector.authorization_invalid" | "connector.configuration_invalid" | undefined;
237
+ };
238
+ 404: {
239
+ error: string;
240
+ code?: "connector.not_found" | undefined;
241
+ };
242
+ 500: {
243
+ error: string;
244
+ code?: "internal.unexpected" | undefined;
245
+ };
246
+ 422: {
247
+ type: "validation";
248
+ on: string;
249
+ summary?: string;
250
+ message?: string;
251
+ found?: unknown;
252
+ property?: string;
253
+ expected?: string;
254
+ };
255
+ };
256
+ };
257
+ };
258
+ };
259
+ };
260
+ };
261
+ };
262
+ } & {
263
+ api: {
264
+ connectors: {
265
+ ":connectorId": {
266
+ connections: {
267
+ ":connectionId": {
268
+ "connection-runs": {
269
+ post: {
270
+ body: {
271
+ slot: string;
272
+ };
273
+ params: {
274
+ connectorId: string;
275
+ connectionId: string;
276
+ };
277
+ query: unknown;
278
+ headers: unknown;
279
+ response: {
280
+ 200: {
281
+ id: string;
282
+ status: "waiting";
283
+ kind: "connect" | "reauthorize";
284
+ expiresAt: string;
285
+ createdAt: string;
286
+ updatedAt: string;
287
+ connectorId: string;
288
+ owner: {
289
+ type: "project";
290
+ };
291
+ slot: string;
292
+ waitingFor: "provider_authorization";
293
+ } | {
294
+ id: string;
295
+ status: "running";
296
+ kind: "connect" | "reauthorize";
297
+ createdAt: string;
298
+ updatedAt: string;
299
+ connectorId: string;
300
+ owner: {
301
+ type: "project";
302
+ };
303
+ slot: string;
304
+ } | {
305
+ id: string;
306
+ status: "waiting";
307
+ kind: "connect" | "reauthorize";
308
+ expiresAt: string;
309
+ createdAt: string;
310
+ updatedAt: string;
311
+ connectorId: string;
312
+ owner: {
313
+ type: "project";
314
+ };
315
+ slot: string;
316
+ waitingFor: "account_selection";
317
+ accounts: {
318
+ id: string;
319
+ label: string;
320
+ description?: string | undefined;
321
+ avatarUrl?: string | undefined;
322
+ }[];
323
+ } | {
324
+ id: string;
325
+ status: "succeeded";
326
+ kind: "connect" | "reauthorize";
327
+ finishedAt: string;
328
+ createdAt: string;
329
+ updatedAt: string;
330
+ connectorId: string;
331
+ owner: {
332
+ type: "project";
333
+ };
334
+ slot: string;
335
+ connections: {
336
+ id: string;
337
+ status: "connected" | "needs_reauthorization" | "disconnected";
338
+ connectorId: string;
339
+ owner: {
340
+ type: "project";
341
+ };
342
+ slot: string;
343
+ account: {
344
+ id: string;
345
+ label: string;
346
+ description?: string | undefined;
347
+ avatarUrl?: string | undefined;
348
+ };
349
+ }[];
350
+ } | {
351
+ id: string;
352
+ status: "failed";
353
+ kind: "connect" | "reauthorize";
354
+ error: import("@sixb/core/storage").ConnectorConnectionRunFailure;
355
+ finishedAt: string;
356
+ createdAt: string;
357
+ updatedAt: string;
358
+ connectorId: string;
359
+ owner: {
360
+ type: "project";
361
+ };
362
+ slot: string;
363
+ } | {
364
+ id: string;
365
+ status: "cancelled" | "expired";
366
+ kind: "connect" | "reauthorize";
367
+ finishedAt: string;
368
+ createdAt: string;
369
+ updatedAt: string;
370
+ connectorId: string;
371
+ owner: {
372
+ type: "project";
373
+ };
374
+ slot: string;
375
+ } | {
376
+ error: string;
377
+ };
378
+ 403: {
379
+ error: string;
380
+ };
381
+ 400: {
382
+ error: string;
383
+ code?: "connector.authorization_invalid" | "connector.configuration_invalid" | undefined;
384
+ };
385
+ 404: {
386
+ error: string;
387
+ code?: "connector.not_found" | undefined;
388
+ };
389
+ 409: {
390
+ error: string;
391
+ code?: "connector.authorization_required" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.replacement_required" | "connector.revocation_pending" | undefined;
392
+ };
393
+ 500: {
394
+ error: string;
395
+ code?: "internal.unexpected" | undefined;
396
+ };
397
+ 201: {
398
+ id: string;
399
+ status: "waiting";
400
+ kind: "connect" | "reauthorize";
401
+ expiresAt: string;
402
+ createdAt: string;
403
+ updatedAt: string;
404
+ connectorId: string;
405
+ owner: {
406
+ type: "project";
407
+ };
408
+ slot: string;
409
+ waitingFor: "provider_authorization";
410
+ } | {
411
+ id: string;
412
+ status: "running";
413
+ kind: "connect" | "reauthorize";
414
+ createdAt: string;
415
+ updatedAt: string;
416
+ connectorId: string;
417
+ owner: {
418
+ type: "project";
419
+ };
420
+ slot: string;
421
+ } | {
422
+ id: string;
423
+ status: "waiting";
424
+ kind: "connect" | "reauthorize";
425
+ expiresAt: string;
426
+ createdAt: string;
427
+ updatedAt: string;
428
+ connectorId: string;
429
+ owner: {
430
+ type: "project";
431
+ };
432
+ slot: string;
433
+ waitingFor: "account_selection";
434
+ accounts: {
435
+ id: string;
436
+ label: string;
437
+ description?: string | undefined;
438
+ avatarUrl?: string | undefined;
439
+ }[];
440
+ } | {
441
+ id: string;
442
+ status: "succeeded";
443
+ kind: "connect" | "reauthorize";
444
+ finishedAt: string;
445
+ createdAt: string;
446
+ updatedAt: string;
447
+ connectorId: string;
448
+ owner: {
449
+ type: "project";
450
+ };
451
+ slot: string;
452
+ connections: {
453
+ id: string;
454
+ status: "connected" | "needs_reauthorization" | "disconnected";
455
+ connectorId: string;
456
+ owner: {
457
+ type: "project";
458
+ };
459
+ slot: string;
460
+ account: {
461
+ id: string;
462
+ label: string;
463
+ description?: string | undefined;
464
+ avatarUrl?: string | undefined;
465
+ };
466
+ }[];
467
+ } | {
468
+ id: string;
469
+ status: "failed";
470
+ kind: "connect" | "reauthorize";
471
+ error: import("@sixb/core/storage").ConnectorConnectionRunFailure;
472
+ finishedAt: string;
473
+ createdAt: string;
474
+ updatedAt: string;
475
+ connectorId: string;
476
+ owner: {
477
+ type: "project";
478
+ };
479
+ slot: string;
480
+ } | {
481
+ id: string;
482
+ status: "cancelled" | "expired";
483
+ kind: "connect" | "reauthorize";
484
+ finishedAt: string;
485
+ createdAt: string;
486
+ updatedAt: string;
487
+ connectorId: string;
488
+ owner: {
489
+ type: "project";
490
+ };
491
+ slot: string;
492
+ };
493
+ 422: {
494
+ type: "validation";
495
+ on: string;
496
+ summary?: string;
497
+ message?: string;
498
+ found?: unknown;
499
+ property?: string;
500
+ expected?: string;
501
+ };
502
+ };
503
+ };
504
+ };
505
+ };
506
+ };
507
+ };
508
+ };
509
+ };
510
+ } & {
511
+ api: {
512
+ connectors: {
513
+ ":connectorId": {
514
+ "connection-runs": {
515
+ ":runId": {
516
+ selection: {
517
+ post: {
518
+ body: {
519
+ accountId: string;
520
+ replace?: boolean | undefined;
521
+ };
522
+ params: {
523
+ runId: string;
524
+ connectorId: string;
525
+ };
526
+ query: unknown;
527
+ headers: unknown;
528
+ response: {
529
+ 200: {
530
+ id: string;
531
+ status: "waiting";
532
+ kind: "connect" | "reauthorize";
533
+ expiresAt: string;
534
+ createdAt: string;
535
+ updatedAt: string;
536
+ connectorId: string;
537
+ owner: {
538
+ type: "project";
539
+ };
540
+ slot: string;
541
+ waitingFor: "provider_authorization";
542
+ } | {
543
+ id: string;
544
+ status: "running";
545
+ kind: "connect" | "reauthorize";
546
+ createdAt: string;
547
+ updatedAt: string;
548
+ connectorId: string;
549
+ owner: {
550
+ type: "project";
551
+ };
552
+ slot: string;
553
+ } | {
554
+ id: string;
555
+ status: "waiting";
556
+ kind: "connect" | "reauthorize";
557
+ expiresAt: string;
558
+ createdAt: string;
559
+ updatedAt: string;
560
+ connectorId: string;
561
+ owner: {
562
+ type: "project";
563
+ };
564
+ slot: string;
565
+ waitingFor: "account_selection";
566
+ accounts: {
567
+ id: string;
568
+ label: string;
569
+ description?: string | undefined;
570
+ avatarUrl?: string | undefined;
571
+ }[];
572
+ } | {
573
+ id: string;
574
+ status: "succeeded";
575
+ kind: "connect" | "reauthorize";
576
+ finishedAt: string;
577
+ createdAt: string;
578
+ updatedAt: string;
579
+ connectorId: string;
580
+ owner: {
581
+ type: "project";
582
+ };
583
+ slot: string;
584
+ connections: {
585
+ id: string;
586
+ status: "connected" | "needs_reauthorization" | "disconnected";
587
+ connectorId: string;
588
+ owner: {
589
+ type: "project";
590
+ };
591
+ slot: string;
592
+ account: {
593
+ id: string;
594
+ label: string;
595
+ description?: string | undefined;
596
+ avatarUrl?: string | undefined;
597
+ };
598
+ }[];
599
+ } | {
600
+ id: string;
601
+ status: "failed";
602
+ kind: "connect" | "reauthorize";
603
+ error: import("@sixb/core/storage").ConnectorConnectionRunFailure;
604
+ finishedAt: string;
605
+ createdAt: string;
606
+ updatedAt: string;
607
+ connectorId: string;
608
+ owner: {
609
+ type: "project";
610
+ };
611
+ slot: string;
612
+ } | {
613
+ id: string;
614
+ status: "cancelled" | "expired";
615
+ kind: "connect" | "reauthorize";
616
+ finishedAt: string;
617
+ createdAt: string;
618
+ updatedAt: string;
619
+ connectorId: string;
620
+ owner: {
621
+ type: "project";
622
+ };
623
+ slot: string;
624
+ };
625
+ 403: {
626
+ error: string;
627
+ };
628
+ 400: {
629
+ error: string;
630
+ code?: "connector.authorization_invalid" | "connector.configuration_invalid" | undefined;
631
+ };
632
+ 404: {
633
+ error: string;
634
+ code?: "connector.not_found" | undefined;
635
+ };
636
+ 409: {
637
+ error: string;
638
+ code?: "connector.authorization_required" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.replacement_required" | "connector.revocation_pending" | undefined;
639
+ };
640
+ 500: {
641
+ error: string;
642
+ code?: "internal.unexpected" | undefined;
643
+ };
644
+ 422: {
645
+ type: "validation";
646
+ on: string;
647
+ summary?: string;
648
+ message?: string;
649
+ found?: unknown;
650
+ property?: string;
651
+ expected?: string;
652
+ };
653
+ };
654
+ };
655
+ };
656
+ };
657
+ };
658
+ };
659
+ };
660
+ };
661
+ } & {
662
+ api: {
663
+ connectors: {
664
+ ":connectorId": {
665
+ connections: {
666
+ ":connectionId": {
667
+ reauthorize: {
668
+ post: {
669
+ body: {
670
+ returnTo: string;
671
+ };
672
+ params: {
673
+ connectorId: string;
674
+ connectionId: string;
675
+ };
676
+ query: unknown;
677
+ headers: unknown;
678
+ response: {
679
+ 200: {
680
+ error: string;
681
+ } | {
682
+ runId: string;
683
+ authorizationUrl: string;
684
+ affectedConnections: {
685
+ id: string;
686
+ status: "connected" | "needs_reauthorization" | "disconnected";
687
+ connectorId: string;
688
+ owner: {
689
+ type: "project";
690
+ };
691
+ slot: string;
692
+ account: {
693
+ id: string;
694
+ label: string;
695
+ description?: string | undefined;
696
+ avatarUrl?: string | undefined;
697
+ };
698
+ }[];
699
+ };
700
+ 403: {
701
+ error: string;
702
+ };
703
+ 400: {
704
+ error: string;
705
+ code?: "connector.authorization_invalid" | "connector.configuration_invalid" | undefined;
706
+ };
707
+ 404: {
708
+ error: string;
709
+ code?: "connector.not_found" | undefined;
710
+ };
711
+ 502: {
712
+ error: string;
713
+ code?: "connector.adapter_invalid" | "connector.provider_failed" | undefined;
714
+ };
715
+ 409: {
716
+ error: string;
717
+ code?: "connector.authorization_required" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.replacement_required" | "connector.revocation_pending" | undefined;
718
+ };
719
+ 503: {
720
+ error: string;
721
+ code?: "connector.credentials_unavailable" | "connector.provider_unavailable" | undefined;
722
+ };
723
+ 500: {
724
+ error: string;
725
+ code?: "internal.unexpected" | undefined;
726
+ };
727
+ 201: {
728
+ runId: string;
729
+ authorizationUrl: string;
730
+ affectedConnections: {
731
+ id: string;
732
+ status: "connected" | "needs_reauthorization" | "disconnected";
733
+ connectorId: string;
734
+ owner: {
735
+ type: "project";
736
+ };
737
+ slot: string;
738
+ account: {
739
+ id: string;
740
+ label: string;
741
+ description?: string | undefined;
742
+ avatarUrl?: string | undefined;
743
+ };
744
+ }[];
745
+ };
746
+ 422: {
747
+ type: "validation";
748
+ on: string;
749
+ summary?: string;
750
+ message?: string;
751
+ found?: unknown;
752
+ property?: string;
753
+ expected?: string;
754
+ };
755
+ };
756
+ };
757
+ };
758
+ };
759
+ };
760
+ };
761
+ };
762
+ };
763
+ } & {
764
+ auth: {
765
+ connectors: {
766
+ callback: {
767
+ get: {
768
+ body: unknown;
769
+ params: {};
770
+ query: unknown;
771
+ headers: unknown;
772
+ response: {
773
+ 200: Response | {
774
+ error: string;
775
+ };
776
+ };
777
+ };
778
+ };
779
+ };
780
+ };
781
+ }, {
782
+ derive: {};
783
+ resolve: {};
784
+ schema: {};
785
+ standaloneSchema: {};
786
+ response: {};
787
+ }, {
788
+ derive: {};
789
+ resolve: {};
790
+ schema: {};
791
+ standaloneSchema: {};
792
+ response: {};
793
+ }>;
794
+ //# sourceMappingURL=connector-connection-runs.d.ts.map