@membranehq/sdk 0.4.0 → 0.5.0

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 (62) hide show
  1. package/dist/bundle.d.ts +8370 -1268
  2. package/dist/bundle.js +2216 -2085
  3. package/dist/bundle.js.map +1 -1
  4. package/dist/dts/accessors/connections-accessors.d.ts +57 -1
  5. package/dist/dts/accessors/integrations-accessors.d.ts +57 -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/types.d.ts +4 -3
  9. package/dist/dts/entity-repository.d.ts +87 -20
  10. package/dist/dts/formulas/dataSchemaRef.d.ts +2 -2
  11. package/dist/dts/http-requests.d.ts +20 -6
  12. package/dist/dts/iframe.d.ts +12 -4
  13. package/dist/dts/index.d.ts +2 -1
  14. package/dist/dts/sse/index.d.ts +1 -0
  15. package/dist/dts/sse/workspace-elements.d.ts +9 -0
  16. package/dist/dts/workspace-elements/api/actions-api.d.ts +702 -40
  17. package/dist/dts/workspace-elements/api/connections-api.d.ts +702 -41
  18. package/dist/dts/workspace-elements/api/customers-api.d.ts +56 -13
  19. package/dist/dts/workspace-elements/api/data-sources-api.d.ts +834 -77
  20. package/dist/dts/workspace-elements/api/external-events-api.d.ts +440 -6
  21. package/dist/dts/workspace-elements/api/field-mappings-api.d.ts +586 -6
  22. package/dist/dts/workspace-elements/api/flow-runs-api.d.ts +1 -1
  23. package/dist/dts/workspace-elements/api/flows-api.d.ts +2417 -50
  24. package/dist/dts/workspace-elements/api/integrations-api.d.ts +253 -24
  25. package/dist/dts/workspace-elements/api/scenarios-api.d.ts +397 -34
  26. package/dist/dts/workspace-elements/api/screens-api.d.ts +2 -2
  27. package/dist/dts/workspace-elements/base/action-instances/types.d.ts +61 -14
  28. package/dist/dts/workspace-elements/base/action-run-log-records/types.d.ts +30 -7
  29. package/dist/dts/workspace-elements/base/actions/types.d.ts +60 -17
  30. package/dist/dts/workspace-elements/base/app-data-schema-instances/types.d.ts +42 -7
  31. package/dist/dts/workspace-elements/base/app-data-schemas/types.d.ts +35 -7
  32. package/dist/dts/workspace-elements/base/app-event-subscriptions/types.d.ts +78 -9
  33. package/dist/dts/workspace-elements/base/app-event-types/types.d.ts +70 -7
  34. package/dist/dts/workspace-elements/base/connections/types.d.ts +76 -20
  35. package/dist/dts/workspace-elements/base/connectors/types.d.ts +14 -2
  36. package/dist/dts/workspace-elements/base/customers/index.d.ts +26 -6
  37. package/dist/dts/workspace-elements/base/data-collections/schemas.d.ts +75 -74
  38. package/dist/dts/workspace-elements/base/data-link-table-instances/types.d.ts +61 -11
  39. package/dist/dts/workspace-elements/base/data-link-tables/types.d.ts +26 -4
  40. package/dist/dts/workspace-elements/base/data-source-instances/types.d.ts +1030 -19
  41. package/dist/dts/workspace-elements/base/data-sources/types.d.ts +89 -22
  42. package/dist/dts/workspace-elements/base/external-event-log-records/types.d.ts +31 -8
  43. package/dist/dts/workspace-elements/base/external-event-pulls/types.d.ts +35 -8
  44. package/dist/dts/workspace-elements/base/external-event-subscriptions/types.d.ts +199 -23
  45. package/dist/dts/workspace-elements/base/external-events/types.d.ts +145 -5
  46. package/dist/dts/workspace-elements/base/field-mapping-instances/types.d.ts +74 -16
  47. package/dist/dts/workspace-elements/base/field-mappings/types.d.ts +91 -14
  48. package/dist/dts/workspace-elements/base/flow-instances/schemas.d.ts +39 -39
  49. package/dist/dts/workspace-elements/base/flow-instances/types.d.ts +155 -24
  50. package/dist/dts/workspace-elements/base/flow-runs/flow-node-runs.d.ts +20 -20
  51. package/dist/dts/workspace-elements/base/flow-runs/types.d.ts +114 -19
  52. package/dist/dts/workspace-elements/base/flows/types.d.ts +220 -26
  53. package/dist/dts/workspace-elements/base/integrations/types.d.ts +497 -24
  54. package/dist/dts/workspace-elements/base/scenarios/types.d.ts +723 -23
  55. package/dist/dts/workspace-elements/base/screens/types.d.ts +40 -6
  56. package/dist/index.d.ts +12141 -2138
  57. package/dist/index.js +1555 -522
  58. package/dist/index.js.map +1 -1
  59. package/dist/index.module.d.mts +12141 -2138
  60. package/dist/index.module.mjs +1414 -490
  61. package/dist/index.module.mjs.map +1 -1
  62. package/package.json +1 -1
