@membranehq/sdk 0.7.4 → 0.7.5
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 +2063 -13949
- package/dist/bundle.js +3949 -4253
- package/dist/bundle.js.map +1 -1
- package/dist/dts/accessors/connections-accessors.d.ts +28 -28
- 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 +27 -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/index.browser.d.mts +5926 -24800
- package/dist/index.browser.d.ts +5926 -24800
- package/dist/index.browser.js +287 -281
- package/dist/index.browser.js.map +1 -1
- package/dist/index.browser.mjs +285 -279
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.node.d.mts +5956 -24840
- package/dist/index.node.d.ts +5956 -24840
- package/dist/index.node.js +287 -281
- package/dist/index.node.js.map +1 -1
- package/dist/index.node.mjs +285 -279
- 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');
|
|
@@ -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(),
|
|
@@ -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({
|
|
@@ -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(),
|
|
@@ -8501,7 +8501,7 @@ const BaseFlowRun = zod.z.object({
|
|
|
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
|
|
|
@@ -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({
|
|
@@ -8942,7 +8942,7 @@ const ScreenBlock = zod.z
|
|
|
8942
8942
|
.object({
|
|
8943
8943
|
type: zod.z.nativeEnum(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
8947
|
type: zod.z.nativeEnum(exports.ScreenType),
|
|
8948
8948
|
key: zod.z.string().optional(),
|
|
@@ -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,7 +8972,7 @@ 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(),
|
|
@@ -9140,8 +9140,8 @@ exports.HttpRequestMethod = void 0;
|
|
|
9140
9140
|
const HttpRequestSpec = zod.z.object({
|
|
9141
9141
|
method: zod.z.string().toUpperCase().pipe(zod.z.nativeEnum(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 = {
|
|
@@ -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(),
|
|
@@ -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(),
|
|
@@ -10604,7 +10362,7 @@ function extractMembraneErrorData(error) {
|
|
|
10604
10362
|
};
|
|
10605
10363
|
}
|
|
10606
10364
|
if (error instanceof zod.ZodError) {
|
|
10607
|
-
data.message =
|
|
10365
|
+
data.message = v4.fromError(error).toString();
|
|
10608
10366
|
}
|
|
10609
10367
|
return data;
|
|
10610
10368
|
}
|
|
@@ -10695,6 +10453,29 @@ function timestampToDate(value) {
|
|
|
10695
10453
|
}
|
|
10696
10454
|
}
|
|
10697
10455
|
|
|
10456
|
+
const ONE_DAY_IN_MS = 24 * 60 * 60 * 1000;
|
|
10457
|
+
function isBusinessDay(date) {
|
|
10458
|
+
const dayOfWeek = date.getDay();
|
|
10459
|
+
return dayOfWeek >= 1 && dayOfWeek <= 5;
|
|
10460
|
+
}
|
|
10461
|
+
function getBusinessDaysBetween(startDate, endDate) {
|
|
10462
|
+
const businessDays = new Set();
|
|
10463
|
+
if (endDate < startDate) {
|
|
10464
|
+
return businessDays;
|
|
10465
|
+
}
|
|
10466
|
+
const startTime = Date.UTC(startDate.getFullYear(), startDate.getMonth(), startDate.getDate());
|
|
10467
|
+
const endTime = Date.UTC(endDate.getFullYear(), endDate.getMonth(), endDate.getDate());
|
|
10468
|
+
const dayCount = Math.floor((endTime - startTime) / ONE_DAY_IN_MS) + 1;
|
|
10469
|
+
for (let i = 0; i < dayCount; i++) {
|
|
10470
|
+
const currentTime = startTime + i * ONE_DAY_IN_MS;
|
|
10471
|
+
const currentDate = new Date(currentTime);
|
|
10472
|
+
if (isBusinessDay(currentDate)) {
|
|
10473
|
+
businessDays.add(currentDate.toISOString().split('T')[0]);
|
|
10474
|
+
}
|
|
10475
|
+
}
|
|
10476
|
+
return businessDays;
|
|
10477
|
+
}
|
|
10478
|
+
|
|
10698
10479
|
exports.UsageType = void 0;
|
|
10699
10480
|
(function (UsageType) {
|
|
10700
10481
|
UsageType["FLOW_RUNS_DURATION"] = "flow-runs-duration";
|
|
@@ -11139,6 +10920,231 @@ class IntegrationLevelActionsListAccessor extends IntegrationLevelElementsListAc
|
|
|
11139
10920
|
}
|
|
11140
10921
|
}
|
|
11141
10922
|
|
|
10923
|
+
const POPUP_ELEMENT_ID = '__integration-app-popup';
|
|
10924
|
+
const CONTAINER_ELEMENT_ID = '__integration-app-container';
|
|
10925
|
+
const CONTAINER_ELEMENT_CLASS = '__integration-app-container';
|
|
10926
|
+
const CONTAINER_ELEMENT_CLASS__LOADER = '__integration-app-container__loader';
|
|
10927
|
+
const BODY_CLASS = '__integration-app-open';
|
|
10928
|
+
const STYLES_ELEMENT_ID = '__integration-app-embed-styles';
|
|
10929
|
+
let IFRAME_START_SHOW_LOADER_TIME = 0;
|
|
10930
|
+
let IFRAME_SHOW_LOADER_TIMEOUT_ID;
|
|
10931
|
+
const IFRAME_SHOW_LOADER_MINIMAL_TIME = 500;
|
|
10932
|
+
const IFRAME_LAYOUT_SHIFT_TIME = 300;
|
|
10933
|
+
function showIframeLoader() {
|
|
10934
|
+
const container = getContainer();
|
|
10935
|
+
container === null || container === void 0 ? void 0 : container.classList.add(CONTAINER_ELEMENT_CLASS__LOADER);
|
|
10936
|
+
IFRAME_START_SHOW_LOADER_TIME = Date.now();
|
|
10937
|
+
}
|
|
10938
|
+
function hideIframeLoader(waitLayoutShift = IFRAME_LAYOUT_SHIFT_TIME) {
|
|
10939
|
+
if (IFRAME_SHOW_LOADER_TIMEOUT_ID) {
|
|
10940
|
+
clearTimeout(IFRAME_SHOW_LOADER_TIMEOUT_ID);
|
|
10941
|
+
}
|
|
10942
|
+
const delta = Date.now() - IFRAME_START_SHOW_LOADER_TIME;
|
|
10943
|
+
if (delta >= IFRAME_SHOW_LOADER_MINIMAL_TIME) {
|
|
10944
|
+
setTimeout(() => {
|
|
10945
|
+
const container = getContainer();
|
|
10946
|
+
container === null || container === void 0 ? void 0 : container.classList.remove(CONTAINER_ELEMENT_CLASS__LOADER);
|
|
10947
|
+
IFRAME_START_SHOW_LOADER_TIME = 0;
|
|
10948
|
+
}, waitLayoutShift);
|
|
10949
|
+
return;
|
|
10950
|
+
}
|
|
10951
|
+
else {
|
|
10952
|
+
const waitLayoutShift = delta >= IFRAME_LAYOUT_SHIFT_TIME ? 0 : IFRAME_LAYOUT_SHIFT_TIME - delta;
|
|
10953
|
+
const timeoutTime = IFRAME_SHOW_LOADER_MINIMAL_TIME - delta;
|
|
10954
|
+
IFRAME_SHOW_LOADER_TIMEOUT_ID = setTimeout(() => {
|
|
10955
|
+
hideIframeLoader(waitLayoutShift);
|
|
10956
|
+
}, timeoutTime);
|
|
10957
|
+
return;
|
|
10958
|
+
}
|
|
10959
|
+
}
|
|
10960
|
+
async function openIframe(uri, callbacks = {}, { mountTargetSelector } = {}) {
|
|
10961
|
+
close();
|
|
10962
|
+
init(mountTargetSelector);
|
|
10963
|
+
return new Promise((resolve) => {
|
|
10964
|
+
function complete(callback) {
|
|
10965
|
+
close(callback);
|
|
10966
|
+
resolve();
|
|
10967
|
+
}
|
|
10968
|
+
function doOpen() {
|
|
10969
|
+
const iframe = document.createElement('iframe');
|
|
10970
|
+
iframe.src = uri;
|
|
10971
|
+
iframe.id = POPUP_ELEMENT_ID;
|
|
10972
|
+
iframe.onload = () => {
|
|
10973
|
+
hideIframeLoader();
|
|
10974
|
+
};
|
|
10975
|
+
if (!!getContainer()) {
|
|
10976
|
+
document.body.classList.add(BODY_CLASS);
|
|
10977
|
+
showIframeLoader();
|
|
10978
|
+
appendToContainer(iframe);
|
|
10979
|
+
handleIframeUnmount(iframe);
|
|
10980
|
+
penpal.connectToChild({
|
|
10981
|
+
iframe,
|
|
10982
|
+
methods: {
|
|
10983
|
+
...callbacks,
|
|
10984
|
+
handshake: (...args) => {
|
|
10985
|
+
var _a;
|
|
10986
|
+
hideIframeLoader();
|
|
10987
|
+
(_a = callbacks === null || callbacks === void 0 ? void 0 : callbacks.handshake) === null || _a === void 0 ? void 0 : _a.call(callbacks, ...args);
|
|
10988
|
+
},
|
|
10989
|
+
close: () => complete(callbacks.onClose),
|
|
10990
|
+
},
|
|
10991
|
+
});
|
|
10992
|
+
}
|
|
10993
|
+
else {
|
|
10994
|
+
throw Error('Membrane container element not found. Was it manually removed?');
|
|
10995
|
+
}
|
|
10996
|
+
}
|
|
10997
|
+
if (document.readyState === 'complete' || document.readyState === 'interactive') {
|
|
10998
|
+
doOpen();
|
|
10999
|
+
}
|
|
11000
|
+
else {
|
|
11001
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
11002
|
+
doOpen();
|
|
11003
|
+
});
|
|
11004
|
+
}
|
|
11005
|
+
});
|
|
11006
|
+
}
|
|
11007
|
+
function close(callback) {
|
|
11008
|
+
document.body.classList.remove(BODY_CLASS);
|
|
11009
|
+
if (!!getContainer()) {
|
|
11010
|
+
deleteContainer();
|
|
11011
|
+
if (callback) {
|
|
11012
|
+
callback();
|
|
11013
|
+
}
|
|
11014
|
+
}
|
|
11015
|
+
}
|
|
11016
|
+
function init(mountTargetSelector) {
|
|
11017
|
+
var _a;
|
|
11018
|
+
injectStyles(mountTargetSelector);
|
|
11019
|
+
if (!!getContainer()) {
|
|
11020
|
+
return;
|
|
11021
|
+
}
|
|
11022
|
+
const container = createContainer();
|
|
11023
|
+
if (mountTargetSelector && document.querySelector(mountTargetSelector)) {
|
|
11024
|
+
(_a = document.querySelector(mountTargetSelector)) === null || _a === void 0 ? void 0 : _a.appendChild(container);
|
|
11025
|
+
}
|
|
11026
|
+
else {
|
|
11027
|
+
document.body.appendChild(container);
|
|
11028
|
+
}
|
|
11029
|
+
}
|
|
11030
|
+
function injectStyles(mountTargetSelector) {
|
|
11031
|
+
const hasCustomMountTarget = Boolean(mountTargetSelector && document.querySelector(mountTargetSelector));
|
|
11032
|
+
const styles = [
|
|
11033
|
+
`.${CONTAINER_ELEMENT_CLASS}:empty {
|
|
11034
|
+
display: none;
|
|
11035
|
+
}`,
|
|
11036
|
+
hasCustomMountTarget
|
|
11037
|
+
? `.${CONTAINER_ELEMENT_CLASS} {
|
|
11038
|
+
inset: 0;
|
|
11039
|
+
background: rgba(0, 0, 0, 0);
|
|
11040
|
+
transition: background 0.2s ease-out;
|
|
11041
|
+
display: flex;
|
|
11042
|
+
justify-content: center;
|
|
11043
|
+
align-items: center;
|
|
11044
|
+
width: 100%;
|
|
11045
|
+
height: 100%;
|
|
11046
|
+
}`
|
|
11047
|
+
: `.${CONTAINER_ELEMENT_CLASS} {
|
|
11048
|
+
position: fixed;
|
|
11049
|
+
inset: 0;
|
|
11050
|
+
z-index: 2147483647;
|
|
11051
|
+
display: flex;
|
|
11052
|
+
justify-content: center;
|
|
11053
|
+
align-items: center;
|
|
11054
|
+
pointer-events: auto;
|
|
11055
|
+
background: rgba(0, 0, 0, 0);
|
|
11056
|
+
transition: background 0.2s ease-out;
|
|
11057
|
+
}`,
|
|
11058
|
+
`.${CONTAINER_ELEMENT_CLASS}.${CONTAINER_ELEMENT_CLASS__LOADER} {
|
|
11059
|
+
background: rgba(0, 0, 0, 0.8);
|
|
11060
|
+
}`,
|
|
11061
|
+
`.${CONTAINER_ELEMENT_CLASS}.${CONTAINER_ELEMENT_CLASS__LOADER}::before {
|
|
11062
|
+
${hasCustomMountTarget ? 'position: absolute;' : ''}
|
|
11063
|
+
content: "";
|
|
11064
|
+
width: 5rem;
|
|
11065
|
+
height: 4rem;
|
|
11066
|
+
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');
|
|
11067
|
+
background-size: contain;
|
|
11068
|
+
background-repeat: no-repeat;
|
|
11069
|
+
background-position: center;
|
|
11070
|
+
filter: invert(1);
|
|
11071
|
+
}`,
|
|
11072
|
+
`.${CONTAINER_ELEMENT_CLASS} iframe {
|
|
11073
|
+
${hasCustomMountTarget ? '' : 'position: absolute;'}
|
|
11074
|
+
width: 100%;
|
|
11075
|
+
height: 100%;
|
|
11076
|
+
border-width: 0;
|
|
11077
|
+
|
|
11078
|
+
/* fix transparent bg, because iframe document has light scheme */
|
|
11079
|
+
color-scheme: light;
|
|
11080
|
+
}`,
|
|
11081
|
+
`.${CONTAINER_ELEMENT_CLASS}.${CONTAINER_ELEMENT_CLASS__LOADER} iframe {
|
|
11082
|
+
visibility: hidden;
|
|
11083
|
+
}`,
|
|
11084
|
+
!hasCustomMountTarget
|
|
11085
|
+
? `body.${BODY_CLASS} {
|
|
11086
|
+
overflow: hidden;
|
|
11087
|
+
}`
|
|
11088
|
+
: '',
|
|
11089
|
+
];
|
|
11090
|
+
let styleElement = document.getElementById(STYLES_ELEMENT_ID);
|
|
11091
|
+
if (!styleElement) {
|
|
11092
|
+
styleElement = document.createElement('style');
|
|
11093
|
+
styleElement.id = STYLES_ELEMENT_ID;
|
|
11094
|
+
styleElement.type = 'text/css';
|
|
11095
|
+
document.head.appendChild(styleElement);
|
|
11096
|
+
}
|
|
11097
|
+
styleElement.textContent = styles.join('\n');
|
|
11098
|
+
}
|
|
11099
|
+
function removeInjectedStyles() {
|
|
11100
|
+
const stylesElement = document.getElementById(STYLES_ELEMENT_ID);
|
|
11101
|
+
if (stylesElement) {
|
|
11102
|
+
stylesElement.remove();
|
|
11103
|
+
}
|
|
11104
|
+
}
|
|
11105
|
+
function createContainer() {
|
|
11106
|
+
const container = document.createElement('div');
|
|
11107
|
+
container.id = CONTAINER_ELEMENT_ID;
|
|
11108
|
+
container.classList.add(CONTAINER_ELEMENT_CLASS);
|
|
11109
|
+
return container;
|
|
11110
|
+
}
|
|
11111
|
+
function getContainer() {
|
|
11112
|
+
return document.getElementById(CONTAINER_ELEMENT_ID);
|
|
11113
|
+
}
|
|
11114
|
+
function appendToContainer(el) {
|
|
11115
|
+
const container = getContainer();
|
|
11116
|
+
container === null || container === void 0 ? void 0 : container.appendChild(el);
|
|
11117
|
+
}
|
|
11118
|
+
function deleteContainer() {
|
|
11119
|
+
const container = getContainer();
|
|
11120
|
+
if (container) {
|
|
11121
|
+
container.remove();
|
|
11122
|
+
}
|
|
11123
|
+
removeInjectedStyles();
|
|
11124
|
+
}
|
|
11125
|
+
function handleIframeUnmount(iframe) {
|
|
11126
|
+
const observer = new MutationObserver((mutationsList) => {
|
|
11127
|
+
for (const mutation of mutationsList) {
|
|
11128
|
+
for (const removedNode of mutation.removedNodes) {
|
|
11129
|
+
if (removedNode instanceof HTMLElement && removedNode.id === POPUP_ELEMENT_ID) {
|
|
11130
|
+
observer.disconnect();
|
|
11131
|
+
deleteContainer();
|
|
11132
|
+
return;
|
|
11133
|
+
}
|
|
11134
|
+
}
|
|
11135
|
+
}
|
|
11136
|
+
});
|
|
11137
|
+
const parent = iframe.parentNode;
|
|
11138
|
+
if (parent) {
|
|
11139
|
+
observer.observe(parent, {
|
|
11140
|
+
childList: true,
|
|
11141
|
+
});
|
|
11142
|
+
}
|
|
11143
|
+
else {
|
|
11144
|
+
console.warn(`iframe with ID "${POPUP_ELEMENT_ID}" has no parent node`);
|
|
11145
|
+
}
|
|
11146
|
+
}
|
|
11147
|
+
|
|
11142
11148
|
class ConnectionLevelElementAccessor {
|
|
11143
11149
|
constructor(client, connectionSelector, selector, elementKey, query) {
|
|
11144
11150
|
this.client = client;
|
|
@@ -12382,20 +12388,20 @@ const HandyScenarioTemplateElement = zod.z.object({
|
|
|
12382
12388
|
key: zod.z.string(),
|
|
12383
12389
|
name: zod.z.string(),
|
|
12384
12390
|
})
|
|
12385
|
-
.and(zod.z.record(zod.z.any())),
|
|
12391
|
+
.and(zod.z.record(zod.z.string(), zod.z.any())),
|
|
12386
12392
|
});
|
|
12387
12393
|
const withIntegrationKeys = (schema) => schema.and(zod.z.object({ integrationKeys: zod.z.array(zod.z.string()).optional() }));
|
|
12388
12394
|
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(),
|
|
12395
|
+
flows: zod.z.record(zod.z.string(), withIntegrationKeys(zod.z.any())).optional(),
|
|
12396
|
+
actions: zod.z.record(zod.z.string(), withIntegrationKeys(zod.z.any())).optional(),
|
|
12397
|
+
fieldMappings: zod.z.record(zod.z.string(), withIntegrationKeys(zod.z.any())).optional(),
|
|
12398
|
+
dataSources: zod.z.record(zod.z.string(), withIntegrationKeys(zod.z.any())).optional(),
|
|
12399
|
+
dataLinkTables: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
12400
|
+
appEventTypes: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
12401
|
+
appDataSchemas: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
12396
12402
|
});
|
|
12397
12403
|
const ScenarioTemplateElements = ElementsExportFields.and(zod.z.object({
|
|
12398
|
-
integrations: zod.z.record(ElementsExportFields.and(zod.z.object({ connectorId: zod.z.string() }))).optional(),
|
|
12404
|
+
integrations: zod.z.record(zod.z.string(), ElementsExportFields.and(zod.z.object({ connectorId: zod.z.string() }))).optional(),
|
|
12399
12405
|
}));
|
|
12400
12406
|
const ScenarioTemplate = zod.z.object({
|
|
12401
12407
|
id: zod.z.string(),
|
|
@@ -13157,14 +13163,12 @@ exports.NotAuthenticatedError = NotAuthenticatedError;
|
|
|
13157
13163
|
exports.NotFoundError = NotFoundError;
|
|
13158
13164
|
exports.OAUTH1_CONFIG_SCHEMA = OAUTH1_CONFIG_SCHEMA;
|
|
13159
13165
|
exports.OAUTH_CONFIG_SCHEMA = OAUTH_CONFIG_SCHEMA;
|
|
13160
|
-
exports.OpenNewConnectionOptions = OpenNewConnectionOptions;
|
|
13161
13166
|
exports.PARALLEL_EXECUTION_LIMITS = PARALLEL_EXECUTION_LIMITS;
|
|
13162
13167
|
exports.PaginationQuery = PaginationQuery;
|
|
13163
13168
|
exports.PaginationResponse = PaginationResponse;
|
|
13164
13169
|
exports.RATE_LIMITS = RATE_LIMITS;
|
|
13165
13170
|
exports.RateLimitExceededError = RateLimitExceededError;
|
|
13166
13171
|
exports.ResetFlowInstanceOptions = ResetFlowInstanceOptions;
|
|
13167
|
-
exports.RunFlowOptions = RunFlowOptions;
|
|
13168
13172
|
exports.ScenarioAccessor = ScenarioAccessor;
|
|
13169
13173
|
exports.ScenarioApiResponse = ScenarioApiResponse;
|
|
13170
13174
|
exports.ScenarioCalculatedProperties = ScenarioCalculatedProperties;
|
|
@@ -13227,6 +13231,7 @@ exports.generateExampleFromSchema = generateExampleFromSchema;
|
|
|
13227
13231
|
exports.getActionInstanceVariableSchema = getActionInstanceVariableSchema;
|
|
13228
13232
|
exports.getActionRunTimeVariablesSchema = getActionRunTimeVariablesSchema;
|
|
13229
13233
|
exports.getAllEventMethodFilePaths = getAllEventMethodFilePaths;
|
|
13234
|
+
exports.getBusinessDaysBetween = getBusinessDaysBetween;
|
|
13230
13235
|
exports.getChildNodeKeys = getChildNodeKeys;
|
|
13231
13236
|
exports.getDataCollectionCreateFields = getDataCollectionCreateFields;
|
|
13232
13237
|
exports.getDataCollectionUpdateFields = getDataCollectionUpdateFields;
|
|
@@ -13271,6 +13276,7 @@ exports.hasCycles = hasCycles;
|
|
|
13271
13276
|
exports.hasFormulas_internalDoNotUse = hasFormulas;
|
|
13272
13277
|
exports.hasMembraneCredentials = hasMembraneCredentials;
|
|
13273
13278
|
exports.injectFormulaCatalog = injectFormulaCatalog;
|
|
13279
|
+
exports.isBusinessDay = isBusinessDay;
|
|
13274
13280
|
exports.isDataActionType = isDataActionType;
|
|
13275
13281
|
exports.isDataLocationMethodSupported = isDataLocationMethodSupported;
|
|
13276
13282
|
exports.isFormula_internalDoNotUse = isFormula;
|