@membranehq/sdk 0.4.0 → 0.5.1

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 (82) hide show
  1. package/dist/bundle.d.ts +16299 -1303
  2. package/dist/bundle.js +3980 -3701
  3. package/dist/bundle.js.map +1 -1
  4. package/dist/dts/accessors/connections-accessors.d.ts +78 -1
  5. package/dist/dts/accessors/integrations-accessors.d.ts +78 -1
  6. package/dist/dts/api-client.d.ts +1 -0
  7. package/dist/dts/client.d.ts +1 -0
  8. package/dist/dts/data-schema/index.d.ts +0 -1
  9. package/dist/dts/data-schema/types.d.ts +4 -3
  10. package/dist/dts/entity-repository.d.ts +88 -20
  11. package/dist/dts/formulas/dataSchemaRef.d.ts +2 -2
  12. package/dist/dts/http-requests.d.ts +20 -6
  13. package/dist/dts/iframe.d.ts +12 -4
  14. package/dist/dts/index.d.ts +2 -1
  15. package/dist/dts/sse/index.d.ts +1 -0
  16. package/dist/dts/sse/workspace-elements.d.ts +9 -0
  17. package/dist/dts/workspace-elements/api/action-instances-api.d.ts +269 -8
  18. package/dist/dts/workspace-elements/api/action-run-log-records-api.d.ts +529 -10
  19. package/dist/dts/workspace-elements/api/actions-api.d.ts +1010 -45
  20. package/dist/dts/workspace-elements/api/app-data-schema-instances-api.d.ts +203 -8
  21. package/dist/dts/workspace-elements/api/app-data-schemas-api.d.ts +49 -3
  22. package/dist/dts/workspace-elements/api/app-event-log-records-api.d.ts +376 -0
  23. package/dist/dts/workspace-elements/api/app-event-subscriptions-api.d.ts +293 -8
  24. package/dist/dts/workspace-elements/api/app-event-types-api.d.ts +88 -3
  25. package/dist/dts/workspace-elements/api/connections-api.d.ts +993 -42
  26. package/dist/dts/workspace-elements/api/customers-api.d.ts +92 -16
  27. package/dist/dts/workspace-elements/api/data-link-table-instances-api.d.ts +541 -12
  28. package/dist/dts/workspace-elements/api/data-link-tables-api.d.ts +43 -2
  29. package/dist/dts/workspace-elements/api/data-source-instances-api.d.ts +1590 -12
  30. package/dist/dts/workspace-elements/api/data-sources-api.d.ts +1113 -78
  31. package/dist/dts/workspace-elements/api/external-event-log-records-api.d.ts +696 -19
  32. package/dist/dts/workspace-elements/api/external-event-pulls-api.d.ts +702 -19
  33. package/dist/dts/workspace-elements/api/external-event-subscriptions-api.d.ts +559 -10
  34. package/dist/dts/workspace-elements/api/external-events-api.d.ts +582 -6
  35. package/dist/dts/workspace-elements/api/field-mapping-instances-api.d.ts +2786 -14
  36. package/dist/dts/workspace-elements/api/field-mappings-api.d.ts +885 -7
  37. package/dist/dts/workspace-elements/api/flow-runs-api.d.ts +1652 -47
  38. package/dist/dts/workspace-elements/api/flows-api.d.ts +3202 -52
  39. package/dist/dts/workspace-elements/api/index.d.ts +1 -1
  40. package/dist/dts/workspace-elements/api/integrations-api.d.ts +339 -26
  41. package/dist/dts/workspace-elements/api/scenarios-api.d.ts +523 -35
  42. package/dist/dts/workspace-elements/api/screens-api.d.ts +35 -15
  43. package/dist/dts/workspace-elements/base/action-instances/types.d.ts +78 -15
  44. package/dist/dts/workspace-elements/base/action-run-log-records/types.d.ts +37 -12
  45. package/dist/dts/workspace-elements/base/actions/types.d.ts +78 -18
  46. package/dist/dts/workspace-elements/base/app-data-schema-instances/types.d.ts +59 -7
  47. package/dist/dts/workspace-elements/base/app-data-schemas/types.d.ts +49 -7
  48. package/dist/dts/workspace-elements/base/app-event-subscriptions/types.d.ts +92 -9
  49. package/dist/dts/workspace-elements/base/app-event-types/types.d.ts +84 -7
  50. package/dist/dts/workspace-elements/base/connections/types.d.ts +82 -20
  51. package/dist/dts/workspace-elements/base/connectors/types.d.ts +14 -2
  52. package/dist/dts/workspace-elements/base/customers/index.d.ts +32 -6
  53. package/dist/dts/workspace-elements/base/data-collections/schemas.d.ts +93 -92
  54. package/dist/dts/workspace-elements/base/data-link-table-instances/types.d.ts +78 -11
  55. package/dist/dts/workspace-elements/base/data-link-tables/types.d.ts +43 -4
  56. package/dist/dts/workspace-elements/base/data-source-instances/types.d.ts +1048 -19
  57. package/dist/dts/workspace-elements/base/data-sources/types.d.ts +97 -22
  58. package/dist/dts/workspace-elements/base/external-event-log-records/types.d.ts +31 -8
  59. package/dist/dts/workspace-elements/base/external-event-pulls/types.d.ts +35 -8
  60. package/dist/dts/workspace-elements/base/external-event-subscriptions/types.d.ts +197 -24
  61. package/dist/dts/workspace-elements/base/external-events/types.d.ts +145 -5
  62. package/dist/dts/workspace-elements/base/field-mapping-instances/types.d.ts +92 -16
  63. package/dist/dts/workspace-elements/base/field-mappings/types.d.ts +105 -14
  64. package/dist/dts/workspace-elements/base/flow-instances/schemas.d.ts +43 -43
  65. package/dist/dts/workspace-elements/base/flow-instances/types.d.ts +170 -24
  66. package/dist/dts/workspace-elements/base/flow-runs/flow-node-runs.d.ts +20 -20
  67. package/dist/dts/workspace-elements/base/flow-runs/types.d.ts +127 -19
  68. package/dist/dts/workspace-elements/base/flows/types.d.ts +234 -26
  69. package/dist/dts/workspace-elements/base/integrations/types.d.ts +988 -25
  70. package/dist/dts/workspace-elements/base/scenarios/types.d.ts +740 -23
  71. package/dist/dts/workspace-elements/base/screens/types.d.ts +48 -6
  72. package/dist/dts/workspace-elements/types.d.ts +25 -3
  73. package/dist/dts/workspaces/types.d.ts +4 -3
  74. package/dist/index.d.ts +26481 -3080
  75. package/dist/index.js +1717 -535
  76. package/dist/index.js.map +1 -1
  77. package/dist/index.module.d.mts +26481 -3080
  78. package/dist/index.module.mjs +1550 -502
  79. package/dist/index.module.mjs.map +1 -1
  80. package/package.json +3 -2
  81. package/dist/dts/data-schema/schemas.d.ts +0 -4
  82. package/dist/dts/workspace-elements/api/app-events-api.d.ts +0 -17
