@membranehq/sdk 0.9.10 → 0.10.10
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.
- package/dist/bundle.d.ts +74 -31
- package/dist/bundle.js +31 -14
- package/dist/bundle.js.map +1 -1
- package/dist/dts/accessors/connections-accessors.d.ts +17 -11
- package/dist/dts/accessors/integrations-accessors.d.ts +14 -11
- package/dist/dts/agent/session.d.ts +5 -0
- package/dist/dts/alerts/index.d.ts +1 -0
- package/dist/dts/alerts/types.d.ts +107 -13
- package/dist/dts/alerts/utils.d.ts +8 -0
- package/dist/dts/config/index.d.ts +1 -0
- package/dist/dts/dto/index.d.ts +3 -0
- package/dist/dts/functions/base.d.ts +2 -2
- package/dist/dts/index.browser.d.ts +1 -0
- package/dist/dts/logging/index.d.ts +9 -0
- package/dist/dts/orgs/types.d.ts +66 -1
- package/dist/dts/platform-users.d.ts +17 -2
- package/dist/dts/usage/types.d.ts +1 -0
- package/dist/dts/webhooks/types.d.ts +4 -2
- package/dist/dts/workspace-elements/api/action-run-log-records-api.d.ts +6 -2
- package/dist/dts/workspace-elements/api/connections-api.d.ts +18 -3
- package/dist/dts/workspace-elements/api/data-link-table-instances-api.d.ts +3 -1
- package/dist/dts/workspace-elements/api/data-source-instances-api.d.ts +3 -1
- package/dist/dts/workspace-elements/api/external-event-log-records-api.d.ts +3 -1
- package/dist/dts/workspace-elements/api/external-event-pulls-api.d.ts +3 -1
- package/dist/dts/workspace-elements/api/external-event-subscriptions-api.d.ts +3 -1
- package/dist/dts/workspace-elements/api/field-mapping-instances-api.d.ts +6 -2
- package/dist/dts/workspace-elements/api/flow-runs-api.d.ts +6 -2
- package/dist/dts/workspace-elements/api/flows-api.d.ts +6 -2
- package/dist/dts/workspace-elements/api/integrations-api.d.ts +5 -1
- package/dist/dts/workspace-elements/api/packages-api.d.ts +2 -0
- package/dist/dts/workspace-elements/base/actions/index.d.ts +1 -1
- package/dist/dts/workspace-elements/base/connections/types.d.ts +3 -1
- package/dist/dts/workspace-elements/base/connectors/auth.d.ts +20 -0
- package/dist/dts/workspace-elements/base/connectors/functions.d.ts +12 -490
- package/dist/dts/workspace-elements/base/connectors/functions.test.d.ts +1 -0
- package/dist/dts/workspace-elements/base/connectors/index.d.ts +1 -0
- package/dist/dts/workspace-elements/base/connectors/types.d.ts +922 -478
- package/dist/dts/workspace-elements/base/data-collections/data-locations/collections/methods/base.d.ts +1 -2
- package/dist/dts/workspace-elements/base/packages/index.d.ts +2 -0
- package/dist/dts/workspace-elements/element-utils.d.ts +2 -0
- package/dist/dts/workspace-elements/element-utils.test.d.ts +1 -0
- package/dist/dts/workspace-elements/index.d.ts +1 -0
- package/dist/dts/workspace-elements/types.d.ts +9 -3
- package/dist/dts/workspaces/types.d.ts +39 -1
- package/dist/index.browser.d.mts +1360 -583
- package/dist/index.browser.d.ts +1360 -583
- package/dist/index.browser.js +593 -113
- package/dist/index.browser.js.map +1 -1
- package/dist/index.browser.mjs +570 -114
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.node.d.mts +1358 -580
- package/dist/index.node.d.ts +1358 -580
- package/dist/index.node.js +600 -113
- package/dist/index.node.js.map +1 -1
- package/dist/index.node.mjs +577 -114
- package/dist/index.node.mjs.map +1 -1
- package/package.json +2 -1
package/dist/bundle.d.ts
CHANGED
|
@@ -344,9 +344,11 @@ declare const ConnectorSpec: z.ZodObject<{
|
|
|
344
344
|
helpUri: z.ZodOptional<z.ZodString>;
|
|
345
345
|
test: z.ZodOptional<z.ZodBoolean>;
|
|
346
346
|
}, z.core.$strip>>;
|
|
347
|
+
inputSchema: z.ZodOptional<z.ZodType<DataSchema, unknown, z.core.$ZodTypeInternals<DataSchema, unknown>>>;
|
|
347
348
|
auth: z.ZodOptional<z.ZodIntersection<z.ZodUnion<readonly [z.ZodObject<{
|
|
348
349
|
title: z.ZodOptional<z.ZodString>;
|
|
349
350
|
description: z.ZodOptional<z.ZodString>;
|
|
351
|
+
inputSchema: z.ZodOptional<z.ZodType<DataSchema, unknown, z.core.$ZodTypeInternals<DataSchema, unknown>>>;
|
|
350
352
|
ui: z.ZodOptional<z.ZodObject<{
|
|
351
353
|
schema: z.ZodOptional<z.ZodType<DataSchema, unknown, z.core.$ZodTypeInternals<DataSchema, unknown>>>;
|
|
352
354
|
helpUri: z.ZodOptional<z.ZodString>;
|
|
@@ -619,6 +621,7 @@ declare const ConnectorSpec: z.ZodObject<{
|
|
|
619
621
|
}, z.core.$strip>, z.ZodObject<{
|
|
620
622
|
title: z.ZodOptional<z.ZodString>;
|
|
621
623
|
description: z.ZodOptional<z.ZodString>;
|
|
624
|
+
inputSchema: z.ZodOptional<z.ZodType<DataSchema, unknown, z.core.$ZodTypeInternals<DataSchema, unknown>>>;
|
|
622
625
|
ui: z.ZodOptional<z.ZodObject<{
|
|
623
626
|
schema: z.ZodOptional<z.ZodType<DataSchema, unknown, z.core.$ZodTypeInternals<DataSchema, unknown>>>;
|
|
624
627
|
helpUri: z.ZodOptional<z.ZodString>;
|
|
@@ -699,6 +702,7 @@ declare const ConnectorSpec: z.ZodObject<{
|
|
|
699
702
|
}, z.core.$strip>, z.ZodObject<{
|
|
700
703
|
title: z.ZodOptional<z.ZodString>;
|
|
701
704
|
description: z.ZodOptional<z.ZodString>;
|
|
705
|
+
inputSchema: z.ZodOptional<z.ZodType<DataSchema, unknown, z.core.$ZodTypeInternals<DataSchema, unknown>>>;
|
|
702
706
|
ui: z.ZodOptional<z.ZodObject<{
|
|
703
707
|
schema: z.ZodOptional<z.ZodType<DataSchema, unknown, z.core.$ZodTypeInternals<DataSchema, unknown>>>;
|
|
704
708
|
helpUri: z.ZodOptional<z.ZodString>;
|
|
@@ -738,6 +742,7 @@ declare const ConnectorSpec: z.ZodObject<{
|
|
|
738
742
|
}, z.core.$strip>, z.ZodObject<{
|
|
739
743
|
title: z.ZodOptional<z.ZodString>;
|
|
740
744
|
description: z.ZodOptional<z.ZodString>;
|
|
745
|
+
inputSchema: z.ZodOptional<z.ZodType<DataSchema, unknown, z.core.$ZodTypeInternals<DataSchema, unknown>>>;
|
|
741
746
|
ui: z.ZodOptional<z.ZodObject<{
|
|
742
747
|
schema: z.ZodOptional<z.ZodType<DataSchema, unknown, z.core.$ZodTypeInternals<DataSchema, unknown>>>;
|
|
743
748
|
helpUri: z.ZodOptional<z.ZodString>;
|
|
@@ -770,6 +775,7 @@ declare const ConnectorSpec: z.ZodObject<{
|
|
|
770
775
|
}, z.core.$strip>, z.ZodObject<{
|
|
771
776
|
title: z.ZodOptional<z.ZodString>;
|
|
772
777
|
description: z.ZodOptional<z.ZodString>;
|
|
778
|
+
inputSchema: z.ZodOptional<z.ZodType<DataSchema, unknown, z.core.$ZodTypeInternals<DataSchema, unknown>>>;
|
|
773
779
|
ui: z.ZodOptional<z.ZodObject<{
|
|
774
780
|
schema: z.ZodOptional<z.ZodType<DataSchema, unknown, z.core.$ZodTypeInternals<DataSchema, unknown>>>;
|
|
775
781
|
helpUri: z.ZodOptional<z.ZodString>;
|
|
@@ -802,6 +808,7 @@ declare const ConnectorSpec: z.ZodObject<{
|
|
|
802
808
|
}, z.core.$strip>, z.ZodObject<{
|
|
803
809
|
title: z.ZodOptional<z.ZodString>;
|
|
804
810
|
description: z.ZodOptional<z.ZodString>;
|
|
811
|
+
inputSchema: z.ZodOptional<z.ZodType<DataSchema, unknown, z.core.$ZodTypeInternals<DataSchema, unknown>>>;
|
|
805
812
|
ui: z.ZodOptional<z.ZodObject<{
|
|
806
813
|
schema: z.ZodOptional<z.ZodType<DataSchema, unknown, z.core.$ZodTypeInternals<DataSchema, unknown>>>;
|
|
807
814
|
helpUri: z.ZodOptional<z.ZodString>;
|
|
@@ -836,6 +843,7 @@ declare const ConnectorSpec: z.ZodObject<{
|
|
|
836
843
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
837
844
|
title: z.ZodOptional<z.ZodString>;
|
|
838
845
|
description: z.ZodOptional<z.ZodString>;
|
|
846
|
+
inputSchema: z.ZodOptional<z.ZodType<DataSchema, unknown, z.core.$ZodTypeInternals<DataSchema, unknown>>>;
|
|
839
847
|
ui: z.ZodOptional<z.ZodObject<{
|
|
840
848
|
schema: z.ZodOptional<z.ZodType<DataSchema, unknown, z.core.$ZodTypeInternals<DataSchema, unknown>>>;
|
|
841
849
|
helpUri: z.ZodOptional<z.ZodString>;
|
|
@@ -1108,6 +1116,7 @@ declare const ConnectorSpec: z.ZodObject<{
|
|
|
1108
1116
|
}, z.core.$strip>, z.ZodObject<{
|
|
1109
1117
|
title: z.ZodOptional<z.ZodString>;
|
|
1110
1118
|
description: z.ZodOptional<z.ZodString>;
|
|
1119
|
+
inputSchema: z.ZodOptional<z.ZodType<DataSchema, unknown, z.core.$ZodTypeInternals<DataSchema, unknown>>>;
|
|
1111
1120
|
ui: z.ZodOptional<z.ZodObject<{
|
|
1112
1121
|
schema: z.ZodOptional<z.ZodType<DataSchema, unknown, z.core.$ZodTypeInternals<DataSchema, unknown>>>;
|
|
1113
1122
|
helpUri: z.ZodOptional<z.ZodString>;
|
|
@@ -1188,6 +1197,7 @@ declare const ConnectorSpec: z.ZodObject<{
|
|
|
1188
1197
|
}, z.core.$strip>, z.ZodObject<{
|
|
1189
1198
|
title: z.ZodOptional<z.ZodString>;
|
|
1190
1199
|
description: z.ZodOptional<z.ZodString>;
|
|
1200
|
+
inputSchema: z.ZodOptional<z.ZodType<DataSchema, unknown, z.core.$ZodTypeInternals<DataSchema, unknown>>>;
|
|
1191
1201
|
ui: z.ZodOptional<z.ZodObject<{
|
|
1192
1202
|
schema: z.ZodOptional<z.ZodType<DataSchema, unknown, z.core.$ZodTypeInternals<DataSchema, unknown>>>;
|
|
1193
1203
|
helpUri: z.ZodOptional<z.ZodString>;
|
|
@@ -1227,6 +1237,7 @@ declare const ConnectorSpec: z.ZodObject<{
|
|
|
1227
1237
|
}, z.core.$strip>, z.ZodObject<{
|
|
1228
1238
|
title: z.ZodOptional<z.ZodString>;
|
|
1229
1239
|
description: z.ZodOptional<z.ZodString>;
|
|
1240
|
+
inputSchema: z.ZodOptional<z.ZodType<DataSchema, unknown, z.core.$ZodTypeInternals<DataSchema, unknown>>>;
|
|
1230
1241
|
ui: z.ZodOptional<z.ZodObject<{
|
|
1231
1242
|
schema: z.ZodOptional<z.ZodType<DataSchema, unknown, z.core.$ZodTypeInternals<DataSchema, unknown>>>;
|
|
1232
1243
|
helpUri: z.ZodOptional<z.ZodString>;
|
|
@@ -1259,6 +1270,7 @@ declare const ConnectorSpec: z.ZodObject<{
|
|
|
1259
1270
|
}, z.core.$strip>, z.ZodObject<{
|
|
1260
1271
|
title: z.ZodOptional<z.ZodString>;
|
|
1261
1272
|
description: z.ZodOptional<z.ZodString>;
|
|
1273
|
+
inputSchema: z.ZodOptional<z.ZodType<DataSchema, unknown, z.core.$ZodTypeInternals<DataSchema, unknown>>>;
|
|
1262
1274
|
ui: z.ZodOptional<z.ZodObject<{
|
|
1263
1275
|
schema: z.ZodOptional<z.ZodType<DataSchema, unknown, z.core.$ZodTypeInternals<DataSchema, unknown>>>;
|
|
1264
1276
|
helpUri: z.ZodOptional<z.ZodString>;
|
|
@@ -1291,6 +1303,7 @@ declare const ConnectorSpec: z.ZodObject<{
|
|
|
1291
1303
|
}, z.core.$strip>, z.ZodObject<{
|
|
1292
1304
|
title: z.ZodOptional<z.ZodString>;
|
|
1293
1305
|
description: z.ZodOptional<z.ZodString>;
|
|
1306
|
+
inputSchema: z.ZodOptional<z.ZodType<DataSchema, unknown, z.core.$ZodTypeInternals<DataSchema, unknown>>>;
|
|
1294
1307
|
ui: z.ZodOptional<z.ZodObject<{
|
|
1295
1308
|
schema: z.ZodOptional<z.ZodType<DataSchema, unknown, z.core.$ZodTypeInternals<DataSchema, unknown>>>;
|
|
1296
1309
|
helpUri: z.ZodOptional<z.ZodString>;
|
|
@@ -2084,7 +2097,9 @@ declare const DataSourceInstanceApiResponse: z.ZodObject<{
|
|
|
2084
2097
|
isDefunct: z.ZodOptional<z.ZodBoolean>;
|
|
2085
2098
|
state: z.ZodOptional<z.ZodEnum<typeof WorkspaceElementState>>;
|
|
2086
2099
|
error: z.ZodOptional<z.ZodType<ErrorDataSchema, unknown, z.core.$ZodTypeInternals<ErrorDataSchema, unknown>>>;
|
|
2087
|
-
integrationId: z.ZodString
|
|
2100
|
+
integrationId: z.ZodOptional<z.ZodString>;
|
|
2101
|
+
connectorId: z.ZodOptional<z.ZodString>;
|
|
2102
|
+
connectorVersion: z.ZodOptional<z.ZodString>;
|
|
2088
2103
|
authOptionKey: z.ZodOptional<z.ZodString>;
|
|
2089
2104
|
createdAt: z.ZodString;
|
|
2090
2105
|
updatedAt: z.ZodString;
|
|
@@ -2226,7 +2241,9 @@ declare const FlowRunApiResponse: z.ZodObject<{
|
|
|
2226
2241
|
isDefunct: z.ZodOptional<z.ZodBoolean>;
|
|
2227
2242
|
state: z.ZodOptional<z.ZodEnum<typeof WorkspaceElementState>>;
|
|
2228
2243
|
error: z.ZodOptional<z.ZodType<ErrorDataSchema, unknown, z.core.$ZodTypeInternals<ErrorDataSchema, unknown>>>;
|
|
2229
|
-
integrationId: z.ZodString
|
|
2244
|
+
integrationId: z.ZodOptional<z.ZodString>;
|
|
2245
|
+
connectorId: z.ZodOptional<z.ZodString>;
|
|
2246
|
+
connectorVersion: z.ZodOptional<z.ZodString>;
|
|
2230
2247
|
authOptionKey: z.ZodOptional<z.ZodString>;
|
|
2231
2248
|
createdAt: z.ZodString;
|
|
2232
2249
|
updatedAt: z.ZodString;
|
|
@@ -2357,7 +2374,9 @@ declare const FindFlowRunsResponse: z.ZodObject<{
|
|
|
2357
2374
|
isDefunct: z.ZodOptional<z.ZodBoolean>;
|
|
2358
2375
|
state: z.ZodOptional<z.ZodEnum<typeof WorkspaceElementState>>;
|
|
2359
2376
|
error: z.ZodOptional<z.ZodType<ErrorDataSchema, unknown, z.core.$ZodTypeInternals<ErrorDataSchema, unknown>>>;
|
|
2360
|
-
integrationId: z.ZodString
|
|
2377
|
+
integrationId: z.ZodOptional<z.ZodString>;
|
|
2378
|
+
connectorId: z.ZodOptional<z.ZodString>;
|
|
2379
|
+
connectorVersion: z.ZodOptional<z.ZodString>;
|
|
2361
2380
|
authOptionKey: z.ZodOptional<z.ZodString>;
|
|
2362
2381
|
createdAt: z.ZodString;
|
|
2363
2382
|
updatedAt: z.ZodString;
|
|
@@ -2821,7 +2840,6 @@ declare const FlowInstanceApiResponse: z.ZodObject<{
|
|
|
2821
2840
|
id: string;
|
|
2822
2841
|
name: string;
|
|
2823
2842
|
userId: string;
|
|
2824
|
-
integrationId: string;
|
|
2825
2843
|
createdAt: string;
|
|
2826
2844
|
updatedAt: string;
|
|
2827
2845
|
isTest?: boolean | undefined;
|
|
@@ -2829,6 +2847,9 @@ declare const FlowInstanceApiResponse: z.ZodObject<{
|
|
|
2829
2847
|
isDefunct?: boolean | undefined;
|
|
2830
2848
|
state?: WorkspaceElementState | undefined;
|
|
2831
2849
|
error?: ErrorDataSchema | undefined;
|
|
2850
|
+
integrationId?: string | undefined;
|
|
2851
|
+
connectorId?: string | undefined;
|
|
2852
|
+
connectorVersion?: string | undefined;
|
|
2832
2853
|
authOptionKey?: string | undefined;
|
|
2833
2854
|
lastActiveAt?: string | undefined;
|
|
2834
2855
|
nextCredentialsRefreshAt?: string | undefined;
|
|
@@ -2841,7 +2862,6 @@ declare const FlowInstanceApiResponse: z.ZodObject<{
|
|
|
2841
2862
|
id: string;
|
|
2842
2863
|
name: string;
|
|
2843
2864
|
userId: string;
|
|
2844
|
-
integrationId: string;
|
|
2845
2865
|
createdAt: string;
|
|
2846
2866
|
updatedAt: string;
|
|
2847
2867
|
isTest?: boolean | undefined;
|
|
@@ -2849,6 +2869,9 @@ declare const FlowInstanceApiResponse: z.ZodObject<{
|
|
|
2849
2869
|
isDefunct?: boolean | undefined;
|
|
2850
2870
|
state?: WorkspaceElementState | undefined;
|
|
2851
2871
|
error?: ErrorDataSchema | undefined;
|
|
2872
|
+
integrationId?: string | undefined;
|
|
2873
|
+
connectorId?: string | undefined;
|
|
2874
|
+
connectorVersion?: string | undefined;
|
|
2852
2875
|
authOptionKey?: string | undefined;
|
|
2853
2876
|
lastActiveAt?: string | undefined;
|
|
2854
2877
|
nextCredentialsRefreshAt?: string | undefined;
|
|
@@ -3463,7 +3486,9 @@ declare const IntegrationApiResponse: z.ZodObject<{
|
|
|
3463
3486
|
isDefunct: z.ZodOptional<z.ZodBoolean>;
|
|
3464
3487
|
state: z.ZodOptional<z.ZodEnum<typeof WorkspaceElementState>>;
|
|
3465
3488
|
error: z.ZodOptional<z.ZodType<ErrorDataSchema, unknown, z.core.$ZodTypeInternals<ErrorDataSchema, unknown>>>;
|
|
3466
|
-
integrationId: z.ZodString
|
|
3489
|
+
integrationId: z.ZodOptional<z.ZodString>;
|
|
3490
|
+
connectorId: z.ZodOptional<z.ZodString>;
|
|
3491
|
+
connectorVersion: z.ZodOptional<z.ZodString>;
|
|
3467
3492
|
authOptionKey: z.ZodOptional<z.ZodString>;
|
|
3468
3493
|
createdAt: z.ZodString;
|
|
3469
3494
|
updatedAt: z.ZodString;
|
|
@@ -3488,6 +3513,7 @@ declare const IntegrationApiResponse: z.ZodObject<{
|
|
|
3488
3513
|
}>;
|
|
3489
3514
|
title: z.ZodOptional<z.ZodString>;
|
|
3490
3515
|
description: z.ZodOptional<z.ZodString>;
|
|
3516
|
+
inputSchema: z.ZodOptional<z.ZodType<DataSchema, unknown, z.core.$ZodTypeInternals<DataSchema, unknown>>>;
|
|
3491
3517
|
ui: z.ZodOptional<z.ZodObject<{
|
|
3492
3518
|
schema: z.ZodOptional<z.ZodAny>;
|
|
3493
3519
|
helpUri: z.ZodOptional<z.ZodString>;
|
|
@@ -3496,7 +3522,6 @@ declare const IntegrationApiResponse: z.ZodObject<{
|
|
|
3496
3522
|
parametersSchema: z.ZodOptional<z.ZodType<DataSchema, unknown, z.core.$ZodTypeInternals<DataSchema, unknown>>>;
|
|
3497
3523
|
}, z.core.$strip>;
|
|
3498
3524
|
type IntegrationApiResponse = z.infer<typeof IntegrationApiResponse>;
|
|
3499
|
-
type Integration = IntegrationApiResponse;
|
|
3500
3525
|
|
|
3501
3526
|
declare const FindPackagesQuery: z.ZodObject<{
|
|
3502
3527
|
layer: z.ZodOptional<z.ZodEnum<{
|
|
@@ -3541,6 +3566,7 @@ declare const PackageApiResponse: z.ZodObject<{
|
|
|
3541
3566
|
key: z.ZodString;
|
|
3542
3567
|
name: z.ZodString;
|
|
3543
3568
|
isCustomized: z.ZodOptional<z.ZodBoolean>;
|
|
3569
|
+
isPublic: z.ZodOptional<z.ZodBoolean>;
|
|
3544
3570
|
elements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3545
3571
|
id: z.ZodString;
|
|
3546
3572
|
type: z.ZodEnum<typeof WorkspaceElementType>;
|
|
@@ -3578,6 +3604,7 @@ declare const PackageApiResponse: z.ZodObject<{
|
|
|
3578
3604
|
key: z.ZodString;
|
|
3579
3605
|
name: z.ZodString;
|
|
3580
3606
|
isCustomized: z.ZodOptional<z.ZodBoolean>;
|
|
3607
|
+
isPublic: z.ZodOptional<z.ZodBoolean>;
|
|
3581
3608
|
}, z.core.$strip>;
|
|
3582
3609
|
integration: z.ZodObject<{
|
|
3583
3610
|
id: z.ZodString;
|
|
@@ -4006,7 +4033,9 @@ declare const FieldMappingInstanceApiResponse: z.ZodObject<{
|
|
|
4006
4033
|
isDefunct: z.ZodOptional<z.ZodBoolean>;
|
|
4007
4034
|
state: z.ZodOptional<z.ZodEnum<typeof WorkspaceElementState>>;
|
|
4008
4035
|
error: z.ZodOptional<z.ZodType<ErrorDataSchema, unknown, z.core.$ZodTypeInternals<ErrorDataSchema, unknown>>>;
|
|
4009
|
-
integrationId: z.ZodString
|
|
4036
|
+
integrationId: z.ZodOptional<z.ZodString>;
|
|
4037
|
+
connectorId: z.ZodOptional<z.ZodString>;
|
|
4038
|
+
connectorVersion: z.ZodOptional<z.ZodString>;
|
|
4010
4039
|
authOptionKey: z.ZodOptional<z.ZodString>;
|
|
4011
4040
|
createdAt: z.ZodString;
|
|
4012
4041
|
updatedAt: z.ZodString;
|
|
@@ -4282,7 +4311,9 @@ declare const FieldMappingInstanceApiResponse: z.ZodObject<{
|
|
|
4282
4311
|
isDefunct: z.ZodOptional<z.ZodBoolean>;
|
|
4283
4312
|
state: z.ZodOptional<z.ZodEnum<typeof WorkspaceElementState>>;
|
|
4284
4313
|
error: z.ZodOptional<z.ZodType<ErrorDataSchema, unknown, z.core.$ZodTypeInternals<ErrorDataSchema, unknown>>>;
|
|
4285
|
-
integrationId: z.ZodString
|
|
4314
|
+
integrationId: z.ZodOptional<z.ZodString>;
|
|
4315
|
+
connectorId: z.ZodOptional<z.ZodString>;
|
|
4316
|
+
connectorVersion: z.ZodOptional<z.ZodString>;
|
|
4286
4317
|
authOptionKey: z.ZodOptional<z.ZodString>;
|
|
4287
4318
|
createdAt: z.ZodString;
|
|
4288
4319
|
updatedAt: z.ZodString;
|
|
@@ -4454,7 +4485,9 @@ declare const DataLinkTableInstanceApiResponse: z.ZodObject<{
|
|
|
4454
4485
|
isDefunct: z.ZodOptional<z.ZodBoolean>;
|
|
4455
4486
|
state: z.ZodOptional<z.ZodEnum<typeof WorkspaceElementState>>;
|
|
4456
4487
|
error: z.ZodOptional<z.ZodType<ErrorDataSchema, unknown, z.core.$ZodTypeInternals<ErrorDataSchema, unknown>>>;
|
|
4457
|
-
integrationId: z.ZodString
|
|
4488
|
+
integrationId: z.ZodOptional<z.ZodString>;
|
|
4489
|
+
connectorId: z.ZodOptional<z.ZodString>;
|
|
4490
|
+
connectorVersion: z.ZodOptional<z.ZodString>;
|
|
4458
4491
|
authOptionKey: z.ZodOptional<z.ZodString>;
|
|
4459
4492
|
createdAt: z.ZodString;
|
|
4460
4493
|
updatedAt: z.ZodString;
|
|
@@ -4782,7 +4815,9 @@ declare const ExternalEventSubscriptionApiResponse: z.ZodObject<{
|
|
|
4782
4815
|
isDefunct: z.ZodOptional<z.ZodBoolean>;
|
|
4783
4816
|
state: z.ZodOptional<z.ZodEnum<typeof WorkspaceElementState>>;
|
|
4784
4817
|
error: z.ZodOptional<z.ZodType<ErrorDataSchema, unknown, z.core.$ZodTypeInternals<ErrorDataSchema, unknown>>>;
|
|
4785
|
-
integrationId: z.ZodString
|
|
4818
|
+
integrationId: z.ZodOptional<z.ZodString>;
|
|
4819
|
+
connectorId: z.ZodOptional<z.ZodString>;
|
|
4820
|
+
connectorVersion: z.ZodOptional<z.ZodString>;
|
|
4786
4821
|
authOptionKey: z.ZodOptional<z.ZodString>;
|
|
4787
4822
|
createdAt: z.ZodString;
|
|
4788
4823
|
updatedAt: z.ZodString;
|
|
@@ -4844,6 +4879,7 @@ declare const FindConnectionsQuery: z.ZodObject<{
|
|
|
4844
4879
|
search: z.ZodOptional<z.ZodString>;
|
|
4845
4880
|
includeArchived: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
4846
4881
|
connectorId: z.ZodOptional<z.ZodString>;
|
|
4882
|
+
connectorVersion: z.ZodOptional<z.ZodString>;
|
|
4847
4883
|
id: z.ZodOptional<z.ZodString>;
|
|
4848
4884
|
userId: z.ZodOptional<z.ZodString>;
|
|
4849
4885
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -4882,7 +4918,9 @@ declare const ConnectionApiResponse: z.ZodObject<{
|
|
|
4882
4918
|
isDefunct: z.ZodOptional<z.ZodBoolean>;
|
|
4883
4919
|
state: z.ZodOptional<z.ZodEnum<typeof WorkspaceElementState>>;
|
|
4884
4920
|
error: z.ZodOptional<z.ZodType<ErrorDataSchema, unknown, z.core.$ZodTypeInternals<ErrorDataSchema, unknown>>>;
|
|
4885
|
-
integrationId: z.ZodString
|
|
4921
|
+
integrationId: z.ZodOptional<z.ZodString>;
|
|
4922
|
+
connectorId: z.ZodOptional<z.ZodString>;
|
|
4923
|
+
connectorVersion: z.ZodOptional<z.ZodString>;
|
|
4886
4924
|
authOptionKey: z.ZodOptional<z.ZodString>;
|
|
4887
4925
|
createdAt: z.ZodString;
|
|
4888
4926
|
updatedAt: z.ZodString;
|
|
@@ -4948,7 +4986,6 @@ declare const ConnectionApiResponse: z.ZodObject<{
|
|
|
4948
4986
|
}, z.core.$strip>>;
|
|
4949
4987
|
}, z.core.$strip>;
|
|
4950
4988
|
type ConnectionApiResponse = z.infer<typeof ConnectionApiResponse>;
|
|
4951
|
-
type Connection = ConnectionApiResponse;
|
|
4952
4989
|
|
|
4953
4990
|
declare const ActionApiResponse: z.ZodObject<{
|
|
4954
4991
|
id: z.ZodString;
|
|
@@ -5621,9 +5658,9 @@ declare class ConnectionLevelFlowsAccessor extends ConnectionLevelElementsListAc
|
|
|
5621
5658
|
constructor(client: MembraneApiClient, connectionSelector: string);
|
|
5622
5659
|
}
|
|
5623
5660
|
|
|
5624
|
-
declare class ConnectionsAccessor extends ElementInstanceListAccessor<
|
|
5661
|
+
declare class ConnectionsAccessor extends ElementInstanceListAccessor<ConnectionApiResponse, FindConnectionsQuery> {
|
|
5625
5662
|
constructor(client: MembraneApiClient);
|
|
5626
|
-
create(data: CreateConnectionRequest): Promise<
|
|
5663
|
+
create(data: CreateConnectionRequest): Promise<ConnectionApiResponse>;
|
|
5627
5664
|
}
|
|
5628
5665
|
declare class ConnectionAccessor {
|
|
5629
5666
|
client: MembraneApiClient;
|
|
@@ -5639,23 +5676,23 @@ declare class ConnectionAccessor {
|
|
|
5639
5676
|
fieldMapping(fieldMappingSelector: string, query?: InstanceKeyQuery): ConnectionLevelFieldMappingAccessor;
|
|
5640
5677
|
get(query?: {
|
|
5641
5678
|
includeSecrets?: boolean;
|
|
5642
|
-
}): Promise<
|
|
5643
|
-
patch(data: UpdateConnectionRequest): Promise<
|
|
5644
|
-
put(data: UpdateConnectionRequest): Promise<
|
|
5679
|
+
}): Promise<ConnectionApiResponse>;
|
|
5680
|
+
patch(data: UpdateConnectionRequest): Promise<ConnectionApiResponse>;
|
|
5681
|
+
put(data: UpdateConnectionRequest): Promise<ConnectionApiResponse>;
|
|
5645
5682
|
archive(): Promise<void>;
|
|
5646
5683
|
request(path: string, data?: any): Promise<any>;
|
|
5647
5684
|
get proxy(): ConnectionProxy;
|
|
5648
5685
|
operation(key: string): ConnectionOperationAccessor;
|
|
5649
5686
|
dataCollection(key: string, parameters?: Record<string, any>): ConnectionDataCollectionAccessor;
|
|
5650
|
-
reconnect({ parameters, authOptionKey, connectorParameters, }?: {
|
|
5687
|
+
reconnect({ parameters, authOptionKey, connectorParameters, onPopupClosed, }?: {
|
|
5651
5688
|
parameters?: any;
|
|
5652
5689
|
authOptionKey?: string;
|
|
5653
5690
|
connectorParameters?: any;
|
|
5691
|
+
onPopupClosed?: () => void;
|
|
5654
5692
|
}): Promise<{
|
|
5655
5693
|
id: string;
|
|
5656
5694
|
name: string;
|
|
5657
5695
|
userId: string;
|
|
5658
|
-
integrationId: string;
|
|
5659
5696
|
createdAt: string;
|
|
5660
5697
|
updatedAt: string;
|
|
5661
5698
|
isTest?: boolean | undefined;
|
|
@@ -5663,6 +5700,9 @@ declare class ConnectionAccessor {
|
|
|
5663
5700
|
isDefunct?: boolean | undefined;
|
|
5664
5701
|
state?: WorkspaceElementState | undefined;
|
|
5665
5702
|
error?: ErrorDataSchema | undefined;
|
|
5703
|
+
integrationId?: string | undefined;
|
|
5704
|
+
connectorId?: string | undefined;
|
|
5705
|
+
connectorVersion?: string | undefined;
|
|
5666
5706
|
authOptionKey?: string | undefined;
|
|
5667
5707
|
lastActiveAt?: string | undefined;
|
|
5668
5708
|
nextCredentialsRefreshAt?: string | undefined;
|
|
@@ -5717,8 +5757,8 @@ declare class ConnectionAccessor {
|
|
|
5717
5757
|
isDeactivated?: boolean | undefined;
|
|
5718
5758
|
authType?: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials" | undefined;
|
|
5719
5759
|
} | undefined;
|
|
5720
|
-
} |
|
|
5721
|
-
openReconnectUI({}?: OpenConfigurationOptions): Promise<
|
|
5760
|
+
} | null>;
|
|
5761
|
+
openReconnectUI({}?: OpenConfigurationOptions): Promise<ConnectionApiResponse | null>;
|
|
5722
5762
|
refreshCredentials(): Promise<void>;
|
|
5723
5763
|
getPath(subpath?: string, query?: Record<string, any>): string;
|
|
5724
5764
|
}
|
|
@@ -5829,10 +5869,10 @@ declare class IntegrationLevelFieldMappingsListAccessor extends IntegrationLevel
|
|
|
5829
5869
|
|
|
5830
5870
|
interface OpenIntegrationUIIntegrationConfigurationOptions extends OpenConfigurationOptions {
|
|
5831
5871
|
}
|
|
5832
|
-
declare class IntegrationsAccessor extends ElementListAccessor<
|
|
5872
|
+
declare class IntegrationsAccessor extends ElementListAccessor<IntegrationApiResponse, FindIntegrationsQuery, CreateIntegrationRequest> {
|
|
5833
5873
|
constructor(client: MembraneApiClient);
|
|
5834
5874
|
}
|
|
5835
|
-
declare class IntegrationAccessor extends ElementAccessor<
|
|
5875
|
+
declare class IntegrationAccessor extends ElementAccessor<IntegrationApiResponse, UpdateIntegrationRequest> {
|
|
5836
5876
|
private client;
|
|
5837
5877
|
private integrationSelector;
|
|
5838
5878
|
baseUri: string;
|
|
@@ -5845,16 +5885,17 @@ declare class IntegrationAccessor extends ElementAccessor<Integration, UpdateInt
|
|
|
5845
5885
|
dataSource(dataSourceSelector: string): IntegrationLevelDataSourceAccessor;
|
|
5846
5886
|
get fieldMappings(): IntegrationLevelFieldMappingsListAccessor;
|
|
5847
5887
|
fieldMapping(fieldMappingSelector: string): IntegrationLevelFieldMappingAccessor;
|
|
5848
|
-
setup(): Promise<
|
|
5888
|
+
setup(): Promise<IntegrationApiResponse>;
|
|
5849
5889
|
getConnectorSpec(): Promise<ConnectionSpec>;
|
|
5850
5890
|
open({ onClose }?: OpenIntegrationUIIntegrationConfigurationOptions): Promise<void>;
|
|
5851
|
-
openNewConnection({ allowMultipleConnections, name, connectorParameters, }?: OpenNewConnectionOptions): Promise<
|
|
5852
|
-
connect({ name, parameters, connectorParameters, authOptionKey, allowMultipleConnections, redirectUri, sameWindow, }?: {
|
|
5891
|
+
openNewConnection({ allowMultipleConnections, name, connectorParameters, }?: OpenNewConnectionOptions): Promise<ConnectionApiResponse | null>;
|
|
5892
|
+
connect({ name, parameters, connectorParameters, authOptionKey, allowMultipleConnections, redirectUri, sameWindow, onPopupClosed, }?: {
|
|
5853
5893
|
name?: string;
|
|
5854
5894
|
parameters?: any;
|
|
5855
5895
|
connectorParameters?: any;
|
|
5856
5896
|
authOptionKey?: string;
|
|
5857
5897
|
allowMultipleConnections?: boolean;
|
|
5898
|
+
onPopupClosed?: () => void;
|
|
5858
5899
|
} & ({
|
|
5859
5900
|
sameWindow: true;
|
|
5860
5901
|
redirectUri: string;
|
|
@@ -5865,7 +5906,6 @@ declare class IntegrationAccessor extends ElementAccessor<Integration, UpdateInt
|
|
|
5865
5906
|
id: string;
|
|
5866
5907
|
name: string;
|
|
5867
5908
|
userId: string;
|
|
5868
|
-
integrationId: string;
|
|
5869
5909
|
createdAt: string;
|
|
5870
5910
|
updatedAt: string;
|
|
5871
5911
|
isTest?: boolean | undefined;
|
|
@@ -5873,6 +5913,9 @@ declare class IntegrationAccessor extends ElementAccessor<Integration, UpdateInt
|
|
|
5873
5913
|
isDefunct?: boolean | undefined;
|
|
5874
5914
|
state?: WorkspaceElementState | undefined;
|
|
5875
5915
|
error?: ErrorDataSchema | undefined;
|
|
5916
|
+
integrationId?: string | undefined;
|
|
5917
|
+
connectorId?: string | undefined;
|
|
5918
|
+
connectorVersion?: string | undefined;
|
|
5876
5919
|
authOptionKey?: string | undefined;
|
|
5877
5920
|
lastActiveAt?: string | undefined;
|
|
5878
5921
|
nextCredentialsRefreshAt?: string | undefined;
|
|
@@ -5927,11 +5970,11 @@ declare class IntegrationAccessor extends ElementAccessor<Integration, UpdateInt
|
|
|
5927
5970
|
isDeactivated?: boolean | undefined;
|
|
5928
5971
|
authType?: "proxy" | "integration-app-token" | "membrane-token" | "oauth2" | "oauth1" | "client-credentials" | undefined;
|
|
5929
5972
|
} | undefined;
|
|
5930
|
-
} |
|
|
5931
|
-
createConnection({ parameters, name }: {
|
|
5973
|
+
} | null>;
|
|
5974
|
+
createConnection({ parameters, name, }: {
|
|
5932
5975
|
parameters?: any;
|
|
5933
5976
|
name?: string;
|
|
5934
|
-
}): Promise<
|
|
5977
|
+
}): Promise<ConnectionApiResponse | null>;
|
|
5935
5978
|
getOperations(): Promise<OperationListItem[]>;
|
|
5936
5979
|
getOperation(key: string): Promise<OperationSpec>;
|
|
5937
5980
|
getDataCollections(): Promise<DataCollectionListItem[]>;
|
package/dist/bundle.js
CHANGED
|
@@ -20048,6 +20048,7 @@
|
|
|
20048
20048
|
WorkspaceEventType["FlowRunCompleted"] = "flowRun.completed";
|
|
20049
20049
|
WorkspaceEventType["FlowRunFailed"] = "flowRun.failed";
|
|
20050
20050
|
WorkspaceEventType["FlowRunStopped"] = "flowRun.stopped";
|
|
20051
|
+
WorkspaceEventType["AlertCreated"] = "alert.created";
|
|
20051
20052
|
})(WorkspaceEventType || (WorkspaceEventType = {}));
|
|
20052
20053
|
var WorkspaceElementState;
|
|
20053
20054
|
(function (WorkspaceElementState) {
|
|
@@ -20098,8 +20099,9 @@
|
|
|
20098
20099
|
parentUuid: string$1().optional(),
|
|
20099
20100
|
isCustomized: boolean$1().optional(),
|
|
20100
20101
|
});
|
|
20102
|
+
const MembraneElementLayer = _enum(['universal', 'integration', 'connection']);
|
|
20101
20103
|
const IntegrationLevelMembraneInterfaceSelectorQuery = object({
|
|
20102
|
-
layer:
|
|
20104
|
+
layer: MembraneElementLayer.optional(),
|
|
20103
20105
|
integrationKey: string$1().optional(),
|
|
20104
20106
|
integrationId: string$1().optional(),
|
|
20105
20107
|
connectionId: string$1().optional(),
|
|
@@ -20119,8 +20121,7 @@
|
|
|
20119
20121
|
});
|
|
20120
20122
|
object({
|
|
20121
20123
|
elementType: _enum(WorkspaceElementType),
|
|
20122
|
-
|
|
20123
|
-
name: string$1(),
|
|
20124
|
+
element: any(),
|
|
20124
20125
|
});
|
|
20125
20126
|
|
|
20126
20127
|
const MAX_POLLING_ERRORS = 10;
|
|
@@ -20393,7 +20394,7 @@
|
|
|
20393
20394
|
dataCollection(key, parameters) {
|
|
20394
20395
|
return new ConnectionDataCollectionAccessor(this.client, this, key, parameters);
|
|
20395
20396
|
}
|
|
20396
|
-
async reconnect({ parameters, authOptionKey, connectorParameters, } = {}) {
|
|
20397
|
+
async reconnect({ parameters, authOptionKey, connectorParameters, onPopupClosed, } = {}) {
|
|
20397
20398
|
const connection = await this.get();
|
|
20398
20399
|
const connectorSpec = await this.client.get(`/integrations/${connection.integrationId}/connector-spec`);
|
|
20399
20400
|
return createOrUpdateConnection({
|
|
@@ -20404,6 +20405,7 @@
|
|
|
20404
20405
|
connectorParameters,
|
|
20405
20406
|
apiUri: this.client.apiUri,
|
|
20406
20407
|
token: await this.client.getToken(),
|
|
20408
|
+
onPopupClosed,
|
|
20407
20409
|
});
|
|
20408
20410
|
}
|
|
20409
20411
|
async openReconnectUI({} = {}) {
|
|
@@ -20492,21 +20494,31 @@
|
|
|
20492
20494
|
}
|
|
20493
20495
|
}
|
|
20494
20496
|
async function createOrUpdateConnection(options) {
|
|
20495
|
-
const { connectionId, integrationId, name, parameters, connectorParameters, allowMultipleConnections, authOptionKey, connectorSpec, apiUri, token, redirectUri, } = options !== null && options !== void 0 ? options : {};
|
|
20497
|
+
const { connectionId, integrationId, connectorId, connectorVersion, name, parameters, connectorParameters, allowMultipleConnections, authOptionKey, connectorSpec, apiUri, token, redirectUri, onPopupClosed, } = options !== null && options !== void 0 ? options : {};
|
|
20496
20498
|
const connectionType = getConnectionType({
|
|
20497
20499
|
connectorSpec,
|
|
20498
20500
|
authOptionKey,
|
|
20499
20501
|
redirectUri,
|
|
20500
20502
|
});
|
|
20501
|
-
|
|
20502
|
-
|
|
20503
|
-
|
|
20503
|
+
let popupPath;
|
|
20504
|
+
if (connectionId) {
|
|
20505
|
+
popupPath = `connection-popup?connectionId=${connectionId}`;
|
|
20506
|
+
}
|
|
20507
|
+
else if (connectorId) {
|
|
20508
|
+
const versionParam = connectorVersion ? `&connectorVersion=${connectorVersion}` : '';
|
|
20509
|
+
popupPath = `connection-popup?connectorId=${connectorId}${versionParam}`;
|
|
20510
|
+
}
|
|
20511
|
+
else {
|
|
20512
|
+
popupPath = `connection-popup?integrationId=${integrationId}`;
|
|
20513
|
+
}
|
|
20504
20514
|
return new Promise((resolve, reject) => {
|
|
20505
20515
|
const requestId = simpleUniqueId() + simpleUniqueId();
|
|
20506
20516
|
const payload = {
|
|
20507
20517
|
token,
|
|
20508
20518
|
connectionParameters: parameters,
|
|
20509
20519
|
connectorParameters,
|
|
20520
|
+
connectorId,
|
|
20521
|
+
connectorVersion,
|
|
20510
20522
|
name,
|
|
20511
20523
|
authOptionKey,
|
|
20512
20524
|
allowMultipleConnections,
|
|
@@ -20552,10 +20564,10 @@
|
|
|
20552
20564
|
iframeElement.id = targetElementId;
|
|
20553
20565
|
iframeElement.name = targetElementId;
|
|
20554
20566
|
iframeElement.style.position = 'absolute';
|
|
20555
|
-
iframeElement.style.top = '-
|
|
20556
|
-
iframeElement.style.left = '-
|
|
20557
|
-
iframeElement.style.width = '
|
|
20558
|
-
iframeElement.style.height = '
|
|
20567
|
+
iframeElement.style.top = '-100px';
|
|
20568
|
+
iframeElement.style.left = '-100px';
|
|
20569
|
+
iframeElement.style.width = '1px';
|
|
20570
|
+
iframeElement.style.height = '1px';
|
|
20559
20571
|
iframeElement.style.border = 'none';
|
|
20560
20572
|
iframeElement.style.backgroundColor = 'transparent';
|
|
20561
20573
|
document.body.appendChild(iframeElement);
|
|
@@ -20589,6 +20601,7 @@
|
|
|
20589
20601
|
cancelCheckInterval = setInterval(() => {
|
|
20590
20602
|
if (popup === null || popup === void 0 ? void 0 : popup.closed) {
|
|
20591
20603
|
cleanup();
|
|
20604
|
+
onPopupClosed === null || onPopupClosed === void 0 ? void 0 : onPopupClosed();
|
|
20592
20605
|
resolve(null);
|
|
20593
20606
|
}
|
|
20594
20607
|
}, 1000);
|
|
@@ -20620,6 +20633,9 @@
|
|
|
20620
20633
|
}
|
|
20621
20634
|
if (message.type == 'newConnectionFailure') {
|
|
20622
20635
|
const error = new MembraneError((_a = message.errorData) !== null && _a !== void 0 ? _a : message.error);
|
|
20636
|
+
if (message.connectionId) {
|
|
20637
|
+
error.data.data = { ...error.data.data, connectionId: message.connectionId };
|
|
20638
|
+
}
|
|
20623
20639
|
onReject(error);
|
|
20624
20640
|
}
|
|
20625
20641
|
onFinally();
|
|
@@ -20799,7 +20815,7 @@
|
|
|
20799
20815
|
});
|
|
20800
20816
|
});
|
|
20801
20817
|
}
|
|
20802
|
-
async connect({ name, parameters, connectorParameters, authOptionKey, allowMultipleConnections, redirectUri, sameWindow, } = {}) {
|
|
20818
|
+
async connect({ name, parameters, connectorParameters, authOptionKey, allowMultipleConnections, redirectUri, sameWindow, onPopupClosed, } = {}) {
|
|
20803
20819
|
const integration = await this.get();
|
|
20804
20820
|
const connectorSpec = await this.getConnectorSpec();
|
|
20805
20821
|
return createOrUpdateConnection({
|
|
@@ -20813,9 +20829,10 @@
|
|
|
20813
20829
|
apiUri: this.client.apiUri,
|
|
20814
20830
|
token: await this.client.getToken(),
|
|
20815
20831
|
redirectUri: sameWindow ? redirectUri : undefined,
|
|
20832
|
+
onPopupClosed,
|
|
20816
20833
|
});
|
|
20817
20834
|
}
|
|
20818
|
-
async createConnection({ parameters, name }) {
|
|
20835
|
+
async createConnection({ parameters, name, }) {
|
|
20819
20836
|
return this.connect({ parameters, name });
|
|
20820
20837
|
}
|
|
20821
20838
|
async getOperations() {
|