@membranehq/sdk 0.7.4 → 0.8.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.
- package/dist/bundle.d.ts +2066 -13953
- package/dist/bundle.js +3912 -4250
- package/dist/bundle.js.map +1 -1
- package/dist/dts/accessors/actions-accessors.d.ts +0 -1
- package/dist/dts/accessors/connections-accessors.d.ts +28 -28
- package/dist/dts/accessors/data-sources-accessors.d.ts +0 -1
- package/dist/dts/accessors/field-mappings-accessors.d.ts +0 -1
- package/dist/dts/accessors/flows-accessors.d.ts +0 -1
- package/dist/dts/accessors/integrations-accessors.d.ts +28 -28
- package/dist/dts/config/index.d.ts +1 -11
- package/dist/dts/date-time/business-day.d.ts +2 -0
- package/dist/dts/date-time/business-day.test.d.ts +1 -0
- package/dist/dts/date-time/index.d.ts +1 -0
- package/dist/dts/entity-repository.d.ts +13 -64
- package/dist/dts/http-requests.d.ts +2 -14
- package/dist/dts/iframe.d.ts +4 -12
- package/dist/dts/scenario-templates/index.d.ts +60 -484
- package/dist/dts/workspace-elements/api/action-instances-api.d.ts +17 -248
- package/dist/dts/workspace-elements/api/action-run-log-records-api.d.ts +23 -339
- package/dist/dts/workspace-elements/api/actions-api.d.ts +52 -639
- package/dist/dts/workspace-elements/api/app-data-schema-instances-api.d.ts +8 -169
- package/dist/dts/workspace-elements/api/app-data-schemas-api.d.ts +19 -51
- package/dist/dts/workspace-elements/api/app-event-log-records-api.d.ts +15 -325
- package/dist/dts/workspace-elements/api/app-event-subscriptions-api.d.ts +13 -248
- package/dist/dts/workspace-elements/api/app-event-types-api.d.ts +28 -90
- package/dist/dts/workspace-elements/api/connections-api.d.ts +56 -892
- package/dist/dts/workspace-elements/api/customers-api.d.ts +8 -68
- package/dist/dts/workspace-elements/api/data-link-table-instances-api.d.ts +21 -369
- package/dist/dts/workspace-elements/api/data-link-tables-api.d.ts +17 -45
- package/dist/dts/workspace-elements/api/data-source-instances-api.d.ts +79 -1341
- package/dist/dts/workspace-elements/api/data-sources-api.d.ts +52 -767
- package/dist/dts/workspace-elements/api/external-event-log-records-api.d.ts +29 -502
- package/dist/dts/workspace-elements/api/external-event-pulls-api.d.ts +29 -506
- package/dist/dts/workspace-elements/api/external-event-subscriptions-api.d.ts +21 -381
- package/dist/dts/workspace-elements/api/external-events-api.d.ts +20 -425
- package/dist/dts/workspace-elements/api/field-mapping-instances-api.d.ts +109 -2321
- package/dist/dts/workspace-elements/api/field-mappings-api.d.ts +47 -702
- package/dist/dts/workspace-elements/api/flow-runs-api.d.ts +66 -1229
- package/dist/dts/workspace-elements/api/flows-api.d.ts +149 -1836
- package/dist/dts/workspace-elements/api/integrations-api.d.ts +45 -287
- package/dist/dts/workspace-elements/api/scenarios-api.d.ts +30 -450
- package/dist/dts/workspace-elements/api/screens-api.d.ts +11 -31
- package/dist/dts/workspace-elements/base/action-instances/types.d.ts +6 -60
- package/dist/dts/workspace-elements/base/action-run-log-records/types.d.ts +3 -28
- package/dist/dts/workspace-elements/base/actions/index.d.ts +10 -82
- package/dist/dts/workspace-elements/base/app-data-schema-instances/types.d.ts +4 -47
- package/dist/dts/workspace-elements/base/app-data-schemas/types.d.ts +3 -36
- package/dist/dts/workspace-elements/base/app-event-subscriptions/types.d.ts +6 -75
- package/dist/dts/workspace-elements/base/app-event-types/types.d.ts +6 -69
- package/dist/dts/workspace-elements/base/connections/types.d.ts +11 -56
- package/dist/dts/workspace-elements/base/connectors/types.d.ts +1 -11
- package/dist/dts/workspace-elements/base/customers/index.d.ts +1 -25
- package/dist/dts/workspace-elements/base/data-collections/schemas.d.ts +141 -1471
- package/dist/dts/workspace-elements/base/data-collections/types.d.ts +1 -29
- package/dist/dts/workspace-elements/base/data-link-table-instances/types.d.ts +6 -61
- package/dist/dts/workspace-elements/base/data-link-tables/types.d.ts +3 -32
- package/dist/dts/workspace-elements/base/data-source-instances/types.d.ts +60 -973
- package/dist/dts/workspace-elements/base/data-sources/index.d.ts +8 -104
- package/dist/dts/workspace-elements/base/external-event-log-records/types.d.ts +4 -26
- package/dist/dts/workspace-elements/base/external-event-pulls/types.d.ts +4 -30
- package/dist/dts/workspace-elements/base/external-event-subscriptions/types.d.ts +9 -161
- package/dist/dts/workspace-elements/base/external-events/types.d.ts +7 -121
- package/dist/dts/workspace-elements/base/field-mapping-instances/types.d.ts +9 -76
- package/dist/dts/workspace-elements/base/field-mappings/index.d.ts +13 -133
- package/dist/dts/workspace-elements/base/flow-instances/schemas.d.ts +16 -194
- package/dist/dts/workspace-elements/base/flow-instances/types.d.ts +15 -132
- package/dist/dts/workspace-elements/base/flow-runs/flow-node-runs.d.ts +29 -284
- package/dist/dts/workspace-elements/base/flow-runs/types.d.ts +13 -93
- package/dist/dts/workspace-elements/base/flows/index.d.ts +20 -240
- package/dist/dts/workspace-elements/base/flows/nodes/base.d.ts +7 -56
- package/dist/dts/workspace-elements/base/integrations/types.d.ts +23 -539
- package/dist/dts/workspace-elements/base/scenarios/index.d.ts +11 -119
- package/dist/dts/workspace-elements/base/screens/types.d.ts +6 -31
- package/dist/dts/workspace-elements/types.d.ts +15 -153
- package/dist/dts/workspace-elements-catalog/index.d.ts +2 -0
- package/dist/index.browser.d.mts +5929 -24802
- package/dist/index.browser.d.ts +5929 -24802
- package/dist/index.browser.js +351 -335
- package/dist/index.browser.js.map +1 -1
- package/dist/index.browser.mjs +349 -333
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.node.d.mts +5959 -24842
- package/dist/index.node.d.ts +5959 -24842
- package/dist/index.node.js +351 -335
- package/dist/index.node.js.map +1 -1
- package/dist/index.node.mjs +349 -333
- package/dist/index.node.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.node.js
CHANGED
|
@@ -7,9 +7,9 @@ var jsonata = require('jsonata');
|
|
|
7
7
|
var deepEqual = require('fast-deep-equal');
|
|
8
8
|
var structuredClonePolyfill = require('@ungap/structured-clone');
|
|
9
9
|
var urljoin = require('url-join');
|
|
10
|
-
var
|
|
11
|
-
var v3 = require('zod-validation-error/v3');
|
|
10
|
+
var v4 = require('zod-validation-error/v4');
|
|
12
11
|
var qs = require('qs');
|
|
12
|
+
var penpal = require('penpal');
|
|
13
13
|
var axiosOriginal = require('axios');
|
|
14
14
|
var fs = require('fs');
|
|
15
15
|
var path = require('path');
|
|
@@ -70,7 +70,7 @@ exports.ConcurrencyErrorKey = void 0;
|
|
|
70
70
|
ConcurrencyErrorKey["LOCK_TIMEOUT"] = "lock_timeout";
|
|
71
71
|
})(exports.ConcurrencyErrorKey || (exports.ConcurrencyErrorKey = {}));
|
|
72
72
|
const ErrorDataSchema = zod.z.lazy(() => zod.z.object({
|
|
73
|
-
type: zod.z.
|
|
73
|
+
type: zod.z.enum(exports.ErrorType).optional(),
|
|
74
74
|
key: zod.z.string().optional(),
|
|
75
75
|
message: zod.z.string(),
|
|
76
76
|
data: zod.z.any().optional(),
|
|
@@ -1343,7 +1343,7 @@ const DataSchema = zod.z.lazy(() => zod.z
|
|
|
1343
1343
|
description: zod.z.string().optional(),
|
|
1344
1344
|
type: zod.z.union([zod.z.string(), zod.z.array(zod.z.string())]).optional(),
|
|
1345
1345
|
format: zod.z.string().optional(),
|
|
1346
|
-
properties: zod.z.record(DataSchema).optional(),
|
|
1346
|
+
properties: zod.z.record(zod.z.string(), DataSchema).optional(),
|
|
1347
1347
|
items: DataSchema.optional(),
|
|
1348
1348
|
additionalProperties: zod.z.union([zod.z.boolean(), DataSchema]).optional(),
|
|
1349
1349
|
enum: zod.z.array(zod.z.string()).optional(),
|
|
@@ -1351,7 +1351,7 @@ const DataSchema = zod.z.lazy(() => zod.z
|
|
|
1351
1351
|
referenceCollection: zod.z
|
|
1352
1352
|
.object({
|
|
1353
1353
|
key: zod.z.any().optional(),
|
|
1354
|
-
parameters: zod.z.record(zod.z.any()).optional(),
|
|
1354
|
+
parameters: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
1355
1355
|
})
|
|
1356
1356
|
.optional(),
|
|
1357
1357
|
referenceUdm: zod.z.string().optional(),
|
|
@@ -3464,7 +3464,7 @@ const BaseMembraneInterfaceEditableProperties = zod.z.object({
|
|
|
3464
3464
|
});
|
|
3465
3465
|
const BaseMembraneInterfaceReadOnlyProperties = zod.z.object({
|
|
3466
3466
|
name: zod.z.string(),
|
|
3467
|
-
state: zod.z.
|
|
3467
|
+
state: zod.z.enum(exports.WorkspaceElementState).optional(),
|
|
3468
3468
|
errors: zod.z.array(ErrorDataSchema).optional(),
|
|
3469
3469
|
revision: zod.z.string().optional(),
|
|
3470
3470
|
createdAt: zod.z.string().optional(),
|
|
@@ -3525,7 +3525,7 @@ const FieldMappingEditableProperties = BaseIntegrationLevelMembraneInterfaceEdit
|
|
|
3525
3525
|
dataSourceKey: zod.z.string().optional(),
|
|
3526
3526
|
dataSourceId: zod.z.string().optional(),
|
|
3527
3527
|
appSchema: DataSchema.optional(),
|
|
3528
|
-
direction: zod.z.
|
|
3528
|
+
direction: zod.z.enum(exports.FieldMappingDirection).optional(),
|
|
3529
3529
|
defaultImportValue: zod.z.any().optional(),
|
|
3530
3530
|
defaultExportValue: zod.z.any().optional(),
|
|
3531
3531
|
importValue: zod.z.any().optional(),
|
|
@@ -3651,7 +3651,7 @@ const ActionEditableProperties = BaseIntegrationLevelMembraneInterfaceEditablePr
|
|
|
3651
3651
|
integrationId: zod.z.string().optional(),
|
|
3652
3652
|
parentId: zod.z.string().optional(),
|
|
3653
3653
|
inputSchema: DataSchema.optional(),
|
|
3654
|
-
type: zod.z.
|
|
3654
|
+
type: zod.z.enum(exports.ActionType).optional(),
|
|
3655
3655
|
config: zod.z.any().optional(),
|
|
3656
3656
|
outputMapping: zod.z.any().optional(),
|
|
3657
3657
|
customOutputSchema: DataSchema.optional(),
|
|
@@ -3662,9 +3662,9 @@ const BaseAction = BaseMembraneInterface.merge(ActionEditableProperties).merge(A
|
|
|
3662
3662
|
const ConnectionRequest = zod.z.object({
|
|
3663
3663
|
path: zod.z.any(),
|
|
3664
3664
|
method: zod.z.enum(['GET', 'POST', 'PUT', 'PATCH', 'DELETE']).optional(),
|
|
3665
|
-
pathParameters: zod.z.record(zod.z.string()).optional(),
|
|
3666
|
-
headers: zod.z.record(zod.z.string()).optional(),
|
|
3667
|
-
query: zod.z.record(zod.z.string()).optional(),
|
|
3665
|
+
pathParameters: zod.z.record(zod.z.string(), zod.z.string()).optional(),
|
|
3666
|
+
headers: zod.z.record(zod.z.string(), zod.z.string()).optional(),
|
|
3667
|
+
query: zod.z.record(zod.z.string(), zod.z.string()).optional(),
|
|
3668
3668
|
data: zod.z.any().optional(),
|
|
3669
3669
|
});
|
|
3670
3670
|
const BaseConnection = BaseWorkspaceElement.extend({
|
|
@@ -3673,7 +3673,7 @@ const BaseConnection = BaseWorkspaceElement.extend({
|
|
|
3673
3673
|
isTest: zod.z.boolean().optional(),
|
|
3674
3674
|
disconnected: zod.z.boolean().optional(),
|
|
3675
3675
|
isDefunct: zod.z.boolean().optional(),
|
|
3676
|
-
state: zod.z.
|
|
3676
|
+
state: zod.z.enum(exports.WorkspaceElementState).optional(),
|
|
3677
3677
|
error: ErrorDataSchema.optional(),
|
|
3678
3678
|
integrationId: zod.z.string(),
|
|
3679
3679
|
authOptionKey: zod.z.string().optional(),
|
|
@@ -3683,7 +3683,7 @@ const BaseConnection = BaseWorkspaceElement.extend({
|
|
|
3683
3683
|
nextCredentialsRefreshAt: zod.z.string().optional(),
|
|
3684
3684
|
archivedAt: zod.z.string().optional(),
|
|
3685
3685
|
isDeactivated: zod.z.boolean().optional(),
|
|
3686
|
-
meta: zod.z.record(zod.z.any()).optional(),
|
|
3686
|
+
meta: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
3687
3687
|
});
|
|
3688
3688
|
class ConnectionSpec {
|
|
3689
3689
|
constructor(opts) {
|
|
@@ -4020,10 +4020,10 @@ const DataRecordSchema = zod.z.object({
|
|
|
4020
4020
|
name: zod.z.string().optional(),
|
|
4021
4021
|
uri: zod.z.string().optional(),
|
|
4022
4022
|
iconUri: zod.z.string().optional(),
|
|
4023
|
-
fields: zod.z.record(zod.z.any()).optional(),
|
|
4023
|
+
fields: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
4024
4024
|
udm: zod.z.string().optional(),
|
|
4025
|
-
unifiedFields: zod.z.record(zod.z.any()).optional(),
|
|
4026
|
-
rawFields: zod.z.record(zod.z.any()).optional(),
|
|
4025
|
+
unifiedFields: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
4026
|
+
rawFields: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
4027
4027
|
createdTime: zod.z.string().optional(),
|
|
4028
4028
|
updatedTime: zod.z.string().optional(),
|
|
4029
4029
|
deletedTime: zod.z.string().optional(),
|
|
@@ -8208,10 +8208,10 @@ const DataCollectionEventsSpec = zod.z
|
|
|
8208
8208
|
.catchall(DataCollectionEventTypeSpec);
|
|
8209
8209
|
const DataCollectionUdmSpec = zod.z.object({
|
|
8210
8210
|
fields: zod.z.array(zod.z.string()).optional(),
|
|
8211
|
-
extract: zod.z.record(zod.z.any()).optional(),
|
|
8212
|
-
parse: zod.z.record(zod.z.any()).optional(),
|
|
8211
|
+
extract: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
8212
|
+
parse: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
8213
8213
|
});
|
|
8214
|
-
const DataCollectionUdmsSpec = zod.z.record(DataCollectionUdmSpec);
|
|
8214
|
+
const DataCollectionUdmsSpec = zod.z.record(zod.z.string(), DataCollectionUdmSpec);
|
|
8215
8215
|
const DataCollectionSpec = zod.z.object({
|
|
8216
8216
|
type: zod.z.literal('collection'),
|
|
8217
8217
|
key: zod.z.string().optional(),
|
|
@@ -8231,7 +8231,7 @@ const DataCollectionSpec = zod.z.object({
|
|
|
8231
8231
|
find: DataCollectionFindSpec.optional(),
|
|
8232
8232
|
});
|
|
8233
8233
|
const DataCollectionMethodRequest = zod.z.object({
|
|
8234
|
-
parameters: zod.z.record(zod.z.any()).optional(),
|
|
8234
|
+
parameters: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
8235
8235
|
});
|
|
8236
8236
|
const DataCollectionFindRequest = zod.z.object({
|
|
8237
8237
|
query: zod.z.any().optional(),
|
|
@@ -8247,8 +8247,8 @@ const DataCollectionListRequest = DataCollectionMethodRequest.extend({
|
|
|
8247
8247
|
cursor: zod.z.string().optional(),
|
|
8248
8248
|
});
|
|
8249
8249
|
const DataCollectionListResponseDrilldown = zod.z.object({
|
|
8250
|
-
parameters: zod.z.record(zod.z.any()).optional(),
|
|
8251
|
-
filter: zod.z.record(zod.z.any()).optional(),
|
|
8250
|
+
parameters: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
8251
|
+
filter: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
8252
8252
|
});
|
|
8253
8253
|
const DataCollectionListResponse = zod.z.object({
|
|
8254
8254
|
records: zod.z.array(DataRecordSchema),
|
|
@@ -8271,20 +8271,20 @@ const DataCollectionFindByIdResponse = zod.z.object({
|
|
|
8271
8271
|
record: DataRecordSchema,
|
|
8272
8272
|
});
|
|
8273
8273
|
const DataCollectionMatchRequest = DataCollectionMethodRequest.extend({
|
|
8274
|
-
query: zod.z.record(zod.z.any()),
|
|
8274
|
+
query: zod.z.record(zod.z.string(), zod.z.any()),
|
|
8275
8275
|
});
|
|
8276
8276
|
const DataCollectionMatchResponse = zod.z.object({
|
|
8277
8277
|
record: DataRecordSchema.optional(),
|
|
8278
8278
|
});
|
|
8279
8279
|
const DataCollectionCreateRequest = DataCollectionMethodRequest.extend({
|
|
8280
|
-
fields: zod.z.record(zod.z.any()),
|
|
8280
|
+
fields: zod.z.record(zod.z.string(), zod.z.any()),
|
|
8281
8281
|
});
|
|
8282
8282
|
const DataCollectionCreateResponse = zod.z.object({
|
|
8283
8283
|
id: zod.z.string(),
|
|
8284
8284
|
});
|
|
8285
8285
|
const DataCollectionUpdateRequest = DataCollectionMethodRequest.extend({
|
|
8286
8286
|
id: zod.z.string(),
|
|
8287
|
-
fields: zod.z.record(zod.z.any()),
|
|
8287
|
+
fields: zod.z.record(zod.z.string(), zod.z.any()),
|
|
8288
8288
|
});
|
|
8289
8289
|
const DataCollectionUpdateResponse = zod.z.object({
|
|
8290
8290
|
id: zod.z.string(),
|
|
@@ -8420,7 +8420,7 @@ exports.IncomingWebhooksState = void 0;
|
|
|
8420
8420
|
IncomingWebhooksState["ERROR"] = "error";
|
|
8421
8421
|
})(exports.IncomingWebhooksState || (exports.IncomingWebhooksState = {}));
|
|
8422
8422
|
const ExternalEventUnitConfig = zod.z.object({
|
|
8423
|
-
type: zod.z.
|
|
8423
|
+
type: zod.z.enum(exports.ExternalEventType),
|
|
8424
8424
|
dataSource: DataSourceUnitConfig.optional(),
|
|
8425
8425
|
eventKey: zod.z.string().optional(),
|
|
8426
8426
|
eventParameters: zod.z.any().optional(),
|
|
@@ -8478,11 +8478,11 @@ exports.FlowRunLaunchedByTrigger = void 0;
|
|
|
8478
8478
|
FlowRunLaunchedByTrigger["ExternalEvent"] = "external-event";
|
|
8479
8479
|
})(exports.FlowRunLaunchedByTrigger || (exports.FlowRunLaunchedByTrigger = {}));
|
|
8480
8480
|
const FlowRunLaunchedBy = zod.z.object({
|
|
8481
|
-
type: zod.z.
|
|
8481
|
+
type: zod.z.enum(exports.FlowRunLaunchedByTrigger),
|
|
8482
8482
|
ids: zod.z.array(zod.z.string()).optional(),
|
|
8483
8483
|
});
|
|
8484
8484
|
const FlowRunNode = zod.z.object({
|
|
8485
|
-
state: zod.z.
|
|
8485
|
+
state: zod.z.enum(exports.FlowRunNodeState),
|
|
8486
8486
|
runs: zod.z.number().optional(),
|
|
8487
8487
|
erroredRuns: zod.z.number().optional(),
|
|
8488
8488
|
outputs: zod.z.number().optional(),
|
|
@@ -8497,11 +8497,11 @@ const BaseFlowRun = zod.z.object({
|
|
|
8497
8497
|
startNodeKey: zod.z.string(),
|
|
8498
8498
|
userId: zod.z.string(),
|
|
8499
8499
|
input: zod.z.any().optional(),
|
|
8500
|
-
state: zod.z.
|
|
8500
|
+
state: zod.z.enum(exports.FlowRunState),
|
|
8501
8501
|
startTime: zod.z.string(),
|
|
8502
8502
|
endTime: zod.z.string().optional(),
|
|
8503
8503
|
errors: zod.z.array(ErrorDataSchema).optional(),
|
|
8504
|
-
nodes: zod.z.record(FlowRunNode).optional(),
|
|
8504
|
+
nodes: zod.z.record(zod.z.string(), FlowRunNode).optional(),
|
|
8505
8505
|
launchedBy: FlowRunLaunchedBy.optional(),
|
|
8506
8506
|
});
|
|
8507
8507
|
|
|
@@ -8531,7 +8531,7 @@ const FlowNodeRunOutputSchema = zod.z.object({
|
|
|
8531
8531
|
downstreamRuns: zod.z.array(DownstreamFlowNodeRunSchema),
|
|
8532
8532
|
});
|
|
8533
8533
|
const FlowNodeRunResultSchema = zod.z.object({
|
|
8534
|
-
status: zod.z.
|
|
8534
|
+
status: zod.z.enum(exports.FlowNodeRunStatus),
|
|
8535
8535
|
logs: zod.z.array(zod.z.any()),
|
|
8536
8536
|
outputs: zod.z.array(FlowNodeRunOutputSchema),
|
|
8537
8537
|
errors: zod.z.array(ErrorDataSchema),
|
|
@@ -8549,7 +8549,7 @@ const FlowNodeRunRecordWithoutOutputsDataSchema = zod.z.object({
|
|
|
8549
8549
|
id: zod.z.string(),
|
|
8550
8550
|
upstreamRuns: zod.z.array(UpstreamFlowNodeRunSchema),
|
|
8551
8551
|
input: zod.z.any(),
|
|
8552
|
-
status: zod.z.
|
|
8552
|
+
status: zod.z.enum(exports.FlowNodeRunStatus),
|
|
8553
8553
|
logs: zod.z.array(zod.z.any()),
|
|
8554
8554
|
outputs: zod.z.array(FlowNodeRunOutputMetadataSchema),
|
|
8555
8555
|
errors: zod.z.array(ErrorDataSchema),
|
|
@@ -8854,7 +8854,7 @@ const FlowEditableProperties = BaseIntegrationLevelMembraneInterfaceEditableProp
|
|
|
8854
8854
|
integrationId: zod.z.string().optional(),
|
|
8855
8855
|
universalFlowId: zod.z.string().optional(),
|
|
8856
8856
|
parametersSchema: DataSchema.optional(),
|
|
8857
|
-
nodes: zod.z.record(FlowNode).optional(),
|
|
8857
|
+
nodes: zod.z.record(zod.z.string(), FlowNode).optional(),
|
|
8858
8858
|
autoCreateInstances: zod.z.boolean().optional(),
|
|
8859
8859
|
});
|
|
8860
8860
|
const FlowReadOnlyProperties = BaseIntegrationLevelMembraneInterfaceReadOnlyProperties.extend({
|
|
@@ -8911,7 +8911,7 @@ exports.IntegrationElementType = void 0;
|
|
|
8911
8911
|
|
|
8912
8912
|
const ScenarioElement = zod.z.object({
|
|
8913
8913
|
id: zod.z.string(),
|
|
8914
|
-
type: zod.z.
|
|
8914
|
+
type: zod.z.enum(exports.IntegrationElementType),
|
|
8915
8915
|
element: zod.z.any().optional(),
|
|
8916
8916
|
});
|
|
8917
8917
|
const ScenarioEditableProperties = BaseMembraneInterfaceEditableProperties.extend({
|
|
@@ -8940,11 +8940,11 @@ exports.ScreenBlockType = void 0;
|
|
|
8940
8940
|
})(exports.ScreenBlockType || (exports.ScreenBlockType = {}));
|
|
8941
8941
|
const ScreenBlock = zod.z
|
|
8942
8942
|
.object({
|
|
8943
|
-
type: zod.z.
|
|
8943
|
+
type: zod.z.enum(exports.ScreenBlockType),
|
|
8944
8944
|
})
|
|
8945
|
-
.and(zod.z.record(zod.z.any()));
|
|
8945
|
+
.and(zod.z.record(zod.z.string(), zod.z.any()));
|
|
8946
8946
|
const BaseScreen = BaseWorkspaceElement.extend({
|
|
8947
|
-
type: zod.z.
|
|
8947
|
+
type: zod.z.enum(exports.ScreenType),
|
|
8948
8948
|
key: zod.z.string().optional(),
|
|
8949
8949
|
blocks: zod.z.array(ScreenBlock),
|
|
8950
8950
|
});
|
|
@@ -8952,7 +8952,7 @@ const BaseScreen = BaseWorkspaceElement.extend({
|
|
|
8952
8952
|
const BaseCustomer = zod.z.object({
|
|
8953
8953
|
id: zod.z.string(),
|
|
8954
8954
|
name: zod.z.string(),
|
|
8955
|
-
meta: zod.z.record(zod.z.any()).optional(),
|
|
8955
|
+
meta: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
8956
8956
|
internalId: zod.z.string(),
|
|
8957
8957
|
fields: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
8958
8958
|
credentials: zod.z.any().optional(),
|
|
@@ -8972,11 +8972,11 @@ const BaseFlowInstance = BaseMembraneInterface.extend({
|
|
|
8972
8972
|
instanceKey: zod.z.string().optional(),
|
|
8973
8973
|
parameters: zod.z.any().optional(),
|
|
8974
8974
|
parametersSchema: DataSchema.optional(),
|
|
8975
|
-
nodes: zod.z.record(zod.z.any()).optional(),
|
|
8975
|
+
nodes: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
8976
8976
|
enabled: zod.z.boolean(),
|
|
8977
8977
|
createdAt: zod.z.string(),
|
|
8978
8978
|
updatedAt: zod.z.string(),
|
|
8979
|
-
state: zod.z.
|
|
8979
|
+
state: zod.z.enum(exports.WorkspaceElementState).optional(),
|
|
8980
8980
|
customized: zod.z
|
|
8981
8981
|
.object({
|
|
8982
8982
|
name: zod.z.boolean().optional(),
|
|
@@ -8991,7 +8991,7 @@ exports.FlowInstanceNodeState = void 0;
|
|
|
8991
8991
|
FlowInstanceNodeState["READY"] = "READY";
|
|
8992
8992
|
})(exports.FlowInstanceNodeState || (exports.FlowInstanceNodeState = {}));
|
|
8993
8993
|
const FlowInstanceNode = FlowNode.extend({
|
|
8994
|
-
state: zod.z.
|
|
8994
|
+
state: zod.z.enum(exports.FlowInstanceNodeState).optional(),
|
|
8995
8995
|
errors: zod.z.array(ErrorDataSchema).optional(),
|
|
8996
8996
|
userConfig: zod.z.any().optional(),
|
|
8997
8997
|
testInput: zod.z.any().optional(),
|
|
@@ -9061,7 +9061,7 @@ exports.ActionDependencyType = void 0;
|
|
|
9061
9061
|
ActionDependencyType["DataSource"] = "DataSource";
|
|
9062
9062
|
})(exports.ActionDependencyType || (exports.ActionDependencyType = {}));
|
|
9063
9063
|
const ActionDependency = zod.z.object({
|
|
9064
|
-
type: zod.z.
|
|
9064
|
+
type: zod.z.enum(exports.ActionDependencyType),
|
|
9065
9065
|
key: zod.z.string(),
|
|
9066
9066
|
element: zod.z.any().optional(),
|
|
9067
9067
|
});
|
|
@@ -9070,7 +9070,7 @@ const BaseActionInstance = BaseMembraneInterface.extend({
|
|
|
9070
9070
|
universalParentId: zod.z.string().optional(),
|
|
9071
9071
|
userId: zod.z.string(),
|
|
9072
9072
|
instanceKey: zod.z.string().optional(),
|
|
9073
|
-
type: zod.z.
|
|
9073
|
+
type: zod.z.enum(exports.ActionType).optional(),
|
|
9074
9074
|
inputSchema: zod.z.any().optional(),
|
|
9075
9075
|
config: zod.z.any().optional(),
|
|
9076
9076
|
outputSchema: zod.z.any().optional(),
|
|
@@ -9086,7 +9086,7 @@ const BaseFieldMappingInstance = BaseMembraneInterface.extend({
|
|
|
9086
9086
|
instanceKey: zod.z.string().optional(),
|
|
9087
9087
|
dataSourceInstanceId: zod.z.string().optional(),
|
|
9088
9088
|
dataSourceSchema: DataSchema.optional(),
|
|
9089
|
-
direction: zod.z.
|
|
9089
|
+
direction: zod.z.enum(exports.FieldMappingDirection).optional(),
|
|
9090
9090
|
appSchema: DataSchema.optional(),
|
|
9091
9091
|
importValue: zod.z.any().optional(),
|
|
9092
9092
|
exportValue: zod.z.any().optional(),
|
|
@@ -9095,7 +9095,7 @@ const BaseFieldMappingInstance = BaseMembraneInterface.extend({
|
|
|
9095
9095
|
unifiedImportValue: zod.z.any().optional(),
|
|
9096
9096
|
frozenImportFields: zod.z.array(zod.z.string()).optional(),
|
|
9097
9097
|
frozenExportFields: zod.z.array(zod.z.string()).optional(),
|
|
9098
|
-
state: zod.z.
|
|
9098
|
+
state: zod.z.enum(exports.WorkspaceElementState).optional(),
|
|
9099
9099
|
error: ErrorDataSchema.optional(),
|
|
9100
9100
|
externalSchema: zod.z.any().optional(),
|
|
9101
9101
|
});
|
|
@@ -9123,7 +9123,7 @@ const DataLink = zod.z.object({
|
|
|
9123
9123
|
dataLinkTableInstanceId: zod.z.string(),
|
|
9124
9124
|
externalRecordId: zod.z.string(),
|
|
9125
9125
|
appRecordId: zod.z.string(),
|
|
9126
|
-
direction: zod.z.
|
|
9126
|
+
direction: zod.z.enum(exports.DataLinkDirection),
|
|
9127
9127
|
});
|
|
9128
9128
|
const DataLinkTableConfig = zod.z.object({
|
|
9129
9129
|
key: zod.z.string(),
|
|
@@ -9138,10 +9138,10 @@ exports.HttpRequestMethod = void 0;
|
|
|
9138
9138
|
HttpRequestMethod["DELETE"] = "DELETE";
|
|
9139
9139
|
})(exports.HttpRequestMethod || (exports.HttpRequestMethod = {}));
|
|
9140
9140
|
const HttpRequestSpec = zod.z.object({
|
|
9141
|
-
method: zod.z.string().toUpperCase().pipe(zod.z.
|
|
9141
|
+
method: zod.z.string().toUpperCase().pipe(zod.z.enum(exports.HttpRequestMethod)).optional(),
|
|
9142
9142
|
uri: zod.z.any(),
|
|
9143
|
-
headers: zod.z.record(zod.z.any()).optional(),
|
|
9144
|
-
query: zod.z.record(zod.z.any()).optional(),
|
|
9143
|
+
headers: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
9144
|
+
query: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
9145
9145
|
body: zod.z.any().optional(),
|
|
9146
9146
|
});
|
|
9147
9147
|
const HTTP_REQUEST_SCHEMA = {
|
|
@@ -9221,7 +9221,7 @@ exports.ExternalEventSubscriptionType = void 0;
|
|
|
9221
9221
|
ExternalEventSubscriptionType["ConnectorEvent"] = "connector-event";
|
|
9222
9222
|
})(exports.ExternalEventSubscriptionType || (exports.ExternalEventSubscriptionType = {}));
|
|
9223
9223
|
const ExternalEventSubscriptionConfig = zod.z.object({
|
|
9224
|
-
type: zod.z.
|
|
9224
|
+
type: zod.z.enum(exports.ExternalEventSubscriptionType),
|
|
9225
9225
|
dataSource: DataSourceUnitConfig.optional(),
|
|
9226
9226
|
eventKey: zod.z.string().optional(),
|
|
9227
9227
|
eventParameters: zod.z.any().optional(),
|
|
@@ -9233,7 +9233,7 @@ const BaseExternalEventSubscription = zod.z.object({
|
|
|
9233
9233
|
connectionId: zod.z.string(),
|
|
9234
9234
|
integrationId: zod.z.string(),
|
|
9235
9235
|
config: ExternalEventSubscriptionConfig.optional(),
|
|
9236
|
-
status: zod.z.
|
|
9236
|
+
status: zod.z.enum(exports.ExternalEventSubscriptionStatus).optional(),
|
|
9237
9237
|
error: ErrorDataSchema.optional(),
|
|
9238
9238
|
isRealTime: zod.z.boolean().optional(),
|
|
9239
9239
|
requiresPull: zod.z.boolean().optional(),
|
|
@@ -9264,7 +9264,7 @@ const BaseExternalEventLogRecord = zod.z.object({
|
|
|
9264
9264
|
connectionId: zod.z.string(),
|
|
9265
9265
|
payload: zod.z.any().optional(),
|
|
9266
9266
|
launchedFlowRunIds: zod.z.array(zod.z.string()).optional(),
|
|
9267
|
-
status: zod.z.
|
|
9267
|
+
status: zod.z.enum(exports.ExternalEventLogStatus),
|
|
9268
9268
|
error: ErrorDataSchema.optional(),
|
|
9269
9269
|
});
|
|
9270
9270
|
|
|
@@ -9285,7 +9285,7 @@ const BaseExternalEventPull = zod.z.object({
|
|
|
9285
9285
|
startDatetime: zod.z.string(),
|
|
9286
9286
|
endDatetime: zod.z.string(),
|
|
9287
9287
|
isFullScan: zod.z.boolean().optional(),
|
|
9288
|
-
status: zod.z.
|
|
9288
|
+
status: zod.z.enum(exports.ExternalEventPullStatus),
|
|
9289
9289
|
collectedEventIds: zod.z.array(zod.z.string()),
|
|
9290
9290
|
error: ErrorDataSchema.optional(),
|
|
9291
9291
|
});
|
|
@@ -9301,7 +9301,7 @@ const BaseActionRunLogRecord = BaseWorkspaceElement.extend({
|
|
|
9301
9301
|
connectionId: zod.z.string(),
|
|
9302
9302
|
input: zod.z.any().optional(),
|
|
9303
9303
|
output: zod.z.any().optional(),
|
|
9304
|
-
status: zod.z.
|
|
9304
|
+
status: zod.z.enum(exports.ActionRunLogStatus),
|
|
9305
9305
|
createdAt: zod.z.string(),
|
|
9306
9306
|
completedAt: zod.z.string().optional(),
|
|
9307
9307
|
error: ErrorDataSchema.optional(),
|
|
@@ -9566,12 +9566,6 @@ const ResetFlowInstanceOptions = zod.z.object({
|
|
|
9566
9566
|
nodes: zod.z.record(zod.z.string(), zod.z.boolean()).optional(),
|
|
9567
9567
|
allNodes: zod.z.boolean().optional(),
|
|
9568
9568
|
});
|
|
9569
|
-
const RunFlowOptions = zod.z.object({
|
|
9570
|
-
nodeKey: zod.z.string().optional(),
|
|
9571
|
-
input: zod.z.any().optional(),
|
|
9572
|
-
returnImmediately: zod.z.boolean().optional(),
|
|
9573
|
-
onUpdate: zod.z.function().optional(),
|
|
9574
|
-
});
|
|
9575
9569
|
const FlowInstanceApiResponse = BaseFlowInstance.extend({
|
|
9576
9570
|
user: zod.z.lazy(() => zod.z.any()).optional(),
|
|
9577
9571
|
connection: zod.z.lazy(() => zod.z.any()).optional(),
|
|
@@ -9597,13 +9591,13 @@ const FindFlowRunsQuery = PaginationQuery.extend({
|
|
|
9597
9591
|
flowId: zod.z.string().optional(),
|
|
9598
9592
|
universalFlowId: zod.z.string().optional(),
|
|
9599
9593
|
userId: zod.z.string().optional(),
|
|
9600
|
-
state: zod.z.
|
|
9594
|
+
state: zod.z.enum(exports.FlowRunState).optional(),
|
|
9601
9595
|
integrationId: zod.z.string().optional(),
|
|
9602
9596
|
connectionId: zod.z.string().optional(),
|
|
9603
9597
|
startedAfter: zod.z.string().optional(),
|
|
9604
9598
|
});
|
|
9605
9599
|
const FlowRunLaunchedByApi = zod.z.object({
|
|
9606
|
-
type: zod.z.
|
|
9600
|
+
type: zod.z.enum(exports.FlowRunLaunchedByTrigger),
|
|
9607
9601
|
ids: zod.z.array(zod.z.string()).optional(),
|
|
9608
9602
|
});
|
|
9609
9603
|
const FlowRunApiResponse = BaseFlowRun.extend({
|
|
@@ -9617,235 +9611,6 @@ const FindFlowRunsResponse = zod.z.object({
|
|
|
9617
9611
|
cursor: zod.z.string().optional(),
|
|
9618
9612
|
});
|
|
9619
9613
|
|
|
9620
|
-
const POPUP_ELEMENT_ID = '__integration-app-popup';
|
|
9621
|
-
const CONTAINER_ELEMENT_ID = '__integration-app-container';
|
|
9622
|
-
const CONTAINER_ELEMENT_CLASS = '__integration-app-container';
|
|
9623
|
-
const CONTAINER_ELEMENT_CLASS__LOADER = '__integration-app-container__loader';
|
|
9624
|
-
const BODY_CLASS = '__integration-app-open';
|
|
9625
|
-
const STYLES_ELEMENT_ID = '__integration-app-embed-styles';
|
|
9626
|
-
const OpenConfigurationOptions = zod.z.object({
|
|
9627
|
-
onClose: zod.z.function().optional(),
|
|
9628
|
-
showPoweredBy: zod.z.boolean().optional(),
|
|
9629
|
-
});
|
|
9630
|
-
let IFRAME_START_SHOW_LOADER_TIME = 0;
|
|
9631
|
-
let IFRAME_SHOW_LOADER_TIMEOUT_ID;
|
|
9632
|
-
const IFRAME_SHOW_LOADER_MINIMAL_TIME = 500;
|
|
9633
|
-
const IFRAME_LAYOUT_SHIFT_TIME = 300;
|
|
9634
|
-
function showIframeLoader() {
|
|
9635
|
-
const container = getContainer();
|
|
9636
|
-
container === null || container === void 0 ? void 0 : container.classList.add(CONTAINER_ELEMENT_CLASS__LOADER);
|
|
9637
|
-
IFRAME_START_SHOW_LOADER_TIME = Date.now();
|
|
9638
|
-
}
|
|
9639
|
-
function hideIframeLoader(waitLayoutShift = IFRAME_LAYOUT_SHIFT_TIME) {
|
|
9640
|
-
if (IFRAME_SHOW_LOADER_TIMEOUT_ID) {
|
|
9641
|
-
clearTimeout(IFRAME_SHOW_LOADER_TIMEOUT_ID);
|
|
9642
|
-
}
|
|
9643
|
-
const delta = Date.now() - IFRAME_START_SHOW_LOADER_TIME;
|
|
9644
|
-
if (delta >= IFRAME_SHOW_LOADER_MINIMAL_TIME) {
|
|
9645
|
-
setTimeout(() => {
|
|
9646
|
-
const container = getContainer();
|
|
9647
|
-
container === null || container === void 0 ? void 0 : container.classList.remove(CONTAINER_ELEMENT_CLASS__LOADER);
|
|
9648
|
-
IFRAME_START_SHOW_LOADER_TIME = 0;
|
|
9649
|
-
}, waitLayoutShift);
|
|
9650
|
-
return;
|
|
9651
|
-
}
|
|
9652
|
-
else {
|
|
9653
|
-
const waitLayoutShift = delta >= IFRAME_LAYOUT_SHIFT_TIME ? 0 : IFRAME_LAYOUT_SHIFT_TIME - delta;
|
|
9654
|
-
const timeoutTime = IFRAME_SHOW_LOADER_MINIMAL_TIME - delta;
|
|
9655
|
-
IFRAME_SHOW_LOADER_TIMEOUT_ID = setTimeout(() => {
|
|
9656
|
-
hideIframeLoader(waitLayoutShift);
|
|
9657
|
-
}, timeoutTime);
|
|
9658
|
-
return;
|
|
9659
|
-
}
|
|
9660
|
-
}
|
|
9661
|
-
async function openIframe(uri, callbacks = {}, { mountTargetSelector } = {}) {
|
|
9662
|
-
close();
|
|
9663
|
-
init(mountTargetSelector);
|
|
9664
|
-
return new Promise((resolve) => {
|
|
9665
|
-
function complete(callback) {
|
|
9666
|
-
close(callback);
|
|
9667
|
-
resolve();
|
|
9668
|
-
}
|
|
9669
|
-
function doOpen() {
|
|
9670
|
-
const iframe = document.createElement('iframe');
|
|
9671
|
-
iframe.src = uri;
|
|
9672
|
-
iframe.id = POPUP_ELEMENT_ID;
|
|
9673
|
-
iframe.onload = () => {
|
|
9674
|
-
hideIframeLoader();
|
|
9675
|
-
};
|
|
9676
|
-
if (!!getContainer()) {
|
|
9677
|
-
document.body.classList.add(BODY_CLASS);
|
|
9678
|
-
showIframeLoader();
|
|
9679
|
-
appendToContainer(iframe);
|
|
9680
|
-
handleIframeUnmount(iframe);
|
|
9681
|
-
penpal.connectToChild({
|
|
9682
|
-
iframe,
|
|
9683
|
-
methods: {
|
|
9684
|
-
...callbacks,
|
|
9685
|
-
handshake: (...args) => {
|
|
9686
|
-
var _a;
|
|
9687
|
-
hideIframeLoader();
|
|
9688
|
-
(_a = callbacks === null || callbacks === void 0 ? void 0 : callbacks.handshake) === null || _a === void 0 ? void 0 : _a.call(callbacks, ...args);
|
|
9689
|
-
},
|
|
9690
|
-
close: () => complete(callbacks.onClose),
|
|
9691
|
-
},
|
|
9692
|
-
});
|
|
9693
|
-
}
|
|
9694
|
-
else {
|
|
9695
|
-
throw Error('Membrane container element not found. Was it manually removed?');
|
|
9696
|
-
}
|
|
9697
|
-
}
|
|
9698
|
-
if (document.readyState === 'complete' || document.readyState === 'interactive') {
|
|
9699
|
-
doOpen();
|
|
9700
|
-
}
|
|
9701
|
-
else {
|
|
9702
|
-
document.addEventListener('DOMContentLoaded', () => {
|
|
9703
|
-
doOpen();
|
|
9704
|
-
});
|
|
9705
|
-
}
|
|
9706
|
-
});
|
|
9707
|
-
}
|
|
9708
|
-
function close(callback) {
|
|
9709
|
-
document.body.classList.remove(BODY_CLASS);
|
|
9710
|
-
if (!!getContainer()) {
|
|
9711
|
-
deleteContainer();
|
|
9712
|
-
if (callback) {
|
|
9713
|
-
callback();
|
|
9714
|
-
}
|
|
9715
|
-
}
|
|
9716
|
-
}
|
|
9717
|
-
function init(mountTargetSelector) {
|
|
9718
|
-
var _a;
|
|
9719
|
-
injectStyles(mountTargetSelector);
|
|
9720
|
-
if (!!getContainer()) {
|
|
9721
|
-
return;
|
|
9722
|
-
}
|
|
9723
|
-
const container = createContainer();
|
|
9724
|
-
if (mountTargetSelector && document.querySelector(mountTargetSelector)) {
|
|
9725
|
-
(_a = document.querySelector(mountTargetSelector)) === null || _a === void 0 ? void 0 : _a.appendChild(container);
|
|
9726
|
-
}
|
|
9727
|
-
else {
|
|
9728
|
-
document.body.appendChild(container);
|
|
9729
|
-
}
|
|
9730
|
-
}
|
|
9731
|
-
function injectStyles(mountTargetSelector) {
|
|
9732
|
-
const hasCustomMountTarget = Boolean(mountTargetSelector && document.querySelector(mountTargetSelector));
|
|
9733
|
-
const styles = [
|
|
9734
|
-
`.${CONTAINER_ELEMENT_CLASS}:empty {
|
|
9735
|
-
display: none;
|
|
9736
|
-
}`,
|
|
9737
|
-
hasCustomMountTarget
|
|
9738
|
-
? `.${CONTAINER_ELEMENT_CLASS} {
|
|
9739
|
-
inset: 0;
|
|
9740
|
-
background: rgba(0, 0, 0, 0);
|
|
9741
|
-
transition: background 0.2s ease-out;
|
|
9742
|
-
display: flex;
|
|
9743
|
-
justify-content: center;
|
|
9744
|
-
align-items: center;
|
|
9745
|
-
width: 100%;
|
|
9746
|
-
height: 100%;
|
|
9747
|
-
}`
|
|
9748
|
-
: `.${CONTAINER_ELEMENT_CLASS} {
|
|
9749
|
-
position: fixed;
|
|
9750
|
-
inset: 0;
|
|
9751
|
-
z-index: 2147483647;
|
|
9752
|
-
display: flex;
|
|
9753
|
-
justify-content: center;
|
|
9754
|
-
align-items: center;
|
|
9755
|
-
pointer-events: auto;
|
|
9756
|
-
background: rgba(0, 0, 0, 0);
|
|
9757
|
-
transition: background 0.2s ease-out;
|
|
9758
|
-
}`,
|
|
9759
|
-
`.${CONTAINER_ELEMENT_CLASS}.${CONTAINER_ELEMENT_CLASS__LOADER} {
|
|
9760
|
-
background: rgba(0, 0, 0, 0.8);
|
|
9761
|
-
}`,
|
|
9762
|
-
`.${CONTAINER_ELEMENT_CLASS}.${CONTAINER_ELEMENT_CLASS__LOADER}::before {
|
|
9763
|
-
${hasCustomMountTarget ? 'position: absolute;' : ''}
|
|
9764
|
-
content: "";
|
|
9765
|
-
width: 5rem;
|
|
9766
|
-
height: 4rem;
|
|
9767
|
-
background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 32 22" fill="%23000" xmlns="http://www.w3.org/2000/svg" %3E%3Cdefs%3E%3Cmask id="a"%3E%3Crect width="100%25" height="100%25" fill="%23fff" /%3E%3Cpath d="M11.8 13.12a3 3 0 0 1 0-4.24l7.08-7.07a3 3 0 0 1 4.24 0l7.07 7.07a3 3 0 0 1 0 4.24l-7.07 7.07a3 3 0 0 1-4.24 0l-7.07-7.07Z"%3E%3CanimateTransform attributeName="transform" attributeType="XML" type="rotate" repeatCount="indefinite" calcMode="spline" keyTimes="0;1" dur="5s" keySplines="0 0 0.1 1" from="0 21 11" to="-360 21 11" /%3E%3C/path%3E%3C/mask%3E%3Cmask id="b"%3E%3Crect width="100%25" height="100%25" fill="%23fff"/%3E%3Cpath fill-rule="evenodd" clip-rule="evenodd" d="M1.8 8.88a3 3 0 0 0 0 4.24l7.08 7.07a3 3 0 0 0 4.24 0l7.07-7.07a3 3 0 0 0 0-4.24L13.12 1.8a3 3 0 0 0-4.24 0L1.8 8.88Zm.71.7a2 2 0 0 0 0 2.83L9.6 19.5a2 2 0 0 0 2.82 0l7.08-7.08a2 2 0 0 0 0-2.82l-7.1-7.1a2 2 0 0 0-2.82 0L2.5 9.6Z" %3E%3CanimateTransform attributeName="transform" attributeType="XML" type="rotate" repeatCount="indefinite" calcMode="spline" keyTimes="0;1" dur="5s" keySplines="0 0 0.1 1" from="0 11 11" to="720 11 11" /%3E%3C/path%3E%3C/mask%3E%3C/defs%3E%3Cg mask="url(%23a)"%3E%3Cpath fill-rule="evenodd" clip-rule="evenodd" d="M1.8 8.88a3 3 0 0 0 0 4.24l7.08 7.07a3 3 0 0 0 4.24 0l7.07-7.07a3 3 0 0 0 0-4.24L13.12 1.8a3 3 0 0 0-4.24 0L1.8 8.88Zm.71.7a2 2 0 0 0 0 2.83L9.6 19.5a2 2 0 0 0 2.82 0l7.08-7.08a2 2 0 0 0 0-2.82l-7.1-7.1a2 2 0 0 0-2.82 0L2.5 9.6Z"%0A%3E%3CanimateTransform attributeName="transform" attributeType="XML" type="rotate" repeatCount="indefinite" calcMode="spline" keyTimes="0;1" dur="5s" keySplines="0 0 0.1 1" from="0 11 11" to="720 11 11" /%3E%3C/path%3E%3C/g%3E%3Cg mask="url(%23b)"%3E%3Cpath d="M11.8 13.12a3 3 0 0 1 0-4.24l7.08-7.07a3 3 0 0 1 4.24 0l7.07 7.07a3 3 0 0 1 0 4.24l-7.07 7.07a3 3 0 0 1-4.24 0l-7.07-7.07Z"%3E%3CanimateTransform attributeName="transform" attributeType="XML" type="rotate" repeatCount="indefinite" calcMode="spline" keyTimes="0;1" dur="5s" keySplines="0 0 0.1 1" from="0 21 11" to="-360 21 11" /%3E%3C/path%3E%3C/g%3E%3C/svg%3E');
|
|
9768
|
-
background-size: contain;
|
|
9769
|
-
background-repeat: no-repeat;
|
|
9770
|
-
background-position: center;
|
|
9771
|
-
filter: invert(1);
|
|
9772
|
-
}`,
|
|
9773
|
-
`.${CONTAINER_ELEMENT_CLASS} iframe {
|
|
9774
|
-
${hasCustomMountTarget ? '' : 'position: absolute;'}
|
|
9775
|
-
width: 100%;
|
|
9776
|
-
height: 100%;
|
|
9777
|
-
border-width: 0;
|
|
9778
|
-
|
|
9779
|
-
/* fix transparent bg, because iframe document has light scheme */
|
|
9780
|
-
color-scheme: light;
|
|
9781
|
-
}`,
|
|
9782
|
-
`.${CONTAINER_ELEMENT_CLASS}.${CONTAINER_ELEMENT_CLASS__LOADER} iframe {
|
|
9783
|
-
visibility: hidden;
|
|
9784
|
-
}`,
|
|
9785
|
-
!hasCustomMountTarget
|
|
9786
|
-
? `body.${BODY_CLASS} {
|
|
9787
|
-
overflow: hidden;
|
|
9788
|
-
}`
|
|
9789
|
-
: '',
|
|
9790
|
-
];
|
|
9791
|
-
let styleElement = document.getElementById(STYLES_ELEMENT_ID);
|
|
9792
|
-
if (!styleElement) {
|
|
9793
|
-
styleElement = document.createElement('style');
|
|
9794
|
-
styleElement.id = STYLES_ELEMENT_ID;
|
|
9795
|
-
styleElement.type = 'text/css';
|
|
9796
|
-
document.head.appendChild(styleElement);
|
|
9797
|
-
}
|
|
9798
|
-
styleElement.textContent = styles.join('\n');
|
|
9799
|
-
}
|
|
9800
|
-
function removeInjectedStyles() {
|
|
9801
|
-
const stylesElement = document.getElementById(STYLES_ELEMENT_ID);
|
|
9802
|
-
if (stylesElement) {
|
|
9803
|
-
stylesElement.remove();
|
|
9804
|
-
}
|
|
9805
|
-
}
|
|
9806
|
-
function createContainer() {
|
|
9807
|
-
const container = document.createElement('div');
|
|
9808
|
-
container.id = CONTAINER_ELEMENT_ID;
|
|
9809
|
-
container.classList.add(CONTAINER_ELEMENT_CLASS);
|
|
9810
|
-
return container;
|
|
9811
|
-
}
|
|
9812
|
-
function getContainer() {
|
|
9813
|
-
return document.getElementById(CONTAINER_ELEMENT_ID);
|
|
9814
|
-
}
|
|
9815
|
-
function appendToContainer(el) {
|
|
9816
|
-
const container = getContainer();
|
|
9817
|
-
container === null || container === void 0 ? void 0 : container.appendChild(el);
|
|
9818
|
-
}
|
|
9819
|
-
function deleteContainer() {
|
|
9820
|
-
const container = getContainer();
|
|
9821
|
-
if (container) {
|
|
9822
|
-
container.remove();
|
|
9823
|
-
}
|
|
9824
|
-
removeInjectedStyles();
|
|
9825
|
-
}
|
|
9826
|
-
function handleIframeUnmount(iframe) {
|
|
9827
|
-
const observer = new MutationObserver((mutationsList) => {
|
|
9828
|
-
for (const mutation of mutationsList) {
|
|
9829
|
-
for (const removedNode of mutation.removedNodes) {
|
|
9830
|
-
if (removedNode instanceof HTMLElement && removedNode.id === POPUP_ELEMENT_ID) {
|
|
9831
|
-
observer.disconnect();
|
|
9832
|
-
deleteContainer();
|
|
9833
|
-
return;
|
|
9834
|
-
}
|
|
9835
|
-
}
|
|
9836
|
-
}
|
|
9837
|
-
});
|
|
9838
|
-
const parent = iframe.parentNode;
|
|
9839
|
-
if (parent) {
|
|
9840
|
-
observer.observe(parent, {
|
|
9841
|
-
childList: true,
|
|
9842
|
-
});
|
|
9843
|
-
}
|
|
9844
|
-
else {
|
|
9845
|
-
console.warn(`iframe with ID "${POPUP_ELEMENT_ID}" has no parent node`);
|
|
9846
|
-
}
|
|
9847
|
-
}
|
|
9848
|
-
|
|
9849
9614
|
const CreateIntegrationRequest = zod.z.object({
|
|
9850
9615
|
name: zod.z.string().optional(),
|
|
9851
9616
|
key: zod.z.string(),
|
|
@@ -9859,13 +9624,6 @@ const UpdateIntegrationRequest = zod.z.object({
|
|
|
9859
9624
|
logoUri: zod.z.string().optional(),
|
|
9860
9625
|
});
|
|
9861
9626
|
const FindIntegrationsQuery = zod.z.object({}).merge(PaginationQuery).merge(SearchQuery);
|
|
9862
|
-
const OpenNewConnectionOptions = zod.z
|
|
9863
|
-
.object({
|
|
9864
|
-
allowMultipleConnections: zod.z.boolean().optional(),
|
|
9865
|
-
name: zod.z.string().optional(),
|
|
9866
|
-
connectorParameters: zod.z.any().optional(),
|
|
9867
|
-
})
|
|
9868
|
-
.merge(OpenConfigurationOptions);
|
|
9869
9627
|
const IntegrationAuthUi = zod.z.object({
|
|
9870
9628
|
schema: zod.z.any().optional(),
|
|
9871
9629
|
helpUri: zod.z.string().optional(),
|
|
@@ -9886,10 +9644,18 @@ const IntegrationApiResponse = BaseIntegration.extend({
|
|
|
9886
9644
|
|
|
9887
9645
|
const ScenarioElementApi = zod.z.object({
|
|
9888
9646
|
id: zod.z.string(),
|
|
9889
|
-
type: zod.z.
|
|
9647
|
+
type: zod.z.enum(exports.IntegrationElementType),
|
|
9890
9648
|
element: zod.z.any().optional(),
|
|
9891
9649
|
});
|
|
9892
|
-
const FindScenariosQuery = zod.z
|
|
9650
|
+
const FindScenariosQuery = zod.z
|
|
9651
|
+
.object({
|
|
9652
|
+
integrationId: zod.z.string().optional(),
|
|
9653
|
+
integrationKey: zod.z.string().optional(),
|
|
9654
|
+
parentId: zod.z.string().optional(),
|
|
9655
|
+
})
|
|
9656
|
+
.extend(SearchQuery.shape)
|
|
9657
|
+
.extend(PaginationQuery.shape)
|
|
9658
|
+
.extend(IncludeArchivedQuery.shape);
|
|
9893
9659
|
const ScenarioApiResponse = BaseScenario.extend({
|
|
9894
9660
|
appliedToIntegrations: AppliedToIntegrations(BaseScenario).optional(),
|
|
9895
9661
|
});
|
|
@@ -9966,7 +9732,7 @@ const ListExternalEventLogRecordsQuery = CommonListElementsQuery.extend({
|
|
|
9966
9732
|
connectionId: zod.z.string().optional(),
|
|
9967
9733
|
integrationId: zod.z.string().optional(),
|
|
9968
9734
|
externalEventSubscriptionId: zod.z.string().optional(),
|
|
9969
|
-
status: zod.z.
|
|
9735
|
+
status: zod.z.enum(exports.ExternalEventLogStatus).optional(),
|
|
9970
9736
|
});
|
|
9971
9737
|
const ExternalEventLogRecordApiResponse = BaseExternalEventLogRecord.extend({
|
|
9972
9738
|
user: BaseCustomer.optional(),
|
|
@@ -9979,7 +9745,7 @@ const ListExternalEventPullsQuery = CommonListElementsQuery.extend({
|
|
|
9979
9745
|
connectionId: zod.z.string().optional(),
|
|
9980
9746
|
integrationId: zod.z.string().optional(),
|
|
9981
9747
|
externalEventSubscriptionId: zod.z.string().optional(),
|
|
9982
|
-
status: zod.z.
|
|
9748
|
+
status: zod.z.enum(exports.ExternalEventPullStatus).optional(),
|
|
9983
9749
|
});
|
|
9984
9750
|
const ExternalEventPullApiResponse = BaseExternalEventPull.extend({
|
|
9985
9751
|
user: BaseCustomer.optional(),
|
|
@@ -10180,12 +9946,15 @@ const WorkspaceElementSpecs = {
|
|
|
10180
9946
|
editablePropertiesSchema: ScenarioEditableProperties,
|
|
10181
9947
|
apiResponseSchema: ScenarioApiResponse,
|
|
10182
9948
|
findQuerySchema: FindScenariosQuery,
|
|
9949
|
+
isMembraneInterface: true,
|
|
9950
|
+
isIntegrationLevel: true,
|
|
10183
9951
|
},
|
|
10184
9952
|
[exports.WorkspaceElementType.ActionInstance]: {
|
|
10185
9953
|
type: exports.WorkspaceElementType.ActionInstance,
|
|
10186
9954
|
apiPath: 'action-instances',
|
|
10187
9955
|
name: 'Action Instance',
|
|
10188
9956
|
namePlural: 'Action Instances',
|
|
9957
|
+
isMembraneInterface: true,
|
|
10189
9958
|
},
|
|
10190
9959
|
[exports.WorkspaceElementType.Action]: {
|
|
10191
9960
|
type: exports.WorkspaceElementType.Action,
|
|
@@ -10195,6 +9964,8 @@ const WorkspaceElementSpecs = {
|
|
|
10195
9964
|
editablePropertiesSchema: ActionEditableProperties,
|
|
10196
9965
|
apiResponseSchema: ActionApiResponse,
|
|
10197
9966
|
findQuerySchema: FindActionsQuery,
|
|
9967
|
+
isMembraneInterface: true,
|
|
9968
|
+
isIntegrationLevel: true,
|
|
10198
9969
|
},
|
|
10199
9970
|
[exports.WorkspaceElementType.ActionRunLogRecord]: {
|
|
10200
9971
|
type: exports.WorkspaceElementType.ActionRunLogRecord,
|
|
@@ -10208,6 +9979,8 @@ const WorkspaceElementSpecs = {
|
|
|
10208
9979
|
name: 'Flow',
|
|
10209
9980
|
namePlural: 'Flows',
|
|
10210
9981
|
parentFieldKey: 'universalFlowId',
|
|
9982
|
+
isMembraneInterface: true,
|
|
9983
|
+
isIntegrationLevel: true,
|
|
10211
9984
|
},
|
|
10212
9985
|
[exports.WorkspaceElementType.FlowInstance]: {
|
|
10213
9986
|
type: exports.WorkspaceElementType.FlowInstance,
|
|
@@ -10216,6 +9989,7 @@ const WorkspaceElementSpecs = {
|
|
|
10216
9989
|
updateSchema: updateFlowInstanceSchema,
|
|
10217
9990
|
name: 'Flow',
|
|
10218
9991
|
namePlural: 'Flows',
|
|
9992
|
+
isMembraneInterface: true,
|
|
10219
9993
|
},
|
|
10220
9994
|
[exports.WorkspaceElementType.FlowRun]: {
|
|
10221
9995
|
type: exports.WorkspaceElementType.FlowRun,
|
|
@@ -10229,12 +10003,15 @@ const WorkspaceElementSpecs = {
|
|
|
10229
10003
|
name: 'Field Mapping',
|
|
10230
10004
|
namePlural: 'Field Mappings',
|
|
10231
10005
|
parentFieldKey: 'universalFieldMappingId',
|
|
10006
|
+
isMembraneInterface: true,
|
|
10007
|
+
isIntegrationLevel: true,
|
|
10232
10008
|
},
|
|
10233
10009
|
[exports.WorkspaceElementType.FieldMappingInstance]: {
|
|
10234
10010
|
type: exports.WorkspaceElementType.FieldMappingInstance,
|
|
10235
10011
|
apiPath: 'field-mapping-instances',
|
|
10236
10012
|
name: 'Field Mapping Instance',
|
|
10237
10013
|
namePlural: 'Field Mapping Instances',
|
|
10014
|
+
isMembraneInterface: true,
|
|
10238
10015
|
},
|
|
10239
10016
|
[exports.WorkspaceElementType.DataCollection]: {
|
|
10240
10017
|
type: exports.WorkspaceElementType.DataCollection,
|
|
@@ -10248,36 +10025,43 @@ const WorkspaceElementSpecs = {
|
|
|
10248
10025
|
name: 'Data Source',
|
|
10249
10026
|
namePlural: 'Data Sources',
|
|
10250
10027
|
parentFieldKey: 'universalDataSourceId',
|
|
10028
|
+
isMembraneInterface: true,
|
|
10029
|
+
isIntegrationLevel: true,
|
|
10251
10030
|
},
|
|
10252
10031
|
[exports.WorkspaceElementType.DataSourceInstance]: {
|
|
10253
10032
|
type: exports.WorkspaceElementType.DataSourceInstance,
|
|
10254
10033
|
apiPath: 'data-source-instances',
|
|
10255
10034
|
name: 'Data Source Instance',
|
|
10256
10035
|
namePlural: 'Data Source Instances',
|
|
10036
|
+
isMembraneInterface: true,
|
|
10257
10037
|
},
|
|
10258
10038
|
[exports.WorkspaceElementType.DataLinkTable]: {
|
|
10259
10039
|
type: exports.WorkspaceElementType.DataLinkTable,
|
|
10260
10040
|
apiPath: 'data-link-tables',
|
|
10261
10041
|
name: 'Data Link Table',
|
|
10262
10042
|
namePlural: 'Data Link Tables',
|
|
10043
|
+
isMembraneInterface: true,
|
|
10263
10044
|
},
|
|
10264
10045
|
[exports.WorkspaceElementType.DataLinkTableInstance]: {
|
|
10265
10046
|
type: exports.WorkspaceElementType.DataLinkTableInstance,
|
|
10266
10047
|
apiPath: 'data-link-table-instances',
|
|
10267
10048
|
name: 'Data Link Table Instance',
|
|
10268
10049
|
namePlural: 'Data Link Table Instances',
|
|
10050
|
+
isMembraneInterface: true,
|
|
10269
10051
|
},
|
|
10270
10052
|
[exports.WorkspaceElementType.AppEventType]: {
|
|
10271
10053
|
type: exports.WorkspaceElementType.AppEventType,
|
|
10272
10054
|
apiPath: 'app-event-types',
|
|
10273
10055
|
name: 'App Event Type',
|
|
10274
10056
|
namePlural: 'App Event Types',
|
|
10057
|
+
isMembraneInterface: true,
|
|
10275
10058
|
},
|
|
10276
10059
|
[exports.WorkspaceElementType.AppEventSubscription]: {
|
|
10277
10060
|
type: exports.WorkspaceElementType.AppEventSubscription,
|
|
10278
10061
|
apiPath: 'app-event-subscriptions',
|
|
10279
10062
|
name: 'App Event Subscription',
|
|
10280
10063
|
namePlural: 'App Event Subscriptions',
|
|
10064
|
+
isMembraneInterface: true,
|
|
10281
10065
|
},
|
|
10282
10066
|
[exports.WorkspaceElementType.AppEventLogRecord]: {
|
|
10283
10067
|
type: exports.WorkspaceElementType.AppEventLogRecord,
|
|
@@ -10290,18 +10074,21 @@ const WorkspaceElementSpecs = {
|
|
|
10290
10074
|
apiPath: 'app-data-schemas',
|
|
10291
10075
|
name: 'App Data Schema',
|
|
10292
10076
|
namePlural: 'App Data Schemas',
|
|
10077
|
+
isMembraneInterface: true,
|
|
10293
10078
|
},
|
|
10294
10079
|
[exports.WorkspaceElementType.AppDataSchemaInstance]: {
|
|
10295
10080
|
type: exports.WorkspaceElementType.AppDataSchemaInstance,
|
|
10296
10081
|
apiPath: 'app-data-schema-instances',
|
|
10297
10082
|
name: 'App Data Schema Instance',
|
|
10298
10083
|
namePlural: 'App Data Schema Instances',
|
|
10084
|
+
isMembraneInterface: true,
|
|
10299
10085
|
},
|
|
10300
10086
|
[exports.WorkspaceElementType.ExternalEventSubscription]: {
|
|
10301
10087
|
type: exports.WorkspaceElementType.ExternalEventSubscription,
|
|
10302
10088
|
apiPath: 'external-event-subscriptions',
|
|
10303
10089
|
name: 'External Event Subscription',
|
|
10304
10090
|
namePlural: 'External Event Subscriptions',
|
|
10091
|
+
isMembraneInterface: true,
|
|
10305
10092
|
},
|
|
10306
10093
|
[exports.WorkspaceElementType.ExternalEventLogRecord]: {
|
|
10307
10094
|
type: exports.WorkspaceElementType.ExternalEventLogRecord,
|
|
@@ -10320,6 +10107,7 @@ const WorkspaceElementSpecs = {
|
|
|
10320
10107
|
apiPath: 'screens',
|
|
10321
10108
|
name: 'Screen',
|
|
10322
10109
|
namePlural: 'Screens',
|
|
10110
|
+
isMembraneInterface: true,
|
|
10323
10111
|
},
|
|
10324
10112
|
};
|
|
10325
10113
|
|
|
@@ -10604,7 +10392,7 @@ function extractMembraneErrorData(error) {
|
|
|
10604
10392
|
};
|
|
10605
10393
|
}
|
|
10606
10394
|
if (error instanceof zod.ZodError) {
|
|
10607
|
-
data.message =
|
|
10395
|
+
data.message = v4.fromError(error).toString();
|
|
10608
10396
|
}
|
|
10609
10397
|
return data;
|
|
10610
10398
|
}
|
|
@@ -10695,6 +10483,29 @@ function timestampToDate(value) {
|
|
|
10695
10483
|
}
|
|
10696
10484
|
}
|
|
10697
10485
|
|
|
10486
|
+
const ONE_DAY_IN_MS = 24 * 60 * 60 * 1000;
|
|
10487
|
+
function isBusinessDay(date) {
|
|
10488
|
+
const dayOfWeek = date.getDay();
|
|
10489
|
+
return dayOfWeek >= 1 && dayOfWeek <= 5;
|
|
10490
|
+
}
|
|
10491
|
+
function getBusinessDaysBetween(startDate, endDate) {
|
|
10492
|
+
const businessDays = new Set();
|
|
10493
|
+
if (endDate < startDate) {
|
|
10494
|
+
return businessDays;
|
|
10495
|
+
}
|
|
10496
|
+
const startTime = Date.UTC(startDate.getFullYear(), startDate.getMonth(), startDate.getDate());
|
|
10497
|
+
const endTime = Date.UTC(endDate.getFullYear(), endDate.getMonth(), endDate.getDate());
|
|
10498
|
+
const dayCount = Math.floor((endTime - startTime) / ONE_DAY_IN_MS) + 1;
|
|
10499
|
+
for (let i = 0; i < dayCount; i++) {
|
|
10500
|
+
const currentTime = startTime + i * ONE_DAY_IN_MS;
|
|
10501
|
+
const currentDate = new Date(currentTime);
|
|
10502
|
+
if (isBusinessDay(currentDate)) {
|
|
10503
|
+
businessDays.add(currentDate.toISOString().split('T')[0]);
|
|
10504
|
+
}
|
|
10505
|
+
}
|
|
10506
|
+
return businessDays;
|
|
10507
|
+
}
|
|
10508
|
+
|
|
10698
10509
|
exports.UsageType = void 0;
|
|
10699
10510
|
(function (UsageType) {
|
|
10700
10511
|
UsageType["FLOW_RUNS_DURATION"] = "flow-runs-duration";
|
|
@@ -11114,11 +10925,6 @@ class ActionAccessor extends ElementAccessor {
|
|
|
11114
10925
|
path: 'action',
|
|
11115
10926
|
});
|
|
11116
10927
|
}
|
|
11117
|
-
async apply(integrationKeys) {
|
|
11118
|
-
return await this.options.client.post(this.getPath('apply'), {
|
|
11119
|
-
integrationKeys,
|
|
11120
|
-
});
|
|
11121
|
-
}
|
|
11122
10928
|
async reset() {
|
|
11123
10929
|
return await this.options.client.post(this.getPath('reset'));
|
|
11124
10930
|
}
|
|
@@ -11139,6 +10945,231 @@ class IntegrationLevelActionsListAccessor extends IntegrationLevelElementsListAc
|
|
|
11139
10945
|
}
|
|
11140
10946
|
}
|
|
11141
10947
|
|
|
10948
|
+
const POPUP_ELEMENT_ID = '__integration-app-popup';
|
|
10949
|
+
const CONTAINER_ELEMENT_ID = '__integration-app-container';
|
|
10950
|
+
const CONTAINER_ELEMENT_CLASS = '__integration-app-container';
|
|
10951
|
+
const CONTAINER_ELEMENT_CLASS__LOADER = '__integration-app-container__loader';
|
|
10952
|
+
const BODY_CLASS = '__integration-app-open';
|
|
10953
|
+
const STYLES_ELEMENT_ID = '__integration-app-embed-styles';
|
|
10954
|
+
let IFRAME_START_SHOW_LOADER_TIME = 0;
|
|
10955
|
+
let IFRAME_SHOW_LOADER_TIMEOUT_ID;
|
|
10956
|
+
const IFRAME_SHOW_LOADER_MINIMAL_TIME = 500;
|
|
10957
|
+
const IFRAME_LAYOUT_SHIFT_TIME = 300;
|
|
10958
|
+
function showIframeLoader() {
|
|
10959
|
+
const container = getContainer();
|
|
10960
|
+
container === null || container === void 0 ? void 0 : container.classList.add(CONTAINER_ELEMENT_CLASS__LOADER);
|
|
10961
|
+
IFRAME_START_SHOW_LOADER_TIME = Date.now();
|
|
10962
|
+
}
|
|
10963
|
+
function hideIframeLoader(waitLayoutShift = IFRAME_LAYOUT_SHIFT_TIME) {
|
|
10964
|
+
if (IFRAME_SHOW_LOADER_TIMEOUT_ID) {
|
|
10965
|
+
clearTimeout(IFRAME_SHOW_LOADER_TIMEOUT_ID);
|
|
10966
|
+
}
|
|
10967
|
+
const delta = Date.now() - IFRAME_START_SHOW_LOADER_TIME;
|
|
10968
|
+
if (delta >= IFRAME_SHOW_LOADER_MINIMAL_TIME) {
|
|
10969
|
+
setTimeout(() => {
|
|
10970
|
+
const container = getContainer();
|
|
10971
|
+
container === null || container === void 0 ? void 0 : container.classList.remove(CONTAINER_ELEMENT_CLASS__LOADER);
|
|
10972
|
+
IFRAME_START_SHOW_LOADER_TIME = 0;
|
|
10973
|
+
}, waitLayoutShift);
|
|
10974
|
+
return;
|
|
10975
|
+
}
|
|
10976
|
+
else {
|
|
10977
|
+
const waitLayoutShift = delta >= IFRAME_LAYOUT_SHIFT_TIME ? 0 : IFRAME_LAYOUT_SHIFT_TIME - delta;
|
|
10978
|
+
const timeoutTime = IFRAME_SHOW_LOADER_MINIMAL_TIME - delta;
|
|
10979
|
+
IFRAME_SHOW_LOADER_TIMEOUT_ID = setTimeout(() => {
|
|
10980
|
+
hideIframeLoader(waitLayoutShift);
|
|
10981
|
+
}, timeoutTime);
|
|
10982
|
+
return;
|
|
10983
|
+
}
|
|
10984
|
+
}
|
|
10985
|
+
async function openIframe(uri, callbacks = {}, { mountTargetSelector } = {}) {
|
|
10986
|
+
close();
|
|
10987
|
+
init(mountTargetSelector);
|
|
10988
|
+
return new Promise((resolve) => {
|
|
10989
|
+
function complete(callback) {
|
|
10990
|
+
close(callback);
|
|
10991
|
+
resolve();
|
|
10992
|
+
}
|
|
10993
|
+
function doOpen() {
|
|
10994
|
+
const iframe = document.createElement('iframe');
|
|
10995
|
+
iframe.src = uri;
|
|
10996
|
+
iframe.id = POPUP_ELEMENT_ID;
|
|
10997
|
+
iframe.onload = () => {
|
|
10998
|
+
hideIframeLoader();
|
|
10999
|
+
};
|
|
11000
|
+
if (!!getContainer()) {
|
|
11001
|
+
document.body.classList.add(BODY_CLASS);
|
|
11002
|
+
showIframeLoader();
|
|
11003
|
+
appendToContainer(iframe);
|
|
11004
|
+
handleIframeUnmount(iframe);
|
|
11005
|
+
penpal.connectToChild({
|
|
11006
|
+
iframe,
|
|
11007
|
+
methods: {
|
|
11008
|
+
...callbacks,
|
|
11009
|
+
handshake: (...args) => {
|
|
11010
|
+
var _a;
|
|
11011
|
+
hideIframeLoader();
|
|
11012
|
+
(_a = callbacks === null || callbacks === void 0 ? void 0 : callbacks.handshake) === null || _a === void 0 ? void 0 : _a.call(callbacks, ...args);
|
|
11013
|
+
},
|
|
11014
|
+
close: () => complete(callbacks.onClose),
|
|
11015
|
+
},
|
|
11016
|
+
});
|
|
11017
|
+
}
|
|
11018
|
+
else {
|
|
11019
|
+
throw Error('Membrane container element not found. Was it manually removed?');
|
|
11020
|
+
}
|
|
11021
|
+
}
|
|
11022
|
+
if (document.readyState === 'complete' || document.readyState === 'interactive') {
|
|
11023
|
+
doOpen();
|
|
11024
|
+
}
|
|
11025
|
+
else {
|
|
11026
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
11027
|
+
doOpen();
|
|
11028
|
+
});
|
|
11029
|
+
}
|
|
11030
|
+
});
|
|
11031
|
+
}
|
|
11032
|
+
function close(callback) {
|
|
11033
|
+
document.body.classList.remove(BODY_CLASS);
|
|
11034
|
+
if (!!getContainer()) {
|
|
11035
|
+
deleteContainer();
|
|
11036
|
+
if (callback) {
|
|
11037
|
+
callback();
|
|
11038
|
+
}
|
|
11039
|
+
}
|
|
11040
|
+
}
|
|
11041
|
+
function init(mountTargetSelector) {
|
|
11042
|
+
var _a;
|
|
11043
|
+
injectStyles(mountTargetSelector);
|
|
11044
|
+
if (!!getContainer()) {
|
|
11045
|
+
return;
|
|
11046
|
+
}
|
|
11047
|
+
const container = createContainer();
|
|
11048
|
+
if (mountTargetSelector && document.querySelector(mountTargetSelector)) {
|
|
11049
|
+
(_a = document.querySelector(mountTargetSelector)) === null || _a === void 0 ? void 0 : _a.appendChild(container);
|
|
11050
|
+
}
|
|
11051
|
+
else {
|
|
11052
|
+
document.body.appendChild(container);
|
|
11053
|
+
}
|
|
11054
|
+
}
|
|
11055
|
+
function injectStyles(mountTargetSelector) {
|
|
11056
|
+
const hasCustomMountTarget = Boolean(mountTargetSelector && document.querySelector(mountTargetSelector));
|
|
11057
|
+
const styles = [
|
|
11058
|
+
`.${CONTAINER_ELEMENT_CLASS}:empty {
|
|
11059
|
+
display: none;
|
|
11060
|
+
}`,
|
|
11061
|
+
hasCustomMountTarget
|
|
11062
|
+
? `.${CONTAINER_ELEMENT_CLASS} {
|
|
11063
|
+
inset: 0;
|
|
11064
|
+
background: rgba(0, 0, 0, 0);
|
|
11065
|
+
transition: background 0.2s ease-out;
|
|
11066
|
+
display: flex;
|
|
11067
|
+
justify-content: center;
|
|
11068
|
+
align-items: center;
|
|
11069
|
+
width: 100%;
|
|
11070
|
+
height: 100%;
|
|
11071
|
+
}`
|
|
11072
|
+
: `.${CONTAINER_ELEMENT_CLASS} {
|
|
11073
|
+
position: fixed;
|
|
11074
|
+
inset: 0;
|
|
11075
|
+
z-index: 2147483647;
|
|
11076
|
+
display: flex;
|
|
11077
|
+
justify-content: center;
|
|
11078
|
+
align-items: center;
|
|
11079
|
+
pointer-events: auto;
|
|
11080
|
+
background: rgba(0, 0, 0, 0);
|
|
11081
|
+
transition: background 0.2s ease-out;
|
|
11082
|
+
}`,
|
|
11083
|
+
`.${CONTAINER_ELEMENT_CLASS}.${CONTAINER_ELEMENT_CLASS__LOADER} {
|
|
11084
|
+
background: rgba(0, 0, 0, 0.8);
|
|
11085
|
+
}`,
|
|
11086
|
+
`.${CONTAINER_ELEMENT_CLASS}.${CONTAINER_ELEMENT_CLASS__LOADER}::before {
|
|
11087
|
+
${hasCustomMountTarget ? 'position: absolute;' : ''}
|
|
11088
|
+
content: "";
|
|
11089
|
+
width: 5rem;
|
|
11090
|
+
height: 4rem;
|
|
11091
|
+
background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 32 22" fill="%23000" xmlns="http://www.w3.org/2000/svg" %3E%3Cdefs%3E%3Cmask id="a"%3E%3Crect width="100%25" height="100%25" fill="%23fff" /%3E%3Cpath d="M11.8 13.12a3 3 0 0 1 0-4.24l7.08-7.07a3 3 0 0 1 4.24 0l7.07 7.07a3 3 0 0 1 0 4.24l-7.07 7.07a3 3 0 0 1-4.24 0l-7.07-7.07Z"%3E%3CanimateTransform attributeName="transform" attributeType="XML" type="rotate" repeatCount="indefinite" calcMode="spline" keyTimes="0;1" dur="5s" keySplines="0 0 0.1 1" from="0 21 11" to="-360 21 11" /%3E%3C/path%3E%3C/mask%3E%3Cmask id="b"%3E%3Crect width="100%25" height="100%25" fill="%23fff"/%3E%3Cpath fill-rule="evenodd" clip-rule="evenodd" d="M1.8 8.88a3 3 0 0 0 0 4.24l7.08 7.07a3 3 0 0 0 4.24 0l7.07-7.07a3 3 0 0 0 0-4.24L13.12 1.8a3 3 0 0 0-4.24 0L1.8 8.88Zm.71.7a2 2 0 0 0 0 2.83L9.6 19.5a2 2 0 0 0 2.82 0l7.08-7.08a2 2 0 0 0 0-2.82l-7.1-7.1a2 2 0 0 0-2.82 0L2.5 9.6Z" %3E%3CanimateTransform attributeName="transform" attributeType="XML" type="rotate" repeatCount="indefinite" calcMode="spline" keyTimes="0;1" dur="5s" keySplines="0 0 0.1 1" from="0 11 11" to="720 11 11" /%3E%3C/path%3E%3C/mask%3E%3C/defs%3E%3Cg mask="url(%23a)"%3E%3Cpath fill-rule="evenodd" clip-rule="evenodd" d="M1.8 8.88a3 3 0 0 0 0 4.24l7.08 7.07a3 3 0 0 0 4.24 0l7.07-7.07a3 3 0 0 0 0-4.24L13.12 1.8a3 3 0 0 0-4.24 0L1.8 8.88Zm.71.7a2 2 0 0 0 0 2.83L9.6 19.5a2 2 0 0 0 2.82 0l7.08-7.08a2 2 0 0 0 0-2.82l-7.1-7.1a2 2 0 0 0-2.82 0L2.5 9.6Z"%0A%3E%3CanimateTransform attributeName="transform" attributeType="XML" type="rotate" repeatCount="indefinite" calcMode="spline" keyTimes="0;1" dur="5s" keySplines="0 0 0.1 1" from="0 11 11" to="720 11 11" /%3E%3C/path%3E%3C/g%3E%3Cg mask="url(%23b)"%3E%3Cpath d="M11.8 13.12a3 3 0 0 1 0-4.24l7.08-7.07a3 3 0 0 1 4.24 0l7.07 7.07a3 3 0 0 1 0 4.24l-7.07 7.07a3 3 0 0 1-4.24 0l-7.07-7.07Z"%3E%3CanimateTransform attributeName="transform" attributeType="XML" type="rotate" repeatCount="indefinite" calcMode="spline" keyTimes="0;1" dur="5s" keySplines="0 0 0.1 1" from="0 21 11" to="-360 21 11" /%3E%3C/path%3E%3C/g%3E%3C/svg%3E');
|
|
11092
|
+
background-size: contain;
|
|
11093
|
+
background-repeat: no-repeat;
|
|
11094
|
+
background-position: center;
|
|
11095
|
+
filter: invert(1);
|
|
11096
|
+
}`,
|
|
11097
|
+
`.${CONTAINER_ELEMENT_CLASS} iframe {
|
|
11098
|
+
${hasCustomMountTarget ? '' : 'position: absolute;'}
|
|
11099
|
+
width: 100%;
|
|
11100
|
+
height: 100%;
|
|
11101
|
+
border-width: 0;
|
|
11102
|
+
|
|
11103
|
+
/* fix transparent bg, because iframe document has light scheme */
|
|
11104
|
+
color-scheme: light;
|
|
11105
|
+
}`,
|
|
11106
|
+
`.${CONTAINER_ELEMENT_CLASS}.${CONTAINER_ELEMENT_CLASS__LOADER} iframe {
|
|
11107
|
+
visibility: hidden;
|
|
11108
|
+
}`,
|
|
11109
|
+
!hasCustomMountTarget
|
|
11110
|
+
? `body.${BODY_CLASS} {
|
|
11111
|
+
overflow: hidden;
|
|
11112
|
+
}`
|
|
11113
|
+
: '',
|
|
11114
|
+
];
|
|
11115
|
+
let styleElement = document.getElementById(STYLES_ELEMENT_ID);
|
|
11116
|
+
if (!styleElement) {
|
|
11117
|
+
styleElement = document.createElement('style');
|
|
11118
|
+
styleElement.id = STYLES_ELEMENT_ID;
|
|
11119
|
+
styleElement.type = 'text/css';
|
|
11120
|
+
document.head.appendChild(styleElement);
|
|
11121
|
+
}
|
|
11122
|
+
styleElement.textContent = styles.join('\n');
|
|
11123
|
+
}
|
|
11124
|
+
function removeInjectedStyles() {
|
|
11125
|
+
const stylesElement = document.getElementById(STYLES_ELEMENT_ID);
|
|
11126
|
+
if (stylesElement) {
|
|
11127
|
+
stylesElement.remove();
|
|
11128
|
+
}
|
|
11129
|
+
}
|
|
11130
|
+
function createContainer() {
|
|
11131
|
+
const container = document.createElement('div');
|
|
11132
|
+
container.id = CONTAINER_ELEMENT_ID;
|
|
11133
|
+
container.classList.add(CONTAINER_ELEMENT_CLASS);
|
|
11134
|
+
return container;
|
|
11135
|
+
}
|
|
11136
|
+
function getContainer() {
|
|
11137
|
+
return document.getElementById(CONTAINER_ELEMENT_ID);
|
|
11138
|
+
}
|
|
11139
|
+
function appendToContainer(el) {
|
|
11140
|
+
const container = getContainer();
|
|
11141
|
+
container === null || container === void 0 ? void 0 : container.appendChild(el);
|
|
11142
|
+
}
|
|
11143
|
+
function deleteContainer() {
|
|
11144
|
+
const container = getContainer();
|
|
11145
|
+
if (container) {
|
|
11146
|
+
container.remove();
|
|
11147
|
+
}
|
|
11148
|
+
removeInjectedStyles();
|
|
11149
|
+
}
|
|
11150
|
+
function handleIframeUnmount(iframe) {
|
|
11151
|
+
const observer = new MutationObserver((mutationsList) => {
|
|
11152
|
+
for (const mutation of mutationsList) {
|
|
11153
|
+
for (const removedNode of mutation.removedNodes) {
|
|
11154
|
+
if (removedNode instanceof HTMLElement && removedNode.id === POPUP_ELEMENT_ID) {
|
|
11155
|
+
observer.disconnect();
|
|
11156
|
+
deleteContainer();
|
|
11157
|
+
return;
|
|
11158
|
+
}
|
|
11159
|
+
}
|
|
11160
|
+
}
|
|
11161
|
+
});
|
|
11162
|
+
const parent = iframe.parentNode;
|
|
11163
|
+
if (parent) {
|
|
11164
|
+
observer.observe(parent, {
|
|
11165
|
+
childList: true,
|
|
11166
|
+
});
|
|
11167
|
+
}
|
|
11168
|
+
else {
|
|
11169
|
+
console.warn(`iframe with ID "${POPUP_ELEMENT_ID}" has no parent node`);
|
|
11170
|
+
}
|
|
11171
|
+
}
|
|
11172
|
+
|
|
11142
11173
|
class ConnectionLevelElementAccessor {
|
|
11143
11174
|
constructor(client, connectionSelector, selector, elementKey, query) {
|
|
11144
11175
|
this.client = client;
|
|
@@ -11250,11 +11281,6 @@ class DataSourceAccessor extends ElementAccessor {
|
|
|
11250
11281
|
path: 'data-source',
|
|
11251
11282
|
});
|
|
11252
11283
|
}
|
|
11253
|
-
async apply(integrationKeys) {
|
|
11254
|
-
return await this.options.client.post(this.getPath('apply'), {
|
|
11255
|
-
integrationKeys,
|
|
11256
|
-
});
|
|
11257
|
-
}
|
|
11258
11284
|
async setup() {
|
|
11259
11285
|
await this.options.client.post(this.getPath('setup'));
|
|
11260
11286
|
}
|
|
@@ -11997,11 +12023,6 @@ class FlowAccessor extends ElementAccessor {
|
|
|
11997
12023
|
path: 'flow',
|
|
11998
12024
|
});
|
|
11999
12025
|
}
|
|
12000
|
-
async apply(integrationKeys) {
|
|
12001
|
-
return await this.options.client.post(this.getPath('apply'), {
|
|
12002
|
-
integrationKeys,
|
|
12003
|
-
});
|
|
12004
|
-
}
|
|
12005
12026
|
async reset() {
|
|
12006
12027
|
return await this.options.client.post(this.getPath('reset'));
|
|
12007
12028
|
}
|
|
@@ -12038,11 +12059,6 @@ class FieldMappingAccessor extends ElementAccessor {
|
|
|
12038
12059
|
async getAppSchema() {
|
|
12039
12060
|
return await this.options.client.get(this.getPath('app-schema'));
|
|
12040
12061
|
}
|
|
12041
|
-
async apply(integrationKeys) {
|
|
12042
|
-
return await this.options.client.post(this.getPath('apply'), {
|
|
12043
|
-
integrationKeys,
|
|
12044
|
-
});
|
|
12045
|
-
}
|
|
12046
12062
|
async setup() {
|
|
12047
12063
|
return await this.options.client.post(this.getPath('setup'));
|
|
12048
12064
|
}
|
|
@@ -12382,20 +12398,20 @@ const HandyScenarioTemplateElement = zod.z.object({
|
|
|
12382
12398
|
key: zod.z.string(),
|
|
12383
12399
|
name: zod.z.string(),
|
|
12384
12400
|
})
|
|
12385
|
-
.and(zod.z.record(zod.z.any())),
|
|
12401
|
+
.and(zod.z.record(zod.z.string(), zod.z.any())),
|
|
12386
12402
|
});
|
|
12387
12403
|
const withIntegrationKeys = (schema) => schema.and(zod.z.object({ integrationKeys: zod.z.array(zod.z.string()).optional() }));
|
|
12388
12404
|
const ElementsExportFields = zod.z.object({
|
|
12389
|
-
flows: zod.z.record(withIntegrationKeys(zod.z.any())).optional(),
|
|
12390
|
-
actions: zod.z.record(withIntegrationKeys(zod.z.any())).optional(),
|
|
12391
|
-
fieldMappings: zod.z.record(withIntegrationKeys(zod.z.any())).optional(),
|
|
12392
|
-
dataSources: zod.z.record(withIntegrationKeys(zod.z.any())).optional(),
|
|
12393
|
-
dataLinkTables: zod.z.record(zod.z.any()).optional(),
|
|
12394
|
-
appEventTypes: zod.z.record(zod.z.any()).optional(),
|
|
12395
|
-
appDataSchemas: zod.z.record(zod.z.any()).optional(),
|
|
12405
|
+
flows: zod.z.record(zod.z.string(), withIntegrationKeys(zod.z.any())).optional(),
|
|
12406
|
+
actions: zod.z.record(zod.z.string(), withIntegrationKeys(zod.z.any())).optional(),
|
|
12407
|
+
fieldMappings: zod.z.record(zod.z.string(), withIntegrationKeys(zod.z.any())).optional(),
|
|
12408
|
+
dataSources: zod.z.record(zod.z.string(), withIntegrationKeys(zod.z.any())).optional(),
|
|
12409
|
+
dataLinkTables: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
12410
|
+
appEventTypes: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
12411
|
+
appDataSchemas: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
12396
12412
|
});
|
|
12397
12413
|
const ScenarioTemplateElements = ElementsExportFields.and(zod.z.object({
|
|
12398
|
-
integrations: zod.z.record(ElementsExportFields.and(zod.z.object({ connectorId: zod.z.string() }))).optional(),
|
|
12414
|
+
integrations: zod.z.record(zod.z.string(), ElementsExportFields.and(zod.z.object({ connectorId: zod.z.string() }))).optional(),
|
|
12399
12415
|
}));
|
|
12400
12416
|
const ScenarioTemplate = zod.z.object({
|
|
12401
12417
|
id: zod.z.string(),
|
|
@@ -12407,7 +12423,7 @@ const ScenarioTemplate = zod.z.object({
|
|
|
12407
12423
|
demoAppUri: zod.z.string().optional(),
|
|
12408
12424
|
demoGithubRepo: zod.z.string().optional(),
|
|
12409
12425
|
demoVideoYoutubeUri: zod.z.string().optional(),
|
|
12410
|
-
tags: zod.z.array(zod.z.
|
|
12426
|
+
tags: zod.z.array(zod.z.enum(exports.ScenarioTemplateCategory)).optional(),
|
|
12411
12427
|
elements: ScenarioTemplateElements.optional(),
|
|
12412
12428
|
connectors: zod.z.array(MinimalConnector).optional(),
|
|
12413
12429
|
handyElements: zod.z.array(HandyScenarioTemplateElement).optional(),
|
|
@@ -13157,14 +13173,12 @@ exports.NotAuthenticatedError = NotAuthenticatedError;
|
|
|
13157
13173
|
exports.NotFoundError = NotFoundError;
|
|
13158
13174
|
exports.OAUTH1_CONFIG_SCHEMA = OAUTH1_CONFIG_SCHEMA;
|
|
13159
13175
|
exports.OAUTH_CONFIG_SCHEMA = OAUTH_CONFIG_SCHEMA;
|
|
13160
|
-
exports.OpenNewConnectionOptions = OpenNewConnectionOptions;
|
|
13161
13176
|
exports.PARALLEL_EXECUTION_LIMITS = PARALLEL_EXECUTION_LIMITS;
|
|
13162
13177
|
exports.PaginationQuery = PaginationQuery;
|
|
13163
13178
|
exports.PaginationResponse = PaginationResponse;
|
|
13164
13179
|
exports.RATE_LIMITS = RATE_LIMITS;
|
|
13165
13180
|
exports.RateLimitExceededError = RateLimitExceededError;
|
|
13166
13181
|
exports.ResetFlowInstanceOptions = ResetFlowInstanceOptions;
|
|
13167
|
-
exports.RunFlowOptions = RunFlowOptions;
|
|
13168
13182
|
exports.ScenarioAccessor = ScenarioAccessor;
|
|
13169
13183
|
exports.ScenarioApiResponse = ScenarioApiResponse;
|
|
13170
13184
|
exports.ScenarioCalculatedProperties = ScenarioCalculatedProperties;
|
|
@@ -13227,6 +13241,7 @@ exports.generateExampleFromSchema = generateExampleFromSchema;
|
|
|
13227
13241
|
exports.getActionInstanceVariableSchema = getActionInstanceVariableSchema;
|
|
13228
13242
|
exports.getActionRunTimeVariablesSchema = getActionRunTimeVariablesSchema;
|
|
13229
13243
|
exports.getAllEventMethodFilePaths = getAllEventMethodFilePaths;
|
|
13244
|
+
exports.getBusinessDaysBetween = getBusinessDaysBetween;
|
|
13230
13245
|
exports.getChildNodeKeys = getChildNodeKeys;
|
|
13231
13246
|
exports.getDataCollectionCreateFields = getDataCollectionCreateFields;
|
|
13232
13247
|
exports.getDataCollectionUpdateFields = getDataCollectionUpdateFields;
|
|
@@ -13271,6 +13286,7 @@ exports.hasCycles = hasCycles;
|
|
|
13271
13286
|
exports.hasFormulas_internalDoNotUse = hasFormulas;
|
|
13272
13287
|
exports.hasMembraneCredentials = hasMembraneCredentials;
|
|
13273
13288
|
exports.injectFormulaCatalog = injectFormulaCatalog;
|
|
13289
|
+
exports.isBusinessDay = isBusinessDay;
|
|
13274
13290
|
exports.isDataActionType = isDataActionType;
|
|
13275
13291
|
exports.isDataLocationMethodSupported = isDataLocationMethodSupported;
|
|
13276
13292
|
exports.isFormula_internalDoNotUse = isFormula;
|