@membranehq/sdk 0.2.1 → 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 +724 -223
- package/dist/bundle.js +166 -47
- package/dist/bundle.js.map +1 -1
- package/dist/dts/api-client.d.ts +5 -5
- package/dist/dts/connections/accessors.d.ts +1 -10
- 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/integrations/accessors.d.ts +3 -5
- package/dist/index.d.ts +1708 -354
- package/dist/index.js +191 -87
- package/dist/index.js.map +1 -1
- package/dist/index.module.d.mts +1708 -354
- package/dist/index.module.mjs +166 -85
- 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
|
|
|
@@ -24880,6 +24976,49 @@
|
|
|
24880
24976
|
FlowNodeRunStatus["FAILED"] = "failed";
|
|
24881
24977
|
FlowNodeRunStatus["SKIPPED"] = "skipped";
|
|
24882
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
|
+
});
|
|
24883
25022
|
|
|
24884
25023
|
class FlowRunsAccessor {
|
|
24885
25024
|
constructor(client) {
|
|
@@ -25507,9 +25646,6 @@
|
|
|
25507
25646
|
dataCollection(key, parameters) {
|
|
25508
25647
|
return new ConnectionDataCollectionAccessor(this.client, this, key, parameters);
|
|
25509
25648
|
}
|
|
25510
|
-
dataDirectory(key, parameters) {
|
|
25511
|
-
return new ConnectionDataDirectoryAccessor(this.client, this, key, parameters);
|
|
25512
|
-
}
|
|
25513
25649
|
async reconnect({ parameters, authOptionKey, connectorParameters, } = {}) {
|
|
25514
25650
|
const connection = await this.get();
|
|
25515
25651
|
const connectorSpec = await this.client.get(`/integrations/${connection.integrationId}/connector-spec`);
|
|
@@ -25553,17 +25689,6 @@
|
|
|
25553
25689
|
return this.client.post(this.connectionAccessor.getPath(`operations/${this.key}/run`), request);
|
|
25554
25690
|
}
|
|
25555
25691
|
}
|
|
25556
|
-
class ConnectionDataDirectoryAccessor {
|
|
25557
|
-
constructor(client, connectionAccessor, key, parameters) {
|
|
25558
|
-
this.client = client;
|
|
25559
|
-
this.connectionAccessor = connectionAccessor;
|
|
25560
|
-
this.key = key;
|
|
25561
|
-
this.parameters = parameters;
|
|
25562
|
-
}
|
|
25563
|
-
async list(request) {
|
|
25564
|
-
return this.client.post(this.connectionAccessor.getPath(`data/${this.key}/list`, this.parameters), request);
|
|
25565
|
-
}
|
|
25566
|
-
}
|
|
25567
25692
|
class ConnectionDataCollectionAccessor {
|
|
25568
25693
|
constructor(client, connectionAccessor, key, parameters) {
|
|
25569
25694
|
this.client = client;
|
|
@@ -25838,12 +25963,6 @@
|
|
|
25838
25963
|
async getDataCollection(key) {
|
|
25839
25964
|
return this.client.get(this.getPath(`data/${key}`));
|
|
25840
25965
|
}
|
|
25841
|
-
async getDataLocations() {
|
|
25842
|
-
return this.client.get(this.getPath('data'));
|
|
25843
|
-
}
|
|
25844
|
-
async getDataLocation(key) {
|
|
25845
|
-
return this.client.get(this.getPath(`data/${key}`));
|
|
25846
|
-
}
|
|
25847
25966
|
}
|
|
25848
25967
|
|
|
25849
25968
|
var ScenarioTemplateCategory;
|