@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.browser.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
|
|
|
15
15
|
exports.ErrorType = void 0;
|
|
@@ -46,7 +46,7 @@ exports.ConcurrencyErrorKey = void 0;
|
|
|
46
46
|
ConcurrencyErrorKey["LOCK_TIMEOUT"] = "lock_timeout";
|
|
47
47
|
})(exports.ConcurrencyErrorKey || (exports.ConcurrencyErrorKey = {}));
|
|
48
48
|
const ErrorDataSchema = zod.z.lazy(() => zod.z.object({
|
|
49
|
-
type: zod.z.
|
|
49
|
+
type: zod.z.enum(exports.ErrorType).optional(),
|
|
50
50
|
key: zod.z.string().optional(),
|
|
51
51
|
message: zod.z.string(),
|
|
52
52
|
data: zod.z.any().optional(),
|
|
@@ -1319,7 +1319,7 @@ const DataSchema = zod.z.lazy(() => zod.z
|
|
|
1319
1319
|
description: zod.z.string().optional(),
|
|
1320
1320
|
type: zod.z.union([zod.z.string(), zod.z.array(zod.z.string())]).optional(),
|
|
1321
1321
|
format: zod.z.string().optional(),
|
|
1322
|
-
properties: zod.z.record(DataSchema).optional(),
|
|
1322
|
+
properties: zod.z.record(zod.z.string(), DataSchema).optional(),
|
|
1323
1323
|
items: DataSchema.optional(),
|
|
1324
1324
|
additionalProperties: zod.z.union([zod.z.boolean(), DataSchema]).optional(),
|
|
1325
1325
|
enum: zod.z.array(zod.z.string()).optional(),
|
|
@@ -1327,7 +1327,7 @@ const DataSchema = zod.z.lazy(() => zod.z
|
|
|
1327
1327
|
referenceCollection: zod.z
|
|
1328
1328
|
.object({
|
|
1329
1329
|
key: zod.z.any().optional(),
|
|
1330
|
-
parameters: zod.z.record(zod.z.any()).optional(),
|
|
1330
|
+
parameters: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
1331
1331
|
})
|
|
1332
1332
|
.optional(),
|
|
1333
1333
|
referenceUdm: zod.z.string().optional(),
|
|
@@ -3440,7 +3440,7 @@ const BaseMembraneInterfaceEditableProperties = zod.z.object({
|
|
|
3440
3440
|
});
|
|
3441
3441
|
const BaseMembraneInterfaceReadOnlyProperties = zod.z.object({
|
|
3442
3442
|
name: zod.z.string(),
|
|
3443
|
-
state: zod.z.
|
|
3443
|
+
state: zod.z.enum(exports.WorkspaceElementState).optional(),
|
|
3444
3444
|
errors: zod.z.array(ErrorDataSchema).optional(),
|
|
3445
3445
|
revision: zod.z.string().optional(),
|
|
3446
3446
|
createdAt: zod.z.string().optional(),
|
|
@@ -3501,7 +3501,7 @@ const FieldMappingEditableProperties = BaseIntegrationLevelMembraneInterfaceEdit
|
|
|
3501
3501
|
dataSourceKey: zod.z.string().optional(),
|
|
3502
3502
|
dataSourceId: zod.z.string().optional(),
|
|
3503
3503
|
appSchema: DataSchema.optional(),
|
|
3504
|
-
direction: zod.z.
|
|
3504
|
+
direction: zod.z.enum(exports.FieldMappingDirection).optional(),
|
|
3505
3505
|
defaultImportValue: zod.z.any().optional(),
|
|
3506
3506
|
defaultExportValue: zod.z.any().optional(),
|
|
3507
3507
|
importValue: zod.z.any().optional(),
|
|
@@ -3627,7 +3627,7 @@ const ActionEditableProperties = BaseIntegrationLevelMembraneInterfaceEditablePr
|
|
|
3627
3627
|
integrationId: zod.z.string().optional(),
|
|
3628
3628
|
parentId: zod.z.string().optional(),
|
|
3629
3629
|
inputSchema: DataSchema.optional(),
|
|
3630
|
-
type: zod.z.
|
|
3630
|
+
type: zod.z.enum(exports.ActionType).optional(),
|
|
3631
3631
|
config: zod.z.any().optional(),
|
|
3632
3632
|
outputMapping: zod.z.any().optional(),
|
|
3633
3633
|
customOutputSchema: DataSchema.optional(),
|
|
@@ -3638,9 +3638,9 @@ const BaseAction = BaseMembraneInterface.merge(ActionEditableProperties).merge(A
|
|
|
3638
3638
|
const ConnectionRequest = zod.z.object({
|
|
3639
3639
|
path: zod.z.any(),
|
|
3640
3640
|
method: zod.z.enum(['GET', 'POST', 'PUT', 'PATCH', 'DELETE']).optional(),
|
|
3641
|
-
pathParameters: zod.z.record(zod.z.string()).optional(),
|
|
3642
|
-
headers: zod.z.record(zod.z.string()).optional(),
|
|
3643
|
-
query: zod.z.record(zod.z.string()).optional(),
|
|
3641
|
+
pathParameters: zod.z.record(zod.z.string(), zod.z.string()).optional(),
|
|
3642
|
+
headers: zod.z.record(zod.z.string(), zod.z.string()).optional(),
|
|
3643
|
+
query: zod.z.record(zod.z.string(), zod.z.string()).optional(),
|
|
3644
3644
|
data: zod.z.any().optional(),
|
|
3645
3645
|
});
|
|
3646
3646
|
const BaseConnection = BaseWorkspaceElement.extend({
|
|
@@ -3649,7 +3649,7 @@ const BaseConnection = BaseWorkspaceElement.extend({
|
|
|
3649
3649
|
isTest: zod.z.boolean().optional(),
|
|
3650
3650
|
disconnected: zod.z.boolean().optional(),
|
|
3651
3651
|
isDefunct: zod.z.boolean().optional(),
|
|
3652
|
-
state: zod.z.
|
|
3652
|
+
state: zod.z.enum(exports.WorkspaceElementState).optional(),
|
|
3653
3653
|
error: ErrorDataSchema.optional(),
|
|
3654
3654
|
integrationId: zod.z.string(),
|
|
3655
3655
|
authOptionKey: zod.z.string().optional(),
|
|
@@ -3659,7 +3659,7 @@ const BaseConnection = BaseWorkspaceElement.extend({
|
|
|
3659
3659
|
nextCredentialsRefreshAt: zod.z.string().optional(),
|
|
3660
3660
|
archivedAt: zod.z.string().optional(),
|
|
3661
3661
|
isDeactivated: zod.z.boolean().optional(),
|
|
3662
|
-
meta: zod.z.record(zod.z.any()).optional(),
|
|
3662
|
+
meta: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
3663
3663
|
});
|
|
3664
3664
|
class ConnectionSpec {
|
|
3665
3665
|
constructor(opts) {
|
|
@@ -3996,10 +3996,10 @@ const DataRecordSchema = zod.z.object({
|
|
|
3996
3996
|
name: zod.z.string().optional(),
|
|
3997
3997
|
uri: zod.z.string().optional(),
|
|
3998
3998
|
iconUri: zod.z.string().optional(),
|
|
3999
|
-
fields: zod.z.record(zod.z.any()).optional(),
|
|
3999
|
+
fields: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
4000
4000
|
udm: zod.z.string().optional(),
|
|
4001
|
-
unifiedFields: zod.z.record(zod.z.any()).optional(),
|
|
4002
|
-
rawFields: zod.z.record(zod.z.any()).optional(),
|
|
4001
|
+
unifiedFields: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
4002
|
+
rawFields: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
4003
4003
|
createdTime: zod.z.string().optional(),
|
|
4004
4004
|
updatedTime: zod.z.string().optional(),
|
|
4005
4005
|
deletedTime: zod.z.string().optional(),
|
|
@@ -8184,10 +8184,10 @@ const DataCollectionEventsSpec = zod.z
|
|
|
8184
8184
|
.catchall(DataCollectionEventTypeSpec);
|
|
8185
8185
|
const DataCollectionUdmSpec = zod.z.object({
|
|
8186
8186
|
fields: zod.z.array(zod.z.string()).optional(),
|
|
8187
|
-
extract: zod.z.record(zod.z.any()).optional(),
|
|
8188
|
-
parse: zod.z.record(zod.z.any()).optional(),
|
|
8187
|
+
extract: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
8188
|
+
parse: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
8189
8189
|
});
|
|
8190
|
-
const DataCollectionUdmsSpec = zod.z.record(DataCollectionUdmSpec);
|
|
8190
|
+
const DataCollectionUdmsSpec = zod.z.record(zod.z.string(), DataCollectionUdmSpec);
|
|
8191
8191
|
const DataCollectionSpec = zod.z.object({
|
|
8192
8192
|
type: zod.z.literal('collection'),
|
|
8193
8193
|
key: zod.z.string().optional(),
|
|
@@ -8207,7 +8207,7 @@ const DataCollectionSpec = zod.z.object({
|
|
|
8207
8207
|
find: DataCollectionFindSpec.optional(),
|
|
8208
8208
|
});
|
|
8209
8209
|
const DataCollectionMethodRequest = zod.z.object({
|
|
8210
|
-
parameters: zod.z.record(zod.z.any()).optional(),
|
|
8210
|
+
parameters: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
8211
8211
|
});
|
|
8212
8212
|
const DataCollectionFindRequest = zod.z.object({
|
|
8213
8213
|
query: zod.z.any().optional(),
|
|
@@ -8223,8 +8223,8 @@ const DataCollectionListRequest = DataCollectionMethodRequest.extend({
|
|
|
8223
8223
|
cursor: zod.z.string().optional(),
|
|
8224
8224
|
});
|
|
8225
8225
|
const DataCollectionListResponseDrilldown = zod.z.object({
|
|
8226
|
-
parameters: zod.z.record(zod.z.any()).optional(),
|
|
8227
|
-
filter: zod.z.record(zod.z.any()).optional(),
|
|
8226
|
+
parameters: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
8227
|
+
filter: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
8228
8228
|
});
|
|
8229
8229
|
const DataCollectionListResponse = zod.z.object({
|
|
8230
8230
|
records: zod.z.array(DataRecordSchema),
|
|
@@ -8247,20 +8247,20 @@ const DataCollectionFindByIdResponse = zod.z.object({
|
|
|
8247
8247
|
record: DataRecordSchema,
|
|
8248
8248
|
});
|
|
8249
8249
|
const DataCollectionMatchRequest = DataCollectionMethodRequest.extend({
|
|
8250
|
-
query: zod.z.record(zod.z.any()),
|
|
8250
|
+
query: zod.z.record(zod.z.string(), zod.z.any()),
|
|
8251
8251
|
});
|
|
8252
8252
|
const DataCollectionMatchResponse = zod.z.object({
|
|
8253
8253
|
record: DataRecordSchema.optional(),
|
|
8254
8254
|
});
|
|
8255
8255
|
const DataCollectionCreateRequest = DataCollectionMethodRequest.extend({
|
|
8256
|
-
fields: zod.z.record(zod.z.any()),
|
|
8256
|
+
fields: zod.z.record(zod.z.string(), zod.z.any()),
|
|
8257
8257
|
});
|
|
8258
8258
|
const DataCollectionCreateResponse = zod.z.object({
|
|
8259
8259
|
id: zod.z.string(),
|
|
8260
8260
|
});
|
|
8261
8261
|
const DataCollectionUpdateRequest = DataCollectionMethodRequest.extend({
|
|
8262
8262
|
id: zod.z.string(),
|
|
8263
|
-
fields: zod.z.record(zod.z.any()),
|
|
8263
|
+
fields: zod.z.record(zod.z.string(), zod.z.any()),
|
|
8264
8264
|
});
|
|
8265
8265
|
const DataCollectionUpdateResponse = zod.z.object({
|
|
8266
8266
|
id: zod.z.string(),
|
|
@@ -8396,7 +8396,7 @@ exports.IncomingWebhooksState = void 0;
|
|
|
8396
8396
|
IncomingWebhooksState["ERROR"] = "error";
|
|
8397
8397
|
})(exports.IncomingWebhooksState || (exports.IncomingWebhooksState = {}));
|
|
8398
8398
|
const ExternalEventUnitConfig = zod.z.object({
|
|
8399
|
-
type: zod.z.
|
|
8399
|
+
type: zod.z.enum(exports.ExternalEventType),
|
|
8400
8400
|
dataSource: DataSourceUnitConfig.optional(),
|
|
8401
8401
|
eventKey: zod.z.string().optional(),
|
|
8402
8402
|
eventParameters: zod.z.any().optional(),
|
|
@@ -8454,11 +8454,11 @@ exports.FlowRunLaunchedByTrigger = void 0;
|
|
|
8454
8454
|
FlowRunLaunchedByTrigger["ExternalEvent"] = "external-event";
|
|
8455
8455
|
})(exports.FlowRunLaunchedByTrigger || (exports.FlowRunLaunchedByTrigger = {}));
|
|
8456
8456
|
const FlowRunLaunchedBy = zod.z.object({
|
|
8457
|
-
type: zod.z.
|
|
8457
|
+
type: zod.z.enum(exports.FlowRunLaunchedByTrigger),
|
|
8458
8458
|
ids: zod.z.array(zod.z.string()).optional(),
|
|
8459
8459
|
});
|
|
8460
8460
|
const FlowRunNode = zod.z.object({
|
|
8461
|
-
state: zod.z.
|
|
8461
|
+
state: zod.z.enum(exports.FlowRunNodeState),
|
|
8462
8462
|
runs: zod.z.number().optional(),
|
|
8463
8463
|
erroredRuns: zod.z.number().optional(),
|
|
8464
8464
|
outputs: zod.z.number().optional(),
|
|
@@ -8473,11 +8473,11 @@ const BaseFlowRun = zod.z.object({
|
|
|
8473
8473
|
startNodeKey: zod.z.string(),
|
|
8474
8474
|
userId: zod.z.string(),
|
|
8475
8475
|
input: zod.z.any().optional(),
|
|
8476
|
-
state: zod.z.
|
|
8476
|
+
state: zod.z.enum(exports.FlowRunState),
|
|
8477
8477
|
startTime: zod.z.string(),
|
|
8478
8478
|
endTime: zod.z.string().optional(),
|
|
8479
8479
|
errors: zod.z.array(ErrorDataSchema).optional(),
|
|
8480
|
-
nodes: zod.z.record(FlowRunNode).optional(),
|
|
8480
|
+
nodes: zod.z.record(zod.z.string(), FlowRunNode).optional(),
|
|
8481
8481
|
launchedBy: FlowRunLaunchedBy.optional(),
|
|
8482
8482
|
});
|
|
8483
8483
|
|
|
@@ -8507,7 +8507,7 @@ const FlowNodeRunOutputSchema = zod.z.object({
|
|
|
8507
8507
|
downstreamRuns: zod.z.array(DownstreamFlowNodeRunSchema),
|
|
8508
8508
|
});
|
|
8509
8509
|
const FlowNodeRunResultSchema = zod.z.object({
|
|
8510
|
-
status: zod.z.
|
|
8510
|
+
status: zod.z.enum(exports.FlowNodeRunStatus),
|
|
8511
8511
|
logs: zod.z.array(zod.z.any()),
|
|
8512
8512
|
outputs: zod.z.array(FlowNodeRunOutputSchema),
|
|
8513
8513
|
errors: zod.z.array(ErrorDataSchema),
|
|
@@ -8525,7 +8525,7 @@ const FlowNodeRunRecordWithoutOutputsDataSchema = zod.z.object({
|
|
|
8525
8525
|
id: zod.z.string(),
|
|
8526
8526
|
upstreamRuns: zod.z.array(UpstreamFlowNodeRunSchema),
|
|
8527
8527
|
input: zod.z.any(),
|
|
8528
|
-
status: zod.z.
|
|
8528
|
+
status: zod.z.enum(exports.FlowNodeRunStatus),
|
|
8529
8529
|
logs: zod.z.array(zod.z.any()),
|
|
8530
8530
|
outputs: zod.z.array(FlowNodeRunOutputMetadataSchema),
|
|
8531
8531
|
errors: zod.z.array(ErrorDataSchema),
|
|
@@ -8830,7 +8830,7 @@ const FlowEditableProperties = BaseIntegrationLevelMembraneInterfaceEditableProp
|
|
|
8830
8830
|
integrationId: zod.z.string().optional(),
|
|
8831
8831
|
universalFlowId: zod.z.string().optional(),
|
|
8832
8832
|
parametersSchema: DataSchema.optional(),
|
|
8833
|
-
nodes: zod.z.record(FlowNode).optional(),
|
|
8833
|
+
nodes: zod.z.record(zod.z.string(), FlowNode).optional(),
|
|
8834
8834
|
autoCreateInstances: zod.z.boolean().optional(),
|
|
8835
8835
|
});
|
|
8836
8836
|
const FlowReadOnlyProperties = BaseIntegrationLevelMembraneInterfaceReadOnlyProperties.extend({
|
|
@@ -8887,7 +8887,7 @@ exports.IntegrationElementType = void 0;
|
|
|
8887
8887
|
|
|
8888
8888
|
const ScenarioElement = zod.z.object({
|
|
8889
8889
|
id: zod.z.string(),
|
|
8890
|
-
type: zod.z.
|
|
8890
|
+
type: zod.z.enum(exports.IntegrationElementType),
|
|
8891
8891
|
element: zod.z.any().optional(),
|
|
8892
8892
|
});
|
|
8893
8893
|
const ScenarioEditableProperties = BaseMembraneInterfaceEditableProperties.extend({
|
|
@@ -8916,11 +8916,11 @@ exports.ScreenBlockType = void 0;
|
|
|
8916
8916
|
})(exports.ScreenBlockType || (exports.ScreenBlockType = {}));
|
|
8917
8917
|
const ScreenBlock = zod.z
|
|
8918
8918
|
.object({
|
|
8919
|
-
type: zod.z.
|
|
8919
|
+
type: zod.z.enum(exports.ScreenBlockType),
|
|
8920
8920
|
})
|
|
8921
|
-
.and(zod.z.record(zod.z.any()));
|
|
8921
|
+
.and(zod.z.record(zod.z.string(), zod.z.any()));
|
|
8922
8922
|
const BaseScreen = BaseWorkspaceElement.extend({
|
|
8923
|
-
type: zod.z.
|
|
8923
|
+
type: zod.z.enum(exports.ScreenType),
|
|
8924
8924
|
key: zod.z.string().optional(),
|
|
8925
8925
|
blocks: zod.z.array(ScreenBlock),
|
|
8926
8926
|
});
|
|
@@ -8928,7 +8928,7 @@ const BaseScreen = BaseWorkspaceElement.extend({
|
|
|
8928
8928
|
const BaseCustomer = zod.z.object({
|
|
8929
8929
|
id: zod.z.string(),
|
|
8930
8930
|
name: zod.z.string(),
|
|
8931
|
-
meta: zod.z.record(zod.z.any()).optional(),
|
|
8931
|
+
meta: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
8932
8932
|
internalId: zod.z.string(),
|
|
8933
8933
|
fields: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
8934
8934
|
credentials: zod.z.any().optional(),
|
|
@@ -8948,11 +8948,11 @@ const BaseFlowInstance = BaseMembraneInterface.extend({
|
|
|
8948
8948
|
instanceKey: zod.z.string().optional(),
|
|
8949
8949
|
parameters: zod.z.any().optional(),
|
|
8950
8950
|
parametersSchema: DataSchema.optional(),
|
|
8951
|
-
nodes: zod.z.record(zod.z.any()).optional(),
|
|
8951
|
+
nodes: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
8952
8952
|
enabled: zod.z.boolean(),
|
|
8953
8953
|
createdAt: zod.z.string(),
|
|
8954
8954
|
updatedAt: zod.z.string(),
|
|
8955
|
-
state: zod.z.
|
|
8955
|
+
state: zod.z.enum(exports.WorkspaceElementState).optional(),
|
|
8956
8956
|
customized: zod.z
|
|
8957
8957
|
.object({
|
|
8958
8958
|
name: zod.z.boolean().optional(),
|
|
@@ -8967,7 +8967,7 @@ exports.FlowInstanceNodeState = void 0;
|
|
|
8967
8967
|
FlowInstanceNodeState["READY"] = "READY";
|
|
8968
8968
|
})(exports.FlowInstanceNodeState || (exports.FlowInstanceNodeState = {}));
|
|
8969
8969
|
const FlowInstanceNode = FlowNode.extend({
|
|
8970
|
-
state: zod.z.
|
|
8970
|
+
state: zod.z.enum(exports.FlowInstanceNodeState).optional(),
|
|
8971
8971
|
errors: zod.z.array(ErrorDataSchema).optional(),
|
|
8972
8972
|
userConfig: zod.z.any().optional(),
|
|
8973
8973
|
testInput: zod.z.any().optional(),
|
|
@@ -9037,7 +9037,7 @@ exports.ActionDependencyType = void 0;
|
|
|
9037
9037
|
ActionDependencyType["DataSource"] = "DataSource";
|
|
9038
9038
|
})(exports.ActionDependencyType || (exports.ActionDependencyType = {}));
|
|
9039
9039
|
const ActionDependency = zod.z.object({
|
|
9040
|
-
type: zod.z.
|
|
9040
|
+
type: zod.z.enum(exports.ActionDependencyType),
|
|
9041
9041
|
key: zod.z.string(),
|
|
9042
9042
|
element: zod.z.any().optional(),
|
|
9043
9043
|
});
|
|
@@ -9046,7 +9046,7 @@ const BaseActionInstance = BaseMembraneInterface.extend({
|
|
|
9046
9046
|
universalParentId: zod.z.string().optional(),
|
|
9047
9047
|
userId: zod.z.string(),
|
|
9048
9048
|
instanceKey: zod.z.string().optional(),
|
|
9049
|
-
type: zod.z.
|
|
9049
|
+
type: zod.z.enum(exports.ActionType).optional(),
|
|
9050
9050
|
inputSchema: zod.z.any().optional(),
|
|
9051
9051
|
config: zod.z.any().optional(),
|
|
9052
9052
|
outputSchema: zod.z.any().optional(),
|
|
@@ -9062,7 +9062,7 @@ const BaseFieldMappingInstance = BaseMembraneInterface.extend({
|
|
|
9062
9062
|
instanceKey: zod.z.string().optional(),
|
|
9063
9063
|
dataSourceInstanceId: zod.z.string().optional(),
|
|
9064
9064
|
dataSourceSchema: DataSchema.optional(),
|
|
9065
|
-
direction: zod.z.
|
|
9065
|
+
direction: zod.z.enum(exports.FieldMappingDirection).optional(),
|
|
9066
9066
|
appSchema: DataSchema.optional(),
|
|
9067
9067
|
importValue: zod.z.any().optional(),
|
|
9068
9068
|
exportValue: zod.z.any().optional(),
|
|
@@ -9071,7 +9071,7 @@ const BaseFieldMappingInstance = BaseMembraneInterface.extend({
|
|
|
9071
9071
|
unifiedImportValue: zod.z.any().optional(),
|
|
9072
9072
|
frozenImportFields: zod.z.array(zod.z.string()).optional(),
|
|
9073
9073
|
frozenExportFields: zod.z.array(zod.z.string()).optional(),
|
|
9074
|
-
state: zod.z.
|
|
9074
|
+
state: zod.z.enum(exports.WorkspaceElementState).optional(),
|
|
9075
9075
|
error: ErrorDataSchema.optional(),
|
|
9076
9076
|
externalSchema: zod.z.any().optional(),
|
|
9077
9077
|
});
|
|
@@ -9099,7 +9099,7 @@ const DataLink = zod.z.object({
|
|
|
9099
9099
|
dataLinkTableInstanceId: zod.z.string(),
|
|
9100
9100
|
externalRecordId: zod.z.string(),
|
|
9101
9101
|
appRecordId: zod.z.string(),
|
|
9102
|
-
direction: zod.z.
|
|
9102
|
+
direction: zod.z.enum(exports.DataLinkDirection),
|
|
9103
9103
|
});
|
|
9104
9104
|
const DataLinkTableConfig = zod.z.object({
|
|
9105
9105
|
key: zod.z.string(),
|
|
@@ -9114,10 +9114,10 @@ exports.HttpRequestMethod = void 0;
|
|
|
9114
9114
|
HttpRequestMethod["DELETE"] = "DELETE";
|
|
9115
9115
|
})(exports.HttpRequestMethod || (exports.HttpRequestMethod = {}));
|
|
9116
9116
|
const HttpRequestSpec = zod.z.object({
|
|
9117
|
-
method: zod.z.string().toUpperCase().pipe(zod.z.
|
|
9117
|
+
method: zod.z.string().toUpperCase().pipe(zod.z.enum(exports.HttpRequestMethod)).optional(),
|
|
9118
9118
|
uri: zod.z.any(),
|
|
9119
|
-
headers: zod.z.record(zod.z.any()).optional(),
|
|
9120
|
-
query: zod.z.record(zod.z.any()).optional(),
|
|
9119
|
+
headers: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
9120
|
+
query: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
9121
9121
|
body: zod.z.any().optional(),
|
|
9122
9122
|
});
|
|
9123
9123
|
const HTTP_REQUEST_SCHEMA = {
|
|
@@ -9197,7 +9197,7 @@ exports.ExternalEventSubscriptionType = void 0;
|
|
|
9197
9197
|
ExternalEventSubscriptionType["ConnectorEvent"] = "connector-event";
|
|
9198
9198
|
})(exports.ExternalEventSubscriptionType || (exports.ExternalEventSubscriptionType = {}));
|
|
9199
9199
|
const ExternalEventSubscriptionConfig = zod.z.object({
|
|
9200
|
-
type: zod.z.
|
|
9200
|
+
type: zod.z.enum(exports.ExternalEventSubscriptionType),
|
|
9201
9201
|
dataSource: DataSourceUnitConfig.optional(),
|
|
9202
9202
|
eventKey: zod.z.string().optional(),
|
|
9203
9203
|
eventParameters: zod.z.any().optional(),
|
|
@@ -9209,7 +9209,7 @@ const BaseExternalEventSubscription = zod.z.object({
|
|
|
9209
9209
|
connectionId: zod.z.string(),
|
|
9210
9210
|
integrationId: zod.z.string(),
|
|
9211
9211
|
config: ExternalEventSubscriptionConfig.optional(),
|
|
9212
|
-
status: zod.z.
|
|
9212
|
+
status: zod.z.enum(exports.ExternalEventSubscriptionStatus).optional(),
|
|
9213
9213
|
error: ErrorDataSchema.optional(),
|
|
9214
9214
|
isRealTime: zod.z.boolean().optional(),
|
|
9215
9215
|
requiresPull: zod.z.boolean().optional(),
|
|
@@ -9240,7 +9240,7 @@ const BaseExternalEventLogRecord = zod.z.object({
|
|
|
9240
9240
|
connectionId: zod.z.string(),
|
|
9241
9241
|
payload: zod.z.any().optional(),
|
|
9242
9242
|
launchedFlowRunIds: zod.z.array(zod.z.string()).optional(),
|
|
9243
|
-
status: zod.z.
|
|
9243
|
+
status: zod.z.enum(exports.ExternalEventLogStatus),
|
|
9244
9244
|
error: ErrorDataSchema.optional(),
|
|
9245
9245
|
});
|
|
9246
9246
|
|
|
@@ -9261,7 +9261,7 @@ const BaseExternalEventPull = zod.z.object({
|
|
|
9261
9261
|
startDatetime: zod.z.string(),
|
|
9262
9262
|
endDatetime: zod.z.string(),
|
|
9263
9263
|
isFullScan: zod.z.boolean().optional(),
|
|
9264
|
-
status: zod.z.
|
|
9264
|
+
status: zod.z.enum(exports.ExternalEventPullStatus),
|
|
9265
9265
|
collectedEventIds: zod.z.array(zod.z.string()),
|
|
9266
9266
|
error: ErrorDataSchema.optional(),
|
|
9267
9267
|
});
|
|
@@ -9277,7 +9277,7 @@ const BaseActionRunLogRecord = BaseWorkspaceElement.extend({
|
|
|
9277
9277
|
connectionId: zod.z.string(),
|
|
9278
9278
|
input: zod.z.any().optional(),
|
|
9279
9279
|
output: zod.z.any().optional(),
|
|
9280
|
-
status: zod.z.
|
|
9280
|
+
status: zod.z.enum(exports.ActionRunLogStatus),
|
|
9281
9281
|
createdAt: zod.z.string(),
|
|
9282
9282
|
completedAt: zod.z.string().optional(),
|
|
9283
9283
|
error: ErrorDataSchema.optional(),
|
|
@@ -9542,12 +9542,6 @@ const ResetFlowInstanceOptions = zod.z.object({
|
|
|
9542
9542
|
nodes: zod.z.record(zod.z.string(), zod.z.boolean()).optional(),
|
|
9543
9543
|
allNodes: zod.z.boolean().optional(),
|
|
9544
9544
|
});
|
|
9545
|
-
const RunFlowOptions = zod.z.object({
|
|
9546
|
-
nodeKey: zod.z.string().optional(),
|
|
9547
|
-
input: zod.z.any().optional(),
|
|
9548
|
-
returnImmediately: zod.z.boolean().optional(),
|
|
9549
|
-
onUpdate: zod.z.function().optional(),
|
|
9550
|
-
});
|
|
9551
9545
|
const FlowInstanceApiResponse = BaseFlowInstance.extend({
|
|
9552
9546
|
user: zod.z.lazy(() => zod.z.any()).optional(),
|
|
9553
9547
|
connection: zod.z.lazy(() => zod.z.any()).optional(),
|
|
@@ -9573,13 +9567,13 @@ const FindFlowRunsQuery = PaginationQuery.extend({
|
|
|
9573
9567
|
flowId: zod.z.string().optional(),
|
|
9574
9568
|
universalFlowId: zod.z.string().optional(),
|
|
9575
9569
|
userId: zod.z.string().optional(),
|
|
9576
|
-
state: zod.z.
|
|
9570
|
+
state: zod.z.enum(exports.FlowRunState).optional(),
|
|
9577
9571
|
integrationId: zod.z.string().optional(),
|
|
9578
9572
|
connectionId: zod.z.string().optional(),
|
|
9579
9573
|
startedAfter: zod.z.string().optional(),
|
|
9580
9574
|
});
|
|
9581
9575
|
const FlowRunLaunchedByApi = zod.z.object({
|
|
9582
|
-
type: zod.z.
|
|
9576
|
+
type: zod.z.enum(exports.FlowRunLaunchedByTrigger),
|
|
9583
9577
|
ids: zod.z.array(zod.z.string()).optional(),
|
|
9584
9578
|
});
|
|
9585
9579
|
const FlowRunApiResponse = BaseFlowRun.extend({
|
|
@@ -9593,235 +9587,6 @@ const FindFlowRunsResponse = zod.z.object({
|
|
|
9593
9587
|
cursor: zod.z.string().optional(),
|
|
9594
9588
|
});
|
|
9595
9589
|
|
|
9596
|
-
const POPUP_ELEMENT_ID = '__integration-app-popup';
|
|
9597
|
-
const CONTAINER_ELEMENT_ID = '__integration-app-container';
|
|
9598
|
-
const CONTAINER_ELEMENT_CLASS = '__integration-app-container';
|
|
9599
|
-
const CONTAINER_ELEMENT_CLASS__LOADER = '__integration-app-container__loader';
|
|
9600
|
-
const BODY_CLASS = '__integration-app-open';
|
|
9601
|
-
const STYLES_ELEMENT_ID = '__integration-app-embed-styles';
|
|
9602
|
-
const OpenConfigurationOptions = zod.z.object({
|
|
9603
|
-
onClose: zod.z.function().optional(),
|
|
9604
|
-
showPoweredBy: zod.z.boolean().optional(),
|
|
9605
|
-
});
|
|
9606
|
-
let IFRAME_START_SHOW_LOADER_TIME = 0;
|
|
9607
|
-
let IFRAME_SHOW_LOADER_TIMEOUT_ID;
|
|
9608
|
-
const IFRAME_SHOW_LOADER_MINIMAL_TIME = 500;
|
|
9609
|
-
const IFRAME_LAYOUT_SHIFT_TIME = 300;
|
|
9610
|
-
function showIframeLoader() {
|
|
9611
|
-
const container = getContainer();
|
|
9612
|
-
container === null || container === void 0 ? void 0 : container.classList.add(CONTAINER_ELEMENT_CLASS__LOADER);
|
|
9613
|
-
IFRAME_START_SHOW_LOADER_TIME = Date.now();
|
|
9614
|
-
}
|
|
9615
|
-
function hideIframeLoader(waitLayoutShift = IFRAME_LAYOUT_SHIFT_TIME) {
|
|
9616
|
-
if (IFRAME_SHOW_LOADER_TIMEOUT_ID) {
|
|
9617
|
-
clearTimeout(IFRAME_SHOW_LOADER_TIMEOUT_ID);
|
|
9618
|
-
}
|
|
9619
|
-
const delta = Date.now() - IFRAME_START_SHOW_LOADER_TIME;
|
|
9620
|
-
if (delta >= IFRAME_SHOW_LOADER_MINIMAL_TIME) {
|
|
9621
|
-
setTimeout(() => {
|
|
9622
|
-
const container = getContainer();
|
|
9623
|
-
container === null || container === void 0 ? void 0 : container.classList.remove(CONTAINER_ELEMENT_CLASS__LOADER);
|
|
9624
|
-
IFRAME_START_SHOW_LOADER_TIME = 0;
|
|
9625
|
-
}, waitLayoutShift);
|
|
9626
|
-
return;
|
|
9627
|
-
}
|
|
9628
|
-
else {
|
|
9629
|
-
const waitLayoutShift = delta >= IFRAME_LAYOUT_SHIFT_TIME ? 0 : IFRAME_LAYOUT_SHIFT_TIME - delta;
|
|
9630
|
-
const timeoutTime = IFRAME_SHOW_LOADER_MINIMAL_TIME - delta;
|
|
9631
|
-
IFRAME_SHOW_LOADER_TIMEOUT_ID = setTimeout(() => {
|
|
9632
|
-
hideIframeLoader(waitLayoutShift);
|
|
9633
|
-
}, timeoutTime);
|
|
9634
|
-
return;
|
|
9635
|
-
}
|
|
9636
|
-
}
|
|
9637
|
-
async function openIframe(uri, callbacks = {}, { mountTargetSelector } = {}) {
|
|
9638
|
-
close();
|
|
9639
|
-
init(mountTargetSelector);
|
|
9640
|
-
return new Promise((resolve) => {
|
|
9641
|
-
function complete(callback) {
|
|
9642
|
-
close(callback);
|
|
9643
|
-
resolve();
|
|
9644
|
-
}
|
|
9645
|
-
function doOpen() {
|
|
9646
|
-
const iframe = document.createElement('iframe');
|
|
9647
|
-
iframe.src = uri;
|
|
9648
|
-
iframe.id = POPUP_ELEMENT_ID;
|
|
9649
|
-
iframe.onload = () => {
|
|
9650
|
-
hideIframeLoader();
|
|
9651
|
-
};
|
|
9652
|
-
if (!!getContainer()) {
|
|
9653
|
-
document.body.classList.add(BODY_CLASS);
|
|
9654
|
-
showIframeLoader();
|
|
9655
|
-
appendToContainer(iframe);
|
|
9656
|
-
handleIframeUnmount(iframe);
|
|
9657
|
-
penpal.connectToChild({
|
|
9658
|
-
iframe,
|
|
9659
|
-
methods: {
|
|
9660
|
-
...callbacks,
|
|
9661
|
-
handshake: (...args) => {
|
|
9662
|
-
var _a;
|
|
9663
|
-
hideIframeLoader();
|
|
9664
|
-
(_a = callbacks === null || callbacks === void 0 ? void 0 : callbacks.handshake) === null || _a === void 0 ? void 0 : _a.call(callbacks, ...args);
|
|
9665
|
-
},
|
|
9666
|
-
close: () => complete(callbacks.onClose),
|
|
9667
|
-
},
|
|
9668
|
-
});
|
|
9669
|
-
}
|
|
9670
|
-
else {
|
|
9671
|
-
throw Error('Membrane container element not found. Was it manually removed?');
|
|
9672
|
-
}
|
|
9673
|
-
}
|
|
9674
|
-
if (document.readyState === 'complete' || document.readyState === 'interactive') {
|
|
9675
|
-
doOpen();
|
|
9676
|
-
}
|
|
9677
|
-
else {
|
|
9678
|
-
document.addEventListener('DOMContentLoaded', () => {
|
|
9679
|
-
doOpen();
|
|
9680
|
-
});
|
|
9681
|
-
}
|
|
9682
|
-
});
|
|
9683
|
-
}
|
|
9684
|
-
function close(callback) {
|
|
9685
|
-
document.body.classList.remove(BODY_CLASS);
|
|
9686
|
-
if (!!getContainer()) {
|
|
9687
|
-
deleteContainer();
|
|
9688
|
-
if (callback) {
|
|
9689
|
-
callback();
|
|
9690
|
-
}
|
|
9691
|
-
}
|
|
9692
|
-
}
|
|
9693
|
-
function init(mountTargetSelector) {
|
|
9694
|
-
var _a;
|
|
9695
|
-
injectStyles(mountTargetSelector);
|
|
9696
|
-
if (!!getContainer()) {
|
|
9697
|
-
return;
|
|
9698
|
-
}
|
|
9699
|
-
const container = createContainer();
|
|
9700
|
-
if (mountTargetSelector && document.querySelector(mountTargetSelector)) {
|
|
9701
|
-
(_a = document.querySelector(mountTargetSelector)) === null || _a === void 0 ? void 0 : _a.appendChild(container);
|
|
9702
|
-
}
|
|
9703
|
-
else {
|
|
9704
|
-
document.body.appendChild(container);
|
|
9705
|
-
}
|
|
9706
|
-
}
|
|
9707
|
-
function injectStyles(mountTargetSelector) {
|
|
9708
|
-
const hasCustomMountTarget = Boolean(mountTargetSelector && document.querySelector(mountTargetSelector));
|
|
9709
|
-
const styles = [
|
|
9710
|
-
`.${CONTAINER_ELEMENT_CLASS}:empty {
|
|
9711
|
-
display: none;
|
|
9712
|
-
}`,
|
|
9713
|
-
hasCustomMountTarget
|
|
9714
|
-
? `.${CONTAINER_ELEMENT_CLASS} {
|
|
9715
|
-
inset: 0;
|
|
9716
|
-
background: rgba(0, 0, 0, 0);
|
|
9717
|
-
transition: background 0.2s ease-out;
|
|
9718
|
-
display: flex;
|
|
9719
|
-
justify-content: center;
|
|
9720
|
-
align-items: center;
|
|
9721
|
-
width: 100%;
|
|
9722
|
-
height: 100%;
|
|
9723
|
-
}`
|
|
9724
|
-
: `.${CONTAINER_ELEMENT_CLASS} {
|
|
9725
|
-
position: fixed;
|
|
9726
|
-
inset: 0;
|
|
9727
|
-
z-index: 2147483647;
|
|
9728
|
-
display: flex;
|
|
9729
|
-
justify-content: center;
|
|
9730
|
-
align-items: center;
|
|
9731
|
-
pointer-events: auto;
|
|
9732
|
-
background: rgba(0, 0, 0, 0);
|
|
9733
|
-
transition: background 0.2s ease-out;
|
|
9734
|
-
}`,
|
|
9735
|
-
`.${CONTAINER_ELEMENT_CLASS}.${CONTAINER_ELEMENT_CLASS__LOADER} {
|
|
9736
|
-
background: rgba(0, 0, 0, 0.8);
|
|
9737
|
-
}`,
|
|
9738
|
-
`.${CONTAINER_ELEMENT_CLASS}.${CONTAINER_ELEMENT_CLASS__LOADER}::before {
|
|
9739
|
-
${hasCustomMountTarget ? 'position: absolute;' : ''}
|
|
9740
|
-
content: "";
|
|
9741
|
-
width: 5rem;
|
|
9742
|
-
height: 4rem;
|
|
9743
|
-
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');
|
|
9744
|
-
background-size: contain;
|
|
9745
|
-
background-repeat: no-repeat;
|
|
9746
|
-
background-position: center;
|
|
9747
|
-
filter: invert(1);
|
|
9748
|
-
}`,
|
|
9749
|
-
`.${CONTAINER_ELEMENT_CLASS} iframe {
|
|
9750
|
-
${hasCustomMountTarget ? '' : 'position: absolute;'}
|
|
9751
|
-
width: 100%;
|
|
9752
|
-
height: 100%;
|
|
9753
|
-
border-width: 0;
|
|
9754
|
-
|
|
9755
|
-
/* fix transparent bg, because iframe document has light scheme */
|
|
9756
|
-
color-scheme: light;
|
|
9757
|
-
}`,
|
|
9758
|
-
`.${CONTAINER_ELEMENT_CLASS}.${CONTAINER_ELEMENT_CLASS__LOADER} iframe {
|
|
9759
|
-
visibility: hidden;
|
|
9760
|
-
}`,
|
|
9761
|
-
!hasCustomMountTarget
|
|
9762
|
-
? `body.${BODY_CLASS} {
|
|
9763
|
-
overflow: hidden;
|
|
9764
|
-
}`
|
|
9765
|
-
: '',
|
|
9766
|
-
];
|
|
9767
|
-
let styleElement = document.getElementById(STYLES_ELEMENT_ID);
|
|
9768
|
-
if (!styleElement) {
|
|
9769
|
-
styleElement = document.createElement('style');
|
|
9770
|
-
styleElement.id = STYLES_ELEMENT_ID;
|
|
9771
|
-
styleElement.type = 'text/css';
|
|
9772
|
-
document.head.appendChild(styleElement);
|
|
9773
|
-
}
|
|
9774
|
-
styleElement.textContent = styles.join('\n');
|
|
9775
|
-
}
|
|
9776
|
-
function removeInjectedStyles() {
|
|
9777
|
-
const stylesElement = document.getElementById(STYLES_ELEMENT_ID);
|
|
9778
|
-
if (stylesElement) {
|
|
9779
|
-
stylesElement.remove();
|
|
9780
|
-
}
|
|
9781
|
-
}
|
|
9782
|
-
function createContainer() {
|
|
9783
|
-
const container = document.createElement('div');
|
|
9784
|
-
container.id = CONTAINER_ELEMENT_ID;
|
|
9785
|
-
container.classList.add(CONTAINER_ELEMENT_CLASS);
|
|
9786
|
-
return container;
|
|
9787
|
-
}
|
|
9788
|
-
function getContainer() {
|
|
9789
|
-
return document.getElementById(CONTAINER_ELEMENT_ID);
|
|
9790
|
-
}
|
|
9791
|
-
function appendToContainer(el) {
|
|
9792
|
-
const container = getContainer();
|
|
9793
|
-
container === null || container === void 0 ? void 0 : container.appendChild(el);
|
|
9794
|
-
}
|
|
9795
|
-
function deleteContainer() {
|
|
9796
|
-
const container = getContainer();
|
|
9797
|
-
if (container) {
|
|
9798
|
-
container.remove();
|
|
9799
|
-
}
|
|
9800
|
-
removeInjectedStyles();
|
|
9801
|
-
}
|
|
9802
|
-
function handleIframeUnmount(iframe) {
|
|
9803
|
-
const observer = new MutationObserver((mutationsList) => {
|
|
9804
|
-
for (const mutation of mutationsList) {
|
|
9805
|
-
for (const removedNode of mutation.removedNodes) {
|
|
9806
|
-
if (removedNode instanceof HTMLElement && removedNode.id === POPUP_ELEMENT_ID) {
|
|
9807
|
-
observer.disconnect();
|
|
9808
|
-
deleteContainer();
|
|
9809
|
-
return;
|
|
9810
|
-
}
|
|
9811
|
-
}
|
|
9812
|
-
}
|
|
9813
|
-
});
|
|
9814
|
-
const parent = iframe.parentNode;
|
|
9815
|
-
if (parent) {
|
|
9816
|
-
observer.observe(parent, {
|
|
9817
|
-
childList: true,
|
|
9818
|
-
});
|
|
9819
|
-
}
|
|
9820
|
-
else {
|
|
9821
|
-
console.warn(`iframe with ID "${POPUP_ELEMENT_ID}" has no parent node`);
|
|
9822
|
-
}
|
|
9823
|
-
}
|
|
9824
|
-
|
|
9825
9590
|
const CreateIntegrationRequest = zod.z.object({
|
|
9826
9591
|
name: zod.z.string().optional(),
|
|
9827
9592
|
key: zod.z.string(),
|
|
@@ -9835,13 +9600,6 @@ const UpdateIntegrationRequest = zod.z.object({
|
|
|
9835
9600
|
logoUri: zod.z.string().optional(),
|
|
9836
9601
|
});
|
|
9837
9602
|
const FindIntegrationsQuery = zod.z.object({}).merge(PaginationQuery).merge(SearchQuery);
|
|
9838
|
-
const OpenNewConnectionOptions = zod.z
|
|
9839
|
-
.object({
|
|
9840
|
-
allowMultipleConnections: zod.z.boolean().optional(),
|
|
9841
|
-
name: zod.z.string().optional(),
|
|
9842
|
-
connectorParameters: zod.z.any().optional(),
|
|
9843
|
-
})
|
|
9844
|
-
.merge(OpenConfigurationOptions);
|
|
9845
9603
|
const IntegrationAuthUi = zod.z.object({
|
|
9846
9604
|
schema: zod.z.any().optional(),
|
|
9847
9605
|
helpUri: zod.z.string().optional(),
|
|
@@ -9862,10 +9620,18 @@ const IntegrationApiResponse = BaseIntegration.extend({
|
|
|
9862
9620
|
|
|
9863
9621
|
const ScenarioElementApi = zod.z.object({
|
|
9864
9622
|
id: zod.z.string(),
|
|
9865
|
-
type: zod.z.
|
|
9623
|
+
type: zod.z.enum(exports.IntegrationElementType),
|
|
9866
9624
|
element: zod.z.any().optional(),
|
|
9867
9625
|
});
|
|
9868
|
-
const FindScenariosQuery = zod.z
|
|
9626
|
+
const FindScenariosQuery = zod.z
|
|
9627
|
+
.object({
|
|
9628
|
+
integrationId: zod.z.string().optional(),
|
|
9629
|
+
integrationKey: zod.z.string().optional(),
|
|
9630
|
+
parentId: zod.z.string().optional(),
|
|
9631
|
+
})
|
|
9632
|
+
.extend(SearchQuery.shape)
|
|
9633
|
+
.extend(PaginationQuery.shape)
|
|
9634
|
+
.extend(IncludeArchivedQuery.shape);
|
|
9869
9635
|
const ScenarioApiResponse = BaseScenario.extend({
|
|
9870
9636
|
appliedToIntegrations: AppliedToIntegrations(BaseScenario).optional(),
|
|
9871
9637
|
});
|
|
@@ -9942,7 +9708,7 @@ const ListExternalEventLogRecordsQuery = CommonListElementsQuery.extend({
|
|
|
9942
9708
|
connectionId: zod.z.string().optional(),
|
|
9943
9709
|
integrationId: zod.z.string().optional(),
|
|
9944
9710
|
externalEventSubscriptionId: zod.z.string().optional(),
|
|
9945
|
-
status: zod.z.
|
|
9711
|
+
status: zod.z.enum(exports.ExternalEventLogStatus).optional(),
|
|
9946
9712
|
});
|
|
9947
9713
|
const ExternalEventLogRecordApiResponse = BaseExternalEventLogRecord.extend({
|
|
9948
9714
|
user: BaseCustomer.optional(),
|
|
@@ -9955,7 +9721,7 @@ const ListExternalEventPullsQuery = CommonListElementsQuery.extend({
|
|
|
9955
9721
|
connectionId: zod.z.string().optional(),
|
|
9956
9722
|
integrationId: zod.z.string().optional(),
|
|
9957
9723
|
externalEventSubscriptionId: zod.z.string().optional(),
|
|
9958
|
-
status: zod.z.
|
|
9724
|
+
status: zod.z.enum(exports.ExternalEventPullStatus).optional(),
|
|
9959
9725
|
});
|
|
9960
9726
|
const ExternalEventPullApiResponse = BaseExternalEventPull.extend({
|
|
9961
9727
|
user: BaseCustomer.optional(),
|
|
@@ -10156,12 +9922,15 @@ const WorkspaceElementSpecs = {
|
|
|
10156
9922
|
editablePropertiesSchema: ScenarioEditableProperties,
|
|
10157
9923
|
apiResponseSchema: ScenarioApiResponse,
|
|
10158
9924
|
findQuerySchema: FindScenariosQuery,
|
|
9925
|
+
isMembraneInterface: true,
|
|
9926
|
+
isIntegrationLevel: true,
|
|
10159
9927
|
},
|
|
10160
9928
|
[exports.WorkspaceElementType.ActionInstance]: {
|
|
10161
9929
|
type: exports.WorkspaceElementType.ActionInstance,
|
|
10162
9930
|
apiPath: 'action-instances',
|
|
10163
9931
|
name: 'Action Instance',
|
|
10164
9932
|
namePlural: 'Action Instances',
|
|
9933
|
+
isMembraneInterface: true,
|
|
10165
9934
|
},
|
|
10166
9935
|
[exports.WorkspaceElementType.Action]: {
|
|
10167
9936
|
type: exports.WorkspaceElementType.Action,
|
|
@@ -10171,6 +9940,8 @@ const WorkspaceElementSpecs = {
|
|
|
10171
9940
|
editablePropertiesSchema: ActionEditableProperties,
|
|
10172
9941
|
apiResponseSchema: ActionApiResponse,
|
|
10173
9942
|
findQuerySchema: FindActionsQuery,
|
|
9943
|
+
isMembraneInterface: true,
|
|
9944
|
+
isIntegrationLevel: true,
|
|
10174
9945
|
},
|
|
10175
9946
|
[exports.WorkspaceElementType.ActionRunLogRecord]: {
|
|
10176
9947
|
type: exports.WorkspaceElementType.ActionRunLogRecord,
|
|
@@ -10184,6 +9955,8 @@ const WorkspaceElementSpecs = {
|
|
|
10184
9955
|
name: 'Flow',
|
|
10185
9956
|
namePlural: 'Flows',
|
|
10186
9957
|
parentFieldKey: 'universalFlowId',
|
|
9958
|
+
isMembraneInterface: true,
|
|
9959
|
+
isIntegrationLevel: true,
|
|
10187
9960
|
},
|
|
10188
9961
|
[exports.WorkspaceElementType.FlowInstance]: {
|
|
10189
9962
|
type: exports.WorkspaceElementType.FlowInstance,
|
|
@@ -10192,6 +9965,7 @@ const WorkspaceElementSpecs = {
|
|
|
10192
9965
|
updateSchema: updateFlowInstanceSchema,
|
|
10193
9966
|
name: 'Flow',
|
|
10194
9967
|
namePlural: 'Flows',
|
|
9968
|
+
isMembraneInterface: true,
|
|
10195
9969
|
},
|
|
10196
9970
|
[exports.WorkspaceElementType.FlowRun]: {
|
|
10197
9971
|
type: exports.WorkspaceElementType.FlowRun,
|
|
@@ -10205,12 +9979,15 @@ const WorkspaceElementSpecs = {
|
|
|
10205
9979
|
name: 'Field Mapping',
|
|
10206
9980
|
namePlural: 'Field Mappings',
|
|
10207
9981
|
parentFieldKey: 'universalFieldMappingId',
|
|
9982
|
+
isMembraneInterface: true,
|
|
9983
|
+
isIntegrationLevel: true,
|
|
10208
9984
|
},
|
|
10209
9985
|
[exports.WorkspaceElementType.FieldMappingInstance]: {
|
|
10210
9986
|
type: exports.WorkspaceElementType.FieldMappingInstance,
|
|
10211
9987
|
apiPath: 'field-mapping-instances',
|
|
10212
9988
|
name: 'Field Mapping Instance',
|
|
10213
9989
|
namePlural: 'Field Mapping Instances',
|
|
9990
|
+
isMembraneInterface: true,
|
|
10214
9991
|
},
|
|
10215
9992
|
[exports.WorkspaceElementType.DataCollection]: {
|
|
10216
9993
|
type: exports.WorkspaceElementType.DataCollection,
|
|
@@ -10224,36 +10001,43 @@ const WorkspaceElementSpecs = {
|
|
|
10224
10001
|
name: 'Data Source',
|
|
10225
10002
|
namePlural: 'Data Sources',
|
|
10226
10003
|
parentFieldKey: 'universalDataSourceId',
|
|
10004
|
+
isMembraneInterface: true,
|
|
10005
|
+
isIntegrationLevel: true,
|
|
10227
10006
|
},
|
|
10228
10007
|
[exports.WorkspaceElementType.DataSourceInstance]: {
|
|
10229
10008
|
type: exports.WorkspaceElementType.DataSourceInstance,
|
|
10230
10009
|
apiPath: 'data-source-instances',
|
|
10231
10010
|
name: 'Data Source Instance',
|
|
10232
10011
|
namePlural: 'Data Source Instances',
|
|
10012
|
+
isMembraneInterface: true,
|
|
10233
10013
|
},
|
|
10234
10014
|
[exports.WorkspaceElementType.DataLinkTable]: {
|
|
10235
10015
|
type: exports.WorkspaceElementType.DataLinkTable,
|
|
10236
10016
|
apiPath: 'data-link-tables',
|
|
10237
10017
|
name: 'Data Link Table',
|
|
10238
10018
|
namePlural: 'Data Link Tables',
|
|
10019
|
+
isMembraneInterface: true,
|
|
10239
10020
|
},
|
|
10240
10021
|
[exports.WorkspaceElementType.DataLinkTableInstance]: {
|
|
10241
10022
|
type: exports.WorkspaceElementType.DataLinkTableInstance,
|
|
10242
10023
|
apiPath: 'data-link-table-instances',
|
|
10243
10024
|
name: 'Data Link Table Instance',
|
|
10244
10025
|
namePlural: 'Data Link Table Instances',
|
|
10026
|
+
isMembraneInterface: true,
|
|
10245
10027
|
},
|
|
10246
10028
|
[exports.WorkspaceElementType.AppEventType]: {
|
|
10247
10029
|
type: exports.WorkspaceElementType.AppEventType,
|
|
10248
10030
|
apiPath: 'app-event-types',
|
|
10249
10031
|
name: 'App Event Type',
|
|
10250
10032
|
namePlural: 'App Event Types',
|
|
10033
|
+
isMembraneInterface: true,
|
|
10251
10034
|
},
|
|
10252
10035
|
[exports.WorkspaceElementType.AppEventSubscription]: {
|
|
10253
10036
|
type: exports.WorkspaceElementType.AppEventSubscription,
|
|
10254
10037
|
apiPath: 'app-event-subscriptions',
|
|
10255
10038
|
name: 'App Event Subscription',
|
|
10256
10039
|
namePlural: 'App Event Subscriptions',
|
|
10040
|
+
isMembraneInterface: true,
|
|
10257
10041
|
},
|
|
10258
10042
|
[exports.WorkspaceElementType.AppEventLogRecord]: {
|
|
10259
10043
|
type: exports.WorkspaceElementType.AppEventLogRecord,
|
|
@@ -10266,18 +10050,21 @@ const WorkspaceElementSpecs = {
|
|
|
10266
10050
|
apiPath: 'app-data-schemas',
|
|
10267
10051
|
name: 'App Data Schema',
|
|
10268
10052
|
namePlural: 'App Data Schemas',
|
|
10053
|
+
isMembraneInterface: true,
|
|
10269
10054
|
},
|
|
10270
10055
|
[exports.WorkspaceElementType.AppDataSchemaInstance]: {
|
|
10271
10056
|
type: exports.WorkspaceElementType.AppDataSchemaInstance,
|
|
10272
10057
|
apiPath: 'app-data-schema-instances',
|
|
10273
10058
|
name: 'App Data Schema Instance',
|
|
10274
10059
|
namePlural: 'App Data Schema Instances',
|
|
10060
|
+
isMembraneInterface: true,
|
|
10275
10061
|
},
|
|
10276
10062
|
[exports.WorkspaceElementType.ExternalEventSubscription]: {
|
|
10277
10063
|
type: exports.WorkspaceElementType.ExternalEventSubscription,
|
|
10278
10064
|
apiPath: 'external-event-subscriptions',
|
|
10279
10065
|
name: 'External Event Subscription',
|
|
10280
10066
|
namePlural: 'External Event Subscriptions',
|
|
10067
|
+
isMembraneInterface: true,
|
|
10281
10068
|
},
|
|
10282
10069
|
[exports.WorkspaceElementType.ExternalEventLogRecord]: {
|
|
10283
10070
|
type: exports.WorkspaceElementType.ExternalEventLogRecord,
|
|
@@ -10296,6 +10083,7 @@ const WorkspaceElementSpecs = {
|
|
|
10296
10083
|
apiPath: 'screens',
|
|
10297
10084
|
name: 'Screen',
|
|
10298
10085
|
namePlural: 'Screens',
|
|
10086
|
+
isMembraneInterface: true,
|
|
10299
10087
|
},
|
|
10300
10088
|
};
|
|
10301
10089
|
|
|
@@ -10580,7 +10368,7 @@ function extractMembraneErrorData(error) {
|
|
|
10580
10368
|
};
|
|
10581
10369
|
}
|
|
10582
10370
|
if (error instanceof zod.ZodError) {
|
|
10583
|
-
data.message =
|
|
10371
|
+
data.message = v4.fromError(error).toString();
|
|
10584
10372
|
}
|
|
10585
10373
|
return data;
|
|
10586
10374
|
}
|
|
@@ -10671,6 +10459,29 @@ function timestampToDate(value) {
|
|
|
10671
10459
|
}
|
|
10672
10460
|
}
|
|
10673
10461
|
|
|
10462
|
+
const ONE_DAY_IN_MS = 24 * 60 * 60 * 1000;
|
|
10463
|
+
function isBusinessDay(date) {
|
|
10464
|
+
const dayOfWeek = date.getDay();
|
|
10465
|
+
return dayOfWeek >= 1 && dayOfWeek <= 5;
|
|
10466
|
+
}
|
|
10467
|
+
function getBusinessDaysBetween(startDate, endDate) {
|
|
10468
|
+
const businessDays = new Set();
|
|
10469
|
+
if (endDate < startDate) {
|
|
10470
|
+
return businessDays;
|
|
10471
|
+
}
|
|
10472
|
+
const startTime = Date.UTC(startDate.getFullYear(), startDate.getMonth(), startDate.getDate());
|
|
10473
|
+
const endTime = Date.UTC(endDate.getFullYear(), endDate.getMonth(), endDate.getDate());
|
|
10474
|
+
const dayCount = Math.floor((endTime - startTime) / ONE_DAY_IN_MS) + 1;
|
|
10475
|
+
for (let i = 0; i < dayCount; i++) {
|
|
10476
|
+
const currentTime = startTime + i * ONE_DAY_IN_MS;
|
|
10477
|
+
const currentDate = new Date(currentTime);
|
|
10478
|
+
if (isBusinessDay(currentDate)) {
|
|
10479
|
+
businessDays.add(currentDate.toISOString().split('T')[0]);
|
|
10480
|
+
}
|
|
10481
|
+
}
|
|
10482
|
+
return businessDays;
|
|
10483
|
+
}
|
|
10484
|
+
|
|
10674
10485
|
exports.UsageType = void 0;
|
|
10675
10486
|
(function (UsageType) {
|
|
10676
10487
|
UsageType["FLOW_RUNS_DURATION"] = "flow-runs-duration";
|
|
@@ -11090,11 +10901,6 @@ class ActionAccessor extends ElementAccessor {
|
|
|
11090
10901
|
path: 'action',
|
|
11091
10902
|
});
|
|
11092
10903
|
}
|
|
11093
|
-
async apply(integrationKeys) {
|
|
11094
|
-
return await this.options.client.post(this.getPath('apply'), {
|
|
11095
|
-
integrationKeys,
|
|
11096
|
-
});
|
|
11097
|
-
}
|
|
11098
10904
|
async reset() {
|
|
11099
10905
|
return await this.options.client.post(this.getPath('reset'));
|
|
11100
10906
|
}
|
|
@@ -11115,6 +10921,231 @@ class IntegrationLevelActionsListAccessor extends IntegrationLevelElementsListAc
|
|
|
11115
10921
|
}
|
|
11116
10922
|
}
|
|
11117
10923
|
|
|
10924
|
+
const POPUP_ELEMENT_ID = '__integration-app-popup';
|
|
10925
|
+
const CONTAINER_ELEMENT_ID = '__integration-app-container';
|
|
10926
|
+
const CONTAINER_ELEMENT_CLASS = '__integration-app-container';
|
|
10927
|
+
const CONTAINER_ELEMENT_CLASS__LOADER = '__integration-app-container__loader';
|
|
10928
|
+
const BODY_CLASS = '__integration-app-open';
|
|
10929
|
+
const STYLES_ELEMENT_ID = '__integration-app-embed-styles';
|
|
10930
|
+
let IFRAME_START_SHOW_LOADER_TIME = 0;
|
|
10931
|
+
let IFRAME_SHOW_LOADER_TIMEOUT_ID;
|
|
10932
|
+
const IFRAME_SHOW_LOADER_MINIMAL_TIME = 500;
|
|
10933
|
+
const IFRAME_LAYOUT_SHIFT_TIME = 300;
|
|
10934
|
+
function showIframeLoader() {
|
|
10935
|
+
const container = getContainer();
|
|
10936
|
+
container === null || container === void 0 ? void 0 : container.classList.add(CONTAINER_ELEMENT_CLASS__LOADER);
|
|
10937
|
+
IFRAME_START_SHOW_LOADER_TIME = Date.now();
|
|
10938
|
+
}
|
|
10939
|
+
function hideIframeLoader(waitLayoutShift = IFRAME_LAYOUT_SHIFT_TIME) {
|
|
10940
|
+
if (IFRAME_SHOW_LOADER_TIMEOUT_ID) {
|
|
10941
|
+
clearTimeout(IFRAME_SHOW_LOADER_TIMEOUT_ID);
|
|
10942
|
+
}
|
|
10943
|
+
const delta = Date.now() - IFRAME_START_SHOW_LOADER_TIME;
|
|
10944
|
+
if (delta >= IFRAME_SHOW_LOADER_MINIMAL_TIME) {
|
|
10945
|
+
setTimeout(() => {
|
|
10946
|
+
const container = getContainer();
|
|
10947
|
+
container === null || container === void 0 ? void 0 : container.classList.remove(CONTAINER_ELEMENT_CLASS__LOADER);
|
|
10948
|
+
IFRAME_START_SHOW_LOADER_TIME = 0;
|
|
10949
|
+
}, waitLayoutShift);
|
|
10950
|
+
return;
|
|
10951
|
+
}
|
|
10952
|
+
else {
|
|
10953
|
+
const waitLayoutShift = delta >= IFRAME_LAYOUT_SHIFT_TIME ? 0 : IFRAME_LAYOUT_SHIFT_TIME - delta;
|
|
10954
|
+
const timeoutTime = IFRAME_SHOW_LOADER_MINIMAL_TIME - delta;
|
|
10955
|
+
IFRAME_SHOW_LOADER_TIMEOUT_ID = setTimeout(() => {
|
|
10956
|
+
hideIframeLoader(waitLayoutShift);
|
|
10957
|
+
}, timeoutTime);
|
|
10958
|
+
return;
|
|
10959
|
+
}
|
|
10960
|
+
}
|
|
10961
|
+
async function openIframe(uri, callbacks = {}, { mountTargetSelector } = {}) {
|
|
10962
|
+
close();
|
|
10963
|
+
init(mountTargetSelector);
|
|
10964
|
+
return new Promise((resolve) => {
|
|
10965
|
+
function complete(callback) {
|
|
10966
|
+
close(callback);
|
|
10967
|
+
resolve();
|
|
10968
|
+
}
|
|
10969
|
+
function doOpen() {
|
|
10970
|
+
const iframe = document.createElement('iframe');
|
|
10971
|
+
iframe.src = uri;
|
|
10972
|
+
iframe.id = POPUP_ELEMENT_ID;
|
|
10973
|
+
iframe.onload = () => {
|
|
10974
|
+
hideIframeLoader();
|
|
10975
|
+
};
|
|
10976
|
+
if (!!getContainer()) {
|
|
10977
|
+
document.body.classList.add(BODY_CLASS);
|
|
10978
|
+
showIframeLoader();
|
|
10979
|
+
appendToContainer(iframe);
|
|
10980
|
+
handleIframeUnmount(iframe);
|
|
10981
|
+
penpal.connectToChild({
|
|
10982
|
+
iframe,
|
|
10983
|
+
methods: {
|
|
10984
|
+
...callbacks,
|
|
10985
|
+
handshake: (...args) => {
|
|
10986
|
+
var _a;
|
|
10987
|
+
hideIframeLoader();
|
|
10988
|
+
(_a = callbacks === null || callbacks === void 0 ? void 0 : callbacks.handshake) === null || _a === void 0 ? void 0 : _a.call(callbacks, ...args);
|
|
10989
|
+
},
|
|
10990
|
+
close: () => complete(callbacks.onClose),
|
|
10991
|
+
},
|
|
10992
|
+
});
|
|
10993
|
+
}
|
|
10994
|
+
else {
|
|
10995
|
+
throw Error('Membrane container element not found. Was it manually removed?');
|
|
10996
|
+
}
|
|
10997
|
+
}
|
|
10998
|
+
if (document.readyState === 'complete' || document.readyState === 'interactive') {
|
|
10999
|
+
doOpen();
|
|
11000
|
+
}
|
|
11001
|
+
else {
|
|
11002
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
11003
|
+
doOpen();
|
|
11004
|
+
});
|
|
11005
|
+
}
|
|
11006
|
+
});
|
|
11007
|
+
}
|
|
11008
|
+
function close(callback) {
|
|
11009
|
+
document.body.classList.remove(BODY_CLASS);
|
|
11010
|
+
if (!!getContainer()) {
|
|
11011
|
+
deleteContainer();
|
|
11012
|
+
if (callback) {
|
|
11013
|
+
callback();
|
|
11014
|
+
}
|
|
11015
|
+
}
|
|
11016
|
+
}
|
|
11017
|
+
function init(mountTargetSelector) {
|
|
11018
|
+
var _a;
|
|
11019
|
+
injectStyles(mountTargetSelector);
|
|
11020
|
+
if (!!getContainer()) {
|
|
11021
|
+
return;
|
|
11022
|
+
}
|
|
11023
|
+
const container = createContainer();
|
|
11024
|
+
if (mountTargetSelector && document.querySelector(mountTargetSelector)) {
|
|
11025
|
+
(_a = document.querySelector(mountTargetSelector)) === null || _a === void 0 ? void 0 : _a.appendChild(container);
|
|
11026
|
+
}
|
|
11027
|
+
else {
|
|
11028
|
+
document.body.appendChild(container);
|
|
11029
|
+
}
|
|
11030
|
+
}
|
|
11031
|
+
function injectStyles(mountTargetSelector) {
|
|
11032
|
+
const hasCustomMountTarget = Boolean(mountTargetSelector && document.querySelector(mountTargetSelector));
|
|
11033
|
+
const styles = [
|
|
11034
|
+
`.${CONTAINER_ELEMENT_CLASS}:empty {
|
|
11035
|
+
display: none;
|
|
11036
|
+
}`,
|
|
11037
|
+
hasCustomMountTarget
|
|
11038
|
+
? `.${CONTAINER_ELEMENT_CLASS} {
|
|
11039
|
+
inset: 0;
|
|
11040
|
+
background: rgba(0, 0, 0, 0);
|
|
11041
|
+
transition: background 0.2s ease-out;
|
|
11042
|
+
display: flex;
|
|
11043
|
+
justify-content: center;
|
|
11044
|
+
align-items: center;
|
|
11045
|
+
width: 100%;
|
|
11046
|
+
height: 100%;
|
|
11047
|
+
}`
|
|
11048
|
+
: `.${CONTAINER_ELEMENT_CLASS} {
|
|
11049
|
+
position: fixed;
|
|
11050
|
+
inset: 0;
|
|
11051
|
+
z-index: 2147483647;
|
|
11052
|
+
display: flex;
|
|
11053
|
+
justify-content: center;
|
|
11054
|
+
align-items: center;
|
|
11055
|
+
pointer-events: auto;
|
|
11056
|
+
background: rgba(0, 0, 0, 0);
|
|
11057
|
+
transition: background 0.2s ease-out;
|
|
11058
|
+
}`,
|
|
11059
|
+
`.${CONTAINER_ELEMENT_CLASS}.${CONTAINER_ELEMENT_CLASS__LOADER} {
|
|
11060
|
+
background: rgba(0, 0, 0, 0.8);
|
|
11061
|
+
}`,
|
|
11062
|
+
`.${CONTAINER_ELEMENT_CLASS}.${CONTAINER_ELEMENT_CLASS__LOADER}::before {
|
|
11063
|
+
${hasCustomMountTarget ? 'position: absolute;' : ''}
|
|
11064
|
+
content: "";
|
|
11065
|
+
width: 5rem;
|
|
11066
|
+
height: 4rem;
|
|
11067
|
+
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');
|
|
11068
|
+
background-size: contain;
|
|
11069
|
+
background-repeat: no-repeat;
|
|
11070
|
+
background-position: center;
|
|
11071
|
+
filter: invert(1);
|
|
11072
|
+
}`,
|
|
11073
|
+
`.${CONTAINER_ELEMENT_CLASS} iframe {
|
|
11074
|
+
${hasCustomMountTarget ? '' : 'position: absolute;'}
|
|
11075
|
+
width: 100%;
|
|
11076
|
+
height: 100%;
|
|
11077
|
+
border-width: 0;
|
|
11078
|
+
|
|
11079
|
+
/* fix transparent bg, because iframe document has light scheme */
|
|
11080
|
+
color-scheme: light;
|
|
11081
|
+
}`,
|
|
11082
|
+
`.${CONTAINER_ELEMENT_CLASS}.${CONTAINER_ELEMENT_CLASS__LOADER} iframe {
|
|
11083
|
+
visibility: hidden;
|
|
11084
|
+
}`,
|
|
11085
|
+
!hasCustomMountTarget
|
|
11086
|
+
? `body.${BODY_CLASS} {
|
|
11087
|
+
overflow: hidden;
|
|
11088
|
+
}`
|
|
11089
|
+
: '',
|
|
11090
|
+
];
|
|
11091
|
+
let styleElement = document.getElementById(STYLES_ELEMENT_ID);
|
|
11092
|
+
if (!styleElement) {
|
|
11093
|
+
styleElement = document.createElement('style');
|
|
11094
|
+
styleElement.id = STYLES_ELEMENT_ID;
|
|
11095
|
+
styleElement.type = 'text/css';
|
|
11096
|
+
document.head.appendChild(styleElement);
|
|
11097
|
+
}
|
|
11098
|
+
styleElement.textContent = styles.join('\n');
|
|
11099
|
+
}
|
|
11100
|
+
function removeInjectedStyles() {
|
|
11101
|
+
const stylesElement = document.getElementById(STYLES_ELEMENT_ID);
|
|
11102
|
+
if (stylesElement) {
|
|
11103
|
+
stylesElement.remove();
|
|
11104
|
+
}
|
|
11105
|
+
}
|
|
11106
|
+
function createContainer() {
|
|
11107
|
+
const container = document.createElement('div');
|
|
11108
|
+
container.id = CONTAINER_ELEMENT_ID;
|
|
11109
|
+
container.classList.add(CONTAINER_ELEMENT_CLASS);
|
|
11110
|
+
return container;
|
|
11111
|
+
}
|
|
11112
|
+
function getContainer() {
|
|
11113
|
+
return document.getElementById(CONTAINER_ELEMENT_ID);
|
|
11114
|
+
}
|
|
11115
|
+
function appendToContainer(el) {
|
|
11116
|
+
const container = getContainer();
|
|
11117
|
+
container === null || container === void 0 ? void 0 : container.appendChild(el);
|
|
11118
|
+
}
|
|
11119
|
+
function deleteContainer() {
|
|
11120
|
+
const container = getContainer();
|
|
11121
|
+
if (container) {
|
|
11122
|
+
container.remove();
|
|
11123
|
+
}
|
|
11124
|
+
removeInjectedStyles();
|
|
11125
|
+
}
|
|
11126
|
+
function handleIframeUnmount(iframe) {
|
|
11127
|
+
const observer = new MutationObserver((mutationsList) => {
|
|
11128
|
+
for (const mutation of mutationsList) {
|
|
11129
|
+
for (const removedNode of mutation.removedNodes) {
|
|
11130
|
+
if (removedNode instanceof HTMLElement && removedNode.id === POPUP_ELEMENT_ID) {
|
|
11131
|
+
observer.disconnect();
|
|
11132
|
+
deleteContainer();
|
|
11133
|
+
return;
|
|
11134
|
+
}
|
|
11135
|
+
}
|
|
11136
|
+
}
|
|
11137
|
+
});
|
|
11138
|
+
const parent = iframe.parentNode;
|
|
11139
|
+
if (parent) {
|
|
11140
|
+
observer.observe(parent, {
|
|
11141
|
+
childList: true,
|
|
11142
|
+
});
|
|
11143
|
+
}
|
|
11144
|
+
else {
|
|
11145
|
+
console.warn(`iframe with ID "${POPUP_ELEMENT_ID}" has no parent node`);
|
|
11146
|
+
}
|
|
11147
|
+
}
|
|
11148
|
+
|
|
11118
11149
|
class ConnectionLevelElementAccessor {
|
|
11119
11150
|
constructor(client, connectionSelector, selector, elementKey, query) {
|
|
11120
11151
|
this.client = client;
|
|
@@ -11226,11 +11257,6 @@ class DataSourceAccessor extends ElementAccessor {
|
|
|
11226
11257
|
path: 'data-source',
|
|
11227
11258
|
});
|
|
11228
11259
|
}
|
|
11229
|
-
async apply(integrationKeys) {
|
|
11230
|
-
return await this.options.client.post(this.getPath('apply'), {
|
|
11231
|
-
integrationKeys,
|
|
11232
|
-
});
|
|
11233
|
-
}
|
|
11234
11260
|
async setup() {
|
|
11235
11261
|
await this.options.client.post(this.getPath('setup'));
|
|
11236
11262
|
}
|
|
@@ -11973,11 +11999,6 @@ class FlowAccessor extends ElementAccessor {
|
|
|
11973
11999
|
path: 'flow',
|
|
11974
12000
|
});
|
|
11975
12001
|
}
|
|
11976
|
-
async apply(integrationKeys) {
|
|
11977
|
-
return await this.options.client.post(this.getPath('apply'), {
|
|
11978
|
-
integrationKeys,
|
|
11979
|
-
});
|
|
11980
|
-
}
|
|
11981
12002
|
async reset() {
|
|
11982
12003
|
return await this.options.client.post(this.getPath('reset'));
|
|
11983
12004
|
}
|
|
@@ -12014,11 +12035,6 @@ class FieldMappingAccessor extends ElementAccessor {
|
|
|
12014
12035
|
async getAppSchema() {
|
|
12015
12036
|
return await this.options.client.get(this.getPath('app-schema'));
|
|
12016
12037
|
}
|
|
12017
|
-
async apply(integrationKeys) {
|
|
12018
|
-
return await this.options.client.post(this.getPath('apply'), {
|
|
12019
|
-
integrationKeys,
|
|
12020
|
-
});
|
|
12021
|
-
}
|
|
12022
12038
|
async setup() {
|
|
12023
12039
|
return await this.options.client.post(this.getPath('setup'));
|
|
12024
12040
|
}
|
|
@@ -12358,20 +12374,20 @@ const HandyScenarioTemplateElement = zod.z.object({
|
|
|
12358
12374
|
key: zod.z.string(),
|
|
12359
12375
|
name: zod.z.string(),
|
|
12360
12376
|
})
|
|
12361
|
-
.and(zod.z.record(zod.z.any())),
|
|
12377
|
+
.and(zod.z.record(zod.z.string(), zod.z.any())),
|
|
12362
12378
|
});
|
|
12363
12379
|
const withIntegrationKeys = (schema) => schema.and(zod.z.object({ integrationKeys: zod.z.array(zod.z.string()).optional() }));
|
|
12364
12380
|
const ElementsExportFields = zod.z.object({
|
|
12365
|
-
flows: zod.z.record(withIntegrationKeys(zod.z.any())).optional(),
|
|
12366
|
-
actions: zod.z.record(withIntegrationKeys(zod.z.any())).optional(),
|
|
12367
|
-
fieldMappings: zod.z.record(withIntegrationKeys(zod.z.any())).optional(),
|
|
12368
|
-
dataSources: zod.z.record(withIntegrationKeys(zod.z.any())).optional(),
|
|
12369
|
-
dataLinkTables: zod.z.record(zod.z.any()).optional(),
|
|
12370
|
-
appEventTypes: zod.z.record(zod.z.any()).optional(),
|
|
12371
|
-
appDataSchemas: zod.z.record(zod.z.any()).optional(),
|
|
12381
|
+
flows: zod.z.record(zod.z.string(), withIntegrationKeys(zod.z.any())).optional(),
|
|
12382
|
+
actions: zod.z.record(zod.z.string(), withIntegrationKeys(zod.z.any())).optional(),
|
|
12383
|
+
fieldMappings: zod.z.record(zod.z.string(), withIntegrationKeys(zod.z.any())).optional(),
|
|
12384
|
+
dataSources: zod.z.record(zod.z.string(), withIntegrationKeys(zod.z.any())).optional(),
|
|
12385
|
+
dataLinkTables: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
12386
|
+
appEventTypes: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
12387
|
+
appDataSchemas: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
12372
12388
|
});
|
|
12373
12389
|
const ScenarioTemplateElements = ElementsExportFields.and(zod.z.object({
|
|
12374
|
-
integrations: zod.z.record(ElementsExportFields.and(zod.z.object({ connectorId: zod.z.string() }))).optional(),
|
|
12390
|
+
integrations: zod.z.record(zod.z.string(), ElementsExportFields.and(zod.z.object({ connectorId: zod.z.string() }))).optional(),
|
|
12375
12391
|
}));
|
|
12376
12392
|
const ScenarioTemplate = zod.z.object({
|
|
12377
12393
|
id: zod.z.string(),
|
|
@@ -12383,7 +12399,7 @@ const ScenarioTemplate = zod.z.object({
|
|
|
12383
12399
|
demoAppUri: zod.z.string().optional(),
|
|
12384
12400
|
demoGithubRepo: zod.z.string().optional(),
|
|
12385
12401
|
demoVideoYoutubeUri: zod.z.string().optional(),
|
|
12386
|
-
tags: zod.z.array(zod.z.
|
|
12402
|
+
tags: zod.z.array(zod.z.enum(exports.ScenarioTemplateCategory)).optional(),
|
|
12387
12403
|
elements: ScenarioTemplateElements.optional(),
|
|
12388
12404
|
connectors: zod.z.array(MinimalConnector).optional(),
|
|
12389
12405
|
handyElements: zod.z.array(HandyScenarioTemplateElement).optional(),
|
|
@@ -12965,14 +12981,12 @@ exports.NotAuthenticatedError = NotAuthenticatedError;
|
|
|
12965
12981
|
exports.NotFoundError = NotFoundError;
|
|
12966
12982
|
exports.OAUTH1_CONFIG_SCHEMA = OAUTH1_CONFIG_SCHEMA;
|
|
12967
12983
|
exports.OAUTH_CONFIG_SCHEMA = OAUTH_CONFIG_SCHEMA;
|
|
12968
|
-
exports.OpenNewConnectionOptions = OpenNewConnectionOptions;
|
|
12969
12984
|
exports.PARALLEL_EXECUTION_LIMITS = PARALLEL_EXECUTION_LIMITS;
|
|
12970
12985
|
exports.PaginationQuery = PaginationQuery;
|
|
12971
12986
|
exports.PaginationResponse = PaginationResponse;
|
|
12972
12987
|
exports.RATE_LIMITS = RATE_LIMITS;
|
|
12973
12988
|
exports.RateLimitExceededError = RateLimitExceededError;
|
|
12974
12989
|
exports.ResetFlowInstanceOptions = ResetFlowInstanceOptions;
|
|
12975
|
-
exports.RunFlowOptions = RunFlowOptions;
|
|
12976
12990
|
exports.ScenarioAccessor = ScenarioAccessor;
|
|
12977
12991
|
exports.ScenarioApiResponse = ScenarioApiResponse;
|
|
12978
12992
|
exports.ScenarioCalculatedProperties = ScenarioCalculatedProperties;
|
|
@@ -13035,6 +13049,7 @@ exports.generateExampleFromSchema = generateExampleFromSchema;
|
|
|
13035
13049
|
exports.getActionInstanceVariableSchema = getActionInstanceVariableSchema;
|
|
13036
13050
|
exports.getActionRunTimeVariablesSchema = getActionRunTimeVariablesSchema;
|
|
13037
13051
|
exports.getAllEventMethodFilePaths = getAllEventMethodFilePaths;
|
|
13052
|
+
exports.getBusinessDaysBetween = getBusinessDaysBetween;
|
|
13038
13053
|
exports.getChildNodeKeys = getChildNodeKeys;
|
|
13039
13054
|
exports.getDataCollectionCreateFields = getDataCollectionCreateFields;
|
|
13040
13055
|
exports.getDataCollectionUpdateFields = getDataCollectionUpdateFields;
|
|
@@ -13077,6 +13092,7 @@ exports.getWritableFieldsSchema = getWritableFieldsSchema;
|
|
|
13077
13092
|
exports.hasCycles = hasCycles;
|
|
13078
13093
|
exports.hasFormulas_internalDoNotUse = hasFormulas;
|
|
13079
13094
|
exports.injectFormulaCatalog = injectFormulaCatalog;
|
|
13095
|
+
exports.isBusinessDay = isBusinessDay;
|
|
13080
13096
|
exports.isDataActionType = isDataActionType;
|
|
13081
13097
|
exports.isDataLocationMethodSupported = isDataLocationMethodSupported;
|
|
13082
13098
|
exports.isFormula_internalDoNotUse = isFormula;
|