@ingestro/pipelines-vanilla-js 1.0.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/README.md +209 -0
- package/index.css +1 -0
- package/lib/index.js +7958 -0
- package/package.json +10 -0
- package/types/index.d.ts +900 -0
- package/version.txt +1 -0
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,900 @@
|
|
|
1
|
+
export enum ConnectorTriggerType {
|
|
2
|
+
TIME_BASE = 'TIME_BASE',
|
|
3
|
+
EVENT_BASE = 'EVENT_BASE',
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export type ColumnValue = object;
|
|
7
|
+
|
|
8
|
+
export type IConnectorDetailResponse = {
|
|
9
|
+
configuration?: object;
|
|
10
|
+
} & {
|
|
11
|
+
id?: string;
|
|
12
|
+
/** @format date-time */
|
|
13
|
+
createdAt?: string;
|
|
14
|
+
/** @format date-time */
|
|
15
|
+
updatedAt?: string;
|
|
16
|
+
created_by?: {
|
|
17
|
+
id?: string;
|
|
18
|
+
name?: string;
|
|
19
|
+
identifier?: string;
|
|
20
|
+
type?: UserType;
|
|
21
|
+
};
|
|
22
|
+
updated_by?: {
|
|
23
|
+
id?: string;
|
|
24
|
+
name?: string;
|
|
25
|
+
identifier?: string;
|
|
26
|
+
type?: UserType;
|
|
27
|
+
};
|
|
28
|
+
trigger_type?: ConnectorTriggerType;
|
|
29
|
+
permissions?: {
|
|
30
|
+
level?: PermissionLevel;
|
|
31
|
+
};
|
|
32
|
+
type?: connectorType;
|
|
33
|
+
name?: string;
|
|
34
|
+
node_type?: NodeType;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export enum ValidatorType {
|
|
38
|
+
Regex = 'regex',
|
|
39
|
+
Required = 'required',
|
|
40
|
+
RequiredWith = 'required_with',
|
|
41
|
+
RequiredWithAll = 'required_with_all',
|
|
42
|
+
RequiredWithAllValues = 'required_with_all_values',
|
|
43
|
+
RequiredWithValues = 'required_with_values',
|
|
44
|
+
RequiredWithout = 'required_without',
|
|
45
|
+
RequiredWithoutAll = 'required_without_all',
|
|
46
|
+
RequiredWithoutAllValues = 'required_without_all_values',
|
|
47
|
+
RequiredWithoutValues = 'required_without_values',
|
|
48
|
+
Unique = 'unique',
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export enum DropdownOptionType {
|
|
52
|
+
Float = 'float',
|
|
53
|
+
Int = 'int',
|
|
54
|
+
String = 'string',
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export type DropdownOptionValidate = object;
|
|
58
|
+
|
|
59
|
+
export type DropdownOptionAPI = {
|
|
60
|
+
type?: DropdownOptionType;
|
|
61
|
+
} & {
|
|
62
|
+
label?: string;
|
|
63
|
+
alternativeMatches?: string[];
|
|
64
|
+
validations?: {
|
|
65
|
+
validate?: DropdownOptionValidate;
|
|
66
|
+
errorMessage?: string;
|
|
67
|
+
}[];
|
|
68
|
+
value?: string | number;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export type ITdmItemResponse = {
|
|
72
|
+
id?: string;
|
|
73
|
+
/** @format date-time */
|
|
74
|
+
createdAt?: string;
|
|
75
|
+
/** @format date-time */
|
|
76
|
+
updatedAt?: string;
|
|
77
|
+
created_by?: {
|
|
78
|
+
id?: string;
|
|
79
|
+
name?: string;
|
|
80
|
+
};
|
|
81
|
+
updated_by?: {
|
|
82
|
+
id?: string;
|
|
83
|
+
name?: string;
|
|
84
|
+
};
|
|
85
|
+
name?: string;
|
|
86
|
+
columns?: {
|
|
87
|
+
label?: string;
|
|
88
|
+
key?: string;
|
|
89
|
+
description?: string;
|
|
90
|
+
example?: string;
|
|
91
|
+
validations?: {
|
|
92
|
+
validate?: ValidatorType;
|
|
93
|
+
regex?: string;
|
|
94
|
+
columnValues?: ColumnValue;
|
|
95
|
+
columns?: string[];
|
|
96
|
+
errorMessage?: string;
|
|
97
|
+
}[];
|
|
98
|
+
columnType?:
|
|
99
|
+
| 'bic'
|
|
100
|
+
| 'boolean'
|
|
101
|
+
| 'category'
|
|
102
|
+
| 'country_code_alpha_2'
|
|
103
|
+
| 'country_code_alpha_3'
|
|
104
|
+
| 'currency_code'
|
|
105
|
+
| 'currency_eur'
|
|
106
|
+
| 'currency_usd'
|
|
107
|
+
| 'date'
|
|
108
|
+
| 'date_dmy'
|
|
109
|
+
| 'date_iso'
|
|
110
|
+
| 'date_mdy'
|
|
111
|
+
| 'datetime'
|
|
112
|
+
| 'email'
|
|
113
|
+
| 'float'
|
|
114
|
+
| 'gtin'
|
|
115
|
+
| 'iban'
|
|
116
|
+
| 'int'
|
|
117
|
+
| 'multiple-select'
|
|
118
|
+
| 'number'
|
|
119
|
+
| 'percentage'
|
|
120
|
+
| 'phone'
|
|
121
|
+
| 'single-select'
|
|
122
|
+
| 'string'
|
|
123
|
+
| 'time_hm'
|
|
124
|
+
| 'time_hm_24'
|
|
125
|
+
| 'time_hms'
|
|
126
|
+
| 'time_hms_24'
|
|
127
|
+
| 'url'
|
|
128
|
+
| 'url_https'
|
|
129
|
+
| 'url_www'
|
|
130
|
+
| 'vat_eu'
|
|
131
|
+
| 'zip_code_de';
|
|
132
|
+
dropdownOptions?: DropdownOptionAPI[];
|
|
133
|
+
alternativeMatches?: string[];
|
|
134
|
+
isMultiSelect?: boolean;
|
|
135
|
+
outputFormat?: string;
|
|
136
|
+
allowCustomOptions?: boolean;
|
|
137
|
+
numberFormat?: 'eu' | 'us';
|
|
138
|
+
optionMappingMode?: 'exact' | 'smart';
|
|
139
|
+
}[];
|
|
140
|
+
permissions?: {
|
|
141
|
+
level?: PermissionLevel;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
export enum UserType {
|
|
146
|
+
USER = 'USER',
|
|
147
|
+
SUB_ORG = 'SUB_ORG',
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export enum PermissionLevel {
|
|
151
|
+
PUBLIC = 'PUBLIC',
|
|
152
|
+
PRIVATE = 'PRIVATE',
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export type IConnectorListItem = {
|
|
156
|
+
id: string;
|
|
157
|
+
name: string;
|
|
158
|
+
nodeType: NodeType;
|
|
159
|
+
type: connectorType;
|
|
160
|
+
permissions: {
|
|
161
|
+
level: PermissionLevel;
|
|
162
|
+
};
|
|
163
|
+
createdAt: Date | undefined;
|
|
164
|
+
createdBy: IActionUser;
|
|
165
|
+
updatedAt: Date | undefined;
|
|
166
|
+
updatedBy: IActionUser;
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
export type IActionUser = {
|
|
170
|
+
id: string;
|
|
171
|
+
name: string;
|
|
172
|
+
identifier: string;
|
|
173
|
+
type: UserType;
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
export type IPipelineListItem = {
|
|
177
|
+
id: string;
|
|
178
|
+
name: string;
|
|
179
|
+
active: boolean;
|
|
180
|
+
draft: boolean;
|
|
181
|
+
createdAt: Date | undefined;
|
|
182
|
+
createdBy: IActionUser;
|
|
183
|
+
updatedAt: Date | undefined;
|
|
184
|
+
updatedBy: IActionUser;
|
|
185
|
+
configuration: {
|
|
186
|
+
developerMode: boolean;
|
|
187
|
+
};
|
|
188
|
+
meta: {
|
|
189
|
+
totalExecutionsLive: number | undefined;
|
|
190
|
+
totalExecutionsDev: number | undefined;
|
|
191
|
+
latestExecutions: {
|
|
192
|
+
status: ExecutionStatus;
|
|
193
|
+
error: { message: string; type: ExecutionErrorType } | undefined;
|
|
194
|
+
developerMode: boolean;
|
|
195
|
+
startedAt: Date | undefined;
|
|
196
|
+
}[];
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
export type IExecutionItemResponse = {
|
|
201
|
+
configuration?: object;
|
|
202
|
+
meta?: {
|
|
203
|
+
pipeline_name?: string;
|
|
204
|
+
};
|
|
205
|
+
error?: {
|
|
206
|
+
type?: ExecutionErrorType;
|
|
207
|
+
message?: string;
|
|
208
|
+
raw_error?: string;
|
|
209
|
+
};
|
|
210
|
+
id?: string;
|
|
211
|
+
status?: ExecutionStatus;
|
|
212
|
+
trigger_type?: ExecutionTriggerType;
|
|
213
|
+
created_by?: {
|
|
214
|
+
id?: string;
|
|
215
|
+
name?: string;
|
|
216
|
+
};
|
|
217
|
+
updated_by?: {
|
|
218
|
+
id?: string;
|
|
219
|
+
name?: string;
|
|
220
|
+
};
|
|
221
|
+
/** @format date-time */
|
|
222
|
+
createdAt?: string;
|
|
223
|
+
/** @format date-time */
|
|
224
|
+
updatedAt?: string;
|
|
225
|
+
duration?: number;
|
|
226
|
+
/** @format date-time */
|
|
227
|
+
start_at?: string;
|
|
228
|
+
pipeline?: string;
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
export type IPipelineDetails = {
|
|
232
|
+
configuration?: object;
|
|
233
|
+
draft?: boolean;
|
|
234
|
+
id?: string;
|
|
235
|
+
/** @format date-time */
|
|
236
|
+
createdAt?: string;
|
|
237
|
+
/** @format date-time */
|
|
238
|
+
updatedAt?: string;
|
|
239
|
+
created_by?: {
|
|
240
|
+
id?: string;
|
|
241
|
+
name?: string;
|
|
242
|
+
identifier: string;
|
|
243
|
+
type: UserType;
|
|
244
|
+
};
|
|
245
|
+
updated_by?: {
|
|
246
|
+
id?: string;
|
|
247
|
+
name?: string;
|
|
248
|
+
identifier: string;
|
|
249
|
+
type: UserType;
|
|
250
|
+
};
|
|
251
|
+
meta?: {
|
|
252
|
+
total_executions_live: number;
|
|
253
|
+
total_executions_dev: number;
|
|
254
|
+
total_rows_dev: number;
|
|
255
|
+
total_rows_live: number;
|
|
256
|
+
/** @format date-time */
|
|
257
|
+
last_executed_at: string;
|
|
258
|
+
};
|
|
259
|
+
active?: boolean;
|
|
260
|
+
name?: string;
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
export type ILanguage = 'en' | 'de';
|
|
264
|
+
|
|
265
|
+
export type ICreatePipeline = {
|
|
266
|
+
accessToken: string;
|
|
267
|
+
templateId?: string;
|
|
268
|
+
configuration?: ICreatePipelineConfiguration;
|
|
269
|
+
settings?: ICreatePipelineSettings;
|
|
270
|
+
onPipelineCreate?: ICreatePipelineOnPipelineCreate;
|
|
271
|
+
onConnectorCreate?: IOnConnectorCreate;
|
|
272
|
+
onTdmCreate?: IOnTDMCreate;
|
|
273
|
+
onExecutionView?: ICreatePipelineOnExecutionView;
|
|
274
|
+
onClose?: IOnClose;
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
export type ICreatePipelineProps = ICreatePipeline;
|
|
278
|
+
|
|
279
|
+
export type ICreatePipelineConfiguration = {
|
|
280
|
+
name?: string;
|
|
281
|
+
tdmId?: string;
|
|
282
|
+
inputConnectorId?: string;
|
|
283
|
+
outputConnectorId?: string;
|
|
284
|
+
errorConfig?: ICreatePipelineErrorConfig;
|
|
285
|
+
scheduleConfig?: ICreatePipelineScheduleConfig;
|
|
286
|
+
developerMode?: boolean;
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
export type ICreatePipelineErrorConfig = {
|
|
290
|
+
errorThreshold?: number;
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
export type ICreatePipelineScheduleConfig = {
|
|
294
|
+
frequency?: ICreatePipelineScheduleFrequency;
|
|
295
|
+
startsOn?: string;
|
|
296
|
+
endsOn?: string;
|
|
297
|
+
interval?: number;
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
export type ICreatePipelineScheduleFrequency =
|
|
301
|
+
| 'HOURLY'
|
|
302
|
+
| 'DAILY'
|
|
303
|
+
| 'WEEKLY'
|
|
304
|
+
| 'MONTHLY';
|
|
305
|
+
|
|
306
|
+
export type ICreatePipelineOnPipelineCreate = (
|
|
307
|
+
args: ICreatePipelineOnPipelineCreateProps
|
|
308
|
+
) => void;
|
|
309
|
+
|
|
310
|
+
export type IOnClose = () => void;
|
|
311
|
+
|
|
312
|
+
export type IConnectorType = 'input' | 'output';
|
|
313
|
+
|
|
314
|
+
export type IOnConnectorCreate = (params: {
|
|
315
|
+
reload: () => void;
|
|
316
|
+
type: IConnectorType;
|
|
317
|
+
}) => void;
|
|
318
|
+
|
|
319
|
+
export type IOnTDMCreate = ({ reload }: { reload: () => void }) => void;
|
|
320
|
+
|
|
321
|
+
export type ICreatePipelineOnPipelineCreateProps = {
|
|
322
|
+
data: IPipelineDetails;
|
|
323
|
+
execution?: IExecutionItemResponse;
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
export type ICreatePipelineOnExecutionView = ({
|
|
327
|
+
data,
|
|
328
|
+
}: {
|
|
329
|
+
data: string;
|
|
330
|
+
}) => void;
|
|
331
|
+
|
|
332
|
+
export type ISettingsBase = {
|
|
333
|
+
language?: ILanguage;
|
|
334
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
335
|
+
i18nOverrides?: any; // I18nOverrides;
|
|
336
|
+
modal?: boolean;
|
|
337
|
+
};
|
|
338
|
+
|
|
339
|
+
export type ICreatePipelineSettings = ISettingsBase & {
|
|
340
|
+
allowTdmCreation?: boolean;
|
|
341
|
+
allowInputConnectorCreation?: boolean;
|
|
342
|
+
allowOutputConnectorCreation?: boolean;
|
|
343
|
+
runPipelineOnCreation?: boolean;
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
export type IExecutionDetailsProps = {
|
|
347
|
+
accessToken: string;
|
|
348
|
+
executionId: string;
|
|
349
|
+
settings?: ISettingsBase;
|
|
350
|
+
onExecutionRun?: IOnExecutionRun;
|
|
351
|
+
onClose?: IOnClose;
|
|
352
|
+
};
|
|
353
|
+
|
|
354
|
+
export type IOnExecutionRun = ({
|
|
355
|
+
data,
|
|
356
|
+
}: {
|
|
357
|
+
data: IExecutionDataResponse;
|
|
358
|
+
}) => void;
|
|
359
|
+
|
|
360
|
+
export type IOnExecutionView = ({
|
|
361
|
+
data,
|
|
362
|
+
}: {
|
|
363
|
+
data: IExecutionItemResponse;
|
|
364
|
+
}) => void;
|
|
365
|
+
|
|
366
|
+
// TODO: update type of data
|
|
367
|
+
export type IOnPipelineView = (params: { data: IPipelineListItem }) => void;
|
|
368
|
+
|
|
369
|
+
export type IOnPipelineCreate = () => void;
|
|
370
|
+
|
|
371
|
+
export type ICreatePipelineHooksLogs = {
|
|
372
|
+
hasOnClose: boolean;
|
|
373
|
+
hasOnPipelineCreate: boolean;
|
|
374
|
+
hasOnConnectorCreate: boolean;
|
|
375
|
+
hasOnTdmCreate: boolean;
|
|
376
|
+
hasOnExecutionView: boolean;
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
export type IExecutionDetailsHooksLogs = {
|
|
380
|
+
hasOnClose: boolean;
|
|
381
|
+
hasOnExecutionRun: boolean;
|
|
382
|
+
};
|
|
383
|
+
|
|
384
|
+
export type IBuildInfo = {
|
|
385
|
+
framework: 'react' | 'angular' | 'vue' | 'vanilla';
|
|
386
|
+
frameworkVersion: string;
|
|
387
|
+
origin: string;
|
|
388
|
+
version: string;
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
export type IPipelineDetailsHooksLogs = {
|
|
392
|
+
hasOnPipelineDelete: boolean;
|
|
393
|
+
hasOnClose: boolean;
|
|
394
|
+
hasOnPipelineUpdate: boolean;
|
|
395
|
+
hasOnExecutionRun: boolean;
|
|
396
|
+
hasOnConnectorCreate: boolean;
|
|
397
|
+
hasOnTdmCreate: boolean;
|
|
398
|
+
hasOnExecutionView: boolean;
|
|
399
|
+
// hasOnPipelineDuplicate: boolean;
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
export type IPipelineDetailsSettings = ISettingsBase & {
|
|
403
|
+
allowTdmCreation?: boolean;
|
|
404
|
+
allowInputConnectorCreation?: boolean;
|
|
405
|
+
allowOutputConnectorCreation?: boolean;
|
|
406
|
+
showExecutionList?: boolean;
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
export type IPipelineDetailsProps = {
|
|
410
|
+
accessToken: string;
|
|
411
|
+
pipelineId: string;
|
|
412
|
+
settings?: IPipelineDetailsSettings;
|
|
413
|
+
onClose?: IOnClose;
|
|
414
|
+
onPipelineDelete?: IOnPipelineDelete;
|
|
415
|
+
onConnectorCreate?: IOnConnectorCreate;
|
|
416
|
+
onTdmCreate?: IOnTDMCreate;
|
|
417
|
+
onPipelineUpdate?: IOnPipelineUpdate;
|
|
418
|
+
onExecutionRun?: IOnExecutionRun;
|
|
419
|
+
onExecutionView?: IOnExecutionView;
|
|
420
|
+
// NOTE: scoped out
|
|
421
|
+
// onPipelineDuplicate?: IOnPipelineDuplicate;
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
export type IOnPipelineDelete = (
|
|
425
|
+
pipeline: IPipelineDetailsConfiguration
|
|
426
|
+
) => void;
|
|
427
|
+
|
|
428
|
+
export type IOnPipelineUpdate = (
|
|
429
|
+
pipeline: IPipelineDetailsConfiguration
|
|
430
|
+
) => void;
|
|
431
|
+
|
|
432
|
+
// export type IOnPipelineDuplicate = (
|
|
433
|
+
// pipeline: IPipelineDetailsConfiguration,
|
|
434
|
+
// ) => void;
|
|
435
|
+
|
|
436
|
+
export type IPipelineDetailsConfiguration = {
|
|
437
|
+
id: string;
|
|
438
|
+
name: string;
|
|
439
|
+
draft?: boolean;
|
|
440
|
+
active?: boolean;
|
|
441
|
+
configuration: {
|
|
442
|
+
developerMode?: boolean;
|
|
443
|
+
inputConnectors: string[];
|
|
444
|
+
outputConnectors: string[];
|
|
445
|
+
tdm?: string;
|
|
446
|
+
headerConfig: {
|
|
447
|
+
type: 'SMART' | 'STATIC';
|
|
448
|
+
rowIndex?: number;
|
|
449
|
+
};
|
|
450
|
+
mappingConfig?: {
|
|
451
|
+
mode: 'DEFAULT';
|
|
452
|
+
mappings: {
|
|
453
|
+
sourceColumns: string[];
|
|
454
|
+
targetColumn: string;
|
|
455
|
+
transformations: (
|
|
456
|
+
| {
|
|
457
|
+
name: string;
|
|
458
|
+
type: 'HYPER_FORMULA' | 'JAVASCRIPT';
|
|
459
|
+
function: string;
|
|
460
|
+
}
|
|
461
|
+
| {
|
|
462
|
+
name: string;
|
|
463
|
+
type: 'OPTION_MAPPING';
|
|
464
|
+
mappings: {
|
|
465
|
+
source_values: (string | null)[];
|
|
466
|
+
target_options: string[];
|
|
467
|
+
}[];
|
|
468
|
+
}
|
|
469
|
+
)[];
|
|
470
|
+
}[];
|
|
471
|
+
};
|
|
472
|
+
errorConfig?: {
|
|
473
|
+
errorThreshold?: number;
|
|
474
|
+
};
|
|
475
|
+
scheduleConfig?: {
|
|
476
|
+
frequency?: 'HOURLY' | 'DAILY' | 'WEEKLY' | 'MONTHLY';
|
|
477
|
+
interval?: number;
|
|
478
|
+
startsOn?: Date;
|
|
479
|
+
endsOn?: Date;
|
|
480
|
+
};
|
|
481
|
+
};
|
|
482
|
+
createdAt?: Date;
|
|
483
|
+
updatedAt?: Date;
|
|
484
|
+
createdBy?: {
|
|
485
|
+
id: string;
|
|
486
|
+
name: string;
|
|
487
|
+
identifier: string;
|
|
488
|
+
type: 'SUB_ORG' | 'USER';
|
|
489
|
+
};
|
|
490
|
+
updatedBy?: {
|
|
491
|
+
id: string;
|
|
492
|
+
name: string;
|
|
493
|
+
identifier: string;
|
|
494
|
+
type: 'SUB_ORG' | 'USER';
|
|
495
|
+
};
|
|
496
|
+
meta?: {
|
|
497
|
+
totalExecutionsLive: number;
|
|
498
|
+
totalExecutionsDev: number;
|
|
499
|
+
totalRowsDev: number;
|
|
500
|
+
totalRowsLive: number;
|
|
501
|
+
lastExecutedAt?: Date;
|
|
502
|
+
};
|
|
503
|
+
};
|
|
504
|
+
|
|
505
|
+
export enum ExecutionTriggerType {
|
|
506
|
+
MANUAL = 'MANUAL',
|
|
507
|
+
SCHEDULED = 'SCHEDULED',
|
|
508
|
+
EVENT = 'EVENT',
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
export enum ExecutionStatus {
|
|
512
|
+
SUCCESSFUL = 'SUCCESSFUL',
|
|
513
|
+
FAILED = 'FAILED',
|
|
514
|
+
PROCESSING = 'PROCESSING',
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
export enum ExecutionErrorType {
|
|
518
|
+
SOURCE_UNRESPONSIVE = 'SOURCE_UNRESPONSIVE',
|
|
519
|
+
SOURCE_DATA_EMPTY = 'SOURCE_DATA_EMPTY',
|
|
520
|
+
DESTINATION_UNRESPONSIVE = 'DESTINATION_UNRESPONSIVE',
|
|
521
|
+
DESTINATION_SIZE_LIMIT = 'DESTINATION_SIZE_LIMIT',
|
|
522
|
+
WRITE_FILE_FAILURE = 'WRITE_FILE_FAILURE',
|
|
523
|
+
TRANSFORMATION_FAILURE = 'TRANSFORMATION_FAILURE',
|
|
524
|
+
ERROR_THRESHOLD_EXCEEDED = 'ERROR_THRESHOLD_EXCEEDED',
|
|
525
|
+
PARSING_FAILURE = 'PARSING_FAILURE',
|
|
526
|
+
EXECUTION_ID_NOT_FOUND = 'EXECUTION_ID_NOT_FOUND',
|
|
527
|
+
EXECUTION_TIMEOUT = 'EXECUTION_TIMEOUT',
|
|
528
|
+
PARSING_OUTPUT_FAILURE = 'PARSING_OUTPUT_FAILURE',
|
|
529
|
+
MAPPING_VALIDATION_FAILURE = 'MAPPING_VALIDATION_FAILURE',
|
|
530
|
+
FETCH_OPTION_FAILURE = 'FETCH_OPTION_FAILURE',
|
|
531
|
+
ADVANCED_CLEANING_FAILURE = 'ADVANCED_CLEANING_FAILURE',
|
|
532
|
+
ADVANCED_VALIDATION_FAILURE = 'ADVANCED_VALIDATION_FAILURE',
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
export enum IFrequency {
|
|
536
|
+
HOURLY = 'HOURLY',
|
|
537
|
+
DAILY = 'DAILY',
|
|
538
|
+
WEEKLY = 'WEEKLY',
|
|
539
|
+
MONTHLY = 'MONTHLY',
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
export enum ConfigurationType {
|
|
543
|
+
PIPELINE = 'PIPELINE',
|
|
544
|
+
TEMPLATE = 'TEMPLATE',
|
|
545
|
+
EXECUTION = 'EXECUTION',
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
export enum HeaderType {
|
|
549
|
+
SMART = 'SMART',
|
|
550
|
+
STATIC = 'STATIC',
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
export enum TransformationType {
|
|
554
|
+
JAVASCRIPT = 'JAVASCRIPT',
|
|
555
|
+
HYPER_FORMULA = 'HYPER_FORMULA',
|
|
556
|
+
OPTION_MAPPING = 'OPTION_MAPPING',
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
export type IExecutionConfiguration = {
|
|
560
|
+
input_connectors?: string[];
|
|
561
|
+
output_connectors?: string[];
|
|
562
|
+
tdm?: string;
|
|
563
|
+
error_config?: {
|
|
564
|
+
error_threshold?: number;
|
|
565
|
+
};
|
|
566
|
+
schedule_config?: {
|
|
567
|
+
frequency?: IFrequency;
|
|
568
|
+
interval?: number;
|
|
569
|
+
starts_on?: string;
|
|
570
|
+
ends_on?: string;
|
|
571
|
+
};
|
|
572
|
+
header_config?: {
|
|
573
|
+
type?: HeaderType;
|
|
574
|
+
row_index?: number;
|
|
575
|
+
};
|
|
576
|
+
developer_mode?: boolean;
|
|
577
|
+
configuration_type?: ConfigurationType;
|
|
578
|
+
mapping_config?: {
|
|
579
|
+
mode?: 'DEFAULT';
|
|
580
|
+
mappings?: {
|
|
581
|
+
source_columns?: string[];
|
|
582
|
+
target_column?: string;
|
|
583
|
+
transformations?: (
|
|
584
|
+
| {
|
|
585
|
+
name?: string;
|
|
586
|
+
type?:
|
|
587
|
+
| TransformationType.HYPER_FORMULA
|
|
588
|
+
| TransformationType.JAVASCRIPT;
|
|
589
|
+
function?: string;
|
|
590
|
+
}
|
|
591
|
+
| {
|
|
592
|
+
name?: string;
|
|
593
|
+
type?: TransformationType.OPTION_MAPPING;
|
|
594
|
+
allow_unmapped_values?: boolean;
|
|
595
|
+
mappings?: {
|
|
596
|
+
source_values?: (string | null)[];
|
|
597
|
+
target_options?: string[];
|
|
598
|
+
}[];
|
|
599
|
+
}
|
|
600
|
+
)[];
|
|
601
|
+
}[];
|
|
602
|
+
};
|
|
603
|
+
};
|
|
604
|
+
|
|
605
|
+
export type IExecutionDataResponse = {
|
|
606
|
+
trigger_type?: ExecutionTriggerType;
|
|
607
|
+
status?: ExecutionStatus;
|
|
608
|
+
configuration?: IExecutionConfiguration;
|
|
609
|
+
duration?: number;
|
|
610
|
+
start_at?: string;
|
|
611
|
+
error?: {
|
|
612
|
+
type?: ExecutionErrorType;
|
|
613
|
+
message?: string;
|
|
614
|
+
raw_error?: string;
|
|
615
|
+
};
|
|
616
|
+
index?: number;
|
|
617
|
+
} & {
|
|
618
|
+
id?: string;
|
|
619
|
+
createdAt?: string;
|
|
620
|
+
updatedAt?: string;
|
|
621
|
+
created_by?: {
|
|
622
|
+
id?: string;
|
|
623
|
+
name?: string;
|
|
624
|
+
};
|
|
625
|
+
updated_by?: {
|
|
626
|
+
id?: string;
|
|
627
|
+
name?: string;
|
|
628
|
+
};
|
|
629
|
+
};
|
|
630
|
+
|
|
631
|
+
export type IExecutionListProps = {
|
|
632
|
+
accessToken: string;
|
|
633
|
+
pipelineId?: string | null;
|
|
634
|
+
settings?: ISettingsBase;
|
|
635
|
+
onClose?: IOnClose;
|
|
636
|
+
onExecutionView?: IOnExecutionView;
|
|
637
|
+
};
|
|
638
|
+
|
|
639
|
+
export type IExecutionListHooksLogs = {
|
|
640
|
+
hasOnExecutionView: boolean;
|
|
641
|
+
hasOnClose: boolean;
|
|
642
|
+
};
|
|
643
|
+
|
|
644
|
+
export type IPipelineListSettings = ISettingsBase & {
|
|
645
|
+
allowPipelineCreation?: boolean;
|
|
646
|
+
};
|
|
647
|
+
|
|
648
|
+
export type IPipelineListProps = {
|
|
649
|
+
accessToken: string;
|
|
650
|
+
settings?: IPipelineListSettings;
|
|
651
|
+
onPipelineView?: IOnPipelineView;
|
|
652
|
+
onPipelineCreate?: IOnPipelineCreate;
|
|
653
|
+
onClose?: IOnClose;
|
|
654
|
+
};
|
|
655
|
+
|
|
656
|
+
export type IPipelineListHooksLogs = {
|
|
657
|
+
hasOnPipelineView: boolean;
|
|
658
|
+
hasOnPipelineCreate: boolean;
|
|
659
|
+
hasOnClose: boolean;
|
|
660
|
+
};
|
|
661
|
+
|
|
662
|
+
export type ICreateConnectorProps = {
|
|
663
|
+
accessToken: string;
|
|
664
|
+
configuration?: ICreateConnectorConfiguration;
|
|
665
|
+
settings?: ICreateConnectorSettings;
|
|
666
|
+
onConnectorCreate?: ICreateConnectorOnConnectorCreate;
|
|
667
|
+
onClose?: IOnClose;
|
|
668
|
+
};
|
|
669
|
+
|
|
670
|
+
export type ICreateConnectorConfiguration = {
|
|
671
|
+
name?: string;
|
|
672
|
+
type?: IConnectorType;
|
|
673
|
+
};
|
|
674
|
+
|
|
675
|
+
export type ICreateConnectorSettings = ISettingsBase & {
|
|
676
|
+
allowedInputConnectors?: (NodeType | `${NodeType}`)[];
|
|
677
|
+
allowedOutputConnectors?: (NodeType | `${NodeType}`)[];
|
|
678
|
+
};
|
|
679
|
+
|
|
680
|
+
export type ICreateConnectorOnConnectorCreate = ({
|
|
681
|
+
data,
|
|
682
|
+
}: {
|
|
683
|
+
data: IConnectorDetailResponse;
|
|
684
|
+
}) => void;
|
|
685
|
+
|
|
686
|
+
export type ICreateConnectorHooksLogs = {
|
|
687
|
+
hasOnConnectorCreate: boolean;
|
|
688
|
+
hasOnClose: boolean;
|
|
689
|
+
};
|
|
690
|
+
|
|
691
|
+
export enum NodeType {
|
|
692
|
+
AZURE = 'AZURE',
|
|
693
|
+
EMAIL = 'EMAIL',
|
|
694
|
+
FTP = 'FTP',
|
|
695
|
+
S3 = 'S3',
|
|
696
|
+
HTTP = 'HTTP',
|
|
697
|
+
GCS = 'GCS',
|
|
698
|
+
MANUAL = 'MANUAL',
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
export enum connectorType {
|
|
702
|
+
INPUT = 'input',
|
|
703
|
+
OUTPUT = 'output',
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
export type ICreateTargetDataModelProps = {
|
|
707
|
+
accessToken: string;
|
|
708
|
+
configuration?: ICreateTargetDataModelConfiguration;
|
|
709
|
+
settings?: ISettingsBase;
|
|
710
|
+
onTargetDataModelCreate?: ICreateTargetDataModelOnTargetDataModelCreate;
|
|
711
|
+
onClose?: IOnClose;
|
|
712
|
+
};
|
|
713
|
+
|
|
714
|
+
export type ICreateTargetDataModelConfiguration = {
|
|
715
|
+
name?: string;
|
|
716
|
+
};
|
|
717
|
+
|
|
718
|
+
export type ICreateTargetDataModelOnTargetDataModelCreate = ({
|
|
719
|
+
data,
|
|
720
|
+
}: {
|
|
721
|
+
data: ITdmItemResponse;
|
|
722
|
+
}) => void;
|
|
723
|
+
|
|
724
|
+
export type ICreateTargetDataModelHooksLogs = {
|
|
725
|
+
hasOnTargetDataModelCreate: boolean;
|
|
726
|
+
hasOnClose: boolean;
|
|
727
|
+
};
|
|
728
|
+
|
|
729
|
+
export enum FileType {
|
|
730
|
+
CSV = 'csv',
|
|
731
|
+
TSV = 'tsv',
|
|
732
|
+
XLS = 'xls',
|
|
733
|
+
XLSX = 'xlsx',
|
|
734
|
+
JSON = 'json',
|
|
735
|
+
XML = 'xml',
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
export type IFileUploaderProps = {
|
|
739
|
+
accessToken: string;
|
|
740
|
+
inputConnectorId: string;
|
|
741
|
+
settings?: IFileUploaderSettings;
|
|
742
|
+
onExecutionView?: IFileUploaderOnExecutionView;
|
|
743
|
+
onClose?: IOnClose;
|
|
744
|
+
};
|
|
745
|
+
|
|
746
|
+
export type IFileUploaderSettings = ISettingsBase & {
|
|
747
|
+
allowedFileTypes?: (FileType | `${FileType}`)[];
|
|
748
|
+
};
|
|
749
|
+
|
|
750
|
+
export type IFileUploaderOnExecutionView = ({
|
|
751
|
+
execution,
|
|
752
|
+
}: {
|
|
753
|
+
execution: string;
|
|
754
|
+
}) => void;
|
|
755
|
+
|
|
756
|
+
export type IFileUploaderHooksLogs = {
|
|
757
|
+
hasOnExecutionView: boolean;
|
|
758
|
+
hasOnClose: boolean;
|
|
759
|
+
};
|
|
760
|
+
|
|
761
|
+
export type IOnTargetDataModelUpdate = ({
|
|
762
|
+
data,
|
|
763
|
+
}: {
|
|
764
|
+
data?: ITdmItemResponse;
|
|
765
|
+
}) => void;
|
|
766
|
+
|
|
767
|
+
export type IOnTargetDataModelDelete = ({
|
|
768
|
+
data,
|
|
769
|
+
}: {
|
|
770
|
+
data?: ITdmItemResponse;
|
|
771
|
+
}) => void;
|
|
772
|
+
|
|
773
|
+
export type ITargetDataModelDetailsProps = {
|
|
774
|
+
accessToken: string;
|
|
775
|
+
targetDataModelId: string;
|
|
776
|
+
settings?: ISettingsBase;
|
|
777
|
+
onTargetDataModelUpdate?: IOnTargetDataModelUpdate;
|
|
778
|
+
onTargetDataModelDelete?: IOnTargetDataModelDelete;
|
|
779
|
+
onClose?: IOnClose;
|
|
780
|
+
};
|
|
781
|
+
|
|
782
|
+
export type IConnectorDetailsProps = {
|
|
783
|
+
accessToken: string;
|
|
784
|
+
connectorId: string;
|
|
785
|
+
settings?: ISettingsBase;
|
|
786
|
+
onClose?: IOnClose;
|
|
787
|
+
onConnectorUpdate?: IOnConnectorUpdate;
|
|
788
|
+
onConnectorDelete?: IOnConnectorDelete;
|
|
789
|
+
};
|
|
790
|
+
|
|
791
|
+
export type IOnConnectorUpdate = ({
|
|
792
|
+
data,
|
|
793
|
+
}: {
|
|
794
|
+
data: IConnectorDetailResponse;
|
|
795
|
+
}) => void;
|
|
796
|
+
export type IOnConnectorDelete = ({
|
|
797
|
+
data,
|
|
798
|
+
}: {
|
|
799
|
+
data: IConnectorDetailResponse;
|
|
800
|
+
}) => void;
|
|
801
|
+
|
|
802
|
+
export type IOnTargetDataModelView = ({
|
|
803
|
+
data,
|
|
804
|
+
}: {
|
|
805
|
+
data?: ITdmItemResponse;
|
|
806
|
+
}) => void;
|
|
807
|
+
|
|
808
|
+
export type IOnTargetDataModelCreate = () => void;
|
|
809
|
+
|
|
810
|
+
export type ITargetDataModelListProps = {
|
|
811
|
+
accessToken: string;
|
|
812
|
+
settings?: ISettingsBase & {
|
|
813
|
+
allowTargetDataModelCreation?: boolean;
|
|
814
|
+
};
|
|
815
|
+
onTargetDataModelView?: IOnTargetDataModelView;
|
|
816
|
+
onTargetDataModelCreate?: IOnTargetDataModelCreate;
|
|
817
|
+
onClose?: IOnClose;
|
|
818
|
+
};
|
|
819
|
+
export type IOnConnectorCreateList = () => void;
|
|
820
|
+
|
|
821
|
+
export type IOnConnectorView = (params: { data: IConnectorListItem }) => void;
|
|
822
|
+
|
|
823
|
+
export type IConnectorListProps = {
|
|
824
|
+
accessToken: string;
|
|
825
|
+
settings?: IConnectorListSettings;
|
|
826
|
+
onConnectorView?: IOnConnectorView;
|
|
827
|
+
onConnectorCreate?: IOnConnectorCreateList;
|
|
828
|
+
onClose?: IOnClose;
|
|
829
|
+
};
|
|
830
|
+
|
|
831
|
+
export type IConnectorListSettings = ISettingsBase & {
|
|
832
|
+
modal?: boolean;
|
|
833
|
+
allowConnectorCreation?: boolean;
|
|
834
|
+
};
|
|
835
|
+
|
|
836
|
+
export type IConnectorListHooksLogs = {
|
|
837
|
+
hasOnConnectorView: boolean;
|
|
838
|
+
hasOnConnectorCreate: boolean;
|
|
839
|
+
hasOnClose: boolean;
|
|
840
|
+
};
|
|
841
|
+
|
|
842
|
+
export declare function CreatePipeline(
|
|
843
|
+
selector: string,
|
|
844
|
+
config: ICreatePipelineProps
|
|
845
|
+
): void;
|
|
846
|
+
|
|
847
|
+
export declare function ExecutionDetails(
|
|
848
|
+
selector: string,
|
|
849
|
+
config: IExecutionDetailsProps
|
|
850
|
+
): void;
|
|
851
|
+
|
|
852
|
+
export declare function ExecutionList(
|
|
853
|
+
selector: string,
|
|
854
|
+
config: IExecutionListProps
|
|
855
|
+
): void;
|
|
856
|
+
|
|
857
|
+
export declare function PipelineList(
|
|
858
|
+
selector: string,
|
|
859
|
+
config: IPipelineListProps
|
|
860
|
+
): void;
|
|
861
|
+
|
|
862
|
+
export declare function PipelineDetails(
|
|
863
|
+
selector: string,
|
|
864
|
+
config: IPipelineDetailsProps
|
|
865
|
+
): void;
|
|
866
|
+
|
|
867
|
+
export declare function CreateConnector(
|
|
868
|
+
selector: string,
|
|
869
|
+
config: ICreateConnectorProps
|
|
870
|
+
): void;
|
|
871
|
+
|
|
872
|
+
export declare function CreateTargetDataModel(
|
|
873
|
+
selector: string,
|
|
874
|
+
config: ICreateTargetDataModelProps
|
|
875
|
+
): void;
|
|
876
|
+
|
|
877
|
+
export declare function FileUploader(
|
|
878
|
+
selector: string,
|
|
879
|
+
config: IFileUploaderProps
|
|
880
|
+
): void;
|
|
881
|
+
|
|
882
|
+
export declare function ConnectorDetails(
|
|
883
|
+
selector: string,
|
|
884
|
+
config: IConnectorDetailsProps
|
|
885
|
+
): void;
|
|
886
|
+
|
|
887
|
+
export declare function TargetDataModelList(
|
|
888
|
+
selector: string,
|
|
889
|
+
config: ITargetDataModelListProps
|
|
890
|
+
): void;
|
|
891
|
+
|
|
892
|
+
export declare function ConnectorList(
|
|
893
|
+
selector: string,
|
|
894
|
+
config: IConnectorListProps
|
|
895
|
+
): void;
|
|
896
|
+
|
|
897
|
+
export declare function TargetDataModelDetails(
|
|
898
|
+
selector: string,
|
|
899
|
+
config: ITargetDataModelDetailsProps
|
|
900
|
+
): void;
|