@membranehq/sdk 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.d.ts +8370 -1268
- package/dist/bundle.js +2216 -2085
- package/dist/bundle.js.map +1 -1
- package/dist/dts/accessors/connections-accessors.d.ts +57 -1
- package/dist/dts/accessors/integrations-accessors.d.ts +57 -1
- package/dist/dts/api-client.d.ts +1 -0
- package/dist/dts/client.d.ts +1 -0
- package/dist/dts/data-schema/types.d.ts +4 -3
- package/dist/dts/entity-repository.d.ts +87 -20
- package/dist/dts/formulas/dataSchemaRef.d.ts +2 -2
- package/dist/dts/http-requests.d.ts +20 -6
- package/dist/dts/iframe.d.ts +12 -4
- package/dist/dts/index.d.ts +2 -1
- package/dist/dts/sse/index.d.ts +1 -0
- package/dist/dts/sse/workspace-elements.d.ts +9 -0
- package/dist/dts/workspace-elements/api/actions-api.d.ts +702 -40
- package/dist/dts/workspace-elements/api/connections-api.d.ts +702 -41
- package/dist/dts/workspace-elements/api/customers-api.d.ts +56 -13
- package/dist/dts/workspace-elements/api/data-sources-api.d.ts +834 -77
- package/dist/dts/workspace-elements/api/external-events-api.d.ts +440 -6
- package/dist/dts/workspace-elements/api/field-mappings-api.d.ts +586 -6
- package/dist/dts/workspace-elements/api/flow-runs-api.d.ts +1 -1
- package/dist/dts/workspace-elements/api/flows-api.d.ts +2417 -50
- package/dist/dts/workspace-elements/api/integrations-api.d.ts +253 -24
- package/dist/dts/workspace-elements/api/scenarios-api.d.ts +397 -34
- package/dist/dts/workspace-elements/api/screens-api.d.ts +2 -2
- package/dist/dts/workspace-elements/base/action-instances/types.d.ts +61 -14
- package/dist/dts/workspace-elements/base/action-run-log-records/types.d.ts +30 -7
- package/dist/dts/workspace-elements/base/actions/types.d.ts +60 -17
- package/dist/dts/workspace-elements/base/app-data-schema-instances/types.d.ts +42 -7
- package/dist/dts/workspace-elements/base/app-data-schemas/types.d.ts +35 -7
- package/dist/dts/workspace-elements/base/app-event-subscriptions/types.d.ts +78 -9
- package/dist/dts/workspace-elements/base/app-event-types/types.d.ts +70 -7
- package/dist/dts/workspace-elements/base/connections/types.d.ts +76 -20
- package/dist/dts/workspace-elements/base/connectors/types.d.ts +14 -2
- package/dist/dts/workspace-elements/base/customers/index.d.ts +26 -6
- package/dist/dts/workspace-elements/base/data-collections/schemas.d.ts +75 -74
- package/dist/dts/workspace-elements/base/data-link-table-instances/types.d.ts +61 -11
- package/dist/dts/workspace-elements/base/data-link-tables/types.d.ts +26 -4
- package/dist/dts/workspace-elements/base/data-source-instances/types.d.ts +1030 -19
- package/dist/dts/workspace-elements/base/data-sources/types.d.ts +89 -22
- package/dist/dts/workspace-elements/base/external-event-log-records/types.d.ts +31 -8
- package/dist/dts/workspace-elements/base/external-event-pulls/types.d.ts +35 -8
- package/dist/dts/workspace-elements/base/external-event-subscriptions/types.d.ts +199 -23
- package/dist/dts/workspace-elements/base/external-events/types.d.ts +145 -5
- package/dist/dts/workspace-elements/base/field-mapping-instances/types.d.ts +74 -16
- package/dist/dts/workspace-elements/base/field-mappings/types.d.ts +91 -14
- package/dist/dts/workspace-elements/base/flow-instances/schemas.d.ts +39 -39
- package/dist/dts/workspace-elements/base/flow-instances/types.d.ts +155 -24
- package/dist/dts/workspace-elements/base/flow-runs/flow-node-runs.d.ts +20 -20
- package/dist/dts/workspace-elements/base/flow-runs/types.d.ts +114 -19
- package/dist/dts/workspace-elements/base/flows/types.d.ts +220 -26
- package/dist/dts/workspace-elements/base/integrations/types.d.ts +497 -24
- package/dist/dts/workspace-elements/base/scenarios/types.d.ts +723 -23
- package/dist/dts/workspace-elements/base/screens/types.d.ts +40 -6
- package/dist/index.d.ts +12141 -2138
- package/dist/index.js +1555 -522
- package/dist/index.js.map +1 -1
- package/dist/index.module.d.mts +12141 -2138
- package/dist/index.module.mjs +1414 -490
- package/dist/index.module.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.module.mjs
CHANGED
|
@@ -5,9 +5,9 @@ import jsonata from 'jsonata';
|
|
|
5
5
|
import deepEqual from 'fast-deep-equal';
|
|
6
6
|
import structuredClonePolyfill from '@ungap/structured-clone';
|
|
7
7
|
import urljoin from 'url-join';
|
|
8
|
+
import { connectToChild } from 'penpal';
|
|
8
9
|
import { fromError } from 'zod-validation-error/v3';
|
|
9
10
|
import qs from 'qs';
|
|
10
|
-
import { connectToChild } from 'penpal';
|
|
11
11
|
import axiosOriginal from 'axios';
|
|
12
12
|
|
|
13
13
|
var ErrorType;
|
|
@@ -1344,6 +1344,42 @@ const DataSchemaSchema = z.lazy(() => z.object({
|
|
|
1344
1344
|
referenceCollectionUri: z.string().optional(),
|
|
1345
1345
|
}));
|
|
1346
1346
|
|
|
1347
|
+
const DataSchema = z.lazy(() => z.object({
|
|
1348
|
+
title: z.string().optional(),
|
|
1349
|
+
description: z.string().optional(),
|
|
1350
|
+
type: z.union([z.string(), z.array(z.string())]).optional(),
|
|
1351
|
+
format: z.string().optional(),
|
|
1352
|
+
properties: z.record(DataSchema).optional(),
|
|
1353
|
+
items: DataSchema.optional(),
|
|
1354
|
+
additionalProperties: z.union([z.boolean(), DataSchema]).optional(),
|
|
1355
|
+
enum: z.array(z.string()).optional(),
|
|
1356
|
+
referenceRecords: z.array(z.any()).optional(),
|
|
1357
|
+
referenceCollection: z
|
|
1358
|
+
.object({
|
|
1359
|
+
key: z.any().optional(),
|
|
1360
|
+
parameters: z.record(z.any()).optional(),
|
|
1361
|
+
})
|
|
1362
|
+
.optional(),
|
|
1363
|
+
referenceUdm: z.string().optional(),
|
|
1364
|
+
default: z.any().optional(),
|
|
1365
|
+
allowCustom: z.boolean().optional(),
|
|
1366
|
+
$ref: z.string().optional(),
|
|
1367
|
+
required: z.array(z.string()).optional(),
|
|
1368
|
+
minLength: z.number().optional(),
|
|
1369
|
+
maxLength: z.number().optional(),
|
|
1370
|
+
minimum: z.number().optional(),
|
|
1371
|
+
maximum: z.number().optional(),
|
|
1372
|
+
maxItems: z.number().optional(),
|
|
1373
|
+
readOnly: z.boolean().optional(),
|
|
1374
|
+
writeOnly: z.boolean().optional(),
|
|
1375
|
+
examples: z.array(z.any()).optional(),
|
|
1376
|
+
anyOf: z.array(DataSchema).optional(),
|
|
1377
|
+
isImplied: z.boolean().optional(),
|
|
1378
|
+
isSensitive: z.boolean().optional(),
|
|
1379
|
+
referenceCollectionPath: z.string().optional(),
|
|
1380
|
+
referenceCollectionUri: z.string().optional(),
|
|
1381
|
+
}));
|
|
1382
|
+
|
|
1347
1383
|
function updateImpliedSchema({ schema: sourceSchema, value, variablesSchema, }) {
|
|
1348
1384
|
let resultSchema = sourceSchema ? JSON.parse(JSON.stringify(sourceSchema)) : undefined;
|
|
1349
1385
|
resultSchema = walkSchema(resultSchema, (schema) => (schema.isImplied ? undefined : schema));
|
|
@@ -3361,12 +3397,110 @@ function getFormula(value) {
|
|
|
3361
3397
|
return undefined;
|
|
3362
3398
|
}
|
|
3363
3399
|
|
|
3400
|
+
var ConfigurationState;
|
|
3401
|
+
(function (ConfigurationState) {
|
|
3402
|
+
ConfigurationState["CONFIGURED"] = "CONFIGURED";
|
|
3403
|
+
ConfigurationState["NOT_CONFIGURED"] = "NOT_CONFIGURED";
|
|
3404
|
+
})(ConfigurationState || (ConfigurationState = {}));
|
|
3405
|
+
var WorkspaceElementType;
|
|
3406
|
+
(function (WorkspaceElementType) {
|
|
3407
|
+
WorkspaceElementType["Customer"] = "customer";
|
|
3408
|
+
WorkspaceElementType["Connector"] = "connector";
|
|
3409
|
+
WorkspaceElementType["Integration"] = "integration";
|
|
3410
|
+
WorkspaceElementType["Flow"] = "flow";
|
|
3411
|
+
WorkspaceElementType["FlowInstance"] = "flow-instance";
|
|
3412
|
+
WorkspaceElementType["FlowRun"] = "flow-run";
|
|
3413
|
+
WorkspaceElementType["Action"] = "action";
|
|
3414
|
+
WorkspaceElementType["Scenario"] = "scenario";
|
|
3415
|
+
WorkspaceElementType["ActionInstance"] = "action-instance";
|
|
3416
|
+
WorkspaceElementType["Connection"] = "connection";
|
|
3417
|
+
WorkspaceElementType["FieldMapping"] = "field-mapping";
|
|
3418
|
+
WorkspaceElementType["FieldMappingInstance"] = "field-mapping-instance";
|
|
3419
|
+
WorkspaceElementType["DataSource"] = "data-source";
|
|
3420
|
+
WorkspaceElementType["DataSourceInstance"] = "data-source-instance";
|
|
3421
|
+
WorkspaceElementType["DataLinkTable"] = "data-link-table";
|
|
3422
|
+
WorkspaceElementType["DataLinkTableInstance"] = "data-link-table-instance";
|
|
3423
|
+
WorkspaceElementType["AppEventType"] = "app-event-type";
|
|
3424
|
+
WorkspaceElementType["AppEventSubscription"] = "app-event-subscription";
|
|
3425
|
+
WorkspaceElementType["AppDataSchema"] = "app-data-schema";
|
|
3426
|
+
WorkspaceElementType["AppDataSchemaInstance"] = "app-data-schema-instance";
|
|
3427
|
+
WorkspaceElementType["ExternalEventSubscription"] = "external-event-subscription";
|
|
3428
|
+
WorkspaceElementType["ExternalEventLogRecord"] = "external-event-log-record";
|
|
3429
|
+
WorkspaceElementType["ExternalEventPull"] = "external-event-pull";
|
|
3430
|
+
WorkspaceElementType["DataCollection"] = "data-collection";
|
|
3431
|
+
WorkspaceElementType["Screen"] = "screen";
|
|
3432
|
+
WorkspaceElementType["ActionRunLogRecord"] = "action-run-log-record";
|
|
3433
|
+
})(WorkspaceElementType || (WorkspaceElementType = {}));
|
|
3434
|
+
var WorkspaceEventType;
|
|
3435
|
+
(function (WorkspaceEventType) {
|
|
3436
|
+
WorkspaceEventType["ConnectionCreated"] = "connection.created";
|
|
3437
|
+
WorkspaceEventType["ConnectionDeleted"] = "connection.deleted";
|
|
3438
|
+
WorkspaceEventType["ConnectionDisconnected"] = "connection.disconnected";
|
|
3439
|
+
WorkspaceEventType["ConnectionReconnected"] = "connection.reconnected";
|
|
3440
|
+
WorkspaceEventType["FlowRunQueued"] = "flowRun.queued";
|
|
3441
|
+
WorkspaceEventType["FlowRunStarted"] = "flowRun.started";
|
|
3442
|
+
WorkspaceEventType["FlowRunCompleted"] = "flowRun.completed";
|
|
3443
|
+
WorkspaceEventType["FlowRunFailed"] = "flowRun.failed";
|
|
3444
|
+
WorkspaceEventType["FlowRunStopped"] = "flowRun.stopped";
|
|
3445
|
+
})(WorkspaceEventType || (WorkspaceEventType = {}));
|
|
3446
|
+
var WorkspaceElementState;
|
|
3447
|
+
(function (WorkspaceElementState) {
|
|
3448
|
+
WorkspaceElementState["CONFIGURATION_ERROR"] = "CONFIGURATION_ERROR";
|
|
3449
|
+
WorkspaceElementState["SETUP_FAILED"] = "SETUP_FAILED";
|
|
3450
|
+
WorkspaceElementState["READY"] = "READY";
|
|
3451
|
+
})(WorkspaceElementState || (WorkspaceElementState = {}));
|
|
3452
|
+
var WorkspaceElementDependencyType;
|
|
3453
|
+
(function (WorkspaceElementDependencyType) {
|
|
3454
|
+
WorkspaceElementDependencyType["Configuration"] = "CONFIGURATION";
|
|
3455
|
+
WorkspaceElementDependencyType["Parent"] = "PARENT";
|
|
3456
|
+
})(WorkspaceElementDependencyType || (WorkspaceElementDependencyType = {}));
|
|
3457
|
+
const BaseWorkspaceElement = z.object({
|
|
3458
|
+
id: z.string(),
|
|
3459
|
+
name: z.string(),
|
|
3460
|
+
});
|
|
3461
|
+
const BaseMembraneInterface = BaseWorkspaceElement.extend({
|
|
3462
|
+
key: z.string(),
|
|
3463
|
+
state: z.nativeEnum(WorkspaceElementState).optional(),
|
|
3464
|
+
errors: z.array(ErrorDataSchema).optional(),
|
|
3465
|
+
});
|
|
3466
|
+
|
|
3364
3467
|
var FieldMappingDirection;
|
|
3365
3468
|
(function (FieldMappingDirection) {
|
|
3366
3469
|
FieldMappingDirection["IMPORT"] = "import";
|
|
3367
3470
|
FieldMappingDirection["EXPORT"] = "export";
|
|
3368
3471
|
FieldMappingDirection["BOTH"] = "both";
|
|
3369
3472
|
})(FieldMappingDirection || (FieldMappingDirection = {}));
|
|
3473
|
+
const BaseFieldMapping = BaseMembraneInterface.extend({
|
|
3474
|
+
revision: z.string(),
|
|
3475
|
+
publishedRevision: z.string().optional(),
|
|
3476
|
+
universalFieldMappingId: z.string().optional(),
|
|
3477
|
+
universalFieldMappingRevision: z.string().optional(),
|
|
3478
|
+
integrationId: z.string().optional(),
|
|
3479
|
+
dataSourceId: z.string(),
|
|
3480
|
+
dataSourceKey: z.string(),
|
|
3481
|
+
appSchema: DataSchema,
|
|
3482
|
+
direction: z.nativeEnum(FieldMappingDirection),
|
|
3483
|
+
defaultImportValue: z.any().optional(),
|
|
3484
|
+
defaultExportValue: z.any().optional(),
|
|
3485
|
+
importValue: z.any().optional(),
|
|
3486
|
+
exportValue: z.any().optional(),
|
|
3487
|
+
frozenImportFields: z.any().optional(),
|
|
3488
|
+
frozenExportFields: z.any().optional(),
|
|
3489
|
+
frozenUnifiedExportFields: z.any().optional(),
|
|
3490
|
+
archivedAt: z.string().optional(),
|
|
3491
|
+
customized: z.boolean().optional(),
|
|
3492
|
+
});
|
|
3493
|
+
const FieldMappingUnitConfig = z.object({
|
|
3494
|
+
key: z.string().optional(),
|
|
3495
|
+
input: z.any().optional(),
|
|
3496
|
+
includeRawFields: z.any().optional(),
|
|
3497
|
+
importValue: z.any().optional(),
|
|
3498
|
+
exportValue: z.any().optional(),
|
|
3499
|
+
default: z.any().optional(),
|
|
3500
|
+
defaultUnifiedValue: z.any().optional(),
|
|
3501
|
+
defaultValue: z.any().optional(),
|
|
3502
|
+
appSchema: DataSchema.optional(),
|
|
3503
|
+
});
|
|
3370
3504
|
|
|
3371
3505
|
function mergeWithFormulas(a, b) {
|
|
3372
3506
|
if (Array.isArray(a) && Array.isArray(b)) {
|
|
@@ -3495,6 +3629,56 @@ const ACTIONS = {
|
|
|
3495
3629
|
},
|
|
3496
3630
|
};
|
|
3497
3631
|
|
|
3632
|
+
const BaseAction = z.object({
|
|
3633
|
+
id: z.string(),
|
|
3634
|
+
key: z.string(),
|
|
3635
|
+
name: z.string(),
|
|
3636
|
+
revision: z.string(),
|
|
3637
|
+
integrationId: z.string().optional(),
|
|
3638
|
+
parentId: z.string().optional(),
|
|
3639
|
+
parentRevision: z.string().optional(),
|
|
3640
|
+
isCustomized: z.boolean().optional(),
|
|
3641
|
+
createdAt: z.string().optional(),
|
|
3642
|
+
updatedAt: z.string().optional(),
|
|
3643
|
+
archivedAt: z.string().optional(),
|
|
3644
|
+
type: z.nativeEnum(ActionType),
|
|
3645
|
+
inputSchema: DataSchema.optional(),
|
|
3646
|
+
config: z.any().optional(),
|
|
3647
|
+
outputMapping: z.any().optional(),
|
|
3648
|
+
customOutputSchema: DataSchema.optional(),
|
|
3649
|
+
defaultOutputSchema: DataSchema.optional(),
|
|
3650
|
+
transformedOutputSchema: DataSchema.optional(),
|
|
3651
|
+
outputSchema: DataSchema.optional(),
|
|
3652
|
+
dependencies: z.array(z.any()).optional(),
|
|
3653
|
+
});
|
|
3654
|
+
|
|
3655
|
+
const ConnectionRequest = z.object({
|
|
3656
|
+
path: z.any(),
|
|
3657
|
+
method: z.enum(['GET', 'POST', 'PUT', 'PATCH', 'DELETE']).optional(),
|
|
3658
|
+
pathParameters: z.record(z.string()).optional(),
|
|
3659
|
+
headers: z.record(z.string()).optional(),
|
|
3660
|
+
query: z.record(z.string()).optional(),
|
|
3661
|
+
data: z.any().optional(),
|
|
3662
|
+
});
|
|
3663
|
+
const BaseConnection = BaseWorkspaceElement.extend({
|
|
3664
|
+
name: z.string(),
|
|
3665
|
+
userId: z.string(),
|
|
3666
|
+
disconnected: z.boolean().optional(),
|
|
3667
|
+
error: ErrorDataSchema.optional(),
|
|
3668
|
+
integrationId: z.string(),
|
|
3669
|
+
credentials: z.unknown().optional(),
|
|
3670
|
+
parameters: z.unknown().optional(),
|
|
3671
|
+
connectorParameters: z.unknown().optional(),
|
|
3672
|
+
accessToken: z.string().optional(),
|
|
3673
|
+
refreshToken: z.string().optional(),
|
|
3674
|
+
createdAt: z.string(),
|
|
3675
|
+
updatedAt: z.string(),
|
|
3676
|
+
lastActiveAt: z.string().optional(),
|
|
3677
|
+
nextCredentialsRefreshAt: z.string().optional(),
|
|
3678
|
+
archivedAt: z.string().optional(),
|
|
3679
|
+
state: z.nativeEnum(WorkspaceElementState).optional(),
|
|
3680
|
+
errors: z.array(ErrorDataSchema).optional(),
|
|
3681
|
+
});
|
|
3498
3682
|
class ConnectionSpec {
|
|
3499
3683
|
constructor(opts) {
|
|
3500
3684
|
Object.assign(this, opts);
|
|
@@ -3818,6 +4002,12 @@ var ConnectorStatus;
|
|
|
3818
4002
|
ConnectorStatus["beta"] = "beta";
|
|
3819
4003
|
ConnectorStatus["planned"] = "planned";
|
|
3820
4004
|
})(ConnectorStatus || (ConnectorStatus = {}));
|
|
4005
|
+
const MinimalConnector = z.object({
|
|
4006
|
+
id: z.string(),
|
|
4007
|
+
key: z.string(),
|
|
4008
|
+
name: z.string(),
|
|
4009
|
+
logoUri: z.string(),
|
|
4010
|
+
});
|
|
3821
4011
|
|
|
3822
4012
|
const DataRecordSchema = z.object({
|
|
3823
4013
|
id: z.string(),
|
|
@@ -7283,7 +7473,7 @@ function getWritableFieldsSchema(spec) {
|
|
|
7283
7473
|
return mergeSchemas([getDataCollectionCreateFields(spec), getDataCollectionUpdateFields(spec)]);
|
|
7284
7474
|
}
|
|
7285
7475
|
function getReferenceCollectionPointerForSchema(schema) {
|
|
7286
|
-
if (schema === null || schema === void 0 ? void 0 : schema.referenceCollection) {
|
|
7476
|
+
if ((schema === null || schema === void 0 ? void 0 : schema.referenceCollection) && schema.referenceCollection.key) {
|
|
7287
7477
|
return schema.referenceCollection;
|
|
7288
7478
|
}
|
|
7289
7479
|
else if (schema === null || schema === void 0 ? void 0 : schema.referenceCollectionPath) {
|
|
@@ -7878,8 +8068,8 @@ const DataCollectionRecordFromFieldsMethod = {
|
|
|
7878
8068
|
getInputSchema: ({ collectionSpec }) => ({
|
|
7879
8069
|
type: 'object',
|
|
7880
8070
|
properties: {
|
|
7881
|
-
|
|
7882
|
-
|
|
8071
|
+
...((collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema) && { fields: collectionSpec.fieldsSchema }),
|
|
8072
|
+
...((collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.parametersSchema) && { parameters: collectionSpec.parametersSchema }),
|
|
7883
8073
|
},
|
|
7884
8074
|
}),
|
|
7885
8075
|
getOutputSchema: () => DATA_RECORD_SCHEMA,
|
|
@@ -7918,7 +8108,7 @@ const DataCollectionFieldsFromApiMethod = {
|
|
|
7918
8108
|
},
|
|
7919
8109
|
};
|
|
7920
8110
|
},
|
|
7921
|
-
getOutputSchema: ({ collectionSpec }) => collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema,
|
|
8111
|
+
getOutputSchema: ({ collectionSpec }) => (collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema) || { type: 'object' },
|
|
7922
8112
|
supportedImplementationTypes: [ConnectorMethodImplementationType.javascript],
|
|
7923
8113
|
};
|
|
7924
8114
|
const DataCollectionFieldsToApiMethod = {
|
|
@@ -7927,7 +8117,7 @@ const DataCollectionFieldsToApiMethod = {
|
|
|
7927
8117
|
getInputSchema: ({ collectionSpec }) => ({
|
|
7928
8118
|
type: 'object',
|
|
7929
8119
|
properties: {
|
|
7930
|
-
|
|
8120
|
+
...((collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema) && { fields: collectionSpec.fieldsSchema }),
|
|
7931
8121
|
},
|
|
7932
8122
|
}),
|
|
7933
8123
|
getOutputSchema: () => {
|
|
@@ -7969,134 +8159,134 @@ const DataLocationTypeCollection = {
|
|
|
7969
8159
|
};
|
|
7970
8160
|
const ConnectorDataCollectionMethodKeys = Object.keys(DataLocationTypeCollection.methods);
|
|
7971
8161
|
|
|
7972
|
-
const
|
|
8162
|
+
const ApiRequestSpec = z.object({
|
|
7973
8163
|
path: z.unknown(),
|
|
7974
8164
|
method: z.unknown(),
|
|
7975
8165
|
});
|
|
7976
|
-
const
|
|
7977
|
-
apiRequests: z.array(
|
|
8166
|
+
const DataCollectionMethodSpec = z.object({
|
|
8167
|
+
apiRequests: z.array(ApiRequestSpec).optional(),
|
|
7978
8168
|
});
|
|
7979
|
-
const
|
|
8169
|
+
const DataCollectionListSpec = DataCollectionMethodSpec.extend({
|
|
7980
8170
|
filterFields: z.array(z.string()).optional(),
|
|
7981
8171
|
});
|
|
7982
|
-
const
|
|
7983
|
-
const
|
|
8172
|
+
const DataCollectionSearchSpec = DataCollectionMethodSpec.extend({});
|
|
8173
|
+
const DataCollectionMatchSpec = DataCollectionMethodSpec.extend({
|
|
7984
8174
|
fields: z.array(z.string()).optional(),
|
|
7985
8175
|
});
|
|
7986
|
-
const
|
|
7987
|
-
const
|
|
8176
|
+
const DataCollectionFindByIdSpec = DataCollectionMethodSpec.extend({});
|
|
8177
|
+
const DataCollectionCreateSpec = DataCollectionMethodSpec.extend({
|
|
7988
8178
|
fields: z.array(z.string()).optional(),
|
|
7989
8179
|
requiredFields: z.array(z.string()).optional(),
|
|
7990
8180
|
excludedFields: z.array(z.string()).optional(),
|
|
7991
8181
|
});
|
|
7992
|
-
const
|
|
8182
|
+
const DataCollectionUpdateSpec = DataCollectionMethodSpec.extend({
|
|
7993
8183
|
fields: z.array(z.string()).optional(),
|
|
7994
8184
|
excludedFields: z.array(z.string()).optional(),
|
|
7995
8185
|
});
|
|
7996
|
-
const
|
|
7997
|
-
const
|
|
8186
|
+
const DataCollectionDeleteSpec = DataCollectionMethodSpec.extend({});
|
|
8187
|
+
const DataCollectionFindSpec = DataCollectionMethodSpec.extend({
|
|
7998
8188
|
queryFields: z.array(z.string()).optional(),
|
|
7999
8189
|
});
|
|
8000
|
-
const
|
|
8190
|
+
const DataCollectionEventTypeSpec = z.object({
|
|
8001
8191
|
type: z.enum(['push', 'pull']),
|
|
8002
8192
|
isFullScan: z.boolean().optional(),
|
|
8003
8193
|
isIdOnly: z.boolean().optional(),
|
|
8004
8194
|
});
|
|
8005
|
-
const
|
|
8195
|
+
const DataCollectionEventsSpec = z
|
|
8006
8196
|
.object({
|
|
8007
|
-
created:
|
|
8008
|
-
updated:
|
|
8009
|
-
deleted:
|
|
8010
|
-
all:
|
|
8197
|
+
created: DataCollectionEventTypeSpec.optional(),
|
|
8198
|
+
updated: DataCollectionEventTypeSpec.optional(),
|
|
8199
|
+
deleted: DataCollectionEventTypeSpec.optional(),
|
|
8200
|
+
all: DataCollectionEventTypeSpec.optional(),
|
|
8011
8201
|
})
|
|
8012
|
-
.catchall(
|
|
8013
|
-
const
|
|
8202
|
+
.catchall(DataCollectionEventTypeSpec);
|
|
8203
|
+
const DataCollectionUdmSpec = z.object({
|
|
8014
8204
|
fields: z.array(z.string()).optional(),
|
|
8015
8205
|
extract: z.record(z.any()).optional(),
|
|
8016
8206
|
parse: z.record(z.any()).optional(),
|
|
8017
8207
|
});
|
|
8018
|
-
const
|
|
8019
|
-
const
|
|
8208
|
+
const DataCollectionUdmsSpec = z.record(DataCollectionUdmSpec);
|
|
8209
|
+
const DataCollectionSpec = z.object({
|
|
8020
8210
|
type: z.literal('collection'),
|
|
8021
8211
|
key: z.string().optional(),
|
|
8022
8212
|
name: z.string(),
|
|
8023
|
-
parametersSchema:
|
|
8024
|
-
fieldsSchema:
|
|
8025
|
-
list:
|
|
8026
|
-
search:
|
|
8027
|
-
match:
|
|
8028
|
-
findById:
|
|
8029
|
-
create:
|
|
8030
|
-
update:
|
|
8031
|
-
delete:
|
|
8032
|
-
events:
|
|
8213
|
+
parametersSchema: DataSchema.optional(),
|
|
8214
|
+
fieldsSchema: DataSchema.optional(),
|
|
8215
|
+
list: DataCollectionListSpec.optional(),
|
|
8216
|
+
search: DataCollectionSearchSpec.optional(),
|
|
8217
|
+
match: DataCollectionMatchSpec.optional(),
|
|
8218
|
+
findById: DataCollectionFindByIdSpec.optional(),
|
|
8219
|
+
create: DataCollectionCreateSpec.optional(),
|
|
8220
|
+
update: DataCollectionUpdateSpec.optional(),
|
|
8221
|
+
delete: DataCollectionDeleteSpec.optional(),
|
|
8222
|
+
events: DataCollectionEventsSpec.optional(),
|
|
8033
8223
|
customFields: z.boolean().optional(),
|
|
8034
|
-
udm:
|
|
8035
|
-
find:
|
|
8224
|
+
udm: DataCollectionUdmsSpec.optional(),
|
|
8225
|
+
find: DataCollectionFindSpec.optional(),
|
|
8036
8226
|
});
|
|
8037
|
-
const
|
|
8227
|
+
const DataCollectionMethodRequest = z.object({
|
|
8038
8228
|
parameters: z.record(z.any()).optional(),
|
|
8039
8229
|
});
|
|
8040
|
-
const
|
|
8230
|
+
const DataCollectionFindRequest = z.object({
|
|
8041
8231
|
query: z.any().optional(),
|
|
8042
8232
|
cursor: z.string().optional(),
|
|
8043
8233
|
});
|
|
8044
|
-
const
|
|
8234
|
+
const DataCollectionFindResponse = z.object({
|
|
8045
8235
|
records: z.array(DataRecordSchema),
|
|
8046
8236
|
cursor: z.string().optional(),
|
|
8047
8237
|
});
|
|
8048
|
-
const
|
|
8238
|
+
const DataCollectionListRequest = DataCollectionMethodRequest.extend({
|
|
8049
8239
|
filter: z.any().optional(),
|
|
8050
8240
|
unifiedFilter: z.any().optional(),
|
|
8051
8241
|
cursor: z.string().optional(),
|
|
8052
8242
|
});
|
|
8053
|
-
const
|
|
8243
|
+
const DataCollectionListResponseDrilldown = z.object({
|
|
8054
8244
|
parameters: z.record(z.any()).optional(),
|
|
8055
8245
|
filter: z.record(z.any()).optional(),
|
|
8056
8246
|
});
|
|
8057
|
-
const
|
|
8247
|
+
const DataCollectionListResponse = z.object({
|
|
8058
8248
|
records: z.array(DataRecordSchema),
|
|
8059
|
-
drilldowns: z.array(
|
|
8249
|
+
drilldowns: z.array(DataCollectionListResponseDrilldown).optional(),
|
|
8060
8250
|
cursor: z.string().optional(),
|
|
8061
8251
|
});
|
|
8062
|
-
const
|
|
8252
|
+
const DataCollectionSearchRequest = DataCollectionMethodRequest.extend({
|
|
8063
8253
|
query: z.string(),
|
|
8064
8254
|
cursor: z.string().optional(),
|
|
8065
8255
|
});
|
|
8066
|
-
const
|
|
8256
|
+
const DataCollectionSearchResponse = z.object({
|
|
8067
8257
|
records: z.array(DataRecordSchema),
|
|
8068
8258
|
cursor: z.string().optional(),
|
|
8069
8259
|
});
|
|
8070
|
-
const
|
|
8260
|
+
const DataCollectionFindByIdRequest = DataCollectionMethodRequest.extend({
|
|
8071
8261
|
id: z.string(),
|
|
8072
8262
|
udm: z.string().optional(),
|
|
8073
8263
|
});
|
|
8074
|
-
const
|
|
8264
|
+
const DataCollectionFindByIdResponse = z.object({
|
|
8075
8265
|
record: DataRecordSchema,
|
|
8076
8266
|
});
|
|
8077
|
-
const
|
|
8267
|
+
const DataCollectionMatchRequest = DataCollectionMethodRequest.extend({
|
|
8078
8268
|
query: z.record(z.any()),
|
|
8079
8269
|
});
|
|
8080
|
-
const
|
|
8270
|
+
const DataCollectionMatchResponse = z.object({
|
|
8081
8271
|
record: DataRecordSchema.optional(),
|
|
8082
8272
|
});
|
|
8083
|
-
const
|
|
8273
|
+
const DataCollectionCreateRequest = DataCollectionMethodRequest.extend({
|
|
8084
8274
|
fields: z.record(z.any()),
|
|
8085
8275
|
});
|
|
8086
|
-
const
|
|
8276
|
+
const DataCollectionCreateResponse = z.object({
|
|
8087
8277
|
id: z.string(),
|
|
8088
8278
|
});
|
|
8089
|
-
const
|
|
8279
|
+
const DataCollectionUpdateRequest = DataCollectionMethodRequest.extend({
|
|
8090
8280
|
id: z.string(),
|
|
8091
8281
|
fields: z.record(z.any()),
|
|
8092
8282
|
});
|
|
8093
|
-
const
|
|
8283
|
+
const DataCollectionUpdateResponse = z.object({
|
|
8094
8284
|
id: z.string(),
|
|
8095
8285
|
});
|
|
8096
|
-
const
|
|
8286
|
+
const DataCollectionDeleteRequest = DataCollectionMethodRequest.extend({
|
|
8097
8287
|
id: z.string(),
|
|
8098
8288
|
});
|
|
8099
|
-
const
|
|
8289
|
+
const DataCollectionDeleteResponse = z.object({});
|
|
8100
8290
|
const ConnectorDataLocationTypes = {
|
|
8101
8291
|
collection: DataLocationTypeCollection,
|
|
8102
8292
|
};
|
|
@@ -8164,6 +8354,56 @@ const DEFAULT_FULL_SYNC_INTERVAL_SECONDS = 60 * 60 * 3;
|
|
|
8164
8354
|
const MIN_FULL_SYNC_INTERVAL_SECONDS = 1 * 60;
|
|
8165
8355
|
const MIN_PULL_UPDATES_INTERVAL_SECONDS = 1 * 60;
|
|
8166
8356
|
|
|
8357
|
+
const DataSourceUnitConfig = z.object({
|
|
8358
|
+
key: z.string().optional(),
|
|
8359
|
+
collectionKey: z.any().optional(),
|
|
8360
|
+
collectionParameters: z.any().optional(),
|
|
8361
|
+
udm: z.any().optional(),
|
|
8362
|
+
path: z.string().optional(),
|
|
8363
|
+
pullUpdatesIntervalSeconds: z.number().optional(),
|
|
8364
|
+
fullSyncIntervalSeconds: z.number().optional(),
|
|
8365
|
+
});
|
|
8366
|
+
const BaseDataSource = BaseMembraneInterface.extend({
|
|
8367
|
+
revision: z.string(),
|
|
8368
|
+
publishedRevision: z.string().optional(),
|
|
8369
|
+
integrationId: z.string().optional(),
|
|
8370
|
+
universalDataSourceId: z.string().optional(),
|
|
8371
|
+
universalDataSourceRevision: z.string().optional(),
|
|
8372
|
+
udm: z.string().optional(),
|
|
8373
|
+
pullUpdatesIntervalSeconds: z.number().optional(),
|
|
8374
|
+
fullSyncIntervalSeconds: z.number().optional(),
|
|
8375
|
+
collectionKey: z.string().optional(),
|
|
8376
|
+
collectionParameters: z.any().optional(),
|
|
8377
|
+
archivedAt: z.string().optional(),
|
|
8378
|
+
createdAt: z.string().optional(),
|
|
8379
|
+
updatedAt: z.string().optional(),
|
|
8380
|
+
customized: z.boolean().optional(),
|
|
8381
|
+
defaultPath: z.string().optional(),
|
|
8382
|
+
});
|
|
8383
|
+
|
|
8384
|
+
const BaseDataSourceInstance = BaseMembraneInterface.extend({
|
|
8385
|
+
userId: z.string(),
|
|
8386
|
+
revision: z.string(),
|
|
8387
|
+
dataSourceRevision: z.string().optional(),
|
|
8388
|
+
dataSourceId: z.string().optional(),
|
|
8389
|
+
universalDataSourceId: z.string().optional(),
|
|
8390
|
+
udm: z.string().optional(),
|
|
8391
|
+
connectionId: z.string(),
|
|
8392
|
+
integrationId: z.string(),
|
|
8393
|
+
instanceKey: z.string().optional(),
|
|
8394
|
+
collectionKey: z.string().optional(),
|
|
8395
|
+
collectionParameters: z.any().optional(),
|
|
8396
|
+
defaultCollectionKey: z.string().optional(),
|
|
8397
|
+
defaultCollectionParameters: z.any().optional(),
|
|
8398
|
+
collectionSpec: DataCollectionSpec.optional(),
|
|
8399
|
+
isCustomized: z.boolean().optional(),
|
|
8400
|
+
errors: z.array(ErrorDataSchema).optional(),
|
|
8401
|
+
pullUpdatesIntervalSeconds: z.number().optional(),
|
|
8402
|
+
fullSyncIntervalSeconds: z.number().optional(),
|
|
8403
|
+
path: z.string().optional(),
|
|
8404
|
+
defaultPath: z.string().optional(),
|
|
8405
|
+
});
|
|
8406
|
+
|
|
8167
8407
|
var ExternalEventType;
|
|
8168
8408
|
(function (ExternalEventType) {
|
|
8169
8409
|
ExternalEventType["DataRecordCreated"] = "data-record-created";
|
|
@@ -8176,6 +8416,15 @@ var IncomingWebhooksState;
|
|
|
8176
8416
|
IncomingWebhooksState["SUCCESS"] = "success";
|
|
8177
8417
|
IncomingWebhooksState["ERROR"] = "error";
|
|
8178
8418
|
})(IncomingWebhooksState || (IncomingWebhooksState = {}));
|
|
8419
|
+
const ExternalEventUnitConfig = z.object({
|
|
8420
|
+
type: z.nativeEnum(ExternalEventType),
|
|
8421
|
+
dataSource: DataSourceUnitConfig.optional(),
|
|
8422
|
+
eventKey: z.string().optional(),
|
|
8423
|
+
eventParameters: z.any().optional(),
|
|
8424
|
+
});
|
|
8425
|
+
const BaseExternalEvent = z.object({
|
|
8426
|
+
config: ExternalEventUnitConfig.optional(),
|
|
8427
|
+
});
|
|
8179
8428
|
|
|
8180
8429
|
function externalEventTypeToDataCollectionEventType(type) {
|
|
8181
8430
|
switch (type) {
|
|
@@ -8202,6 +8451,23 @@ function dataCollectionEventTypeToExternalEventType(type) {
|
|
|
8202
8451
|
}
|
|
8203
8452
|
}
|
|
8204
8453
|
|
|
8454
|
+
var FlowRunState;
|
|
8455
|
+
(function (FlowRunState) {
|
|
8456
|
+
FlowRunState["QUEUED"] = "queued";
|
|
8457
|
+
FlowRunState["RUNNING"] = "running";
|
|
8458
|
+
FlowRunState["COMPLETED"] = "completed";
|
|
8459
|
+
FlowRunState["STOPPED"] = "stopped";
|
|
8460
|
+
FlowRunState["FAILED"] = "failed";
|
|
8461
|
+
})(FlowRunState || (FlowRunState = {}));
|
|
8462
|
+
var FlowRunLaunchedByTrigger;
|
|
8463
|
+
(function (FlowRunLaunchedByTrigger) {
|
|
8464
|
+
FlowRunLaunchedByTrigger["ApiTrigger"] = "api-trigger";
|
|
8465
|
+
FlowRunLaunchedByTrigger["ScheduleTrigger"] = "schedule-trigger";
|
|
8466
|
+
FlowRunLaunchedByTrigger["AppEventTrigger"] = "app-event-trigger";
|
|
8467
|
+
FlowRunLaunchedByTrigger["DataSourceTrigger"] = "data-source-trigger";
|
|
8468
|
+
FlowRunLaunchedByTrigger["ExternalEvent"] = "external-event";
|
|
8469
|
+
})(FlowRunLaunchedByTrigger || (FlowRunLaunchedByTrigger = {}));
|
|
8470
|
+
|
|
8205
8471
|
var FlowRunNodeState;
|
|
8206
8472
|
(function (FlowRunNodeState) {
|
|
8207
8473
|
FlowRunNodeState["RUNNING"] = "running";
|
|
@@ -8209,6 +8475,33 @@ var FlowRunNodeState;
|
|
|
8209
8475
|
FlowRunNodeState["STOPPED"] = "stopped";
|
|
8210
8476
|
FlowRunNodeState["FAILED"] = "failed";
|
|
8211
8477
|
})(FlowRunNodeState || (FlowRunNodeState = {}));
|
|
8478
|
+
const FlowRunLaunchedBy = z.object({
|
|
8479
|
+
type: z.nativeEnum(FlowRunLaunchedByTrigger),
|
|
8480
|
+
ids: z.array(z.string()).optional(),
|
|
8481
|
+
});
|
|
8482
|
+
const FlowRunNode = z.object({
|
|
8483
|
+
state: z.nativeEnum(FlowRunNodeState),
|
|
8484
|
+
runs: z.number().optional(),
|
|
8485
|
+
erroredRuns: z.number().optional(),
|
|
8486
|
+
outputs: z.number().optional(),
|
|
8487
|
+
});
|
|
8488
|
+
const BaseFlowRun = z.object({
|
|
8489
|
+
id: z.string(),
|
|
8490
|
+
name: z.string().optional(),
|
|
8491
|
+
flowInstanceId: z.string(),
|
|
8492
|
+
universalFlowId: z.string().optional(),
|
|
8493
|
+
connectionId: z.string().optional(),
|
|
8494
|
+
integrationId: z.string().optional(),
|
|
8495
|
+
startNodeKey: z.string(),
|
|
8496
|
+
userId: z.string(),
|
|
8497
|
+
input: z.any().optional(),
|
|
8498
|
+
state: z.nativeEnum(FlowRunState),
|
|
8499
|
+
startTime: z.string(),
|
|
8500
|
+
endTime: z.string().optional(),
|
|
8501
|
+
errors: z.array(ErrorDataSchema).optional(),
|
|
8502
|
+
nodes: z.record(FlowRunNode).optional(),
|
|
8503
|
+
launchedBy: FlowRunLaunchedBy.optional(),
|
|
8504
|
+
});
|
|
8212
8505
|
|
|
8213
8506
|
var FlowNodeRunStatus;
|
|
8214
8507
|
(function (FlowNodeRunStatus) {
|
|
@@ -8533,11 +8826,201 @@ const FLOW_NODE_SPECS = {
|
|
|
8533
8826
|
[FlowNodeType.RunAction]: RunAction,
|
|
8534
8827
|
};
|
|
8535
8828
|
|
|
8829
|
+
const FlowNodeLink = z.object({
|
|
8830
|
+
key: z.string().optional(),
|
|
8831
|
+
filter: z.any().optional(),
|
|
8832
|
+
name: z.string().optional(),
|
|
8833
|
+
});
|
|
8834
|
+
const FlowNode = z.object({
|
|
8835
|
+
type: z.string().optional(),
|
|
8836
|
+
version: z.number().optional(),
|
|
8837
|
+
name: z.string().optional(),
|
|
8838
|
+
description: z.string().optional(),
|
|
8839
|
+
config: z.any().optional(),
|
|
8840
|
+
concurrency: z.number().optional(),
|
|
8841
|
+
onError: z.enum(['stop', 'continue']).optional(),
|
|
8842
|
+
ui: z.any().optional(),
|
|
8843
|
+
inputSchema: z.any().optional(),
|
|
8844
|
+
outputSchema: z.any().optional(),
|
|
8845
|
+
outputExample: z.any().optional(),
|
|
8846
|
+
links: z.array(FlowNodeLink).optional(),
|
|
8847
|
+
isCustomized: z.boolean().optional(),
|
|
8848
|
+
});
|
|
8849
|
+
const BaseFlow = BaseMembraneInterface.extend({
|
|
8850
|
+
integrationId: z.string().optional(),
|
|
8851
|
+
universalFlowId: z.string().optional(),
|
|
8852
|
+
universalFlowRevision: z.string().optional(),
|
|
8853
|
+
parametersSchema: DataSchema.optional(),
|
|
8854
|
+
nodes: z.record(FlowNode).optional(),
|
|
8855
|
+
autoCreateInstances: z.boolean().optional(),
|
|
8856
|
+
archivedAt: z.string().optional(),
|
|
8857
|
+
revision: z.string(),
|
|
8858
|
+
customized: z.boolean().optional(),
|
|
8859
|
+
});
|
|
8860
|
+
|
|
8861
|
+
const BaseIntegration = BaseMembraneInterface.extend({
|
|
8862
|
+
logoUri: z.string(),
|
|
8863
|
+
connectorId: z.string().optional(),
|
|
8864
|
+
connectorVersion: z.string().optional(),
|
|
8865
|
+
authOptions: z.array(z.any()).optional(),
|
|
8866
|
+
oAuthCallbackUri: z.string().optional(),
|
|
8867
|
+
parametersSchema: DataSchema.optional(),
|
|
8868
|
+
parameters: z.any().optional(),
|
|
8869
|
+
baseUri: z.string(),
|
|
8870
|
+
archivedAt: z.string().optional(),
|
|
8871
|
+
hasMissingParameters: z.boolean().optional(),
|
|
8872
|
+
hasDocumentation: z.boolean().optional(),
|
|
8873
|
+
hasOperations: z.boolean().optional(),
|
|
8874
|
+
hasData: z.boolean().optional(),
|
|
8875
|
+
hasEvents: z.boolean().optional(),
|
|
8876
|
+
hasGlobalWebhooks: z.boolean().optional(),
|
|
8877
|
+
hasUdm: z.boolean().optional(),
|
|
8878
|
+
isTest: z.boolean().optional(),
|
|
8879
|
+
appUuid: z.string().optional(),
|
|
8880
|
+
isDeactivated: z.boolean().optional(),
|
|
8881
|
+
authType: z.enum(CONNECTOR_AUTH_TYPES).optional(),
|
|
8882
|
+
});
|
|
8883
|
+
const AppliedToIntegrations = (elementSchema) => z.array(z.object({
|
|
8884
|
+
element: elementSchema,
|
|
8885
|
+
integration: BaseIntegration,
|
|
8886
|
+
}));
|
|
8887
|
+
|
|
8888
|
+
var ScenarioTemplateCategory;
|
|
8889
|
+
(function (ScenarioTemplateCategory) {
|
|
8890
|
+
ScenarioTemplateCategory["DataExport"] = "data-export";
|
|
8891
|
+
ScenarioTemplateCategory["DataImport"] = "data-import";
|
|
8892
|
+
ScenarioTemplateCategory["BiDirectionalSync"] = "bi-directional-sync";
|
|
8893
|
+
ScenarioTemplateCategory["UnifiedApi"] = "unified-api";
|
|
8894
|
+
ScenarioTemplateCategory["DataEnrichment"] = "data-enrichment";
|
|
8895
|
+
})(ScenarioTemplateCategory || (ScenarioTemplateCategory = {}));
|
|
8896
|
+
const ScenarioToDo = z.object({
|
|
8897
|
+
name: z.string(),
|
|
8898
|
+
description: z.string(),
|
|
8899
|
+
isComplete: z.boolean(),
|
|
8900
|
+
});
|
|
8901
|
+
const ScenarioElement = z.object({
|
|
8902
|
+
id: z.string(),
|
|
8903
|
+
type: z.string(),
|
|
8904
|
+
element: z.any().optional(),
|
|
8905
|
+
});
|
|
8906
|
+
const BaseScenario = BaseMembraneInterface.extend({
|
|
8907
|
+
appId: z.string(),
|
|
8908
|
+
scenarioTemplateId: z.string().optional(),
|
|
8909
|
+
elements: z.array(ScenarioElement).optional(),
|
|
8910
|
+
connectors: z.array(MinimalConnector).optional(),
|
|
8911
|
+
todos: z.array(ScenarioToDo).optional(),
|
|
8912
|
+
archivedAt: z.string().optional(),
|
|
8913
|
+
});
|
|
8914
|
+
const HandyScenarioTemplateElement = z.object({
|
|
8915
|
+
type: z.string(),
|
|
8916
|
+
integration: z.object({ key: z.string(), connectorId: z.string() }).optional(),
|
|
8917
|
+
integrations: z.array(z.object({ key: z.string(), connectorId: z.string() })).optional(),
|
|
8918
|
+
fields: z
|
|
8919
|
+
.object({
|
|
8920
|
+
key: z.string(),
|
|
8921
|
+
name: z.string(),
|
|
8922
|
+
})
|
|
8923
|
+
.and(z.record(z.any())),
|
|
8924
|
+
});
|
|
8925
|
+
const withIntegrationKeys = (schema) => schema.and(z.object({ integrationKeys: z.array(z.string()).optional() }));
|
|
8926
|
+
const ElementsExportFields = z.object({
|
|
8927
|
+
flows: z.record(withIntegrationKeys(z.any())).optional(),
|
|
8928
|
+
actions: z.record(withIntegrationKeys(z.any())).optional(),
|
|
8929
|
+
fieldMappings: z.record(withIntegrationKeys(z.any())).optional(),
|
|
8930
|
+
dataSources: z.record(withIntegrationKeys(z.any())).optional(),
|
|
8931
|
+
dataLinkTables: z.record(z.any()).optional(),
|
|
8932
|
+
appEventTypes: z.record(z.any()).optional(),
|
|
8933
|
+
appDataSchemas: z.record(z.any()).optional(),
|
|
8934
|
+
});
|
|
8935
|
+
const ScenarioTemplateElements = ElementsExportFields.and(z.object({
|
|
8936
|
+
integrations: z.record(ElementsExportFields.and(z.object({ connectorId: z.string() }))).optional(),
|
|
8937
|
+
}));
|
|
8938
|
+
const ScenarioTemplate = z.object({
|
|
8939
|
+
id: z.string(),
|
|
8940
|
+
name: z.string(),
|
|
8941
|
+
key: z.string(),
|
|
8942
|
+
shortDescription: z.string().optional(),
|
|
8943
|
+
description: z.string().optional(),
|
|
8944
|
+
demoWorkspaceKey: z.string().optional(),
|
|
8945
|
+
demoAppUri: z.string().optional(),
|
|
8946
|
+
demoGithubRepo: z.string().optional(),
|
|
8947
|
+
demoVideoYoutubeUri: z.string().optional(),
|
|
8948
|
+
tags: z.array(z.nativeEnum(ScenarioTemplateCategory)).optional(),
|
|
8949
|
+
elements: ScenarioTemplateElements.optional(),
|
|
8950
|
+
todos: z.array(ScenarioToDo.omit({ isComplete: true })).optional(),
|
|
8951
|
+
connectors: z.array(MinimalConnector).optional(),
|
|
8952
|
+
handyElements: z.array(HandyScenarioTemplateElement).optional(),
|
|
8953
|
+
});
|
|
8954
|
+
|
|
8955
|
+
var ScreenType;
|
|
8956
|
+
(function (ScreenType) {
|
|
8957
|
+
ScreenType["Integration"] = "integration";
|
|
8958
|
+
})(ScreenType || (ScreenType = {}));
|
|
8959
|
+
var ScreenBlockType;
|
|
8960
|
+
(function (ScreenBlockType) {
|
|
8961
|
+
ScreenBlockType["Flow"] = "flow";
|
|
8962
|
+
ScreenBlockType["FieldMapping"] = "field-mapping";
|
|
8963
|
+
ScreenBlockType["DataSource"] = "data-source";
|
|
8964
|
+
ScreenBlockType["Action"] = "action";
|
|
8965
|
+
})(ScreenBlockType || (ScreenBlockType = {}));
|
|
8966
|
+
|
|
8967
|
+
const ScreenBlock = z
|
|
8968
|
+
.object({
|
|
8969
|
+
type: z.nativeEnum(ScreenBlockType),
|
|
8970
|
+
})
|
|
8971
|
+
.and(z.record(z.any()));
|
|
8972
|
+
const BaseScreen = BaseWorkspaceElement.extend({
|
|
8973
|
+
type: z.nativeEnum(ScreenType),
|
|
8974
|
+
key: z.string().optional(),
|
|
8975
|
+
blocks: z.array(ScreenBlock),
|
|
8976
|
+
});
|
|
8977
|
+
|
|
8978
|
+
const BaseCustomer = z.object({
|
|
8979
|
+
id: z.string(),
|
|
8980
|
+
name: z.string(),
|
|
8981
|
+
internalId: z.string(),
|
|
8982
|
+
fields: z.record(z.string(), z.any()).optional(),
|
|
8983
|
+
credentials: z.any().optional(),
|
|
8984
|
+
lastActiveAt: z.string().optional(),
|
|
8985
|
+
isTest: z.boolean().optional(),
|
|
8986
|
+
isBillable: z.boolean().optional(),
|
|
8987
|
+
});
|
|
8988
|
+
|
|
8989
|
+
const BaseFlowInstance = BaseMembraneInterface.extend({
|
|
8990
|
+
userId: z.string(),
|
|
8991
|
+
connectionId: z.string().optional(),
|
|
8992
|
+
flowId: z.string().optional(),
|
|
8993
|
+
universalFlowId: z.string().optional(),
|
|
8994
|
+
integrationId: z.string(),
|
|
8995
|
+
instanceKey: z.string().optional(),
|
|
8996
|
+
parameters: z.any().optional(),
|
|
8997
|
+
parametersSchema: DataSchema.optional(),
|
|
8998
|
+
nodes: z.record(z.any()).optional(),
|
|
8999
|
+
enabled: z.boolean(),
|
|
9000
|
+
createdAt: z.string(),
|
|
9001
|
+
updatedAt: z.string(),
|
|
9002
|
+
state: z.nativeEnum(WorkspaceElementState).optional(),
|
|
9003
|
+
outdated: z.boolean().optional(),
|
|
9004
|
+
customized: z
|
|
9005
|
+
.object({
|
|
9006
|
+
name: z.boolean().optional(),
|
|
9007
|
+
nodes: z.boolean().optional(),
|
|
9008
|
+
})
|
|
9009
|
+
.optional(),
|
|
9010
|
+
dependencies: z.array(z.any()).optional(),
|
|
9011
|
+
});
|
|
8536
9012
|
var FlowInstanceNodeState;
|
|
8537
9013
|
(function (FlowInstanceNodeState) {
|
|
8538
9014
|
FlowInstanceNodeState["SETUP_FAILED"] = "SETUP_FAILED";
|
|
8539
9015
|
FlowInstanceNodeState["READY"] = "READY";
|
|
8540
9016
|
})(FlowInstanceNodeState || (FlowInstanceNodeState = {}));
|
|
9017
|
+
const FlowInstanceNode = FlowNode.extend({
|
|
9018
|
+
state: z.nativeEnum(FlowInstanceNodeState).optional(),
|
|
9019
|
+
errors: z.array(ErrorDataSchema).optional(),
|
|
9020
|
+
userConfig: z.any().optional(),
|
|
9021
|
+
testInput: z.any().optional(),
|
|
9022
|
+
dependencies: z.array(z.any()).optional(),
|
|
9023
|
+
});
|
|
8541
9024
|
|
|
8542
9025
|
const flowNodeLinkSchema = z.object({
|
|
8543
9026
|
key: z.string().optional(),
|
|
@@ -8601,6 +9084,54 @@ var ActionDependencyType;
|
|
|
8601
9084
|
ActionDependencyType["FieldMapping"] = "FieldMapping";
|
|
8602
9085
|
ActionDependencyType["DataSource"] = "DataSource";
|
|
8603
9086
|
})(ActionDependencyType || (ActionDependencyType = {}));
|
|
9087
|
+
const ActionDependency = z.object({
|
|
9088
|
+
type: z.nativeEnum(ActionDependencyType),
|
|
9089
|
+
key: z.string(),
|
|
9090
|
+
element: z.any().optional(),
|
|
9091
|
+
});
|
|
9092
|
+
const BaseActionInstance = z.object({
|
|
9093
|
+
id: z.string(),
|
|
9094
|
+
name: z.string(),
|
|
9095
|
+
revision: z.string(),
|
|
9096
|
+
parentId: z.string().optional(),
|
|
9097
|
+
parentRevision: z.string().optional(),
|
|
9098
|
+
universalParentId: z.string().optional(),
|
|
9099
|
+
userId: z.string(),
|
|
9100
|
+
instanceKey: z.string().optional(),
|
|
9101
|
+
createdAt: z.string().optional(),
|
|
9102
|
+
updatedAt: z.string().optional(),
|
|
9103
|
+
archivedAt: z.string().optional(),
|
|
9104
|
+
type: z.nativeEnum(ActionType),
|
|
9105
|
+
inputSchema: z.any().optional(),
|
|
9106
|
+
config: z.any().optional(),
|
|
9107
|
+
outputSchema: z.any().optional(),
|
|
9108
|
+
isOutdated: z.boolean().optional(),
|
|
9109
|
+
state: z.nativeEnum(WorkspaceElementState),
|
|
9110
|
+
});
|
|
9111
|
+
|
|
9112
|
+
const BaseFieldMappingInstance = BaseMembraneInterface.extend({
|
|
9113
|
+
userId: z.string(),
|
|
9114
|
+
revision: z.string(),
|
|
9115
|
+
connectionId: z.string(),
|
|
9116
|
+
integrationId: z.string(),
|
|
9117
|
+
fieldMappingRevision: z.string().optional(),
|
|
9118
|
+
fieldMappingId: z.string().optional(),
|
|
9119
|
+
instanceKey: z.string().optional(),
|
|
9120
|
+
dataSourceInstanceId: z.string().optional(),
|
|
9121
|
+
dataSourceSchema: DataSchema.optional(),
|
|
9122
|
+
direction: z.nativeEnum(FieldMappingDirection).optional(),
|
|
9123
|
+
appSchema: DataSchema.optional(),
|
|
9124
|
+
importValue: z.any().optional(),
|
|
9125
|
+
exportValue: z.any().optional(),
|
|
9126
|
+
isCustomized: z.boolean().optional(),
|
|
9127
|
+
unifiedExportValue: z.any().optional(),
|
|
9128
|
+
unifiedImportValue: z.any().optional(),
|
|
9129
|
+
frozenImportFields: z.array(z.string()).optional(),
|
|
9130
|
+
frozenExportFields: z.array(z.string()).optional(),
|
|
9131
|
+
state: z.nativeEnum(WorkspaceElementState).optional(),
|
|
9132
|
+
error: ErrorDataSchema.optional(),
|
|
9133
|
+
externalSchema: z.any().optional(),
|
|
9134
|
+
});
|
|
8604
9135
|
|
|
8605
9136
|
var DataLinkDirection;
|
|
8606
9137
|
(function (DataLinkDirection) {
|
|
@@ -8608,6 +9139,106 @@ var DataLinkDirection;
|
|
|
8608
9139
|
DataLinkDirection["EXPORT"] = "export";
|
|
8609
9140
|
DataLinkDirection["BOTH"] = "both";
|
|
8610
9141
|
})(DataLinkDirection || (DataLinkDirection = {}));
|
|
9142
|
+
const BaseDataLinkTable = BaseMembraneInterface.extend({
|
|
9143
|
+
archivedAt: z.string().optional(),
|
|
9144
|
+
});
|
|
9145
|
+
|
|
9146
|
+
const BaseDataLinkTableInstance = BaseMembraneInterface.extend({
|
|
9147
|
+
dataLinkTableId: z.string().optional(),
|
|
9148
|
+
connectionId: z.string().optional(),
|
|
9149
|
+
integrationId: z.string(),
|
|
9150
|
+
instanceKey: z.string().optional(),
|
|
9151
|
+
userId: z.string(),
|
|
9152
|
+
archivedAt: z.string().optional(),
|
|
9153
|
+
});
|
|
9154
|
+
const DataLink = z.object({
|
|
9155
|
+
id: z.string(),
|
|
9156
|
+
dataLinkTableInstanceId: z.string(),
|
|
9157
|
+
externalRecordId: z.string(),
|
|
9158
|
+
appRecordId: z.string(),
|
|
9159
|
+
direction: z.nativeEnum(DataLinkDirection),
|
|
9160
|
+
});
|
|
9161
|
+
const DataLinkTableConfig = z.object({
|
|
9162
|
+
key: z.string(),
|
|
9163
|
+
});
|
|
9164
|
+
|
|
9165
|
+
var HttpRequestMethod;
|
|
9166
|
+
(function (HttpRequestMethod) {
|
|
9167
|
+
HttpRequestMethod["GET"] = "GET";
|
|
9168
|
+
HttpRequestMethod["POST"] = "POST";
|
|
9169
|
+
HttpRequestMethod["PATCH"] = "PATCH";
|
|
9170
|
+
HttpRequestMethod["PUT"] = "PUT";
|
|
9171
|
+
HttpRequestMethod["DELETE"] = "DELETE";
|
|
9172
|
+
})(HttpRequestMethod || (HttpRequestMethod = {}));
|
|
9173
|
+
const HttpRequestSpec = z.object({
|
|
9174
|
+
method: z.nativeEnum(HttpRequestMethod).optional(),
|
|
9175
|
+
uri: z.any(),
|
|
9176
|
+
headers: z.record(z.any()).optional(),
|
|
9177
|
+
query: z.record(z.any()).optional(),
|
|
9178
|
+
body: z.any().optional(),
|
|
9179
|
+
});
|
|
9180
|
+
const HTTP_REQUEST_SCHEMA = {
|
|
9181
|
+
type: 'object',
|
|
9182
|
+
properties: {
|
|
9183
|
+
uri: { type: 'string' },
|
|
9184
|
+
method: {
|
|
9185
|
+
type: 'string',
|
|
9186
|
+
enum: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'],
|
|
9187
|
+
},
|
|
9188
|
+
body: {},
|
|
9189
|
+
query: {
|
|
9190
|
+
type: 'object',
|
|
9191
|
+
section: true,
|
|
9192
|
+
additionalProperties: true,
|
|
9193
|
+
},
|
|
9194
|
+
headers: {
|
|
9195
|
+
type: 'object',
|
|
9196
|
+
section: true,
|
|
9197
|
+
additionalProperties: true,
|
|
9198
|
+
},
|
|
9199
|
+
},
|
|
9200
|
+
};
|
|
9201
|
+
|
|
9202
|
+
const BaseAppEventType = BaseMembraneInterface.extend({
|
|
9203
|
+
revision: z.string(),
|
|
9204
|
+
archivedAt: z.string().optional(),
|
|
9205
|
+
subscribeRequest: HttpRequestSpec.optional(),
|
|
9206
|
+
example: z.any().optional(),
|
|
9207
|
+
schema: DataSchema.optional(),
|
|
9208
|
+
globalWebhookUri: z.string(),
|
|
9209
|
+
userIdFormula: z.any().optional(),
|
|
9210
|
+
});
|
|
9211
|
+
|
|
9212
|
+
const BaseAppEventSubscription = BaseMembraneInterface.extend({
|
|
9213
|
+
revision: z.string(),
|
|
9214
|
+
appEventTypeId: z.string(),
|
|
9215
|
+
userId: z.string(),
|
|
9216
|
+
instanceKey: z.string().optional(),
|
|
9217
|
+
isSubscribed: z.boolean(),
|
|
9218
|
+
schema: DataSchema.optional(),
|
|
9219
|
+
webhookUri: z.string(),
|
|
9220
|
+
subscriptionRequest: HttpRequestSpec,
|
|
9221
|
+
subscriptionResponse: z.any().optional(),
|
|
9222
|
+
archivedAt: z.string().optional(),
|
|
9223
|
+
});
|
|
9224
|
+
|
|
9225
|
+
const BaseAppDataSchema = BaseMembraneInterface.extend({
|
|
9226
|
+
schema: z.any(),
|
|
9227
|
+
code: z.string().optional(),
|
|
9228
|
+
archivedAt: z.string().optional(),
|
|
9229
|
+
revision: z.string().optional(),
|
|
9230
|
+
});
|
|
9231
|
+
|
|
9232
|
+
const BaseAppDataSchemaInstance = BaseMembraneInterface.extend({
|
|
9233
|
+
appId: z.string(),
|
|
9234
|
+
userId: z.string(),
|
|
9235
|
+
appDataSchemaId: z.string(),
|
|
9236
|
+
appDataSchemaRevision: z.string(),
|
|
9237
|
+
instanceKey: z.string().optional(),
|
|
9238
|
+
schema: z.any().optional(),
|
|
9239
|
+
error: ErrorDataSchema.optional(),
|
|
9240
|
+
archivedAt: z.string().optional(),
|
|
9241
|
+
});
|
|
8611
9242
|
|
|
8612
9243
|
var ExternalEventSubscriptionStatus;
|
|
8613
9244
|
(function (ExternalEventSubscriptionStatus) {
|
|
@@ -8622,6 +9253,35 @@ var ExternalEventSubscriptionType;
|
|
|
8622
9253
|
ExternalEventSubscriptionType["DataRecordDeleted"] = "data-record-deleted";
|
|
8623
9254
|
ExternalEventSubscriptionType["ConnectorEvent"] = "connector-event";
|
|
8624
9255
|
})(ExternalEventSubscriptionType || (ExternalEventSubscriptionType = {}));
|
|
9256
|
+
const ExternalEventSubscriptionConfig = z.object({
|
|
9257
|
+
type: z.nativeEnum(ExternalEventSubscriptionType),
|
|
9258
|
+
dataSource: DataSourceUnitConfig.optional(),
|
|
9259
|
+
eventKey: z.string().optional(),
|
|
9260
|
+
eventParameters: z.any().optional(),
|
|
9261
|
+
});
|
|
9262
|
+
const BaseExternalEventSubscription = z.object({
|
|
9263
|
+
id: z.string(),
|
|
9264
|
+
name: z.string().optional(),
|
|
9265
|
+
userId: z.string(),
|
|
9266
|
+
connectionId: z.string(),
|
|
9267
|
+
integrationId: z.string(),
|
|
9268
|
+
uuid: z.string(),
|
|
9269
|
+
config: ExternalEventSubscriptionConfig.optional(),
|
|
9270
|
+
status: z.nativeEnum(ExternalEventSubscriptionStatus).optional(),
|
|
9271
|
+
error: ErrorDataSchema.optional(),
|
|
9272
|
+
isRealTime: z.boolean().optional(),
|
|
9273
|
+
requiresPull: z.boolean().optional(),
|
|
9274
|
+
requiresFullSync: z.boolean().optional(),
|
|
9275
|
+
createdAt: z.string().optional(),
|
|
9276
|
+
archivedAt: z.string().optional(),
|
|
9277
|
+
stateData: z.any().optional(),
|
|
9278
|
+
nextPullEventsTimestamp: z.number().optional(),
|
|
9279
|
+
pullUpdatesIntervalSeconds: z.number().optional(),
|
|
9280
|
+
fullSyncIntervalSeconds: z.number().optional(),
|
|
9281
|
+
nextRefreshTimestamp: z.number().optional(),
|
|
9282
|
+
globalWebhookKey: z.string().optional(),
|
|
9283
|
+
globalWebhookEventSelector: z.string().optional(),
|
|
9284
|
+
});
|
|
8625
9285
|
|
|
8626
9286
|
var ExternalEventLogStatus;
|
|
8627
9287
|
(function (ExternalEventLogStatus) {
|
|
@@ -8629,143 +9289,667 @@ var ExternalEventLogStatus;
|
|
|
8629
9289
|
ExternalEventLogStatus["ERROR"] = "error";
|
|
8630
9290
|
ExternalEventLogStatus["SUCCESS"] = "success";
|
|
8631
9291
|
})(ExternalEventLogStatus || (ExternalEventLogStatus = {}));
|
|
9292
|
+
const BaseExternalEventLogRecord = z.object({
|
|
9293
|
+
id: z.string(),
|
|
9294
|
+
userId: z.string(),
|
|
9295
|
+
name: z.string().optional(),
|
|
9296
|
+
externalEventSubscriptionId: z.string(),
|
|
9297
|
+
integrationId: z.string(),
|
|
9298
|
+
connectionId: z.string(),
|
|
9299
|
+
payload: z.any().optional(),
|
|
9300
|
+
launchedFlowRunIds: z.array(z.string()).optional(),
|
|
9301
|
+
status: z.nativeEnum(ExternalEventLogStatus),
|
|
9302
|
+
error: ErrorDataSchema.optional(),
|
|
9303
|
+
});
|
|
9304
|
+
|
|
9305
|
+
var ExternalEventPullStatus;
|
|
9306
|
+
(function (ExternalEventPullStatus) {
|
|
9307
|
+
ExternalEventPullStatus["RUNNING"] = "running";
|
|
9308
|
+
ExternalEventPullStatus["SUCCESS"] = "success";
|
|
9309
|
+
ExternalEventPullStatus["ERROR"] = "error";
|
|
9310
|
+
ExternalEventPullStatus["QUEUED"] = "queued";
|
|
9311
|
+
})(ExternalEventPullStatus || (ExternalEventPullStatus = {}));
|
|
9312
|
+
const BaseExternalEventPull = z.object({
|
|
9313
|
+
id: z.string(),
|
|
9314
|
+
name: z.string().optional(),
|
|
9315
|
+
userId: z.string(),
|
|
9316
|
+
externalEventSubscriptionId: z.string(),
|
|
9317
|
+
integrationId: z.string(),
|
|
9318
|
+
connectionId: z.string(),
|
|
9319
|
+
startDatetime: z.string(),
|
|
9320
|
+
endDatetime: z.string(),
|
|
9321
|
+
isFullScan: z.boolean().optional(),
|
|
9322
|
+
status: z.nativeEnum(ExternalEventPullStatus),
|
|
9323
|
+
collectedEventIds: z.array(z.string()),
|
|
9324
|
+
error: ErrorDataSchema.optional(),
|
|
9325
|
+
});
|
|
9326
|
+
|
|
9327
|
+
var ActionRunStatus;
|
|
9328
|
+
(function (ActionRunStatus) {
|
|
9329
|
+
ActionRunStatus["RUNNING"] = "running";
|
|
9330
|
+
ActionRunStatus["SUCCESS"] = "success";
|
|
9331
|
+
ActionRunStatus["ERROR"] = "error";
|
|
9332
|
+
ActionRunStatus["QUEUED"] = "queued";
|
|
9333
|
+
})(ActionRunStatus || (ActionRunStatus = {}));
|
|
9334
|
+
const BaseActionRunLogRecord = z.object({
|
|
9335
|
+
id: z.string(),
|
|
9336
|
+
actionId: z.string(),
|
|
9337
|
+
integrationId: z.string(),
|
|
9338
|
+
connectionId: z.string(),
|
|
9339
|
+
input: z.any().optional(),
|
|
9340
|
+
output: z.any().optional(),
|
|
9341
|
+
status: z.nativeEnum(ActionRunStatus),
|
|
9342
|
+
startedAt: z.string(),
|
|
9343
|
+
completedAt: z.string().optional(),
|
|
9344
|
+
error: ErrorDataSchema.optional(),
|
|
9345
|
+
});
|
|
9346
|
+
|
|
9347
|
+
const IncludeArchivedQuery = z.object({
|
|
9348
|
+
includeArchived: z.boolean().optional(),
|
|
9349
|
+
});
|
|
9350
|
+
const SearchQuery = z.object({
|
|
9351
|
+
search: z.string().optional(),
|
|
9352
|
+
});
|
|
9353
|
+
const PaginationQuery = z.object({
|
|
9354
|
+
limit: z.number().optional(),
|
|
9355
|
+
cursor: z.string().optional(),
|
|
9356
|
+
});
|
|
9357
|
+
const CommonListElementsQuery = SearchQuery.merge(PaginationQuery).merge(IncludeArchivedQuery);
|
|
9358
|
+
const CommonInstancesListQuery = CommonListElementsQuery.extend({
|
|
9359
|
+
userId: z.string().optional(),
|
|
9360
|
+
instanceKey: z.string().optional(),
|
|
9361
|
+
});
|
|
9362
|
+
const CommonIntegrationOrConnectionQuery = z.object({
|
|
9363
|
+
connectionId: z.string().optional(),
|
|
9364
|
+
integrationId: z.string().optional(),
|
|
9365
|
+
integrationKey: z.string().optional(),
|
|
9366
|
+
});
|
|
9367
|
+
class PaginationResponse {
|
|
9368
|
+
}
|
|
9369
|
+
|
|
9370
|
+
const ListActionsForIntegrationQuery = z
|
|
9371
|
+
.object({
|
|
9372
|
+
parentId: z.string().optional(),
|
|
9373
|
+
})
|
|
9374
|
+
.merge(PaginationQuery);
|
|
9375
|
+
const FindActionsQuery = ListActionsForIntegrationQuery.extend({
|
|
9376
|
+
integrationId: z.string().optional(),
|
|
9377
|
+
});
|
|
9378
|
+
const CreateActionRequest = z.object({
|
|
9379
|
+
key: z.string(),
|
|
9380
|
+
name: z.string(),
|
|
9381
|
+
type: z.nativeEnum(ActionType).optional(),
|
|
9382
|
+
inputSchema: z.any().optional(),
|
|
9383
|
+
config: z.any().optional(),
|
|
9384
|
+
integrationId: z.string().optional(),
|
|
9385
|
+
});
|
|
9386
|
+
const UpdateActionRequest = z.object({
|
|
9387
|
+
key: z.string().optional(),
|
|
9388
|
+
type: z.nativeEnum(ActionType).optional(),
|
|
9389
|
+
name: z.string().optional(),
|
|
9390
|
+
inputSchema: z.any().optional(),
|
|
9391
|
+
config: z.any().optional(),
|
|
9392
|
+
archivedAt: z.string().optional(),
|
|
9393
|
+
});
|
|
9394
|
+
const ListActionInstancesForConnectionQuery = z
|
|
9395
|
+
.object({
|
|
9396
|
+
parentId: z.string().optional(),
|
|
9397
|
+
universalParentId: z.string().optional(),
|
|
9398
|
+
})
|
|
9399
|
+
.merge(PaginationQuery);
|
|
9400
|
+
const FindActionInstancesQuery = ListActionInstancesForConnectionQuery.extend({
|
|
9401
|
+
integrationKey: z.string().optional(),
|
|
9402
|
+
integrationId: z.string().optional(),
|
|
9403
|
+
userId: z.string().optional(),
|
|
9404
|
+
connectionId: z.string().optional(),
|
|
9405
|
+
});
|
|
9406
|
+
const CreateActionInstanceRequest = z.object({
|
|
9407
|
+
parentId: z.string(),
|
|
9408
|
+
connectionId: z.string(),
|
|
9409
|
+
config: z.any().optional(),
|
|
9410
|
+
});
|
|
9411
|
+
const UpdateActionInstanceRequest = z.object({
|
|
9412
|
+
config: z.any().optional(),
|
|
9413
|
+
});
|
|
9414
|
+
const ActionRunResponse = z.object({
|
|
9415
|
+
output: z.any().optional(),
|
|
9416
|
+
logs: z.array(z.any()).optional(),
|
|
9417
|
+
});
|
|
9418
|
+
var ActionRunLogStatus;
|
|
9419
|
+
(function (ActionRunLogStatus) {
|
|
9420
|
+
ActionRunLogStatus["SUCCESS"] = "success";
|
|
9421
|
+
ActionRunLogStatus["ERROR"] = "error";
|
|
9422
|
+
})(ActionRunLogStatus || (ActionRunLogStatus = {}));
|
|
9423
|
+
const Action = BaseAction.extend({
|
|
9424
|
+
integration: BaseIntegration.optional(),
|
|
9425
|
+
appliedToIntegrations: AppliedToIntegrations(BaseAction).optional(),
|
|
9426
|
+
});
|
|
9427
|
+
|
|
9428
|
+
const FindConnectionsQuery = z
|
|
9429
|
+
.object({
|
|
9430
|
+
userId: z.string().optional(),
|
|
9431
|
+
isTest: z.boolean().optional(),
|
|
9432
|
+
integrationKey: z.string().optional(),
|
|
9433
|
+
integrationId: z.string().optional(),
|
|
9434
|
+
includeArchived: z.boolean().optional(),
|
|
9435
|
+
})
|
|
9436
|
+
.merge(PaginationQuery);
|
|
9437
|
+
const CreateConnectionRequest = z.object({
|
|
9438
|
+
name: z.string(),
|
|
9439
|
+
integrationId: z.string(),
|
|
9440
|
+
credentials: z.string().optional(),
|
|
9441
|
+
});
|
|
9442
|
+
const UpdateConnectionRequest = z.object({
|
|
9443
|
+
name: z.string().optional(),
|
|
9444
|
+
credentials: z.string().optional(),
|
|
9445
|
+
accessToken: z.string().optional(),
|
|
9446
|
+
});
|
|
9447
|
+
class FindConnectionsResponse extends PaginationResponse {
|
|
9448
|
+
}
|
|
9449
|
+
const ConnectionSelector = z.object({
|
|
9450
|
+
id: z.string().optional(),
|
|
9451
|
+
integrationKey: z.string().optional(),
|
|
9452
|
+
integrationId: z.string().optional(),
|
|
9453
|
+
connectionId: z.string().optional(),
|
|
9454
|
+
});
|
|
9455
|
+
const Connection = BaseConnection.extend({
|
|
9456
|
+
user: BaseCustomer.optional(),
|
|
9457
|
+
integration: BaseIntegration.optional(),
|
|
9458
|
+
});
|
|
9459
|
+
const ConnectionMessagePayload = z.discriminatedUnion('type', [
|
|
9460
|
+
z.object({
|
|
9461
|
+
source: z.string(),
|
|
9462
|
+
requestId: z.string(),
|
|
9463
|
+
type: z.literal('newConnectionCreated'),
|
|
9464
|
+
connection: Connection,
|
|
9465
|
+
}),
|
|
9466
|
+
z.object({
|
|
9467
|
+
source: z.string(),
|
|
9468
|
+
requestId: z.string(),
|
|
9469
|
+
type: z.literal('newConnectionFailure'),
|
|
9470
|
+
error: z.string(),
|
|
9471
|
+
errorData: ErrorDataSchema.optional(),
|
|
9472
|
+
}),
|
|
9473
|
+
]);
|
|
9474
|
+
|
|
9475
|
+
const ListDataSourcesForIntegrationQuery = z
|
|
9476
|
+
.object({
|
|
9477
|
+
universalDataSourceId: z.string().optional(),
|
|
9478
|
+
})
|
|
9479
|
+
.merge(PaginationQuery);
|
|
9480
|
+
const FindDataSourcesQuery = ListDataSourcesForIntegrationQuery.extend({
|
|
9481
|
+
integrationId: z.string().optional(),
|
|
9482
|
+
});
|
|
9483
|
+
const CreateDataSourceRequest = z.object({
|
|
9484
|
+
key: z.string(),
|
|
9485
|
+
name: z.string(),
|
|
9486
|
+
integrationId: z.string().optional(),
|
|
9487
|
+
udm: z.string().optional(),
|
|
9488
|
+
pullUpdatesIntervalSeconds: z.number().optional(),
|
|
9489
|
+
fullSyncIntervalSeconds: z.number().optional(),
|
|
9490
|
+
rootPath: z.string().optional(),
|
|
9491
|
+
defaultPath: z.string().optional(),
|
|
9492
|
+
collectionKey: z.string().optional(),
|
|
9493
|
+
collectionParameters: z.any().optional(),
|
|
9494
|
+
});
|
|
9495
|
+
const UpdateDataSourceRequest = z.object({
|
|
9496
|
+
key: z.string().optional(),
|
|
9497
|
+
name: z.string().optional(),
|
|
9498
|
+
archivedAt: z.string().optional(),
|
|
9499
|
+
udm: z.string().optional(),
|
|
9500
|
+
pullUpdatesIntervalSeconds: z.number().optional(),
|
|
9501
|
+
fullSyncIntervalSeconds: z.number().optional(),
|
|
9502
|
+
rootPath: z.string().optional(),
|
|
9503
|
+
defaultPath: z.string().optional(),
|
|
9504
|
+
});
|
|
9505
|
+
const FindDataSourceInstancesQuery = z
|
|
9506
|
+
.object({
|
|
9507
|
+
userId: z.string().optional(),
|
|
9508
|
+
dataSourceId: z.string().optional(),
|
|
9509
|
+
universalDataSourceId: z.string().optional(),
|
|
9510
|
+
connectionId: z.string().optional(),
|
|
9511
|
+
integrationKey: z.string().optional(),
|
|
9512
|
+
integrationId: z.string().optional(),
|
|
9513
|
+
})
|
|
9514
|
+
.merge(PaginationQuery);
|
|
9515
|
+
const CreateDataSourceInstanceRequest = z.object({
|
|
9516
|
+
dataSourceId: z.string(),
|
|
9517
|
+
connectionId: z.string(),
|
|
9518
|
+
path: z.string().optional(),
|
|
9519
|
+
});
|
|
9520
|
+
const UpdateDataSourceInstanceRequest = z.object({
|
|
9521
|
+
path: z.string().optional(),
|
|
9522
|
+
collectionKey: z.string().optional(),
|
|
9523
|
+
collectionParameters: z.any().optional(),
|
|
9524
|
+
pullUpdatesIntervalSeconds: z.number().optional(),
|
|
9525
|
+
fullSyncIntervalSeconds: z.number().optional(),
|
|
9526
|
+
subscribedTo: z
|
|
9527
|
+
.object({
|
|
9528
|
+
created: z.boolean().optional(),
|
|
9529
|
+
updated: z.boolean().optional(),
|
|
9530
|
+
deleted: z.boolean().optional(),
|
|
9531
|
+
})
|
|
9532
|
+
.optional(),
|
|
9533
|
+
});
|
|
9534
|
+
const FindDataSourceEventsQuery = z
|
|
9535
|
+
.object({
|
|
9536
|
+
userId: z.string().optional(),
|
|
9537
|
+
udm: z.string().optional(),
|
|
9538
|
+
dataSourceInstanceId: z.string().optional(),
|
|
9539
|
+
startDatetime: z.string().optional(),
|
|
9540
|
+
endDatetime: z.string().optional(),
|
|
9541
|
+
})
|
|
9542
|
+
.merge(PaginationQuery);
|
|
9543
|
+
const FindDataSourceSyncsQuery = z
|
|
9544
|
+
.object({
|
|
9545
|
+
userId: z.string().optional(),
|
|
9546
|
+
dataSourceId: z.string().optional(),
|
|
9547
|
+
dataSourceInstanceId: z.string().optional(),
|
|
9548
|
+
integrationId: z.string().optional(),
|
|
9549
|
+
connectionId: z.string().optional(),
|
|
9550
|
+
startedAfter: z.string().optional(),
|
|
9551
|
+
})
|
|
9552
|
+
.merge(PaginationQuery);
|
|
9553
|
+
const ListDataSourceInstancesForConnectionQuery = z
|
|
9554
|
+
.object({
|
|
9555
|
+
dataSourceId: z.string().optional(),
|
|
9556
|
+
})
|
|
9557
|
+
.merge(PaginationQuery);
|
|
9558
|
+
const FindDataSourceInstanceSyncsQuery = ListDataSourceInstancesForConnectionQuery.extend({
|
|
9559
|
+
userId: z.string().optional(),
|
|
9560
|
+
connectionId: z.string().optional(),
|
|
9561
|
+
integrationId: z.string().optional(),
|
|
9562
|
+
dataSourceInstanceId: z.string().optional(),
|
|
9563
|
+
});
|
|
9564
|
+
const DataSource = BaseDataSource.extend({
|
|
9565
|
+
integration: BaseIntegration.optional(),
|
|
9566
|
+
appliedToIntegrations: AppliedToIntegrations(BaseDataSource).optional(),
|
|
9567
|
+
});
|
|
9568
|
+
|
|
9569
|
+
const ExternalEvent = BaseExternalEvent.extend({
|
|
9570
|
+
appliedToIntegrations: AppliedToIntegrations(BaseExternalEvent).optional(),
|
|
9571
|
+
});
|
|
9572
|
+
|
|
9573
|
+
const ListFlowsForIntegrationQuery = z
|
|
9574
|
+
.object({
|
|
9575
|
+
universalFlowId: z.string().optional(),
|
|
9576
|
+
})
|
|
9577
|
+
.merge(CommonListElementsQuery);
|
|
9578
|
+
const FindFlowsQuery = ListFlowsForIntegrationQuery.extend({
|
|
9579
|
+
integrationId: z.string().optional(),
|
|
9580
|
+
});
|
|
9581
|
+
const CreateFlowNodeRequest = z.object({
|
|
9582
|
+
type: z.string(),
|
|
9583
|
+
config: z.any().optional(),
|
|
9584
|
+
ui: z.any().optional(),
|
|
9585
|
+
links: z.array(z.lazy(() => z.any())).optional(),
|
|
9586
|
+
});
|
|
9587
|
+
const CreateFlowRequest = z.object({
|
|
9588
|
+
key: z.string(),
|
|
9589
|
+
name: z.string(),
|
|
9590
|
+
integrationId: z.string().optional(),
|
|
9591
|
+
nodes: z.record(z.string(), CreateFlowNodeRequest).optional(),
|
|
9592
|
+
parametersSchema: DataSchema.optional(),
|
|
9593
|
+
autoCreateInstances: z.boolean().optional(),
|
|
9594
|
+
});
|
|
9595
|
+
const UpdateFlowRequest = CreateFlowRequest.extend({
|
|
9596
|
+
archivedAt: z.string().optional(),
|
|
9597
|
+
});
|
|
9598
|
+
const ListFlowInstancesForConnectionQuery = z
|
|
9599
|
+
.object({
|
|
9600
|
+
flowId: z.string().optional(),
|
|
9601
|
+
flowKey: z.string().optional(),
|
|
9602
|
+
enabled: z.boolean().optional(),
|
|
9603
|
+
})
|
|
9604
|
+
.merge(CommonInstancesListQuery);
|
|
9605
|
+
const FindFlowInstancesQuery = ListFlowInstancesForConnectionQuery.merge(CommonIntegrationOrConnectionQuery);
|
|
9606
|
+
const ResetFlowInstanceOptions = z.object({
|
|
9607
|
+
name: z.boolean().optional(),
|
|
9608
|
+
nodes: z.record(z.string(), z.boolean()).optional(),
|
|
9609
|
+
allNodes: z.boolean().optional(),
|
|
9610
|
+
});
|
|
9611
|
+
const RunFlowOptions = z.object({
|
|
9612
|
+
nodeKey: z.string().optional(),
|
|
9613
|
+
input: z.any().optional(),
|
|
9614
|
+
returnImmediately: z.boolean().optional(),
|
|
9615
|
+
onUpdate: z.function().optional(),
|
|
9616
|
+
});
|
|
9617
|
+
const Flow = BaseFlow.extend({
|
|
9618
|
+
integration: BaseIntegration.optional(),
|
|
9619
|
+
appliedToIntegrations: AppliedToIntegrations(BaseFlow).optional(),
|
|
9620
|
+
});
|
|
9621
|
+
const FlowInstance = BaseFlowInstance.extend({
|
|
9622
|
+
user: z.lazy(() => z.any()).optional(),
|
|
9623
|
+
connection: z.lazy(() => z.any()).optional(),
|
|
9624
|
+
flow: z.lazy(() => Flow).optional(),
|
|
9625
|
+
integration: z.lazy(() => z.any()).optional(),
|
|
9626
|
+
});
|
|
9627
|
+
|
|
9628
|
+
const POPUP_ELEMENT_ID = '__integration-app-popup';
|
|
9629
|
+
const CONTAINER_ELEMENT_ID = '__integration-app-container';
|
|
9630
|
+
const CONTAINER_ELEMENT_CLASS = '__integration-app-container';
|
|
9631
|
+
const CONTAINER_ELEMENT_CLASS__LOADER = '__integration-app-container__loader';
|
|
9632
|
+
const BODY_CLASS = '__integration-app-open';
|
|
9633
|
+
const STYLES_ELEMENT_ID = '__integration-app-embed-styles';
|
|
9634
|
+
const OpenConfigurationOptions = z.object({
|
|
9635
|
+
onClose: z.function().optional(),
|
|
9636
|
+
showPoweredBy: z.boolean().optional(),
|
|
9637
|
+
});
|
|
9638
|
+
let IFRAME_START_SHOW_LOADER_TIME = 0;
|
|
9639
|
+
let IFRAME_SHOW_LOADER_TIMEOUT_ID;
|
|
9640
|
+
const IFRAME_SHOW_LOADER_MINIMAL_TIME = 500;
|
|
9641
|
+
const IFRAME_LAYOUT_SHIFT_TIME = 300;
|
|
9642
|
+
function showIframeLoader() {
|
|
9643
|
+
const container = getContainer();
|
|
9644
|
+
container === null || container === void 0 ? void 0 : container.classList.add(CONTAINER_ELEMENT_CLASS__LOADER);
|
|
9645
|
+
IFRAME_START_SHOW_LOADER_TIME = Date.now();
|
|
9646
|
+
}
|
|
9647
|
+
function hideIframeLoader(waitLayoutShift = IFRAME_LAYOUT_SHIFT_TIME) {
|
|
9648
|
+
if (IFRAME_SHOW_LOADER_TIMEOUT_ID) {
|
|
9649
|
+
clearTimeout(IFRAME_SHOW_LOADER_TIMEOUT_ID);
|
|
9650
|
+
}
|
|
9651
|
+
const delta = Date.now() - IFRAME_START_SHOW_LOADER_TIME;
|
|
9652
|
+
if (delta >= IFRAME_SHOW_LOADER_MINIMAL_TIME) {
|
|
9653
|
+
setTimeout(() => {
|
|
9654
|
+
const container = getContainer();
|
|
9655
|
+
container === null || container === void 0 ? void 0 : container.classList.remove(CONTAINER_ELEMENT_CLASS__LOADER);
|
|
9656
|
+
IFRAME_START_SHOW_LOADER_TIME = 0;
|
|
9657
|
+
}, waitLayoutShift);
|
|
9658
|
+
return;
|
|
9659
|
+
}
|
|
9660
|
+
else {
|
|
9661
|
+
const waitLayoutShift = delta >= IFRAME_LAYOUT_SHIFT_TIME ? 0 : IFRAME_LAYOUT_SHIFT_TIME - delta;
|
|
9662
|
+
const timeoutTime = IFRAME_SHOW_LOADER_MINIMAL_TIME - delta;
|
|
9663
|
+
IFRAME_SHOW_LOADER_TIMEOUT_ID = setTimeout(() => {
|
|
9664
|
+
hideIframeLoader(waitLayoutShift);
|
|
9665
|
+
}, timeoutTime);
|
|
9666
|
+
return;
|
|
9667
|
+
}
|
|
9668
|
+
}
|
|
9669
|
+
async function openIframe(uri, callbacks = {}, { mountTargetSelector } = {}) {
|
|
9670
|
+
close();
|
|
9671
|
+
init(mountTargetSelector);
|
|
9672
|
+
return new Promise((resolve) => {
|
|
9673
|
+
function complete(callback) {
|
|
9674
|
+
close(callback);
|
|
9675
|
+
resolve();
|
|
9676
|
+
}
|
|
9677
|
+
function doOpen() {
|
|
9678
|
+
const iframe = document.createElement('iframe');
|
|
9679
|
+
iframe.src = uri;
|
|
9680
|
+
iframe.id = POPUP_ELEMENT_ID;
|
|
9681
|
+
iframe.onload = () => {
|
|
9682
|
+
hideIframeLoader();
|
|
9683
|
+
};
|
|
9684
|
+
if (!!getContainer()) {
|
|
9685
|
+
document.body.classList.add(BODY_CLASS);
|
|
9686
|
+
showIframeLoader();
|
|
9687
|
+
appendToContainer(iframe);
|
|
9688
|
+
handleIframeUnmount(iframe);
|
|
9689
|
+
connectToChild({
|
|
9690
|
+
iframe,
|
|
9691
|
+
methods: {
|
|
9692
|
+
...callbacks,
|
|
9693
|
+
handshake: (...args) => {
|
|
9694
|
+
var _a;
|
|
9695
|
+
hideIframeLoader();
|
|
9696
|
+
(_a = callbacks === null || callbacks === void 0 ? void 0 : callbacks.handshake) === null || _a === void 0 ? void 0 : _a.call(callbacks, ...args);
|
|
9697
|
+
},
|
|
9698
|
+
close: () => complete(callbacks.onClose),
|
|
9699
|
+
},
|
|
9700
|
+
});
|
|
9701
|
+
}
|
|
9702
|
+
else {
|
|
9703
|
+
throw Error('Membrane container element not found. Was it manually removed?');
|
|
9704
|
+
}
|
|
9705
|
+
}
|
|
9706
|
+
if (document.readyState === 'complete' || document.readyState === 'interactive') {
|
|
9707
|
+
doOpen();
|
|
9708
|
+
}
|
|
9709
|
+
else {
|
|
9710
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
9711
|
+
doOpen();
|
|
9712
|
+
});
|
|
9713
|
+
}
|
|
9714
|
+
});
|
|
9715
|
+
}
|
|
9716
|
+
function close(callback) {
|
|
9717
|
+
document.body.classList.remove(BODY_CLASS);
|
|
9718
|
+
if (!!getContainer()) {
|
|
9719
|
+
deleteContainer();
|
|
9720
|
+
if (callback) {
|
|
9721
|
+
callback();
|
|
9722
|
+
}
|
|
9723
|
+
}
|
|
9724
|
+
}
|
|
9725
|
+
function init(mountTargetSelector) {
|
|
9726
|
+
var _a;
|
|
9727
|
+
injectStyles(mountTargetSelector);
|
|
9728
|
+
if (!!getContainer()) {
|
|
9729
|
+
return;
|
|
9730
|
+
}
|
|
9731
|
+
const container = createContainer();
|
|
9732
|
+
if (mountTargetSelector && document.querySelector(mountTargetSelector)) {
|
|
9733
|
+
(_a = document.querySelector(mountTargetSelector)) === null || _a === void 0 ? void 0 : _a.appendChild(container);
|
|
9734
|
+
}
|
|
9735
|
+
else {
|
|
9736
|
+
document.body.appendChild(container);
|
|
9737
|
+
}
|
|
9738
|
+
}
|
|
9739
|
+
function injectStyles(mountTargetSelector) {
|
|
9740
|
+
const hasCustomMountTarget = Boolean(mountTargetSelector && document.querySelector(mountTargetSelector));
|
|
9741
|
+
const styles = [
|
|
9742
|
+
`.${CONTAINER_ELEMENT_CLASS}:empty {
|
|
9743
|
+
display: none;
|
|
9744
|
+
}`,
|
|
9745
|
+
hasCustomMountTarget
|
|
9746
|
+
? `.${CONTAINER_ELEMENT_CLASS} {
|
|
9747
|
+
inset: 0;
|
|
9748
|
+
background: rgba(0, 0, 0, 0);
|
|
9749
|
+
transition: background 0.2s ease-out;
|
|
9750
|
+
display: flex;
|
|
9751
|
+
justify-content: center;
|
|
9752
|
+
align-items: center;
|
|
9753
|
+
width: 100%;
|
|
9754
|
+
height: 100%;
|
|
9755
|
+
}`
|
|
9756
|
+
: `.${CONTAINER_ELEMENT_CLASS} {
|
|
9757
|
+
position: fixed;
|
|
9758
|
+
inset: 0;
|
|
9759
|
+
z-index: 2147483647;
|
|
9760
|
+
display: flex;
|
|
9761
|
+
justify-content: center;
|
|
9762
|
+
align-items: center;
|
|
9763
|
+
pointer-events: auto;
|
|
9764
|
+
background: rgba(0, 0, 0, 0);
|
|
9765
|
+
transition: background 0.2s ease-out;
|
|
9766
|
+
}`,
|
|
9767
|
+
`.${CONTAINER_ELEMENT_CLASS}.${CONTAINER_ELEMENT_CLASS__LOADER} {
|
|
9768
|
+
background: rgba(0, 0, 0, 0.8);
|
|
9769
|
+
}`,
|
|
9770
|
+
`.${CONTAINER_ELEMENT_CLASS}.${CONTAINER_ELEMENT_CLASS__LOADER}::before {
|
|
9771
|
+
${hasCustomMountTarget ? 'position: absolute;' : ''}
|
|
9772
|
+
content: "";
|
|
9773
|
+
width: 5rem;
|
|
9774
|
+
height: 4rem;
|
|
9775
|
+
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');
|
|
9776
|
+
background-size: contain;
|
|
9777
|
+
background-repeat: no-repeat;
|
|
9778
|
+
background-position: center;
|
|
9779
|
+
filter: invert(1);
|
|
9780
|
+
}`,
|
|
9781
|
+
`.${CONTAINER_ELEMENT_CLASS} iframe {
|
|
9782
|
+
${hasCustomMountTarget ? '' : 'position: absolute;'}
|
|
9783
|
+
width: 100%;
|
|
9784
|
+
height: 100%;
|
|
9785
|
+
border-width: 0;
|
|
9786
|
+
|
|
9787
|
+
/* fix transparent bg, because iframe document has light scheme */
|
|
9788
|
+
color-scheme: light;
|
|
9789
|
+
}`,
|
|
9790
|
+
`.${CONTAINER_ELEMENT_CLASS}.${CONTAINER_ELEMENT_CLASS__LOADER} iframe {
|
|
9791
|
+
visibility: hidden;
|
|
9792
|
+
}`,
|
|
9793
|
+
!hasCustomMountTarget
|
|
9794
|
+
? `body.${BODY_CLASS} {
|
|
9795
|
+
overflow: hidden;
|
|
9796
|
+
}`
|
|
9797
|
+
: '',
|
|
9798
|
+
];
|
|
9799
|
+
let styleElement = document.getElementById(STYLES_ELEMENT_ID);
|
|
9800
|
+
if (!styleElement) {
|
|
9801
|
+
styleElement = document.createElement('style');
|
|
9802
|
+
styleElement.id = STYLES_ELEMENT_ID;
|
|
9803
|
+
styleElement.type = 'text/css';
|
|
9804
|
+
document.head.appendChild(styleElement);
|
|
9805
|
+
}
|
|
9806
|
+
styleElement.textContent = styles.join('\n');
|
|
9807
|
+
}
|
|
9808
|
+
function removeInjectedStyles() {
|
|
9809
|
+
const stylesElement = document.getElementById(STYLES_ELEMENT_ID);
|
|
9810
|
+
if (stylesElement) {
|
|
9811
|
+
stylesElement.remove();
|
|
9812
|
+
}
|
|
9813
|
+
}
|
|
9814
|
+
function createContainer() {
|
|
9815
|
+
const container = document.createElement('div');
|
|
9816
|
+
container.id = CONTAINER_ELEMENT_ID;
|
|
9817
|
+
container.classList.add(CONTAINER_ELEMENT_CLASS);
|
|
9818
|
+
return container;
|
|
9819
|
+
}
|
|
9820
|
+
function getContainer() {
|
|
9821
|
+
return document.getElementById(CONTAINER_ELEMENT_ID);
|
|
9822
|
+
}
|
|
9823
|
+
function appendToContainer(el) {
|
|
9824
|
+
const container = getContainer();
|
|
9825
|
+
container === null || container === void 0 ? void 0 : container.appendChild(el);
|
|
9826
|
+
}
|
|
9827
|
+
function deleteContainer() {
|
|
9828
|
+
const container = getContainer();
|
|
9829
|
+
if (container) {
|
|
9830
|
+
container.remove();
|
|
9831
|
+
}
|
|
9832
|
+
removeInjectedStyles();
|
|
9833
|
+
}
|
|
9834
|
+
function handleIframeUnmount(iframe) {
|
|
9835
|
+
const observer = new MutationObserver((mutationsList) => {
|
|
9836
|
+
for (const mutation of mutationsList) {
|
|
9837
|
+
for (const removedNode of mutation.removedNodes) {
|
|
9838
|
+
if (removedNode instanceof HTMLElement && removedNode.id === POPUP_ELEMENT_ID) {
|
|
9839
|
+
observer.disconnect();
|
|
9840
|
+
deleteContainer();
|
|
9841
|
+
return;
|
|
9842
|
+
}
|
|
9843
|
+
}
|
|
9844
|
+
}
|
|
9845
|
+
});
|
|
9846
|
+
const parent = iframe.parentNode;
|
|
9847
|
+
if (parent) {
|
|
9848
|
+
observer.observe(parent, {
|
|
9849
|
+
childList: true,
|
|
9850
|
+
});
|
|
9851
|
+
}
|
|
9852
|
+
else {
|
|
9853
|
+
console.warn(`iframe with ID "${POPUP_ELEMENT_ID}" has no parent node`);
|
|
9854
|
+
}
|
|
9855
|
+
}
|
|
8632
9856
|
|
|
8633
|
-
|
|
8634
|
-
|
|
8635
|
-
|
|
8636
|
-
|
|
8637
|
-
|
|
8638
|
-
|
|
8639
|
-
|
|
9857
|
+
const CreateIntegrationRequest = z.object({
|
|
9858
|
+
name: z.string().optional(),
|
|
9859
|
+
key: z.string(),
|
|
9860
|
+
baseUri: z.string(),
|
|
9861
|
+
logoUri: z.string(),
|
|
9862
|
+
});
|
|
9863
|
+
const UpdateIntegrationRequest = z.object({
|
|
9864
|
+
name: z.string().optional(),
|
|
9865
|
+
key: z.string().optional(),
|
|
9866
|
+
baseUri: z.string().optional(),
|
|
9867
|
+
logoUri: z.string().optional(),
|
|
9868
|
+
});
|
|
9869
|
+
const FindIntegrationsQuery = z.object({}).merge(PaginationQuery).merge(SearchQuery);
|
|
9870
|
+
const OpenNewConnectionOptions = z
|
|
9871
|
+
.object({
|
|
9872
|
+
allowMultipleConnections: z.boolean().optional(),
|
|
9873
|
+
name: z.string().optional(),
|
|
9874
|
+
connectorParameters: z.any().optional(),
|
|
9875
|
+
})
|
|
9876
|
+
.merge(OpenConfigurationOptions);
|
|
9877
|
+
const Integration = BaseIntegration.extend({
|
|
9878
|
+
connection: BaseConnection.optional(),
|
|
9879
|
+
spec: z.any().optional(),
|
|
9880
|
+
});
|
|
8640
9881
|
|
|
8641
|
-
var
|
|
8642
|
-
(function (
|
|
8643
|
-
|
|
8644
|
-
|
|
8645
|
-
|
|
8646
|
-
|
|
8647
|
-
|
|
9882
|
+
var IntegrationElementLevel;
|
|
9883
|
+
(function (IntegrationElementLevel) {
|
|
9884
|
+
IntegrationElementLevel["UNIVERSAL"] = "universal";
|
|
9885
|
+
IntegrationElementLevel["CONNECTOR"] = "connector";
|
|
9886
|
+
IntegrationElementLevel["CONNECTION"] = "connection";
|
|
9887
|
+
})(IntegrationElementLevel || (IntegrationElementLevel = {}));
|
|
9888
|
+
var IntegrationElementType;
|
|
9889
|
+
(function (IntegrationElementType) {
|
|
9890
|
+
IntegrationElementType["APP_DATA_SCHEMA"] = "app-data-schema";
|
|
9891
|
+
IntegrationElementType["APP_EVENT_TYPE"] = "app-event-type";
|
|
9892
|
+
IntegrationElementType["DATA_SOURCE"] = "data-source";
|
|
9893
|
+
IntegrationElementType["SCHEMA"] = "schema";
|
|
9894
|
+
IntegrationElementType["FIELD_MAPPING"] = "field-mapping";
|
|
9895
|
+
IntegrationElementType["FLOW"] = "flow";
|
|
9896
|
+
IntegrationElementType["INTEGRATION"] = "integration";
|
|
9897
|
+
IntegrationElementType["ACTION"] = "action";
|
|
9898
|
+
IntegrationElementType["DATA_LINK_TABLE"] = "data-link-table";
|
|
9899
|
+
IntegrationElementType["EXTERNAL_EVENT"] = "external-event";
|
|
9900
|
+
})(IntegrationElementType || (IntegrationElementType = {}));
|
|
8648
9901
|
|
|
8649
|
-
|
|
8650
|
-
(function (ConfigurationState) {
|
|
8651
|
-
ConfigurationState["CONFIGURED"] = "CONFIGURED";
|
|
8652
|
-
ConfigurationState["NOT_CONFIGURED"] = "NOT_CONFIGURED";
|
|
8653
|
-
})(ConfigurationState || (ConfigurationState = {}));
|
|
8654
|
-
var WorkspaceElementType;
|
|
8655
|
-
(function (WorkspaceElementType) {
|
|
8656
|
-
WorkspaceElementType["Customer"] = "customer";
|
|
8657
|
-
WorkspaceElementType["Connector"] = "connector";
|
|
8658
|
-
WorkspaceElementType["Integration"] = "integration";
|
|
8659
|
-
WorkspaceElementType["Flow"] = "flow";
|
|
8660
|
-
WorkspaceElementType["FlowInstance"] = "flow-instance";
|
|
8661
|
-
WorkspaceElementType["FlowRun"] = "flow-run";
|
|
8662
|
-
WorkspaceElementType["Action"] = "action";
|
|
8663
|
-
WorkspaceElementType["Scenario"] = "scenario";
|
|
8664
|
-
WorkspaceElementType["ActionInstance"] = "action-instance";
|
|
8665
|
-
WorkspaceElementType["Connection"] = "connection";
|
|
8666
|
-
WorkspaceElementType["FieldMapping"] = "field-mapping";
|
|
8667
|
-
WorkspaceElementType["FieldMappingInstance"] = "field-mapping-instance";
|
|
8668
|
-
WorkspaceElementType["DataSource"] = "data-source";
|
|
8669
|
-
WorkspaceElementType["DataSourceInstance"] = "data-source-instance";
|
|
8670
|
-
WorkspaceElementType["DataLinkTable"] = "data-link-table";
|
|
8671
|
-
WorkspaceElementType["DataLinkTableInstance"] = "data-link-table-instance";
|
|
8672
|
-
WorkspaceElementType["AppEventType"] = "app-event-type";
|
|
8673
|
-
WorkspaceElementType["AppEventSubscription"] = "app-event-subscription";
|
|
8674
|
-
WorkspaceElementType["AppDataSchema"] = "app-data-schema";
|
|
8675
|
-
WorkspaceElementType["AppDataSchemaInstance"] = "app-data-schema-instance";
|
|
8676
|
-
WorkspaceElementType["ExternalEventSubscription"] = "external-event-subscription";
|
|
8677
|
-
WorkspaceElementType["ExternalEventLogRecord"] = "external-event-log-record";
|
|
8678
|
-
WorkspaceElementType["ExternalEventPull"] = "external-event-pull";
|
|
8679
|
-
WorkspaceElementType["DataCollection"] = "data-collection";
|
|
8680
|
-
WorkspaceElementType["Screen"] = "screen";
|
|
8681
|
-
WorkspaceElementType["ActionRunLogRecord"] = "action-run-log-record";
|
|
8682
|
-
})(WorkspaceElementType || (WorkspaceElementType = {}));
|
|
8683
|
-
var WorkspaceEventType;
|
|
8684
|
-
(function (WorkspaceEventType) {
|
|
8685
|
-
WorkspaceEventType["ConnectionCreated"] = "connection.created";
|
|
8686
|
-
WorkspaceEventType["ConnectionDeleted"] = "connection.deleted";
|
|
8687
|
-
WorkspaceEventType["ConnectionDisconnected"] = "connection.disconnected";
|
|
8688
|
-
WorkspaceEventType["ConnectionReconnected"] = "connection.reconnected";
|
|
8689
|
-
WorkspaceEventType["FlowRunQueued"] = "flowRun.queued";
|
|
8690
|
-
WorkspaceEventType["FlowRunStarted"] = "flowRun.started";
|
|
8691
|
-
WorkspaceEventType["FlowRunCompleted"] = "flowRun.completed";
|
|
8692
|
-
WorkspaceEventType["FlowRunFailed"] = "flowRun.failed";
|
|
8693
|
-
WorkspaceEventType["FlowRunStopped"] = "flowRun.stopped";
|
|
8694
|
-
})(WorkspaceEventType || (WorkspaceEventType = {}));
|
|
8695
|
-
var WorkspaceElementState;
|
|
8696
|
-
(function (WorkspaceElementState) {
|
|
8697
|
-
WorkspaceElementState["CONFIGURATION_ERROR"] = "CONFIGURATION_ERROR";
|
|
8698
|
-
WorkspaceElementState["SETUP_FAILED"] = "SETUP_FAILED";
|
|
8699
|
-
WorkspaceElementState["READY"] = "READY";
|
|
8700
|
-
})(WorkspaceElementState || (WorkspaceElementState = {}));
|
|
8701
|
-
var WorkspaceElementDependencyType;
|
|
8702
|
-
(function (WorkspaceElementDependencyType) {
|
|
8703
|
-
WorkspaceElementDependencyType["Configuration"] = "CONFIGURATION";
|
|
8704
|
-
WorkspaceElementDependencyType["Parent"] = "PARENT";
|
|
8705
|
-
})(WorkspaceElementDependencyType || (WorkspaceElementDependencyType = {}));
|
|
8706
|
-
const BaseWorkspaceElement = z.object({
|
|
8707
|
-
id: z.string(),
|
|
9902
|
+
const ScenarioToDoApi = z.object({
|
|
8708
9903
|
name: z.string(),
|
|
9904
|
+
description: z.string(),
|
|
9905
|
+
isComplete: z.boolean(),
|
|
8709
9906
|
});
|
|
8710
|
-
const
|
|
9907
|
+
const ScenarioElementApi = z.object({
|
|
9908
|
+
id: z.string(),
|
|
9909
|
+
type: z.nativeEnum(IntegrationElementType),
|
|
9910
|
+
element: z.any().optional(),
|
|
9911
|
+
});
|
|
9912
|
+
const FindScenariosQuery = z.object({}).merge(SearchQuery).merge(PaginationQuery);
|
|
9913
|
+
const CreateScenarioRequest = z.object({
|
|
9914
|
+
name: z.string(),
|
|
8711
9915
|
key: z.string(),
|
|
8712
|
-
|
|
8713
|
-
|
|
9916
|
+
elements: z.array(ScenarioElementApi).optional(),
|
|
9917
|
+
todos: z.array(ScenarioToDoApi).optional(),
|
|
9918
|
+
});
|
|
9919
|
+
const UpdateScenarioRequest = z.object({
|
|
9920
|
+
name: z.string().optional(),
|
|
9921
|
+
key: z.string().optional(),
|
|
9922
|
+
elements: z.array(ScenarioElementApi).optional(),
|
|
9923
|
+
todos: z.array(ScenarioToDoApi).optional(),
|
|
9924
|
+
});
|
|
9925
|
+
const Scenario = BaseScenario.extend({
|
|
9926
|
+
appliedToIntegrations: z.array(BaseIntegration).optional(),
|
|
8714
9927
|
});
|
|
8715
9928
|
|
|
8716
|
-
|
|
8717
|
-
|
|
8718
|
-
|
|
8719
|
-
|
|
8720
|
-
|
|
8721
|
-
|
|
8722
|
-
|
|
8723
|
-
|
|
8724
|
-
|
|
8725
|
-
|
|
8726
|
-
|
|
8727
|
-
|
|
8728
|
-
|
|
8729
|
-
|
|
8730
|
-
|
|
8731
|
-
|
|
8732
|
-
|
|
8733
|
-
(
|
|
8734
|
-
|
|
8735
|
-
FlowRunState["RUNNING"] = "running";
|
|
8736
|
-
FlowRunState["COMPLETED"] = "completed";
|
|
8737
|
-
FlowRunState["STOPPED"] = "stopped";
|
|
8738
|
-
FlowRunState["FAILED"] = "failed";
|
|
8739
|
-
})(FlowRunState || (FlowRunState = {}));
|
|
8740
|
-
var FlowRunLaunchedByTrigger;
|
|
8741
|
-
(function (FlowRunLaunchedByTrigger) {
|
|
8742
|
-
FlowRunLaunchedByTrigger["ApiTrigger"] = "api-trigger";
|
|
8743
|
-
FlowRunLaunchedByTrigger["ScheduleTrigger"] = "schedule-trigger";
|
|
8744
|
-
FlowRunLaunchedByTrigger["AppEventTrigger"] = "app-event-trigger";
|
|
8745
|
-
FlowRunLaunchedByTrigger["DataSourceTrigger"] = "data-source-trigger";
|
|
8746
|
-
FlowRunLaunchedByTrigger["ExternalEvent"] = "external-event";
|
|
8747
|
-
})(FlowRunLaunchedByTrigger || (FlowRunLaunchedByTrigger = {}));
|
|
8748
|
-
|
|
8749
|
-
var ScenarioTemplateCategory;
|
|
8750
|
-
(function (ScenarioTemplateCategory) {
|
|
8751
|
-
ScenarioTemplateCategory["DataExport"] = "data-export";
|
|
8752
|
-
ScenarioTemplateCategory["DataImport"] = "data-import";
|
|
8753
|
-
ScenarioTemplateCategory["BiDirectionalSync"] = "bi-directional-sync";
|
|
8754
|
-
ScenarioTemplateCategory["UnifiedApi"] = "unified-api";
|
|
8755
|
-
ScenarioTemplateCategory["DataEnrichment"] = "data-enrichment";
|
|
8756
|
-
})(ScenarioTemplateCategory || (ScenarioTemplateCategory = {}));
|
|
9929
|
+
const CreateCustomerRequest = z.object({
|
|
9930
|
+
name: z.string().optional(),
|
|
9931
|
+
internalId: z.string(),
|
|
9932
|
+
fields: z.any().optional(),
|
|
9933
|
+
credentials: z.any().optional(),
|
|
9934
|
+
});
|
|
9935
|
+
const UpdateCustomerRequest = z.object({
|
|
9936
|
+
name: z.string().optional(),
|
|
9937
|
+
internalId: z.string().optional(),
|
|
9938
|
+
fields: z.any().optional(),
|
|
9939
|
+
credentials: z.any().optional(),
|
|
9940
|
+
});
|
|
9941
|
+
const FindCustomersQuery = z
|
|
9942
|
+
.object({
|
|
9943
|
+
isTest: z.boolean().optional(),
|
|
9944
|
+
})
|
|
9945
|
+
.merge(PaginationQuery)
|
|
9946
|
+
.merge(SearchQuery);
|
|
9947
|
+
const CustomerSelector = z.object({ id: z.string() });
|
|
8757
9948
|
|
|
8758
|
-
|
|
8759
|
-
|
|
8760
|
-
|
|
8761
|
-
})
|
|
8762
|
-
var ScreenBlockType;
|
|
8763
|
-
(function (ScreenBlockType) {
|
|
8764
|
-
ScreenBlockType["Flow"] = "flow";
|
|
8765
|
-
ScreenBlockType["FieldMapping"] = "field-mapping";
|
|
8766
|
-
ScreenBlockType["DataSource"] = "data-source";
|
|
8767
|
-
ScreenBlockType["Action"] = "action";
|
|
8768
|
-
})(ScreenBlockType || (ScreenBlockType = {}));
|
|
9949
|
+
const FieldMapping = BaseFieldMapping.extend({
|
|
9950
|
+
integration: BaseIntegration.optional(),
|
|
9951
|
+
appliedToIntegrations: AppliedToIntegrations(BaseFieldMapping).optional(),
|
|
9952
|
+
});
|
|
8769
9953
|
|
|
8770
9954
|
class DependencyError extends IntegrationAppError {
|
|
8771
9955
|
constructor(arg, workspaceElementReference) {
|
|
@@ -8838,7 +10022,7 @@ function getChildNodeKeys(flow, nodeKey) {
|
|
|
8838
10022
|
return (nodeLinks
|
|
8839
10023
|
.map((nodeLink) => nodeLink.key)
|
|
8840
10024
|
.filter(Boolean)
|
|
8841
|
-
.filter((k) => { var _a; return !!((_a = flow.nodes) === null || _a === void 0 ? void 0 : _a[k]); }));
|
|
10025
|
+
.filter((k) => { var _a; return k && !!((_a = flow.nodes) === null || _a === void 0 ? void 0 : _a[k]); }));
|
|
8842
10026
|
}
|
|
8843
10027
|
function getDownstreamNodeKeys(flow, nodeKey) {
|
|
8844
10028
|
const linkedKeys = getChildNodeKeys(flow, nodeKey);
|
|
@@ -9411,83 +10595,33 @@ class DataForm {
|
|
|
9411
10595
|
|
|
9412
10596
|
function parseDate(value) {
|
|
9413
10597
|
let timestamp;
|
|
9414
|
-
if (typeof value === 'number') {
|
|
9415
|
-
timestamp = value;
|
|
9416
|
-
}
|
|
9417
|
-
else if (typeof value === 'string') {
|
|
9418
|
-
timestamp = Date.parse(value);
|
|
9419
|
-
if (isNaN(timestamp)) {
|
|
9420
|
-
timestamp = undefined;
|
|
9421
|
-
}
|
|
9422
|
-
if (!timestamp && Number(value) > 1000000000) {
|
|
9423
|
-
timestamp = Number(value);
|
|
9424
|
-
}
|
|
9425
|
-
}
|
|
9426
|
-
if (timestamp) {
|
|
9427
|
-
return timestampToDate(timestamp);
|
|
9428
|
-
}
|
|
9429
|
-
else {
|
|
9430
|
-
return undefined;
|
|
9431
|
-
}
|
|
9432
|
-
}
|
|
9433
|
-
function timestampToDate(value) {
|
|
9434
|
-
if (Math.round(value).toString().length < 13) {
|
|
9435
|
-
return new Date(value * 1000);
|
|
9436
|
-
}
|
|
9437
|
-
else {
|
|
9438
|
-
return new Date(value);
|
|
9439
|
-
}
|
|
9440
|
-
}
|
|
9441
|
-
|
|
9442
|
-
var HttpRequestMethod;
|
|
9443
|
-
(function (HttpRequestMethod) {
|
|
9444
|
-
HttpRequestMethod["GET"] = "GET";
|
|
9445
|
-
HttpRequestMethod["POST"] = "POST";
|
|
9446
|
-
HttpRequestMethod["PATCH"] = "PATCH";
|
|
9447
|
-
HttpRequestMethod["PUT"] = "PUT";
|
|
9448
|
-
HttpRequestMethod["DELETE"] = "DELETE";
|
|
9449
|
-
})(HttpRequestMethod || (HttpRequestMethod = {}));
|
|
9450
|
-
const HTTP_REQUEST_SCHEMA = {
|
|
9451
|
-
type: 'object',
|
|
9452
|
-
properties: {
|
|
9453
|
-
uri: { type: 'string' },
|
|
9454
|
-
method: {
|
|
9455
|
-
type: 'string',
|
|
9456
|
-
enum: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'],
|
|
9457
|
-
},
|
|
9458
|
-
body: {},
|
|
9459
|
-
query: {
|
|
9460
|
-
type: 'object',
|
|
9461
|
-
section: true,
|
|
9462
|
-
additionalProperties: true,
|
|
9463
|
-
},
|
|
9464
|
-
headers: {
|
|
9465
|
-
type: 'object',
|
|
9466
|
-
section: true,
|
|
9467
|
-
additionalProperties: true,
|
|
9468
|
-
},
|
|
9469
|
-
},
|
|
9470
|
-
};
|
|
9471
|
-
|
|
9472
|
-
var IntegrationElementLevel;
|
|
9473
|
-
(function (IntegrationElementLevel) {
|
|
9474
|
-
IntegrationElementLevel["UNIVERSAL"] = "universal";
|
|
9475
|
-
IntegrationElementLevel["CONNECTOR"] = "connector";
|
|
9476
|
-
IntegrationElementLevel["CONNECTION"] = "connection";
|
|
9477
|
-
})(IntegrationElementLevel || (IntegrationElementLevel = {}));
|
|
9478
|
-
var IntegrationElementType;
|
|
9479
|
-
(function (IntegrationElementType) {
|
|
9480
|
-
IntegrationElementType["APP_DATA_SCHEMA"] = "app-data-schema";
|
|
9481
|
-
IntegrationElementType["APP_EVENT_TYPE"] = "app-event-type";
|
|
9482
|
-
IntegrationElementType["DATA_SOURCE"] = "data-source";
|
|
9483
|
-
IntegrationElementType["SCHEMA"] = "schema";
|
|
9484
|
-
IntegrationElementType["FIELD_MAPPING"] = "field-mapping";
|
|
9485
|
-
IntegrationElementType["FLOW"] = "flow";
|
|
9486
|
-
IntegrationElementType["INTEGRATION"] = "integration";
|
|
9487
|
-
IntegrationElementType["ACTION"] = "action";
|
|
9488
|
-
IntegrationElementType["DATA_LINK_TABLE"] = "data-link-table";
|
|
9489
|
-
IntegrationElementType["EXTERNAL_EVENT"] = "external-event";
|
|
9490
|
-
})(IntegrationElementType || (IntegrationElementType = {}));
|
|
10598
|
+
if (typeof value === 'number') {
|
|
10599
|
+
timestamp = value;
|
|
10600
|
+
}
|
|
10601
|
+
else if (typeof value === 'string') {
|
|
10602
|
+
timestamp = Date.parse(value);
|
|
10603
|
+
if (isNaN(timestamp)) {
|
|
10604
|
+
timestamp = undefined;
|
|
10605
|
+
}
|
|
10606
|
+
if (!timestamp && Number(value) > 1000000000) {
|
|
10607
|
+
timestamp = Number(value);
|
|
10608
|
+
}
|
|
10609
|
+
}
|
|
10610
|
+
if (timestamp) {
|
|
10611
|
+
return timestampToDate(timestamp);
|
|
10612
|
+
}
|
|
10613
|
+
else {
|
|
10614
|
+
return undefined;
|
|
10615
|
+
}
|
|
10616
|
+
}
|
|
10617
|
+
function timestampToDate(value) {
|
|
10618
|
+
if (Math.round(value).toString().length < 13) {
|
|
10619
|
+
return new Date(value * 1000);
|
|
10620
|
+
}
|
|
10621
|
+
else {
|
|
10622
|
+
return new Date(value);
|
|
10623
|
+
}
|
|
10624
|
+
}
|
|
9491
10625
|
|
|
9492
10626
|
var UsageType;
|
|
9493
10627
|
(function (UsageType) {
|
|
@@ -9924,231 +11058,6 @@ class IntegrationLevelActionsListAccessor extends IntegrationLevelElementsListAc
|
|
|
9924
11058
|
}
|
|
9925
11059
|
}
|
|
9926
11060
|
|
|
9927
|
-
const POPUP_ELEMENT_ID = '__integration-app-popup';
|
|
9928
|
-
const CONTAINER_ELEMENT_ID = '__integration-app-container';
|
|
9929
|
-
const CONTAINER_ELEMENT_CLASS = '__integration-app-container';
|
|
9930
|
-
const CONTAINER_ELEMENT_CLASS__LOADER = '__integration-app-container__loader';
|
|
9931
|
-
const BODY_CLASS = '__integration-app-open';
|
|
9932
|
-
const STYLES_ELEMENT_ID = '__integration-app-embed-styles';
|
|
9933
|
-
let IFRAME_START_SHOW_LOADER_TIME = 0;
|
|
9934
|
-
let IFRAME_SHOW_LOADER_TIMEOUT_ID;
|
|
9935
|
-
const IFRAME_SHOW_LOADER_MINIMAL_TIME = 500;
|
|
9936
|
-
const IFRAME_LAYOUT_SHIFT_TIME = 300;
|
|
9937
|
-
function showIframeLoader() {
|
|
9938
|
-
const container = getContainer();
|
|
9939
|
-
container === null || container === void 0 ? void 0 : container.classList.add(CONTAINER_ELEMENT_CLASS__LOADER);
|
|
9940
|
-
IFRAME_START_SHOW_LOADER_TIME = Date.now();
|
|
9941
|
-
}
|
|
9942
|
-
function hideIframeLoader(waitLayoutShift = IFRAME_LAYOUT_SHIFT_TIME) {
|
|
9943
|
-
if (IFRAME_SHOW_LOADER_TIMEOUT_ID) {
|
|
9944
|
-
clearTimeout(IFRAME_SHOW_LOADER_TIMEOUT_ID);
|
|
9945
|
-
}
|
|
9946
|
-
const delta = Date.now() - IFRAME_START_SHOW_LOADER_TIME;
|
|
9947
|
-
if (delta >= IFRAME_SHOW_LOADER_MINIMAL_TIME) {
|
|
9948
|
-
setTimeout(() => {
|
|
9949
|
-
const container = getContainer();
|
|
9950
|
-
container === null || container === void 0 ? void 0 : container.classList.remove(CONTAINER_ELEMENT_CLASS__LOADER);
|
|
9951
|
-
IFRAME_START_SHOW_LOADER_TIME = 0;
|
|
9952
|
-
}, waitLayoutShift);
|
|
9953
|
-
return;
|
|
9954
|
-
}
|
|
9955
|
-
else {
|
|
9956
|
-
const waitLayoutShift = delta >= IFRAME_LAYOUT_SHIFT_TIME ? 0 : IFRAME_LAYOUT_SHIFT_TIME - delta;
|
|
9957
|
-
const timeoutTime = IFRAME_SHOW_LOADER_MINIMAL_TIME - delta;
|
|
9958
|
-
IFRAME_SHOW_LOADER_TIMEOUT_ID = setTimeout(() => {
|
|
9959
|
-
hideIframeLoader(waitLayoutShift);
|
|
9960
|
-
}, timeoutTime);
|
|
9961
|
-
return;
|
|
9962
|
-
}
|
|
9963
|
-
}
|
|
9964
|
-
async function openIframe(uri, callbacks = {}, { mountTargetSelector } = {}) {
|
|
9965
|
-
close();
|
|
9966
|
-
init(mountTargetSelector);
|
|
9967
|
-
return new Promise((resolve) => {
|
|
9968
|
-
function complete(callback) {
|
|
9969
|
-
close(callback);
|
|
9970
|
-
resolve();
|
|
9971
|
-
}
|
|
9972
|
-
function doOpen() {
|
|
9973
|
-
const iframe = document.createElement('iframe');
|
|
9974
|
-
iframe.src = uri;
|
|
9975
|
-
iframe.id = POPUP_ELEMENT_ID;
|
|
9976
|
-
iframe.onload = () => {
|
|
9977
|
-
hideIframeLoader();
|
|
9978
|
-
};
|
|
9979
|
-
if (!!getContainer()) {
|
|
9980
|
-
document.body.classList.add(BODY_CLASS);
|
|
9981
|
-
showIframeLoader();
|
|
9982
|
-
appendToContainer(iframe);
|
|
9983
|
-
handleIframeUnmount(iframe);
|
|
9984
|
-
connectToChild({
|
|
9985
|
-
iframe,
|
|
9986
|
-
methods: {
|
|
9987
|
-
...callbacks,
|
|
9988
|
-
handshake: (...args) => {
|
|
9989
|
-
var _a;
|
|
9990
|
-
hideIframeLoader();
|
|
9991
|
-
(_a = callbacks === null || callbacks === void 0 ? void 0 : callbacks.handshake) === null || _a === void 0 ? void 0 : _a.call(callbacks, ...args);
|
|
9992
|
-
},
|
|
9993
|
-
close: () => complete(callbacks.onClose),
|
|
9994
|
-
},
|
|
9995
|
-
});
|
|
9996
|
-
}
|
|
9997
|
-
else {
|
|
9998
|
-
throw Error('Membrane container element not found. Was it manually removed?');
|
|
9999
|
-
}
|
|
10000
|
-
}
|
|
10001
|
-
if (document.readyState === 'complete' || document.readyState === 'interactive') {
|
|
10002
|
-
doOpen();
|
|
10003
|
-
}
|
|
10004
|
-
else {
|
|
10005
|
-
document.addEventListener('DOMContentLoaded', () => {
|
|
10006
|
-
doOpen();
|
|
10007
|
-
});
|
|
10008
|
-
}
|
|
10009
|
-
});
|
|
10010
|
-
}
|
|
10011
|
-
function close(callback) {
|
|
10012
|
-
document.body.classList.remove(BODY_CLASS);
|
|
10013
|
-
if (!!getContainer()) {
|
|
10014
|
-
deleteContainer();
|
|
10015
|
-
if (callback) {
|
|
10016
|
-
callback();
|
|
10017
|
-
}
|
|
10018
|
-
}
|
|
10019
|
-
}
|
|
10020
|
-
function init(mountTargetSelector) {
|
|
10021
|
-
var _a;
|
|
10022
|
-
injectStyles(mountTargetSelector);
|
|
10023
|
-
if (!!getContainer()) {
|
|
10024
|
-
return;
|
|
10025
|
-
}
|
|
10026
|
-
const container = createContainer();
|
|
10027
|
-
if (mountTargetSelector && document.querySelector(mountTargetSelector)) {
|
|
10028
|
-
(_a = document.querySelector(mountTargetSelector)) === null || _a === void 0 ? void 0 : _a.appendChild(container);
|
|
10029
|
-
}
|
|
10030
|
-
else {
|
|
10031
|
-
document.body.appendChild(container);
|
|
10032
|
-
}
|
|
10033
|
-
}
|
|
10034
|
-
function injectStyles(mountTargetSelector) {
|
|
10035
|
-
const hasCustomMountTarget = Boolean(mountTargetSelector && document.querySelector(mountTargetSelector));
|
|
10036
|
-
const styles = [
|
|
10037
|
-
`.${CONTAINER_ELEMENT_CLASS}:empty {
|
|
10038
|
-
display: none;
|
|
10039
|
-
}`,
|
|
10040
|
-
hasCustomMountTarget
|
|
10041
|
-
? `.${CONTAINER_ELEMENT_CLASS} {
|
|
10042
|
-
inset: 0;
|
|
10043
|
-
background: rgba(0, 0, 0, 0);
|
|
10044
|
-
transition: background 0.2s ease-out;
|
|
10045
|
-
display: flex;
|
|
10046
|
-
justify-content: center;
|
|
10047
|
-
align-items: center;
|
|
10048
|
-
width: 100%;
|
|
10049
|
-
height: 100%;
|
|
10050
|
-
}`
|
|
10051
|
-
: `.${CONTAINER_ELEMENT_CLASS} {
|
|
10052
|
-
position: fixed;
|
|
10053
|
-
inset: 0;
|
|
10054
|
-
z-index: 2147483647;
|
|
10055
|
-
display: flex;
|
|
10056
|
-
justify-content: center;
|
|
10057
|
-
align-items: center;
|
|
10058
|
-
pointer-events: auto;
|
|
10059
|
-
background: rgba(0, 0, 0, 0);
|
|
10060
|
-
transition: background 0.2s ease-out;
|
|
10061
|
-
}`,
|
|
10062
|
-
`.${CONTAINER_ELEMENT_CLASS}.${CONTAINER_ELEMENT_CLASS__LOADER} {
|
|
10063
|
-
background: rgba(0, 0, 0, 0.8);
|
|
10064
|
-
}`,
|
|
10065
|
-
`.${CONTAINER_ELEMENT_CLASS}.${CONTAINER_ELEMENT_CLASS__LOADER}::before {
|
|
10066
|
-
${hasCustomMountTarget ? 'position: absolute;' : ''}
|
|
10067
|
-
content: "";
|
|
10068
|
-
width: 5rem;
|
|
10069
|
-
height: 4rem;
|
|
10070
|
-
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');
|
|
10071
|
-
background-size: contain;
|
|
10072
|
-
background-repeat: no-repeat;
|
|
10073
|
-
background-position: center;
|
|
10074
|
-
filter: invert(1);
|
|
10075
|
-
}`,
|
|
10076
|
-
`.${CONTAINER_ELEMENT_CLASS} iframe {
|
|
10077
|
-
${hasCustomMountTarget ? '' : 'position: absolute;'}
|
|
10078
|
-
width: 100%;
|
|
10079
|
-
height: 100%;
|
|
10080
|
-
border-width: 0;
|
|
10081
|
-
|
|
10082
|
-
/* fix transparent bg, because iframe document has light scheme */
|
|
10083
|
-
color-scheme: light;
|
|
10084
|
-
}`,
|
|
10085
|
-
`.${CONTAINER_ELEMENT_CLASS}.${CONTAINER_ELEMENT_CLASS__LOADER} iframe {
|
|
10086
|
-
visibility: hidden;
|
|
10087
|
-
}`,
|
|
10088
|
-
!hasCustomMountTarget
|
|
10089
|
-
? `body.${BODY_CLASS} {
|
|
10090
|
-
overflow: hidden;
|
|
10091
|
-
}`
|
|
10092
|
-
: '',
|
|
10093
|
-
];
|
|
10094
|
-
let styleElement = document.getElementById(STYLES_ELEMENT_ID);
|
|
10095
|
-
if (!styleElement) {
|
|
10096
|
-
styleElement = document.createElement('style');
|
|
10097
|
-
styleElement.id = STYLES_ELEMENT_ID;
|
|
10098
|
-
styleElement.type = 'text/css';
|
|
10099
|
-
document.head.appendChild(styleElement);
|
|
10100
|
-
}
|
|
10101
|
-
styleElement.textContent = styles.join('\n');
|
|
10102
|
-
}
|
|
10103
|
-
function removeInjectedStyles() {
|
|
10104
|
-
const stylesElement = document.getElementById(STYLES_ELEMENT_ID);
|
|
10105
|
-
if (stylesElement) {
|
|
10106
|
-
stylesElement.remove();
|
|
10107
|
-
}
|
|
10108
|
-
}
|
|
10109
|
-
function createContainer() {
|
|
10110
|
-
const container = document.createElement('div');
|
|
10111
|
-
container.id = CONTAINER_ELEMENT_ID;
|
|
10112
|
-
container.classList.add(CONTAINER_ELEMENT_CLASS);
|
|
10113
|
-
return container;
|
|
10114
|
-
}
|
|
10115
|
-
function getContainer() {
|
|
10116
|
-
return document.getElementById(CONTAINER_ELEMENT_ID);
|
|
10117
|
-
}
|
|
10118
|
-
function appendToContainer(el) {
|
|
10119
|
-
const container = getContainer();
|
|
10120
|
-
container === null || container === void 0 ? void 0 : container.appendChild(el);
|
|
10121
|
-
}
|
|
10122
|
-
function deleteContainer() {
|
|
10123
|
-
const container = getContainer();
|
|
10124
|
-
if (container) {
|
|
10125
|
-
container.remove();
|
|
10126
|
-
}
|
|
10127
|
-
removeInjectedStyles();
|
|
10128
|
-
}
|
|
10129
|
-
function handleIframeUnmount(iframe) {
|
|
10130
|
-
const observer = new MutationObserver((mutationsList) => {
|
|
10131
|
-
for (const mutation of mutationsList) {
|
|
10132
|
-
for (const removedNode of mutation.removedNodes) {
|
|
10133
|
-
if (removedNode instanceof HTMLElement && removedNode.id === POPUP_ELEMENT_ID) {
|
|
10134
|
-
observer.disconnect();
|
|
10135
|
-
deleteContainer();
|
|
10136
|
-
return;
|
|
10137
|
-
}
|
|
10138
|
-
}
|
|
10139
|
-
}
|
|
10140
|
-
});
|
|
10141
|
-
const parent = iframe.parentNode;
|
|
10142
|
-
if (parent) {
|
|
10143
|
-
observer.observe(parent, {
|
|
10144
|
-
childList: true,
|
|
10145
|
-
});
|
|
10146
|
-
}
|
|
10147
|
-
else {
|
|
10148
|
-
console.warn(`iframe with ID "${POPUP_ELEMENT_ID}" has no parent node`);
|
|
10149
|
-
}
|
|
10150
|
-
}
|
|
10151
|
-
|
|
10152
11061
|
class ConnectionLevelElementAccessor {
|
|
10153
11062
|
constructor(client, connectionSelector, selector, elementKey, query) {
|
|
10154
11063
|
this.client = client;
|
|
@@ -11370,6 +12279,11 @@ class ExternalEventSubscriptionAccessor {
|
|
|
11370
12279
|
}
|
|
11371
12280
|
}
|
|
11372
12281
|
|
|
12282
|
+
var WorkspaceSyncEventType;
|
|
12283
|
+
(function (WorkspaceSyncEventType) {
|
|
12284
|
+
WorkspaceSyncEventType["ElementUpdate"] = "element-update";
|
|
12285
|
+
})(WorkspaceSyncEventType || (WorkspaceSyncEventType = {}));
|
|
12286
|
+
|
|
11373
12287
|
function decodeJWT(token) {
|
|
11374
12288
|
if (typeof token !== 'string') {
|
|
11375
12289
|
return undefined;
|
|
@@ -11463,6 +12377,13 @@ class IntegrationAppApiClient {
|
|
|
11463
12377
|
async delete(uri, data, options) {
|
|
11464
12378
|
return this.makeApiRequest('DELETE', { ...(options !== null && options !== void 0 ? options : {}), url: uri, data });
|
|
11465
12379
|
}
|
|
12380
|
+
async createEventSource(uri, queryParams) {
|
|
12381
|
+
const token = await this.getToken();
|
|
12382
|
+
const allParams = { ...queryParams, token };
|
|
12383
|
+
const queryString = qs.stringify(omitBy(allParams, isEmptyValue));
|
|
12384
|
+
const urlWithToken = `${this.apiUri}/${uri}?${queryString}`;
|
|
12385
|
+
return new EventSource(urlWithToken);
|
|
12386
|
+
}
|
|
11466
12387
|
async getEmbedUri(page, pageParams, options) {
|
|
11467
12388
|
var _a;
|
|
11468
12389
|
const paramsWithToken = {
|
|
@@ -11643,6 +12564,9 @@ class IntegrationAppClient extends IntegrationAppApiClient {
|
|
|
11643
12564
|
get scenarios() {
|
|
11644
12565
|
return new ScenariosAccessor(this);
|
|
11645
12566
|
}
|
|
12567
|
+
async createEventSource(uri, queryParams) {
|
|
12568
|
+
return super.createEventSource(uri, queryParams);
|
|
12569
|
+
}
|
|
11646
12570
|
async connectionRequest(connectionId, uri, data) {
|
|
11647
12571
|
return this.post(`connections/${connectionId}/execute-request`, {
|
|
11648
12572
|
key: uri,
|
|
@@ -11653,5 +12577,5 @@ class IntegrationAppClient extends IntegrationAppApiClient {
|
|
|
11653
12577
|
|
|
11654
12578
|
injectFormulaCatalog(getFormula, isFormula, hasFormulas);
|
|
11655
12579
|
|
|
11656
|
-
export { ACTIONS, AccessDeniedError, ActionAccessor, ActionDependencyType, ActionInstanceAccessor, ActionInstanceSetupError, ActionInstancesAccessor, ActionRunError, ActionRunLogStatus, ActionRunStatus, ActionType, ActionsAccessor, AlertSeverity, AlertStatus, AlertType, ApiRequestSpecSchema, AppDataSchemaAccessor, AppDataSchemaInstanceAccessor, AppDataSchemaInstancesAccessor, AppDataSchemasAccessor, AppEventSubscriptionAccessor, AppEventSubscriptionsAccessor, AppEventTypeAccessor, AppEventTypesAccessor, BadRequestError, BadRequestErrorKey, BaseMembraneInterface, BaseWorkspaceElement, CONNECTOR_AUTH_TYPES, CONNECTOR_CATEGORIES, CONNECTOR_DATA_DIR, CONNECTOR_DOCS_DIR, CONNECTOR_EVENTS_DIR, CONNECTOR_GLOBAL_WEBHOOKS_DIR, CONNECTOR_METHOD_IMPLEMENTATION_SUFFIXES, CONNECTOR_OPERATIONS_DIR, ConcurrencyError, ConcurrencyErrorKey, ConfigurationError, ConfigurationState, ConnectionAccessor, ConnectionDataCollectionAccessor, ConnectionError, ConnectionErrorKey, ConnectionLevelActionAccessor, ConnectionLevelActionsAccessor, ConnectionLevelDataSourceAccessor, ConnectionLevelDataSourcesAccessor, ConnectionLevelFieldMappingAccessor, ConnectionLevelFieldMappingsAccessor, ConnectionLevelFlowAccessor, ConnectionLevelFlowsAccessor, ConnectionOperationAccessor, ConnectionProxy, ConnectionSpec, ConnectionsAccessor, ConnectorAuthMethodTypes, ConnectorCopilotFileChunkTopicKey, ConnectorCopilotSuggestionType, ConnectorDataCollectionEventImplementationType, ConnectorDataCollectionMethodKeys, ConnectorDataLocationTypes, ConnectorEventHandlerMethods, ConnectorEventImplementationType, ConnectorMethodImplementationType, ConnectorOperationMethodImplementationTypes, ConnectorStatus, CopilotActionStatus, CopilotActionType, CopilotActivityScope, CopilotActivityType, CopilotTaskStatus, CopilotTaskType, CreateConnectionRequest, CustomCodeError, CustomerAccessor, CustomersAccessor, DATA_RECORD_SCHEMA, DEFAULT_FULL_SYNC_INTERVAL_SECONDS, DEFAULT_PULL_UPDATES_INTERVAL_SECONDS, DataBuilderFormulaType, DataCollectionCreateRequestSchema, DataCollectionCreateResponseSchema, DataCollectionCreateSpecSchema, DataCollectionDeleteRequestSchema, DataCollectionDeleteResponseSchema, DataCollectionDeleteSpecSchema, DataCollectionEventType, DataCollectionEventTypeSpecSchema, DataCollectionEventsSpecSchema, DataCollectionFindByIdRequestSchema, DataCollectionFindByIdResponseSchema, DataCollectionFindByIdSpecSchema, DataCollectionFindRequestSchema, DataCollectionFindResponseSchema, DataCollectionFindSpecSchema, DataCollectionListRequestSchema, DataCollectionListResponseDrilldownSchema, DataCollectionListResponseSchema, DataCollectionListSpecSchema, DataCollectionMatchRequestSchema, DataCollectionMatchResponseSchema, DataCollectionMatchSpecSchema, DataCollectionMethodRequestSchema, DataCollectionMethodSpecSchema, DataCollectionSearchRequestSchema, DataCollectionSearchResponseSchema, DataCollectionSearchSpecSchema, DataCollectionSpecSchema, DataCollectionUdmSpecSchema, DataCollectionUdmsSpecSchema, DataCollectionUpdateRequestSchema, DataCollectionUpdateResponseSchema, DataCollectionUpdateSpecSchema, DataFilterCondition, DataForm, DataLinkDirection, DataLinkTableAccessor, DataLinkTableInstanceAccessor, DataLinkTableInstancesAccessor, DataLinkTablesAccessor, DataLocationMethodImplementationTypes, DataLocationTypeCollection, DataLocatorStep, DataLocatorStepArrayItem, DataLocatorStepObjectProperty, DataLocatorStepType, DataRecordSchema, DataSchemaSchema, DataSourceAccessor, DataSourceInstanceAccessor, DataSourceInstancesAccessor, DataSourcesAccessor, DependencyError, DownstreamFlowNodeRunSchema, EDITABLE_LIMITS, ElementAccessor, ElementInstanceAccessor, ElementInstanceListAccessor, ElementListAccessor, ErrorData, ErrorDataSchema, ErrorType, ExternalEventLogStatus, ExternalEventPullStatus, ExternalEventSubscriptionAccessor, ExternalEventSubscriptionStatus, ExternalEventSubscriptionType, ExternalEventSubscriptionsAccessor, ExternalEventType, FLOW_NODE_SPECS, FieldMappingAccessor, FieldMappingDirection, FieldMappingInstanceAccessor, FieldMappingInstancesAccessor, FieldMappingsAccessor, FindConnectionsResponse, FlowAccessor, FlowInstanceAccessor, FlowInstanceNodeState, FlowInstanceSetupError, FlowInstancesAccessor, FlowNodeRunOutputMetadataSchema, FlowNodeRunOutputSchema, FlowNodeRunOutputWithoutDownstreamRunsSchema, FlowNodeRunParametersSchema, FlowNodeRunRecordSchema, FlowNodeRunRecordWithoutOutputsDataSchema, FlowNodeRunResultSchema, FlowNodeRunStatus, FlowNodeSpec, FlowNodeType, FlowRunAccessor, FlowRunError, FlowRunLaunchedByTrigger, FlowRunNodeState, FlowRunState, FlowRunsAccessor, FlowsAccessor, Formula, HTTP_REQUEST_SCHEMA, HttpRequestMethod, IncomingWebhooksState, IntegrationAccessor, IntegrationAppClient, IntegrationAppError, IntegrationElementLevel, IntegrationElementType, IntegrationLevelActionAccessor, IntegrationLevelActionsListAccessor, IntegrationLevelDataSourceAccessor, IntegrationLevelDataSourcesListAccessor, IntegrationLevelFieldMappingAccessor, IntegrationLevelFieldMappingsListAccessor, IntegrationLevelFlowAccessor, IntegrationLevelFlowsListAccessor, IntegrationsAccessor, InternalError, InvalidLocatorError, LogRecordType, MIN_FULL_SYNC_INTERVAL_SECONDS, MIN_PULL_UPDATES_INTERVAL_SECONDS, NotAuthenticatedError, NotFoundError, OAUTH1_CONFIG_SCHEMA, OAUTH_CONFIG_SCHEMA, OrgLimitsType, OrgUserRole, OrgUserStatus, PARALLEL_EXECUTION_LIMITS, PaginationResponse, RATE_LIMITS, RateLimitExceededError, ScenarioAccessor, ScenarioTemplateCategory, ScenariosAccessor, ScreenAccessor, ScreenBlockType, ScreenType, ScreensAccessor, SelfAccessor, UDM, UNIFIED_DATA_MODELS, UnitRunError, UpdateConnectionRequest, UpstreamFlowNodeRunSchema, UsageType, UserAccessor, UsersAccessor, WORKSPACE_SIZE_LIMITS, WebhookTypeEnum, WorkspaceElementDependencyType, WorkspaceElementSpecs, WorkspaceElementState, WorkspaceElementType, WorkspaceEventType, WorkspaceNotificationType, WorkspaceOnboardingStep, WorkspaceType, addRequiredFieldsToSchema, addUdmFallbackFields, backwardCompatibleFilterMatch, buildData, buildDataSchema, buildValue, compressDataSchema, createCompoundSchema, createFlowInstanceSchema, createObjectFromLocators, createOrUpdateConnection, createSchema, dataCollectionEventTypeToExternalEventType, dataLocationParametersMatch, doesMatchFilter, excludeFieldsFromSchema, excludeFieldsFromValue, excludeReadOnlyFieldsFromSchema, excludeWriteOnlyFieldsFromSchema, externalEventTypeToDataCollectionEventType, extractFieldLocator, extractIntegrationAppErrorData, findUdmCollectionMapping, findUdmDefaultCollection, findUdmRootLocation, findValueLocators, generateExampleFromSchema, getActionInstanceVariableSchema, getActionRunTimeVariablesSchema, getAllEventMethodFilePaths, getChildNodeKeys, getDataCollectionCreateFields, getDataCollectionUpdateFields, getDataLocationMethodPath, getDownstreamNodeKeys, getErrorFromData, getEventMethodFileKey, getFilterFieldValuesByLocator, getFlowInstanceNodeDependency, getFlowNode, getFlowNodeConfigTimeVariablesSchema, getFlowNodeDescription, getFlowNodeRunTimeVariablesSchema, getFlowNodeSpec, getFlowNodeTitle, getFormula$1 as getFormula, getFormulaLocators, getFormula as getFormula_internalDoNotUse, getFullNameForLocator, getFullTitleForLocator, getIconUriForLocator, getLocatorsFromData, getLocatorsFromSchema, getMissingRequiredFields, getNameComponentsForLocator, getNameForLocator, getNodeInputSchema, getOperatorsBySchema, getParentNodeKeys, getReferenceCollectionPathForSchema, getReferenceCollectionPointerForSchema, getRequiredFieldsFromSchema, getRootNodeKeys, getSchemaByLocator, getSchemaFromValue, getUpstreamNodeKeys, getValueAtLocator, getValueByLocator, getVariableLocators, getWritableFieldsSchema, hasCycles, hasFormulas$1 as hasFormulas, hasFormulas as hasFormulas_internalDoNotUse, injectFormulaCatalog, isDataActionType, isDataLocationMethodSupported, isFormula$1 as isFormula, isFormula as isFormula_internalDoNotUse, isIntegrationAppError, isObject, isSameDataLocation, isSchemaEmpty, isStream, isValidLocator, locatorToField, locatorToSteps, locatorToString, makeDataLocationOperationPath, makeDataLocationPath, makeDataRecordSchema, makeObjectPropertyLocator, makeSchemaForLocator, mergeSchemas, mergeWithFormulas, nonEmptyObjectProperties, parseDataLocationPath, parseDate, patchSchema, pickFieldsFromSchema, pickFieldsFromValue, populateSchemaTitles, processCopy, removeNonExistentVars, removeRequiredFieldsFromSchema, resolveFormulas, resolveValue, schemaAllowsCustomValue, schemaHasFixedValues, schemaHasProperties, schemaIsNumber, schemaIsScalar, schemaTypeFromValue, schemaWithTitle, setSchemaAtLocator, setValueAtLocator, stepsToLocator, streamToString, transformVariablesWith, transformVars, truncateData, unwrapSchema, unwrapSchemas, updateFlowInstanceSchema, updateImpliedSchema, valueToSchema, valueToString, walkSchema, wrapAnyOfSchema };
|
|
12580
|
+
export { ACTIONS, AccessDeniedError, Action, ActionAccessor, ActionDependency, ActionDependencyType, ActionInstanceAccessor, ActionInstanceSetupError, ActionInstancesAccessor, ActionRunError, ActionRunLogStatus, ActionRunResponse, ActionRunStatus, ActionType, ActionsAccessor, AlertSeverity, AlertStatus, AlertType, ApiRequestSpec, AppDataSchemaAccessor, AppDataSchemaInstanceAccessor, AppDataSchemaInstancesAccessor, AppDataSchemasAccessor, AppEventSubscriptionAccessor, AppEventSubscriptionsAccessor, AppEventTypeAccessor, AppEventTypesAccessor, AppliedToIntegrations, BadRequestError, BadRequestErrorKey, BaseAction, BaseActionInstance, BaseActionRunLogRecord, BaseAppDataSchema, BaseAppDataSchemaInstance, BaseAppEventSubscription, BaseAppEventType, BaseConnection, BaseCustomer, BaseDataLinkTable, BaseDataLinkTableInstance, BaseDataSource, BaseDataSourceInstance, BaseExternalEvent, BaseExternalEventLogRecord, BaseExternalEventPull, BaseExternalEventSubscription, BaseFieldMapping, BaseFieldMappingInstance, BaseFlow, BaseFlowInstance, BaseFlowRun, BaseIntegration, BaseMembraneInterface, BaseScenario, BaseScreen, BaseWorkspaceElement, CONNECTOR_AUTH_TYPES, CONNECTOR_CATEGORIES, CONNECTOR_DATA_DIR, CONNECTOR_DOCS_DIR, CONNECTOR_EVENTS_DIR, CONNECTOR_GLOBAL_WEBHOOKS_DIR, CONNECTOR_METHOD_IMPLEMENTATION_SUFFIXES, CONNECTOR_OPERATIONS_DIR, CommonInstancesListQuery, CommonIntegrationOrConnectionQuery, CommonListElementsQuery, ConcurrencyError, ConcurrencyErrorKey, ConfigurationError, ConfigurationState, Connection, ConnectionAccessor, ConnectionDataCollectionAccessor, ConnectionError, ConnectionErrorKey, ConnectionLevelActionAccessor, ConnectionLevelActionsAccessor, ConnectionLevelDataSourceAccessor, ConnectionLevelDataSourcesAccessor, ConnectionLevelFieldMappingAccessor, ConnectionLevelFieldMappingsAccessor, ConnectionLevelFlowAccessor, ConnectionLevelFlowsAccessor, ConnectionMessagePayload, ConnectionOperationAccessor, ConnectionProxy, ConnectionRequest, ConnectionSelector, ConnectionSpec, ConnectionsAccessor, ConnectorAuthMethodTypes, ConnectorCopilotFileChunkTopicKey, ConnectorCopilotSuggestionType, ConnectorDataCollectionEventImplementationType, ConnectorDataCollectionMethodKeys, ConnectorDataLocationTypes, ConnectorEventHandlerMethods, ConnectorEventImplementationType, ConnectorMethodImplementationType, ConnectorOperationMethodImplementationTypes, ConnectorStatus, CopilotActionStatus, CopilotActionType, CopilotActivityScope, CopilotActivityType, CopilotTaskStatus, CopilotTaskType, CreateActionInstanceRequest, CreateActionRequest, CreateConnectionRequest, CreateCustomerRequest, CreateDataSourceInstanceRequest, CreateDataSourceRequest, CreateFlowNodeRequest, CreateFlowRequest, CreateIntegrationRequest, CreateScenarioRequest, CustomCodeError, CustomerAccessor, CustomerSelector, CustomersAccessor, DATA_RECORD_SCHEMA, DEFAULT_FULL_SYNC_INTERVAL_SECONDS, DEFAULT_PULL_UPDATES_INTERVAL_SECONDS, DataBuilderFormulaType, DataCollectionCreateRequest, DataCollectionCreateResponse, DataCollectionCreateSpec, DataCollectionDeleteRequest, DataCollectionDeleteResponse, DataCollectionDeleteSpec, DataCollectionEventType, DataCollectionEventTypeSpec, DataCollectionEventsSpec, DataCollectionFindByIdRequest, DataCollectionFindByIdResponse, DataCollectionFindByIdSpec, DataCollectionFindRequest, DataCollectionFindResponse, DataCollectionFindSpec, DataCollectionListRequest, DataCollectionListResponse, DataCollectionListResponseDrilldown, DataCollectionListSpec, DataCollectionMatchRequest, DataCollectionMatchResponse, DataCollectionMatchSpec, DataCollectionMethodRequest, DataCollectionMethodSpec, DataCollectionSearchRequest, DataCollectionSearchResponse, DataCollectionSearchSpec, DataCollectionSpec, DataCollectionUdmSpec, DataCollectionUdmsSpec, DataCollectionUpdateRequest, DataCollectionUpdateResponse, DataCollectionUpdateSpec, DataFilterCondition, DataForm, DataLink, DataLinkDirection, DataLinkTableAccessor, DataLinkTableConfig, DataLinkTableInstanceAccessor, DataLinkTableInstancesAccessor, DataLinkTablesAccessor, DataLocationMethodImplementationTypes, DataLocationTypeCollection, DataLocatorStep, DataLocatorStepArrayItem, DataLocatorStepObjectProperty, DataLocatorStepType, DataRecordSchema, DataSchema, DataSchemaSchema, DataSource, DataSourceAccessor, DataSourceInstanceAccessor, DataSourceInstancesAccessor, DataSourceUnitConfig, DataSourcesAccessor, DependencyError, DownstreamFlowNodeRunSchema, EDITABLE_LIMITS, ElementAccessor, ElementInstanceAccessor, ElementInstanceListAccessor, ElementListAccessor, ElementsExportFields, ErrorData, ErrorDataSchema, ErrorType, ExternalEvent, ExternalEventLogStatus, ExternalEventPullStatus, ExternalEventSubscriptionAccessor, ExternalEventSubscriptionConfig, ExternalEventSubscriptionStatus, ExternalEventSubscriptionType, ExternalEventSubscriptionsAccessor, ExternalEventType, ExternalEventUnitConfig, FLOW_NODE_SPECS, FieldMapping, FieldMappingAccessor, FieldMappingDirection, FieldMappingInstanceAccessor, FieldMappingInstancesAccessor, FieldMappingUnitConfig, FieldMappingsAccessor, FindActionInstancesQuery, FindActionsQuery, FindConnectionsQuery, FindConnectionsResponse, FindCustomersQuery, FindDataSourceEventsQuery, FindDataSourceInstanceSyncsQuery, FindDataSourceInstancesQuery, FindDataSourceSyncsQuery, FindDataSourcesQuery, FindFlowInstancesQuery, FindFlowsQuery, FindIntegrationsQuery, FindScenariosQuery, Flow, FlowAccessor, FlowInstance, FlowInstanceAccessor, FlowInstanceNode, FlowInstanceNodeState, FlowInstanceSetupError, FlowInstancesAccessor, FlowNode, FlowNodeLink, FlowNodeRunOutputMetadataSchema, FlowNodeRunOutputSchema, FlowNodeRunOutputWithoutDownstreamRunsSchema, FlowNodeRunParametersSchema, FlowNodeRunRecordSchema, FlowNodeRunRecordWithoutOutputsDataSchema, FlowNodeRunResultSchema, FlowNodeRunStatus, FlowNodeSpec, FlowNodeType, FlowRunAccessor, FlowRunError, FlowRunLaunchedBy, FlowRunLaunchedByTrigger, FlowRunNode, FlowRunNodeState, FlowRunState, FlowRunsAccessor, FlowsAccessor, Formula, HTTP_REQUEST_SCHEMA, HandyScenarioTemplateElement, HttpRequestMethod, HttpRequestSpec, IncludeArchivedQuery, IncomingWebhooksState, Integration, IntegrationAccessor, IntegrationAppClient, IntegrationAppError, IntegrationElementLevel, IntegrationElementType, IntegrationLevelActionAccessor, IntegrationLevelActionsListAccessor, IntegrationLevelDataSourceAccessor, IntegrationLevelDataSourcesListAccessor, IntegrationLevelFieldMappingAccessor, IntegrationLevelFieldMappingsListAccessor, IntegrationLevelFlowAccessor, IntegrationLevelFlowsListAccessor, IntegrationsAccessor, InternalError, InvalidLocatorError, ListActionInstancesForConnectionQuery, ListActionsForIntegrationQuery, ListDataSourceInstancesForConnectionQuery, ListDataSourcesForIntegrationQuery, ListFlowInstancesForConnectionQuery, ListFlowsForIntegrationQuery, LogRecordType, MIN_FULL_SYNC_INTERVAL_SECONDS, MIN_PULL_UPDATES_INTERVAL_SECONDS, MinimalConnector, NotAuthenticatedError, NotFoundError, OAUTH1_CONFIG_SCHEMA, OAUTH_CONFIG_SCHEMA, OpenNewConnectionOptions, OrgLimitsType, OrgUserRole, OrgUserStatus, PARALLEL_EXECUTION_LIMITS, PaginationQuery, PaginationResponse, RATE_LIMITS, RateLimitExceededError, ResetFlowInstanceOptions, RunFlowOptions, Scenario, ScenarioAccessor, ScenarioElement, ScenarioElementApi, ScenarioTemplate, ScenarioTemplateCategory, ScenarioTemplateElements, ScenarioToDo, ScenarioToDoApi, ScenariosAccessor, ScreenAccessor, ScreenBlock, ScreenBlockType, ScreenType, ScreensAccessor, SearchQuery, SelfAccessor, UDM, UNIFIED_DATA_MODELS, UnitRunError, UpdateActionInstanceRequest, UpdateActionRequest, UpdateConnectionRequest, UpdateCustomerRequest, UpdateDataSourceInstanceRequest, UpdateDataSourceRequest, UpdateFlowRequest, UpdateIntegrationRequest, UpdateScenarioRequest, UpstreamFlowNodeRunSchema, UsageType, UserAccessor, UsersAccessor, WORKSPACE_SIZE_LIMITS, WebhookTypeEnum, WorkspaceElementDependencyType, WorkspaceElementSpecs, WorkspaceElementState, WorkspaceElementType, WorkspaceEventType, WorkspaceNotificationType, WorkspaceOnboardingStep, WorkspaceSyncEventType, WorkspaceType, addRequiredFieldsToSchema, addUdmFallbackFields, backwardCompatibleFilterMatch, buildData, buildDataSchema, buildValue, compressDataSchema, createCompoundSchema, createFlowInstanceSchema, createObjectFromLocators, createOrUpdateConnection, createSchema, dataCollectionEventTypeToExternalEventType, dataLocationParametersMatch, doesMatchFilter, excludeFieldsFromSchema, excludeFieldsFromValue, excludeReadOnlyFieldsFromSchema, excludeWriteOnlyFieldsFromSchema, externalEventTypeToDataCollectionEventType, extractFieldLocator, extractIntegrationAppErrorData, findUdmCollectionMapping, findUdmDefaultCollection, findUdmRootLocation, findValueLocators, generateExampleFromSchema, getActionInstanceVariableSchema, getActionRunTimeVariablesSchema, getAllEventMethodFilePaths, getChildNodeKeys, getDataCollectionCreateFields, getDataCollectionUpdateFields, getDataLocationMethodPath, getDownstreamNodeKeys, getErrorFromData, getEventMethodFileKey, getFilterFieldValuesByLocator, getFlowInstanceNodeDependency, getFlowNode, getFlowNodeConfigTimeVariablesSchema, getFlowNodeDescription, getFlowNodeRunTimeVariablesSchema, getFlowNodeSpec, getFlowNodeTitle, getFormula$1 as getFormula, getFormulaLocators, getFormula as getFormula_internalDoNotUse, getFullNameForLocator, getFullTitleForLocator, getIconUriForLocator, getLocatorsFromData, getLocatorsFromSchema, getMissingRequiredFields, getNameComponentsForLocator, getNameForLocator, getNodeInputSchema, getOperatorsBySchema, getParentNodeKeys, getReferenceCollectionPathForSchema, getReferenceCollectionPointerForSchema, getRequiredFieldsFromSchema, getRootNodeKeys, getSchemaByLocator, getSchemaFromValue, getUpstreamNodeKeys, getValueAtLocator, getValueByLocator, getVariableLocators, getWritableFieldsSchema, hasCycles, hasFormulas$1 as hasFormulas, hasFormulas as hasFormulas_internalDoNotUse, injectFormulaCatalog, isDataActionType, isDataLocationMethodSupported, isFormula$1 as isFormula, isFormula as isFormula_internalDoNotUse, isIntegrationAppError, isObject, isSameDataLocation, isSchemaEmpty, isStream, isValidLocator, locatorToField, locatorToSteps, locatorToString, makeDataLocationOperationPath, makeDataLocationPath, makeDataRecordSchema, makeObjectPropertyLocator, makeSchemaForLocator, mergeSchemas, mergeWithFormulas, nonEmptyObjectProperties, parseDataLocationPath, parseDate, patchSchema, pickFieldsFromSchema, pickFieldsFromValue, populateSchemaTitles, processCopy, removeNonExistentVars, removeRequiredFieldsFromSchema, resolveFormulas, resolveValue, schemaAllowsCustomValue, schemaHasFixedValues, schemaHasProperties, schemaIsNumber, schemaIsScalar, schemaTypeFromValue, schemaWithTitle, setSchemaAtLocator, setValueAtLocator, stepsToLocator, streamToString, transformVariablesWith, transformVars, truncateData, unwrapSchema, unwrapSchemas, updateFlowInstanceSchema, updateImpliedSchema, valueToSchema, valueToString, walkSchema, wrapAnyOfSchema };
|
|
11657
12581
|
//# sourceMappingURL=index.module.mjs.map
|