@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.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;
|
|
@@ -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(),
|
|
@@ -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({
|
|
@@ -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(),
|
|
@@ -8477,7 +8477,7 @@ const BaseFlowRun = zod.z.object({
|
|
|
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
|
|
|
@@ -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({
|
|
@@ -8918,7 +8918,7 @@ const ScreenBlock = zod.z
|
|
|
8918
8918
|
.object({
|
|
8919
8919
|
type: zod.z.nativeEnum(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
8923
|
type: zod.z.nativeEnum(exports.ScreenType),
|
|
8924
8924
|
key: zod.z.string().optional(),
|
|
@@ -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,7 +8948,7 @@ 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(),
|
|
@@ -9116,8 +9116,8 @@ exports.HttpRequestMethod = void 0;
|
|
|
9116
9116
|
const HttpRequestSpec = zod.z.object({
|
|
9117
9117
|
method: zod.z.string().toUpperCase().pipe(zod.z.nativeEnum(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 = {
|
|
@@ -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(),
|
|
@@ -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(),
|
|
@@ -10580,7 +10338,7 @@ function extractMembraneErrorData(error) {
|
|
|
10580
10338
|
};
|
|
10581
10339
|
}
|
|
10582
10340
|
if (error instanceof zod.ZodError) {
|
|
10583
|
-
data.message =
|
|
10341
|
+
data.message = v4.fromError(error).toString();
|
|
10584
10342
|
}
|
|
10585
10343
|
return data;
|
|
10586
10344
|
}
|
|
@@ -10671,6 +10429,29 @@ function timestampToDate(value) {
|
|
|
10671
10429
|
}
|
|
10672
10430
|
}
|
|
10673
10431
|
|
|
10432
|
+
const ONE_DAY_IN_MS = 24 * 60 * 60 * 1000;
|
|
10433
|
+
function isBusinessDay(date) {
|
|
10434
|
+
const dayOfWeek = date.getDay();
|
|
10435
|
+
return dayOfWeek >= 1 && dayOfWeek <= 5;
|
|
10436
|
+
}
|
|
10437
|
+
function getBusinessDaysBetween(startDate, endDate) {
|
|
10438
|
+
const businessDays = new Set();
|
|
10439
|
+
if (endDate < startDate) {
|
|
10440
|
+
return businessDays;
|
|
10441
|
+
}
|
|
10442
|
+
const startTime = Date.UTC(startDate.getFullYear(), startDate.getMonth(), startDate.getDate());
|
|
10443
|
+
const endTime = Date.UTC(endDate.getFullYear(), endDate.getMonth(), endDate.getDate());
|
|
10444
|
+
const dayCount = Math.floor((endTime - startTime) / ONE_DAY_IN_MS) + 1;
|
|
10445
|
+
for (let i = 0; i < dayCount; i++) {
|
|
10446
|
+
const currentTime = startTime + i * ONE_DAY_IN_MS;
|
|
10447
|
+
const currentDate = new Date(currentTime);
|
|
10448
|
+
if (isBusinessDay(currentDate)) {
|
|
10449
|
+
businessDays.add(currentDate.toISOString().split('T')[0]);
|
|
10450
|
+
}
|
|
10451
|
+
}
|
|
10452
|
+
return businessDays;
|
|
10453
|
+
}
|
|
10454
|
+
|
|
10674
10455
|
exports.UsageType = void 0;
|
|
10675
10456
|
(function (UsageType) {
|
|
10676
10457
|
UsageType["FLOW_RUNS_DURATION"] = "flow-runs-duration";
|
|
@@ -11115,6 +10896,231 @@ class IntegrationLevelActionsListAccessor extends IntegrationLevelElementsListAc
|
|
|
11115
10896
|
}
|
|
11116
10897
|
}
|
|
11117
10898
|
|
|
10899
|
+
const POPUP_ELEMENT_ID = '__integration-app-popup';
|
|
10900
|
+
const CONTAINER_ELEMENT_ID = '__integration-app-container';
|
|
10901
|
+
const CONTAINER_ELEMENT_CLASS = '__integration-app-container';
|
|
10902
|
+
const CONTAINER_ELEMENT_CLASS__LOADER = '__integration-app-container__loader';
|
|
10903
|
+
const BODY_CLASS = '__integration-app-open';
|
|
10904
|
+
const STYLES_ELEMENT_ID = '__integration-app-embed-styles';
|
|
10905
|
+
let IFRAME_START_SHOW_LOADER_TIME = 0;
|
|
10906
|
+
let IFRAME_SHOW_LOADER_TIMEOUT_ID;
|
|
10907
|
+
const IFRAME_SHOW_LOADER_MINIMAL_TIME = 500;
|
|
10908
|
+
const IFRAME_LAYOUT_SHIFT_TIME = 300;
|
|
10909
|
+
function showIframeLoader() {
|
|
10910
|
+
const container = getContainer();
|
|
10911
|
+
container === null || container === void 0 ? void 0 : container.classList.add(CONTAINER_ELEMENT_CLASS__LOADER);
|
|
10912
|
+
IFRAME_START_SHOW_LOADER_TIME = Date.now();
|
|
10913
|
+
}
|
|
10914
|
+
function hideIframeLoader(waitLayoutShift = IFRAME_LAYOUT_SHIFT_TIME) {
|
|
10915
|
+
if (IFRAME_SHOW_LOADER_TIMEOUT_ID) {
|
|
10916
|
+
clearTimeout(IFRAME_SHOW_LOADER_TIMEOUT_ID);
|
|
10917
|
+
}
|
|
10918
|
+
const delta = Date.now() - IFRAME_START_SHOW_LOADER_TIME;
|
|
10919
|
+
if (delta >= IFRAME_SHOW_LOADER_MINIMAL_TIME) {
|
|
10920
|
+
setTimeout(() => {
|
|
10921
|
+
const container = getContainer();
|
|
10922
|
+
container === null || container === void 0 ? void 0 : container.classList.remove(CONTAINER_ELEMENT_CLASS__LOADER);
|
|
10923
|
+
IFRAME_START_SHOW_LOADER_TIME = 0;
|
|
10924
|
+
}, waitLayoutShift);
|
|
10925
|
+
return;
|
|
10926
|
+
}
|
|
10927
|
+
else {
|
|
10928
|
+
const waitLayoutShift = delta >= IFRAME_LAYOUT_SHIFT_TIME ? 0 : IFRAME_LAYOUT_SHIFT_TIME - delta;
|
|
10929
|
+
const timeoutTime = IFRAME_SHOW_LOADER_MINIMAL_TIME - delta;
|
|
10930
|
+
IFRAME_SHOW_LOADER_TIMEOUT_ID = setTimeout(() => {
|
|
10931
|
+
hideIframeLoader(waitLayoutShift);
|
|
10932
|
+
}, timeoutTime);
|
|
10933
|
+
return;
|
|
10934
|
+
}
|
|
10935
|
+
}
|
|
10936
|
+
async function openIframe(uri, callbacks = {}, { mountTargetSelector } = {}) {
|
|
10937
|
+
close();
|
|
10938
|
+
init(mountTargetSelector);
|
|
10939
|
+
return new Promise((resolve) => {
|
|
10940
|
+
function complete(callback) {
|
|
10941
|
+
close(callback);
|
|
10942
|
+
resolve();
|
|
10943
|
+
}
|
|
10944
|
+
function doOpen() {
|
|
10945
|
+
const iframe = document.createElement('iframe');
|
|
10946
|
+
iframe.src = uri;
|
|
10947
|
+
iframe.id = POPUP_ELEMENT_ID;
|
|
10948
|
+
iframe.onload = () => {
|
|
10949
|
+
hideIframeLoader();
|
|
10950
|
+
};
|
|
10951
|
+
if (!!getContainer()) {
|
|
10952
|
+
document.body.classList.add(BODY_CLASS);
|
|
10953
|
+
showIframeLoader();
|
|
10954
|
+
appendToContainer(iframe);
|
|
10955
|
+
handleIframeUnmount(iframe);
|
|
10956
|
+
penpal.connectToChild({
|
|
10957
|
+
iframe,
|
|
10958
|
+
methods: {
|
|
10959
|
+
...callbacks,
|
|
10960
|
+
handshake: (...args) => {
|
|
10961
|
+
var _a;
|
|
10962
|
+
hideIframeLoader();
|
|
10963
|
+
(_a = callbacks === null || callbacks === void 0 ? void 0 : callbacks.handshake) === null || _a === void 0 ? void 0 : _a.call(callbacks, ...args);
|
|
10964
|
+
},
|
|
10965
|
+
close: () => complete(callbacks.onClose),
|
|
10966
|
+
},
|
|
10967
|
+
});
|
|
10968
|
+
}
|
|
10969
|
+
else {
|
|
10970
|
+
throw Error('Membrane container element not found. Was it manually removed?');
|
|
10971
|
+
}
|
|
10972
|
+
}
|
|
10973
|
+
if (document.readyState === 'complete' || document.readyState === 'interactive') {
|
|
10974
|
+
doOpen();
|
|
10975
|
+
}
|
|
10976
|
+
else {
|
|
10977
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
10978
|
+
doOpen();
|
|
10979
|
+
});
|
|
10980
|
+
}
|
|
10981
|
+
});
|
|
10982
|
+
}
|
|
10983
|
+
function close(callback) {
|
|
10984
|
+
document.body.classList.remove(BODY_CLASS);
|
|
10985
|
+
if (!!getContainer()) {
|
|
10986
|
+
deleteContainer();
|
|
10987
|
+
if (callback) {
|
|
10988
|
+
callback();
|
|
10989
|
+
}
|
|
10990
|
+
}
|
|
10991
|
+
}
|
|
10992
|
+
function init(mountTargetSelector) {
|
|
10993
|
+
var _a;
|
|
10994
|
+
injectStyles(mountTargetSelector);
|
|
10995
|
+
if (!!getContainer()) {
|
|
10996
|
+
return;
|
|
10997
|
+
}
|
|
10998
|
+
const container = createContainer();
|
|
10999
|
+
if (mountTargetSelector && document.querySelector(mountTargetSelector)) {
|
|
11000
|
+
(_a = document.querySelector(mountTargetSelector)) === null || _a === void 0 ? void 0 : _a.appendChild(container);
|
|
11001
|
+
}
|
|
11002
|
+
else {
|
|
11003
|
+
document.body.appendChild(container);
|
|
11004
|
+
}
|
|
11005
|
+
}
|
|
11006
|
+
function injectStyles(mountTargetSelector) {
|
|
11007
|
+
const hasCustomMountTarget = Boolean(mountTargetSelector && document.querySelector(mountTargetSelector));
|
|
11008
|
+
const styles = [
|
|
11009
|
+
`.${CONTAINER_ELEMENT_CLASS}:empty {
|
|
11010
|
+
display: none;
|
|
11011
|
+
}`,
|
|
11012
|
+
hasCustomMountTarget
|
|
11013
|
+
? `.${CONTAINER_ELEMENT_CLASS} {
|
|
11014
|
+
inset: 0;
|
|
11015
|
+
background: rgba(0, 0, 0, 0);
|
|
11016
|
+
transition: background 0.2s ease-out;
|
|
11017
|
+
display: flex;
|
|
11018
|
+
justify-content: center;
|
|
11019
|
+
align-items: center;
|
|
11020
|
+
width: 100%;
|
|
11021
|
+
height: 100%;
|
|
11022
|
+
}`
|
|
11023
|
+
: `.${CONTAINER_ELEMENT_CLASS} {
|
|
11024
|
+
position: fixed;
|
|
11025
|
+
inset: 0;
|
|
11026
|
+
z-index: 2147483647;
|
|
11027
|
+
display: flex;
|
|
11028
|
+
justify-content: center;
|
|
11029
|
+
align-items: center;
|
|
11030
|
+
pointer-events: auto;
|
|
11031
|
+
background: rgba(0, 0, 0, 0);
|
|
11032
|
+
transition: background 0.2s ease-out;
|
|
11033
|
+
}`,
|
|
11034
|
+
`.${CONTAINER_ELEMENT_CLASS}.${CONTAINER_ELEMENT_CLASS__LOADER} {
|
|
11035
|
+
background: rgba(0, 0, 0, 0.8);
|
|
11036
|
+
}`,
|
|
11037
|
+
`.${CONTAINER_ELEMENT_CLASS}.${CONTAINER_ELEMENT_CLASS__LOADER}::before {
|
|
11038
|
+
${hasCustomMountTarget ? 'position: absolute;' : ''}
|
|
11039
|
+
content: "";
|
|
11040
|
+
width: 5rem;
|
|
11041
|
+
height: 4rem;
|
|
11042
|
+
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');
|
|
11043
|
+
background-size: contain;
|
|
11044
|
+
background-repeat: no-repeat;
|
|
11045
|
+
background-position: center;
|
|
11046
|
+
filter: invert(1);
|
|
11047
|
+
}`,
|
|
11048
|
+
`.${CONTAINER_ELEMENT_CLASS} iframe {
|
|
11049
|
+
${hasCustomMountTarget ? '' : 'position: absolute;'}
|
|
11050
|
+
width: 100%;
|
|
11051
|
+
height: 100%;
|
|
11052
|
+
border-width: 0;
|
|
11053
|
+
|
|
11054
|
+
/* fix transparent bg, because iframe document has light scheme */
|
|
11055
|
+
color-scheme: light;
|
|
11056
|
+
}`,
|
|
11057
|
+
`.${CONTAINER_ELEMENT_CLASS}.${CONTAINER_ELEMENT_CLASS__LOADER} iframe {
|
|
11058
|
+
visibility: hidden;
|
|
11059
|
+
}`,
|
|
11060
|
+
!hasCustomMountTarget
|
|
11061
|
+
? `body.${BODY_CLASS} {
|
|
11062
|
+
overflow: hidden;
|
|
11063
|
+
}`
|
|
11064
|
+
: '',
|
|
11065
|
+
];
|
|
11066
|
+
let styleElement = document.getElementById(STYLES_ELEMENT_ID);
|
|
11067
|
+
if (!styleElement) {
|
|
11068
|
+
styleElement = document.createElement('style');
|
|
11069
|
+
styleElement.id = STYLES_ELEMENT_ID;
|
|
11070
|
+
styleElement.type = 'text/css';
|
|
11071
|
+
document.head.appendChild(styleElement);
|
|
11072
|
+
}
|
|
11073
|
+
styleElement.textContent = styles.join('\n');
|
|
11074
|
+
}
|
|
11075
|
+
function removeInjectedStyles() {
|
|
11076
|
+
const stylesElement = document.getElementById(STYLES_ELEMENT_ID);
|
|
11077
|
+
if (stylesElement) {
|
|
11078
|
+
stylesElement.remove();
|
|
11079
|
+
}
|
|
11080
|
+
}
|
|
11081
|
+
function createContainer() {
|
|
11082
|
+
const container = document.createElement('div');
|
|
11083
|
+
container.id = CONTAINER_ELEMENT_ID;
|
|
11084
|
+
container.classList.add(CONTAINER_ELEMENT_CLASS);
|
|
11085
|
+
return container;
|
|
11086
|
+
}
|
|
11087
|
+
function getContainer() {
|
|
11088
|
+
return document.getElementById(CONTAINER_ELEMENT_ID);
|
|
11089
|
+
}
|
|
11090
|
+
function appendToContainer(el) {
|
|
11091
|
+
const container = getContainer();
|
|
11092
|
+
container === null || container === void 0 ? void 0 : container.appendChild(el);
|
|
11093
|
+
}
|
|
11094
|
+
function deleteContainer() {
|
|
11095
|
+
const container = getContainer();
|
|
11096
|
+
if (container) {
|
|
11097
|
+
container.remove();
|
|
11098
|
+
}
|
|
11099
|
+
removeInjectedStyles();
|
|
11100
|
+
}
|
|
11101
|
+
function handleIframeUnmount(iframe) {
|
|
11102
|
+
const observer = new MutationObserver((mutationsList) => {
|
|
11103
|
+
for (const mutation of mutationsList) {
|
|
11104
|
+
for (const removedNode of mutation.removedNodes) {
|
|
11105
|
+
if (removedNode instanceof HTMLElement && removedNode.id === POPUP_ELEMENT_ID) {
|
|
11106
|
+
observer.disconnect();
|
|
11107
|
+
deleteContainer();
|
|
11108
|
+
return;
|
|
11109
|
+
}
|
|
11110
|
+
}
|
|
11111
|
+
}
|
|
11112
|
+
});
|
|
11113
|
+
const parent = iframe.parentNode;
|
|
11114
|
+
if (parent) {
|
|
11115
|
+
observer.observe(parent, {
|
|
11116
|
+
childList: true,
|
|
11117
|
+
});
|
|
11118
|
+
}
|
|
11119
|
+
else {
|
|
11120
|
+
console.warn(`iframe with ID "${POPUP_ELEMENT_ID}" has no parent node`);
|
|
11121
|
+
}
|
|
11122
|
+
}
|
|
11123
|
+
|
|
11118
11124
|
class ConnectionLevelElementAccessor {
|
|
11119
11125
|
constructor(client, connectionSelector, selector, elementKey, query) {
|
|
11120
11126
|
this.client = client;
|
|
@@ -12358,20 +12364,20 @@ const HandyScenarioTemplateElement = zod.z.object({
|
|
|
12358
12364
|
key: zod.z.string(),
|
|
12359
12365
|
name: zod.z.string(),
|
|
12360
12366
|
})
|
|
12361
|
-
.and(zod.z.record(zod.z.any())),
|
|
12367
|
+
.and(zod.z.record(zod.z.string(), zod.z.any())),
|
|
12362
12368
|
});
|
|
12363
12369
|
const withIntegrationKeys = (schema) => schema.and(zod.z.object({ integrationKeys: zod.z.array(zod.z.string()).optional() }));
|
|
12364
12370
|
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(),
|
|
12371
|
+
flows: zod.z.record(zod.z.string(), withIntegrationKeys(zod.z.any())).optional(),
|
|
12372
|
+
actions: zod.z.record(zod.z.string(), withIntegrationKeys(zod.z.any())).optional(),
|
|
12373
|
+
fieldMappings: zod.z.record(zod.z.string(), withIntegrationKeys(zod.z.any())).optional(),
|
|
12374
|
+
dataSources: zod.z.record(zod.z.string(), withIntegrationKeys(zod.z.any())).optional(),
|
|
12375
|
+
dataLinkTables: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
12376
|
+
appEventTypes: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
12377
|
+
appDataSchemas: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
12372
12378
|
});
|
|
12373
12379
|
const ScenarioTemplateElements = ElementsExportFields.and(zod.z.object({
|
|
12374
|
-
integrations: zod.z.record(ElementsExportFields.and(zod.z.object({ connectorId: zod.z.string() }))).optional(),
|
|
12380
|
+
integrations: zod.z.record(zod.z.string(), ElementsExportFields.and(zod.z.object({ connectorId: zod.z.string() }))).optional(),
|
|
12375
12381
|
}));
|
|
12376
12382
|
const ScenarioTemplate = zod.z.object({
|
|
12377
12383
|
id: zod.z.string(),
|
|
@@ -12965,14 +12971,12 @@ exports.NotAuthenticatedError = NotAuthenticatedError;
|
|
|
12965
12971
|
exports.NotFoundError = NotFoundError;
|
|
12966
12972
|
exports.OAUTH1_CONFIG_SCHEMA = OAUTH1_CONFIG_SCHEMA;
|
|
12967
12973
|
exports.OAUTH_CONFIG_SCHEMA = OAUTH_CONFIG_SCHEMA;
|
|
12968
|
-
exports.OpenNewConnectionOptions = OpenNewConnectionOptions;
|
|
12969
12974
|
exports.PARALLEL_EXECUTION_LIMITS = PARALLEL_EXECUTION_LIMITS;
|
|
12970
12975
|
exports.PaginationQuery = PaginationQuery;
|
|
12971
12976
|
exports.PaginationResponse = PaginationResponse;
|
|
12972
12977
|
exports.RATE_LIMITS = RATE_LIMITS;
|
|
12973
12978
|
exports.RateLimitExceededError = RateLimitExceededError;
|
|
12974
12979
|
exports.ResetFlowInstanceOptions = ResetFlowInstanceOptions;
|
|
12975
|
-
exports.RunFlowOptions = RunFlowOptions;
|
|
12976
12980
|
exports.ScenarioAccessor = ScenarioAccessor;
|
|
12977
12981
|
exports.ScenarioApiResponse = ScenarioApiResponse;
|
|
12978
12982
|
exports.ScenarioCalculatedProperties = ScenarioCalculatedProperties;
|
|
@@ -13035,6 +13039,7 @@ exports.generateExampleFromSchema = generateExampleFromSchema;
|
|
|
13035
13039
|
exports.getActionInstanceVariableSchema = getActionInstanceVariableSchema;
|
|
13036
13040
|
exports.getActionRunTimeVariablesSchema = getActionRunTimeVariablesSchema;
|
|
13037
13041
|
exports.getAllEventMethodFilePaths = getAllEventMethodFilePaths;
|
|
13042
|
+
exports.getBusinessDaysBetween = getBusinessDaysBetween;
|
|
13038
13043
|
exports.getChildNodeKeys = getChildNodeKeys;
|
|
13039
13044
|
exports.getDataCollectionCreateFields = getDataCollectionCreateFields;
|
|
13040
13045
|
exports.getDataCollectionUpdateFields = getDataCollectionUpdateFields;
|
|
@@ -13077,6 +13082,7 @@ exports.getWritableFieldsSchema = getWritableFieldsSchema;
|
|
|
13077
13082
|
exports.hasCycles = hasCycles;
|
|
13078
13083
|
exports.hasFormulas_internalDoNotUse = hasFormulas;
|
|
13079
13084
|
exports.injectFormulaCatalog = injectFormulaCatalog;
|
|
13085
|
+
exports.isBusinessDay = isBusinessDay;
|
|
13080
13086
|
exports.isDataActionType = isDataActionType;
|
|
13081
13087
|
exports.isDataLocationMethodSupported = isDataLocationMethodSupported;
|
|
13082
13088
|
exports.isFormula_internalDoNotUse = isFormula;
|