@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/bundle.js
CHANGED
|
@@ -9770,14 +9770,18 @@
|
|
|
9770
9770
|
const numberType = ZodNumber.create;
|
|
9771
9771
|
const booleanType = ZodBoolean.create;
|
|
9772
9772
|
const anyType = ZodAny.create;
|
|
9773
|
+
const unknownType = ZodUnknown.create;
|
|
9773
9774
|
ZodNever.create;
|
|
9774
9775
|
const arrayType = ZodArray.create;
|
|
9775
9776
|
const objectType = ZodObject.create;
|
|
9776
|
-
ZodUnion.create;
|
|
9777
|
+
const unionType = ZodUnion.create;
|
|
9777
9778
|
ZodIntersection.create;
|
|
9778
9779
|
ZodTuple.create;
|
|
9779
9780
|
const recordType = ZodRecord.create;
|
|
9781
|
+
const lazyType = ZodLazy.create;
|
|
9782
|
+
const literalType = ZodLiteral.create;
|
|
9780
9783
|
const enumType = ZodEnum.create;
|
|
9784
|
+
const nativeEnumType = ZodNativeEnum.create;
|
|
9781
9785
|
ZodPromise.create;
|
|
9782
9786
|
ZodOptional.create;
|
|
9783
9787
|
ZodNullable.create;
|
|
@@ -10808,7 +10812,7 @@
|
|
|
10808
10812
|
});
|
|
10809
10813
|
}
|
|
10810
10814
|
else {
|
|
10811
|
-
throw Error('
|
|
10815
|
+
throw Error('Membrane container element not found. Was it manually removed?');
|
|
10812
10816
|
}
|
|
10813
10817
|
}
|
|
10814
10818
|
if (document.readyState === 'complete' || document.readyState === 'interactive') {
|
|
@@ -11234,6 +11238,15 @@
|
|
|
11234
11238
|
}
|
|
11235
11239
|
}
|
|
11236
11240
|
|
|
11241
|
+
var ErrorDoc;
|
|
11242
|
+
(function (ErrorDoc) {
|
|
11243
|
+
ErrorDoc["AuthenticationTokenErrors"] = "authentication-token-errors";
|
|
11244
|
+
ErrorDoc["DataSourceNoCollectionSelected"] = "data-source-no-collection-selected";
|
|
11245
|
+
ErrorDoc["FlowInstanceSetupFailed"] = "flow-instance-setup-failed";
|
|
11246
|
+
ErrorDoc["FlowInstanceSetupTimeout"] = "flow-instance-setup-timeout";
|
|
11247
|
+
ErrorDoc["WebhookCannotFindUser"] = "webhook-cannot-find-user";
|
|
11248
|
+
})(ErrorDoc || (ErrorDoc = {}));
|
|
11249
|
+
|
|
11237
11250
|
var LogRecordType;
|
|
11238
11251
|
(function (LogRecordType) {
|
|
11239
11252
|
LogRecordType["MSG"] = "message";
|
|
@@ -11244,15 +11257,6 @@
|
|
|
11244
11257
|
LogRecordType["API"] = "api-request";
|
|
11245
11258
|
})(LogRecordType || (LogRecordType = {}));
|
|
11246
11259
|
|
|
11247
|
-
var ErrorDoc;
|
|
11248
|
-
(function (ErrorDoc) {
|
|
11249
|
-
ErrorDoc["AuthenticationTokenErrors"] = "authentication-token-errors";
|
|
11250
|
-
ErrorDoc["DataSourceNoCollectionSelected"] = "data-source-no-collection-selected";
|
|
11251
|
-
ErrorDoc["FlowInstanceSetupFailed"] = "flow-instance-setup-failed";
|
|
11252
|
-
ErrorDoc["FlowInstanceSetupTimeout"] = "flow-instance-setup-timeout";
|
|
11253
|
-
ErrorDoc["WebhookCannotFindUser"] = "webhook-cannot-find-user";
|
|
11254
|
-
})(ErrorDoc || (ErrorDoc = {}));
|
|
11255
|
-
|
|
11256
11260
|
var ErrorType;
|
|
11257
11261
|
(function (ErrorType) {
|
|
11258
11262
|
ErrorType["BAD_REQUEST"] = "bad_request";
|
|
@@ -11286,6 +11290,16 @@
|
|
|
11286
11290
|
(function (ConcurrencyErrorKey) {
|
|
11287
11291
|
ConcurrencyErrorKey["LOCK_TIMEOUT"] = "lock_timeout";
|
|
11288
11292
|
})(ConcurrencyErrorKey || (ConcurrencyErrorKey = {}));
|
|
11293
|
+
const ErrorDataSchema = objectType({
|
|
11294
|
+
type: nativeEnumType(ErrorType).optional(),
|
|
11295
|
+
key: stringType().optional(),
|
|
11296
|
+
message: stringType(),
|
|
11297
|
+
data: anyType().optional(),
|
|
11298
|
+
doc: nativeEnumType(ErrorDoc).optional(),
|
|
11299
|
+
stack: anyType().optional(),
|
|
11300
|
+
causedByError: lazyType(() => ErrorDataSchema).optional(),
|
|
11301
|
+
logs: arrayType(anyType()).optional(),
|
|
11302
|
+
});
|
|
11289
11303
|
class ErrorData {
|
|
11290
11304
|
constructor(arg) {
|
|
11291
11305
|
if (arg instanceof Error) {
|
|
@@ -12194,6 +12208,41 @@
|
|
|
12194
12208
|
DataLocatorStepType["ARRAY_ITEM"] = "array_item";
|
|
12195
12209
|
})(DataLocatorStepType || (DataLocatorStepType = {}));
|
|
12196
12210
|
|
|
12211
|
+
const DataSchemaSchema = lazyType(() => objectType({
|
|
12212
|
+
title: stringType().optional(),
|
|
12213
|
+
description: stringType().optional(),
|
|
12214
|
+
type: unionType([stringType(), arrayType(stringType())]).optional(),
|
|
12215
|
+
format: stringType().optional(),
|
|
12216
|
+
properties: recordType(DataSchemaSchema).optional(),
|
|
12217
|
+
items: DataSchemaSchema.optional(),
|
|
12218
|
+
additionalProperties: unionType([booleanType(), DataSchemaSchema]).optional(),
|
|
12219
|
+
enum: arrayType(stringType()).optional(),
|
|
12220
|
+
referenceRecords: arrayType(anyType()).optional(),
|
|
12221
|
+
referenceCollection: objectType({
|
|
12222
|
+
key: anyType(),
|
|
12223
|
+
parameters: recordType(anyType()).optional(),
|
|
12224
|
+
})
|
|
12225
|
+
.optional(),
|
|
12226
|
+
referenceUdm: stringType().optional(),
|
|
12227
|
+
default: anyType().optional(),
|
|
12228
|
+
allowCustom: booleanType().optional(),
|
|
12229
|
+
$ref: stringType().optional(),
|
|
12230
|
+
required: arrayType(stringType()).optional(),
|
|
12231
|
+
minLength: numberType().optional(),
|
|
12232
|
+
maxLength: numberType().optional(),
|
|
12233
|
+
minimum: numberType().optional(),
|
|
12234
|
+
maximum: numberType().optional(),
|
|
12235
|
+
maxItems: numberType().optional(),
|
|
12236
|
+
readOnly: booleanType().optional(),
|
|
12237
|
+
writeOnly: booleanType().optional(),
|
|
12238
|
+
examples: arrayType(anyType()).optional(),
|
|
12239
|
+
anyOf: arrayType(DataSchemaSchema).optional(),
|
|
12240
|
+
isImplied: booleanType().optional(),
|
|
12241
|
+
isSensitive: booleanType().optional(),
|
|
12242
|
+
referenceCollectionPath: stringType().optional(),
|
|
12243
|
+
referenceCollectionUri: stringType().optional(),
|
|
12244
|
+
}));
|
|
12245
|
+
|
|
12197
12246
|
var ConnectorMethodImplementationType;
|
|
12198
12247
|
(function (ConnectorMethodImplementationType) {
|
|
12199
12248
|
ConnectorMethodImplementationType["mapping"] = "mapping";
|
|
@@ -12483,7 +12532,7 @@
|
|
|
12483
12532
|
[UDM.TIMEOFF_REQUESTS]: udm$1,
|
|
12484
12533
|
});
|
|
12485
12534
|
|
|
12486
|
-
|
|
12535
|
+
[
|
|
12487
12536
|
ConnectorMethodImplementationType.operationMapping,
|
|
12488
12537
|
ConnectorMethodImplementationType.restApiMapping,
|
|
12489
12538
|
ConnectorMethodImplementationType.graphqlApiMapping,
|
|
@@ -12593,23 +12642,70 @@
|
|
|
12593
12642
|
],
|
|
12594
12643
|
});
|
|
12595
12644
|
|
|
12596
|
-
({
|
|
12597
|
-
|
|
12645
|
+
const ApiRequestSpecSchema = objectType({
|
|
12646
|
+
path: unknownType(),
|
|
12647
|
+
method: unknownType(),
|
|
12598
12648
|
});
|
|
12599
|
-
|
|
12600
|
-
|
|
12601
|
-
|
|
12649
|
+
const DataCollectionMethodSpecSchema = objectType({
|
|
12650
|
+
apiRequests: arrayType(ApiRequestSpecSchema).optional(),
|
|
12651
|
+
});
|
|
12652
|
+
const DataCollectionListSpecSchema = DataCollectionMethodSpecSchema.extend({
|
|
12653
|
+
filterFields: arrayType(stringType()).optional(),
|
|
12654
|
+
});
|
|
12655
|
+
const DataCollectionSearchSpecSchema = DataCollectionMethodSpecSchema.extend({});
|
|
12656
|
+
const DataCollectionMatchSpecSchema = DataCollectionMethodSpecSchema.extend({
|
|
12657
|
+
fields: arrayType(stringType()).optional(),
|
|
12658
|
+
});
|
|
12659
|
+
const DataCollectionFindByIdSpecSchema = DataCollectionMethodSpecSchema.extend({});
|
|
12660
|
+
const DataCollectionCreateSpecSchema = DataCollectionMethodSpecSchema.extend({
|
|
12661
|
+
fields: arrayType(stringType()).optional(),
|
|
12662
|
+
requiredFields: arrayType(stringType()).optional(),
|
|
12663
|
+
excludedFields: arrayType(stringType()).optional(),
|
|
12664
|
+
});
|
|
12665
|
+
const DataCollectionUpdateSpecSchema = DataCollectionMethodSpecSchema.extend({
|
|
12666
|
+
fields: arrayType(stringType()).optional(),
|
|
12667
|
+
excludedFields: arrayType(stringType()).optional(),
|
|
12668
|
+
});
|
|
12669
|
+
const DataCollectionDeleteSpecSchema = DataCollectionMethodSpecSchema.extend({});
|
|
12670
|
+
const DataCollectionFindSpecSchema = DataCollectionMethodSpecSchema.extend({
|
|
12671
|
+
queryFields: arrayType(stringType()).optional(),
|
|
12672
|
+
});
|
|
12673
|
+
const DataCollectionEventTypeSpecSchema = objectType({
|
|
12674
|
+
type: enumType(['push', 'pull']),
|
|
12675
|
+
isFullScan: booleanType().optional(),
|
|
12676
|
+
isIdOnly: booleanType().optional(),
|
|
12677
|
+
});
|
|
12678
|
+
const DataCollectionEventsSpecSchema = objectType({
|
|
12679
|
+
created: DataCollectionEventTypeSpecSchema.optional(),
|
|
12680
|
+
updated: DataCollectionEventTypeSpecSchema.optional(),
|
|
12681
|
+
deleted: DataCollectionEventTypeSpecSchema.optional(),
|
|
12682
|
+
all: DataCollectionEventTypeSpecSchema.optional(),
|
|
12683
|
+
})
|
|
12684
|
+
.catchall(DataCollectionEventTypeSpecSchema);
|
|
12685
|
+
const DataCollectionUdmSpecSchema = objectType({
|
|
12686
|
+
fields: arrayType(stringType()).optional(),
|
|
12687
|
+
extract: recordType(anyType()).optional(),
|
|
12688
|
+
parse: recordType(anyType()).optional(),
|
|
12689
|
+
});
|
|
12690
|
+
const DataCollectionUdmsSpecSchema = recordType(DataCollectionUdmSpecSchema);
|
|
12691
|
+
objectType({
|
|
12692
|
+
type: literalType('collection'),
|
|
12693
|
+
key: stringType().optional(),
|
|
12694
|
+
name: stringType(),
|
|
12695
|
+
parametersSchema: DataSchemaSchema.optional(),
|
|
12696
|
+
fieldsSchema: DataSchemaSchema.optional(),
|
|
12697
|
+
list: DataCollectionListSpecSchema.optional(),
|
|
12698
|
+
search: DataCollectionSearchSpecSchema.optional(),
|
|
12699
|
+
match: DataCollectionMatchSpecSchema.optional(),
|
|
12700
|
+
findById: DataCollectionFindByIdSpecSchema.optional(),
|
|
12701
|
+
create: DataCollectionCreateSpecSchema.optional(),
|
|
12702
|
+
update: DataCollectionUpdateSpecSchema.optional(),
|
|
12703
|
+
delete: DataCollectionDeleteSpecSchema.optional(),
|
|
12704
|
+
events: DataCollectionEventsSpecSchema.optional(),
|
|
12705
|
+
customFields: booleanType().optional(),
|
|
12706
|
+
udm: DataCollectionUdmsSpecSchema.optional(),
|
|
12707
|
+
find: DataCollectionFindSpecSchema.optional(),
|
|
12602
12708
|
});
|
|
12603
|
-
|
|
12604
|
-
var DataLocationType;
|
|
12605
|
-
(function (DataLocationType) {
|
|
12606
|
-
DataLocationType["directory"] = "directory";
|
|
12607
|
-
DataLocationType["collection"] = "collection";
|
|
12608
|
-
})(DataLocationType || (DataLocationType = {}));
|
|
12609
|
-
var DataDirectoryOperation;
|
|
12610
|
-
(function (DataDirectoryOperation) {
|
|
12611
|
-
DataDirectoryOperation["list"] = "list";
|
|
12612
|
-
})(DataDirectoryOperation || (DataDirectoryOperation = {}));
|
|
12613
12709
|
|
|
12614
12710
|
var urlJoin$1 = {exports: {}};
|
|
12615
12711
|
|
|
@@ -20606,7 +20702,7 @@
|
|
|
20606
20702
|
ActionRunLogStatus["ERROR"] = "error";
|
|
20607
20703
|
})(ActionRunLogStatus || (ActionRunLogStatus = {}));
|
|
20608
20704
|
|
|
20609
|
-
/*! Axios v1.
|
|
20705
|
+
/*! Axios v1.10.0 Copyright (c) 2025 Matt Zabriskie and contributors */
|
|
20610
20706
|
function bind(fn, thisArg) {
|
|
20611
20707
|
return function wrap() {
|
|
20612
20708
|
return fn.apply(thisArg, arguments);
|
|
@@ -20747,27 +20843,6 @@
|
|
|
20747
20843
|
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
|
|
20748
20844
|
};
|
|
20749
20845
|
|
|
20750
|
-
/**
|
|
20751
|
-
* Determine if a value is an empty object (safely handles Buffers)
|
|
20752
|
-
*
|
|
20753
|
-
* @param {*} val The value to test
|
|
20754
|
-
*
|
|
20755
|
-
* @returns {boolean} True if value is an empty object, otherwise false
|
|
20756
|
-
*/
|
|
20757
|
-
const isEmptyObject = (val) => {
|
|
20758
|
-
// Early return for non-objects or Buffers to prevent RangeError
|
|
20759
|
-
if (!isObject(val) || isBuffer(val)) {
|
|
20760
|
-
return false;
|
|
20761
|
-
}
|
|
20762
|
-
|
|
20763
|
-
try {
|
|
20764
|
-
return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
|
|
20765
|
-
} catch (e) {
|
|
20766
|
-
// Fallback for any other objects that might cause RangeError with Object.keys()
|
|
20767
|
-
return false;
|
|
20768
|
-
}
|
|
20769
|
-
};
|
|
20770
|
-
|
|
20771
20846
|
/**
|
|
20772
20847
|
* Determine if a value is a Date
|
|
20773
20848
|
*
|
|
@@ -20890,11 +20965,6 @@
|
|
|
20890
20965
|
fn.call(null, obj[i], i, obj);
|
|
20891
20966
|
}
|
|
20892
20967
|
} else {
|
|
20893
|
-
// Buffer check
|
|
20894
|
-
if (isBuffer(obj)) {
|
|
20895
|
-
return;
|
|
20896
|
-
}
|
|
20897
|
-
|
|
20898
20968
|
// Iterate over object keys
|
|
20899
20969
|
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
|
|
20900
20970
|
const len = keys.length;
|
|
@@ -20908,10 +20978,6 @@
|
|
|
20908
20978
|
}
|
|
20909
20979
|
|
|
20910
20980
|
function findKey(obj, key) {
|
|
20911
|
-
if (isBuffer(obj)){
|
|
20912
|
-
return null;
|
|
20913
|
-
}
|
|
20914
|
-
|
|
20915
20981
|
key = key.toLowerCase();
|
|
20916
20982
|
const keys = Object.keys(obj);
|
|
20917
20983
|
let i = keys.length;
|
|
@@ -21265,11 +21331,6 @@
|
|
|
21265
21331
|
return;
|
|
21266
21332
|
}
|
|
21267
21333
|
|
|
21268
|
-
//Buffer check
|
|
21269
|
-
if (isBuffer(source)) {
|
|
21270
|
-
return source;
|
|
21271
|
-
}
|
|
21272
|
-
|
|
21273
21334
|
if(!('toJSON' in source)) {
|
|
21274
21335
|
stack[i] = source;
|
|
21275
21336
|
const target = isArray(source) ? [] : {};
|
|
@@ -21341,7 +21402,6 @@
|
|
|
21341
21402
|
isBoolean,
|
|
21342
21403
|
isObject,
|
|
21343
21404
|
isPlainObject,
|
|
21344
|
-
isEmptyObject,
|
|
21345
21405
|
isReadableStream,
|
|
21346
21406
|
isRequest,
|
|
21347
21407
|
isResponse,
|
|
@@ -21973,7 +22033,7 @@
|
|
|
21973
22033
|
};
|
|
21974
22034
|
|
|
21975
22035
|
function toURLEncodedForm(data, options) {
|
|
21976
|
-
return toFormData$1(data, new platform.classes.URLSearchParams(), {
|
|
22036
|
+
return toFormData$1(data, new platform.classes.URLSearchParams(), Object.assign({
|
|
21977
22037
|
visitor: function(value, key, path, helpers) {
|
|
21978
22038
|
if (platform.isNode && utils$1.isBuffer(value)) {
|
|
21979
22039
|
this.append(key, value.toString('base64'));
|
|
@@ -21981,9 +22041,8 @@
|
|
|
21981
22041
|
}
|
|
21982
22042
|
|
|
21983
22043
|
return helpers.defaultVisitor.apply(this, arguments);
|
|
21984
|
-
}
|
|
21985
|
-
|
|
21986
|
-
});
|
|
22044
|
+
}
|
|
22045
|
+
}, options));
|
|
21987
22046
|
}
|
|
21988
22047
|
|
|
21989
22048
|
/**
|
|
@@ -22736,7 +22795,7 @@
|
|
|
22736
22795
|
clearTimeout(timer);
|
|
22737
22796
|
timer = null;
|
|
22738
22797
|
}
|
|
22739
|
-
fn(
|
|
22798
|
+
fn.apply(null, args);
|
|
22740
22799
|
};
|
|
22741
22800
|
|
|
22742
22801
|
const throttled = (...args) => {
|
|
@@ -22992,7 +23051,7 @@
|
|
|
22992
23051
|
headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
|
|
22993
23052
|
};
|
|
22994
23053
|
|
|
22995
|
-
utils$1.forEach(Object.keys({
|
|
23054
|
+
utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
|
22996
23055
|
const merge = mergeMap[prop] || mergeDeepProperties;
|
|
22997
23056
|
const configValue = merge(config1[prop], config2[prop], prop);
|
|
22998
23057
|
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
@@ -23733,7 +23792,7 @@
|
|
|
23733
23792
|
});
|
|
23734
23793
|
}
|
|
23735
23794
|
|
|
23736
|
-
const VERSION$1 = "1.
|
|
23795
|
+
const VERSION$1 = "1.10.0";
|
|
23737
23796
|
|
|
23738
23797
|
const validators$1 = {};
|
|
23739
23798
|
|
|
@@ -23972,8 +24031,8 @@
|
|
|
23972
24031
|
|
|
23973
24032
|
if (!synchronousRequestInterceptors) {
|
|
23974
24033
|
const chain = [dispatchRequest.bind(this), undefined];
|
|
23975
|
-
chain.unshift(
|
|
23976
|
-
chain.push(
|
|
24034
|
+
chain.unshift.apply(chain, requestInterceptorChain);
|
|
24035
|
+
chain.push.apply(chain, responseInterceptorChain);
|
|
23977
24036
|
len = chain.length;
|
|
23978
24037
|
|
|
23979
24038
|
promise = Promise.resolve(config);
|
|
@@ -24617,7 +24676,7 @@
|
|
|
24617
24676
|
ConnectionType["REDIRECT"] = "redirect";
|
|
24618
24677
|
})(ConnectionType || (ConnectionType = {}));
|
|
24619
24678
|
async function createOrUpdateConnection(options) {
|
|
24620
|
-
const { connectionId, integrationId, name, parameters, allowMultipleConnections, authOptionKey, connectorSpec, apiUri, token, redirectUri, } = options !== null && options !== void 0 ? options : {};
|
|
24679
|
+
const { connectionId, integrationId, name, parameters, connectorParameters, allowMultipleConnections, authOptionKey, connectorSpec, apiUri, token, redirectUri, } = options !== null && options !== void 0 ? options : {};
|
|
24621
24680
|
const connectionType = getConnectionType({
|
|
24622
24681
|
connectorSpec,
|
|
24623
24682
|
authOptionKey,
|
|
@@ -24631,6 +24690,7 @@
|
|
|
24631
24690
|
const payload = {
|
|
24632
24691
|
token,
|
|
24633
24692
|
connectionParameters: parameters,
|
|
24693
|
+
connectorParameters,
|
|
24634
24694
|
name,
|
|
24635
24695
|
authOptionKey,
|
|
24636
24696
|
allowMultipleConnections,
|
|
@@ -24916,6 +24976,49 @@
|
|
|
24916
24976
|
FlowNodeRunStatus["FAILED"] = "failed";
|
|
24917
24977
|
FlowNodeRunStatus["SKIPPED"] = "skipped";
|
|
24918
24978
|
})(FlowNodeRunStatus || (FlowNodeRunStatus = {}));
|
|
24979
|
+
const UpstreamFlowNodeRunSchema = objectType({
|
|
24980
|
+
nodeKey: stringType(),
|
|
24981
|
+
runId: stringType(),
|
|
24982
|
+
outputId: stringType(),
|
|
24983
|
+
});
|
|
24984
|
+
const DownstreamFlowNodeRunSchema = objectType({
|
|
24985
|
+
runId: stringType(),
|
|
24986
|
+
nodeKey: stringType(),
|
|
24987
|
+
});
|
|
24988
|
+
const FlowNodeRunParametersSchema = objectType({
|
|
24989
|
+
id: stringType(),
|
|
24990
|
+
upstreamRuns: arrayType(UpstreamFlowNodeRunSchema),
|
|
24991
|
+
input: anyType(),
|
|
24992
|
+
});
|
|
24993
|
+
const FlowNodeRunOutputSchema = objectType({
|
|
24994
|
+
id: stringType(),
|
|
24995
|
+
data: stringType(),
|
|
24996
|
+
downstreamRuns: arrayType(DownstreamFlowNodeRunSchema),
|
|
24997
|
+
});
|
|
24998
|
+
const FlowNodeRunResultSchema = objectType({
|
|
24999
|
+
status: nativeEnumType(FlowNodeRunStatus),
|
|
25000
|
+
logs: arrayType(anyType()),
|
|
25001
|
+
outputs: arrayType(FlowNodeRunOutputSchema),
|
|
25002
|
+
errors: arrayType(ErrorDataSchema),
|
|
25003
|
+
});
|
|
25004
|
+
FlowNodeRunParametersSchema.merge(FlowNodeRunResultSchema);
|
|
25005
|
+
objectType({
|
|
25006
|
+
id: stringType(),
|
|
25007
|
+
data: stringType(),
|
|
25008
|
+
});
|
|
25009
|
+
const FlowNodeRunOutputMetadataSchema = objectType({
|
|
25010
|
+
id: stringType(),
|
|
25011
|
+
downstreamRuns: arrayType(DownstreamFlowNodeRunSchema),
|
|
25012
|
+
});
|
|
25013
|
+
objectType({
|
|
25014
|
+
id: stringType(),
|
|
25015
|
+
upstreamRuns: arrayType(UpstreamFlowNodeRunSchema),
|
|
25016
|
+
input: anyType(),
|
|
25017
|
+
status: nativeEnumType(FlowNodeRunStatus),
|
|
25018
|
+
logs: arrayType(anyType()),
|
|
25019
|
+
outputs: arrayType(FlowNodeRunOutputMetadataSchema),
|
|
25020
|
+
errors: arrayType(ErrorDataSchema),
|
|
25021
|
+
});
|
|
24919
25022
|
|
|
24920
25023
|
class FlowRunsAccessor {
|
|
24921
25024
|
constructor(client) {
|
|
@@ -25543,10 +25646,7 @@
|
|
|
25543
25646
|
dataCollection(key, parameters) {
|
|
25544
25647
|
return new ConnectionDataCollectionAccessor(this.client, this, key, parameters);
|
|
25545
25648
|
}
|
|
25546
|
-
|
|
25547
|
-
return new ConnectionDataDirectoryAccessor(this.client, this, key, parameters);
|
|
25548
|
-
}
|
|
25549
|
-
async reconnect({ parameters, authOptionKey, } = {}) {
|
|
25649
|
+
async reconnect({ parameters, authOptionKey, connectorParameters, } = {}) {
|
|
25550
25650
|
const connection = await this.get();
|
|
25551
25651
|
const connectorSpec = await this.client.get(`/integrations/${connection.integrationId}/connector-spec`);
|
|
25552
25652
|
return createOrUpdateConnection({
|
|
@@ -25554,6 +25654,7 @@
|
|
|
25554
25654
|
connectorSpec,
|
|
25555
25655
|
parameters,
|
|
25556
25656
|
authOptionKey,
|
|
25657
|
+
connectorParameters,
|
|
25557
25658
|
apiUri: this.client.apiUri,
|
|
25558
25659
|
token: await this.client.getToken(),
|
|
25559
25660
|
});
|
|
@@ -25588,17 +25689,6 @@
|
|
|
25588
25689
|
return this.client.post(this.connectionAccessor.getPath(`operations/${this.key}/run`), request);
|
|
25589
25690
|
}
|
|
25590
25691
|
}
|
|
25591
|
-
class ConnectionDataDirectoryAccessor {
|
|
25592
|
-
constructor(client, connectionAccessor, key, parameters) {
|
|
25593
|
-
this.client = client;
|
|
25594
|
-
this.connectionAccessor = connectionAccessor;
|
|
25595
|
-
this.key = key;
|
|
25596
|
-
this.parameters = parameters;
|
|
25597
|
-
}
|
|
25598
|
-
async list(request) {
|
|
25599
|
-
return this.client.post(this.connectionAccessor.getPath(`data/${this.key}/list`, this.parameters), request);
|
|
25600
|
-
}
|
|
25601
|
-
}
|
|
25602
25692
|
class ConnectionDataCollectionAccessor {
|
|
25603
25693
|
constructor(client, connectionAccessor, key, parameters) {
|
|
25604
25694
|
this.client = client;
|
|
@@ -25826,10 +25916,11 @@
|
|
|
25826
25916
|
onClose,
|
|
25827
25917
|
});
|
|
25828
25918
|
}
|
|
25829
|
-
async openNewConnection({ allowMultipleConnections, name } = {}) {
|
|
25919
|
+
async openNewConnection({ allowMultipleConnections, name, connectorParameters, } = {}) {
|
|
25830
25920
|
const uri = await this.client.getEmbedUri(`integrations/${this.integrationSelector}/connect`, {
|
|
25831
25921
|
allowMultipleConnections: allowMultipleConnections ? '1' : '',
|
|
25832
25922
|
name,
|
|
25923
|
+
connectorParameters: connectorParameters ? JSON.stringify(connectorParameters) : undefined,
|
|
25833
25924
|
});
|
|
25834
25925
|
return new Promise((resolve) => {
|
|
25835
25926
|
return openIframe(uri, {
|
|
@@ -25838,7 +25929,7 @@
|
|
|
25838
25929
|
});
|
|
25839
25930
|
});
|
|
25840
25931
|
}
|
|
25841
|
-
async connect({ name, parameters, authOptionKey, allowMultipleConnections, redirectUri, sameWindow, } = {}) {
|
|
25932
|
+
async connect({ name, parameters, connectorParameters, authOptionKey, allowMultipleConnections, redirectUri, sameWindow, } = {}) {
|
|
25842
25933
|
const integration = await this.get();
|
|
25843
25934
|
const connectorSpec = await this.getConnectorSpec();
|
|
25844
25935
|
return createOrUpdateConnection({
|
|
@@ -25846,6 +25937,7 @@
|
|
|
25846
25937
|
connectorSpec,
|
|
25847
25938
|
name,
|
|
25848
25939
|
parameters,
|
|
25940
|
+
connectorParameters,
|
|
25849
25941
|
authOptionKey,
|
|
25850
25942
|
allowMultipleConnections,
|
|
25851
25943
|
apiUri: this.client.apiUri,
|
|
@@ -25871,12 +25963,6 @@
|
|
|
25871
25963
|
async getDataCollection(key) {
|
|
25872
25964
|
return this.client.get(this.getPath(`data/${key}`));
|
|
25873
25965
|
}
|
|
25874
|
-
async getDataLocations() {
|
|
25875
|
-
return this.client.get(this.getPath('data'));
|
|
25876
|
-
}
|
|
25877
|
-
async getDataLocation(key) {
|
|
25878
|
-
return this.client.get(this.getPath(`data/${key}`));
|
|
25879
|
-
}
|
|
25880
25966
|
}
|
|
25881
25967
|
|
|
25882
25968
|
var ScenarioTemplateCategory;
|