@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/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@membranehq/sdk",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "JavaScript SDK for
|
|
5
|
-
"author": "Integration
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "JavaScript SDK for Membrane",
|
|
5
|
+
"author": "Integration App, Inc",
|
|
6
6
|
"source": "src/index.ts",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"module": "dist/index.module.mjs",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ConnectorDataLocationBase } from '../base';
|
|
2
|
-
import { ConnectorDataLocationMethod } from '../methods';
|
|
3
|
-
import { ConnectorDataDirectoryMethodType } from './methods/base';
|
|
4
|
-
export declare const DataLocationTypeDirectory: {
|
|
5
|
-
spec: ConnectorDataDirectoryMethodType<unknown>;
|
|
6
|
-
methods: {
|
|
7
|
-
list: ConnectorDataDirectoryMethodType<unknown>;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export interface ConnectorDataDirectory extends ConnectorDataLocationBase {
|
|
11
|
-
type: 'directory';
|
|
12
|
-
spec?: ConnectorDataLocationMethod;
|
|
13
|
-
methods: {
|
|
14
|
-
list: ConnectorDataLocationMethod<any>;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
export declare const ConnectorDataDirectoryMethodKeys: Array<keyof typeof DataLocationTypeDirectory.methods>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ConnectorDataDirectory } from '..';
|
|
2
|
-
import { DataSchema } from '../../../../data-schema';
|
|
3
|
-
import { ConnectorMethodImplementationType } from '../../../methods';
|
|
4
|
-
import { ConnectorDataLocationMethod } from '../../methods';
|
|
5
|
-
export interface ConnectorDataDirectoryMethodType<ConfigType = unknown> {
|
|
6
|
-
name?: string;
|
|
7
|
-
description?: string;
|
|
8
|
-
fileKey?: string;
|
|
9
|
-
getConfigSchema?: (args: ConnectorDataDirectoryMethodTypeArgs<ConfigType>) => DataSchema;
|
|
10
|
-
getInputSchema?: (args: ConnectorDataDirectoryMethodTypeArgs<ConfigType>) => DataSchema;
|
|
11
|
-
getOutputSchema?: (args: ConnectorDataDirectoryMethodTypeArgs<ConfigType>) => DataSchema;
|
|
12
|
-
supportedImplementationTypes: ConnectorMethodImplementationType[];
|
|
13
|
-
}
|
|
14
|
-
interface ConnectorDataDirectoryMethodTypeArgs<ConfigType = unknown> {
|
|
15
|
-
method: ConnectorDataLocationMethod<ConfigType>;
|
|
16
|
-
directory: ConnectorDataDirectory;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
import { ConnectorDataCollection } from './collections';
|
|
2
|
-
import { ConnectorDataDirectory } from './directories';
|
|
3
|
-
import { DataCollectionEvent, DataCollectionEventType, DataRecord } from '../../data-collections';
|
|
4
|
-
import { DataSchema } from '../../data-schema';
|
|
5
|
-
export type DataLocationSpec = DataCollectionSpec | DataDirectorySpec;
|
|
6
|
-
export declare enum DataLocationType {
|
|
7
|
-
directory = "directory",
|
|
8
|
-
collection = "collection"
|
|
9
|
-
}
|
|
10
|
-
export interface DataLocationListItem {
|
|
11
|
-
key: string;
|
|
12
|
-
name: string;
|
|
13
|
-
type: DataLocationType;
|
|
14
|
-
isHidden?: boolean;
|
|
15
|
-
}
|
|
16
|
-
export interface DataLocationPointer {
|
|
17
|
-
key: string;
|
|
18
|
-
parameters?: Record<string, any>;
|
|
19
|
-
type?: DataLocationType;
|
|
20
|
-
}
|
|
21
|
-
export interface DataLocation {
|
|
22
|
-
key?: string;
|
|
23
|
-
parameters?: any;
|
|
24
|
-
path?: string;
|
|
25
|
-
name?: string;
|
|
26
|
-
type?: DataLocationType;
|
|
27
|
-
isDefault?: boolean;
|
|
28
|
-
read?: boolean;
|
|
29
|
-
write?: boolean;
|
|
30
|
-
}
|
|
31
|
-
export interface DataLocationMixin {
|
|
32
|
-
key: string;
|
|
33
|
-
parameters?: any;
|
|
34
|
-
}
|
|
35
|
-
interface DataLocationSpecBase {
|
|
36
|
-
type: DataLocationType;
|
|
37
|
-
key?: string;
|
|
38
|
-
name: string;
|
|
39
|
-
parametersSchema?: DataSchema;
|
|
40
|
-
}
|
|
41
|
-
export interface DataCollectionSpec extends DataLocationSpecBase {
|
|
42
|
-
fieldsSchema?: DataSchema;
|
|
43
|
-
list?: DataCollectionListSpec;
|
|
44
|
-
search?: DataCollectionSearchSpec;
|
|
45
|
-
match?: DataCollectionMatchSpec;
|
|
46
|
-
findById?: DataCollectionFindByIdSpec;
|
|
47
|
-
create?: DataCollectionCreateSpec;
|
|
48
|
-
update?: DataCollectionUpdateSpec;
|
|
49
|
-
delete?: DataCollectionDeleteSpec;
|
|
50
|
-
events?: DataCollectionEventsSpec;
|
|
51
|
-
customFields?: boolean;
|
|
52
|
-
udm?: DataCollectionUdmsSpec;
|
|
53
|
-
find?: DataCollectionFindSpec;
|
|
54
|
-
}
|
|
55
|
-
export interface ApiRequestSpec {
|
|
56
|
-
path: any;
|
|
57
|
-
method: any;
|
|
58
|
-
}
|
|
59
|
-
export declare enum DataDirectoryOperation {
|
|
60
|
-
list = "list"
|
|
61
|
-
}
|
|
62
|
-
export interface DataDirectorySpec extends DataLocationSpecBase {
|
|
63
|
-
locations?: DataLocation[];
|
|
64
|
-
}
|
|
65
|
-
export interface DataCollectionMethodSpec {
|
|
66
|
-
apiRequests?: ApiRequestSpec[];
|
|
67
|
-
}
|
|
68
|
-
export interface DataCollectionFindSpec extends DataCollectionMethodSpec {
|
|
69
|
-
queryFields?: string[];
|
|
70
|
-
}
|
|
71
|
-
export interface DataCollectionMatchSpec extends DataCollectionMethodSpec {
|
|
72
|
-
fields?: string[];
|
|
73
|
-
}
|
|
74
|
-
export interface DataCollectionListSpec extends DataCollectionMethodSpec {
|
|
75
|
-
filterFields?: string[];
|
|
76
|
-
}
|
|
77
|
-
export interface DataCollectionSearchSpec extends DataCollectionMethodSpec {
|
|
78
|
-
}
|
|
79
|
-
export interface DataCollectionFindByIdSpec extends DataCollectionMethodSpec {
|
|
80
|
-
}
|
|
81
|
-
export interface DataCollectionCreateSpec extends DataCollectionMethodSpec {
|
|
82
|
-
fields?: string[];
|
|
83
|
-
requiredFields?: string[];
|
|
84
|
-
excludedFields?: string[];
|
|
85
|
-
}
|
|
86
|
-
export interface DataCollectionUpdateSpec extends DataCollectionMethodSpec {
|
|
87
|
-
fields?: string[];
|
|
88
|
-
excludedFields?: string[];
|
|
89
|
-
}
|
|
90
|
-
export interface DataCollectionDeleteSpec extends DataCollectionMethodSpec {
|
|
91
|
-
}
|
|
92
|
-
export type DataCollectionUdmSpec = {
|
|
93
|
-
fields?: string[];
|
|
94
|
-
extract?: Record<string, any>;
|
|
95
|
-
parse?: Record<string, any>;
|
|
96
|
-
};
|
|
97
|
-
export type DataCollectionUdmsSpec = Record<string, DataCollectionUdmSpec>;
|
|
98
|
-
export type DataCollectionEventTypeSpec = {
|
|
99
|
-
type: 'push' | 'pull';
|
|
100
|
-
isFullScan?: boolean;
|
|
101
|
-
isIdOnly?: boolean;
|
|
102
|
-
};
|
|
103
|
-
export type DataCollectionEventsSpec = {
|
|
104
|
-
[value in DataCollectionEventType]: DataCollectionEventTypeSpec;
|
|
105
|
-
} & {
|
|
106
|
-
all?: DataCollectionEventTypeSpec;
|
|
107
|
-
};
|
|
108
|
-
export interface DataCollectionMethodRequest {
|
|
109
|
-
parameters?: Record<string, any>;
|
|
110
|
-
}
|
|
111
|
-
export interface DataCollectionFindRequest {
|
|
112
|
-
query?: any;
|
|
113
|
-
cursor?: string;
|
|
114
|
-
}
|
|
115
|
-
export interface DataCollectionFindResponse {
|
|
116
|
-
records: DataRecord[];
|
|
117
|
-
cursor?: string;
|
|
118
|
-
}
|
|
119
|
-
export interface DataCollectionListRequest extends DataCollectionMethodRequest {
|
|
120
|
-
filter?: any;
|
|
121
|
-
unifiedFilter?: any;
|
|
122
|
-
cursor?: string;
|
|
123
|
-
}
|
|
124
|
-
export interface DataCollectionListResponseDrilldown {
|
|
125
|
-
parameters?: Record<string, any>;
|
|
126
|
-
filter?: Record<string, any>;
|
|
127
|
-
}
|
|
128
|
-
export interface DataCollectionListResponse {
|
|
129
|
-
records: DataRecord[];
|
|
130
|
-
drilldowns?: Array<DataCollectionListResponseDrilldown>;
|
|
131
|
-
cursor?: string;
|
|
132
|
-
}
|
|
133
|
-
export interface DataCollectionSearchRequest extends DataCollectionMethodRequest {
|
|
134
|
-
query: string;
|
|
135
|
-
cursor?: string;
|
|
136
|
-
}
|
|
137
|
-
export interface DataCollectionSearchResponse {
|
|
138
|
-
records: DataRecord[];
|
|
139
|
-
cursor?: string;
|
|
140
|
-
}
|
|
141
|
-
export interface DataCollectionFindByIdRequest extends DataCollectionMethodRequest {
|
|
142
|
-
id: string;
|
|
143
|
-
udm?: string;
|
|
144
|
-
}
|
|
145
|
-
export interface DataCollectionFindByIdResponse {
|
|
146
|
-
record: DataRecord;
|
|
147
|
-
}
|
|
148
|
-
export interface DataCollectionMatchRequest extends DataCollectionMethodRequest {
|
|
149
|
-
query: Record<string, any>;
|
|
150
|
-
}
|
|
151
|
-
export interface DataCollectionMatchResponse {
|
|
152
|
-
record?: DataRecord;
|
|
153
|
-
}
|
|
154
|
-
export interface DataCollectionCreateRequest extends DataCollectionMethodRequest {
|
|
155
|
-
fields: Record<string, any>;
|
|
156
|
-
}
|
|
157
|
-
export interface DataCollectionCreateResponse {
|
|
158
|
-
id: string;
|
|
159
|
-
}
|
|
160
|
-
export interface DataCollectionUpdateRequest extends DataCollectionMethodRequest {
|
|
161
|
-
id: string;
|
|
162
|
-
fields: Record<string, any>;
|
|
163
|
-
}
|
|
164
|
-
export interface DataCollectionUpdateResponse {
|
|
165
|
-
id: string;
|
|
166
|
-
}
|
|
167
|
-
export interface DataCollectionDeleteRequest extends DataCollectionMethodRequest {
|
|
168
|
-
id: string;
|
|
169
|
-
}
|
|
170
|
-
export interface DataCollectionDeleteResponse {
|
|
171
|
-
}
|
|
172
|
-
export interface DataCollectionSubscribeRequest extends DataCollectionMethodRequest {
|
|
173
|
-
events?: {
|
|
174
|
-
created?: boolean;
|
|
175
|
-
updated?: boolean;
|
|
176
|
-
deleted?: boolean;
|
|
177
|
-
};
|
|
178
|
-
udm?: string;
|
|
179
|
-
webhookUri: string;
|
|
180
|
-
}
|
|
181
|
-
export interface DataCollectionSubscribeResponse {
|
|
182
|
-
subscriptionId: string;
|
|
183
|
-
pullIntervalSeconds?: number;
|
|
184
|
-
cursor?: string;
|
|
185
|
-
}
|
|
186
|
-
export interface DataCollectionUpdateSubscriptionRequest extends DataCollectionSubscribeRequest {
|
|
187
|
-
subscriptionId: string;
|
|
188
|
-
cursor?: string;
|
|
189
|
-
}
|
|
190
|
-
export interface DataCollectionUpdateSubscriptionResponse extends Omit<DataCollectionSubscribeResponse, 'subscriptionId'> {
|
|
191
|
-
}
|
|
192
|
-
export interface DataCollectionUnsubscribeRequest {
|
|
193
|
-
subscriptionId: string;
|
|
194
|
-
}
|
|
195
|
-
export interface DataCollectionUnsubscribeResponse {
|
|
196
|
-
}
|
|
197
|
-
export interface DataCollectionEventsRequest extends DataCollectionMethodRequest {
|
|
198
|
-
subscriptionId: string;
|
|
199
|
-
cursor: string;
|
|
200
|
-
}
|
|
201
|
-
export interface DataCollectionEventsResponse {
|
|
202
|
-
events: DataCollectionEvent[];
|
|
203
|
-
cursor?: string;
|
|
204
|
-
state?: any;
|
|
205
|
-
}
|
|
206
|
-
export interface DataEventWebhookPayload {
|
|
207
|
-
subscriptionId: string;
|
|
208
|
-
events: DataCollectionEvent[];
|
|
209
|
-
}
|
|
210
|
-
export interface DataCollectionParseUnifiedFieldsRequest {
|
|
211
|
-
udm: string;
|
|
212
|
-
unifiedFields: Record<string, any>;
|
|
213
|
-
}
|
|
214
|
-
export interface DataCollectionParseUnifiedFieldsResponse {
|
|
215
|
-
fields: any;
|
|
216
|
-
}
|
|
217
|
-
export interface DataDirectoryListRequest {
|
|
218
|
-
cursor?: string;
|
|
219
|
-
}
|
|
220
|
-
export interface DataDirectoryListResponse {
|
|
221
|
-
locations: DataLocation[];
|
|
222
|
-
cursor?: string;
|
|
223
|
-
}
|
|
224
|
-
export declare const ConnectorDataLocationTypes: {
|
|
225
|
-
collection: {
|
|
226
|
-
spec: import("./collections/methods/base").ConnectorDataCollectionMethodType<unknown>;
|
|
227
|
-
recordFromFields: import("./collections/methods/base").ConnectorDataCollectionMethodType<unknown>;
|
|
228
|
-
customFieldsSchema: import("./collections/methods/base").ConnectorDataCollectionMethodType<unknown>;
|
|
229
|
-
fieldsFromApi: import("./collections/methods/base").ConnectorDataCollectionMethodType<unknown>;
|
|
230
|
-
fieldsToApi: import("./collections/methods/base").ConnectorDataCollectionMethodType<unknown>;
|
|
231
|
-
methods: {
|
|
232
|
-
list: import("./collections/methods/base").ConnectorDataCollectionMethodType<import("./collections/methods/list").DataCollectionListConfigType>;
|
|
233
|
-
findById: import("./collections/methods/base").ConnectorDataCollectionMethodType<unknown>;
|
|
234
|
-
match: import("./collections/methods/base").ConnectorDataCollectionMethodType<import("./collections/methods/match").DataCollectionMatchConfigType>;
|
|
235
|
-
search: import("./collections/methods/base").ConnectorDataCollectionMethodType<unknown>;
|
|
236
|
-
create: import("./collections/methods/base").ConnectorDataCollectionMethodType<import("./collections/methods/create").DataCollectionCreateConfigType>;
|
|
237
|
-
update: import("./collections/methods/base").ConnectorDataCollectionMethodType<import("./collections/methods/update").DataCollectionUpdateConfigType>;
|
|
238
|
-
delete: import("./collections/methods/base").ConnectorDataCollectionMethodType<unknown>;
|
|
239
|
-
find: import("./collections/methods/base").ConnectorDataCollectionMethodType<{
|
|
240
|
-
queryFields: string[];
|
|
241
|
-
}>;
|
|
242
|
-
};
|
|
243
|
-
recordToApi: import("./collections/methods/base").ConnectorDataCollectionMethodType<unknown>;
|
|
244
|
-
recordFromApi: import("./collections/methods/base").ConnectorDataCollectionMethodType<unknown>;
|
|
245
|
-
recordFromApiMapping: import("./collections/methods/base").ConnectorDataCollectionMethodType<unknown>;
|
|
246
|
-
recordFromApiCode: import("./collections/methods/base").ConnectorDataCollectionMethodType<unknown>;
|
|
247
|
-
fieldsToApiMapping: import("./collections/methods/base").ConnectorDataCollectionMethodType<unknown>;
|
|
248
|
-
fieldsToApiCode: import("./collections/methods/base").ConnectorDataCollectionMethodType<unknown>;
|
|
249
|
-
};
|
|
250
|
-
directory: {
|
|
251
|
-
spec: import("./directories/methods/base").ConnectorDataDirectoryMethodType<unknown>;
|
|
252
|
-
methods: {
|
|
253
|
-
list: import("./directories/methods/base").ConnectorDataDirectoryMethodType<unknown>;
|
|
254
|
-
};
|
|
255
|
-
};
|
|
256
|
-
};
|
|
257
|
-
export type ConnectorDataLocation = ConnectorDataCollection | ConnectorDataDirectory;
|
|
258
|
-
export {};
|