@@ -1,49 +1,710 @@
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.ZodBoolean>;
6
+ integrationKey: z.ZodOptional<z.ZodString>;
7
+ integrationId: z.ZodOptional<z.ZodString>;
8
+ includeArchived: z.ZodOptional<z.ZodBoolean>;
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?: boolean | undefined;
22
+ limit?: number | undefined;
23
+ cursor?: string | undefined;
24
+ userId?: string | undefined;
25
+ integrationId?: string | undefined;
26
+ integrationKey?: string | undefined;
27
+ isTest?: boolean | undefined;
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
- }
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 Connection: z.ZodObject<{
78
+ id: z.ZodString;
79
+ } & {
80
+ name: z.ZodString;
81
+ userId: z.ZodString;
82
+ disconnected: z.ZodOptional<z.ZodBoolean>;
83
+ error: any;
84
+ integrationId: z.ZodString;
85
+ credentials: z.ZodOptional<z.ZodUnknown>;
86
+ parameters: z.ZodOptional<z.ZodUnknown>;
87
+ connectorParameters: z.ZodOptional<z.ZodUnknown>;
88
+ accessToken: z.ZodOptional<z.ZodString>;
89
+ refreshToken: z.ZodOptional<z.ZodString>;
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
+ state: z.ZodOptional<z.ZodNativeEnum<typeof import("..").WorkspaceElementState>>;
96
+ errors: z.ZodOptional<z.ZodArray<any, "many">>;
97
+ } & {
98
+ user: z.ZodOptional<z.ZodObject<{
99
+ id: z.ZodString;
100
+ name: z.ZodString;
101
+ internalId: z.ZodString;
102
+ fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
103
+ credentials: z.ZodOptional<z.ZodAny>;
104
+ lastActiveAt: z.ZodOptional<z.ZodString>;
105
+ isTest: z.ZodOptional<z.ZodBoolean>;
106
+ isBillable: z.ZodOptional<z.ZodBoolean>;
107
+ }, "strip", z.ZodTypeAny, {
108
+ id: string;
109
+ name: string;
110
+ internalId: string;
111
+ credentials?: any;
112
+ fields?: Record<string, any> | undefined;
113
+ lastActiveAt?: string | undefined;
114
+ isTest?: boolean | undefined;
115
+ isBillable?: boolean | undefined;
116
+ }, {
117
+ id: string;
118
+ name: string;
119
+ internalId: string;
120
+ credentials?: any;
121
+ fields?: Record<string, any> | undefined;
122
+ lastActiveAt?: string | undefined;
123
+ isTest?: boolean | undefined;
124
+ isBillable?: boolean | undefined;
125
+ }>>;
126
+ integration: z.ZodOptional<z.ZodObject<{
127
+ id: z.ZodString;
128
+ name: z.ZodString;
129
+ } & {
130
+ key: z.ZodString;
131
+ state: z.ZodOptional<z.ZodNativeEnum<typeof import("..").WorkspaceElementState>>;
132
+ errors: z.ZodOptional<z.ZodArray<any, "many">>;
133
+ } & {
134
+ logoUri: z.ZodString;
135
+ connectorId: z.ZodOptional<z.ZodString>;
136
+ connectorVersion: z.ZodOptional<z.ZodString>;
137
+ authOptions: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
138
+ oAuthCallbackUri: z.ZodOptional<z.ZodString>;
139
+ parametersSchema: z.ZodOptional<z.ZodType<import("../..").DataSchema, z.ZodTypeDef, import("../..").DataSchema>>;
140
+ parameters: z.ZodOptional<z.ZodAny>;
141
+ baseUri: z.ZodString;
142
+ archivedAt: z.ZodOptional<z.ZodString>;
143
+ hasMissingParameters: z.ZodOptional<z.ZodBoolean>;
144
+ hasDocumentation: z.ZodOptional<z.ZodBoolean>;
145
+ hasOperations: z.ZodOptional<z.ZodBoolean>;
146
+ hasData: z.ZodOptional<z.ZodBoolean>;
147
+ hasEvents: z.ZodOptional<z.ZodBoolean>;
148
+ hasGlobalWebhooks: z.ZodOptional<z.ZodBoolean>;
149
+ hasUdm: z.ZodOptional<z.ZodBoolean>;
150
+ isTest: z.ZodOptional<z.ZodBoolean>;
151
+ appUuid: z.ZodOptional<z.ZodString>;
152
+ isDeactivated: z.ZodOptional<z.ZodBoolean>;
153
+ authType: z.ZodOptional<z.ZodEnum<["integration-app-token", "membrane-token", "oauth2", "oauth1", "client-credentials", "proxy"]>>;
154
+ }, "strip", z.ZodTypeAny, {
155
+ key: string;
156
+ id: string;
157
+ name: string;
158
+ baseUri: string;
159
+ logoUri: string;
160
+ state?: import("..").WorkspaceElementState | undefined;
161
+ errors?: any[] | undefined;
162
+ parameters?: any;
163
+ parametersSchema?: import("../..").DataSchema | undefined;
164
+ archivedAt?: string | undefined;
165
+ isTest?: boolean | undefined;
166
+ connectorId?: string | undefined;
167
+ connectorVersion?: string | undefined;
168
+ authOptions?: any[] | undefined;
169
+ oAuthCallbackUri?: string | undefined;
170
+ hasMissingParameters?: boolean | undefined;
171
+ hasDocumentation?: boolean | undefined;
172
+ hasOperations?: boolean | undefined;
173
+ hasData?: boolean | undefined;
174
+ hasEvents?: boolean | undefined;
175
+ hasGlobalWebhooks?: boolean | undefined;
176
+ hasUdm?: boolean | undefined;
177
+ appUuid?: string | undefined;
178
+ isDeactivated?: boolean | undefined;
179
+ authType?: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials" | undefined;
180
+ }, {
181
+ key: string;
182
+ id: string;
183
+ name: string;
184
+ baseUri: string;
185
+ logoUri: string;
186
+ state?: import("..").WorkspaceElementState | undefined;
187
+ errors?: any[] | undefined;
188
+ parameters?: any;
189
+ parametersSchema?: import("../..").DataSchema | undefined;
190
+ archivedAt?: string | undefined;
191
+ isTest?: boolean | undefined;
192
+ connectorId?: string | undefined;
193
+ connectorVersion?: string | undefined;
194
+ authOptions?: any[] | undefined;
195
+ oAuthCallbackUri?: string | undefined;
196
+ hasMissingParameters?: boolean | undefined;
197
+ hasDocumentation?: boolean | undefined;
198
+ hasOperations?: boolean | undefined;
199
+ hasData?: boolean | undefined;
200
+ hasEvents?: boolean | undefined;
201
+ hasGlobalWebhooks?: boolean | undefined;
202
+ hasUdm?: boolean | undefined;
203
+ appUuid?: string | undefined;
204
+ isDeactivated?: boolean | undefined;
205
+ authType?: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials" | undefined;
206
+ }>>;
207
+ }, "strip", z.ZodTypeAny, {
208
+ id: string;
209
+ name: string;
210
+ userId: string;
211
+ integrationId: string;
212
+ createdAt: string;
213
+ updatedAt: string;
214
+ error?: any;
215
+ integration?: {
216
+ key: string;
217
+ id: string;
218
+ name: string;
219
+ baseUri: string;
220
+ logoUri: string;
221
+ state?: import("..").WorkspaceElementState | undefined;
222
+ errors?: any[] | undefined;
223
+ parameters?: any;
224
+ parametersSchema?: import("../..").DataSchema | undefined;
225
+ archivedAt?: string | undefined;
226
+ isTest?: boolean | undefined;
227
+ connectorId?: string | undefined;
228
+ connectorVersion?: string | undefined;
229
+ authOptions?: any[] | undefined;
230
+ oAuthCallbackUri?: string | undefined;
231
+ hasMissingParameters?: boolean | undefined;
232
+ hasDocumentation?: boolean | undefined;
233
+ hasOperations?: boolean | undefined;
234
+ hasData?: boolean | undefined;
235
+ hasEvents?: boolean | undefined;
236
+ hasGlobalWebhooks?: boolean | undefined;
237
+ hasUdm?: boolean | undefined;
238
+ appUuid?: string | undefined;
239
+ isDeactivated?: boolean | undefined;
240
+ authType?: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials" | undefined;
241
+ } | undefined;
242
+ state?: import("..").WorkspaceElementState | undefined;
243
+ errors?: any[] | undefined;
244
+ accessToken?: string | undefined;
245
+ credentials?: unknown;
246
+ parameters?: unknown;
247
+ connectorParameters?: unknown;
248
+ user?: {
249
+ id: string;
250
+ name: string;
251
+ internalId: string;
252
+ credentials?: any;
253
+ fields?: Record<string, any> | undefined;
254
+ lastActiveAt?: string | undefined;
255
+ isTest?: boolean | undefined;
256
+ isBillable?: boolean | undefined;
257
+ } | undefined;
258
+ disconnected?: boolean | undefined;
259
+ refreshToken?: string | undefined;
260
+ lastActiveAt?: string | undefined;
261
+ nextCredentialsRefreshAt?: string | undefined;
262
+ archivedAt?: string | undefined;
263
+ }, {
264
+ id: string;
265
+ name: string;
266
+ userId: string;
267
+ integrationId: string;
268
+ createdAt: string;
269
+ updatedAt: string;
270
+ error?: any;
271
+ integration?: {
272
+ key: string;
273
+ id: string;
274
+ name: string;
275
+ baseUri: string;
276
+ logoUri: string;
277
+ state?: import("..").WorkspaceElementState | undefined;
278
+ errors?: any[] | undefined;
279
+ parameters?: any;
280
+ parametersSchema?: import("../..").DataSchema | undefined;
281
+ archivedAt?: string | undefined;
282
+ isTest?: boolean | undefined;
283
+ connectorId?: string | undefined;
284
+ connectorVersion?: string | undefined;
285
+ authOptions?: any[] | undefined;
286
+ oAuthCallbackUri?: string | undefined;
287
+ hasMissingParameters?: boolean | undefined;
288
+ hasDocumentation?: boolean | undefined;
289
+ hasOperations?: boolean | undefined;
290
+ hasData?: boolean | undefined;
291
+ hasEvents?: boolean | undefined;
292
+ hasGlobalWebhooks?: boolean | undefined;
293
+ hasUdm?: boolean | undefined;
294
+ appUuid?: string | undefined;
295
+ isDeactivated?: boolean | undefined;
296
+ authType?: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials" | undefined;
297
+ } | undefined;
298
+ state?: import("..").WorkspaceElementState | undefined;
299
+ errors?: any[] | undefined;
300
+ accessToken?: string | undefined;
301
+ credentials?: unknown;
302
+ parameters?: unknown;
303
+ connectorParameters?: unknown;
304
+ user?: {
305
+ id: string;
306
+ name: string;
307
+ internalId: string;
308
+ credentials?: any;
309
+ fields?: Record<string, any> | undefined;
310
+ lastActiveAt?: string | undefined;
311
+ isTest?: boolean | undefined;
312
+ isBillable?: boolean | undefined;
313
+ } | undefined;
314
+ disconnected?: boolean | undefined;
315
+ refreshToken?: string | undefined;
316
+ lastActiveAt?: string | undefined;
317
+ nextCredentialsRefreshAt?: string | undefined;
318
+ archivedAt?: string | undefined;
319
+ }>;
320
+ export type Connection = z.infer<typeof Connection>;
35
321
  export type ConnectionApiResponse = Connection;
