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