@kadoa/node-sdk 0.15.0 → 0.16.1
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 +81 -0
- package/dist/browser/index.global.js +17 -17
- package/dist/browser/index.global.js.map +1 -1
- package/dist/index.d.mts +709 -829
- package/dist/index.d.ts +709 -829
- package/dist/index.js +831 -919
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +834 -923
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import globalAxios2, { isAxiosError, AxiosError } from 'axios';
|
|
2
|
+
import { URL, URLSearchParams } from 'url';
|
|
2
3
|
import createDebug from 'debug';
|
|
3
4
|
import { upperFirst, camelCase, merge } from 'es-toolkit';
|
|
4
|
-
import { URL, URLSearchParams } from 'url';
|
|
5
5
|
import assert from 'assert';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
import { v4 } from 'uuid';
|
|
@@ -12,495 +12,70 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
12
12
|
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
13
13
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
14
14
|
});
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Url: "URL",
|
|
24
|
-
Email: "EMAIL",
|
|
25
|
-
Image: "IMAGE",
|
|
26
|
-
Video: "VIDEO",
|
|
27
|
-
Phone: "PHONE",
|
|
28
|
-
Boolean: "BOOLEAN",
|
|
29
|
-
Location: "LOCATION",
|
|
30
|
-
Array: "ARRAY",
|
|
31
|
-
Object: "OBJECT"
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
// src/runtime/pagination/paginator.ts
|
|
35
|
-
var PagedIterator = class {
|
|
36
|
-
constructor(fetchPage) {
|
|
37
|
-
this.fetchPage = fetchPage;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Fetch all items across all pages
|
|
41
|
-
* @param options Base options (page will be overridden)
|
|
42
|
-
* @returns Array of all items
|
|
43
|
-
*/
|
|
44
|
-
async fetchAll(options = {}) {
|
|
45
|
-
const allItems = [];
|
|
46
|
-
let currentPage = 1;
|
|
47
|
-
let hasMore = true;
|
|
48
|
-
while (hasMore) {
|
|
49
|
-
const result = await this.fetchPage({ ...options, page: currentPage });
|
|
50
|
-
allItems.push(...result.data);
|
|
51
|
-
const pagination = result.pagination;
|
|
52
|
-
hasMore = pagination.page !== void 0 && pagination.totalPages !== void 0 && pagination.page < pagination.totalPages;
|
|
53
|
-
currentPage++;
|
|
54
|
-
}
|
|
55
|
-
return allItems;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Create an async iterator for pages
|
|
59
|
-
* @param options Base options (page will be overridden)
|
|
60
|
-
* @returns Async generator that yields pages
|
|
61
|
-
*/
|
|
62
|
-
async *pages(options = {}) {
|
|
63
|
-
let currentPage = 1;
|
|
64
|
-
let hasMore = true;
|
|
65
|
-
while (hasMore) {
|
|
66
|
-
const result = await this.fetchPage({ ...options, page: currentPage });
|
|
67
|
-
yield result;
|
|
68
|
-
const pagination = result.pagination;
|
|
69
|
-
hasMore = pagination.page !== void 0 && pagination.totalPages !== void 0 && pagination.page < pagination.totalPages;
|
|
70
|
-
currentPage++;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Create an async iterator for individual items
|
|
75
|
-
* @param options Base options (page will be overridden)
|
|
76
|
-
* @returns Async generator that yields items
|
|
77
|
-
*/
|
|
78
|
-
async *items(options = {}) {
|
|
79
|
-
for await (const page of this.pages(options)) {
|
|
80
|
-
for (const item of page.data) {
|
|
81
|
-
yield item;
|
|
82
|
-
}
|
|
15
|
+
var BASE_PATH = "https://api.kadoa.com".replace(/\/+$/, "");
|
|
16
|
+
var BaseAPI = class {
|
|
17
|
+
constructor(configuration, basePath = BASE_PATH, axios2 = globalAxios2) {
|
|
18
|
+
this.basePath = basePath;
|
|
19
|
+
this.axios = axios2;
|
|
20
|
+
if (configuration) {
|
|
21
|
+
this.configuration = configuration;
|
|
22
|
+
this.basePath = configuration.basePath ?? basePath;
|
|
83
23
|
}
|
|
84
24
|
}
|
|
85
25
|
};
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
this.
|
|
91
|
-
this.defaultLimit = 100;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Fetch a page of workflow data
|
|
95
|
-
*/
|
|
96
|
-
async fetchData(options) {
|
|
97
|
-
const response = await this.workflowsApi.v4WorkflowsWorkflowIdDataGet({
|
|
98
|
-
...options,
|
|
99
|
-
page: options.page ?? 1,
|
|
100
|
-
limit: options.limit ?? this.defaultLimit
|
|
101
|
-
});
|
|
102
|
-
const result = response.data;
|
|
103
|
-
return result;
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Fetch all pages of workflow data
|
|
107
|
-
*/
|
|
108
|
-
async fetchAllData(options) {
|
|
109
|
-
const iterator = new PagedIterator(
|
|
110
|
-
(pageOptions) => this.fetchData({ ...options, ...pageOptions })
|
|
111
|
-
);
|
|
112
|
-
return iterator.fetchAll({ limit: options.limit ?? this.defaultLimit });
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Create an async iterator for paginated data fetching
|
|
116
|
-
*/
|
|
117
|
-
async *fetchDataPages(options) {
|
|
118
|
-
const iterator = new PagedIterator(
|
|
119
|
-
(pageOptions) => this.fetchData({ ...options, ...pageOptions })
|
|
120
|
-
);
|
|
121
|
-
for await (const page of iterator.pages({
|
|
122
|
-
limit: options.limit ?? this.defaultLimit
|
|
123
|
-
})) {
|
|
124
|
-
yield page;
|
|
125
|
-
}
|
|
26
|
+
var RequiredError = class extends Error {
|
|
27
|
+
constructor(field, msg) {
|
|
28
|
+
super(msg);
|
|
29
|
+
this.field = field;
|
|
30
|
+
this.name = "RequiredError";
|
|
126
31
|
}
|
|
127
32
|
};
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
var
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
BAD_REQUEST: "BAD_REQUEST",
|
|
134
|
-
NOT_FOUND: "NOT_FOUND",
|
|
135
|
-
INTERNAL_ERROR: "INTERNAL_ERROR"
|
|
136
|
-
};
|
|
137
|
-
var _KadoaSdkException = class _KadoaSdkException extends Error {
|
|
138
|
-
constructor(message, options) {
|
|
139
|
-
super(message);
|
|
140
|
-
this.name = "KadoaSdkException";
|
|
141
|
-
this.code = options?.code ?? "UNKNOWN";
|
|
142
|
-
this.details = options?.details;
|
|
143
|
-
if (options && "cause" in options) this.cause = options.cause;
|
|
144
|
-
Error.captureStackTrace?.(this, _KadoaSdkException);
|
|
145
|
-
}
|
|
146
|
-
static from(error, details) {
|
|
147
|
-
if (error instanceof _KadoaSdkException) return error;
|
|
148
|
-
const message = error instanceof Error ? error.message : typeof error === "string" ? error : "Unexpected error";
|
|
149
|
-
return new _KadoaSdkException(message, {
|
|
150
|
-
code: "UNKNOWN",
|
|
151
|
-
details,
|
|
152
|
-
cause: error
|
|
153
|
-
});
|
|
33
|
+
var operationServerMap = {};
|
|
34
|
+
var DUMMY_BASE_URL = "https://example.com";
|
|
35
|
+
var assertParamExists = function(functionName, paramName, paramValue) {
|
|
36
|
+
if (paramValue === null || paramValue === void 0) {
|
|
37
|
+
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
154
38
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
details: this.details
|
|
161
|
-
};
|
|
39
|
+
};
|
|
40
|
+
var setApiKeyToObject = async function(object, keyParamName, configuration) {
|
|
41
|
+
if (configuration && configuration.apiKey) {
|
|
42
|
+
const localVarApiKeyValue = typeof configuration.apiKey === "function" ? await configuration.apiKey(keyParamName) : await configuration.apiKey;
|
|
43
|
+
object[keyParamName] = localVarApiKeyValue;
|
|
162
44
|
}
|
|
163
|
-
|
|
164
|
-
|
|
45
|
+
};
|
|
46
|
+
var setBearerAuthToObject = async function(object, configuration) {
|
|
47
|
+
if (configuration && configuration.accessToken) {
|
|
48
|
+
const accessToken = typeof configuration.accessToken === "function" ? await configuration.accessToken() : await configuration.accessToken;
|
|
49
|
+
object["Authorization"] = "Bearer " + accessToken;
|
|
165
50
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
51
|
+
};
|
|
52
|
+
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
53
|
+
if (parameter == null) return;
|
|
54
|
+
if (typeof parameter === "object") {
|
|
55
|
+
if (Array.isArray(parameter)) {
|
|
56
|
+
parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
57
|
+
} else {
|
|
58
|
+
Object.keys(parameter).forEach(
|
|
59
|
+
(currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
|
|
60
|
+
);
|
|
170
61
|
}
|
|
171
|
-
|
|
172
|
-
|
|
62
|
+
} else {
|
|
63
|
+
if (urlSearchParams.has(key)) {
|
|
64
|
+
urlSearchParams.append(key, parameter);
|
|
65
|
+
} else {
|
|
66
|
+
urlSearchParams.set(key, parameter);
|
|
173
67
|
}
|
|
174
|
-
return parts.join("\n");
|
|
175
|
-
}
|
|
176
|
-
static isInstance(error) {
|
|
177
|
-
return error instanceof _KadoaSdkException;
|
|
178
|
-
}
|
|
179
|
-
static wrap(error, extra) {
|
|
180
|
-
if (error instanceof _KadoaSdkException) return error;
|
|
181
|
-
const message = extra?.message || (error instanceof Error ? error.message : typeof error === "string" ? error : "Unexpected error");
|
|
182
|
-
return new _KadoaSdkException(message, {
|
|
183
|
-
code: "UNKNOWN",
|
|
184
|
-
details: extra?.details,
|
|
185
|
-
cause: error
|
|
186
|
-
});
|
|
187
68
|
}
|
|
69
|
+
}
|
|
70
|
+
var setSearchParams = function(url, ...objects) {
|
|
71
|
+
const searchParams = new URLSearchParams(url.search);
|
|
72
|
+
setFlattenedQueryParams(searchParams, objects);
|
|
73
|
+
url.search = searchParams.toString();
|
|
188
74
|
};
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
RATE_LIMITED: "Rate limit exceeded. Please try again later",
|
|
194
|
-
NETWORK_ERROR: "Network error occurred",
|
|
195
|
-
SERVER_ERROR: "Server error occurred",
|
|
196
|
-
PARSE_ERROR: "Failed to parse response",
|
|
197
|
-
BAD_REQUEST: "Bad request",
|
|
198
|
-
ABORTED: "Aborted",
|
|
199
|
-
NOT_FOUND: "Not found",
|
|
200
|
-
// Workflow specific errors
|
|
201
|
-
NO_WORKFLOW_ID: "Failed to start extraction process - no ID received",
|
|
202
|
-
WORKFLOW_CREATE_FAILED: "Failed to create workflow",
|
|
203
|
-
WORKFLOW_TIMEOUT: "Workflow processing timed out",
|
|
204
|
-
WORKFLOW_UNEXPECTED_STATUS: "Extraction completed with unexpected status",
|
|
205
|
-
PROGRESS_CHECK_FAILED: "Failed to check extraction progress",
|
|
206
|
-
DATA_FETCH_FAILED: "Failed to retrieve extracted data from workflow",
|
|
207
|
-
// Extraction specific errors
|
|
208
|
-
NO_URLS: "At least one URL is required for extraction",
|
|
209
|
-
NO_API_KEY: "API key is required for entity detection",
|
|
210
|
-
LINK_REQUIRED: "Link is required for entity field detection",
|
|
211
|
-
NO_PREDICTIONS: "No entity predictions returned from the API",
|
|
212
|
-
EXTRACTION_FAILED: "Data extraction failed for the provided URLs",
|
|
213
|
-
ENTITY_FETCH_FAILED: "Failed to fetch entity fields",
|
|
214
|
-
ENTITY_INVARIANT_VIOLATION: "No valid entity provided",
|
|
215
|
-
// Schema specific errors
|
|
216
|
-
SCHEMA_NOT_FOUND: "Schema not found",
|
|
217
|
-
SCHEMA_FETCH_ERROR: "Failed to fetch schema",
|
|
218
|
-
SCHEMAS_FETCH_ERROR: "Failed to fetch schemas",
|
|
219
|
-
SCHEMA_CREATE_FAILED: "Failed to create schema",
|
|
220
|
-
SCHEMA_UPDATE_FAILED: "Failed to update schema",
|
|
221
|
-
SCHEMA_DELETE_FAILED: "Failed to delete schema"
|
|
222
|
-
};
|
|
223
|
-
var KadoaSdkException = _KadoaSdkException;
|
|
224
|
-
var ERROR_MESSAGES = KadoaSdkException.ERROR_MESSAGES;
|
|
225
|
-
var KadoaHttpException = class _KadoaHttpException extends KadoaSdkException {
|
|
226
|
-
constructor(message, options) {
|
|
227
|
-
super(message, {
|
|
228
|
-
code: options?.code,
|
|
229
|
-
details: options?.details,
|
|
230
|
-
cause: options?.cause
|
|
231
|
-
});
|
|
232
|
-
this.name = "KadoaHttpException";
|
|
233
|
-
this.httpStatus = options?.httpStatus;
|
|
234
|
-
this.requestId = options?.requestId;
|
|
235
|
-
this.endpoint = options?.endpoint;
|
|
236
|
-
this.method = options?.method;
|
|
237
|
-
this.responseBody = options?.responseBody;
|
|
238
|
-
}
|
|
239
|
-
static fromAxiosError(error, extra) {
|
|
240
|
-
const status = error.response?.status;
|
|
241
|
-
const requestId = error.response?.headers?.["x-request-id"] || error.response?.headers?.["x-amzn-requestid"];
|
|
242
|
-
const method = error.config?.method?.toUpperCase();
|
|
243
|
-
const url = error.config?.url;
|
|
244
|
-
return new _KadoaHttpException(extra?.message || error.message, {
|
|
245
|
-
code: _KadoaHttpException.mapStatusToCode(error),
|
|
246
|
-
httpStatus: status,
|
|
247
|
-
requestId,
|
|
248
|
-
endpoint: url,
|
|
249
|
-
method,
|
|
250
|
-
responseBody: error.response?.data,
|
|
251
|
-
details: extra?.details,
|
|
252
|
-
cause: error
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
toJSON() {
|
|
256
|
-
return {
|
|
257
|
-
...super.toJSON(),
|
|
258
|
-
httpStatus: this.httpStatus,
|
|
259
|
-
requestId: this.requestId,
|
|
260
|
-
endpoint: this.endpoint,
|
|
261
|
-
method: this.method,
|
|
262
|
-
responseBody: this.responseBody
|
|
263
|
-
};
|
|
264
|
-
}
|
|
265
|
-
toDetailedString() {
|
|
266
|
-
const parts = [`${this.name}: ${this.message}`, `Code: ${this.code}`];
|
|
267
|
-
if (this.httpStatus) {
|
|
268
|
-
parts.push(`HTTP Status: ${this.httpStatus}`);
|
|
269
|
-
}
|
|
270
|
-
if (this.method && this.endpoint) {
|
|
271
|
-
parts.push(`Request: ${this.method} ${this.endpoint}`);
|
|
272
|
-
}
|
|
273
|
-
if (this.requestId) {
|
|
274
|
-
parts.push(`Request ID: ${this.requestId}`);
|
|
275
|
-
}
|
|
276
|
-
if (this.responseBody) {
|
|
277
|
-
parts.push(
|
|
278
|
-
`Response Body: ${JSON.stringify(this.responseBody, null, 2)}`
|
|
279
|
-
);
|
|
280
|
-
}
|
|
281
|
-
if (this.details && Object.keys(this.details).length > 0) {
|
|
282
|
-
parts.push(`Details: ${JSON.stringify(this.details, null, 2)}`);
|
|
283
|
-
}
|
|
284
|
-
if (this.cause) {
|
|
285
|
-
parts.push(`Cause: ${this.cause}`);
|
|
286
|
-
}
|
|
287
|
-
return parts.join("\n");
|
|
288
|
-
}
|
|
289
|
-
static wrap(error, extra) {
|
|
290
|
-
if (error instanceof _KadoaHttpException) return error;
|
|
291
|
-
if (error instanceof KadoaSdkException) return error;
|
|
292
|
-
if (isAxiosError(error)) {
|
|
293
|
-
return _KadoaHttpException.fromAxiosError(error, extra);
|
|
294
|
-
}
|
|
295
|
-
return KadoaSdkException.wrap(error, extra);
|
|
296
|
-
}
|
|
297
|
-
static mapStatusToCode(errorOrStatus) {
|
|
298
|
-
const status = typeof errorOrStatus === "number" ? errorOrStatus : errorOrStatus.response?.status;
|
|
299
|
-
if (!status) {
|
|
300
|
-
if (typeof errorOrStatus === "number") return "UNKNOWN";
|
|
301
|
-
return errorOrStatus.code === "ECONNABORTED" ? "TIMEOUT" : errorOrStatus.request ? "NETWORK_ERROR" : "UNKNOWN";
|
|
302
|
-
}
|
|
303
|
-
if (status === 401 || status === 403) return "AUTH_ERROR";
|
|
304
|
-
if (status === 404) return "NOT_FOUND";
|
|
305
|
-
if (status === 408) return "TIMEOUT";
|
|
306
|
-
if (status === 429) return "RATE_LIMITED";
|
|
307
|
-
if (status >= 400 && status < 500) return "VALIDATION_ERROR";
|
|
308
|
-
if (status >= 500) return "HTTP_ERROR";
|
|
309
|
-
return "UNKNOWN";
|
|
310
|
-
}
|
|
311
|
-
};
|
|
312
|
-
var createLogger = (namespace) => createDebug(`kadoa:${namespace}`);
|
|
313
|
-
var logger = {
|
|
314
|
-
client: createLogger("client"),
|
|
315
|
-
wss: createLogger("wss"),
|
|
316
|
-
extraction: createLogger("extraction"),
|
|
317
|
-
http: createLogger("http"),
|
|
318
|
-
workflow: createLogger("workflow"),
|
|
319
|
-
crawl: createLogger("crawl"),
|
|
320
|
-
notifications: createLogger("notifications"),
|
|
321
|
-
schemas: createLogger("schemas"),
|
|
322
|
-
validation: createLogger("validation")
|
|
323
|
-
};
|
|
324
|
-
var _SchemaBuilder = class _SchemaBuilder {
|
|
325
|
-
constructor() {
|
|
326
|
-
this.fields = [];
|
|
327
|
-
}
|
|
328
|
-
hasSchemaFields() {
|
|
329
|
-
return this.fields.some((field) => field.fieldType === "SCHEMA");
|
|
330
|
-
}
|
|
331
|
-
entity(entityName) {
|
|
332
|
-
this.entityName = entityName;
|
|
333
|
-
return this;
|
|
334
|
-
}
|
|
335
|
-
/**
|
|
336
|
-
* Add a structured field to the schema
|
|
337
|
-
* @param name - Field name (alphanumeric only)
|
|
338
|
-
* @param description - Field description
|
|
339
|
-
* @param dataType - Data type (STRING, NUMBER, BOOLEAN, etc.)
|
|
340
|
-
* @param options - Optional field configuration
|
|
341
|
-
*/
|
|
342
|
-
field(name, description, dataType, options) {
|
|
343
|
-
this.validateFieldName(name);
|
|
344
|
-
const requiresExample = _SchemaBuilder.TYPES_REQUIRING_EXAMPLE.includes(dataType);
|
|
345
|
-
if (requiresExample && !options?.example) {
|
|
346
|
-
throw new KadoaSdkException(
|
|
347
|
-
`Field "${name}" with type ${dataType} requires an example`,
|
|
348
|
-
{ code: "VALIDATION_ERROR", details: { name, dataType } }
|
|
349
|
-
);
|
|
350
|
-
}
|
|
351
|
-
this.fields.push({
|
|
352
|
-
name,
|
|
353
|
-
description,
|
|
354
|
-
dataType,
|
|
355
|
-
fieldType: "SCHEMA",
|
|
356
|
-
example: options?.example,
|
|
357
|
-
isKey: options?.isKey
|
|
358
|
-
});
|
|
359
|
-
return this;
|
|
360
|
-
}
|
|
361
|
-
/**
|
|
362
|
-
* Add a classification field to categorize content
|
|
363
|
-
* @param name - Field name (alphanumeric only)
|
|
364
|
-
* @param description - Field description
|
|
365
|
-
* @param categories - Array of category definitions
|
|
366
|
-
*/
|
|
367
|
-
classify(name, description, categories) {
|
|
368
|
-
this.validateFieldName(name);
|
|
369
|
-
this.fields.push({
|
|
370
|
-
name,
|
|
371
|
-
description,
|
|
372
|
-
fieldType: "CLASSIFICATION",
|
|
373
|
-
categories
|
|
374
|
-
});
|
|
375
|
-
return this;
|
|
376
|
-
}
|
|
377
|
-
/**
|
|
378
|
-
* Add raw page content to extract
|
|
379
|
-
* @param name - Raw content format(s): "html", "markdown", or "url"
|
|
380
|
-
*/
|
|
381
|
-
raw(name) {
|
|
382
|
-
const names = Array.isArray(name) ? name : [name];
|
|
383
|
-
for (const name2 of names) {
|
|
384
|
-
const fieldName = `raw${upperFirst(camelCase(name2))}`;
|
|
385
|
-
if (this.fields.some((field) => field.name === fieldName)) {
|
|
386
|
-
continue;
|
|
387
|
-
}
|
|
388
|
-
this.fields.push({
|
|
389
|
-
name: fieldName,
|
|
390
|
-
description: `Raw page content in ${name2.toUpperCase()} format`,
|
|
391
|
-
fieldType: "METADATA",
|
|
392
|
-
metadataKey: name2
|
|
393
|
-
});
|
|
394
|
-
}
|
|
395
|
-
return this;
|
|
396
|
-
}
|
|
397
|
-
build() {
|
|
398
|
-
if (this.hasSchemaFields() && !this.entityName) {
|
|
399
|
-
throw new KadoaSdkException(
|
|
400
|
-
"Entity name is required when schema fields are present",
|
|
401
|
-
{
|
|
402
|
-
code: "VALIDATION_ERROR",
|
|
403
|
-
details: { entityName: this.entityName }
|
|
404
|
-
}
|
|
405
|
-
);
|
|
406
|
-
}
|
|
407
|
-
return {
|
|
408
|
-
entityName: this.entityName,
|
|
409
|
-
fields: this.fields
|
|
410
|
-
};
|
|
411
|
-
}
|
|
412
|
-
validateFieldName(name) {
|
|
413
|
-
if (!_SchemaBuilder.FIELD_NAME_PATTERN.test(name)) {
|
|
414
|
-
throw new KadoaSdkException(
|
|
415
|
-
`Field name "${name}" must be alphanumeric only (no underscores or special characters)`,
|
|
416
|
-
{
|
|
417
|
-
code: "VALIDATION_ERROR",
|
|
418
|
-
details: { name, pattern: "^[A-Za-z0-9]+$" }
|
|
419
|
-
}
|
|
420
|
-
);
|
|
421
|
-
}
|
|
422
|
-
const lowerName = name.toLowerCase();
|
|
423
|
-
if (this.fields.some((f) => f.name.toLowerCase() === lowerName)) {
|
|
424
|
-
throw new KadoaSdkException(`Duplicate field name: "${name}"`, {
|
|
425
|
-
code: "VALIDATION_ERROR",
|
|
426
|
-
details: { name }
|
|
427
|
-
});
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
};
|
|
431
|
-
_SchemaBuilder.FIELD_NAME_PATTERN = /^[A-Za-z0-9]+$/;
|
|
432
|
-
_SchemaBuilder.TYPES_REQUIRING_EXAMPLE = [
|
|
433
|
-
"STRING",
|
|
434
|
-
"IMAGE",
|
|
435
|
-
"LINK",
|
|
436
|
-
"OBJECT",
|
|
437
|
-
"ARRAY"
|
|
438
|
-
];
|
|
439
|
-
var SchemaBuilder = _SchemaBuilder;
|
|
440
|
-
var BASE_PATH = "https://api.kadoa.com".replace(/\/+$/, "");
|
|
441
|
-
var BaseAPI = class {
|
|
442
|
-
constructor(configuration, basePath = BASE_PATH, axios2 = globalAxios5) {
|
|
443
|
-
this.basePath = basePath;
|
|
444
|
-
this.axios = axios2;
|
|
445
|
-
if (configuration) {
|
|
446
|
-
this.configuration = configuration;
|
|
447
|
-
this.basePath = configuration.basePath ?? basePath;
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
};
|
|
451
|
-
var RequiredError = class extends Error {
|
|
452
|
-
constructor(field, msg) {
|
|
453
|
-
super(msg);
|
|
454
|
-
this.field = field;
|
|
455
|
-
this.name = "RequiredError";
|
|
456
|
-
}
|
|
457
|
-
};
|
|
458
|
-
var operationServerMap = {};
|
|
459
|
-
var DUMMY_BASE_URL = "https://example.com";
|
|
460
|
-
var assertParamExists = function(functionName, paramName, paramValue) {
|
|
461
|
-
if (paramValue === null || paramValue === void 0) {
|
|
462
|
-
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
463
|
-
}
|
|
464
|
-
};
|
|
465
|
-
var setApiKeyToObject = async function(object, keyParamName, configuration) {
|
|
466
|
-
if (configuration && configuration.apiKey) {
|
|
467
|
-
const localVarApiKeyValue = typeof configuration.apiKey === "function" ? await configuration.apiKey(keyParamName) : await configuration.apiKey;
|
|
468
|
-
object[keyParamName] = localVarApiKeyValue;
|
|
469
|
-
}
|
|
470
|
-
};
|
|
471
|
-
var setBearerAuthToObject = async function(object, configuration) {
|
|
472
|
-
if (configuration && configuration.accessToken) {
|
|
473
|
-
const accessToken = typeof configuration.accessToken === "function" ? await configuration.accessToken() : await configuration.accessToken;
|
|
474
|
-
object["Authorization"] = "Bearer " + accessToken;
|
|
475
|
-
}
|
|
476
|
-
};
|
|
477
|
-
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
478
|
-
if (parameter == null) return;
|
|
479
|
-
if (typeof parameter === "object") {
|
|
480
|
-
if (Array.isArray(parameter)) {
|
|
481
|
-
parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
482
|
-
} else {
|
|
483
|
-
Object.keys(parameter).forEach(
|
|
484
|
-
(currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
|
|
485
|
-
);
|
|
486
|
-
}
|
|
487
|
-
} else {
|
|
488
|
-
if (urlSearchParams.has(key)) {
|
|
489
|
-
urlSearchParams.append(key, parameter);
|
|
490
|
-
} else {
|
|
491
|
-
urlSearchParams.set(key, parameter);
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
var setSearchParams = function(url, ...objects) {
|
|
496
|
-
const searchParams = new URLSearchParams(url.search);
|
|
497
|
-
setFlattenedQueryParams(searchParams, objects);
|
|
498
|
-
url.search = searchParams.toString();
|
|
499
|
-
};
|
|
500
|
-
var serializeDataIfNeeded = function(value, requestOptions, configuration) {
|
|
501
|
-
const nonString = typeof value !== "string";
|
|
502
|
-
const needsSerialization = nonString && configuration && configuration.isJsonMime ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) : nonString;
|
|
503
|
-
return needsSerialization ? JSON.stringify(value !== void 0 ? value : {}) : value || "";
|
|
75
|
+
var serializeDataIfNeeded = function(value, requestOptions, configuration) {
|
|
76
|
+
const nonString = typeof value !== "string";
|
|
77
|
+
const needsSerialization = nonString && configuration && configuration.isJsonMime ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) : nonString;
|
|
78
|
+
return needsSerialization ? JSON.stringify(value !== void 0 ? value : {}) : value || "";
|
|
504
79
|
};
|
|
505
80
|
var toPathString = function(url) {
|
|
506
81
|
return url.pathname + url.search + url.hash;
|
|
@@ -1216,7 +791,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1216
791
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesActionsBulkApprovePost(bulkApproveRules, options);
|
|
1217
792
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1218
793
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesActionsBulkApprovePost"]?.[localVarOperationServerIndex]?.url;
|
|
1219
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
794
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1220
795
|
},
|
|
1221
796
|
/**
|
|
1222
797
|
* Bulk delete rules for a workflow
|
|
@@ -1228,7 +803,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1228
803
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesActionsBulkDeletePost(bulkDeleteRules, options);
|
|
1229
804
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1230
805
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesActionsBulkDeletePost"]?.[localVarOperationServerIndex]?.url;
|
|
1231
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
806
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1232
807
|
},
|
|
1233
808
|
/**
|
|
1234
809
|
* Delete all validation rules with optional filtering
|
|
@@ -1240,7 +815,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1240
815
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesActionsDeleteAllDelete(deleteRuleWithReason, options);
|
|
1241
816
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1242
817
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesActionsDeleteAllDelete"]?.[localVarOperationServerIndex]?.url;
|
|
1243
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
818
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1244
819
|
},
|
|
1245
820
|
/**
|
|
1246
821
|
* Generate a validation rule
|
|
@@ -1252,7 +827,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1252
827
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesActionsGeneratePost(generateRule, options);
|
|
1253
828
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1254
829
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesActionsGeneratePost"]?.[localVarOperationServerIndex]?.url;
|
|
1255
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
830
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1256
831
|
},
|
|
1257
832
|
/**
|
|
1258
833
|
* Generate multiple validation rules
|
|
@@ -1264,7 +839,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1264
839
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesActionsGenerateRulesPost(generateRules, options);
|
|
1265
840
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1266
841
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesActionsGenerateRulesPost"]?.[localVarOperationServerIndex]?.url;
|
|
1267
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
842
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1268
843
|
},
|
|
1269
844
|
/**
|
|
1270
845
|
* List validation rules with optional filtering
|
|
@@ -1281,7 +856,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1281
856
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesGet(groupId, workflowId, status, page, pageSize, includeDeleted, options);
|
|
1282
857
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1283
858
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesGet"]?.[localVarOperationServerIndex]?.url;
|
|
1284
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
859
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1285
860
|
},
|
|
1286
861
|
/**
|
|
1287
862
|
* Create a new validation rule
|
|
@@ -1293,7 +868,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1293
868
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesPost(createRule, options);
|
|
1294
869
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1295
870
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesPost"]?.[localVarOperationServerIndex]?.url;
|
|
1296
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
871
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1297
872
|
},
|
|
1298
873
|
/**
|
|
1299
874
|
* Delete a validation rule with reason
|
|
@@ -1306,7 +881,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1306
881
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesRuleIdDelete(ruleId, deleteRuleWithReason, options);
|
|
1307
882
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1308
883
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesRuleIdDelete"]?.[localVarOperationServerIndex]?.url;
|
|
1309
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
884
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1310
885
|
},
|
|
1311
886
|
/**
|
|
1312
887
|
* Disable a validation rule with reason
|
|
@@ -1319,7 +894,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1319
894
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesRuleIdDisablePost(ruleId, disableRule, options);
|
|
1320
895
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1321
896
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesRuleIdDisablePost"]?.[localVarOperationServerIndex]?.url;
|
|
1322
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
897
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1323
898
|
},
|
|
1324
899
|
/**
|
|
1325
900
|
* Get a validation rule by ID
|
|
@@ -1332,7 +907,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1332
907
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesRuleIdGet(ruleId, includeDeleted, options);
|
|
1333
908
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1334
909
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesRuleIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
1335
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
910
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1336
911
|
},
|
|
1337
912
|
/**
|
|
1338
913
|
* Update a validation rule
|
|
@@ -1345,7 +920,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1345
920
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesRuleIdPut(ruleId, updateRule, options);
|
|
1346
921
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1347
922
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesRuleIdPut"]?.[localVarOperationServerIndex]?.url;
|
|
1348
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
923
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1349
924
|
},
|
|
1350
925
|
/**
|
|
1351
926
|
* Get all anomalies for a validation
|
|
@@ -1360,7 +935,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1360
935
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationValidationsValidationIdAnomaliesGet(validationId, page, pageSize, options);
|
|
1361
936
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1362
937
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationValidationsValidationIdAnomaliesGet"]?.[localVarOperationServerIndex]?.url;
|
|
1363
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
938
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1364
939
|
},
|
|
1365
940
|
/**
|
|
1366
941
|
* Get anomalies for a specific rule
|
|
@@ -1376,7 +951,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1376
951
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet(validationId, ruleName, page, pageSize, options);
|
|
1377
952
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1378
953
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet"]?.[localVarOperationServerIndex]?.url;
|
|
1379
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
954
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1380
955
|
},
|
|
1381
956
|
/**
|
|
1382
957
|
* Get validation details
|
|
@@ -1390,7 +965,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1390
965
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationValidationsValidationIdGet(validationId, includeDryRun, options);
|
|
1391
966
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1392
967
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationValidationsValidationIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
1393
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
968
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1394
969
|
},
|
|
1395
970
|
/**
|
|
1396
971
|
* Schedule a data validation job (alternative path)
|
|
@@ -1405,7 +980,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1405
980
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowIdJobsJobIdValidatePost(workflowId, jobId, dataValidationRequestBody, options);
|
|
1406
981
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1407
982
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowIdJobsJobIdValidatePost"]?.[localVarOperationServerIndex]?.url;
|
|
1408
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
983
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1409
984
|
},
|
|
1410
985
|
/**
|
|
1411
986
|
* Schedule a data validation job
|
|
@@ -1420,7 +995,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1420
995
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost(workflowId, jobId, dataValidationRequestBody, options);
|
|
1421
996
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1422
997
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost"]?.[localVarOperationServerIndex]?.url;
|
|
1423
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
998
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1424
999
|
},
|
|
1425
1000
|
/**
|
|
1426
1001
|
* List all validations for a job
|
|
@@ -1437,7 +1012,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1437
1012
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet(workflowId, jobId, page, pageSize, includeDryRun, options);
|
|
1438
1013
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1439
1014
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet"]?.[localVarOperationServerIndex]?.url;
|
|
1440
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1015
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1441
1016
|
},
|
|
1442
1017
|
/**
|
|
1443
1018
|
* Get latest validation for a job
|
|
@@ -1452,7 +1027,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1452
1027
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet(workflowId, jobId, includeDryRun, options);
|
|
1453
1028
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1454
1029
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet"]?.[localVarOperationServerIndex]?.url;
|
|
1455
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1030
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1456
1031
|
},
|
|
1457
1032
|
/**
|
|
1458
1033
|
* Retrieves the current data validation configuration for a specific workflow
|
|
@@ -1465,7 +1040,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1465
1040
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowsWorkflowIdValidationConfigGet(workflowId, options);
|
|
1466
1041
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1467
1042
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationConfigGet"]?.[localVarOperationServerIndex]?.url;
|
|
1468
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1043
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1469
1044
|
},
|
|
1470
1045
|
/**
|
|
1471
1046
|
* Updates the complete data validation configuration including alerting settings
|
|
@@ -1479,7 +1054,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1479
1054
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowsWorkflowIdValidationConfigPut(workflowId, v4DataValidationWorkflowsWorkflowIdValidationConfigPutRequest, options);
|
|
1480
1055
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1481
1056
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationConfigPut"]?.[localVarOperationServerIndex]?.url;
|
|
1482
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1057
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1483
1058
|
},
|
|
1484
1059
|
/**
|
|
1485
1060
|
* Enables or disables data validation for a specific workflow
|
|
@@ -1493,7 +1068,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1493
1068
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowsWorkflowIdValidationTogglePut(workflowId, v4DataValidationWorkflowsWorkflowIdValidationTogglePutRequest, options);
|
|
1494
1069
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1495
1070
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationTogglePut"]?.[localVarOperationServerIndex]?.url;
|
|
1496
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1071
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1497
1072
|
},
|
|
1498
1073
|
/**
|
|
1499
1074
|
* Get latest validation for the most recent job of a workflow
|
|
@@ -1507,7 +1082,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1507
1082
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowsWorkflowIdValidationsLatestGet(workflowId, includeDryRun, options);
|
|
1508
1083
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1509
1084
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationsLatestGet"]?.[localVarOperationServerIndex]?.url;
|
|
1510
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1085
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1511
1086
|
}
|
|
1512
1087
|
};
|
|
1513
1088
|
};
|
|
@@ -2160,7 +1735,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2160
1735
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsChannelsChannelIdDelete(channelId, options);
|
|
2161
1736
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2162
1737
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsChannelsChannelIdDelete"]?.[localVarOperationServerIndex]?.url;
|
|
2163
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1738
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2164
1739
|
},
|
|
2165
1740
|
/**
|
|
2166
1741
|
*
|
|
@@ -2173,7 +1748,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2173
1748
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsChannelsChannelIdGet(channelId, options);
|
|
2174
1749
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2175
1750
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsChannelsChannelIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
2176
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1751
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2177
1752
|
},
|
|
2178
1753
|
/**
|
|
2179
1754
|
*
|
|
@@ -2187,7 +1762,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2187
1762
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsChannelsChannelIdPut(channelId, v5NotificationsChannelsPostRequest, options);
|
|
2188
1763
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2189
1764
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsChannelsChannelIdPut"]?.[localVarOperationServerIndex]?.url;
|
|
2190
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1765
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2191
1766
|
},
|
|
2192
1767
|
/**
|
|
2193
1768
|
*
|
|
@@ -2200,7 +1775,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2200
1775
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsChannelsGet(workflowId, options);
|
|
2201
1776
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2202
1777
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsChannelsGet"]?.[localVarOperationServerIndex]?.url;
|
|
2203
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1778
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2204
1779
|
},
|
|
2205
1780
|
/**
|
|
2206
1781
|
*
|
|
@@ -2213,7 +1788,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2213
1788
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsChannelsPost(v5NotificationsChannelsPostRequest, options);
|
|
2214
1789
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2215
1790
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsChannelsPost"]?.[localVarOperationServerIndex]?.url;
|
|
2216
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1791
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2217
1792
|
},
|
|
2218
1793
|
/**
|
|
2219
1794
|
*
|
|
@@ -2226,7 +1801,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2226
1801
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsEventTypesEventTypeGet(eventType, options);
|
|
2227
1802
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2228
1803
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsEventTypesEventTypeGet"]?.[localVarOperationServerIndex]?.url;
|
|
2229
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1804
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2230
1805
|
},
|
|
2231
1806
|
/**
|
|
2232
1807
|
*
|
|
@@ -2238,7 +1813,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2238
1813
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsEventTypesGet(options);
|
|
2239
1814
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2240
1815
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsEventTypesGet"]?.[localVarOperationServerIndex]?.url;
|
|
2241
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1816
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2242
1817
|
},
|
|
2243
1818
|
/**
|
|
2244
1819
|
*
|
|
@@ -2256,7 +1831,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2256
1831
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsLogsGet(workflowId, eventType, startDate, endDate, limit, offset, options);
|
|
2257
1832
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2258
1833
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsLogsGet"]?.[localVarOperationServerIndex]?.url;
|
|
2259
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1834
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2260
1835
|
},
|
|
2261
1836
|
/**
|
|
2262
1837
|
*
|
|
@@ -2270,7 +1845,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2270
1845
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsSettingsGet(workflowId, eventType, options);
|
|
2271
1846
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2272
1847
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsSettingsGet"]?.[localVarOperationServerIndex]?.url;
|
|
2273
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1848
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2274
1849
|
},
|
|
2275
1850
|
/**
|
|
2276
1851
|
*
|
|
@@ -2283,7 +1858,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2283
1858
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsSettingsPost(v5NotificationsSettingsPostRequest, options);
|
|
2284
1859
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2285
1860
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsSettingsPost"]?.[localVarOperationServerIndex]?.url;
|
|
2286
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1861
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2287
1862
|
},
|
|
2288
1863
|
/**
|
|
2289
1864
|
*
|
|
@@ -2296,7 +1871,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2296
1871
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsSettingsSettingsIdDelete(settingsId, options);
|
|
2297
1872
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2298
1873
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsSettingsSettingsIdDelete"]?.[localVarOperationServerIndex]?.url;
|
|
2299
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1874
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2300
1875
|
},
|
|
2301
1876
|
/**
|
|
2302
1877
|
*
|
|
@@ -2309,7 +1884,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2309
1884
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsSettingsSettingsIdGet(settingsId, options);
|
|
2310
1885
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2311
1886
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsSettingsSettingsIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
2312
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1887
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2313
1888
|
},
|
|
2314
1889
|
/**
|
|
2315
1890
|
*
|
|
@@ -2323,7 +1898,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2323
1898
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsSettingsSettingsIdPut(settingsId, v5NotificationsSettingsSettingsIdPutRequest, options);
|
|
2324
1899
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2325
1900
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsSettingsSettingsIdPut"]?.[localVarOperationServerIndex]?.url;
|
|
2326
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1901
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2327
1902
|
},
|
|
2328
1903
|
/**
|
|
2329
1904
|
*
|
|
@@ -2336,7 +1911,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2336
1911
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsTestPost(v5NotificationsTestPostRequest, options);
|
|
2337
1912
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2338
1913
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsTestPost"]?.[localVarOperationServerIndex]?.url;
|
|
2339
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1914
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2340
1915
|
}
|
|
2341
1916
|
};
|
|
2342
1917
|
};
|
|
@@ -2646,7 +2221,7 @@ var SchemasApiFp = function(configuration) {
|
|
|
2646
2221
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4SchemasGet(options);
|
|
2647
2222
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2648
2223
|
const localVarOperationServerBasePath = operationServerMap["SchemasApi.v4SchemasGet"]?.[localVarOperationServerIndex]?.url;
|
|
2649
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
2224
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2650
2225
|
},
|
|
2651
2226
|
/**
|
|
2652
2227
|
* Create a new data schema with specified fields and entity type
|
|
@@ -2659,7 +2234,7 @@ var SchemasApiFp = function(configuration) {
|
|
|
2659
2234
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4SchemasPost(createSchemaBody, options);
|
|
2660
2235
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2661
2236
|
const localVarOperationServerBasePath = operationServerMap["SchemasApi.v4SchemasPost"]?.[localVarOperationServerIndex]?.url;
|
|
2662
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
2237
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2663
2238
|
},
|
|
2664
2239
|
/**
|
|
2665
2240
|
* Delete a schema and all its revisions
|
|
@@ -2672,7 +2247,7 @@ var SchemasApiFp = function(configuration) {
|
|
|
2672
2247
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4SchemasSchemaIdDelete(schemaId, options);
|
|
2673
2248
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2674
2249
|
const localVarOperationServerBasePath = operationServerMap["SchemasApi.v4SchemasSchemaIdDelete"]?.[localVarOperationServerIndex]?.url;
|
|
2675
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
2250
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2676
2251
|
},
|
|
2677
2252
|
/**
|
|
2678
2253
|
* Retrieve a specific schema by its unique identifier
|
|
@@ -2685,7 +2260,7 @@ var SchemasApiFp = function(configuration) {
|
|
|
2685
2260
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4SchemasSchemaIdGet(schemaId, options);
|
|
2686
2261
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2687
2262
|
const localVarOperationServerBasePath = operationServerMap["SchemasApi.v4SchemasSchemaIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
2688
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
2263
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2689
2264
|
},
|
|
2690
2265
|
/**
|
|
2691
2266
|
* Update schema metadata or create a new revision with updated fields
|
|
@@ -2699,7 +2274,7 @@ var SchemasApiFp = function(configuration) {
|
|
|
2699
2274
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4SchemasSchemaIdPut(schemaId, updateSchemaBody, options);
|
|
2700
2275
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2701
2276
|
const localVarOperationServerBasePath = operationServerMap["SchemasApi.v4SchemasSchemaIdPut"]?.[localVarOperationServerIndex]?.url;
|
|
2702
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
2277
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2703
2278
|
}
|
|
2704
2279
|
};
|
|
2705
2280
|
};
|
|
@@ -2857,12 +2432,13 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
|
2857
2432
|
* @param {V4WorkflowsGetMonitoringEnum} [monitoring] Filter workflows by monitoring status
|
|
2858
2433
|
* @param {V4WorkflowsGetUpdateIntervalEnum} [updateInterval] Filter workflows by update interval
|
|
2859
2434
|
* @param {string} [templateId] Filter workflows by template ID (DEPRECATED - templates replaced by schemas)
|
|
2435
|
+
* @param {string} [userId] Filter workflows by user ID (only works in team context)
|
|
2860
2436
|
* @param {V4WorkflowsGetIncludeDeletedEnum} [includeDeleted] Include deleted workflows (for compliance officers)
|
|
2861
2437
|
* @param {V4WorkflowsGetFormatEnum} [format] Response format (json or csv for export)
|
|
2862
2438
|
* @param {*} [options] Override http request option.
|
|
2863
2439
|
* @throws {RequiredError}
|
|
2864
2440
|
*/
|
|
2865
|
-
v4WorkflowsGet: async (search, skip, limit, state, tags, monitoring, updateInterval, templateId, includeDeleted, format, options = {}) => {
|
|
2441
|
+
v4WorkflowsGet: async (search, skip, limit, state, tags, monitoring, updateInterval, templateId, userId, includeDeleted, format, options = {}) => {
|
|
2866
2442
|
const localVarPath = `/v4/workflows`;
|
|
2867
2443
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2868
2444
|
let baseOptions;
|
|
@@ -2897,6 +2473,9 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
|
2897
2473
|
if (templateId !== void 0) {
|
|
2898
2474
|
localVarQueryParameter["templateId"] = templateId;
|
|
2899
2475
|
}
|
|
2476
|
+
if (userId !== void 0) {
|
|
2477
|
+
localVarQueryParameter["userId"] = userId;
|
|
2478
|
+
}
|
|
2900
2479
|
if (includeDeleted !== void 0) {
|
|
2901
2480
|
localVarQueryParameter["includeDeleted"] = includeDeleted;
|
|
2902
2481
|
}
|
|
@@ -3336,262 +2915,144 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
|
3336
2915
|
* @param {*} [options] Override http request option.
|
|
3337
2916
|
* @throws {RequiredError}
|
|
3338
2917
|
*/
|
|
3339
|
-
v4WorkflowsWorkflowIdRunPut: async (workflowId, v4WorkflowsWorkflowIdRunPutRequest, options = {}) => {
|
|
3340
|
-
assertParamExists("v4WorkflowsWorkflowIdRunPut", "workflowId", workflowId);
|
|
3341
|
-
const localVarPath = `/v4/workflows/{workflowId}/run`.replace(`{${"workflowId"}}`, encodeURIComponent(String(workflowId)));
|
|
3342
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3343
|
-
let baseOptions;
|
|
3344
|
-
if (configuration) {
|
|
3345
|
-
baseOptions = configuration.baseOptions;
|
|
3346
|
-
}
|
|
3347
|
-
const localVarRequestOptions = { method: "PUT", ...baseOptions, ...options };
|
|
3348
|
-
const localVarHeaderParameter = {};
|
|
3349
|
-
const localVarQueryParameter = {};
|
|
3350
|
-
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
3351
|
-
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
3352
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3353
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3354
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
3355
|
-
localVarRequestOptions.data = serializeDataIfNeeded(v4WorkflowsWorkflowIdRunPutRequest, localVarRequestOptions, configuration);
|
|
3356
|
-
return {
|
|
3357
|
-
url: toPathString(localVarUrlObj),
|
|
3358
|
-
options: localVarRequestOptions
|
|
3359
|
-
};
|
|
3360
|
-
},
|
|
3361
|
-
/**
|
|
3362
|
-
*
|
|
3363
|
-
* @summary Schedule a workflow
|
|
3364
|
-
* @param {string} workflowId The ID of the workflow to schedule
|
|
3365
|
-
* @param {V4WorkflowsWorkflowIdSchedulePutRequest} v4WorkflowsWorkflowIdSchedulePutRequest ISO date (attention its timezone UTC) string required in request body
|
|
3366
|
-
* @param {*} [options] Override http request option.
|
|
3367
|
-
* @throws {RequiredError}
|
|
3368
|
-
*/
|
|
3369
|
-
v4WorkflowsWorkflowIdSchedulePut: async (workflowId, v4WorkflowsWorkflowIdSchedulePutRequest, options = {}) => {
|
|
3370
|
-
assertParamExists("v4WorkflowsWorkflowIdSchedulePut", "workflowId", workflowId);
|
|
3371
|
-
assertParamExists("v4WorkflowsWorkflowIdSchedulePut", "v4WorkflowsWorkflowIdSchedulePutRequest", v4WorkflowsWorkflowIdSchedulePutRequest);
|
|
3372
|
-
const localVarPath = `/v4/workflows/{workflowId}/schedule`.replace(`{${"workflowId"}}`, encodeURIComponent(String(workflowId)));
|
|
3373
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3374
|
-
let baseOptions;
|
|
3375
|
-
if (configuration) {
|
|
3376
|
-
baseOptions = configuration.baseOptions;
|
|
3377
|
-
}
|
|
3378
|
-
const localVarRequestOptions = { method: "PUT", ...baseOptions, ...options };
|
|
3379
|
-
const localVarHeaderParameter = {};
|
|
3380
|
-
const localVarQueryParameter = {};
|
|
3381
|
-
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
3382
|
-
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
3383
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3384
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3385
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
3386
|
-
localVarRequestOptions.data = serializeDataIfNeeded(v4WorkflowsWorkflowIdSchedulePutRequest, localVarRequestOptions, configuration);
|
|
3387
|
-
return {
|
|
3388
|
-
url: toPathString(localVarUrlObj),
|
|
3389
|
-
options: localVarRequestOptions
|
|
3390
|
-
};
|
|
3391
|
-
},
|
|
3392
|
-
/**
|
|
3393
|
-
*
|
|
3394
|
-
* @summary Get data change by ID (PostgreSQL)
|
|
3395
|
-
* @param {string} changeId ID of the workflow change to retrieve
|
|
3396
|
-
* @param {string} [xApiKey] API key for authorization
|
|
3397
|
-
* @param {string} [authorization] Bearer token for authorization
|
|
3398
|
-
* @param {*} [options] Override http request option.
|
|
3399
|
-
* @throws {RequiredError}
|
|
3400
|
-
*/
|
|
3401
|
-
v5ChangesChangeIdGet: async (changeId, xApiKey, authorization, options = {}) => {
|
|
3402
|
-
assertParamExists("v5ChangesChangeIdGet", "changeId", changeId);
|
|
3403
|
-
const localVarPath = `/v5/changes/{changeId}`.replace(`{${"changeId"}}`, encodeURIComponent(String(changeId)));
|
|
3404
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3405
|
-
let baseOptions;
|
|
3406
|
-
if (configuration) {
|
|
3407
|
-
baseOptions = configuration.baseOptions;
|
|
3408
|
-
}
|
|
3409
|
-
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
3410
|
-
const localVarHeaderParameter = {};
|
|
3411
|
-
const localVarQueryParameter = {};
|
|
3412
|
-
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
3413
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3414
|
-
if (xApiKey != null) {
|
|
3415
|
-
localVarHeaderParameter["x-api-key"] = String(xApiKey);
|
|
3416
|
-
}
|
|
3417
|
-
if (authorization != null) {
|
|
3418
|
-
localVarHeaderParameter["Authorization"] = String(authorization);
|
|
3419
|
-
}
|
|
3420
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3421
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3422
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
3423
|
-
return {
|
|
3424
|
-
url: toPathString(localVarUrlObj),
|
|
3425
|
-
options: localVarRequestOptions
|
|
3426
|
-
};
|
|
3427
|
-
},
|
|
3428
|
-
/**
|
|
3429
|
-
*
|
|
3430
|
-
* @summary Get all data changes (PostgreSQL)
|
|
3431
|
-
* @param {string} [xApiKey] API key for authorization
|
|
3432
|
-
* @param {string} [authorization] Bearer token for authorization
|
|
3433
|
-
* @param {string} [workflowIds] Comma-separated list of workflow IDs. If not provided, returns changes for all ACTIVE workflows
|
|
3434
|
-
* @param {string} [startDate] Start date to filter changes (ISO format)
|
|
3435
|
-
* @param {string} [endDate] End date to filter changes (ISO format)
|
|
3436
|
-
* @param {number} [skip] Number of records to skip for pagination
|
|
3437
|
-
* @param {number} [limit] Number of records to return for pagination
|
|
3438
|
-
* @param {*} [options] Override http request option.
|
|
3439
|
-
* @throws {RequiredError}
|
|
3440
|
-
*/
|
|
3441
|
-
v5ChangesGet: async (xApiKey, authorization, workflowIds, startDate, endDate, skip, limit, options = {}) => {
|
|
3442
|
-
const localVarPath = `/v5/changes`;
|
|
3443
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3444
|
-
let baseOptions;
|
|
3445
|
-
if (configuration) {
|
|
3446
|
-
baseOptions = configuration.baseOptions;
|
|
3447
|
-
}
|
|
3448
|
-
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
3449
|
-
const localVarHeaderParameter = {};
|
|
3450
|
-
const localVarQueryParameter = {};
|
|
3451
|
-
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
3452
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3453
|
-
if (workflowIds !== void 0) {
|
|
3454
|
-
localVarQueryParameter["workflowIds"] = workflowIds;
|
|
3455
|
-
}
|
|
3456
|
-
if (startDate !== void 0) {
|
|
3457
|
-
localVarQueryParameter["startDate"] = startDate instanceof Date ? startDate.toISOString() : startDate;
|
|
3458
|
-
}
|
|
3459
|
-
if (endDate !== void 0) {
|
|
3460
|
-
localVarQueryParameter["endDate"] = endDate instanceof Date ? endDate.toISOString() : endDate;
|
|
3461
|
-
}
|
|
3462
|
-
if (skip !== void 0) {
|
|
3463
|
-
localVarQueryParameter["skip"] = skip;
|
|
3464
|
-
}
|
|
3465
|
-
if (limit !== void 0) {
|
|
3466
|
-
localVarQueryParameter["limit"] = limit;
|
|
3467
|
-
}
|
|
3468
|
-
if (xApiKey != null) {
|
|
3469
|
-
localVarHeaderParameter["x-api-key"] = String(xApiKey);
|
|
3470
|
-
}
|
|
3471
|
-
if (authorization != null) {
|
|
3472
|
-
localVarHeaderParameter["Authorization"] = String(authorization);
|
|
3473
|
-
}
|
|
3474
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3475
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3476
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
3477
|
-
return {
|
|
3478
|
-
url: toPathString(localVarUrlObj),
|
|
3479
|
-
options: localVarRequestOptions
|
|
3480
|
-
};
|
|
3481
|
-
},
|
|
3482
|
-
/**
|
|
3483
|
-
* Permanently deletes a workflow and its associated tags
|
|
3484
|
-
* @summary Delete a workflow
|
|
3485
|
-
* @param {string} id The ID of the workflow to delete
|
|
3486
|
-
* @param {*} [options] Override http request option.
|
|
3487
|
-
* @throws {RequiredError}
|
|
3488
|
-
*/
|
|
3489
|
-
v5WorkflowsIdDelete: async (id, options = {}) => {
|
|
3490
|
-
assertParamExists("v5WorkflowsIdDelete", "id", id);
|
|
3491
|
-
const localVarPath = `/v5/workflows/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
2918
|
+
v4WorkflowsWorkflowIdRunPut: async (workflowId, v4WorkflowsWorkflowIdRunPutRequest, options = {}) => {
|
|
2919
|
+
assertParamExists("v4WorkflowsWorkflowIdRunPut", "workflowId", workflowId);
|
|
2920
|
+
const localVarPath = `/v4/workflows/{workflowId}/run`.replace(`{${"workflowId"}}`, encodeURIComponent(String(workflowId)));
|
|
3492
2921
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3493
2922
|
let baseOptions;
|
|
3494
2923
|
if (configuration) {
|
|
3495
2924
|
baseOptions = configuration.baseOptions;
|
|
3496
2925
|
}
|
|
3497
|
-
const localVarRequestOptions = { method: "
|
|
2926
|
+
const localVarRequestOptions = { method: "PUT", ...baseOptions, ...options };
|
|
3498
2927
|
const localVarHeaderParameter = {};
|
|
3499
2928
|
const localVarQueryParameter = {};
|
|
3500
2929
|
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
3501
|
-
|
|
2930
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
3502
2931
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3503
2932
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3504
2933
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2934
|
+
localVarRequestOptions.data = serializeDataIfNeeded(v4WorkflowsWorkflowIdRunPutRequest, localVarRequestOptions, configuration);
|
|
3505
2935
|
return {
|
|
3506
2936
|
url: toPathString(localVarUrlObj),
|
|
3507
2937
|
options: localVarRequestOptions
|
|
3508
2938
|
};
|
|
3509
2939
|
},
|
|
3510
2940
|
/**
|
|
3511
|
-
*
|
|
3512
|
-
* @summary
|
|
3513
|
-
* @param {string}
|
|
2941
|
+
*
|
|
2942
|
+
* @summary Schedule a workflow
|
|
2943
|
+
* @param {string} workflowId The ID of the workflow to schedule
|
|
2944
|
+
* @param {V4WorkflowsWorkflowIdSchedulePutRequest} v4WorkflowsWorkflowIdSchedulePutRequest ISO date (attention its timezone UTC) string required in request body
|
|
3514
2945
|
* @param {*} [options] Override http request option.
|
|
3515
2946
|
* @throws {RequiredError}
|
|
3516
2947
|
*/
|
|
3517
|
-
|
|
3518
|
-
assertParamExists("
|
|
3519
|
-
|
|
2948
|
+
v4WorkflowsWorkflowIdSchedulePut: async (workflowId, v4WorkflowsWorkflowIdSchedulePutRequest, options = {}) => {
|
|
2949
|
+
assertParamExists("v4WorkflowsWorkflowIdSchedulePut", "workflowId", workflowId);
|
|
2950
|
+
assertParamExists("v4WorkflowsWorkflowIdSchedulePut", "v4WorkflowsWorkflowIdSchedulePutRequest", v4WorkflowsWorkflowIdSchedulePutRequest);
|
|
2951
|
+
const localVarPath = `/v4/workflows/{workflowId}/schedule`.replace(`{${"workflowId"}}`, encodeURIComponent(String(workflowId)));
|
|
3520
2952
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3521
2953
|
let baseOptions;
|
|
3522
2954
|
if (configuration) {
|
|
3523
2955
|
baseOptions = configuration.baseOptions;
|
|
3524
2956
|
}
|
|
3525
|
-
const localVarRequestOptions = { method: "
|
|
2957
|
+
const localVarRequestOptions = { method: "PUT", ...baseOptions, ...options };
|
|
3526
2958
|
const localVarHeaderParameter = {};
|
|
3527
2959
|
const localVarQueryParameter = {};
|
|
3528
2960
|
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
3529
|
-
|
|
2961
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
3530
2962
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3531
2963
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3532
2964
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2965
|
+
localVarRequestOptions.data = serializeDataIfNeeded(v4WorkflowsWorkflowIdSchedulePutRequest, localVarRequestOptions, configuration);
|
|
3533
2966
|
return {
|
|
3534
2967
|
url: toPathString(localVarUrlObj),
|
|
3535
2968
|
options: localVarRequestOptions
|
|
3536
2969
|
};
|
|
3537
2970
|
},
|
|
3538
2971
|
/**
|
|
3539
|
-
*
|
|
3540
|
-
* @summary
|
|
3541
|
-
* @param {string}
|
|
3542
|
-
* @param {
|
|
2972
|
+
*
|
|
2973
|
+
* @summary Get data change by ID (PostgreSQL)
|
|
2974
|
+
* @param {string} changeId ID of the workflow change to retrieve
|
|
2975
|
+
* @param {string} [xApiKey] API key for authorization
|
|
2976
|
+
* @param {string} [authorization] Bearer token for authorization
|
|
3543
2977
|
* @param {*} [options] Override http request option.
|
|
3544
2978
|
* @throws {RequiredError}
|
|
3545
2979
|
*/
|
|
3546
|
-
|
|
3547
|
-
assertParamExists("
|
|
3548
|
-
|
|
3549
|
-
const localVarPath = `/v5/workflows/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
2980
|
+
v5ChangesChangeIdGet: async (changeId, xApiKey, authorization, options = {}) => {
|
|
2981
|
+
assertParamExists("v5ChangesChangeIdGet", "changeId", changeId);
|
|
2982
|
+
const localVarPath = `/v5/changes/{changeId}`.replace(`{${"changeId"}}`, encodeURIComponent(String(changeId)));
|
|
3550
2983
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3551
2984
|
let baseOptions;
|
|
3552
2985
|
if (configuration) {
|
|
3553
2986
|
baseOptions = configuration.baseOptions;
|
|
3554
2987
|
}
|
|
3555
|
-
const localVarRequestOptions = { method: "
|
|
2988
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
3556
2989
|
const localVarHeaderParameter = {};
|
|
3557
2990
|
const localVarQueryParameter = {};
|
|
3558
2991
|
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
3559
2992
|
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3560
|
-
|
|
2993
|
+
if (xApiKey != null) {
|
|
2994
|
+
localVarHeaderParameter["x-api-key"] = String(xApiKey);
|
|
2995
|
+
}
|
|
2996
|
+
if (authorization != null) {
|
|
2997
|
+
localVarHeaderParameter["Authorization"] = String(authorization);
|
|
2998
|
+
}
|
|
3561
2999
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3562
3000
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3563
3001
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
3564
|
-
localVarRequestOptions.data = serializeDataIfNeeded(v5WorkflowsIdPutRequest, localVarRequestOptions, configuration);
|
|
3565
3002
|
return {
|
|
3566
3003
|
url: toPathString(localVarUrlObj),
|
|
3567
3004
|
options: localVarRequestOptions
|
|
3568
3005
|
};
|
|
3569
3006
|
},
|
|
3570
3007
|
/**
|
|
3571
|
-
*
|
|
3572
|
-
* @summary
|
|
3573
|
-
* @param {
|
|
3008
|
+
*
|
|
3009
|
+
* @summary Get all data changes (PostgreSQL)
|
|
3010
|
+
* @param {string} [xApiKey] API key for authorization
|
|
3011
|
+
* @param {string} [authorization] Bearer token for authorization
|
|
3012
|
+
* @param {string} [workflowIds] Comma-separated list of workflow IDs. If not provided, returns changes for all ACTIVE workflows
|
|
3013
|
+
* @param {string} [startDate] Start date to filter changes (ISO format)
|
|
3014
|
+
* @param {string} [endDate] End date to filter changes (ISO format)
|
|
3015
|
+
* @param {number} [skip] Number of records to skip for pagination
|
|
3016
|
+
* @param {number} [limit] Number of records to return for pagination
|
|
3574
3017
|
* @param {*} [options] Override http request option.
|
|
3575
3018
|
* @throws {RequiredError}
|
|
3576
3019
|
*/
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
const localVarPath = `/v5/workflows`;
|
|
3020
|
+
v5ChangesGet: async (xApiKey, authorization, workflowIds, startDate, endDate, skip, limit, options = {}) => {
|
|
3021
|
+
const localVarPath = `/v5/changes`;
|
|
3580
3022
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3581
3023
|
let baseOptions;
|
|
3582
3024
|
if (configuration) {
|
|
3583
3025
|
baseOptions = configuration.baseOptions;
|
|
3584
3026
|
}
|
|
3585
|
-
const localVarRequestOptions = { method: "
|
|
3027
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
3586
3028
|
const localVarHeaderParameter = {};
|
|
3587
3029
|
const localVarQueryParameter = {};
|
|
3588
3030
|
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
3589
3031
|
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3590
|
-
|
|
3032
|
+
if (workflowIds !== void 0) {
|
|
3033
|
+
localVarQueryParameter["workflowIds"] = workflowIds;
|
|
3034
|
+
}
|
|
3035
|
+
if (startDate !== void 0) {
|
|
3036
|
+
localVarQueryParameter["startDate"] = startDate instanceof Date ? startDate.toISOString() : startDate;
|
|
3037
|
+
}
|
|
3038
|
+
if (endDate !== void 0) {
|
|
3039
|
+
localVarQueryParameter["endDate"] = endDate instanceof Date ? endDate.toISOString() : endDate;
|
|
3040
|
+
}
|
|
3041
|
+
if (skip !== void 0) {
|
|
3042
|
+
localVarQueryParameter["skip"] = skip;
|
|
3043
|
+
}
|
|
3044
|
+
if (limit !== void 0) {
|
|
3045
|
+
localVarQueryParameter["limit"] = limit;
|
|
3046
|
+
}
|
|
3047
|
+
if (xApiKey != null) {
|
|
3048
|
+
localVarHeaderParameter["x-api-key"] = String(xApiKey);
|
|
3049
|
+
}
|
|
3050
|
+
if (authorization != null) {
|
|
3051
|
+
localVarHeaderParameter["Authorization"] = String(authorization);
|
|
3052
|
+
}
|
|
3591
3053
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3592
3054
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3593
3055
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
3594
|
-
localVarRequestOptions.data = serializeDataIfNeeded(v5WorkflowsPostRequest, localVarRequestOptions, configuration);
|
|
3595
3056
|
return {
|
|
3596
3057
|
url: toPathString(localVarUrlObj),
|
|
3597
3058
|
options: localVarRequestOptions
|
|
@@ -3659,7 +3120,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3659
3120
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4ChangesChangeIdGet(changeId, xApiKey, authorization, options);
|
|
3660
3121
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3661
3122
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4ChangesChangeIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
3662
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3123
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3663
3124
|
},
|
|
3664
3125
|
/**
|
|
3665
3126
|
*
|
|
@@ -3678,7 +3139,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3678
3139
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4ChangesGet(xApiKey, authorization, workflowIds, startDate, endDate, skip, limit, options);
|
|
3679
3140
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3680
3141
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4ChangesGet"]?.[localVarOperationServerIndex]?.url;
|
|
3681
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3142
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3682
3143
|
},
|
|
3683
3144
|
/**
|
|
3684
3145
|
* Retrieves a list of workflows with pagination and search capabilities
|
|
@@ -3691,16 +3152,17 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3691
3152
|
* @param {V4WorkflowsGetMonitoringEnum} [monitoring] Filter workflows by monitoring status
|
|
3692
3153
|
* @param {V4WorkflowsGetUpdateIntervalEnum} [updateInterval] Filter workflows by update interval
|
|
3693
3154
|
* @param {string} [templateId] Filter workflows by template ID (DEPRECATED - templates replaced by schemas)
|
|
3155
|
+
* @param {string} [userId] Filter workflows by user ID (only works in team context)
|
|
3694
3156
|
* @param {V4WorkflowsGetIncludeDeletedEnum} [includeDeleted] Include deleted workflows (for compliance officers)
|
|
3695
3157
|
* @param {V4WorkflowsGetFormatEnum} [format] Response format (json or csv for export)
|
|
3696
3158
|
* @param {*} [options] Override http request option.
|
|
3697
3159
|
* @throws {RequiredError}
|
|
3698
3160
|
*/
|
|
3699
|
-
async v4WorkflowsGet(search, skip, limit, state, tags, monitoring, updateInterval, templateId, includeDeleted, format, options) {
|
|
3700
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsGet(search, skip, limit, state, tags, monitoring, updateInterval, templateId, includeDeleted, format, options);
|
|
3161
|
+
async v4WorkflowsGet(search, skip, limit, state, tags, monitoring, updateInterval, templateId, userId, includeDeleted, format, options) {
|
|
3162
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsGet(search, skip, limit, state, tags, monitoring, updateInterval, templateId, userId, includeDeleted, format, options);
|
|
3701
3163
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3702
3164
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsGet"]?.[localVarOperationServerIndex]?.url;
|
|
3703
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3165
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3704
3166
|
},
|
|
3705
3167
|
/**
|
|
3706
3168
|
* Create a new workflow with schema, custom fields, or agentic navigation mode
|
|
@@ -3713,7 +3175,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3713
3175
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsPost(createWorkflowBody, options);
|
|
3714
3176
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3715
3177
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsPost"]?.[localVarOperationServerIndex]?.url;
|
|
3716
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3178
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3717
3179
|
},
|
|
3718
3180
|
/**
|
|
3719
3181
|
*
|
|
@@ -3730,7 +3192,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3730
3192
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdAuditlogGet(workflowId, xApiKey, authorization, page, limit, options);
|
|
3731
3193
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3732
3194
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdAuditlogGet"]?.[localVarOperationServerIndex]?.url;
|
|
3733
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3195
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3734
3196
|
},
|
|
3735
3197
|
/**
|
|
3736
3198
|
*
|
|
@@ -3745,7 +3207,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3745
3207
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdComplianceApprovePut(workflowId, xApiKey, authorization, options);
|
|
3746
3208
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3747
3209
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdComplianceApprovePut"]?.[localVarOperationServerIndex]?.url;
|
|
3748
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3210
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3749
3211
|
},
|
|
3750
3212
|
/**
|
|
3751
3213
|
*
|
|
@@ -3761,7 +3223,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3761
3223
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdComplianceRejectPut(workflowId, v4WorkflowsWorkflowIdComplianceRejectPutRequest, xApiKey, authorization, options);
|
|
3762
3224
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3763
3225
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdComplianceRejectPut"]?.[localVarOperationServerIndex]?.url;
|
|
3764
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3226
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3765
3227
|
},
|
|
3766
3228
|
/**
|
|
3767
3229
|
*
|
|
@@ -3786,7 +3248,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3786
3248
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdDataGet(workflowId, xApiKey, authorization, runId, format, sortBy, order, filters, page, limit, gzip, rowIds, includeAnomalies, options);
|
|
3787
3249
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3788
3250
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdDataGet"]?.[localVarOperationServerIndex]?.url;
|
|
3789
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3251
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3790
3252
|
},
|
|
3791
3253
|
/**
|
|
3792
3254
|
*
|
|
@@ -3799,7 +3261,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3799
3261
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdDelete(workflowId, options);
|
|
3800
3262
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3801
3263
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdDelete"]?.[localVarOperationServerIndex]?.url;
|
|
3802
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3264
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3803
3265
|
},
|
|
3804
3266
|
/**
|
|
3805
3267
|
* Retrieves detailed information about a specific workflow. This endpoint requires authentication and proper team access permissions.
|
|
@@ -3812,7 +3274,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3812
3274
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdGet(workflowId, options);
|
|
3813
3275
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3814
3276
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
3815
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3277
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3816
3278
|
},
|
|
3817
3279
|
/**
|
|
3818
3280
|
*
|
|
@@ -3825,7 +3287,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3825
3287
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdHistoryGet(workflowId, options);
|
|
3826
3288
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3827
3289
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdHistoryGet"]?.[localVarOperationServerIndex]?.url;
|
|
3828
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3290
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3829
3291
|
},
|
|
3830
3292
|
/**
|
|
3831
3293
|
*
|
|
@@ -3839,7 +3301,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3839
3301
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdJobsJobIdGet(workflowId, jobId, options);
|
|
3840
3302
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3841
3303
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdJobsJobIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
3842
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3304
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3843
3305
|
},
|
|
3844
3306
|
/**
|
|
3845
3307
|
*
|
|
@@ -3853,7 +3315,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3853
3315
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdMetadataPut(workflowId, v4WorkflowsWorkflowIdMetadataPutRequest, options);
|
|
3854
3316
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3855
3317
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdMetadataPut"]?.[localVarOperationServerIndex]?.url;
|
|
3856
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3318
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3857
3319
|
},
|
|
3858
3320
|
/**
|
|
3859
3321
|
*
|
|
@@ -3866,7 +3328,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3866
3328
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdPausePut(workflowId, options);
|
|
3867
3329
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3868
3330
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdPausePut"]?.[localVarOperationServerIndex]?.url;
|
|
3869
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3331
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3870
3332
|
},
|
|
3871
3333
|
/**
|
|
3872
3334
|
* Resumes a paused, preview, or error workflow. If the user\'s team/organization or any of the user\'s organizations has the COMPLIANCE_REVIEW rule enabled, the workflow will be sent for compliance review instead of being directly activated.
|
|
@@ -3879,7 +3341,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3879
3341
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdResumePut(workflowId, options);
|
|
3880
3342
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3881
3343
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdResumePut"]?.[localVarOperationServerIndex]?.url;
|
|
3882
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3344
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3883
3345
|
},
|
|
3884
3346
|
/**
|
|
3885
3347
|
*
|
|
@@ -3893,7 +3355,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3893
3355
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdRunPut(workflowId, v4WorkflowsWorkflowIdRunPutRequest, options);
|
|
3894
3356
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3895
3357
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdRunPut"]?.[localVarOperationServerIndex]?.url;
|
|
3896
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3358
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3897
3359
|
},
|
|
3898
3360
|
/**
|
|
3899
3361
|
*
|
|
@@ -3907,7 +3369,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3907
3369
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdSchedulePut(workflowId, v4WorkflowsWorkflowIdSchedulePutRequest, options);
|
|
3908
3370
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3909
3371
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdSchedulePut"]?.[localVarOperationServerIndex]?.url;
|
|
3910
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3372
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3911
3373
|
},
|
|
3912
3374
|
/**
|
|
3913
3375
|
*
|
|
@@ -3922,7 +3384,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3922
3384
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5ChangesChangeIdGet(changeId, xApiKey, authorization, options);
|
|
3923
3385
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3924
3386
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5ChangesChangeIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
3925
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3387
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3926
3388
|
},
|
|
3927
3389
|
/**
|
|
3928
3390
|
*
|
|
@@ -3941,60 +3403,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3941
3403
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5ChangesGet(xApiKey, authorization, workflowIds, startDate, endDate, skip, limit, options);
|
|
3942
3404
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3943
3405
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5ChangesGet"]?.[localVarOperationServerIndex]?.url;
|
|
3944
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3945
|
-
},
|
|
3946
|
-
/**
|
|
3947
|
-
* Permanently deletes a workflow and its associated tags
|
|
3948
|
-
* @summary Delete a workflow
|
|
3949
|
-
* @param {string} id The ID of the workflow to delete
|
|
3950
|
-
* @param {*} [options] Override http request option.
|
|
3951
|
-
* @throws {RequiredError}
|
|
3952
|
-
*/
|
|
3953
|
-
async v5WorkflowsIdDelete(id, options) {
|
|
3954
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsIdDelete(id, options);
|
|
3955
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3956
|
-
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsIdDelete"]?.[localVarOperationServerIndex]?.url;
|
|
3957
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3958
|
-
},
|
|
3959
|
-
/**
|
|
3960
|
-
* Retrieves a specific workflow and its associated tags by ID
|
|
3961
|
-
* @summary Get workflow by ID
|
|
3962
|
-
* @param {string} id The ID of the workflow to retrieve
|
|
3963
|
-
* @param {*} [options] Override http request option.
|
|
3964
|
-
* @throws {RequiredError}
|
|
3965
|
-
*/
|
|
3966
|
-
async v5WorkflowsIdGet(id, options) {
|
|
3967
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsIdGet(id, options);
|
|
3968
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3969
|
-
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
3970
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3971
|
-
},
|
|
3972
|
-
/**
|
|
3973
|
-
* Updates an existing workflow\'s properties
|
|
3974
|
-
* @summary Update a workflow
|
|
3975
|
-
* @param {string} id The ID of the workflow to update
|
|
3976
|
-
* @param {V5WorkflowsIdPutRequest} v5WorkflowsIdPutRequest
|
|
3977
|
-
* @param {*} [options] Override http request option.
|
|
3978
|
-
* @throws {RequiredError}
|
|
3979
|
-
*/
|
|
3980
|
-
async v5WorkflowsIdPut(id, v5WorkflowsIdPutRequest, options) {
|
|
3981
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsIdPut(id, v5WorkflowsIdPutRequest, options);
|
|
3982
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3983
|
-
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsIdPut"]?.[localVarOperationServerIndex]?.url;
|
|
3984
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3985
|
-
},
|
|
3986
|
-
/**
|
|
3987
|
-
* Creates a new workflow in pending state
|
|
3988
|
-
* @summary Create a new workflow
|
|
3989
|
-
* @param {V5WorkflowsPostRequest} v5WorkflowsPostRequest
|
|
3990
|
-
* @param {*} [options] Override http request option.
|
|
3991
|
-
* @throws {RequiredError}
|
|
3992
|
-
*/
|
|
3993
|
-
async v5WorkflowsPost(v5WorkflowsPostRequest, options) {
|
|
3994
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsPost(v5WorkflowsPostRequest, options);
|
|
3995
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3996
|
-
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsPost"]?.[localVarOperationServerIndex]?.url;
|
|
3997
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3406
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3998
3407
|
},
|
|
3999
3408
|
/**
|
|
4000
3409
|
*
|
|
@@ -4011,7 +3420,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
4011
3420
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsWorkflowIdAuditlogGet(workflowId, xApiKey, authorization, page, limit, options);
|
|
4012
3421
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
4013
3422
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsWorkflowIdAuditlogGet"]?.[localVarOperationServerIndex]?.url;
|
|
4014
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3423
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
4015
3424
|
}
|
|
4016
3425
|
};
|
|
4017
3426
|
};
|
|
@@ -4044,7 +3453,7 @@ var WorkflowsApi = class extends BaseAPI {
|
|
|
4044
3453
|
* @throws {RequiredError}
|
|
4045
3454
|
*/
|
|
4046
3455
|
v4WorkflowsGet(requestParameters = {}, options) {
|
|
4047
|
-
return WorkflowsApiFp(this.configuration).v4WorkflowsGet(requestParameters.search, requestParameters.skip, requestParameters.limit, requestParameters.state, requestParameters.tags, requestParameters.monitoring, requestParameters.updateInterval, requestParameters.templateId, requestParameters.includeDeleted, requestParameters.format, options).then((request) => request(this.axios, this.basePath));
|
|
3456
|
+
return WorkflowsApiFp(this.configuration).v4WorkflowsGet(requestParameters.search, requestParameters.skip, requestParameters.limit, requestParameters.state, requestParameters.tags, requestParameters.monitoring, requestParameters.updateInterval, requestParameters.templateId, requestParameters.userId, requestParameters.includeDeleted, requestParameters.format, options).then((request) => request(this.axios, this.basePath));
|
|
4048
3457
|
}
|
|
4049
3458
|
/**
|
|
4050
3459
|
* Create a new workflow with schema, custom fields, or agentic navigation mode
|
|
@@ -4127,169 +3536,573 @@ var WorkflowsApi = class extends BaseAPI {
|
|
|
4127
3536
|
return WorkflowsApiFp(this.configuration).v4WorkflowsWorkflowIdHistoryGet(requestParameters.workflowId, options).then((request) => request(this.axios, this.basePath));
|
|
4128
3537
|
}
|
|
4129
3538
|
/**
|
|
4130
|
-
*
|
|
4131
|
-
* @summary Get job status and telemetry
|
|
4132
|
-
* @param {WorkflowsApiV4WorkflowsWorkflowIdJobsJobIdGetRequest} requestParameters Request parameters.
|
|
4133
|
-
* @param {*} [options] Override http request option.
|
|
4134
|
-
* @throws {RequiredError}
|
|
3539
|
+
*
|
|
3540
|
+
* @summary Get job status and telemetry
|
|
3541
|
+
* @param {WorkflowsApiV4WorkflowsWorkflowIdJobsJobIdGetRequest} requestParameters Request parameters.
|
|
3542
|
+
* @param {*} [options] Override http request option.
|
|
3543
|
+
* @throws {RequiredError}
|
|
3544
|
+
*/
|
|
3545
|
+
v4WorkflowsWorkflowIdJobsJobIdGet(requestParameters, options) {
|
|
3546
|
+
return WorkflowsApiFp(this.configuration).v4WorkflowsWorkflowIdJobsJobIdGet(requestParameters.workflowId, requestParameters.jobId, options).then((request) => request(this.axios, this.basePath));
|
|
3547
|
+
}
|
|
3548
|
+
/**
|
|
3549
|
+
*
|
|
3550
|
+
* @summary Update workflow metadata
|
|
3551
|
+
* @param {WorkflowsApiV4WorkflowsWorkflowIdMetadataPutRequest} requestParameters Request parameters.
|
|
3552
|
+
* @param {*} [options] Override http request option.
|
|
3553
|
+
* @throws {RequiredError}
|
|
3554
|
+
*/
|
|
3555
|
+
v4WorkflowsWorkflowIdMetadataPut(requestParameters, options) {
|
|
3556
|
+
return WorkflowsApiFp(this.configuration).v4WorkflowsWorkflowIdMetadataPut(requestParameters.workflowId, requestParameters.v4WorkflowsWorkflowIdMetadataPutRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3557
|
+
}
|
|
3558
|
+
/**
|
|
3559
|
+
*
|
|
3560
|
+
* @summary Pause a workflow
|
|
3561
|
+
* @param {WorkflowsApiV4WorkflowsWorkflowIdPausePutRequest} requestParameters Request parameters.
|
|
3562
|
+
* @param {*} [options] Override http request option.
|
|
3563
|
+
* @throws {RequiredError}
|
|
3564
|
+
*/
|
|
3565
|
+
v4WorkflowsWorkflowIdPausePut(requestParameters, options) {
|
|
3566
|
+
return WorkflowsApiFp(this.configuration).v4WorkflowsWorkflowIdPausePut(requestParameters.workflowId, options).then((request) => request(this.axios, this.basePath));
|
|
3567
|
+
}
|
|
3568
|
+
/**
|
|
3569
|
+
* Resumes a paused, preview, or error workflow. If the user\'s team/organization or any of the user\'s organizations has the COMPLIANCE_REVIEW rule enabled, the workflow will be sent for compliance review instead of being directly activated.
|
|
3570
|
+
* @summary Resume a workflow
|
|
3571
|
+
* @param {WorkflowsApiV4WorkflowsWorkflowIdResumePutRequest} requestParameters Request parameters.
|
|
3572
|
+
* @param {*} [options] Override http request option.
|
|
3573
|
+
* @throws {RequiredError}
|
|
3574
|
+
*/
|
|
3575
|
+
v4WorkflowsWorkflowIdResumePut(requestParameters, options) {
|
|
3576
|
+
return WorkflowsApiFp(this.configuration).v4WorkflowsWorkflowIdResumePut(requestParameters.workflowId, options).then((request) => request(this.axios, this.basePath));
|
|
3577
|
+
}
|
|
3578
|
+
/**
|
|
3579
|
+
*
|
|
3580
|
+
* @summary Run a workflow
|
|
3581
|
+
* @param {WorkflowsApiV4WorkflowsWorkflowIdRunPutRequest} requestParameters Request parameters.
|
|
3582
|
+
* @param {*} [options] Override http request option.
|
|
3583
|
+
* @throws {RequiredError}
|
|
3584
|
+
*/
|
|
3585
|
+
v4WorkflowsWorkflowIdRunPut(requestParameters, options) {
|
|
3586
|
+
return WorkflowsApiFp(this.configuration).v4WorkflowsWorkflowIdRunPut(requestParameters.workflowId, requestParameters.v4WorkflowsWorkflowIdRunPutRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3587
|
+
}
|
|
3588
|
+
/**
|
|
3589
|
+
*
|
|
3590
|
+
* @summary Schedule a workflow
|
|
3591
|
+
* @param {WorkflowsApiV4WorkflowsWorkflowIdSchedulePutRequest} requestParameters Request parameters.
|
|
3592
|
+
* @param {*} [options] Override http request option.
|
|
3593
|
+
* @throws {RequiredError}
|
|
3594
|
+
*/
|
|
3595
|
+
v4WorkflowsWorkflowIdSchedulePut(requestParameters, options) {
|
|
3596
|
+
return WorkflowsApiFp(this.configuration).v4WorkflowsWorkflowIdSchedulePut(requestParameters.workflowId, requestParameters.v4WorkflowsWorkflowIdSchedulePutRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3597
|
+
}
|
|
3598
|
+
/**
|
|
3599
|
+
*
|
|
3600
|
+
* @summary Get data change by ID (PostgreSQL)
|
|
3601
|
+
* @param {WorkflowsApiV5ChangesChangeIdGetRequest} requestParameters Request parameters.
|
|
3602
|
+
* @param {*} [options] Override http request option.
|
|
3603
|
+
* @throws {RequiredError}
|
|
3604
|
+
*/
|
|
3605
|
+
v5ChangesChangeIdGet(requestParameters, options) {
|
|
3606
|
+
return WorkflowsApiFp(this.configuration).v5ChangesChangeIdGet(requestParameters.changeId, requestParameters.xApiKey, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
3607
|
+
}
|
|
3608
|
+
/**
|
|
3609
|
+
*
|
|
3610
|
+
* @summary Get all data changes (PostgreSQL)
|
|
3611
|
+
* @param {WorkflowsApiV5ChangesGetRequest} requestParameters Request parameters.
|
|
3612
|
+
* @param {*} [options] Override http request option.
|
|
3613
|
+
* @throws {RequiredError}
|
|
3614
|
+
*/
|
|
3615
|
+
v5ChangesGet(requestParameters = {}, options) {
|
|
3616
|
+
return WorkflowsApiFp(this.configuration).v5ChangesGet(requestParameters.xApiKey, requestParameters.authorization, requestParameters.workflowIds, requestParameters.startDate, requestParameters.endDate, requestParameters.skip, requestParameters.limit, options).then((request) => request(this.axios, this.basePath));
|
|
3617
|
+
}
|
|
3618
|
+
/**
|
|
3619
|
+
*
|
|
3620
|
+
* @summary Get workflow audit log entries
|
|
3621
|
+
* @param {WorkflowsApiV5WorkflowsWorkflowIdAuditlogGetRequest} requestParameters Request parameters.
|
|
3622
|
+
* @param {*} [options] Override http request option.
|
|
3623
|
+
* @throws {RequiredError}
|
|
3624
|
+
*/
|
|
3625
|
+
v5WorkflowsWorkflowIdAuditlogGet(requestParameters, options) {
|
|
3626
|
+
return WorkflowsApiFp(this.configuration).v5WorkflowsWorkflowIdAuditlogGet(requestParameters.workflowId, requestParameters.xApiKey, requestParameters.authorization, requestParameters.page, requestParameters.limit, options).then((request) => request(this.axios, this.basePath));
|
|
3627
|
+
}
|
|
3628
|
+
};
|
|
3629
|
+
|
|
3630
|
+
// src/generated/configuration.ts
|
|
3631
|
+
var Configuration = class {
|
|
3632
|
+
constructor(param = {}) {
|
|
3633
|
+
this.apiKey = param.apiKey;
|
|
3634
|
+
this.username = param.username;
|
|
3635
|
+
this.password = param.password;
|
|
3636
|
+
this.accessToken = param.accessToken;
|
|
3637
|
+
this.basePath = param.basePath;
|
|
3638
|
+
this.serverIndex = param.serverIndex;
|
|
3639
|
+
this.baseOptions = {
|
|
3640
|
+
...param.baseOptions,
|
|
3641
|
+
headers: {
|
|
3642
|
+
...param.baseOptions?.headers
|
|
3643
|
+
}
|
|
3644
|
+
};
|
|
3645
|
+
this.formDataCtor = param.formDataCtor;
|
|
3646
|
+
}
|
|
3647
|
+
/**
|
|
3648
|
+
* Check if the given MIME is a JSON MIME.
|
|
3649
|
+
* JSON MIME examples:
|
|
3650
|
+
* application/json
|
|
3651
|
+
* application/json; charset=UTF8
|
|
3652
|
+
* APPLICATION/JSON
|
|
3653
|
+
* application/vnd.company+json
|
|
3654
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
3655
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
3656
|
+
*/
|
|
3657
|
+
isJsonMime(mime) {
|
|
3658
|
+
const jsonMime = new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$", "i");
|
|
3659
|
+
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === "application/json-patch+json");
|
|
3660
|
+
}
|
|
3661
|
+
};
|
|
3662
|
+
|
|
3663
|
+
// src/generated/models/data-field.ts
|
|
3664
|
+
var DataFieldDataTypeEnum = {
|
|
3665
|
+
String: "STRING",
|
|
3666
|
+
Number: "NUMBER",
|
|
3667
|
+
Boolean: "BOOLEAN",
|
|
3668
|
+
Date: "DATE",
|
|
3669
|
+
Datetime: "DATETIME",
|
|
3670
|
+
Money: "MONEY",
|
|
3671
|
+
Image: "IMAGE",
|
|
3672
|
+
Link: "LINK",
|
|
3673
|
+
Object: "OBJECT",
|
|
3674
|
+
Array: "ARRAY"
|
|
3675
|
+
};
|
|
3676
|
+
|
|
3677
|
+
// src/domains/extraction/extraction.acl.ts
|
|
3678
|
+
var FetchDataOptions = class {
|
|
3679
|
+
};
|
|
3680
|
+
var CanonicalSchemaFieldDataType = {
|
|
3681
|
+
String: DataFieldDataTypeEnum.String,
|
|
3682
|
+
Number: DataFieldDataTypeEnum.Number,
|
|
3683
|
+
Boolean: DataFieldDataTypeEnum.Boolean,
|
|
3684
|
+
Date: DataFieldDataTypeEnum.Date,
|
|
3685
|
+
Datetime: DataFieldDataTypeEnum.Datetime,
|
|
3686
|
+
Money: DataFieldDataTypeEnum.Money,
|
|
3687
|
+
Image: DataFieldDataTypeEnum.Image,
|
|
3688
|
+
Link: DataFieldDataTypeEnum.Link,
|
|
3689
|
+
Object: DataFieldDataTypeEnum.Object,
|
|
3690
|
+
Array: DataFieldDataTypeEnum.Array
|
|
3691
|
+
};
|
|
3692
|
+
var SchemaFieldDataType = {
|
|
3693
|
+
...CanonicalSchemaFieldDataType,
|
|
3694
|
+
/** @deprecated use `SchemaFieldDataType.String` */
|
|
3695
|
+
Text: DataFieldDataTypeEnum.String,
|
|
3696
|
+
/** @deprecated use `SchemaFieldDataType.Link` */
|
|
3697
|
+
Url: DataFieldDataTypeEnum.Link
|
|
3698
|
+
};
|
|
3699
|
+
|
|
3700
|
+
// src/runtime/pagination/paginator.ts
|
|
3701
|
+
var PagedIterator = class {
|
|
3702
|
+
constructor(fetchPage) {
|
|
3703
|
+
this.fetchPage = fetchPage;
|
|
3704
|
+
}
|
|
3705
|
+
/**
|
|
3706
|
+
* Fetch all items across all pages
|
|
3707
|
+
* @param options Base options (page will be overridden)
|
|
3708
|
+
* @returns Array of all items
|
|
3709
|
+
*/
|
|
3710
|
+
async fetchAll(options = {}) {
|
|
3711
|
+
const allItems = [];
|
|
3712
|
+
let currentPage = 1;
|
|
3713
|
+
let hasMore = true;
|
|
3714
|
+
while (hasMore) {
|
|
3715
|
+
const result = await this.fetchPage({ ...options, page: currentPage });
|
|
3716
|
+
allItems.push(...result.data);
|
|
3717
|
+
const pagination = result.pagination;
|
|
3718
|
+
hasMore = pagination.page !== void 0 && pagination.totalPages !== void 0 && pagination.page < pagination.totalPages;
|
|
3719
|
+
currentPage++;
|
|
3720
|
+
}
|
|
3721
|
+
return allItems;
|
|
3722
|
+
}
|
|
3723
|
+
/**
|
|
3724
|
+
* Create an async iterator for pages
|
|
3725
|
+
* @param options Base options (page will be overridden)
|
|
3726
|
+
* @returns Async generator that yields pages
|
|
4135
3727
|
*/
|
|
4136
|
-
|
|
4137
|
-
|
|
3728
|
+
async *pages(options = {}) {
|
|
3729
|
+
let currentPage = 1;
|
|
3730
|
+
let hasMore = true;
|
|
3731
|
+
while (hasMore) {
|
|
3732
|
+
const result = await this.fetchPage({ ...options, page: currentPage });
|
|
3733
|
+
yield result;
|
|
3734
|
+
const pagination = result.pagination;
|
|
3735
|
+
hasMore = pagination.page !== void 0 && pagination.totalPages !== void 0 && pagination.page < pagination.totalPages;
|
|
3736
|
+
currentPage++;
|
|
3737
|
+
}
|
|
4138
3738
|
}
|
|
4139
3739
|
/**
|
|
4140
|
-
*
|
|
4141
|
-
* @
|
|
4142
|
-
* @
|
|
4143
|
-
* @param {*} [options] Override http request option.
|
|
4144
|
-
* @throws {RequiredError}
|
|
3740
|
+
* Create an async iterator for individual items
|
|
3741
|
+
* @param options Base options (page will be overridden)
|
|
3742
|
+
* @returns Async generator that yields items
|
|
4145
3743
|
*/
|
|
4146
|
-
|
|
4147
|
-
|
|
3744
|
+
async *items(options = {}) {
|
|
3745
|
+
for await (const page of this.pages(options)) {
|
|
3746
|
+
for (const item of page.data) {
|
|
3747
|
+
yield item;
|
|
3748
|
+
}
|
|
3749
|
+
}
|
|
3750
|
+
}
|
|
3751
|
+
};
|
|
3752
|
+
|
|
3753
|
+
// src/domains/extraction/services/data-fetcher.service.ts
|
|
3754
|
+
var DataFetcherService = class {
|
|
3755
|
+
constructor(workflowsApi) {
|
|
3756
|
+
this.workflowsApi = workflowsApi;
|
|
3757
|
+
this.defaultLimit = 100;
|
|
4148
3758
|
}
|
|
4149
3759
|
/**
|
|
4150
|
-
*
|
|
4151
|
-
* @summary Pause a workflow
|
|
4152
|
-
* @param {WorkflowsApiV4WorkflowsWorkflowIdPausePutRequest} requestParameters Request parameters.
|
|
4153
|
-
* @param {*} [options] Override http request option.
|
|
4154
|
-
* @throws {RequiredError}
|
|
3760
|
+
* Fetch a page of workflow data
|
|
4155
3761
|
*/
|
|
4156
|
-
|
|
4157
|
-
|
|
3762
|
+
async fetchData(options) {
|
|
3763
|
+
const response = await this.workflowsApi.v4WorkflowsWorkflowIdDataGet({
|
|
3764
|
+
...options,
|
|
3765
|
+
page: options.page ?? 1,
|
|
3766
|
+
limit: options.limit ?? this.defaultLimit
|
|
3767
|
+
});
|
|
3768
|
+
const result = response.data;
|
|
3769
|
+
return result;
|
|
4158
3770
|
}
|
|
4159
3771
|
/**
|
|
4160
|
-
*
|
|
4161
|
-
* @summary Resume a workflow
|
|
4162
|
-
* @param {WorkflowsApiV4WorkflowsWorkflowIdResumePutRequest} requestParameters Request parameters.
|
|
4163
|
-
* @param {*} [options] Override http request option.
|
|
4164
|
-
* @throws {RequiredError}
|
|
3772
|
+
* Fetch all pages of workflow data
|
|
4165
3773
|
*/
|
|
4166
|
-
|
|
4167
|
-
|
|
3774
|
+
async fetchAllData(options) {
|
|
3775
|
+
const iterator = new PagedIterator(
|
|
3776
|
+
(pageOptions) => this.fetchData({ ...options, ...pageOptions })
|
|
3777
|
+
);
|
|
3778
|
+
return iterator.fetchAll({ limit: options.limit ?? this.defaultLimit });
|
|
4168
3779
|
}
|
|
4169
3780
|
/**
|
|
4170
|
-
*
|
|
4171
|
-
* @summary Run a workflow
|
|
4172
|
-
* @param {WorkflowsApiV4WorkflowsWorkflowIdRunPutRequest} requestParameters Request parameters.
|
|
4173
|
-
* @param {*} [options] Override http request option.
|
|
4174
|
-
* @throws {RequiredError}
|
|
3781
|
+
* Create an async iterator for paginated data fetching
|
|
4175
3782
|
*/
|
|
4176
|
-
|
|
4177
|
-
|
|
3783
|
+
async *fetchDataPages(options) {
|
|
3784
|
+
const iterator = new PagedIterator(
|
|
3785
|
+
(pageOptions) => this.fetchData({ ...options, ...pageOptions })
|
|
3786
|
+
);
|
|
3787
|
+
for await (const page of iterator.pages({
|
|
3788
|
+
limit: options.limit ?? this.defaultLimit
|
|
3789
|
+
})) {
|
|
3790
|
+
yield page;
|
|
3791
|
+
}
|
|
3792
|
+
}
|
|
3793
|
+
};
|
|
3794
|
+
|
|
3795
|
+
// src/runtime/exceptions/base.exception.ts
|
|
3796
|
+
var KadoaErrorCode = {
|
|
3797
|
+
AUTH_ERROR: "AUTH_ERROR",
|
|
3798
|
+
VALIDATION_ERROR: "VALIDATION_ERROR",
|
|
3799
|
+
BAD_REQUEST: "BAD_REQUEST",
|
|
3800
|
+
NOT_FOUND: "NOT_FOUND",
|
|
3801
|
+
INTERNAL_ERROR: "INTERNAL_ERROR"
|
|
3802
|
+
};
|
|
3803
|
+
var _KadoaSdkException = class _KadoaSdkException extends Error {
|
|
3804
|
+
constructor(message, options) {
|
|
3805
|
+
super(message);
|
|
3806
|
+
this.name = "KadoaSdkException";
|
|
3807
|
+
this.code = options?.code ?? "UNKNOWN";
|
|
3808
|
+
this.details = options?.details;
|
|
3809
|
+
if (options && "cause" in options) this.cause = options.cause;
|
|
3810
|
+
Error.captureStackTrace?.(this, _KadoaSdkException);
|
|
3811
|
+
}
|
|
3812
|
+
static from(error, details) {
|
|
3813
|
+
if (error instanceof _KadoaSdkException) return error;
|
|
3814
|
+
const message = error instanceof Error ? error.message : typeof error === "string" ? error : "Unexpected error";
|
|
3815
|
+
return new _KadoaSdkException(message, {
|
|
3816
|
+
code: "UNKNOWN",
|
|
3817
|
+
details,
|
|
3818
|
+
cause: error
|
|
3819
|
+
});
|
|
3820
|
+
}
|
|
3821
|
+
toJSON() {
|
|
3822
|
+
return {
|
|
3823
|
+
name: this.name,
|
|
3824
|
+
message: this.message,
|
|
3825
|
+
code: this.code,
|
|
3826
|
+
details: this.details
|
|
3827
|
+
};
|
|
3828
|
+
}
|
|
3829
|
+
toString() {
|
|
3830
|
+
return [this.name, this.code, this.message].filter(Boolean).join(": ");
|
|
3831
|
+
}
|
|
3832
|
+
toDetailedString() {
|
|
3833
|
+
const parts = [`${this.name}: ${this.message}`, `Code: ${this.code}`];
|
|
3834
|
+
if (this.details && Object.keys(this.details).length > 0) {
|
|
3835
|
+
parts.push(`Details: ${JSON.stringify(this.details, null, 2)}`);
|
|
3836
|
+
}
|
|
3837
|
+
if (this.cause) {
|
|
3838
|
+
parts.push(`Cause: ${this.cause}`);
|
|
3839
|
+
}
|
|
3840
|
+
return parts.join("\n");
|
|
3841
|
+
}
|
|
3842
|
+
static isInstance(error) {
|
|
3843
|
+
return error instanceof _KadoaSdkException;
|
|
3844
|
+
}
|
|
3845
|
+
static wrap(error, extra) {
|
|
3846
|
+
if (error instanceof _KadoaSdkException) return error;
|
|
3847
|
+
const message = extra?.message || (error instanceof Error ? error.message : typeof error === "string" ? error : "Unexpected error");
|
|
3848
|
+
return new _KadoaSdkException(message, {
|
|
3849
|
+
code: "UNKNOWN",
|
|
3850
|
+
details: extra?.details,
|
|
3851
|
+
cause: error
|
|
3852
|
+
});
|
|
3853
|
+
}
|
|
3854
|
+
};
|
|
3855
|
+
_KadoaSdkException.ERROR_MESSAGES = {
|
|
3856
|
+
// General errors
|
|
3857
|
+
CONFIG_ERROR: "Invalid configuration provided",
|
|
3858
|
+
AUTH_FAILED: "Authentication failed. Please check your API key",
|
|
3859
|
+
RATE_LIMITED: "Rate limit exceeded. Please try again later",
|
|
3860
|
+
NETWORK_ERROR: "Network error occurred",
|
|
3861
|
+
SERVER_ERROR: "Server error occurred",
|
|
3862
|
+
PARSE_ERROR: "Failed to parse response",
|
|
3863
|
+
BAD_REQUEST: "Bad request",
|
|
3864
|
+
ABORTED: "Aborted",
|
|
3865
|
+
NOT_FOUND: "Not found",
|
|
3866
|
+
// Workflow specific errors
|
|
3867
|
+
NO_WORKFLOW_ID: "Failed to start extraction process - no ID received",
|
|
3868
|
+
WORKFLOW_CREATE_FAILED: "Failed to create workflow",
|
|
3869
|
+
WORKFLOW_TIMEOUT: "Workflow processing timed out",
|
|
3870
|
+
WORKFLOW_UNEXPECTED_STATUS: "Extraction completed with unexpected status",
|
|
3871
|
+
PROGRESS_CHECK_FAILED: "Failed to check extraction progress",
|
|
3872
|
+
DATA_FETCH_FAILED: "Failed to retrieve extracted data from workflow",
|
|
3873
|
+
// Extraction specific errors
|
|
3874
|
+
NO_URLS: "At least one URL is required for extraction",
|
|
3875
|
+
NO_API_KEY: "API key is required for entity detection",
|
|
3876
|
+
LINK_REQUIRED: "Link is required for entity field detection",
|
|
3877
|
+
NO_PREDICTIONS: "No entity predictions returned from the API",
|
|
3878
|
+
EXTRACTION_FAILED: "Data extraction failed for the provided URLs",
|
|
3879
|
+
ENTITY_FETCH_FAILED: "Failed to fetch entity fields",
|
|
3880
|
+
ENTITY_INVARIANT_VIOLATION: "No valid entity provided",
|
|
3881
|
+
// Schema specific errors
|
|
3882
|
+
SCHEMA_NOT_FOUND: "Schema not found",
|
|
3883
|
+
SCHEMA_FETCH_ERROR: "Failed to fetch schema",
|
|
3884
|
+
SCHEMAS_FETCH_ERROR: "Failed to fetch schemas",
|
|
3885
|
+
SCHEMA_CREATE_FAILED: "Failed to create schema",
|
|
3886
|
+
SCHEMA_UPDATE_FAILED: "Failed to update schema",
|
|
3887
|
+
SCHEMA_DELETE_FAILED: "Failed to delete schema"
|
|
3888
|
+
};
|
|
3889
|
+
var KadoaSdkException = _KadoaSdkException;
|
|
3890
|
+
var ERROR_MESSAGES = KadoaSdkException.ERROR_MESSAGES;
|
|
3891
|
+
var KadoaHttpException = class _KadoaHttpException extends KadoaSdkException {
|
|
3892
|
+
constructor(message, options) {
|
|
3893
|
+
super(message, {
|
|
3894
|
+
code: options?.code,
|
|
3895
|
+
details: options?.details,
|
|
3896
|
+
cause: options?.cause
|
|
3897
|
+
});
|
|
3898
|
+
this.name = "KadoaHttpException";
|
|
3899
|
+
this.httpStatus = options?.httpStatus;
|
|
3900
|
+
this.requestId = options?.requestId;
|
|
3901
|
+
this.endpoint = options?.endpoint;
|
|
3902
|
+
this.method = options?.method;
|
|
3903
|
+
this.responseBody = options?.responseBody;
|
|
3904
|
+
}
|
|
3905
|
+
static fromAxiosError(error, extra) {
|
|
3906
|
+
const status = error.response?.status;
|
|
3907
|
+
const requestId = error.response?.headers?.["x-request-id"] || error.response?.headers?.["x-amzn-requestid"];
|
|
3908
|
+
const method = error.config?.method?.toUpperCase();
|
|
3909
|
+
const url = error.config?.url;
|
|
3910
|
+
return new _KadoaHttpException(extra?.message || error.message, {
|
|
3911
|
+
code: _KadoaHttpException.mapStatusToCode(error),
|
|
3912
|
+
httpStatus: status,
|
|
3913
|
+
requestId,
|
|
3914
|
+
endpoint: url,
|
|
3915
|
+
method,
|
|
3916
|
+
responseBody: error.response?.data,
|
|
3917
|
+
details: extra?.details,
|
|
3918
|
+
cause: error
|
|
3919
|
+
});
|
|
3920
|
+
}
|
|
3921
|
+
toJSON() {
|
|
3922
|
+
return {
|
|
3923
|
+
...super.toJSON(),
|
|
3924
|
+
httpStatus: this.httpStatus,
|
|
3925
|
+
requestId: this.requestId,
|
|
3926
|
+
endpoint: this.endpoint,
|
|
3927
|
+
method: this.method,
|
|
3928
|
+
responseBody: this.responseBody
|
|
3929
|
+
};
|
|
3930
|
+
}
|
|
3931
|
+
toDetailedString() {
|
|
3932
|
+
const parts = [`${this.name}: ${this.message}`, `Code: ${this.code}`];
|
|
3933
|
+
if (this.httpStatus) {
|
|
3934
|
+
parts.push(`HTTP Status: ${this.httpStatus}`);
|
|
3935
|
+
}
|
|
3936
|
+
if (this.method && this.endpoint) {
|
|
3937
|
+
parts.push(`Request: ${this.method} ${this.endpoint}`);
|
|
3938
|
+
}
|
|
3939
|
+
if (this.requestId) {
|
|
3940
|
+
parts.push(`Request ID: ${this.requestId}`);
|
|
3941
|
+
}
|
|
3942
|
+
if (this.responseBody) {
|
|
3943
|
+
parts.push(
|
|
3944
|
+
`Response Body: ${JSON.stringify(this.responseBody, null, 2)}`
|
|
3945
|
+
);
|
|
3946
|
+
}
|
|
3947
|
+
if (this.details && Object.keys(this.details).length > 0) {
|
|
3948
|
+
parts.push(`Details: ${JSON.stringify(this.details, null, 2)}`);
|
|
3949
|
+
}
|
|
3950
|
+
if (this.cause) {
|
|
3951
|
+
parts.push(`Cause: ${this.cause}`);
|
|
3952
|
+
}
|
|
3953
|
+
return parts.join("\n");
|
|
4178
3954
|
}
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
v4WorkflowsWorkflowIdSchedulePut(requestParameters, options) {
|
|
4187
|
-
return WorkflowsApiFp(this.configuration).v4WorkflowsWorkflowIdSchedulePut(requestParameters.workflowId, requestParameters.v4WorkflowsWorkflowIdSchedulePutRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3955
|
+
static wrap(error, extra) {
|
|
3956
|
+
if (error instanceof _KadoaHttpException) return error;
|
|
3957
|
+
if (error instanceof KadoaSdkException) return error;
|
|
3958
|
+
if (isAxiosError(error)) {
|
|
3959
|
+
return _KadoaHttpException.fromAxiosError(error, extra);
|
|
3960
|
+
}
|
|
3961
|
+
return KadoaSdkException.wrap(error, extra);
|
|
4188
3962
|
}
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
3963
|
+
static mapStatusToCode(errorOrStatus) {
|
|
3964
|
+
const status = typeof errorOrStatus === "number" ? errorOrStatus : errorOrStatus.response?.status;
|
|
3965
|
+
if (!status) {
|
|
3966
|
+
if (typeof errorOrStatus === "number") return "UNKNOWN";
|
|
3967
|
+
return errorOrStatus.code === "ECONNABORTED" ? "TIMEOUT" : errorOrStatus.request ? "NETWORK_ERROR" : "UNKNOWN";
|
|
3968
|
+
}
|
|
3969
|
+
if (status === 401 || status === 403) return "AUTH_ERROR";
|
|
3970
|
+
if (status === 404) return "NOT_FOUND";
|
|
3971
|
+
if (status === 408) return "TIMEOUT";
|
|
3972
|
+
if (status === 429) return "RATE_LIMITED";
|
|
3973
|
+
if (status >= 400 && status < 500) return "VALIDATION_ERROR";
|
|
3974
|
+
if (status >= 500) return "HTTP_ERROR";
|
|
3975
|
+
return "UNKNOWN";
|
|
4198
3976
|
}
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
3977
|
+
};
|
|
3978
|
+
var createLogger = (namespace) => createDebug(`kadoa:${namespace}`);
|
|
3979
|
+
var logger = {
|
|
3980
|
+
client: createLogger("client"),
|
|
3981
|
+
wss: createLogger("wss"),
|
|
3982
|
+
extraction: createLogger("extraction"),
|
|
3983
|
+
http: createLogger("http"),
|
|
3984
|
+
workflow: createLogger("workflow"),
|
|
3985
|
+
crawl: createLogger("crawl"),
|
|
3986
|
+
notifications: createLogger("notifications"),
|
|
3987
|
+
schemas: createLogger("schemas"),
|
|
3988
|
+
validation: createLogger("validation")
|
|
3989
|
+
};
|
|
3990
|
+
var _SchemaBuilder = class _SchemaBuilder {
|
|
3991
|
+
constructor() {
|
|
3992
|
+
this.fields = [];
|
|
4208
3993
|
}
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
* @summary Delete a workflow
|
|
4212
|
-
* @param {WorkflowsApiV5WorkflowsIdDeleteRequest} requestParameters Request parameters.
|
|
4213
|
-
* @param {*} [options] Override http request option.
|
|
4214
|
-
* @throws {RequiredError}
|
|
4215
|
-
*/
|
|
4216
|
-
v5WorkflowsIdDelete(requestParameters, options) {
|
|
4217
|
-
return WorkflowsApiFp(this.configuration).v5WorkflowsIdDelete(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
|
|
3994
|
+
hasSchemaFields() {
|
|
3995
|
+
return this.fields.some((field) => field.fieldType === "SCHEMA");
|
|
4218
3996
|
}
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
* @param {WorkflowsApiV5WorkflowsIdGetRequest} requestParameters Request parameters.
|
|
4223
|
-
* @param {*} [options] Override http request option.
|
|
4224
|
-
* @throws {RequiredError}
|
|
4225
|
-
*/
|
|
4226
|
-
v5WorkflowsIdGet(requestParameters, options) {
|
|
4227
|
-
return WorkflowsApiFp(this.configuration).v5WorkflowsIdGet(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
|
|
3997
|
+
entity(entityName) {
|
|
3998
|
+
this.entityName = entityName;
|
|
3999
|
+
return this;
|
|
4228
4000
|
}
|
|
4229
4001
|
/**
|
|
4230
|
-
*
|
|
4231
|
-
* @
|
|
4232
|
-
* @param
|
|
4233
|
-
* @param
|
|
4234
|
-
* @
|
|
4002
|
+
* Add a structured field to the schema
|
|
4003
|
+
* @param name - Field name (alphanumeric only)
|
|
4004
|
+
* @param description - Field description
|
|
4005
|
+
* @param dataType - Data type (STRING, NUMBER, BOOLEAN, etc.)
|
|
4006
|
+
* @param options - Optional field configuration
|
|
4235
4007
|
*/
|
|
4236
|
-
|
|
4237
|
-
|
|
4008
|
+
field(name, description, dataType, options) {
|
|
4009
|
+
this.validateFieldName(name);
|
|
4010
|
+
const requiresExample = _SchemaBuilder.TYPES_REQUIRING_EXAMPLE.includes(dataType);
|
|
4011
|
+
if (requiresExample && !options?.example) {
|
|
4012
|
+
throw new KadoaSdkException(
|
|
4013
|
+
`Field "${name}" with type ${dataType} requires an example`,
|
|
4014
|
+
{ code: "VALIDATION_ERROR", details: { name, dataType } }
|
|
4015
|
+
);
|
|
4016
|
+
}
|
|
4017
|
+
this.fields.push({
|
|
4018
|
+
name,
|
|
4019
|
+
description,
|
|
4020
|
+
dataType,
|
|
4021
|
+
fieldType: "SCHEMA",
|
|
4022
|
+
example: options?.example,
|
|
4023
|
+
isKey: options?.isKey
|
|
4024
|
+
});
|
|
4025
|
+
return this;
|
|
4238
4026
|
}
|
|
4239
4027
|
/**
|
|
4240
|
-
*
|
|
4241
|
-
* @
|
|
4242
|
-
* @param
|
|
4243
|
-
* @param
|
|
4244
|
-
* @throws {RequiredError}
|
|
4028
|
+
* Add a classification field to categorize content
|
|
4029
|
+
* @param name - Field name (alphanumeric only)
|
|
4030
|
+
* @param description - Field description
|
|
4031
|
+
* @param categories - Array of category definitions
|
|
4245
4032
|
*/
|
|
4246
|
-
|
|
4247
|
-
|
|
4033
|
+
classify(name, description, categories) {
|
|
4034
|
+
this.validateFieldName(name);
|
|
4035
|
+
this.fields.push({
|
|
4036
|
+
name,
|
|
4037
|
+
description,
|
|
4038
|
+
fieldType: "CLASSIFICATION",
|
|
4039
|
+
categories
|
|
4040
|
+
});
|
|
4041
|
+
return this;
|
|
4248
4042
|
}
|
|
4249
4043
|
/**
|
|
4250
|
-
*
|
|
4251
|
-
* @
|
|
4252
|
-
* @param {WorkflowsApiV5WorkflowsWorkflowIdAuditlogGetRequest} requestParameters Request parameters.
|
|
4253
|
-
* @param {*} [options] Override http request option.
|
|
4254
|
-
* @throws {RequiredError}
|
|
4044
|
+
* Add raw page content to extract
|
|
4045
|
+
* @param name - Raw content format(s): "html", "markdown", or "url"
|
|
4255
4046
|
*/
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
}
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
var Configuration = class {
|
|
4263
|
-
constructor(param = {}) {
|
|
4264
|
-
this.apiKey = param.apiKey;
|
|
4265
|
-
this.username = param.username;
|
|
4266
|
-
this.password = param.password;
|
|
4267
|
-
this.accessToken = param.accessToken;
|
|
4268
|
-
this.basePath = param.basePath;
|
|
4269
|
-
this.serverIndex = param.serverIndex;
|
|
4270
|
-
this.baseOptions = {
|
|
4271
|
-
...param.baseOptions,
|
|
4272
|
-
headers: {
|
|
4273
|
-
...param.baseOptions?.headers
|
|
4047
|
+
raw(name) {
|
|
4048
|
+
const names = Array.isArray(name) ? name : [name];
|
|
4049
|
+
for (const name2 of names) {
|
|
4050
|
+
const fieldName = `raw${upperFirst(camelCase(name2))}`;
|
|
4051
|
+
if (this.fields.some((field) => field.name === fieldName)) {
|
|
4052
|
+
continue;
|
|
4274
4053
|
}
|
|
4054
|
+
this.fields.push({
|
|
4055
|
+
name: fieldName,
|
|
4056
|
+
description: `Raw page content in ${name2.toUpperCase()} format`,
|
|
4057
|
+
fieldType: "METADATA",
|
|
4058
|
+
metadataKey: name2
|
|
4059
|
+
});
|
|
4060
|
+
}
|
|
4061
|
+
return this;
|
|
4062
|
+
}
|
|
4063
|
+
build() {
|
|
4064
|
+
if (this.hasSchemaFields() && !this.entityName) {
|
|
4065
|
+
throw new KadoaSdkException(
|
|
4066
|
+
"Entity name is required when schema fields are present",
|
|
4067
|
+
{
|
|
4068
|
+
code: "VALIDATION_ERROR",
|
|
4069
|
+
details: { entityName: this.entityName }
|
|
4070
|
+
}
|
|
4071
|
+
);
|
|
4072
|
+
}
|
|
4073
|
+
return {
|
|
4074
|
+
entityName: this.entityName,
|
|
4075
|
+
fields: this.fields
|
|
4275
4076
|
};
|
|
4276
|
-
this.formDataCtor = param.formDataCtor;
|
|
4277
4077
|
}
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4078
|
+
validateFieldName(name) {
|
|
4079
|
+
if (!_SchemaBuilder.FIELD_NAME_PATTERN.test(name)) {
|
|
4080
|
+
throw new KadoaSdkException(
|
|
4081
|
+
`Field name "${name}" must be alphanumeric only (no underscores or special characters)`,
|
|
4082
|
+
{
|
|
4083
|
+
code: "VALIDATION_ERROR",
|
|
4084
|
+
details: { name, pattern: "^[A-Za-z0-9]+$" }
|
|
4085
|
+
}
|
|
4086
|
+
);
|
|
4087
|
+
}
|
|
4088
|
+
const lowerName = name.toLowerCase();
|
|
4089
|
+
if (this.fields.some((f) => f.name.toLowerCase() === lowerName)) {
|
|
4090
|
+
throw new KadoaSdkException(`Duplicate field name: "${name}"`, {
|
|
4091
|
+
code: "VALIDATION_ERROR",
|
|
4092
|
+
details: { name }
|
|
4093
|
+
});
|
|
4094
|
+
}
|
|
4291
4095
|
}
|
|
4292
4096
|
};
|
|
4097
|
+
_SchemaBuilder.FIELD_NAME_PATTERN = /^[A-Za-z0-9]+$/;
|
|
4098
|
+
_SchemaBuilder.TYPES_REQUIRING_EXAMPLE = [
|
|
4099
|
+
"STRING",
|
|
4100
|
+
"IMAGE",
|
|
4101
|
+
"LINK",
|
|
4102
|
+
"OBJECT",
|
|
4103
|
+
"ARRAY"
|
|
4104
|
+
];
|
|
4105
|
+
var SchemaBuilder = _SchemaBuilder;
|
|
4293
4106
|
|
|
4294
4107
|
// src/domains/schemas/schemas.service.ts
|
|
4295
4108
|
var debug = logger.schemas;
|
|
@@ -4326,9 +4139,7 @@ var SchemasService = class {
|
|
|
4326
4139
|
fields: built.fields,
|
|
4327
4140
|
...built.entityName ? { entity: built.entityName } : {}
|
|
4328
4141
|
};
|
|
4329
|
-
return service.createSchema(
|
|
4330
|
-
createSchemaBody
|
|
4331
|
-
);
|
|
4142
|
+
return service.createSchema(createSchemaBody);
|
|
4332
4143
|
}
|
|
4333
4144
|
}();
|
|
4334
4145
|
}
|
|
@@ -4422,7 +4233,8 @@ var EntityResolverService = class {
|
|
|
4422
4233
|
const entityPrediction = await this.fetchEntityFields({
|
|
4423
4234
|
link: options.link,
|
|
4424
4235
|
location: options.location,
|
|
4425
|
-
navigationMode: options.navigationMode
|
|
4236
|
+
navigationMode: options.navigationMode,
|
|
4237
|
+
selectorMode: options.selectorMode ?? false
|
|
4426
4238
|
});
|
|
4427
4239
|
const entity = entityPrediction.entity;
|
|
4428
4240
|
return {
|
|
@@ -4584,6 +4396,18 @@ var ExtractionService = class {
|
|
|
4584
4396
|
DEFAULT_OPTIONS,
|
|
4585
4397
|
options
|
|
4586
4398
|
);
|
|
4399
|
+
const isRealTime = config.interval === "REAL_TIME";
|
|
4400
|
+
if (isRealTime) {
|
|
4401
|
+
throw new KadoaSdkException(
|
|
4402
|
+
"extraction.run()/submit() are not supported for real-time workflows. Use the builder API, call waitForReady(), and subscribe via client.realtime.onEvent(...).",
|
|
4403
|
+
{
|
|
4404
|
+
code: "BAD_REQUEST",
|
|
4405
|
+
details: {
|
|
4406
|
+
interval: "REAL_TIME"
|
|
4407
|
+
}
|
|
4408
|
+
}
|
|
4409
|
+
);
|
|
4410
|
+
}
|
|
4587
4411
|
let workflowId;
|
|
4588
4412
|
const resolvedEntity = await this.entityResolverService.resolveEntity(
|
|
4589
4413
|
options.entity || "ai-detection",
|
|
@@ -4732,7 +4556,9 @@ var ExtractionBuilderService = class {
|
|
|
4732
4556
|
name,
|
|
4733
4557
|
description,
|
|
4734
4558
|
navigationMode,
|
|
4735
|
-
extraction
|
|
4559
|
+
extraction,
|
|
4560
|
+
additionalData,
|
|
4561
|
+
bypassPreview
|
|
4736
4562
|
}) {
|
|
4737
4563
|
let entity = "ai-detection";
|
|
4738
4564
|
if (extraction) {
|
|
@@ -4750,7 +4576,8 @@ var ExtractionBuilderService = class {
|
|
|
4750
4576
|
description,
|
|
4751
4577
|
navigationMode: navigationMode || "single-page",
|
|
4752
4578
|
entity,
|
|
4753
|
-
bypassPreview: false
|
|
4579
|
+
bypassPreview: bypassPreview ?? false,
|
|
4580
|
+
additionalData
|
|
4754
4581
|
};
|
|
4755
4582
|
return this;
|
|
4756
4583
|
}
|
|
@@ -4785,12 +4612,15 @@ var ExtractionBuilderService = class {
|
|
|
4785
4612
|
async create() {
|
|
4786
4613
|
assert(this._options, "Options are not set");
|
|
4787
4614
|
const { urls, name, description, navigationMode, entity } = this.options;
|
|
4615
|
+
const isRealTime = this._options.interval === "REAL_TIME";
|
|
4616
|
+
const useSelectorMode = isRealTime && entity === "ai-detection";
|
|
4788
4617
|
const resolvedEntity = await this.entityResolverService.resolveEntity(
|
|
4789
4618
|
entity,
|
|
4790
4619
|
{
|
|
4791
4620
|
link: urls[0],
|
|
4792
4621
|
location: this._options.location,
|
|
4793
|
-
navigationMode
|
|
4622
|
+
navigationMode,
|
|
4623
|
+
selectorMode: useSelectorMode
|
|
4794
4624
|
}
|
|
4795
4625
|
);
|
|
4796
4626
|
const workflow = await this.workflowsCoreService.create({
|
|
@@ -4804,7 +4634,9 @@ var ExtractionBuilderService = class {
|
|
|
4804
4634
|
fields: resolvedEntity.fields,
|
|
4805
4635
|
autoStart: false,
|
|
4806
4636
|
interval: this._options.interval,
|
|
4807
|
-
schedules: this._options.schedules
|
|
4637
|
+
schedules: this._options.schedules,
|
|
4638
|
+
additionalData: this._options.additionalData,
|
|
4639
|
+
bypassPreview: this._options.bypassPreview
|
|
4808
4640
|
});
|
|
4809
4641
|
if (this._notificationOptions) {
|
|
4810
4642
|
await this.notificationSetupService.setup({
|
|
@@ -4815,9 +4647,35 @@ var ExtractionBuilderService = class {
|
|
|
4815
4647
|
this._workflowId = workflow.id;
|
|
4816
4648
|
return this;
|
|
4817
4649
|
}
|
|
4650
|
+
async waitForReady(options) {
|
|
4651
|
+
assert(this._workflowId, "Workflow ID is not set");
|
|
4652
|
+
const targetState = options?.targetState ?? "PREVIEW";
|
|
4653
|
+
const current = await this.workflowsCoreService.get(this._workflowId);
|
|
4654
|
+
if (current.state === targetState || targetState === "PREVIEW" && current.state === "ACTIVE") {
|
|
4655
|
+
return current;
|
|
4656
|
+
}
|
|
4657
|
+
const workflow = await this.workflowsCoreService.wait(this._workflowId, {
|
|
4658
|
+
targetState,
|
|
4659
|
+
pollIntervalMs: options?.pollIntervalMs,
|
|
4660
|
+
timeoutMs: options?.timeoutMs
|
|
4661
|
+
});
|
|
4662
|
+
return workflow;
|
|
4663
|
+
}
|
|
4818
4664
|
async run(options) {
|
|
4819
4665
|
assert(this._options, "Options are not set");
|
|
4820
4666
|
assert(this._workflowId, "Workflow ID is not set");
|
|
4667
|
+
if (this._options.interval === "REAL_TIME") {
|
|
4668
|
+
throw new KadoaSdkException(
|
|
4669
|
+
"run() is not supported for real-time workflows. Use waitForReady() and subscribe via client.realtime.onEvent(...).",
|
|
4670
|
+
{
|
|
4671
|
+
code: "BAD_REQUEST",
|
|
4672
|
+
details: {
|
|
4673
|
+
interval: "REAL_TIME",
|
|
4674
|
+
workflowId: this._workflowId
|
|
4675
|
+
}
|
|
4676
|
+
}
|
|
4677
|
+
);
|
|
4678
|
+
}
|
|
4821
4679
|
const startedJob = await this.workflowsCoreService.runWorkflow(
|
|
4822
4680
|
this._workflowId,
|
|
4823
4681
|
{ variables: options?.variables, limit: options?.limit }
|
|
@@ -4835,6 +4693,18 @@ var ExtractionBuilderService = class {
|
|
|
4835
4693
|
async submit(options) {
|
|
4836
4694
|
assert(this._options, "Options are not set");
|
|
4837
4695
|
assert(this._workflowId, "Workflow ID is not set");
|
|
4696
|
+
if (this._options.interval === "REAL_TIME") {
|
|
4697
|
+
throw new KadoaSdkException(
|
|
4698
|
+
"submit() is not supported for real-time workflows. Use waitForReady() and subscribe via client.realtime.onEvent(...).",
|
|
4699
|
+
{
|
|
4700
|
+
code: "BAD_REQUEST",
|
|
4701
|
+
details: {
|
|
4702
|
+
interval: "REAL_TIME",
|
|
4703
|
+
workflowId: this._workflowId
|
|
4704
|
+
}
|
|
4705
|
+
}
|
|
4706
|
+
);
|
|
4707
|
+
}
|
|
4838
4708
|
const submittedJob = await this.workflowsCoreService.runWorkflow(
|
|
4839
4709
|
this._workflowId,
|
|
4840
4710
|
{ variables: options?.variables, limit: options?.limit }
|
|
@@ -5290,7 +5160,7 @@ var WSS_API_URI = process.env.KADOA_WSS_API_URI ?? "wss://realtime.kadoa.com";
|
|
|
5290
5160
|
var REALTIME_API_URI = process.env.KADOA_REALTIME_API_URI ?? "https://realtime.kadoa.com";
|
|
5291
5161
|
|
|
5292
5162
|
// src/version.ts
|
|
5293
|
-
var SDK_VERSION = "0.
|
|
5163
|
+
var SDK_VERSION = "0.16.1";
|
|
5294
5164
|
var SDK_NAME = "kadoa-node-sdk";
|
|
5295
5165
|
var SDK_LANGUAGE = "node";
|
|
5296
5166
|
|
|
@@ -5557,6 +5427,28 @@ async function pollUntil(pollFn, isComplete, options = {}) {
|
|
|
5557
5427
|
);
|
|
5558
5428
|
}
|
|
5559
5429
|
|
|
5430
|
+
// src/runtime/utils/validation.ts
|
|
5431
|
+
function validateAdditionalData(additionalData) {
|
|
5432
|
+
if (additionalData === void 0) return;
|
|
5433
|
+
if (additionalData === null || typeof additionalData !== "object" || Array.isArray(additionalData)) {
|
|
5434
|
+
throw new KadoaSdkException("additionalData must be a plain object", {
|
|
5435
|
+
code: "VALIDATION_ERROR"
|
|
5436
|
+
});
|
|
5437
|
+
}
|
|
5438
|
+
try {
|
|
5439
|
+
const serialized = JSON.stringify(additionalData);
|
|
5440
|
+
if (serialized.length > 100 * 1024) {
|
|
5441
|
+
console.warn(
|
|
5442
|
+
"[Kadoa SDK] additionalData exceeds 100KB, consider reducing size"
|
|
5443
|
+
);
|
|
5444
|
+
}
|
|
5445
|
+
} catch {
|
|
5446
|
+
throw new KadoaSdkException("additionalData must be JSON-serializable", {
|
|
5447
|
+
code: "VALIDATION_ERROR"
|
|
5448
|
+
});
|
|
5449
|
+
}
|
|
5450
|
+
}
|
|
5451
|
+
|
|
5560
5452
|
// src/domains/validation/validation-core.service.ts
|
|
5561
5453
|
var ValidationCoreService = class {
|
|
5562
5454
|
constructor(client) {
|
|
@@ -5838,6 +5730,7 @@ var WorkflowsCoreService = class {
|
|
|
5838
5730
|
this.workflowsApi = workflowsApi;
|
|
5839
5731
|
}
|
|
5840
5732
|
async create(input) {
|
|
5733
|
+
validateAdditionalData(input.additionalData);
|
|
5841
5734
|
const request = {
|
|
5842
5735
|
urls: input.urls,
|
|
5843
5736
|
name: input.name,
|
|
@@ -5852,7 +5745,8 @@ var WorkflowsCoreService = class {
|
|
|
5852
5745
|
monitoring: input.monitoring,
|
|
5853
5746
|
location: input.location,
|
|
5854
5747
|
autoStart: input.autoStart,
|
|
5855
|
-
schedules: input.schedules
|
|
5748
|
+
schedules: input.schedules,
|
|
5749
|
+
additionalData: input.additionalData
|
|
5856
5750
|
};
|
|
5857
5751
|
const response = await this.workflowsApi.v4WorkflowsPost({
|
|
5858
5752
|
createWorkflowBody: request
|
|
@@ -5884,11 +5778,28 @@ var WorkflowsCoreService = class {
|
|
|
5884
5778
|
});
|
|
5885
5779
|
return response.data?.workflows?.[0];
|
|
5886
5780
|
}
|
|
5781
|
+
/**
|
|
5782
|
+
* @deprecated Use delete(id) instead.
|
|
5783
|
+
*/
|
|
5887
5784
|
async cancel(id) {
|
|
5785
|
+
console.warn(
|
|
5786
|
+
"[Kadoa SDK] workflow.cancel(id) will be deprecated. Use workflow.delete(id)."
|
|
5787
|
+
);
|
|
5788
|
+
await this.delete(id);
|
|
5789
|
+
}
|
|
5790
|
+
async delete(id) {
|
|
5888
5791
|
await this.workflowsApi.v4WorkflowsWorkflowIdDelete({
|
|
5889
5792
|
workflowId: id
|
|
5890
5793
|
});
|
|
5891
5794
|
}
|
|
5795
|
+
async update(id, input) {
|
|
5796
|
+
validateAdditionalData(input.additionalData);
|
|
5797
|
+
const response = await this.workflowsApi.v4WorkflowsWorkflowIdMetadataPut({
|
|
5798
|
+
workflowId: id,
|
|
5799
|
+
v4WorkflowsWorkflowIdMetadataPutRequest: input
|
|
5800
|
+
});
|
|
5801
|
+
return response.data;
|
|
5802
|
+
}
|
|
5892
5803
|
async resume(id) {
|
|
5893
5804
|
await this.workflowsApi.v4WorkflowsWorkflowIdResumePut({
|
|
5894
5805
|
workflowId: id
|
|
@@ -6024,7 +5935,7 @@ var KadoaClient = class {
|
|
|
6024
5935
|
headers
|
|
6025
5936
|
}
|
|
6026
5937
|
});
|
|
6027
|
-
this._axiosInstance =
|
|
5938
|
+
this._axiosInstance = globalAxios2.create({
|
|
6028
5939
|
timeout: this._timeout,
|
|
6029
5940
|
headers
|
|
6030
5941
|
});
|
|
@@ -6243,6 +6154,6 @@ var KadoaClient = class {
|
|
|
6243
6154
|
}
|
|
6244
6155
|
};
|
|
6245
6156
|
|
|
6246
|
-
export { DataFetcherService, ERROR_MESSAGES, EntityResolverService, ExtractionBuilderService, ExtractionService, FetchDataOptions, KadoaClient, KadoaHttpException, KadoaSdkException, NotificationChannelType, NotificationChannelsService, V5NotificationsSettingsGetEventTypeEnum as NotificationSettingsEventTypeEnum, NotificationSettingsService, NotificationSetupService, Realtime, SchemaBuilder, SchemaFieldDataType, SchemasService, UserService, ValidationCoreService, ValidationRulesService, WorkflowsCoreService, pollUntil };
|
|
6157
|
+
export { DataFetcherService, ERROR_MESSAGES, EntityResolverService, ExtractionBuilderService, ExtractionService, FetchDataOptions, KadoaClient, KadoaHttpException, KadoaSdkException, NotificationChannelType, NotificationChannelsService, V5NotificationsSettingsGetEventTypeEnum as NotificationSettingsEventTypeEnum, NotificationSettingsService, NotificationSetupService, Realtime, SchemaBuilder, SchemaFieldDataType, SchemasService, UserService, ValidationCoreService, ValidationRulesService, WorkflowsCoreService, pollUntil, validateAdditionalData };
|
|
6247
6158
|
//# sourceMappingURL=index.mjs.map
|
|
6248
6159
|
//# sourceMappingURL=index.mjs.map
|