36
- export type ConnectionMessagePayload = {
322
+ export declare const ConnectionMessagePayload: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
323
+ source: z.ZodString;
324
+ requestId: z.ZodString;
325
+ type: z.ZodLiteral<"newConnectionCreated">;
326
+ connection: z.ZodObject<{
327
+ id: z.ZodString;
328
+ } & {
329
+ name: z.ZodString;
330
+ userId: z.ZodString;
331
+ disconnected: z.ZodOptional<z.ZodBoolean>;
332
+ error: any;
333
+ integrationId: z.ZodString;
334
+ credentials: z.ZodOptional<z.ZodUnknown>;
335
+ parameters: z.ZodOptional<z.ZodUnknown>;
336
+ connectorParameters: z.ZodOptional<z.ZodUnknown>;
337
+ accessToken: z.ZodOptional<z.ZodString>;
338
+ refreshToken: z.ZodOptional<z.ZodString>;
339
+ createdAt: z.ZodString;
340
+ updatedAt: z.ZodString;
341
+ lastActiveAt: z.ZodOptional<z.ZodString>;
342
+ nextCredentialsRefreshAt: z.ZodOptional<z.ZodString>;
343
+ archivedAt: z.ZodOptional<z.ZodString>;
344
+ state: z.ZodOptional<z.ZodNativeEnum<typeof import("..").WorkspaceElementState>>;
345
+ errors: z.ZodOptional<z.ZodArray<any, "many">>;
346
+ } & {
347
+ user: z.ZodOptional<z.ZodObject<{
348
+ id: z.ZodString;
349
+ name: z.ZodString;
350
+ internalId: z.ZodString;
351
+ fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
352
+ credentials: z.ZodOptional<z.ZodAny>;
353
+ lastActiveAt: z.ZodOptional<z.ZodString>;
354
+ isTest: z.ZodOptional<z.ZodBoolean>;
355
+ isBillable: z.ZodOptional<z.ZodBoolean>;
356
+ }, "strip", z.ZodTypeAny, {
357
+ id: string;
358
+ name: string;
359
+ internalId: string;
360
+ credentials?: any;
361
+ fields?: Record<string, any> | undefined;
362
+ lastActiveAt?: string | undefined;
363
+ isTest?: boolean | undefined;
364
+ isBillable?: boolean | undefined;
365
+ }, {
366
+ id: string;
367
+ name: string;
368
+ internalId: string;
369
+ credentials?: any;
370
+ fields?: Record<string, any> | undefined;
371
+ lastActiveAt?: string | undefined;
372
+ isTest?: boolean | undefined;
373
+ isBillable?: boolean | undefined;
374
+ }>>;
375
+ integration: z.ZodOptional<z.ZodObject<{
376
+ id: z.ZodString;
377
+ name: z.ZodString;
378
+ } & {
379
+ key: z.ZodString;
380
+ state: z.ZodOptional<z.ZodNativeEnum<typeof import("..").WorkspaceElementState>>;
381
+ errors: z.ZodOptional<z.ZodArray<any, "many">>;
382
+ } & {
383
+ logoUri: z.ZodString;
384
+ connectorId: z.ZodOptional<z.ZodString>;
385
+ connectorVersion: z.ZodOptional<z.ZodString>;
386
+ authOptions: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
387
+ oAuthCallbackUri: z.ZodOptional<z.ZodString>;
388
+ parametersSchema: z.ZodOptional<z.ZodType<import("../..").DataSchema, z.ZodTypeDef, import("../..").DataSchema>>;
389
+ parameters: z.ZodOptional<z.ZodAny>;
390
+ baseUri: z.ZodString;
391
+ archivedAt: z.ZodOptional<z.ZodString>;
392
+ hasMissingParameters: z.ZodOptional<z.ZodBoolean>;
393
+ hasDocumentation: z.ZodOptional<z.ZodBoolean>;
394
+ hasOperations: z.ZodOptional<z.ZodBoolean>;
395
+ hasData: z.ZodOptional<z.ZodBoolean>;
396
+ hasEvents: z.ZodOptional<z.ZodBoolean>;
397
+ hasGlobalWebhooks: z.ZodOptional<z.ZodBoolean>;
398
+ hasUdm: z.ZodOptional<z.ZodBoolean>;
399
+ isTest: z.ZodOptional<z.ZodBoolean>;
400
+ appUuid: z.ZodOptional<z.ZodString>;
401
+ isDeactivated: z.ZodOptional<z.ZodBoolean>;
402
+ authType: z.ZodOptional<z.ZodEnum<["integration-app-token", "membrane-token", "oauth2", "oauth1", "client-credentials", "proxy"]>>;
403
+ }, "strip", z.ZodTypeAny, {
404
+ key: string;
405
+ id: string;
406
+ name: string;
407
+ baseUri: string;
408
+ logoUri: string;
409
+ state?: import("..").WorkspaceElementState | undefined;
410
+ errors?: any[] | undefined;
411
+ parameters?: any;
412
+ parametersSchema?: import("../..").DataSchema | undefined;
413
+ archivedAt?: string | undefined;
414
+ isTest?: boolean | undefined;
415
+ connectorId?: string | undefined;
416
+ connectorVersion?: string | undefined;
417
+ authOptions?: any[] | undefined;
418
+ oAuthCallbackUri?: string | undefined;
419
+ hasMissingParameters?: boolean | undefined;
420
+ hasDocumentation?: boolean | undefined;
421
+ hasOperations?: boolean | undefined;
422
+ hasData?: boolean | undefined;
423
+ hasEvents?: boolean | undefined;
424
+ hasGlobalWebhooks?: boolean | undefined;
425
+ hasUdm?: boolean | undefined;
426
+ appUuid?: string | undefined;
427
+ isDeactivated?: boolean | undefined;
428
+ authType?: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials" | undefined;
429
+ }, {
430
+ key: string;
431
+ id: string;
432
+ name: string;
433
+ baseUri: string;
434
+ logoUri: string;
435
+ state?: import("..").WorkspaceElementState | undefined;
436
+ errors?: any[] | undefined;
437
+ parameters?: any;
438
+ parametersSchema?: import("../..").DataSchema | undefined;
439
+ archivedAt?: string | undefined;
440
+ isTest?: boolean | undefined;
441
+ connectorId?: string | undefined;
442
+ connectorVersion?: string | undefined;
443
+ authOptions?: any[] | undefined;
444
+ oAuthCallbackUri?: string | undefined;
445
+ hasMissingParameters?: boolean | undefined;
446
+ hasDocumentation?: boolean | undefined;
447
+ hasOperations?: boolean | undefined;
448
+ hasData?: boolean | undefined;
449
+ hasEvents?: boolean | undefined;
450
+ hasGlobalWebhooks?: boolean | undefined;
451
+ hasUdm?: boolean | undefined;
452
+ appUuid?: string | undefined;
453
+ isDeactivated?: boolean | undefined;
454
+ authType?: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials" | undefined;
455
+ }>>;
456
+ }, "strip", z.ZodTypeAny, {
457
+ id: string;
458
+ name: string;
459
+ userId: string;
460
+ integrationId: string;
461
+ createdAt: string;
462
+ updatedAt: string;
463
+ error?: any;
464
+ integration?: {
465
+ key: string;
466
+ id: string;
467
+ name: string;
468
+ baseUri: string;
469
+ logoUri: string;
470
+ state?: import("..").WorkspaceElementState | undefined;
471
+ errors?: any[] | undefined;
472
+ parameters?: any;
473
+ parametersSchema?: import("../..").DataSchema | undefined;
474
+ archivedAt?: string | undefined;
475
+ isTest?: boolean | undefined;
476
+ connectorId?: string | undefined;
477
+ connectorVersion?: string | undefined;
478
+ authOptions?: any[] | undefined;
479
+ oAuthCallbackUri?: string | undefined;
480
+ hasMissingParameters?: boolean | undefined;
481
+ hasDocumentation?: boolean | undefined;
482
+ hasOperations?: boolean | undefined;
483
+ hasData?: boolean | undefined;
484
+ hasEvents?: boolean | undefined;
485
+ hasGlobalWebhooks?: boolean | undefined;
486
+ hasUdm?: boolean | undefined;
487
+ appUuid?: string | undefined;
488
+ isDeactivated?: boolean | undefined;
489
+ authType?: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials" | undefined;
490
+ } | undefined;
491
+ state?: import("..").WorkspaceElementState | undefined;
492
+ errors?: any[] | undefined;
493
+ accessToken?: string | undefined;
494
+ credentials?: unknown;
495
+ parameters?: unknown;
496
+ connectorParameters?: unknown;
497
+ user?: {
498
+ id: string;
499
+ name: string;
500
+ internalId: string;
501
+ credentials?: any;
502
+ fields?: Record<string, any> | undefined;
503
+ lastActiveAt?: string | undefined;
504
+ isTest?: boolean | undefined;
505
+ isBillable?: boolean | undefined;
506
+ } | undefined;
507
+ disconnected?: boolean | undefined;
508
+ refreshToken?: string | undefined;
509
+ lastActiveAt?: string | undefined;
510
+ nextCredentialsRefreshAt?: string | undefined;
511
+ archivedAt?: string | undefined;
512
+ }, {
513
+ id: string;
514
+ name: string;
515
+ userId: string;
516
+ integrationId: string;
517
+ createdAt: string;
518
+ updatedAt: string;
519
+ error?: any;
520
+ integration?: {
521
+ key: string;
522
+ id: string;
523
+ name: string;
524
+ baseUri: string;
525
+ logoUri: string;
526
+ state?: import("..").WorkspaceElementState | undefined;
527
+ errors?: any[] | undefined;
528
+ parameters?: any;
529
+ parametersSchema?: import("../..").DataSchema | undefined;
530
+ archivedAt?: string | undefined;
531
+ isTest?: boolean | undefined;
532
+ connectorId?: string | undefined;
533
+ connectorVersion?: string | undefined;
534
+ authOptions?: any[] | undefined;
535
+ oAuthCallbackUri?: string | undefined;
536
+ hasMissingParameters?: boolean | undefined;
537
+ hasDocumentation?: boolean | undefined;
538
+ hasOperations?: boolean | undefined;
539
+ hasData?: boolean | undefined;
540
+ hasEvents?: boolean | undefined;
541
+ hasGlobalWebhooks?: boolean | undefined;
542
+ hasUdm?: boolean | undefined;
543
+ appUuid?: string | undefined;
544
+ isDeactivated?: boolean | undefined;
545
+ authType?: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials" | undefined;
546
+ } | undefined;
547
+ state?: import("..").WorkspaceElementState | undefined;
548
+ errors?: any[] | undefined;
549
+ accessToken?: string | undefined;
550
+ credentials?: unknown;
551
+ parameters?: unknown;
552
+ connectorParameters?: unknown;
553
+ user?: {
554
+ id: string;
555
+ name: string;
556
+ internalId: string;
557
+ credentials?: any;
558
+ fields?: Record<string, any> | undefined;
559
+ lastActiveAt?: string | undefined;
560
+ isTest?: boolean | undefined;
561
+ isBillable?: boolean | undefined;
562
+ } | undefined;
563
+ disconnected?: boolean | undefined;
564
+ refreshToken?: string | undefined;
565
+ lastActiveAt?: string | undefined;
566
+ nextCredentialsRefreshAt?: string | undefined;
567
+ archivedAt?: string | undefined;
568
+ }>;
569
+ }, "strip", z.ZodTypeAny, {
570
+ connection: {
571
+ id: string;
572
+ name: string;
573
+ userId: string;
574
+ integrationId: string;
575
+ createdAt: string;
576
+ updatedAt: string;
577
+ error?: any;
578
+ integration?: {
579
+ key: string;
580
+ id: string;
581
+ name: string;
582
+ baseUri: string;
583
+ logoUri: string;
584
+ state?: import("..").WorkspaceElementState | undefined;
585
+ errors?: any[] | undefined;
586
+ parameters?: any;
587
+ parametersSchema?: import("../..").DataSchema | undefined;
588
+ archivedAt?: string | undefined;
589
+ isTest?: boolean | undefined;
590
+ connectorId?: string | undefined;
591
+ connectorVersion?: string | undefined;
592
+ authOptions?: any[] | undefined;
593
+ oAuthCallbackUri?: string | undefined;
594
+ hasMissingParameters?: boolean | undefined;
595
+ hasDocumentation?: boolean | undefined;
596
+ hasOperations?: boolean | undefined;
597
+ hasData?: boolean | undefined;
598
+ hasEvents?: boolean | undefined;
599
+ hasGlobalWebhooks?: boolean | undefined;
600
+ hasUdm?: boolean | undefined;
601
+ appUuid?: string | undefined;
602
+ isDeactivated?: boolean | undefined;
603
+ authType?: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials" | undefined;
604
+ } | undefined;
605
+ state?: import("..").WorkspaceElementState | undefined;
606
+ errors?: any[] | undefined;
607
+ accessToken?: string | undefined;
608
+ credentials?: unknown;
609
+ parameters?: unknown;
610
+ connectorParameters?: unknown;
611
+ user?: {
612
+ id: string;
613
+ name: string;
614
+ internalId: string;
615
+ credentials?: any;
616
+ fields?: Record<string, any> | undefined;
617
+ lastActiveAt?: string | undefined;
618
+ isTest?: boolean | undefined;
619
+ isBillable?: boolean | undefined;
620
+ } | undefined;
621
+ disconnected?: boolean | undefined;
622
+ refreshToken?: string | undefined;
623
+ lastActiveAt?: string | undefined;
624
+ nextCredentialsRefreshAt?: string | undefined;
625
+ archivedAt?: string | undefined;
626
+ };
627
+ type: "newConnectionCreated";
37
628
  source: string;
38
629
  requestId: string;
39
- } & ({
40
- type: 'newConnectionCreated';
41
- connection: Connection;
42
- error?: never;
43
- errorData?: never;
44
- } | {
45
- type: 'newConnectionFailure';
46
- connection?: never;
630
+ }, {
631
+ connection: {
632
+ id: string;
633
+ name: string;
634
+ userId: string;
635
+ integrationId: string;
636
+ createdAt: string;
637
+ updatedAt: string;
638
+ error?: any;
639
+ integration?: {
640
+ key: string;
641
+ id: string;
642
+ name: string;
643
+ baseUri: string;
644
+ logoUri: string;
645
+ state?: import("..").WorkspaceElementState | undefined;
646
+ errors?: any[] | undefined;
647
+ parameters?: any;
648
+ parametersSchema?: import("../..").DataSchema | undefined;
649
+ archivedAt?: string | undefined;
650
+ isTest?: boolean | undefined;
651
+ connectorId?: string | undefined;
652
+ connectorVersion?: string | undefined;
653
+ authOptions?: any[] | undefined;
654
+ oAuthCallbackUri?: string | undefined;
655
+ hasMissingParameters?: boolean | undefined;
656
+ hasDocumentation?: boolean | undefined;
657
+ hasOperations?: boolean | undefined;
658
+ hasData?: boolean | undefined;
659
+ hasEvents?: boolean | undefined;
660
+ hasGlobalWebhooks?: boolean | undefined;
661
+ hasUdm?: boolean | undefined;
662
+ appUuid?: string | undefined;
663
+ isDeactivated?: boolean | undefined;
664
+ authType?: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials" | undefined;
665
+ } | undefined;
666
+ state?: import("..").WorkspaceElementState | undefined;
667
+ errors?: any[] | undefined;
668
+ accessToken?: string | undefined;
669
+ credentials?: unknown;
670
+ parameters?: unknown;
671
+ connectorParameters?: unknown;
672
+ user?: {
673
+ id: string;
674
+ name: string;
675
+ internalId: string;
676
+ credentials?: any;
677
+ fields?: Record<string, any> | undefined;
678
+ lastActiveAt?: string | undefined;
679
+ isTest?: boolean | undefined;
680
+ isBillable?: boolean | undefined;
681
+ } | undefined;
682
+ disconnected?: boolean | undefined;
683
+ refreshToken?: string | undefined;
684
+ lastActiveAt?: string | undefined;
685
+ nextCredentialsRefreshAt?: string | undefined;
686
+ archivedAt?: string | undefined;
687
+ };
688
+ type: "newConnectionCreated";
689
+ source: string;
690
+ requestId: string;
691
+ }>, z.ZodObject<{
692
+ source: z.ZodString;
693
+ requestId: z.ZodString;
694
+ type: z.ZodLiteral<"newConnectionFailure">;
695
+ error: z.ZodString;
696
+ errorData: any;
697
+ }, "strip", z.ZodTypeAny, {
698
+ type: "newConnectionFailure";
47
699
  error: string;
48
- errorData?: ErrorData;
49
- });
700
+ source: string;
701
+ requestId: string;
702
+ errorData?: any;
703
+ }, {
704
+ type: "newConnectionFailure";
705
+ error: string;
706
+ source: string;
707
+ requestId: string;
708
+ errorData?: any;
709
+ }>]>;
710
+ export type ConnectionMessagePayload = z.infer<typeof ConnectionMessagePayload>;