@sixb/server 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/README.md +3 -3
  2. package/dist/auth/application-access.d.ts +2 -2
  3. package/dist/auth/application-access.d.ts.map +1 -1
  4. package/dist/auth/connector-callback-cookie.d.ts +12 -0
  5. package/dist/auth/connector-callback-cookie.d.ts.map +1 -0
  6. package/dist/auth/experience.d.ts +33 -0
  7. package/dist/auth/experience.d.ts.map +1 -0
  8. package/dist/auth/guard.d.ts +3 -3
  9. package/dist/auth/guard.d.ts.map +1 -1
  10. package/dist/auth/public-routes.d.ts.map +1 -1
  11. package/dist/auth/scope.d.ts +13 -27
  12. package/dist/auth/scope.d.ts.map +1 -1
  13. package/dist/auth/session-cookies.d.ts +2 -2
  14. package/dist/auth/session-cookies.d.ts.map +1 -1
  15. package/dist/connectors/http.d.ts +16 -0
  16. package/dist/connectors/http.d.ts.map +1 -0
  17. package/dist/index.d.ts +1 -0
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +3903 -2760
  20. package/dist/index.js.map +58 -50
  21. package/dist/openapi/tags.d.ts +15 -3
  22. package/dist/openapi/tags.d.ts.map +1 -1
  23. package/dist/registerRoutes.d.ts +6 -2
  24. package/dist/registerRoutes.d.ts.map +1 -1
  25. package/dist/routes/action-runs.d.ts +21 -31
  26. package/dist/routes/action-runs.d.ts.map +1 -1
  27. package/dist/routes/actions.d.ts +12 -11
  28. package/dist/routes/actions.d.ts.map +1 -1
  29. package/dist/routes/agent-api-gateway.d.ts +2 -2
  30. package/dist/routes/agent-api-gateway.d.ts.map +1 -1
  31. package/dist/routes/agents.d.ts +230 -159
  32. package/dist/routes/agents.d.ts.map +1 -1
  33. package/dist/routes/ai-accounting.d.ts +31 -0
  34. package/dist/routes/ai-accounting.d.ts.map +1 -0
  35. package/dist/routes/auth.d.ts +149 -92
  36. package/dist/routes/auth.d.ts.map +1 -1
  37. package/dist/routes/connector-connection-runs.d.ts +794 -0
  38. package/dist/routes/connector-connection-runs.d.ts.map +1 -0
  39. package/dist/routes/connector-connections.d.ts +219 -0
  40. package/dist/routes/connector-connections.d.ts.map +1 -0
  41. package/dist/routes/connectors.d.ts +10 -4
  42. package/dist/routes/connectors.d.ts.map +1 -1
  43. package/dist/routes/datasets.d.ts +16 -12
  44. package/dist/routes/datasets.d.ts.map +1 -1
  45. package/dist/routes/events.d.ts +9 -9
  46. package/dist/routes/events.d.ts.map +1 -1
  47. package/dist/routes/files.d.ts +19 -18
  48. package/dist/routes/files.d.ts.map +1 -1
  49. package/dist/routes/links.d.ts +11 -11
  50. package/dist/routes/links.d.ts.map +1 -1
  51. package/dist/routes/logs.d.ts +5 -5
  52. package/dist/routes/logs.d.ts.map +1 -1
  53. package/dist/routes/objects.d.ts +37 -37
  54. package/dist/routes/objects.d.ts.map +1 -1
  55. package/dist/routes/ontology.d.ts +50 -50
  56. package/dist/routes/ontology.d.ts.map +1 -1
  57. package/dist/routes/pipelines.d.ts +28 -38
  58. package/dist/routes/pipelines.d.ts.map +1 -1
  59. package/dist/routes/project.d.ts +2 -2
  60. package/dist/routes/project.d.ts.map +1 -1
  61. package/dist/routes/projections.d.ts +145 -85
  62. package/dist/routes/projections.d.ts.map +1 -1
  63. package/dist/routes/rules.d.ts +6 -6
  64. package/dist/routes/rules.d.ts.map +1 -1
  65. package/dist/routes/status.d.ts +2 -2
  66. package/dist/routes/status.d.ts.map +1 -1
  67. package/dist/routes/syncs.d.ts +23 -28
  68. package/dist/routes/syncs.d.ts.map +1 -1
  69. package/dist/routes/telemetry.d.ts +9 -9
  70. package/dist/routes/telemetry.d.ts.map +1 -1
  71. package/dist/routes/webhook-runs.d.ts +9 -9
  72. package/dist/routes/webhook-runs.d.ts.map +1 -1
  73. package/dist/routes/webhooks.d.ts +2 -2
  74. package/dist/routes/webhooks.d.ts.map +1 -1
  75. package/dist/routes/workflows.d.ts +177 -66
  76. package/dist/routes/workflows.d.ts.map +1 -1
  77. package/dist/routes/ws/agents.d.ts +11 -5
  78. package/dist/routes/ws/agents.d.ts.map +1 -1
  79. package/dist/routes/ws/events.d.ts +8 -8
  80. package/dist/routes/ws/events.d.ts.map +1 -1
  81. package/dist/routes/ws/log-subscription-hub.d.ts +6 -3
  82. package/dist/routes/ws/log-subscription-hub.d.ts.map +1 -1
  83. package/dist/routes/ws/logs.d.ts +10 -10
  84. package/dist/routes/ws/logs.d.ts.map +1 -1
  85. package/dist/schemas/actions.d.ts +89 -194
  86. package/dist/schemas/actions.d.ts.map +1 -1
  87. package/dist/schemas/agents.d.ts +791 -471
  88. package/dist/schemas/agents.d.ts.map +1 -1
  89. package/dist/schemas/ai-accounting.d.ts +2393 -0
  90. package/dist/schemas/ai-accounting.d.ts.map +1 -0
  91. package/dist/schemas/ai-usage.d.ts +34 -0
  92. package/dist/schemas/ai-usage.d.ts.map +1 -0
  93. package/dist/schemas/auth.d.ts +102 -102
  94. package/dist/schemas/common.d.ts +37 -0
  95. package/dist/schemas/common.d.ts.map +1 -1
  96. package/dist/schemas/connectors.d.ts +713 -2
  97. package/dist/schemas/connectors.d.ts.map +1 -1
  98. package/dist/schemas/datasets.d.ts +2 -2
  99. package/dist/schemas/event-payloads.d.ts +12 -12
  100. package/dist/schemas/events.d.ts +40 -40
  101. package/dist/schemas/links.d.ts +2 -2
  102. package/dist/schemas/logs.d.ts +22 -22
  103. package/dist/schemas/objects.d.ts +10 -10
  104. package/dist/schemas/ontology.d.ts +118 -118
  105. package/dist/schemas/pipelines.d.ts +89 -184
  106. package/dist/schemas/pipelines.d.ts.map +1 -1
  107. package/dist/schemas/projections.d.ts +1030 -563
  108. package/dist/schemas/projections.d.ts.map +1 -1
  109. package/dist/schemas/rules.d.ts +6 -6
  110. package/dist/schemas/syncs.d.ts +65 -108
  111. package/dist/schemas/syncs.d.ts.map +1 -1
  112. package/dist/schemas/webhook-runs.d.ts +41 -41
  113. package/dist/schemas/webhook-runs.d.ts.map +1 -1
  114. package/dist/schemas/workflows.d.ts +1189 -185
  115. package/dist/schemas/workflows.d.ts.map +1 -1
  116. package/dist/server.d.ts +11 -6
  117. package/dist/server.d.ts.map +1 -1
  118. package/dist/utils/http.d.ts +2 -0
  119. package/dist/utils/http.d.ts.map +1 -1
  120. package/dist/utils/ws.d.ts +4 -3
  121. package/dist/utils/ws.d.ts.map +1 -1
  122. package/package.json +5 -5
  123. package/src/auth/access-token-boundary.ts +4 -4
  124. package/src/auth/application-access.ts +8 -9
  125. package/src/auth/connector-callback-cookie.ts +95 -0
  126. package/src/auth/experience.ts +190 -0
  127. package/src/auth/guard.ts +11 -11
  128. package/src/auth/public-routes.ts +20 -0
  129. package/src/auth/scope.ts +26 -36
  130. package/src/auth/session-cookies.ts +3 -3
  131. package/src/connectors/http.ts +110 -0
  132. package/src/index.ts +1 -0
  133. package/src/openapi/tags.ts +13 -1
  134. package/src/registerRoutes.ts +36 -23
  135. package/src/routes/action-runs.ts +39 -39
  136. package/src/routes/actions.ts +7 -13
  137. package/src/routes/agent-api-gateway.ts +41 -38
  138. package/src/routes/agents.ts +90 -200
  139. package/src/routes/ai-accounting.ts +166 -0
  140. package/src/routes/auth.ts +274 -122
  141. package/src/routes/connector-connection-runs.ts +346 -0
  142. package/src/routes/connector-connections.ts +135 -0
  143. package/src/routes/connectors.ts +24 -12
  144. package/src/routes/datasets.ts +55 -54
  145. package/src/routes/events.ts +5 -5
  146. package/src/routes/files.ts +22 -30
  147. package/src/routes/links.ts +31 -35
  148. package/src/routes/logs.ts +6 -11
  149. package/src/routes/objects.ts +51 -114
  150. package/src/routes/ontology.ts +27 -38
  151. package/src/routes/pipelines.ts +28 -62
  152. package/src/routes/project.ts +3 -3
  153. package/src/routes/projections.ts +44 -42
  154. package/src/routes/rules.ts +11 -25
  155. package/src/routes/status.ts +5 -5
  156. package/src/routes/syncs.ts +19 -45
  157. package/src/routes/telemetry.ts +18 -29
  158. package/src/routes/webhook-runs.ts +5 -5
  159. package/src/routes/webhooks.ts +259 -341
  160. package/src/routes/workflows.ts +242 -248
  161. package/src/routes/ws/agents.ts +196 -66
  162. package/src/routes/ws/events.ts +11 -10
  163. package/src/routes/ws/log-subscription-hub.ts +6 -12
  164. package/src/routes/ws/logs.ts +13 -5
  165. package/src/schemas/actions.ts +58 -25
  166. package/src/schemas/agents.ts +23 -23
  167. package/src/schemas/ai-accounting.ts +182 -0
  168. package/src/schemas/ai-usage.ts +16 -0
  169. package/src/schemas/common.ts +24 -0
  170. package/src/schemas/connectors.ts +164 -0
  171. package/src/schemas/pipelines.ts +23 -15
  172. package/src/schemas/projections.ts +23 -3
  173. package/src/schemas/syncs.ts +13 -8
  174. package/src/schemas/webhook-runs.ts +10 -5
  175. package/src/schemas/workflows.ts +23 -8
  176. package/src/server.ts +75 -26
  177. package/src/utils/http.ts +34 -6
  178. package/src/utils/ws.ts +10 -5