@@ -1,49 +1,1000 @@
1
- import { PaginationQuery, PaginationResponse } from '../../entity-repository';
2
- import { ErrorData } from '../../errors';
3
- import { BaseConnection } from '../base/connections';
4
- import { BaseCustomer } from '../base/customers';
5
- import { BaseIntegration } from '../base/integrations';
6
- export interface FindConnectionsQuery extends PaginationQuery {
7
- userId?: string;
8
- isTest?: boolean;
9
- integrationKey?: string;
10
- integrationId?: string;
11
- includeArchived?: boolean;
12
- }
13
- export declare class CreateConnectionRequest {
1
+ import { z } from 'zod';
2
+ import { PaginationResponse } from '../../entity-repository';
3
+ export declare const FindConnectionsQuery: z.ZodObject<{
4
+ userId: z.ZodOptional<z.ZodString>;
5
+ isTest: z.ZodOptional<z.ZodEffects<z.ZodBoolean, boolean, unknown>>;
6
+ integrationKey: z.ZodOptional<z.ZodString>;
7
+ integrationId: z.ZodOptional<z.ZodString>;
8
+ includeArchived: z.ZodOptional<z.ZodEffects<z.ZodBoolean, boolean, unknown>>;
9
+ } & {
10
+ limit: z.ZodOptional<z.ZodNumber>;
11
+ cursor: z.ZodOptional<z.ZodString>;
12
+ }, "strip", z.ZodTypeAny, {
13
+ includeArchived?: boolean | undefined;
14
+ limit?: number | undefined;
15
+ cursor?: string | undefined;
16
+ userId?: string | undefined;
17
+ integrationId?: string | undefined;
18
+ integrationKey?: string | undefined;
19
+ isTest?: boolean | undefined;
20
+ }, {
21
+ includeArchived?: unknown;
22
+ limit?: number | undefined;
23
+ cursor?: string | undefined;
24
+ userId?: string | undefined;
25
+ integrationId?: string | undefined;
26
+ integrationKey?: string | undefined;
27
+ isTest?: unknown;
28
+ }>;
29
+ export type FindConnectionsQuery = z.infer<typeof FindConnectionsQuery>;
30
+ export declare const CreateConnectionRequest: z.ZodObject<{
31
+ name: z.ZodString;
32
+ integrationId: z.ZodString;
33
+ credentials: z.ZodOptional<z.ZodString>;
34
+ }, "strip", z.ZodTypeAny, {
14
35
  name: string;
15
36
  integrationId: string;
16
- credentials?: string;
17
- }
18
- export declare class UpdateConnectionRequest {
19
- name?: string;
20
- credentials?: string;
21
- accessToken?: string;
22
- }
37
+ credentials?: string | undefined;
38
+ }, {
39
+ name: string;
40
+ integrationId: string;
41
+ credentials?: string | undefined;
42
+ }>;
43
+ export type CreateConnectionRequest = z.infer<typeof CreateConnectionRequest>;
44
+ export declare const UpdateConnectionRequest: z.ZodObject<{
45
+ name: z.ZodOptional<z.ZodString>;
46
+ credentials: z.ZodOptional<z.ZodString>;
47
+ accessToken: z.ZodOptional<z.ZodString>;
48
+ }, "strip", z.ZodTypeAny, {
49
+ name?: string | undefined;
50
+ accessToken?: string | undefined;
51
+ credentials?: string | undefined;
52
+ }, {
53
+ name?: string | undefined;
54
+ accessToken?: string | undefined;
55
+ credentials?: string | undefined;
56
+ }>;
57
+ export type UpdateConnectionRequest = z.infer<typeof UpdateConnectionRequest>;
23
58
  export declare class FindConnectionsResponse extends PaginationResponse<Connection> {
24
59
  }
