@membranehq/sdk 0.2.0 → 0.3.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/LICENSE +1 -1
- package/README.md +3 -8
- package/dist/bundle.d.ts +730 -228
- package/dist/bundle.js +183 -97
- package/dist/bundle.js.map +1 -1
- package/dist/dts/actions/types.d.ts +0 -1
- package/dist/dts/api-client.d.ts +5 -5
- package/dist/dts/connections/accessors.d.ts +3 -11
- package/dist/dts/connections/create-or-update-connection.d.ts +1 -0
- package/dist/dts/connections/types.d.ts +1 -3
- package/dist/dts/connectors/auth.d.ts +6 -3
- package/dist/dts/connectors/data-locations/base.d.ts +3 -3
- package/dist/dts/connectors/data-locations/collections/events/implementation-types/connector-event.d.ts +2 -2
- package/dist/dts/connectors/data-locations/collections/events/implementation-types/custom-pull.d.ts +2 -2
- package/dist/dts/connectors/data-locations/collections/events/implementation-types/pull-latest-records.d.ts +2 -2
- package/dist/dts/connectors/data-locations/collections/events/implementation-types/webhook.d.ts +2 -2
- package/dist/dts/connectors/data-locations/collections/index.d.ts +24 -24
- package/dist/dts/connectors/data-locations/collections/methods/base.d.ts +3 -3
- package/dist/dts/connectors/data-locations/index.d.ts +1 -2
- package/dist/dts/connectors/data-locations/methods.d.ts +2 -2
- package/dist/dts/connectors/data-locations/schemas.d.ts +1329 -0
- package/dist/dts/connectors/data-locations/utils.d.ts +2 -2
- package/dist/dts/connectors/types.d.ts +1 -12
- package/dist/dts/data-builder/formulas/dataSchemaRef.d.ts +2 -2
- package/dist/dts/data-schema/index.d.ts +1 -0
- package/dist/dts/data-schema/schemas.d.ts +4 -0
- package/dist/dts/errors/index.d.ts +3 -10
- package/dist/dts/flow-runs/flow-node-runs.d.ts +347 -15
- package/dist/dts/flows/schemas.d.ts +14 -14
- package/dist/dts/flows/types.d.ts +0 -1
- package/dist/dts/integrations/accessors.d.ts +10 -11
- package/dist/dts/integrations/api.d.ts +1 -0
- package/dist/index.d.ts +1714 -359
- package/dist/index.js +199 -91
- package/dist/index.js.map +1 -1
- package/dist/index.module.d.mts +1714 -359
- package/dist/index.module.mjs +174 -89
- package/dist/index.module.mjs.map +1 -1
- package/package.json +3 -3
- package/dist/dts/connectors/data-locations/directories/index.d.ts +0 -17
- package/dist/dts/connectors/data-locations/directories/methods/base.d.ts +0 -18
- package/dist/dts/connectors/data-locations/directories/methods/list.d.ts +0 -2
- package/dist/dts/connectors/data-locations/types.d.ts +0 -258
package/dist/index.js
CHANGED
|
@@ -11,6 +11,15 @@ var deepEqual = require('fast-deep-equal');
|
|
|
11
11
|
var urljoin = require('url-join');
|
|
12
12
|
var axiosOriginal = require('axios');
|
|
13
13
|
|
|
14
|
+
exports.ErrorDoc = void 0;
|
|
15
|
+
(function (ErrorDoc) {
|
|
16
|
+
ErrorDoc["AuthenticationTokenErrors"] = "authentication-token-errors";
|
|
17
|
+
ErrorDoc["DataSourceNoCollectionSelected"] = "data-source-no-collection-selected";
|
|
18
|
+
ErrorDoc["FlowInstanceSetupFailed"] = "flow-instance-setup-failed";
|
|
19
|
+
ErrorDoc["FlowInstanceSetupTimeout"] = "flow-instance-setup-timeout";
|
|
20
|
+
ErrorDoc["WebhookCannotFindUser"] = "webhook-cannot-find-user";
|
|
21
|
+
})(exports.ErrorDoc || (exports.ErrorDoc = {}));
|
|
22
|
+
|
|
14
23
|
exports.LogRecordType = void 0;
|
|
15
24
|
(function (LogRecordType) {
|
|
16
25
|
LogRecordType["MSG"] = "message";
|
|
@@ -86,15 +95,6 @@ function truncateData(data, depth = 0) {
|
|
|
86
95
|
}
|
|
87
96
|
}
|
|
88
97
|
|
|
89
|
-
exports.ErrorDoc = void 0;
|
|
90
|
-
(function (ErrorDoc) {
|
|
91
|
-
ErrorDoc["AuthenticationTokenErrors"] = "authentication-token-errors";
|
|
92
|
-
ErrorDoc["DataSourceNoCollectionSelected"] = "data-source-no-collection-selected";
|
|
93
|
-
ErrorDoc["FlowInstanceSetupFailed"] = "flow-instance-setup-failed";
|
|
94
|
-
ErrorDoc["FlowInstanceSetupTimeout"] = "flow-instance-setup-timeout";
|
|
95
|
-
ErrorDoc["WebhookCannotFindUser"] = "webhook-cannot-find-user";
|
|
96
|
-
})(exports.ErrorDoc || (exports.ErrorDoc = {}));
|
|
97
|
-
|
|
98
98
|
exports.ErrorType = void 0;
|
|
99
99
|
(function (ErrorType) {
|
|
100
100
|
ErrorType["BAD_REQUEST"] = "bad_request";
|
|
@@ -128,6 +128,16 @@ exports.ConcurrencyErrorKey = void 0;
|
|
|
128
128
|
(function (ConcurrencyErrorKey) {
|
|
129
129
|
ConcurrencyErrorKey["LOCK_TIMEOUT"] = "lock_timeout";
|
|
130
130
|
})(exports.ConcurrencyErrorKey || (exports.ConcurrencyErrorKey = {}));
|
|
131
|
+
const ErrorDataSchema = zod.z.object({
|
|
132
|
+
type: zod.z.nativeEnum(exports.ErrorType).optional(),
|
|
133
|
+
key: zod.z.string().optional(),
|
|
134
|
+
message: zod.z.string(),
|
|
135
|
+
data: zod.z.any().optional(),
|
|
136
|
+
doc: zod.z.nativeEnum(exports.ErrorDoc).optional(),
|
|
137
|
+
stack: zod.z.any().optional(),
|
|
138
|
+
causedByError: zod.z.lazy(() => ErrorDataSchema).optional(),
|
|
139
|
+
logs: zod.z.array(zod.z.any()).optional(),
|
|
140
|
+
});
|
|
131
141
|
function isIntegrationAppError(error) {
|
|
132
142
|
return error && error.isIntegrationAppError;
|
|
133
143
|
}
|
|
@@ -829,7 +839,7 @@ async function openIframe(uri, callbacks = {}, { mountTargetSelector } = {}) {
|
|
|
829
839
|
});
|
|
830
840
|
}
|
|
831
841
|
else {
|
|
832
|
-
throw Error('
|
|
842
|
+
throw Error('Membrane container element not found. Was it manually removed?');
|
|
833
843
|
}
|
|
834
844
|
}
|
|
835
845
|
if (document.readyState === 'complete' || document.readyState === 'interactive') {
|
|
@@ -2556,6 +2566,42 @@ function isObjectAllowedAdditionalProperties(field) {
|
|
|
2556
2566
|
return ((_b = field.schema) === null || _b === void 0 ? void 0 : _b.additionalProperties) === true;
|
|
2557
2567
|
}
|
|
2558
2568
|
|
|
2569
|
+
const DataSchemaSchema = zod.z.lazy(() => zod.z.object({
|
|
2570
|
+
title: zod.z.string().optional(),
|
|
2571
|
+
description: zod.z.string().optional(),
|
|
2572
|
+
type: zod.z.union([zod.z.string(), zod.z.array(zod.z.string())]).optional(),
|
|
2573
|
+
format: zod.z.string().optional(),
|
|
2574
|
+
properties: zod.z.record(DataSchemaSchema).optional(),
|
|
2575
|
+
items: DataSchemaSchema.optional(),
|
|
2576
|
+
additionalProperties: zod.z.union([zod.z.boolean(), DataSchemaSchema]).optional(),
|
|
2577
|
+
enum: zod.z.array(zod.z.string()).optional(),
|
|
2578
|
+
referenceRecords: zod.z.array(zod.z.any()).optional(),
|
|
2579
|
+
referenceCollection: zod.z
|
|
2580
|
+
.object({
|
|
2581
|
+
key: zod.z.any(),
|
|
2582
|
+
parameters: zod.z.record(zod.z.any()).optional(),
|
|
2583
|
+
})
|
|
2584
|
+
.optional(),
|
|
2585
|
+
referenceUdm: zod.z.string().optional(),
|
|
2586
|
+
default: zod.z.any().optional(),
|
|
2587
|
+
allowCustom: zod.z.boolean().optional(),
|
|
2588
|
+
$ref: zod.z.string().optional(),
|
|
2589
|
+
required: zod.z.array(zod.z.string()).optional(),
|
|
2590
|
+
minLength: zod.z.number().optional(),
|
|
2591
|
+
maxLength: zod.z.number().optional(),
|
|
2592
|
+
minimum: zod.z.number().optional(),
|
|
2593
|
+
maximum: zod.z.number().optional(),
|
|
2594
|
+
maxItems: zod.z.number().optional(),
|
|
2595
|
+
readOnly: zod.z.boolean().optional(),
|
|
2596
|
+
writeOnly: zod.z.boolean().optional(),
|
|
2597
|
+
examples: zod.z.array(zod.z.any()).optional(),
|
|
2598
|
+
anyOf: zod.z.array(DataSchemaSchema).optional(),
|
|
2599
|
+
isImplied: zod.z.boolean().optional(),
|
|
2600
|
+
isSensitive: zod.z.boolean().optional(),
|
|
2601
|
+
referenceCollectionPath: zod.z.string().optional(),
|
|
2602
|
+
referenceCollectionUri: zod.z.string().optional(),
|
|
2603
|
+
}));
|
|
2604
|
+
|
|
2559
2605
|
exports.ConnectorMethodImplementationType = void 0;
|
|
2560
2606
|
(function (ConnectorMethodImplementationType) {
|
|
2561
2607
|
ConnectorMethodImplementationType["mapping"] = "mapping";
|
|
@@ -2575,6 +2621,7 @@ const CONNECTOR_METHOD_IMPLEMENTATION_SUFFIXES = {
|
|
|
2575
2621
|
|
|
2576
2622
|
const CONNECTOR_AUTH_TYPES = [
|
|
2577
2623
|
'integration-app-token',
|
|
2624
|
+
'membrane-token',
|
|
2578
2625
|
'oauth2',
|
|
2579
2626
|
'oauth1',
|
|
2580
2627
|
'client-credentials',
|
|
@@ -6808,62 +6855,73 @@ const DataLocationTypeCollection = {
|
|
|
6808
6855
|
};
|
|
6809
6856
|
const ConnectorDataCollectionMethodKeys = Object.keys(DataLocationTypeCollection.methods);
|
|
6810
6857
|
|
|
6811
|
-
const
|
|
6812
|
-
|
|
6813
|
-
|
|
6814
|
-
|
|
6815
|
-
|
|
6816
|
-
|
|
6817
|
-
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
|
|
6821
|
-
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
|
|
6827
|
-
|
|
6828
|
-
|
|
6829
|
-
|
|
6830
|
-
|
|
6831
|
-
|
|
6832
|
-
|
|
6833
|
-
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
|
|
6837
|
-
|
|
6838
|
-
|
|
6839
|
-
|
|
6840
|
-
|
|
6841
|
-
|
|
6842
|
-
|
|
6843
|
-
|
|
6844
|
-
const
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
|
|
6848
|
-
|
|
6849
|
-
|
|
6850
|
-
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
6856
|
-
|
|
6857
|
-
|
|
6858
|
-
|
|
6859
|
-
|
|
6860
|
-
|
|
6861
|
-
|
|
6862
|
-
|
|
6863
|
-
|
|
6858
|
+
const ApiRequestSpecSchema = zod.z.object({
|
|
6859
|
+
path: zod.z.unknown(),
|
|
6860
|
+
method: zod.z.unknown(),
|
|
6861
|
+
});
|
|
6862
|
+
const DataCollectionMethodSpecSchema = zod.z.object({
|
|
6863
|
+
apiRequests: zod.z.array(ApiRequestSpecSchema).optional(),
|
|
6864
|
+
});
|
|
6865
|
+
const DataCollectionListSpecSchema = DataCollectionMethodSpecSchema.extend({
|
|
6866
|
+
filterFields: zod.z.array(zod.z.string()).optional(),
|
|
6867
|
+
});
|
|
6868
|
+
const DataCollectionSearchSpecSchema = DataCollectionMethodSpecSchema.extend({});
|
|
6869
|
+
const DataCollectionMatchSpecSchema = DataCollectionMethodSpecSchema.extend({
|
|
6870
|
+
fields: zod.z.array(zod.z.string()).optional(),
|
|
6871
|
+
});
|
|
6872
|
+
const DataCollectionFindByIdSpecSchema = DataCollectionMethodSpecSchema.extend({});
|
|
6873
|
+
const DataCollectionCreateSpecSchema = DataCollectionMethodSpecSchema.extend({
|
|
6874
|
+
fields: zod.z.array(zod.z.string()).optional(),
|
|
6875
|
+
requiredFields: zod.z.array(zod.z.string()).optional(),
|
|
6876
|
+
excludedFields: zod.z.array(zod.z.string()).optional(),
|
|
6877
|
+
});
|
|
6878
|
+
const DataCollectionUpdateSpecSchema = DataCollectionMethodSpecSchema.extend({
|
|
6879
|
+
fields: zod.z.array(zod.z.string()).optional(),
|
|
6880
|
+
excludedFields: zod.z.array(zod.z.string()).optional(),
|
|
6881
|
+
});
|
|
6882
|
+
const DataCollectionDeleteSpecSchema = DataCollectionMethodSpecSchema.extend({});
|
|
6883
|
+
const DataCollectionFindSpecSchema = DataCollectionMethodSpecSchema.extend({
|
|
6884
|
+
queryFields: zod.z.array(zod.z.string()).optional(),
|
|
6885
|
+
});
|
|
6886
|
+
const DataCollectionEventTypeSpecSchema = zod.z.object({
|
|
6887
|
+
type: zod.z.enum(['push', 'pull']),
|
|
6888
|
+
isFullScan: zod.z.boolean().optional(),
|
|
6889
|
+
isIdOnly: zod.z.boolean().optional(),
|
|
6890
|
+
});
|
|
6891
|
+
const DataCollectionEventsSpecSchema = zod.z
|
|
6892
|
+
.object({
|
|
6893
|
+
created: DataCollectionEventTypeSpecSchema.optional(),
|
|
6894
|
+
updated: DataCollectionEventTypeSpecSchema.optional(),
|
|
6895
|
+
deleted: DataCollectionEventTypeSpecSchema.optional(),
|
|
6896
|
+
all: DataCollectionEventTypeSpecSchema.optional(),
|
|
6897
|
+
})
|
|
6898
|
+
.catchall(DataCollectionEventTypeSpecSchema);
|
|
6899
|
+
const DataCollectionUdmSpecSchema = zod.z.object({
|
|
6900
|
+
fields: zod.z.array(zod.z.string()).optional(),
|
|
6901
|
+
extract: zod.z.record(zod.z.any()).optional(),
|
|
6902
|
+
parse: zod.z.record(zod.z.any()).optional(),
|
|
6903
|
+
});
|
|
6904
|
+
const DataCollectionUdmsSpecSchema = zod.z.record(DataCollectionUdmSpecSchema);
|
|
6905
|
+
const DataCollectionSpecSchema = zod.z.object({
|
|
6906
|
+
type: zod.z.literal('collection'),
|
|
6907
|
+
key: zod.z.string().optional(),
|
|
6908
|
+
name: zod.z.string(),
|
|
6909
|
+
parametersSchema: DataSchemaSchema.optional(),
|
|
6910
|
+
fieldsSchema: DataSchemaSchema.optional(),
|
|
6911
|
+
list: DataCollectionListSpecSchema.optional(),
|
|
6912
|
+
search: DataCollectionSearchSpecSchema.optional(),
|
|
6913
|
+
match: DataCollectionMatchSpecSchema.optional(),
|
|
6914
|
+
findById: DataCollectionFindByIdSpecSchema.optional(),
|
|
6915
|
+
create: DataCollectionCreateSpecSchema.optional(),
|
|
6916
|
+
update: DataCollectionUpdateSpecSchema.optional(),
|
|
6917
|
+
delete: DataCollectionDeleteSpecSchema.optional(),
|
|
6918
|
+
events: DataCollectionEventsSpecSchema.optional(),
|
|
6919
|
+
customFields: zod.z.boolean().optional(),
|
|
6920
|
+
udm: DataCollectionUdmsSpecSchema.optional(),
|
|
6921
|
+
find: DataCollectionFindSpecSchema.optional(),
|
|
6922
|
+
});
|
|
6864
6923
|
const ConnectorDataLocationTypes = {
|
|
6865
6924
|
collection: DataLocationTypeCollection,
|
|
6866
|
-
directory: DataLocationTypeDirectory,
|
|
6867
6925
|
};
|
|
6868
6926
|
|
|
6869
6927
|
function getDataLocationMethodPath(locationKey, methodKey) {
|
|
@@ -9252,7 +9310,7 @@ var ConnectionType;
|
|
|
9252
9310
|
ConnectionType["REDIRECT"] = "redirect";
|
|
9253
9311
|
})(ConnectionType || (ConnectionType = {}));
|
|
9254
9312
|
async function createOrUpdateConnection(options) {
|
|
9255
|
-
const { connectionId, integrationId, name, parameters, allowMultipleConnections, authOptionKey, connectorSpec, apiUri, token, redirectUri, } = options !== null && options !== void 0 ? options : {};
|
|
9313
|
+
const { connectionId, integrationId, name, parameters, connectorParameters, allowMultipleConnections, authOptionKey, connectorSpec, apiUri, token, redirectUri, } = options !== null && options !== void 0 ? options : {};
|
|
9256
9314
|
const connectionType = getConnectionType({
|
|
9257
9315
|
connectorSpec,
|
|
9258
9316
|
authOptionKey,
|
|
@@ -9266,6 +9324,7 @@ async function createOrUpdateConnection(options) {
|
|
|
9266
9324
|
const payload = {
|
|
9267
9325
|
token,
|
|
9268
9326
|
connectionParameters: parameters,
|
|
9327
|
+
connectorParameters,
|
|
9269
9328
|
name,
|
|
9270
9329
|
authOptionKey,
|
|
9271
9330
|
allowMultipleConnections,
|
|
@@ -9556,6 +9615,49 @@ exports.FlowNodeRunStatus = void 0;
|
|
|
9556
9615
|
FlowNodeRunStatus["FAILED"] = "failed";
|
|
9557
9616
|
FlowNodeRunStatus["SKIPPED"] = "skipped";
|
|
9558
9617
|
})(exports.FlowNodeRunStatus || (exports.FlowNodeRunStatus = {}));
|
|
9618
|
+
const UpstreamFlowNodeRunSchema = zod.z.object({
|
|
9619
|
+
nodeKey: zod.z.string(),
|
|
9620
|
+
runId: zod.z.string(),
|
|
9621
|
+
outputId: zod.z.string(),
|
|
9622
|
+
});
|
|
9623
|
+
const DownstreamFlowNodeRunSchema = zod.z.object({
|
|
9624
|
+
runId: zod.z.string(),
|
|
9625
|
+
nodeKey: zod.z.string(),
|
|
9626
|
+
});
|
|
9627
|
+
const FlowNodeRunParametersSchema = zod.z.object({
|
|
9628
|
+
id: zod.z.string(),
|
|
9629
|
+
upstreamRuns: zod.z.array(UpstreamFlowNodeRunSchema),
|
|
9630
|
+
input: zod.z.any(),
|
|
9631
|
+
});
|
|
9632
|
+
const FlowNodeRunOutputSchema = zod.z.object({
|
|
9633
|
+
id: zod.z.string(),
|
|
9634
|
+
data: zod.z.string(),
|
|
9635
|
+
downstreamRuns: zod.z.array(DownstreamFlowNodeRunSchema),
|
|
9636
|
+
});
|
|
9637
|
+
const FlowNodeRunResultSchema = zod.z.object({
|
|
9638
|
+
status: zod.z.nativeEnum(exports.FlowNodeRunStatus),
|
|
9639
|
+
logs: zod.z.array(zod.z.any()),
|
|
9640
|
+
outputs: zod.z.array(FlowNodeRunOutputSchema),
|
|
9641
|
+
errors: zod.z.array(ErrorDataSchema),
|
|
9642
|
+
});
|
|
9643
|
+
const FlowNodeRunRecordSchema = FlowNodeRunParametersSchema.merge(FlowNodeRunResultSchema);
|
|
9644
|
+
const FlowNodeRunOutputWithoutDownstreamRunsSchema = zod.z.object({
|
|
9645
|
+
id: zod.z.string(),
|
|
9646
|
+
data: zod.z.string(),
|
|
9647
|
+
});
|
|
9648
|
+
const FlowNodeRunOutputMetadataSchema = zod.z.object({
|
|
9649
|
+
id: zod.z.string(),
|
|
9650
|
+
downstreamRuns: zod.z.array(DownstreamFlowNodeRunSchema),
|
|
9651
|
+
});
|
|
9652
|
+
const FlowNodeRunRecordWithoutOutputsDataSchema = zod.z.object({
|
|
9653
|
+
id: zod.z.string(),
|
|
9654
|
+
upstreamRuns: zod.z.array(UpstreamFlowNodeRunSchema),
|
|
9655
|
+
input: zod.z.any(),
|
|
9656
|
+
status: zod.z.nativeEnum(exports.FlowNodeRunStatus),
|
|
9657
|
+
logs: zod.z.array(zod.z.any()),
|
|
9658
|
+
outputs: zod.z.array(FlowNodeRunOutputMetadataSchema),
|
|
9659
|
+
errors: zod.z.array(ErrorDataSchema),
|
|
9660
|
+
});
|
|
9559
9661
|
|
|
9560
9662
|
class FlowRunsAccessor {
|
|
9561
9663
|
constructor(client) {
|
|
@@ -10316,10 +10418,7 @@ class ConnectionAccessor {
|
|
|
10316
10418
|
dataCollection(key, parameters) {
|
|
10317
10419
|
return new ConnectionDataCollectionAccessor(this.client, this, key, parameters);
|
|
10318
10420
|
}
|
|
10319
|
-
|
|
10320
|
-
return new ConnectionDataDirectoryAccessor(this.client, this, key, parameters);
|
|
10321
|
-
}
|
|
10322
|
-
async reconnect({ parameters, authOptionKey, } = {}) {
|
|
10421
|
+
async reconnect({ parameters, authOptionKey, connectorParameters, } = {}) {
|
|
10323
10422
|
const connection = await this.get();
|
|
10324
10423
|
const connectorSpec = await this.client.get(`/integrations/${connection.integrationId}/connector-spec`);
|
|
10325
10424
|
return createOrUpdateConnection({
|
|
@@ -10327,6 +10426,7 @@ class ConnectionAccessor {
|
|
|
10327
10426
|
connectorSpec,
|
|
10328
10427
|
parameters,
|
|
10329
10428
|
authOptionKey,
|
|
10429
|
+
connectorParameters,
|
|
10330
10430
|
apiUri: this.client.apiUri,
|
|
10331
10431
|
token: await this.client.getToken(),
|
|
10332
10432
|
});
|
|
@@ -10361,17 +10461,6 @@ class ConnectionOperationAccessor {
|
|
|
10361
10461
|
return this.client.post(this.connectionAccessor.getPath(`operations/${this.key}/run`), request);
|
|
10362
10462
|
}
|
|
10363
10463
|
}
|
|
10364
|
-
class ConnectionDataDirectoryAccessor {
|
|
10365
|
-
constructor(client, connectionAccessor, key, parameters) {
|
|
10366
|
-
this.client = client;
|
|
10367
|
-
this.connectionAccessor = connectionAccessor;
|
|
10368
|
-
this.key = key;
|
|
10369
|
-
this.parameters = parameters;
|
|
10370
|
-
}
|
|
10371
|
-
async list(request) {
|
|
10372
|
-
return this.client.post(this.connectionAccessor.getPath(`data/${this.key}/list`, this.parameters), request);
|
|
10373
|
-
}
|
|
10374
|
-
}
|
|
10375
10464
|
class ConnectionDataCollectionAccessor {
|
|
10376
10465
|
constructor(client, connectionAccessor, key, parameters) {
|
|
10377
10466
|
this.client = client;
|
|
@@ -10922,10 +11011,11 @@ class IntegrationAccessor extends ElementAccessor {
|
|
|
10922
11011
|
onClose,
|
|
10923
11012
|
});
|
|
10924
11013
|
}
|
|
10925
|
-
async openNewConnection({ allowMultipleConnections, name } = {}) {
|
|
11014
|
+
async openNewConnection({ allowMultipleConnections, name, connectorParameters, } = {}) {
|
|
10926
11015
|
const uri = await this.client.getEmbedUri(`integrations/${this.integrationSelector}/connect`, {
|
|
10927
11016
|
allowMultipleConnections: allowMultipleConnections ? '1' : '',
|
|
10928
11017
|
name,
|
|
11018
|
+
connectorParameters: connectorParameters ? JSON.stringify(connectorParameters) : undefined,
|
|
10929
11019
|
});
|
|
10930
11020
|
return new Promise((resolve) => {
|
|
10931
11021
|
return openIframe(uri, {
|
|
@@ -10934,7 +11024,7 @@ class IntegrationAccessor extends ElementAccessor {
|
|
|
10934
11024
|
});
|
|
10935
11025
|
});
|
|
10936
11026
|
}
|
|
10937
|
-
async connect({ name, parameters, authOptionKey, allowMultipleConnections, redirectUri, sameWindow, } = {}) {
|
|
11027
|
+
async connect({ name, parameters, connectorParameters, authOptionKey, allowMultipleConnections, redirectUri, sameWindow, } = {}) {
|
|
10938
11028
|
const integration = await this.get();
|
|
10939
11029
|
const connectorSpec = await this.getConnectorSpec();
|
|
10940
11030
|
return createOrUpdateConnection({
|
|
@@ -10942,6 +11032,7 @@ class IntegrationAccessor extends ElementAccessor {
|
|
|
10942
11032
|
connectorSpec,
|
|
10943
11033
|
name,
|
|
10944
11034
|
parameters,
|
|
11035
|
+
connectorParameters,
|
|
10945
11036
|
authOptionKey,
|
|
10946
11037
|
allowMultipleConnections,
|
|
10947
11038
|
apiUri: this.client.apiUri,
|
|
@@ -10967,12 +11058,6 @@ class IntegrationAccessor extends ElementAccessor {
|
|
|
10967
11058
|
async getDataCollection(key) {
|
|
10968
11059
|
return this.client.get(this.getPath(`data/${key}`));
|
|
10969
11060
|
}
|
|
10970
|
-
async getDataLocations() {
|
|
10971
|
-
return this.client.get(this.getPath('data'));
|
|
10972
|
-
}
|
|
10973
|
-
async getDataLocation(key) {
|
|
10974
|
-
return this.client.get(this.getPath(`data/${key}`));
|
|
10975
|
-
}
|
|
10976
11061
|
}
|
|
10977
11062
|
|
|
10978
11063
|
class ScreensAccessor extends ElementListAccessor {
|
|
@@ -11557,6 +11642,7 @@ exports.ActionInstanceSetupError = ActionInstanceSetupError;
|
|
|
11557
11642
|
exports.ActionInstancesAccessor = ActionInstancesAccessor;
|
|
11558
11643
|
exports.ActionRunError = ActionRunError;
|
|
11559
11644
|
exports.ActionsAccessor = ActionsAccessor;
|
|
11645
|
+
exports.ApiRequestSpecSchema = ApiRequestSpecSchema;
|
|
11560
11646
|
exports.AppDataSchemaAccessor = AppDataSchemaAccessor;
|
|
11561
11647
|
exports.AppDataSchemaInstanceAccessor = AppDataSchemaInstanceAccessor;
|
|
11562
11648
|
exports.AppDataSchemaInstancesAccessor = AppDataSchemaInstancesAccessor;
|
|
@@ -11580,7 +11666,6 @@ exports.ConfigurationError = ConfigurationError;
|
|
|
11580
11666
|
exports.Connection = Connection;
|
|
11581
11667
|
exports.ConnectionAccessor = ConnectionAccessor;
|
|
11582
11668
|
exports.ConnectionDataCollectionAccessor = ConnectionDataCollectionAccessor;
|
|
11583
|
-
exports.ConnectionDataDirectoryAccessor = ConnectionDataDirectoryAccessor;
|
|
11584
11669
|
exports.ConnectionError = ConnectionError;
|
|
11585
11670
|
exports.ConnectionLevelActionAccessor = ConnectionLevelActionAccessor;
|
|
11586
11671
|
exports.ConnectionLevelActionsAccessor = ConnectionLevelActionsAccessor;
|
|
@@ -11597,7 +11682,6 @@ exports.ConnectionsAccessor = ConnectionsAccessor;
|
|
|
11597
11682
|
exports.ConnectorAuthMethodTypes = ConnectorAuthMethodTypes;
|
|
11598
11683
|
exports.ConnectorDataCollectionEventImplementationType = ConnectorDataCollectionEventImplementationType;
|
|
11599
11684
|
exports.ConnectorDataCollectionMethodKeys = ConnectorDataCollectionMethodKeys;
|
|
11600
|
-
exports.ConnectorDataDirectoryMethodKeys = ConnectorDataDirectoryMethodKeys;
|
|
11601
11685
|
exports.ConnectorDataLocationTypes = ConnectorDataLocationTypes;
|
|
11602
11686
|
exports.ConnectorEventHandlerMethods = ConnectorEventHandlerMethods;
|
|
11603
11687
|
exports.ConnectorOperationMethodImplementationTypes = ConnectorOperationMethodImplementationTypes;
|
|
@@ -11609,6 +11693,20 @@ exports.CustomersAccessor = CustomersAccessor;
|
|
|
11609
11693
|
exports.DATA_RECORD_SCHEMA = DATA_RECORD_SCHEMA;
|
|
11610
11694
|
exports.DEFAULT_FULL_SYNC_INTERVAL_SECONDS = DEFAULT_FULL_SYNC_INTERVAL_SECONDS;
|
|
11611
11695
|
exports.DEFAULT_PULL_UPDATES_INTERVAL_SECONDS = DEFAULT_PULL_UPDATES_INTERVAL_SECONDS;
|
|
11696
|
+
exports.DataCollectionCreateSpecSchema = DataCollectionCreateSpecSchema;
|
|
11697
|
+
exports.DataCollectionDeleteSpecSchema = DataCollectionDeleteSpecSchema;
|
|
11698
|
+
exports.DataCollectionEventTypeSpecSchema = DataCollectionEventTypeSpecSchema;
|
|
11699
|
+
exports.DataCollectionEventsSpecSchema = DataCollectionEventsSpecSchema;
|
|
11700
|
+
exports.DataCollectionFindByIdSpecSchema = DataCollectionFindByIdSpecSchema;
|
|
11701
|
+
exports.DataCollectionFindSpecSchema = DataCollectionFindSpecSchema;
|
|
11702
|
+
exports.DataCollectionListSpecSchema = DataCollectionListSpecSchema;
|
|
11703
|
+
exports.DataCollectionMatchSpecSchema = DataCollectionMatchSpecSchema;
|
|
11704
|
+
exports.DataCollectionMethodSpecSchema = DataCollectionMethodSpecSchema;
|
|
11705
|
+
exports.DataCollectionSearchSpecSchema = DataCollectionSearchSpecSchema;
|
|
11706
|
+
exports.DataCollectionSpecSchema = DataCollectionSpecSchema;
|
|
11707
|
+
exports.DataCollectionUdmSpecSchema = DataCollectionUdmSpecSchema;
|
|
11708
|
+
exports.DataCollectionUdmsSpecSchema = DataCollectionUdmsSpecSchema;
|
|
11709
|
+
exports.DataCollectionUpdateSpecSchema = DataCollectionUpdateSpecSchema;
|
|
11612
11710
|
exports.DataField = DataField;
|
|
11613
11711
|
exports.DataFilterCondition = DataFilterCondition;
|
|
11614
11712
|
exports.DataForm = DataForm;
|
|
@@ -11618,21 +11716,23 @@ exports.DataLinkTableInstancesAccessor = DataLinkTableInstancesAccessor;
|
|
|
11618
11716
|
exports.DataLinkTablesAccessor = DataLinkTablesAccessor;
|
|
11619
11717
|
exports.DataLocationMethodImplementationTypes = DataLocationMethodImplementationTypes;
|
|
11620
11718
|
exports.DataLocationTypeCollection = DataLocationTypeCollection;
|
|
11621
|
-
exports.DataLocationTypeDirectory = DataLocationTypeDirectory;
|
|
11622
11719
|
exports.DataLocatorStep = DataLocatorStep;
|
|
11623
11720
|
exports.DataLocatorStepArrayItem = DataLocatorStepArrayItem;
|
|
11624
11721
|
exports.DataLocatorStepObjectProperty = DataLocatorStepObjectProperty;
|
|
11722
|
+
exports.DataSchemaSchema = DataSchemaSchema;
|
|
11625
11723
|
exports.DataSourceAccessor = DataSourceAccessor;
|
|
11626
11724
|
exports.DataSourceInstanceAccessor = DataSourceInstanceAccessor;
|
|
11627
11725
|
exports.DataSourceInstancesAccessor = DataSourceInstancesAccessor;
|
|
11628
11726
|
exports.DataSourcesAccessor = DataSourcesAccessor;
|
|
11629
11727
|
exports.DependencyError = DependencyError;
|
|
11728
|
+
exports.DownstreamFlowNodeRunSchema = DownstreamFlowNodeRunSchema;
|
|
11630
11729
|
exports.EDITABLE_LIMITS = EDITABLE_LIMITS;
|
|
11631
11730
|
exports.ElementAccessor = ElementAccessor;
|
|
11632
11731
|
exports.ElementInstanceAccessor = ElementInstanceAccessor;
|
|
11633
11732
|
exports.ElementInstanceListAccessor = ElementInstanceListAccessor;
|
|
11634
11733
|
exports.ElementListAccessor = ElementListAccessor;
|
|
11635
11734
|
exports.ErrorData = ErrorData;
|
|
11735
|
+
exports.ErrorDataSchema = ErrorDataSchema;
|
|
11636
11736
|
exports.ExternalEventSubscriptionAccessor = ExternalEventSubscriptionAccessor;
|
|
11637
11737
|
exports.ExternalEventSubscriptionsAccessor = ExternalEventSubscriptionsAccessor;
|
|
11638
11738
|
exports.FLOW_NODE_SPECS = FLOW_NODE_SPECS;
|
|
@@ -11645,6 +11745,13 @@ exports.FlowAccessor = FlowAccessor;
|
|
|
11645
11745
|
exports.FlowInstanceAccessor = FlowInstanceAccessor;
|
|
11646
11746
|
exports.FlowInstanceSetupError = FlowInstanceSetupError;
|
|
11647
11747
|
exports.FlowInstancesAccessor = FlowInstancesAccessor;
|
|
11748
|
+
exports.FlowNodeRunOutputMetadataSchema = FlowNodeRunOutputMetadataSchema;
|
|
11749
|
+
exports.FlowNodeRunOutputSchema = FlowNodeRunOutputSchema;
|
|
11750
|
+
exports.FlowNodeRunOutputWithoutDownstreamRunsSchema = FlowNodeRunOutputWithoutDownstreamRunsSchema;
|
|
11751
|
+
exports.FlowNodeRunParametersSchema = FlowNodeRunParametersSchema;
|
|
11752
|
+
exports.FlowNodeRunRecordSchema = FlowNodeRunRecordSchema;
|
|
11753
|
+
exports.FlowNodeRunRecordWithoutOutputsDataSchema = FlowNodeRunRecordWithoutOutputsDataSchema;
|
|
11754
|
+
exports.FlowNodeRunResultSchema = FlowNodeRunResultSchema;
|
|
11648
11755
|
exports.FlowNodeSpec = FlowNodeSpec;
|
|
11649
11756
|
exports.FlowRunAccessor = FlowRunAccessor;
|
|
11650
11757
|
exports.FlowRunError = FlowRunError;
|
|
@@ -11685,6 +11792,7 @@ exports.SelfAccessor = SelfAccessor;
|
|
|
11685
11792
|
exports.UNIFIED_DATA_MODELS = UNIFIED_DATA_MODELS;
|
|
11686
11793
|
exports.UnitRunError = UnitRunError;
|
|
11687
11794
|
exports.UpdateConnectionRequest = UpdateConnectionRequest;
|
|
11795
|
+
exports.UpstreamFlowNodeRunSchema = UpstreamFlowNodeRunSchema;
|
|
11688
11796
|
exports.WORKSPACE_SIZE_LIMITS = WORKSPACE_SIZE_LIMITS;
|
|
11689
11797
|
exports.WorkspaceElementSpecs = WorkspaceElementSpecs;
|
|
11690
11798
|
exports.addRequiredFieldsToSchema = addRequiredFieldsToSchema;
|