@@ -1,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
+ status: "connected" | "needs_reauthorization" | "disconnected";
232
+ id: string;
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
+ status: "connected" | "needs_reauthorization" | "disconnected";
246
+ id: string;
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
+ status: "waiting";
279
+ id: string;
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
+ status: "waiting";
292
+ id: string;
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
+ status: "running";
321
+ id: string;
322
+ kind: "connect" | "reauthorize";
323
+ createdAt: string;
324
+ updatedAt: string;
325
+ connectorId: string;
326
+ owner: {
327
+ type: "project";
328
+ };
329
+ slot: string;
330
+ }, {
331
+ status: "running";
332
+ id: string;
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
+ status: "waiting";
377
+ id: string;
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
+ status: "waiting";
396
+ id: string;
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
+ status: "connected" | "needs_reauthorization" | "disconnected";
459
+ id: string;
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
+ status: "connected" | "needs_reauthorization" | "disconnected";
473
+ id: string;
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
+ status: "succeeded";
489
+ id: string;
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
+ status: "connected" | "needs_reauthorization" | "disconnected";
501
+ id: string;
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
+ status: "succeeded";
516
+ id: string;
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
+ status: "connected" | "needs_reauthorization" | "disconnected";
528
+ id: string;
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
+ error: ConnectorConnectionRunFailure;
561
+ status: "failed";
562
+ id: string;
563
+ kind: "connect" | "reauthorize";
564
+ finishedAt: string;
565
+ createdAt: string;
566
+ updatedAt: string;
567
+ connectorId: string;
568
+ owner: {
569
+ type: "project";
570
+ };
571
+ slot: string;
572
+ }, {
573
+ error: ConnectorConnectionRunFailure;
574
+ status: "failed";
575
+ id: string;
576
+ kind: "connect" | "reauthorize";
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
+ status: "cancelled" | "expired";
604
+ id: string;
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
+ status: "cancelled" | "expired";
616
+ id: string;
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
+ status: "connected" | "needs_reauthorization" | "disconnected";
684
+ id: string;
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
+ status: "connected" | "needs_reauthorization" | "disconnected";
698
+ id: string;
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
+ status: "connected" | "needs_reauthorization" | "disconnected";
716
+ id: string;
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
+ status: "connected" | "needs_reauthorization" | "disconnected";
734
+ id: string;
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