25
- export interface ConnectionSelector {
26
- id?: string;
27
- integrationKey?: string;
28
- integrationId?: string;
29
- connectionId?: string;
30
- }
31
- export interface Connection extends BaseConnection {
32
- user?: BaseCustomer;
33
- integration?: BaseIntegration;
34
- }
35
- export type ConnectionApiResponse = Connection;
36
- export type ConnectionMessagePayload = {
60
+ export declare const ConnectionSelector: z.ZodObject<{
61
+ id: z.ZodOptional<z.ZodString>;
62
+ integrationKey: z.ZodOptional<z.ZodString>;
63
+ integrationId: z.ZodOptional<z.ZodString>;
64
+ connectionId: z.ZodOptional<z.ZodString>;
65
+ }, "strip", z.ZodTypeAny, {
66
+ id?: string | undefined;
67
+ connectionId?: string | undefined;
68
+ integrationId?: string | undefined;
69
+ integrationKey?: string | undefined;
70
+ }, {
71
+ id?: string | undefined;
72
+ connectionId?: string | undefined;
73
+ integrationId?: string | undefined;
74
+ integrationKey?: string | undefined;
75
+ }>;
76
+ export type ConnectionSelector = z.infer<typeof ConnectionSelector>;
77
+ export declare const ConnectionApiResponse: z.ZodObject<{
78
+ id: z.ZodString;
79
+ } & {
80
+ name: z.ZodString;
81
+ userId: z.ZodString;
82
+ isTest: z.ZodOptional<z.ZodBoolean>;
83
+ disconnected: z.ZodOptional<z.ZodBoolean>;
84
+ isDefunct: z.ZodOptional<z.ZodBoolean>;
85
+ error: any;
86
+ integrationId: z.ZodString;
87
+ credentials: z.ZodOptional<z.ZodUnknown>;
88
+ parameters: z.ZodOptional<z.ZodUnknown>;
89
+ connectorParameters: z.ZodOptional<z.ZodUnknown>;
90
+ createdAt: z.ZodString;
91
+ updatedAt: z.ZodString;
92
+ lastActiveAt: z.ZodOptional<z.ZodString>;
93
+ nextCredentialsRefreshAt: z.ZodOptional<z.ZodString>;
94
+ archivedAt: z.ZodOptional<z.ZodString>;
95
+ isDeactivated: z.ZodOptional<z.ZodBoolean>;
96
+ state: z.ZodOptional<z.ZodNativeEnum<typeof import("..").WorkspaceElementState>>;
97
+ errors: z.ZodOptional<z.ZodArray<any, "many">>;
98
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
99
+ } & {
100
+ user: z.ZodOptional<z.ZodObject<{
101
+ id: z.ZodString;
102
+ name: z.ZodString;
103
+ internalId: z.ZodString;
104
+ fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
105
+ credentials: z.ZodOptional<z.ZodAny>;
106
+ lastActiveAt: z.ZodOptional<z.ZodString>;
107
+ isTest: z.ZodOptional<z.ZodBoolean>;
108
+ isBillable: z.ZodOptional<z.ZodBoolean>;
109
+ createdAt: z.ZodOptional<z.ZodString>;
110
+ archivedAt: z.ZodOptional<z.ZodString>;
111
+ }, "strip", z.ZodTypeAny, {
112
+ id: string;
113
+ name: string;
114
+ internalId: string;
115
+ createdAt?: string | undefined;
116
+ archivedAt?: string | undefined;
117
+ credentials?: any;
118
+ fields?: Record<string, any> | undefined;
119
+ isTest?: boolean | undefined;
120
+ lastActiveAt?: string | undefined;
121
+ isBillable?: boolean | undefined;
122
+ }, {
123
+ id: string;
124
+ name: string;
125
+ internalId: string;
126
+ createdAt?: string | undefined;
127
+ archivedAt?: string | undefined;
128
+ credentials?: any;
129
+ fields?: Record<string, any> | undefined;
130
+ isTest?: boolean | undefined;
131
+ lastActiveAt?: string | undefined;
132
+ isBillable?: boolean | undefined;
133
+ }>>;
134
+ integration: z.ZodOptional<z.ZodObject<{
135
+ id: z.ZodString;
136
+ name: z.ZodString;
137
+ key: z.ZodOptional<z.ZodString>;
138
+ uuid: z.ZodOptional<z.ZodString>;
139
+ description: z.ZodOptional<z.ZodString>;
140
+ state: z.ZodOptional<z.ZodNativeEnum<typeof import("..").WorkspaceElementState>>;
141
+ errors: z.ZodOptional<z.ZodArray<any, "many">>;
142
+ revision: z.ZodOptional<z.ZodString>;
143
+ createdAt: z.ZodOptional<z.ZodString>;
144
+ updatedAt: z.ZodOptional<z.ZodString>;
145
+ } & {
146
+ logoUri: z.ZodString;
147
+ connectorId: z.ZodOptional<z.ZodString>;
148
+ connectorVersion: z.ZodOptional<z.ZodString>;
149
+ authOptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
150
+ key: z.ZodString;
151
+ type: z.ZodEnum<["integration-app-token", "membrane-token", "oauth2", "oauth1", "client-credentials", "proxy"]>;
152
+ title: z.ZodOptional<z.ZodString>;
153
+ description: z.ZodOptional<z.ZodString>;
154
+ ui: z.ZodOptional<z.ZodObject<{
155
+ schema: z.ZodOptional<z.ZodAny>;
156
+ helpUri: z.ZodOptional<z.ZodString>;
157
+ }, "strip", z.ZodTypeAny, {
158
+ schema?: any;
159
+ helpUri?: string | undefined;
160
+ }, {
161
+ schema?: any;
162
+ helpUri?: string | undefined;
163
+ }>>;
164
+ }, "strip", z.ZodTypeAny, {
165
+ key: string;
166
+ type: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials";
167
+ description?: string | undefined;
168
+ title?: string | undefined;
169
+ ui?: {
170
+ schema?: any;
171
+ helpUri?: string | undefined;
172
+ } | undefined;
173
+ }, {
174
+ key: string;
175
+ type: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials";
176
+ description?: string | undefined;
177
+ title?: string | undefined;
178
+ ui?: {
179
+ schema?: any;
180
+ helpUri?: string | undefined;
181
+ } | undefined;
182
+ }>, "many">>;
183
+ oAuthCallbackUri: z.ZodOptional<z.ZodString>;
184
+ parametersSchema: z.ZodOptional<z.ZodType<import("../..").DataSchema, z.ZodTypeDef, import("../..").DataSchema>>;
185
+ parameters: z.ZodOptional<z.ZodAny>;
186
+ baseUri: z.ZodString;
187
+ archivedAt: z.ZodOptional<z.ZodString>;
188
+ hasMissingParameters: z.ZodOptional<z.ZodBoolean>;
189
+ hasDocumentation: z.ZodOptional<z.ZodBoolean>;
190
+ hasOperations: z.ZodOptional<z.ZodBoolean>;
191
+ operationsCount: z.ZodOptional<z.ZodNumber>;
192
+ hasData: z.ZodOptional<z.ZodBoolean>;
193
+ dataCollectionsCount: z.ZodOptional<z.ZodNumber>;
194
+ hasEvents: z.ZodOptional<z.ZodBoolean>;
195
+ eventsCount: z.ZodOptional<z.ZodNumber>;
196
+ hasGlobalWebhooks: z.ZodOptional<z.ZodBoolean>;
197
+ hasUdm: z.ZodOptional<z.ZodBoolean>;
198
+ isTest: z.ZodOptional<z.ZodBoolean>;
199
+ appUuid: z.ZodOptional<z.ZodString>;
200
+ isDeactivated: z.ZodOptional<z.ZodBoolean>;
201
+ authType: z.ZodOptional<z.ZodEnum<["integration-app-token", "membrane-token", "oauth2", "oauth1", "client-credentials", "proxy"]>>;
202
+ }, "strip", z.ZodTypeAny, {
203
+ id: string;
204
+ name: string;
205
+ baseUri: string;
206
+ logoUri: string;
207
+ key?: string | undefined;
208
+ uuid?: string | undefined;
209
+ description?: string | undefined;
210
+ state?: import("..").WorkspaceElementState | undefined;
211
+ errors?: any[] | undefined;
212
+ revision?: string | undefined;
213
+ isDeactivated?: boolean | undefined;
214
+ createdAt?: string | undefined;
215
+ updatedAt?: string | undefined;
216
+ archivedAt?: string | undefined;
217
+ parameters?: any;
218
+ parametersSchema?: import("../..").DataSchema | undefined;
219
+ isTest?: boolean | undefined;
220
+ connectorId?: string | undefined;
221
+ connectorVersion?: string | undefined;
222
+ authOptions?: {
223
+ key: string;
224
+ type: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials";
225
+ description?: string | undefined;
226
+ title?: string | undefined;
227
+ ui?: {
228
+ schema?: any;
229
+ helpUri?: string | undefined;
230
+ } | undefined;
231
+ }[] | undefined;
232
+ oAuthCallbackUri?: string | undefined;
233
+ hasMissingParameters?: boolean | undefined;
234
+ hasDocumentation?: boolean | undefined;
235
+ hasOperations?: boolean | undefined;
236
+ operationsCount?: number | undefined;
237
+ hasData?: boolean | undefined;
238
+ dataCollectionsCount?: number | undefined;
239
+ hasEvents?: boolean | undefined;
240
+ eventsCount?: number | undefined;
241
+ hasGlobalWebhooks?: boolean | undefined;
242
+ hasUdm?: boolean | undefined;
243
+ appUuid?: string | undefined;
244
+ authType?: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials" | undefined;
245
+ }, {
246
+ id: string;
247
+ name: string;
248
+ baseUri: string;
249
+ logoUri: string;
250
+ key?: string | undefined;
251
+ uuid?: string | undefined;
252
+ description?: string | undefined;
253
+ state?: import("..").WorkspaceElementState | undefined;
254
+ errors?: any[] | undefined;
255
+ revision?: string | undefined;
256
+ isDeactivated?: boolean | undefined;
257
+ createdAt?: string | undefined;
258
+ updatedAt?: string | undefined;
259
+ archivedAt?: string | undefined;
260
+ parameters?: any;
261
+ parametersSchema?: import("../..").DataSchema | undefined;
262
+ isTest?: boolean | undefined;
263
+ connectorId?: string | undefined;
264
+ connectorVersion?: string | undefined;
265
+ authOptions?: {
266
+ key: string;
267
+ type: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials";
268
+ description?: string | undefined;
269
+ title?: string | undefined;
270
+ ui?: {
271
+ schema?: any;
272
+ helpUri?: string | undefined;
273
+ } | undefined;
274
+ }[] | undefined;
275
+ oAuthCallbackUri?: string | undefined;
276
+ hasMissingParameters?: boolean | undefined;
277
+ hasDocumentation?: boolean | undefined;
278
+ hasOperations?: boolean | undefined;
279
+ operationsCount?: number | undefined;
280
+ hasData?: boolean | undefined;
281
+ dataCollectionsCount?: number | undefined;
282
+ hasEvents?: boolean | undefined;
283
+ eventsCount?: number | undefined;
284
+ hasGlobalWebhooks?: boolean | undefined;
285
+ hasUdm?: boolean | undefined;
286
+ appUuid?: string | undefined;
287
+ authType?: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials" | undefined;
288
+ }>>;
289
+ }, "strip", z.ZodTypeAny, {
290
+ id: string;
291
+ name: string;
292
+ createdAt: string;
293
+ updatedAt: string;
294
+ userId: string;
295
+ integrationId: string;
296
+ error?: any;
297
+ integration?: {
298
+ id: string;
299
+ name: string;
300
+ baseUri: string;
301
+ logoUri: string;
302
+ key?: string | undefined;
303
+ uuid?: string | undefined;
304
+ description?: string | undefined;
305
+ state?: import("..").WorkspaceElementState | undefined;
306
+ errors?: any[] | undefined;
307
+ revision?: string | undefined;
308
+ isDeactivated?: boolean | undefined;
309
+ createdAt?: string | undefined;
310
+ updatedAt?: string | undefined;
311
+ archivedAt?: string | undefined;
312
+ parameters?: any;
313
+ parametersSchema?: import("../..").DataSchema | undefined;
314
+ isTest?: boolean | undefined;
315
+ connectorId?: string | undefined;
316
+ connectorVersion?: string | undefined;
317
+ authOptions?: {
318
+ key: string;
319
+ type: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials";
320
+ description?: string | undefined;
321
+ title?: string | undefined;
322
+ ui?: {
323
+ schema?: any;
324
+ helpUri?: string | undefined;
325
+ } | undefined;
326
+ }[] | undefined;
327
+ oAuthCallbackUri?: string | undefined;
328
+ hasMissingParameters?: boolean | undefined;
329
+ hasDocumentation?: boolean | undefined;
330
+ hasOperations?: boolean | undefined;
331
+ operationsCount?: number | undefined;
332
+ hasData?: boolean | undefined;
333
+ dataCollectionsCount?: number | undefined;
334
+ hasEvents?: boolean | undefined;
335
+ eventsCount?: number | undefined;
336
+ hasGlobalWebhooks?: boolean | undefined;
337
+ hasUdm?: boolean | undefined;
338
+ appUuid?: string | undefined;
339
+ authType?: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials" | undefined;
340
+ } | undefined;
341
+ state?: import("..").WorkspaceElementState | undefined;
342
+ errors?: any[] | undefined;
343
+ isDeactivated?: boolean | undefined;
344
+ archivedAt?: string | undefined;
345
+ credentials?: unknown;
346
+ parameters?: unknown;
347
+ connectorParameters?: unknown;
348
+ user?: {
349
+ id: string;
350
+ name: string;
351
+ internalId: string;
352
+ createdAt?: string | undefined;
353
+ archivedAt?: string | undefined;
354
+ credentials?: any;
355
+ fields?: Record<string, any> | undefined;
356
+ isTest?: boolean | undefined;
357
+ lastActiveAt?: string | undefined;
358
+ isBillable?: boolean | undefined;
359
+ } | undefined;
360
+ isTest?: boolean | undefined;
361
+ disconnected?: boolean | undefined;
362
+ isDefunct?: boolean | undefined;
363
+ lastActiveAt?: string | undefined;
364
+ nextCredentialsRefreshAt?: string | undefined;
365
+ meta?: Record<string, any> | undefined;
366
+ }, {
367
+ id: string;
368
+ name: string;
369
+ createdAt: string;
370
+ updatedAt: string;
371
+ userId: string;
372
+ integrationId: string;
373
+ error?: any;
374
+ integration?: {
375
+ id: string;
376
+ name: string;
377
+ baseUri: string;
378
+ logoUri: string;
379
+ key?: string | undefined;
380
+ uuid?: string | undefined;
381
+ description?: string | undefined;
382
+ state?: import("..").WorkspaceElementState | undefined;
383
+ errors?: any[] | undefined;
384
+ revision?: string | undefined;
385
+ isDeactivated?: boolean | undefined;
386
+ createdAt?: string | undefined;
387
+ updatedAt?: string | undefined;
388
+ archivedAt?: string | undefined;
389
+ parameters?: any;
390
+ parametersSchema?: import("../..").DataSchema | undefined;
391
+ isTest?: boolean | undefined;
392
+ connectorId?: string | undefined;
393
+ connectorVersion?: string | undefined;
394
+ authOptions?: {
395
+ key: string;
396
+ type: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials";
397
+ description?: string | undefined;
398
+ title?: string | undefined;
399
+ ui?: {
400
+ schema?: any;
401
+ helpUri?: string | undefined;
402
+ } | undefined;
403
+ }[] | undefined;
404
+ oAuthCallbackUri?: string | undefined;
405
+ hasMissingParameters?: boolean | undefined;
406
+ hasDocumentation?: boolean | undefined;
407
+ hasOperations?: boolean | undefined;
408
+ operationsCount?: number | undefined;
409
+ hasData?: boolean | undefined;
410
+ dataCollectionsCount?: number | undefined;
411
+ hasEvents?: boolean | undefined;
412
+ eventsCount?: number | undefined;
413
+ hasGlobalWebhooks?: boolean | undefined;
414
+ hasUdm?: boolean | undefined;
415
+ appUuid?: string | undefined;
416
+ authType?: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials" | undefined;
417
+ } | undefined;
418
+ state?: import("..").WorkspaceElementState | undefined;
419
+ errors?: any[] | undefined;
420
+ isDeactivated?: boolean | undefined;
421
+ archivedAt?: string | undefined;
422
+ credentials?: unknown;
423
+ parameters?: unknown;
424
+ connectorParameters?: unknown;
425
+ user?: {
426
+ id: string;
427
+ name: string;
428
+ internalId: string;
429
+ createdAt?: string | undefined;
430
+ archivedAt?: string | undefined;
431
+ credentials?: any;
432
+ fields?: Record<string, any> | undefined;
433
+ isTest?: boolean | undefined;
434
+ lastActiveAt?: string | undefined;
435
+ isBillable?: boolean | undefined;
436
+ } | undefined;
437
+ isTest?: boolean | undefined;
438
+ disconnected?: boolean | undefined;
439
+ isDefunct?: boolean | undefined;
440
+ lastActiveAt?: string | undefined;
441
+ nextCredentialsRefreshAt?: string | undefined;
442
+ meta?: Record<string, any> | undefined;
443
+ }>;
444
+ export type ConnectionApiResponse = z.infer<typeof ConnectionApiResponse>;
445
+ export type Connection = ConnectionApiResponse;
446
+ export declare const ConnectionMessagePayload: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
447
+ source: z.ZodString;
448
+ requestId: z.ZodString;
449
+ type: z.ZodLiteral<"newConnectionCreated">;
450
+ connection: z.ZodObject<{
451
+ id: z.ZodString;
452
+ } & {
453
+ name: z.ZodString;
454
+ userId: z.ZodString;
455
+ isTest: z.ZodOptional<z.ZodBoolean>;
456
+ disconnected: z.ZodOptional<z.ZodBoolean>;
457
+ isDefunct: z.ZodOptional<z.ZodBoolean>;
458
+ error: any;
459
+ integrationId: z.ZodString;
460
+ credentials: z.ZodOptional<z.ZodUnknown>;
461
+ parameters: z.ZodOptional<z.ZodUnknown>;
462
+ connectorParameters: z.ZodOptional<z.ZodUnknown>;
463
+ createdAt: z.ZodString;
464
+ updatedAt: z.ZodString;
465
+ lastActiveAt: z.ZodOptional<z.ZodString>;
466
+ nextCredentialsRefreshAt: z.ZodOptional<z.ZodString>;
467
+ archivedAt: z.ZodOptional<z.ZodString>;
468
+ isDeactivated: z.ZodOptional<z.ZodBoolean>;
469
+ state: z.ZodOptional<z.ZodNativeEnum<typeof import("..").WorkspaceElementState>>;
470
+ errors: z.ZodOptional<z.ZodArray<any, "many">>;
471
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
472
+ } & {
473
+ user: z.ZodOptional<z.ZodObject<{
474
+ id: z.ZodString;
475
+ name: z.ZodString;
476
+ internalId: z.ZodString;
477
+ fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
478
+ credentials: z.ZodOptional<z.ZodAny>;
479
+ lastActiveAt: z.ZodOptional<z.ZodString>;
480
+ isTest: z.ZodOptional<z.ZodBoolean>;
481
+ isBillable: z.ZodOptional<z.ZodBoolean>;
482
+ createdAt: z.ZodOptional<z.ZodString>;
483
+ archivedAt: z.ZodOptional<z.ZodString>;
484
+ }, "strip", z.ZodTypeAny, {
485
+ id: string;
486
+ name: string;
487
+ internalId: string;
488
+ createdAt?: string | undefined;
489
+ archivedAt?: string | undefined;
490
+ credentials?: any;
491
+ fields?: Record<string, any> | undefined;
492
+ isTest?: boolean | undefined;
493
+ lastActiveAt?: string | undefined;
494
+ isBillable?: boolean | undefined;
495
+ }, {
496
+ id: string;
497
+ name: string;
498
+ internalId: string;
499
+ createdAt?: string | undefined;
500
+ archivedAt?: string | undefined;
501
+ credentials?: any;
502
+ fields?: Record<string, any> | undefined;
503
+ isTest?: boolean | undefined;
504
+ lastActiveAt?: string | undefined;
505
+ isBillable?: boolean | undefined;
506
+ }>>;
507
+ integration: z.ZodOptional<z.ZodObject<{
508
+ id: z.ZodString;
509
+ name: z.ZodString;
510
+ key: z.ZodOptional<z.ZodString>;
511
+ uuid: z.ZodOptional<z.ZodString>;
512
+ description: z.ZodOptional<z.ZodString>;
513
+ state: z.ZodOptional<z.ZodNativeEnum<typeof import("..").WorkspaceElementState>>;
514
+ errors: z.ZodOptional<z.ZodArray<any, "many">>;
515
+ revision: z.ZodOptional<z.ZodString>;
516
+ createdAt: z.ZodOptional<z.ZodString>;
517
+ updatedAt: z.ZodOptional<z.ZodString>;
518
+ } & {
519
+ logoUri: z.ZodString;
520
+ connectorId: z.ZodOptional<z.ZodString>;
521
+ connectorVersion: z.ZodOptional<z.ZodString>;
522
+ authOptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
523
+ key: z.ZodString;
524
+ type: z.ZodEnum<["integration-app-token", "membrane-token", "oauth2", "oauth1", "client-credentials", "proxy"]>;
525
+ title: z.ZodOptional<z.ZodString>;
526
+ description: z.ZodOptional<z.ZodString>;
527
+ ui: z.ZodOptional<z.ZodObject<{
528
+ schema: z.ZodOptional<z.ZodAny>;
529
+ helpUri: z.ZodOptional<z.ZodString>;
530
+ }, "strip", z.ZodTypeAny, {
531
+ schema?: any;
532
+ helpUri?: string | undefined;
533
+ }, {
534
+ schema?: any;
535
+ helpUri?: string | undefined;
536
+ }>>;
537
+ }, "strip", z.ZodTypeAny, {
538
+ key: string;
539
+ type: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials";
540
+ description?: string | undefined;
541
+ title?: string | undefined;
542
+ ui?: {
543
+ schema?: any;
544
+ helpUri?: string | undefined;
545
+ } | undefined;
546
+ }, {
547
+ key: string;
548
+ type: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials";
549
+ description?: string | undefined;
550
+ title?: string | undefined;
551
+ ui?: {
552
+ schema?: any;
553
+ helpUri?: string | undefined;
554
+ } | undefined;
555
+ }>, "many">>;
556
+ oAuthCallbackUri: z.ZodOptional<z.ZodString>;
557
+ parametersSchema: z.ZodOptional<z.ZodType<import("../..").DataSchema, z.ZodTypeDef, import("../..").DataSchema>>;
558
+ parameters: z.ZodOptional<z.ZodAny>;
559
+ baseUri: z.ZodString;
560
+ archivedAt: z.ZodOptional<z.ZodString>;
561
+ hasMissingParameters: z.ZodOptional<z.ZodBoolean>;
562
+ hasDocumentation: z.ZodOptional<z.ZodBoolean>;
563
+ hasOperations: z.ZodOptional<z.ZodBoolean>;
564
+ operationsCount: z.ZodOptional<z.ZodNumber>;
565
+ hasData: z.ZodOptional<z.ZodBoolean>;
566
+ dataCollectionsCount: z.ZodOptional<z.ZodNumber>;
567
+ hasEvents: z.ZodOptional<z.ZodBoolean>;
568
+ eventsCount: z.ZodOptional<z.ZodNumber>;
569
+ hasGlobalWebhooks: z.ZodOptional<z.ZodBoolean>;
570
+ hasUdm: z.ZodOptional<z.ZodBoolean>;
571
+ isTest: z.ZodOptional<z.ZodBoolean>;
572
+ appUuid: z.ZodOptional<z.ZodString>;
573
+ isDeactivated: z.ZodOptional<z.ZodBoolean>;
574
+ authType: z.ZodOptional<z.ZodEnum<["integration-app-token", "membrane-token", "oauth2", "oauth1", "client-credentials", "proxy"]>>;
575
+ }, "strip", z.ZodTypeAny, {
576
+ id: string;
577
+ name: string;
578
+ baseUri: string;
579
+ logoUri: string;
580
+ key?: string | undefined;
581
+ uuid?: string | undefined;
582
+ description?: string | undefined;
583
+ state?: import("..").WorkspaceElementState | undefined;
584
+ errors?: any[] | undefined;
585
+ revision?: string | undefined;
586
+ isDeactivated?: boolean | undefined;
587
+ createdAt?: string | undefined;
588
+ updatedAt?: string | undefined;
589
+ archivedAt?: string | undefined;
590
+ parameters?: any;
591
+ parametersSchema?: import("../..").DataSchema | undefined;
592
+ isTest?: boolean | undefined;
593
+ connectorId?: string | undefined;
594
+ connectorVersion?: string | undefined;
595
+ authOptions?: {
596
+ key: string;
597
+ type: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials";
598
+ description?: string | undefined;
599
+ title?: string | undefined;
600
+ ui?: {
601
+ schema?: any;
602
+ helpUri?: string | undefined;
603
+ } | undefined;
604
+ }[] | undefined;
605
+ oAuthCallbackUri?: string | undefined;
606
+ hasMissingParameters?: boolean | undefined;
607
+ hasDocumentation?: boolean | undefined;
608
+ hasOperations?: boolean | undefined;
609
+ operationsCount?: number | undefined;
610
+ hasData?: boolean | undefined;
611
+ dataCollectionsCount?: number | undefined;
612
+ hasEvents?: boolean | undefined;
613
+ eventsCount?: number | undefined;
614
+ hasGlobalWebhooks?: boolean | undefined;
615
+ hasUdm?: boolean | undefined;
616
+ appUuid?: string | undefined;
617
+ authType?: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials" | undefined;
618
+ }, {
619
+ id: string;
620
+ name: string;
621
+ baseUri: string;
622
+ logoUri: string;
623
+ key?: string | undefined;
624
+ uuid?: string | undefined;
625
+ description?: string | undefined;
626
+ state?: import("..").WorkspaceElementState | undefined;
627
+ errors?: any[] | undefined;
628
+ revision?: string | undefined;
629
+ isDeactivated?: boolean | undefined;
630
+ createdAt?: string | undefined;
631
+ updatedAt?: string | undefined;
632
+ archivedAt?: string | undefined;
633
+ parameters?: any;
634
+ parametersSchema?: import("../..").DataSchema | undefined;
635
+ isTest?: boolean | undefined;
636
+ connectorId?: string | undefined;
637
+ connectorVersion?: string | undefined;
638
+ authOptions?: {
639
+ key: string;
640
+ type: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials";
641
+ description?: string | undefined;
642
+ title?: string | undefined;
643
+ ui?: {
644
+ schema?: any;
645
+ helpUri?: string | undefined;
646
+ } | undefined;
647
+ }[] | undefined;
648
+ oAuthCallbackUri?: string | undefined;
649
+ hasMissingParameters?: boolean | undefined;
650
+ hasDocumentation?: boolean | undefined;
651
+ hasOperations?: boolean | undefined;
652
+ operationsCount?: number | undefined;
653
+ hasData?: boolean | undefined;
654
+ dataCollectionsCount?: number | undefined;
655
+ hasEvents?: boolean | undefined;
656
+ eventsCount?: number | undefined;
657
+ hasGlobalWebhooks?: boolean | undefined;
658
+ hasUdm?: boolean | undefined;
659
+ appUuid?: string | undefined;
660
+ authType?: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials" | undefined;
661
+ }>>;
662
+ }, "strip", z.ZodTypeAny, {
663
+ id: string;
664
+ name: string;
665
+ createdAt: string;
666
+ updatedAt: string;
667
+ userId: string;
668
+ integrationId: string;
669
+ error?: any;
670
+ integration?: {
671
+ id: string;
672
+ name: string;
673
+ baseUri: string;
674
+ logoUri: string;
675
+ key?: string | undefined;
676
+ uuid?: string | undefined;
677
+ description?: string | undefined;
678
+ state?: import("..").WorkspaceElementState | undefined;
679
+ errors?: any[] | undefined;
680
+ revision?: string | undefined;
681
+ isDeactivated?: boolean | undefined;
682
+ createdAt?: string | undefined;
683
+ updatedAt?: string | undefined;
684
+ archivedAt?: string | undefined;
685
+ parameters?: any;
686
+ parametersSchema?: import("../..").DataSchema | undefined;
687
+ isTest?: boolean | undefined;
688
+ connectorId?: string | undefined;
689
+ connectorVersion?: string | undefined;
690
+ authOptions?: {
691
+ key: string;
692
+ type: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials";
693
+ description?: string | undefined;
694
+ title?: string | undefined;
695
+ ui?: {
696
+ schema?: any;
697
+ helpUri?: string | undefined;
698
+ } | undefined;
699
+ }[] | undefined;
700
+ oAuthCallbackUri?: string | undefined;
701
+ hasMissingParameters?: boolean | undefined;
702
+ hasDocumentation?: boolean | undefined;
703
+ hasOperations?: boolean | undefined;
704
+ operationsCount?: number | undefined;
705
+ hasData?: boolean | undefined;
706
+ dataCollectionsCount?: number | undefined;
707
+ hasEvents?: boolean | undefined;
708
+ eventsCount?: number | undefined;
709
+ hasGlobalWebhooks?: boolean | undefined;
710
+ hasUdm?: boolean | undefined;
711
+ appUuid?: string | undefined;
712
+ authType?: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials" | undefined;
713
+ } | undefined;
714
+ state?: import("..").WorkspaceElementState | undefined;
715
+ errors?: any[] | undefined;
716
+ isDeactivated?: boolean | undefined;
717
+ archivedAt?: string | undefined;
718
+ credentials?: unknown;
719
+ parameters?: unknown;
720
+ connectorParameters?: unknown;
721
+ user?: {
722
+ id: string;
723
+ name: string;
724
+ internalId: string;
725
+ createdAt?: string | undefined;
726
+ archivedAt?: string | undefined;
727
+ credentials?: any;
728
+ fields?: Record<string, any> | undefined;
729
+ isTest?: boolean | undefined;
730
+ lastActiveAt?: string | undefined;
731
+ isBillable?: boolean | undefined;
732
+ } | undefined;
733
+ isTest?: boolean | undefined;
734
+ disconnected?: boolean | undefined;
735
+ isDefunct?: boolean | undefined;
736
+ lastActiveAt?: string | undefined;
737
+ nextCredentialsRefreshAt?: string | undefined;
738
+ meta?: Record<string, any> | undefined;
739
+ }, {
740
+ id: string;
741
+ name: string;
742
+ createdAt: string;
743
+ updatedAt: string;
744
+ userId: string;
745
+ integrationId: string;
746
+ error?: any;
747
+ integration?: {
748
+ id: string;
749
+ name: string;
750
+ baseUri: string;
751
+ logoUri: string;
752
+ key?: string | undefined;
753
+ uuid?: string | undefined;
754
+ description?: string | undefined;
755
+ state?: import("..").WorkspaceElementState | undefined;
756
+ errors?: any[] | undefined;
757
+ revision?: string | undefined;
758
+ isDeactivated?: boolean | undefined;
759
+ createdAt?: string | undefined;
760
+ updatedAt?: string | undefined;
761
+ archivedAt?: string | undefined;
762
+ parameters?: any;
763
+ parametersSchema?: import("../..").DataSchema | undefined;
764
+ isTest?: boolean | undefined;
765
+ connectorId?: string | undefined;
766
+ connectorVersion?: string | undefined;
767
+ authOptions?: {
768
+ key: string;
769
+ type: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials";
770
+ description?: string | undefined;
771
+ title?: string | undefined;
772
+ ui?: {
773
+ schema?: any;
774
+ helpUri?: string | undefined;
775
+ } | undefined;
776
+ }[] | undefined;
777
+ oAuthCallbackUri?: string | undefined;
778
+ hasMissingParameters?: boolean | undefined;
779
+ hasDocumentation?: boolean | undefined;
780
+ hasOperations?: boolean | undefined;
781
+ operationsCount?: number | undefined;
782
+ hasData?: boolean | undefined;
783
+ dataCollectionsCount?: number | undefined;
784
+ hasEvents?: boolean | undefined;
785
+ eventsCount?: number | undefined;
786
+ hasGlobalWebhooks?: boolean | undefined;
787
+ hasUdm?: boolean | undefined;
788
+ appUuid?: string | undefined;
789
+ authType?: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials" | undefined;
790
+ } | undefined;
791
+ state?: import("..").WorkspaceElementState | undefined;
792
+ errors?: any[] | undefined;
793
+ isDeactivated?: boolean | undefined;
794
+ archivedAt?: string | undefined;
795
+ credentials?: unknown;
796
+ parameters?: unknown;
797
+ connectorParameters?: unknown;
798
+ user?: {
799
+ id: string;
800
+ name: string;
801
+ internalId: string;
802
+ createdAt?: string | undefined;
803
+ archivedAt?: string | undefined;
804
+ credentials?: any;
805
+ fields?: Record<string, any> | undefined;
806
+ isTest?: boolean | undefined;
807
+ lastActiveAt?: string | undefined;
808
+ isBillable?: boolean | undefined;
809
+ } | undefined;
810
+ isTest?: boolean | undefined;
811
+ disconnected?: boolean | undefined;
812
+ isDefunct?: boolean | undefined;
813
+ lastActiveAt?: string | undefined;
814
+ nextCredentialsRefreshAt?: string | undefined;
815
+ meta?: Record<string, any> | undefined;
816
+ }>;
817
+ }, "strip", z.ZodTypeAny, {
818
+ connection: {
819
+ id: string;
820
+ name: string;
821
+ createdAt: string;
822
+ updatedAt: string;
823
+ userId: string;
824
+ integrationId: string;
825
+ error?: any;
826
+ integration?: {
827
+ id: string;
828
+ name: string;
829
+ baseUri: string;
830
+ logoUri: string;
831
+ key?: string | undefined;
832
+ uuid?: string | undefined;
833
+ description?: string | undefined;
834
+ state?: import("..").WorkspaceElementState | undefined;
835
+ errors?: any[] | undefined;
836
+ revision?: string | undefined;
837
+ isDeactivated?: boolean | undefined;
838
+ createdAt?: string | undefined;
839
+ updatedAt?: string | undefined;
840
+ archivedAt?: string | undefined;
841
+ parameters?: any;
842
+ parametersSchema?: import("../..").DataSchema | undefined;
843
+ isTest?: boolean | undefined;
844
+ connectorId?: string | undefined;
845
+ connectorVersion?: string | undefined;
846
+ authOptions?: {
847
+ key: string;
848
+ type: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials";
849
+ description?: string | undefined;
850
+ title?: string | undefined;
851
+ ui?: {
852
+ schema?: any;
853
+ helpUri?: string | undefined;
854
+ } | undefined;
855
+ }[] | undefined;
856
+ oAuthCallbackUri?: string | undefined;
857
+ hasMissingParameters?: boolean | undefined;
858
+ hasDocumentation?: boolean | undefined;
859
+ hasOperations?: boolean | undefined;
860
+ operationsCount?: number | undefined;
861
+ hasData?: boolean | undefined;
862
+ dataCollectionsCount?: number | undefined;
863
+ hasEvents?: boolean | undefined;
864
+ eventsCount?: number | undefined;
865
+ hasGlobalWebhooks?: boolean | undefined;
866
+ hasUdm?: boolean | undefined;
867
+ appUuid?: string | undefined;
868
+ authType?: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials" | undefined;
869
+ } | undefined;
870
+ state?: import("..").WorkspaceElementState | undefined;
871
+ errors?: any[] | undefined;
872
+ isDeactivated?: boolean | undefined;
873
+ archivedAt?: string | undefined;
874
+ credentials?: unknown;
875
+ parameters?: unknown;
876
+ connectorParameters?: unknown;
877
+ user?: {
878
+ id: string;
879
+ name: string;
880
+ internalId: string;
881
+ createdAt?: string | undefined;
882
+ archivedAt?: string | undefined;
883
+ credentials?: any;
884
+ fields?: Record<string, any> | undefined;
885
+ isTest?: boolean | undefined;
886
+ lastActiveAt?: string | undefined;
887
+ isBillable?: boolean | undefined;
888
+ } | undefined;
889
+ isTest?: boolean | undefined;
890
+ disconnected?: boolean | undefined;
891
+ isDefunct?: boolean | undefined;
892
+ lastActiveAt?: string | undefined;
893
+ nextCredentialsRefreshAt?: string | undefined;
894
+ meta?: Record<string, any> | undefined;
895
+ };
896
+ type: "newConnectionCreated";
37
897
  source: string;
38
898
  requestId: string;
39
- } & ({
40
- type: 'newConnectionCreated';
41
- connection: Connection;
42
- error?: never;
43
- errorData?: never;
44
- } | {
45
- type: 'newConnectionFailure';
46
- connection?: never;
899
+ }, {
900
+ connection: {
901
+ id: string;
902
+ name: string;
903
+ createdAt: string;
904
+ updatedAt: string;
905
+ userId: string;
906
+ integrationId: string;
907
+ error?: any;
908
+ integration?: {
909
+ id: string;
910
+ name: string;
911
+ baseUri: string;
912
+ logoUri: string;
913
+ key?: string | undefined;
914
+ uuid?: string | undefined;
915
+ description?: string | undefined;
916
+ state?: import("..").WorkspaceElementState | undefined;
917
+ errors?: any[] | undefined;
918
+ revision?: string | undefined;
919
+ isDeactivated?: boolean | undefined;
920
+ createdAt?: string | undefined;
921
+ updatedAt?: string | undefined;
922
+ archivedAt?: string | undefined;
923
+ parameters?: any;
924
+ parametersSchema?: import("../..").DataSchema | undefined;
925
+ isTest?: boolean | undefined;
926
+ connectorId?: string | undefined;
927
+ connectorVersion?: string | undefined;
928
+ authOptions?: {
929
+ key: string;
930
+ type: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials";
931
+ description?: string | undefined;
932
+ title?: string | undefined;
933
+ ui?: {
934
+ schema?: any;
935
+ helpUri?: string | undefined;
936
+ } | undefined;
937
+ }[] | undefined;
938
+ oAuthCallbackUri?: string | undefined;
939
+ hasMissingParameters?: boolean | undefined;
940
+ hasDocumentation?: boolean | undefined;
941
+ hasOperations?: boolean | undefined;
942
+ operationsCount?: number | undefined;
943
+ hasData?: boolean | undefined;
944
+ dataCollectionsCount?: number | undefined;
945
+ hasEvents?: boolean | undefined;
946
+ eventsCount?: number | undefined;
947
+ hasGlobalWebhooks?: boolean | undefined;
948
+ hasUdm?: boolean | undefined;
949
+ appUuid?: string | undefined;
950
+ authType?: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials" | undefined;
951
+ } | undefined;
952
+ state?: import("..").WorkspaceElementState | undefined;
953
+ errors?: any[] | undefined;
954
+ isDeactivated?: boolean | undefined;
955
+ archivedAt?: string | undefined;
956
+ credentials?: unknown;
957
+ parameters?: unknown;
958
+ connectorParameters?: unknown;
959
+ user?: {
960
+ id: string;
961
+ name: string;
962
+ internalId: string;
963
+ createdAt?: string | undefined;
964
+ archivedAt?: string | undefined;
965
+ credentials?: any;
966
+ fields?: Record<string, any> | undefined;
967
+ isTest?: boolean | undefined;
968
+ lastActiveAt?: string | undefined;
969
+ isBillable?: boolean | undefined;
970
+ } | undefined;
971
+ isTest?: boolean | undefined;
972
+ disconnected?: boolean | undefined;
973
+ isDefunct?: boolean | undefined;
974
+ lastActiveAt?: string | undefined;
975
+ nextCredentialsRefreshAt?: string | undefined;
976
+ meta?: Record<string, any> | undefined;
977
+ };
978
+ type: "newConnectionCreated";
979
+ source: string;
980
+ requestId: string;
981
+ }>, z.ZodObject<{
982
+ source: z.ZodString;
983
+ requestId: z.ZodString;
984
+ type: z.ZodLiteral<"newConnectionFailure">;
985
+ error: z.ZodString;
986
+ errorData: any;
987
+ }, "strip", z.ZodTypeAny, {
988
+ type: "newConnectionFailure";
47
989
  error: string;
48
- errorData?: ErrorData;
49
- });
990
+ source: string;
991
+ requestId: string;
992
+ errorData?: any;
993
+ }, {
994
+ type: "newConnectionFailure";
995
+ error: string;
996
+ source: string;
997
+ requestId: string;
998
+ errorData?: any;
999
+ }>]>;
1000
+ export type ConnectionMessagePayload = z.infer<typeof ConnectionMessagePayload>;