@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.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var globalAxios2 = require('axios');
|
|
4
|
+
var url = require('url');
|
|
4
5
|
var createDebug = require('debug');
|
|
5
6
|
var esToolkit = require('es-toolkit');
|
|
6
|
-
var url = require('url');
|
|
7
7
|
var assert = require('assert');
|
|
8
8
|
var zod = require('zod');
|
|
9
9
|
var uuid = require('uuid');
|
|
10
10
|
|
|
11
11
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var globalAxios2__default = /*#__PURE__*/_interopDefault(globalAxios2);
|
|
14
14
|
var createDebug__default = /*#__PURE__*/_interopDefault(createDebug);
|
|
15
15
|
var assert__default = /*#__PURE__*/_interopDefault(assert);
|
|
16
16
|
|
|
@@ -20,495 +20,70 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
20
20
|
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
21
21
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
22
22
|
});
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
Url: "URL",
|
|
32
|
-
Email: "EMAIL",
|
|
33
|
-
Image: "IMAGE",
|
|
34
|
-
Video: "VIDEO",
|
|
35
|
-
Phone: "PHONE",
|
|
36
|
-
Boolean: "BOOLEAN",
|
|
37
|
-
Location: "LOCATION",
|
|
38
|
-
Array: "ARRAY",
|
|
39
|
-
Object: "OBJECT"
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
// src/runtime/pagination/paginator.ts
|
|
43
|
-
var PagedIterator = class {
|
|
44
|
-
constructor(fetchPage) {
|
|
45
|
-
this.fetchPage = fetchPage;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Fetch all items across all pages
|
|
49
|
-
* @param options Base options (page will be overridden)
|
|
50
|
-
* @returns Array of all items
|
|
51
|
-
*/
|
|
52
|
-
async fetchAll(options = {}) {
|
|
53
|
-
const allItems = [];
|
|
54
|
-
let currentPage = 1;
|
|
55
|
-
let hasMore = true;
|
|
56
|
-
while (hasMore) {
|
|
57
|
-
const result = await this.fetchPage({ ...options, page: currentPage });
|
|
58
|
-
allItems.push(...result.data);
|
|
59
|
-
const pagination = result.pagination;
|
|
60
|
-
hasMore = pagination.page !== void 0 && pagination.totalPages !== void 0 && pagination.page < pagination.totalPages;
|
|
61
|
-
currentPage++;
|
|
62
|
-
}
|
|
63
|
-
return allItems;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Create an async iterator for pages
|
|
67
|
-
* @param options Base options (page will be overridden)
|
|
68
|
-
* @returns Async generator that yields pages
|
|
69
|
-
*/
|
|
70
|
-
async *pages(options = {}) {
|
|
71
|
-
let currentPage = 1;
|
|
72
|
-
let hasMore = true;
|
|
73
|
-
while (hasMore) {
|
|
74
|
-
const result = await this.fetchPage({ ...options, page: currentPage });
|
|
75
|
-
yield result;
|
|
76
|
-
const pagination = result.pagination;
|
|
77
|
-
hasMore = pagination.page !== void 0 && pagination.totalPages !== void 0 && pagination.page < pagination.totalPages;
|
|
78
|
-
currentPage++;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Create an async iterator for individual items
|
|
83
|
-
* @param options Base options (page will be overridden)
|
|
84
|
-
* @returns Async generator that yields items
|
|
85
|
-
*/
|
|
86
|
-
async *items(options = {}) {
|
|
87
|
-
for await (const page of this.pages(options)) {
|
|
88
|
-
for (const item of page.data) {
|
|
89
|
-
yield item;
|
|
90
|
-
}
|
|
23
|
+
var BASE_PATH = "https://api.kadoa.com".replace(/\/+$/, "");
|
|
24
|
+
var BaseAPI = class {
|
|
25
|
+
constructor(configuration, basePath = BASE_PATH, axios2 = globalAxios2__default.default) {
|
|
26
|
+
this.basePath = basePath;
|
|
27
|
+
this.axios = axios2;
|
|
28
|
+
if (configuration) {
|
|
29
|
+
this.configuration = configuration;
|
|
30
|
+
this.basePath = configuration.basePath ?? basePath;
|
|
91
31
|
}
|
|
92
32
|
}
|
|
93
33
|
};
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
this.
|
|
99
|
-
this.defaultLimit = 100;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Fetch a page of workflow data
|
|
103
|
-
*/
|
|
104
|
-
async fetchData(options) {
|
|
105
|
-
const response = await this.workflowsApi.v4WorkflowsWorkflowIdDataGet({
|
|
106
|
-
...options,
|
|
107
|
-
page: options.page ?? 1,
|
|
108
|
-
limit: options.limit ?? this.defaultLimit
|
|
109
|
-
});
|
|
110
|
-
const result = response.data;
|
|
111
|
-
return result;
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Fetch all pages of workflow data
|
|
115
|
-
*/
|
|
116
|
-
async fetchAllData(options) {
|
|
117
|
-
const iterator = new PagedIterator(
|
|
118
|
-
(pageOptions) => this.fetchData({ ...options, ...pageOptions })
|
|
119
|
-
);
|
|
120
|
-
return iterator.fetchAll({ limit: options.limit ?? this.defaultLimit });
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Create an async iterator for paginated data fetching
|
|
124
|
-
*/
|
|
125
|
-
async *fetchDataPages(options) {
|
|
126
|
-
const iterator = new PagedIterator(
|
|
127
|
-
(pageOptions) => this.fetchData({ ...options, ...pageOptions })
|
|
128
|
-
);
|
|
129
|
-
for await (const page of iterator.pages({
|
|
130
|
-
limit: options.limit ?? this.defaultLimit
|
|
131
|
-
})) {
|
|
132
|
-
yield page;
|
|
133
|
-
}
|
|
34
|
+
var RequiredError = class extends Error {
|
|
35
|
+
constructor(field, msg) {
|
|
36
|
+
super(msg);
|
|
37
|
+
this.field = field;
|
|
38
|
+
this.name = "RequiredError";
|
|
134
39
|
}
|
|
135
40
|
};
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
var
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
BAD_REQUEST: "BAD_REQUEST",
|
|
142
|
-
NOT_FOUND: "NOT_FOUND",
|
|
143
|
-
INTERNAL_ERROR: "INTERNAL_ERROR"
|
|
144
|
-
};
|
|
145
|
-
var _KadoaSdkException = class _KadoaSdkException extends Error {
|
|
146
|
-
constructor(message, options) {
|
|
147
|
-
super(message);
|
|
148
|
-
this.name = "KadoaSdkException";
|
|
149
|
-
this.code = options?.code ?? "UNKNOWN";
|
|
150
|
-
this.details = options?.details;
|
|
151
|
-
if (options && "cause" in options) this.cause = options.cause;
|
|
152
|
-
Error.captureStackTrace?.(this, _KadoaSdkException);
|
|
153
|
-
}
|
|
154
|
-
static from(error, details) {
|
|
155
|
-
if (error instanceof _KadoaSdkException) return error;
|
|
156
|
-
const message = error instanceof Error ? error.message : typeof error === "string" ? error : "Unexpected error";
|
|
157
|
-
return new _KadoaSdkException(message, {
|
|
158
|
-
code: "UNKNOWN",
|
|
159
|
-
details,
|
|
160
|
-
cause: error
|
|
161
|
-
});
|
|
41
|
+
var operationServerMap = {};
|
|
42
|
+
var DUMMY_BASE_URL = "https://example.com";
|
|
43
|
+
var assertParamExists = function(functionName, paramName, paramValue) {
|
|
44
|
+
if (paramValue === null || paramValue === void 0) {
|
|
45
|
+
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
162
46
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
details: this.details
|
|
169
|
-
};
|
|
47
|
+
};
|
|
48
|
+
var setApiKeyToObject = async function(object, keyParamName, configuration) {
|
|
49
|
+
if (configuration && configuration.apiKey) {
|
|
50
|
+
const localVarApiKeyValue = typeof configuration.apiKey === "function" ? await configuration.apiKey(keyParamName) : await configuration.apiKey;
|
|
51
|
+
object[keyParamName] = localVarApiKeyValue;
|
|
170
52
|
}
|
|
171
|
-
|
|
172
|
-
|
|
53
|
+
};
|
|
54
|
+
var setBearerAuthToObject = async function(object, configuration) {
|
|
55
|
+
if (configuration && configuration.accessToken) {
|
|
56
|
+
const accessToken = typeof configuration.accessToken === "function" ? await configuration.accessToken() : await configuration.accessToken;
|
|
57
|
+
object["Authorization"] = "Bearer " + accessToken;
|
|
173
58
|
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
59
|
+
};
|
|
60
|
+
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
61
|
+
if (parameter == null) return;
|
|
62
|
+
if (typeof parameter === "object") {
|
|
63
|
+
if (Array.isArray(parameter)) {
|
|
64
|
+
parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
65
|
+
} else {
|
|
66
|
+
Object.keys(parameter).forEach(
|
|
67
|
+
(currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
|
|
68
|
+
);
|
|
178
69
|
}
|
|
179
|
-
|
|
180
|
-
|
|
70
|
+
} else {
|
|
71
|
+
if (urlSearchParams.has(key)) {
|
|
72
|
+
urlSearchParams.append(key, parameter);
|
|
73
|
+
} else {
|
|
74
|
+
urlSearchParams.set(key, parameter);
|
|
181
75
|
}
|
|
182
|
-
return parts.join("\n");
|
|
183
|
-
}
|
|
184
|
-
static isInstance(error) {
|
|
185
|
-
return error instanceof _KadoaSdkException;
|
|
186
|
-
}
|
|
187
|
-
static wrap(error, extra) {
|
|
188
|
-
if (error instanceof _KadoaSdkException) return error;
|
|
189
|
-
const message = extra?.message || (error instanceof Error ? error.message : typeof error === "string" ? error : "Unexpected error");
|
|
190
|
-
return new _KadoaSdkException(message, {
|
|
191
|
-
code: "UNKNOWN",
|
|
192
|
-
details: extra?.details,
|
|
193
|
-
cause: error
|
|
194
|
-
});
|
|
195
76
|
}
|
|
77
|
+
}
|
|
78
|
+
var setSearchParams = function(url$1, ...objects) {
|
|
79
|
+
const searchParams = new url.URLSearchParams(url$1.search);
|
|
80
|
+
setFlattenedQueryParams(searchParams, objects);
|
|
81
|
+
url$1.search = searchParams.toString();
|
|
196
82
|
};
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
RATE_LIMITED: "Rate limit exceeded. Please try again later",
|
|
202
|
-
NETWORK_ERROR: "Network error occurred",
|
|
203
|
-
SERVER_ERROR: "Server error occurred",
|
|
204
|
-
PARSE_ERROR: "Failed to parse response",
|
|
205
|
-
BAD_REQUEST: "Bad request",
|
|
206
|
-
ABORTED: "Aborted",
|
|
207
|
-
NOT_FOUND: "Not found",
|
|
208
|
-
// Workflow specific errors
|
|
209
|
-
NO_WORKFLOW_ID: "Failed to start extraction process - no ID received",
|
|
210
|
-
WORKFLOW_CREATE_FAILED: "Failed to create workflow",
|
|
211
|
-
WORKFLOW_TIMEOUT: "Workflow processing timed out",
|
|
212
|
-
WORKFLOW_UNEXPECTED_STATUS: "Extraction completed with unexpected status",
|
|
213
|
-
PROGRESS_CHECK_FAILED: "Failed to check extraction progress",
|
|
214
|
-
DATA_FETCH_FAILED: "Failed to retrieve extracted data from workflow",
|
|
215
|
-
// Extraction specific errors
|
|
216
|
-
NO_URLS: "At least one URL is required for extraction",
|
|
217
|
-
NO_API_KEY: "API key is required for entity detection",
|
|
218
|
-
LINK_REQUIRED: "Link is required for entity field detection",
|
|
219
|
-
NO_PREDICTIONS: "No entity predictions returned from the API",
|
|
220
|
-
EXTRACTION_FAILED: "Data extraction failed for the provided URLs",
|
|
221
|
-
ENTITY_FETCH_FAILED: "Failed to fetch entity fields",
|
|
222
|
-
ENTITY_INVARIANT_VIOLATION: "No valid entity provided",
|
|
223
|
-
// Schema specific errors
|
|
224
|
-
SCHEMA_NOT_FOUND: "Schema not found",
|
|
225
|
-
SCHEMA_FETCH_ERROR: "Failed to fetch schema",
|
|
226
|
-
SCHEMAS_FETCH_ERROR: "Failed to fetch schemas",
|
|
227
|
-
SCHEMA_CREATE_FAILED: "Failed to create schema",
|
|
228
|
-
SCHEMA_UPDATE_FAILED: "Failed to update schema",
|
|
229
|
-
SCHEMA_DELETE_FAILED: "Failed to delete schema"
|
|
230
|
-
};
|
|
231
|
-
var KadoaSdkException = _KadoaSdkException;
|
|
232
|
-
var ERROR_MESSAGES = KadoaSdkException.ERROR_MESSAGES;
|
|
233
|
-
var KadoaHttpException = class _KadoaHttpException extends KadoaSdkException {
|
|
234
|
-
constructor(message, options) {
|
|
235
|
-
super(message, {
|
|
236
|
-
code: options?.code,
|
|
237
|
-
details: options?.details,
|
|
238
|
-
cause: options?.cause
|
|
239
|
-
});
|
|
240
|
-
this.name = "KadoaHttpException";
|
|
241
|
-
this.httpStatus = options?.httpStatus;
|
|
242
|
-
this.requestId = options?.requestId;
|
|
243
|
-
this.endpoint = options?.endpoint;
|
|
244
|
-
this.method = options?.method;
|
|
245
|
-
this.responseBody = options?.responseBody;
|
|
246
|
-
}
|
|
247
|
-
static fromAxiosError(error, extra) {
|
|
248
|
-
const status = error.response?.status;
|
|
249
|
-
const requestId = error.response?.headers?.["x-request-id"] || error.response?.headers?.["x-amzn-requestid"];
|
|
250
|
-
const method = error.config?.method?.toUpperCase();
|
|
251
|
-
const url = error.config?.url;
|
|
252
|
-
return new _KadoaHttpException(extra?.message || error.message, {
|
|
253
|
-
code: _KadoaHttpException.mapStatusToCode(error),
|
|
254
|
-
httpStatus: status,
|
|
255
|
-
requestId,
|
|
256
|
-
endpoint: url,
|
|
257
|
-
method,
|
|
258
|
-
responseBody: error.response?.data,
|
|
259
|
-
details: extra?.details,
|
|
260
|
-
cause: error
|
|
261
|
-
});
|
|
262
|
-
}
|
|
263
|
-
toJSON() {
|
|
264
|
-
return {
|
|
265
|
-
...super.toJSON(),
|
|
266
|
-
httpStatus: this.httpStatus,
|
|
267
|
-
requestId: this.requestId,
|
|
268
|
-
endpoint: this.endpoint,
|
|
269
|
-
method: this.method,
|
|
270
|
-
responseBody: this.responseBody
|
|
271
|
-
};
|
|
272
|
-
}
|
|
273
|
-
toDetailedString() {
|
|
274
|
-
const parts = [`${this.name}: ${this.message}`, `Code: ${this.code}`];
|
|
275
|
-
if (this.httpStatus) {
|
|
276
|
-
parts.push(`HTTP Status: ${this.httpStatus}`);
|
|
277
|
-
}
|
|
278
|
-
if (this.method && this.endpoint) {
|
|
279
|
-
parts.push(`Request: ${this.method} ${this.endpoint}`);
|
|
280
|
-
}
|
|
281
|
-
if (this.requestId) {
|
|
282
|
-
parts.push(`Request ID: ${this.requestId}`);
|
|
283
|
-
}
|
|
284
|
-
if (this.responseBody) {
|
|
285
|
-
parts.push(
|
|
286
|
-
`Response Body: ${JSON.stringify(this.responseBody, null, 2)}`
|
|
287
|
-
);
|
|
288
|
-
}
|
|
289
|
-
if (this.details && Object.keys(this.details).length > 0) {
|
|
290
|
-
parts.push(`Details: ${JSON.stringify(this.details, null, 2)}`);
|
|
291
|
-
}
|
|
292
|
-
if (this.cause) {
|
|
293
|
-
parts.push(`Cause: ${this.cause}`);
|
|
294
|
-
}
|
|
295
|
-
return parts.join("\n");
|
|
296
|
-
}
|
|
297
|
-
static wrap(error, extra) {
|
|
298
|
-
if (error instanceof _KadoaHttpException) return error;
|
|
299
|
-
if (error instanceof KadoaSdkException) return error;
|
|
300
|
-
if (globalAxios5.isAxiosError(error)) {
|
|
301
|
-
return _KadoaHttpException.fromAxiosError(error, extra);
|
|
302
|
-
}
|
|
303
|
-
return KadoaSdkException.wrap(error, extra);
|
|
304
|
-
}
|
|
305
|
-
static mapStatusToCode(errorOrStatus) {
|
|
306
|
-
const status = typeof errorOrStatus === "number" ? errorOrStatus : errorOrStatus.response?.status;
|
|
307
|
-
if (!status) {
|
|
308
|
-
if (typeof errorOrStatus === "number") return "UNKNOWN";
|
|
309
|
-
return errorOrStatus.code === "ECONNABORTED" ? "TIMEOUT" : errorOrStatus.request ? "NETWORK_ERROR" : "UNKNOWN";
|
|
310
|
-
}
|
|
311
|
-
if (status === 401 || status === 403) return "AUTH_ERROR";
|
|
312
|
-
if (status === 404) return "NOT_FOUND";
|
|
313
|
-
if (status === 408) return "TIMEOUT";
|
|
314
|
-
if (status === 429) return "RATE_LIMITED";
|
|
315
|
-
if (status >= 400 && status < 500) return "VALIDATION_ERROR";
|
|
316
|
-
if (status >= 500) return "HTTP_ERROR";
|
|
317
|
-
return "UNKNOWN";
|
|
318
|
-
}
|
|
319
|
-
};
|
|
320
|
-
var createLogger = (namespace) => createDebug__default.default(`kadoa:${namespace}`);
|
|
321
|
-
var logger = {
|
|
322
|
-
client: createLogger("client"),
|
|
323
|
-
wss: createLogger("wss"),
|
|
324
|
-
extraction: createLogger("extraction"),
|
|
325
|
-
http: createLogger("http"),
|
|
326
|
-
workflow: createLogger("workflow"),
|
|
327
|
-
crawl: createLogger("crawl"),
|
|
328
|
-
notifications: createLogger("notifications"),
|
|
329
|
-
schemas: createLogger("schemas"),
|
|
330
|
-
validation: createLogger("validation")
|
|
331
|
-
};
|
|
332
|
-
var _SchemaBuilder = class _SchemaBuilder {
|
|
333
|
-
constructor() {
|
|
334
|
-
this.fields = [];
|
|
335
|
-
}
|
|
336
|
-
hasSchemaFields() {
|
|
337
|
-
return this.fields.some((field) => field.fieldType === "SCHEMA");
|
|
338
|
-
}
|
|
339
|
-
entity(entityName) {
|
|
340
|
-
this.entityName = entityName;
|
|
341
|
-
return this;
|
|
342
|
-
}
|
|
343
|
-
/**
|
|
344
|
-
* Add a structured field to the schema
|
|
345
|
-
* @param name - Field name (alphanumeric only)
|
|
346
|
-
* @param description - Field description
|
|
347
|
-
* @param dataType - Data type (STRING, NUMBER, BOOLEAN, etc.)
|
|
348
|
-
* @param options - Optional field configuration
|
|
349
|
-
*/
|
|
350
|
-
field(name, description, dataType, options) {
|
|
351
|
-
this.validateFieldName(name);
|
|
352
|
-
const requiresExample = _SchemaBuilder.TYPES_REQUIRING_EXAMPLE.includes(dataType);
|
|
353
|
-
if (requiresExample && !options?.example) {
|
|
354
|
-
throw new KadoaSdkException(
|
|
355
|
-
`Field "${name}" with type ${dataType} requires an example`,
|
|
356
|
-
{ code: "VALIDATION_ERROR", details: { name, dataType } }
|
|
357
|
-
);
|
|
358
|
-
}
|
|
359
|
-
this.fields.push({
|
|
360
|
-
name,
|
|
361
|
-
description,
|
|
362
|
-
dataType,
|
|
363
|
-
fieldType: "SCHEMA",
|
|
364
|
-
example: options?.example,
|
|
365
|
-
isKey: options?.isKey
|
|
366
|
-
});
|
|
367
|
-
return this;
|
|
368
|
-
}
|
|
369
|
-
/**
|
|
370
|
-
* Add a classification field to categorize content
|
|
371
|
-
* @param name - Field name (alphanumeric only)
|
|
372
|
-
* @param description - Field description
|
|
373
|
-
* @param categories - Array of category definitions
|
|
374
|
-
*/
|
|
375
|
-
classify(name, description, categories) {
|
|
376
|
-
this.validateFieldName(name);
|
|
377
|
-
this.fields.push({
|
|
378
|
-
name,
|
|
379
|
-
description,
|
|
380
|
-
fieldType: "CLASSIFICATION",
|
|
381
|
-
categories
|
|
382
|
-
});
|
|
383
|
-
return this;
|
|
384
|
-
}
|
|
385
|
-
/**
|
|
386
|
-
* Add raw page content to extract
|
|
387
|
-
* @param name - Raw content format(s): "html", "markdown", or "url"
|
|
388
|
-
*/
|
|
389
|
-
raw(name) {
|
|
390
|
-
const names = Array.isArray(name) ? name : [name];
|
|
391
|
-
for (const name2 of names) {
|
|
392
|
-
const fieldName = `raw${esToolkit.upperFirst(esToolkit.camelCase(name2))}`;
|
|
393
|
-
if (this.fields.some((field) => field.name === fieldName)) {
|
|
394
|
-
continue;
|
|
395
|
-
}
|
|
396
|
-
this.fields.push({
|
|
397
|
-
name: fieldName,
|
|
398
|
-
description: `Raw page content in ${name2.toUpperCase()} format`,
|
|
399
|
-
fieldType: "METADATA",
|
|
400
|
-
metadataKey: name2
|
|
401
|
-
});
|
|
402
|
-
}
|
|
403
|
-
return this;
|
|
404
|
-
}
|
|
405
|
-
build() {
|
|
406
|
-
if (this.hasSchemaFields() && !this.entityName) {
|
|
407
|
-
throw new KadoaSdkException(
|
|
408
|
-
"Entity name is required when schema fields are present",
|
|
409
|
-
{
|
|
410
|
-
code: "VALIDATION_ERROR",
|
|
411
|
-
details: { entityName: this.entityName }
|
|
412
|
-
}
|
|
413
|
-
);
|
|
414
|
-
}
|
|
415
|
-
return {
|
|
416
|
-
entityName: this.entityName,
|
|
417
|
-
fields: this.fields
|
|
418
|
-
};
|
|
419
|
-
}
|
|
420
|
-
validateFieldName(name) {
|
|
421
|
-
if (!_SchemaBuilder.FIELD_NAME_PATTERN.test(name)) {
|
|
422
|
-
throw new KadoaSdkException(
|
|
423
|
-
`Field name "${name}" must be alphanumeric only (no underscores or special characters)`,
|
|
424
|
-
{
|
|
425
|
-
code: "VALIDATION_ERROR",
|
|
426
|
-
details: { name, pattern: "^[A-Za-z0-9]+$" }
|
|
427
|
-
}
|
|
428
|
-
);
|
|
429
|
-
}
|
|
430
|
-
const lowerName = name.toLowerCase();
|
|
431
|
-
if (this.fields.some((f) => f.name.toLowerCase() === lowerName)) {
|
|
432
|
-
throw new KadoaSdkException(`Duplicate field name: "${name}"`, {
|
|
433
|
-
code: "VALIDATION_ERROR",
|
|
434
|
-
details: { name }
|
|
435
|
-
});
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
};
|
|
439
|
-
_SchemaBuilder.FIELD_NAME_PATTERN = /^[A-Za-z0-9]+$/;
|
|
440
|
-
_SchemaBuilder.TYPES_REQUIRING_EXAMPLE = [
|
|
441
|
-
"STRING",
|
|
442
|
-
"IMAGE",
|
|
443
|
-
"LINK",
|
|
444
|
-
"OBJECT",
|
|
445
|
-
"ARRAY"
|
|
446
|
-
];
|
|
447
|
-
var SchemaBuilder = _SchemaBuilder;
|
|
448
|
-
var BASE_PATH = "https://api.kadoa.com".replace(/\/+$/, "");
|
|
449
|
-
var BaseAPI = class {
|
|
450
|
-
constructor(configuration, basePath = BASE_PATH, axios2 = globalAxios5__default.default) {
|
|
451
|
-
this.basePath = basePath;
|
|
452
|
-
this.axios = axios2;
|
|
453
|
-
if (configuration) {
|
|
454
|
-
this.configuration = configuration;
|
|
455
|
-
this.basePath = configuration.basePath ?? basePath;
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
};
|
|
459
|
-
var RequiredError = class extends Error {
|
|
460
|
-
constructor(field, msg) {
|
|
461
|
-
super(msg);
|
|
462
|
-
this.field = field;
|
|
463
|
-
this.name = "RequiredError";
|
|
464
|
-
}
|
|
465
|
-
};
|
|
466
|
-
var operationServerMap = {};
|
|
467
|
-
var DUMMY_BASE_URL = "https://example.com";
|
|
468
|
-
var assertParamExists = function(functionName, paramName, paramValue) {
|
|
469
|
-
if (paramValue === null || paramValue === void 0) {
|
|
470
|
-
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
471
|
-
}
|
|
472
|
-
};
|
|
473
|
-
var setApiKeyToObject = async function(object, keyParamName, configuration) {
|
|
474
|
-
if (configuration && configuration.apiKey) {
|
|
475
|
-
const localVarApiKeyValue = typeof configuration.apiKey === "function" ? await configuration.apiKey(keyParamName) : await configuration.apiKey;
|
|
476
|
-
object[keyParamName] = localVarApiKeyValue;
|
|
477
|
-
}
|
|
478
|
-
};
|
|
479
|
-
var setBearerAuthToObject = async function(object, configuration) {
|
|
480
|
-
if (configuration && configuration.accessToken) {
|
|
481
|
-
const accessToken = typeof configuration.accessToken === "function" ? await configuration.accessToken() : await configuration.accessToken;
|
|
482
|
-
object["Authorization"] = "Bearer " + accessToken;
|
|
483
|
-
}
|
|
484
|
-
};
|
|
485
|
-
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
486
|
-
if (parameter == null) return;
|
|
487
|
-
if (typeof parameter === "object") {
|
|
488
|
-
if (Array.isArray(parameter)) {
|
|
489
|
-
parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
490
|
-
} else {
|
|
491
|
-
Object.keys(parameter).forEach(
|
|
492
|
-
(currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
|
|
493
|
-
);
|
|
494
|
-
}
|
|
495
|
-
} else {
|
|
496
|
-
if (urlSearchParams.has(key)) {
|
|
497
|
-
urlSearchParams.append(key, parameter);
|
|
498
|
-
} else {
|
|
499
|
-
urlSearchParams.set(key, parameter);
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
var setSearchParams = function(url$1, ...objects) {
|
|
504
|
-
const searchParams = new url.URLSearchParams(url$1.search);
|
|
505
|
-
setFlattenedQueryParams(searchParams, objects);
|
|
506
|
-
url$1.search = searchParams.toString();
|
|
507
|
-
};
|
|
508
|
-
var serializeDataIfNeeded = function(value, requestOptions, configuration) {
|
|
509
|
-
const nonString = typeof value !== "string";
|
|
510
|
-
const needsSerialization = nonString && configuration && configuration.isJsonMime ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) : nonString;
|
|
511
|
-
return needsSerialization ? JSON.stringify(value !== void 0 ? value : {}) : value || "";
|
|
83
|
+
var serializeDataIfNeeded = function(value, requestOptions, configuration) {
|
|
84
|
+
const nonString = typeof value !== "string";
|
|
85
|
+
const needsSerialization = nonString && configuration && configuration.isJsonMime ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) : nonString;
|
|
86
|
+
return needsSerialization ? JSON.stringify(value !== void 0 ? value : {}) : value || "";
|
|
512
87
|
};
|
|
513
88
|
var toPathString = function(url) {
|
|
514
89
|
return url.pathname + url.search + url.hash;
|
|
@@ -1224,7 +799,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1224
799
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesActionsBulkApprovePost(bulkApproveRules, options);
|
|
1225
800
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1226
801
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesActionsBulkApprovePost"]?.[localVarOperationServerIndex]?.url;
|
|
1227
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
802
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1228
803
|
},
|
|
1229
804
|
/**
|
|
1230
805
|
* Bulk delete rules for a workflow
|
|
@@ -1236,7 +811,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1236
811
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesActionsBulkDeletePost(bulkDeleteRules, options);
|
|
1237
812
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1238
813
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesActionsBulkDeletePost"]?.[localVarOperationServerIndex]?.url;
|
|
1239
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
814
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1240
815
|
},
|
|
1241
816
|
/**
|
|
1242
817
|
* Delete all validation rules with optional filtering
|
|
@@ -1248,7 +823,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1248
823
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesActionsDeleteAllDelete(deleteRuleWithReason, options);
|
|
1249
824
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1250
825
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesActionsDeleteAllDelete"]?.[localVarOperationServerIndex]?.url;
|
|
1251
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
826
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1252
827
|
},
|
|
1253
828
|
/**
|
|
1254
829
|
* Generate a validation rule
|
|
@@ -1260,7 +835,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1260
835
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesActionsGeneratePost(generateRule, options);
|
|
1261
836
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1262
837
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesActionsGeneratePost"]?.[localVarOperationServerIndex]?.url;
|
|
1263
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
838
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1264
839
|
},
|
|
1265
840
|
/**
|
|
1266
841
|
* Generate multiple validation rules
|
|
@@ -1272,7 +847,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1272
847
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesActionsGenerateRulesPost(generateRules, options);
|
|
1273
848
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1274
849
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesActionsGenerateRulesPost"]?.[localVarOperationServerIndex]?.url;
|
|
1275
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
850
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1276
851
|
},
|
|
1277
852
|
/**
|
|
1278
853
|
* List validation rules with optional filtering
|
|
@@ -1289,7 +864,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1289
864
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesGet(groupId, workflowId, status, page, pageSize, includeDeleted, options);
|
|
1290
865
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1291
866
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesGet"]?.[localVarOperationServerIndex]?.url;
|
|
1292
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
867
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1293
868
|
},
|
|
1294
869
|
/**
|
|
1295
870
|
* Create a new validation rule
|
|
@@ -1301,7 +876,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1301
876
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesPost(createRule, options);
|
|
1302
877
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1303
878
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesPost"]?.[localVarOperationServerIndex]?.url;
|
|
1304
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
879
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1305
880
|
},
|
|
1306
881
|
/**
|
|
1307
882
|
* Delete a validation rule with reason
|
|
@@ -1314,7 +889,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1314
889
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesRuleIdDelete(ruleId, deleteRuleWithReason, options);
|
|
1315
890
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1316
891
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesRuleIdDelete"]?.[localVarOperationServerIndex]?.url;
|
|
1317
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
892
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1318
893
|
},
|
|
1319
894
|
/**
|
|
1320
895
|
* Disable a validation rule with reason
|
|
@@ -1327,7 +902,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1327
902
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesRuleIdDisablePost(ruleId, disableRule, options);
|
|
1328
903
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1329
904
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesRuleIdDisablePost"]?.[localVarOperationServerIndex]?.url;
|
|
1330
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
905
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1331
906
|
},
|
|
1332
907
|
/**
|
|
1333
908
|
* Get a validation rule by ID
|
|
@@ -1340,7 +915,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1340
915
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesRuleIdGet(ruleId, includeDeleted, options);
|
|
1341
916
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1342
917
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesRuleIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
1343
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
918
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1344
919
|
},
|
|
1345
920
|
/**
|
|
1346
921
|
* Update a validation rule
|
|
@@ -1353,7 +928,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1353
928
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesRuleIdPut(ruleId, updateRule, options);
|
|
1354
929
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1355
930
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesRuleIdPut"]?.[localVarOperationServerIndex]?.url;
|
|
1356
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
931
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1357
932
|
},
|
|
1358
933
|
/**
|
|
1359
934
|
* Get all anomalies for a validation
|
|
@@ -1368,7 +943,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1368
943
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationValidationsValidationIdAnomaliesGet(validationId, page, pageSize, options);
|
|
1369
944
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1370
945
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationValidationsValidationIdAnomaliesGet"]?.[localVarOperationServerIndex]?.url;
|
|
1371
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
946
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1372
947
|
},
|
|
1373
948
|
/**
|
|
1374
949
|
* Get anomalies for a specific rule
|
|
@@ -1384,7 +959,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1384
959
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet(validationId, ruleName, page, pageSize, options);
|
|
1385
960
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1386
961
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet"]?.[localVarOperationServerIndex]?.url;
|
|
1387
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
962
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1388
963
|
},
|
|
1389
964
|
/**
|
|
1390
965
|
* Get validation details
|
|
@@ -1398,7 +973,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1398
973
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationValidationsValidationIdGet(validationId, includeDryRun, options);
|
|
1399
974
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1400
975
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationValidationsValidationIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
1401
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
976
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1402
977
|
},
|
|
1403
978
|
/**
|
|
1404
979
|
* Schedule a data validation job (alternative path)
|
|
@@ -1413,7 +988,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1413
988
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowIdJobsJobIdValidatePost(workflowId, jobId, dataValidationRequestBody, options);
|
|
1414
989
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1415
990
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowIdJobsJobIdValidatePost"]?.[localVarOperationServerIndex]?.url;
|
|
1416
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
991
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1417
992
|
},
|
|
1418
993
|
/**
|
|
1419
994
|
* Schedule a data validation job
|
|
@@ -1428,7 +1003,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1428
1003
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost(workflowId, jobId, dataValidationRequestBody, options);
|
|
1429
1004
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1430
1005
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost"]?.[localVarOperationServerIndex]?.url;
|
|
1431
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1006
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1432
1007
|
},
|
|
1433
1008
|
/**
|
|
1434
1009
|
* List all validations for a job
|
|
@@ -1445,7 +1020,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1445
1020
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet(workflowId, jobId, page, pageSize, includeDryRun, options);
|
|
1446
1021
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1447
1022
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet"]?.[localVarOperationServerIndex]?.url;
|
|
1448
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1023
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1449
1024
|
},
|
|
1450
1025
|
/**
|
|
1451
1026
|
* Get latest validation for a job
|
|
@@ -1460,7 +1035,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1460
1035
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet(workflowId, jobId, includeDryRun, options);
|
|
1461
1036
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1462
1037
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet"]?.[localVarOperationServerIndex]?.url;
|
|
1463
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1038
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1464
1039
|
},
|
|
1465
1040
|
/**
|
|
1466
1041
|
* Retrieves the current data validation configuration for a specific workflow
|
|
@@ -1473,7 +1048,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1473
1048
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowsWorkflowIdValidationConfigGet(workflowId, options);
|
|
1474
1049
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1475
1050
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationConfigGet"]?.[localVarOperationServerIndex]?.url;
|
|
1476
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1051
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1477
1052
|
},
|
|
1478
1053
|
/**
|
|
1479
1054
|
* Updates the complete data validation configuration including alerting settings
|
|
@@ -1487,7 +1062,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1487
1062
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowsWorkflowIdValidationConfigPut(workflowId, v4DataValidationWorkflowsWorkflowIdValidationConfigPutRequest, options);
|
|
1488
1063
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1489
1064
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationConfigPut"]?.[localVarOperationServerIndex]?.url;
|
|
1490
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1065
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1491
1066
|
},
|
|
1492
1067
|
/**
|
|
1493
1068
|
* Enables or disables data validation for a specific workflow
|
|
@@ -1501,7 +1076,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1501
1076
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowsWorkflowIdValidationTogglePut(workflowId, v4DataValidationWorkflowsWorkflowIdValidationTogglePutRequest, options);
|
|
1502
1077
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1503
1078
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationTogglePut"]?.[localVarOperationServerIndex]?.url;
|
|
1504
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1079
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1505
1080
|
},
|
|
1506
1081
|
/**
|
|
1507
1082
|
* Get latest validation for the most recent job of a workflow
|
|
@@ -1515,7 +1090,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1515
1090
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowsWorkflowIdValidationsLatestGet(workflowId, includeDryRun, options);
|
|
1516
1091
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1517
1092
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationsLatestGet"]?.[localVarOperationServerIndex]?.url;
|
|
1518
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1093
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1519
1094
|
}
|
|
1520
1095
|
};
|
|
1521
1096
|
};
|
|
@@ -2168,7 +1743,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2168
1743
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsChannelsChannelIdDelete(channelId, options);
|
|
2169
1744
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2170
1745
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsChannelsChannelIdDelete"]?.[localVarOperationServerIndex]?.url;
|
|
2171
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1746
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2172
1747
|
},
|
|
2173
1748
|
/**
|
|
2174
1749
|
*
|
|
@@ -2181,7 +1756,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2181
1756
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsChannelsChannelIdGet(channelId, options);
|
|
2182
1757
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2183
1758
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsChannelsChannelIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
2184
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1759
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2185
1760
|
},
|
|
2186
1761
|
/**
|
|
2187
1762
|
*
|
|
@@ -2195,7 +1770,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2195
1770
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsChannelsChannelIdPut(channelId, v5NotificationsChannelsPostRequest, options);
|
|
2196
1771
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2197
1772
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsChannelsChannelIdPut"]?.[localVarOperationServerIndex]?.url;
|
|
2198
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1773
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2199
1774
|
},
|
|
2200
1775
|
/**
|
|
2201
1776
|
*
|
|
@@ -2208,7 +1783,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2208
1783
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsChannelsGet(workflowId, options);
|
|
2209
1784
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2210
1785
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsChannelsGet"]?.[localVarOperationServerIndex]?.url;
|
|
2211
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1786
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2212
1787
|
},
|
|
2213
1788
|
/**
|
|
2214
1789
|
*
|
|
@@ -2221,7 +1796,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2221
1796
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsChannelsPost(v5NotificationsChannelsPostRequest, options);
|
|
2222
1797
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2223
1798
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsChannelsPost"]?.[localVarOperationServerIndex]?.url;
|
|
2224
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1799
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2225
1800
|
},
|
|
2226
1801
|
/**
|
|
2227
1802
|
*
|
|
@@ -2234,7 +1809,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2234
1809
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsEventTypesEventTypeGet(eventType, options);
|
|
2235
1810
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2236
1811
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsEventTypesEventTypeGet"]?.[localVarOperationServerIndex]?.url;
|
|
2237
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1812
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2238
1813
|
},
|
|
2239
1814
|
/**
|
|
2240
1815
|
*
|
|
@@ -2246,7 +1821,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2246
1821
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsEventTypesGet(options);
|
|
2247
1822
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2248
1823
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsEventTypesGet"]?.[localVarOperationServerIndex]?.url;
|
|
2249
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1824
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2250
1825
|
},
|
|
2251
1826
|
/**
|
|
2252
1827
|
*
|
|
@@ -2264,7 +1839,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2264
1839
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsLogsGet(workflowId, eventType, startDate, endDate, limit, offset, options);
|
|
2265
1840
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2266
1841
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsLogsGet"]?.[localVarOperationServerIndex]?.url;
|
|
2267
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1842
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2268
1843
|
},
|
|
2269
1844
|
/**
|
|
2270
1845
|
*
|
|
@@ -2278,7 +1853,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2278
1853
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsSettingsGet(workflowId, eventType, options);
|
|
2279
1854
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2280
1855
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsSettingsGet"]?.[localVarOperationServerIndex]?.url;
|
|
2281
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1856
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2282
1857
|
},
|
|
2283
1858
|
/**
|
|
2284
1859
|
*
|
|
@@ -2291,7 +1866,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2291
1866
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsSettingsPost(v5NotificationsSettingsPostRequest, options);
|
|
2292
1867
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2293
1868
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsSettingsPost"]?.[localVarOperationServerIndex]?.url;
|
|
2294
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1869
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2295
1870
|
},
|
|
2296
1871
|
/**
|
|
2297
1872
|
*
|
|
@@ -2304,7 +1879,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2304
1879
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsSettingsSettingsIdDelete(settingsId, options);
|
|
2305
1880
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2306
1881
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsSettingsSettingsIdDelete"]?.[localVarOperationServerIndex]?.url;
|
|
2307
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1882
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2308
1883
|
},
|
|
2309
1884
|
/**
|
|
2310
1885
|
*
|
|
@@ -2317,7 +1892,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2317
1892
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsSettingsSettingsIdGet(settingsId, options);
|
|
2318
1893
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2319
1894
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsSettingsSettingsIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
2320
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1895
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2321
1896
|
},
|
|
2322
1897
|
/**
|
|
2323
1898
|
*
|
|
@@ -2331,7 +1906,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2331
1906
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsSettingsSettingsIdPut(settingsId, v5NotificationsSettingsSettingsIdPutRequest, options);
|
|
2332
1907
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2333
1908
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsSettingsSettingsIdPut"]?.[localVarOperationServerIndex]?.url;
|
|
2334
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1909
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2335
1910
|
},
|
|
2336
1911
|
/**
|
|
2337
1912
|
*
|
|
@@ -2344,7 +1919,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2344
1919
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsTestPost(v5NotificationsTestPostRequest, options);
|
|
2345
1920
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2346
1921
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsTestPost"]?.[localVarOperationServerIndex]?.url;
|
|
2347
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1922
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2348
1923
|
}
|
|
2349
1924
|
};
|
|
2350
1925
|
};
|
|
@@ -2654,7 +2229,7 @@ var SchemasApiFp = function(configuration) {
|
|
|
2654
2229
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4SchemasGet(options);
|
|
2655
2230
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2656
2231
|
const localVarOperationServerBasePath = operationServerMap["SchemasApi.v4SchemasGet"]?.[localVarOperationServerIndex]?.url;
|
|
2657
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
2232
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2658
2233
|
},
|
|
2659
2234
|
/**
|
|
2660
2235
|
* Create a new data schema with specified fields and entity type
|
|
@@ -2667,7 +2242,7 @@ var SchemasApiFp = function(configuration) {
|
|
|
2667
2242
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4SchemasPost(createSchemaBody, options);
|
|
2668
2243
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2669
2244
|
const localVarOperationServerBasePath = operationServerMap["SchemasApi.v4SchemasPost"]?.[localVarOperationServerIndex]?.url;
|
|
2670
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
2245
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2671
2246
|
},
|
|
2672
2247
|
/**
|
|
2673
2248
|
* Delete a schema and all its revisions
|
|
@@ -2680,7 +2255,7 @@ var SchemasApiFp = function(configuration) {
|
|
|
2680
2255
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4SchemasSchemaIdDelete(schemaId, options);
|
|
2681
2256
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2682
2257
|
const localVarOperationServerBasePath = operationServerMap["SchemasApi.v4SchemasSchemaIdDelete"]?.[localVarOperationServerIndex]?.url;
|
|
2683
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
2258
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2684
2259
|
},
|
|
2685
2260
|
/**
|
|
2686
2261
|
* Retrieve a specific schema by its unique identifier
|
|
@@ -2693,7 +2268,7 @@ var SchemasApiFp = function(configuration) {
|
|
|
2693
2268
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4SchemasSchemaIdGet(schemaId, options);
|
|
2694
2269
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2695
2270
|
const localVarOperationServerBasePath = operationServerMap["SchemasApi.v4SchemasSchemaIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
2696
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
2271
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2697
2272
|
},
|
|
2698
2273
|
/**
|
|
2699
2274
|
* Update schema metadata or create a new revision with updated fields
|
|
@@ -2707,7 +2282,7 @@ var SchemasApiFp = function(configuration) {
|
|
|
2707
2282
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4SchemasSchemaIdPut(schemaId, updateSchemaBody, options);
|
|
2708
2283
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2709
2284
|
const localVarOperationServerBasePath = operationServerMap["SchemasApi.v4SchemasSchemaIdPut"]?.[localVarOperationServerIndex]?.url;
|
|
2710
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
2285
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2711
2286
|
}
|
|
2712
2287
|
};
|
|
2713
2288
|
};
|
|
@@ -2865,12 +2440,13 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
|
2865
2440
|
* @param {V4WorkflowsGetMonitoringEnum} [monitoring] Filter workflows by monitoring status
|
|
2866
2441
|
* @param {V4WorkflowsGetUpdateIntervalEnum} [updateInterval] Filter workflows by update interval
|
|
2867
2442
|
* @param {string} [templateId] Filter workflows by template ID (DEPRECATED - templates replaced by schemas)
|
|
2443
|
+
* @param {string} [userId] Filter workflows by user ID (only works in team context)
|
|
2868
2444
|
* @param {V4WorkflowsGetIncludeDeletedEnum} [includeDeleted] Include deleted workflows (for compliance officers)
|
|
2869
2445
|
* @param {V4WorkflowsGetFormatEnum} [format] Response format (json or csv for export)
|
|
2870
2446
|
* @param {*} [options] Override http request option.
|
|
2871
2447
|
* @throws {RequiredError}
|
|
2872
2448
|
*/
|
|
2873
|
-
v4WorkflowsGet: async (search, skip, limit, state, tags, monitoring, updateInterval, templateId, includeDeleted, format, options = {}) => {
|
|
2449
|
+
v4WorkflowsGet: async (search, skip, limit, state, tags, monitoring, updateInterval, templateId, userId, includeDeleted, format, options = {}) => {
|
|
2874
2450
|
const localVarPath = `/v4/workflows`;
|
|
2875
2451
|
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
2876
2452
|
let baseOptions;
|
|
@@ -2905,6 +2481,9 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
|
2905
2481
|
if (templateId !== void 0) {
|
|
2906
2482
|
localVarQueryParameter["templateId"] = templateId;
|
|
2907
2483
|
}
|
|
2484
|
+
if (userId !== void 0) {
|
|
2485
|
+
localVarQueryParameter["userId"] = userId;
|
|
2486
|
+
}
|
|
2908
2487
|
if (includeDeleted !== void 0) {
|
|
2909
2488
|
localVarQueryParameter["includeDeleted"] = includeDeleted;
|
|
2910
2489
|
}
|
|
@@ -3383,223 +2962,105 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
|
3383
2962
|
if (configuration) {
|
|
3384
2963
|
baseOptions = configuration.baseOptions;
|
|
3385
2964
|
}
|
|
3386
|
-
const localVarRequestOptions = { method: "PUT", ...baseOptions, ...options };
|
|
3387
|
-
const localVarHeaderParameter = {};
|
|
3388
|
-
const localVarQueryParameter = {};
|
|
3389
|
-
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
3390
|
-
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
3391
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3392
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3393
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
3394
|
-
localVarRequestOptions.data = serializeDataIfNeeded(v4WorkflowsWorkflowIdSchedulePutRequest, localVarRequestOptions, configuration);
|
|
3395
|
-
return {
|
|
3396
|
-
url: toPathString(localVarUrlObj),
|
|
3397
|
-
options: localVarRequestOptions
|
|
3398
|
-
};
|
|
3399
|
-
},
|
|
3400
|
-
/**
|
|
3401
|
-
*
|
|
3402
|
-
* @summary Get data change by ID (PostgreSQL)
|
|
3403
|
-
* @param {string} changeId ID of the workflow change to retrieve
|
|
3404
|
-
* @param {string} [xApiKey] API key for authorization
|
|
3405
|
-
* @param {string} [authorization] Bearer token for authorization
|
|
3406
|
-
* @param {*} [options] Override http request option.
|
|
3407
|
-
* @throws {RequiredError}
|
|
3408
|
-
*/
|
|
3409
|
-
v5ChangesChangeIdGet: async (changeId, xApiKey, authorization, options = {}) => {
|
|
3410
|
-
assertParamExists("v5ChangesChangeIdGet", "changeId", changeId);
|
|
3411
|
-
const localVarPath = `/v5/changes/{changeId}`.replace(`{${"changeId"}}`, encodeURIComponent(String(changeId)));
|
|
3412
|
-
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
3413
|
-
let baseOptions;
|
|
3414
|
-
if (configuration) {
|
|
3415
|
-
baseOptions = configuration.baseOptions;
|
|
3416
|
-
}
|
|
3417
|
-
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
3418
|
-
const localVarHeaderParameter = {};
|
|
3419
|
-
const localVarQueryParameter = {};
|
|
3420
|
-
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
3421
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3422
|
-
if (xApiKey != null) {
|
|
3423
|
-
localVarHeaderParameter["x-api-key"] = String(xApiKey);
|
|
3424
|
-
}
|
|
3425
|
-
if (authorization != null) {
|
|
3426
|
-
localVarHeaderParameter["Authorization"] = String(authorization);
|
|
3427
|
-
}
|
|
3428
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3429
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3430
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
3431
|
-
return {
|
|
3432
|
-
url: toPathString(localVarUrlObj),
|
|
3433
|
-
options: localVarRequestOptions
|
|
3434
|
-
};
|
|
3435
|
-
},
|
|
3436
|
-
/**
|
|
3437
|
-
*
|
|
3438
|
-
* @summary Get all data changes (PostgreSQL)
|
|
3439
|
-
* @param {string} [xApiKey] API key for authorization
|
|
3440
|
-
* @param {string} [authorization] Bearer token for authorization
|
|
3441
|
-
* @param {string} [workflowIds] Comma-separated list of workflow IDs. If not provided, returns changes for all ACTIVE workflows
|
|
3442
|
-
* @param {string} [startDate] Start date to filter changes (ISO format)
|
|
3443
|
-
* @param {string} [endDate] End date to filter changes (ISO format)
|
|
3444
|
-
* @param {number} [skip] Number of records to skip for pagination
|
|
3445
|
-
* @param {number} [limit] Number of records to return for pagination
|
|
3446
|
-
* @param {*} [options] Override http request option.
|
|
3447
|
-
* @throws {RequiredError}
|
|
3448
|
-
*/
|
|
3449
|
-
v5ChangesGet: async (xApiKey, authorization, workflowIds, startDate, endDate, skip, limit, options = {}) => {
|
|
3450
|
-
const localVarPath = `/v5/changes`;
|
|
3451
|
-
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
3452
|
-
let baseOptions;
|
|
3453
|
-
if (configuration) {
|
|
3454
|
-
baseOptions = configuration.baseOptions;
|
|
3455
|
-
}
|
|
3456
|
-
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
3457
|
-
const localVarHeaderParameter = {};
|
|
3458
|
-
const localVarQueryParameter = {};
|
|
3459
|
-
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
3460
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3461
|
-
if (workflowIds !== void 0) {
|
|
3462
|
-
localVarQueryParameter["workflowIds"] = workflowIds;
|
|
3463
|
-
}
|
|
3464
|
-
if (startDate !== void 0) {
|
|
3465
|
-
localVarQueryParameter["startDate"] = startDate instanceof Date ? startDate.toISOString() : startDate;
|
|
3466
|
-
}
|
|
3467
|
-
if (endDate !== void 0) {
|
|
3468
|
-
localVarQueryParameter["endDate"] = endDate instanceof Date ? endDate.toISOString() : endDate;
|
|
3469
|
-
}
|
|
3470
|
-
if (skip !== void 0) {
|
|
3471
|
-
localVarQueryParameter["skip"] = skip;
|
|
3472
|
-
}
|
|
3473
|
-
if (limit !== void 0) {
|
|
3474
|
-
localVarQueryParameter["limit"] = limit;
|
|
3475
|
-
}
|
|
3476
|
-
if (xApiKey != null) {
|
|
3477
|
-
localVarHeaderParameter["x-api-key"] = String(xApiKey);
|
|
3478
|
-
}
|
|
3479
|
-
if (authorization != null) {
|
|
3480
|
-
localVarHeaderParameter["Authorization"] = String(authorization);
|
|
3481
|
-
}
|
|
3482
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3483
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3484
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
3485
|
-
return {
|
|
3486
|
-
url: toPathString(localVarUrlObj),
|
|
3487
|
-
options: localVarRequestOptions
|
|
3488
|
-
};
|
|
3489
|
-
},
|
|
3490
|
-
/**
|
|
3491
|
-
* Permanently deletes a workflow and its associated tags
|
|
3492
|
-
* @summary Delete a workflow
|
|
3493
|
-
* @param {string} id The ID of the workflow to delete
|
|
3494
|
-
* @param {*} [options] Override http request option.
|
|
3495
|
-
* @throws {RequiredError}
|
|
3496
|
-
*/
|
|
3497
|
-
v5WorkflowsIdDelete: async (id, options = {}) => {
|
|
3498
|
-
assertParamExists("v5WorkflowsIdDelete", "id", id);
|
|
3499
|
-
const localVarPath = `/v5/workflows/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
3500
|
-
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
3501
|
-
let baseOptions;
|
|
3502
|
-
if (configuration) {
|
|
3503
|
-
baseOptions = configuration.baseOptions;
|
|
3504
|
-
}
|
|
3505
|
-
const localVarRequestOptions = { method: "DELETE", ...baseOptions, ...options };
|
|
3506
|
-
const localVarHeaderParameter = {};
|
|
3507
|
-
const localVarQueryParameter = {};
|
|
3508
|
-
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
3509
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3510
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3511
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3512
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
3513
|
-
return {
|
|
3514
|
-
url: toPathString(localVarUrlObj),
|
|
3515
|
-
options: localVarRequestOptions
|
|
3516
|
-
};
|
|
3517
|
-
},
|
|
3518
|
-
/**
|
|
3519
|
-
* Retrieves a specific workflow and its associated tags by ID
|
|
3520
|
-
* @summary Get workflow by ID
|
|
3521
|
-
* @param {string} id The ID of the workflow to retrieve
|
|
3522
|
-
* @param {*} [options] Override http request option.
|
|
3523
|
-
* @throws {RequiredError}
|
|
3524
|
-
*/
|
|
3525
|
-
v5WorkflowsIdGet: async (id, options = {}) => {
|
|
3526
|
-
assertParamExists("v5WorkflowsIdGet", "id", id);
|
|
3527
|
-
const localVarPath = `/v5/workflows/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
3528
|
-
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
3529
|
-
let baseOptions;
|
|
3530
|
-
if (configuration) {
|
|
3531
|
-
baseOptions = configuration.baseOptions;
|
|
3532
|
-
}
|
|
3533
|
-
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
2965
|
+
const localVarRequestOptions = { method: "PUT", ...baseOptions, ...options };
|
|
3534
2966
|
const localVarHeaderParameter = {};
|
|
3535
2967
|
const localVarQueryParameter = {};
|
|
3536
2968
|
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
3537
|
-
|
|
2969
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
3538
2970
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3539
2971
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3540
2972
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2973
|
+
localVarRequestOptions.data = serializeDataIfNeeded(v4WorkflowsWorkflowIdSchedulePutRequest, localVarRequestOptions, configuration);
|
|
3541
2974
|
return {
|
|
3542
2975
|
url: toPathString(localVarUrlObj),
|
|
3543
2976
|
options: localVarRequestOptions
|
|
3544
2977
|
};
|
|
3545
2978
|
},
|
|
3546
2979
|
/**
|
|
3547
|
-
*
|
|
3548
|
-
* @summary
|
|
3549
|
-
* @param {string}
|
|
3550
|
-
* @param {
|
|
2980
|
+
*
|
|
2981
|
+
* @summary Get data change by ID (PostgreSQL)
|
|
2982
|
+
* @param {string} changeId ID of the workflow change to retrieve
|
|
2983
|
+
* @param {string} [xApiKey] API key for authorization
|
|
2984
|
+
* @param {string} [authorization] Bearer token for authorization
|
|
3551
2985
|
* @param {*} [options] Override http request option.
|
|
3552
2986
|
* @throws {RequiredError}
|
|
3553
2987
|
*/
|
|
3554
|
-
|
|
3555
|
-
assertParamExists("
|
|
3556
|
-
|
|
3557
|
-
const localVarPath = `/v5/workflows/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
2988
|
+
v5ChangesChangeIdGet: async (changeId, xApiKey, authorization, options = {}) => {
|
|
2989
|
+
assertParamExists("v5ChangesChangeIdGet", "changeId", changeId);
|
|
2990
|
+
const localVarPath = `/v5/changes/{changeId}`.replace(`{${"changeId"}}`, encodeURIComponent(String(changeId)));
|
|
3558
2991
|
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
3559
2992
|
let baseOptions;
|
|
3560
2993
|
if (configuration) {
|
|
3561
2994
|
baseOptions = configuration.baseOptions;
|
|
3562
2995
|
}
|
|
3563
|
-
const localVarRequestOptions = { method: "
|
|
2996
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
3564
2997
|
const localVarHeaderParameter = {};
|
|
3565
2998
|
const localVarQueryParameter = {};
|
|
3566
2999
|
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
3567
3000
|
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3568
|
-
|
|
3001
|
+
if (xApiKey != null) {
|
|
3002
|
+
localVarHeaderParameter["x-api-key"] = String(xApiKey);
|
|
3003
|
+
}
|
|
3004
|
+
if (authorization != null) {
|
|
3005
|
+
localVarHeaderParameter["Authorization"] = String(authorization);
|
|
3006
|
+
}
|
|
3569
3007
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3570
3008
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3571
3009
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
3572
|
-
localVarRequestOptions.data = serializeDataIfNeeded(v5WorkflowsIdPutRequest, localVarRequestOptions, configuration);
|
|
3573
3010
|
return {
|
|
3574
3011
|
url: toPathString(localVarUrlObj),
|
|
3575
3012
|
options: localVarRequestOptions
|
|
3576
3013
|
};
|
|
3577
3014
|
},
|
|
3578
3015
|
/**
|
|
3579
|
-
*
|
|
3580
|
-
* @summary
|
|
3581
|
-
* @param {
|
|
3016
|
+
*
|
|
3017
|
+
* @summary Get all data changes (PostgreSQL)
|
|
3018
|
+
* @param {string} [xApiKey] API key for authorization
|
|
3019
|
+
* @param {string} [authorization] Bearer token for authorization
|
|
3020
|
+
* @param {string} [workflowIds] Comma-separated list of workflow IDs. If not provided, returns changes for all ACTIVE workflows
|
|
3021
|
+
* @param {string} [startDate] Start date to filter changes (ISO format)
|
|
3022
|
+
* @param {string} [endDate] End date to filter changes (ISO format)
|
|
3023
|
+
* @param {number} [skip] Number of records to skip for pagination
|
|
3024
|
+
* @param {number} [limit] Number of records to return for pagination
|
|
3582
3025
|
* @param {*} [options] Override http request option.
|
|
3583
3026
|
* @throws {RequiredError}
|
|
3584
3027
|
*/
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
const localVarPath = `/v5/workflows`;
|
|
3028
|
+
v5ChangesGet: async (xApiKey, authorization, workflowIds, startDate, endDate, skip, limit, options = {}) => {
|
|
3029
|
+
const localVarPath = `/v5/changes`;
|
|
3588
3030
|
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
3589
3031
|
let baseOptions;
|
|
3590
3032
|
if (configuration) {
|
|
3591
3033
|
baseOptions = configuration.baseOptions;
|
|
3592
3034
|
}
|
|
3593
|
-
const localVarRequestOptions = { method: "
|
|
3035
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
3594
3036
|
const localVarHeaderParameter = {};
|
|
3595
3037
|
const localVarQueryParameter = {};
|
|
3596
3038
|
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
3597
3039
|
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3598
|
-
|
|
3040
|
+
if (workflowIds !== void 0) {
|
|
3041
|
+
localVarQueryParameter["workflowIds"] = workflowIds;
|
|
3042
|
+
}
|
|
3043
|
+
if (startDate !== void 0) {
|
|
3044
|
+
localVarQueryParameter["startDate"] = startDate instanceof Date ? startDate.toISOString() : startDate;
|
|
3045
|
+
}
|
|
3046
|
+
if (endDate !== void 0) {
|
|
3047
|
+
localVarQueryParameter["endDate"] = endDate instanceof Date ? endDate.toISOString() : endDate;
|
|
3048
|
+
}
|
|
3049
|
+
if (skip !== void 0) {
|
|
3050
|
+
localVarQueryParameter["skip"] = skip;
|
|
3051
|
+
}
|
|
3052
|
+
if (limit !== void 0) {
|
|
3053
|
+
localVarQueryParameter["limit"] = limit;
|
|
3054
|
+
}
|
|
3055
|
+
if (xApiKey != null) {
|
|
3056
|
+
localVarHeaderParameter["x-api-key"] = String(xApiKey);
|
|
3057
|
+
}
|
|
3058
|
+
if (authorization != null) {
|
|
3059
|
+
localVarHeaderParameter["Authorization"] = String(authorization);
|
|
3060
|
+
}
|
|
3599
3061
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3600
3062
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3601
3063
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
3602
|
-
localVarRequestOptions.data = serializeDataIfNeeded(v5WorkflowsPostRequest, localVarRequestOptions, configuration);
|
|
3603
3064
|
return {
|
|
3604
3065
|
url: toPathString(localVarUrlObj),
|
|
3605
3066
|
options: localVarRequestOptions
|
|
@@ -3667,7 +3128,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3667
3128
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4ChangesChangeIdGet(changeId, xApiKey, authorization, options);
|
|
3668
3129
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3669
3130
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4ChangesChangeIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
3670
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3131
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3671
3132
|
},
|
|
3672
3133
|
/**
|
|
3673
3134
|
*
|
|
@@ -3686,7 +3147,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3686
3147
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4ChangesGet(xApiKey, authorization, workflowIds, startDate, endDate, skip, limit, options);
|
|
3687
3148
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3688
3149
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4ChangesGet"]?.[localVarOperationServerIndex]?.url;
|
|
3689
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3150
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3690
3151
|
},
|
|
3691
3152
|
/**
|
|
3692
3153
|
* Retrieves a list of workflows with pagination and search capabilities
|
|
@@ -3699,16 +3160,17 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3699
3160
|
* @param {V4WorkflowsGetMonitoringEnum} [monitoring] Filter workflows by monitoring status
|
|
3700
3161
|
* @param {V4WorkflowsGetUpdateIntervalEnum} [updateInterval] Filter workflows by update interval
|
|
3701
3162
|
* @param {string} [templateId] Filter workflows by template ID (DEPRECATED - templates replaced by schemas)
|
|
3163
|
+
* @param {string} [userId] Filter workflows by user ID (only works in team context)
|
|
3702
3164
|
* @param {V4WorkflowsGetIncludeDeletedEnum} [includeDeleted] Include deleted workflows (for compliance officers)
|
|
3703
3165
|
* @param {V4WorkflowsGetFormatEnum} [format] Response format (json or csv for export)
|
|
3704
3166
|
* @param {*} [options] Override http request option.
|
|
3705
3167
|
* @throws {RequiredError}
|
|
3706
3168
|
*/
|
|
3707
|
-
async v4WorkflowsGet(search, skip, limit, state, tags, monitoring, updateInterval, templateId, includeDeleted, format, options) {
|
|
3708
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsGet(search, skip, limit, state, tags, monitoring, updateInterval, templateId, includeDeleted, format, options);
|
|
3169
|
+
async v4WorkflowsGet(search, skip, limit, state, tags, monitoring, updateInterval, templateId, userId, includeDeleted, format, options) {
|
|
3170
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsGet(search, skip, limit, state, tags, monitoring, updateInterval, templateId, userId, includeDeleted, format, options);
|
|
3709
3171
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3710
3172
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsGet"]?.[localVarOperationServerIndex]?.url;
|
|
3711
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3173
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3712
3174
|
},
|
|
3713
3175
|
/**
|
|
3714
3176
|
* Create a new workflow with schema, custom fields, or agentic navigation mode
|
|
@@ -3721,7 +3183,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3721
3183
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsPost(createWorkflowBody, options);
|
|
3722
3184
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3723
3185
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsPost"]?.[localVarOperationServerIndex]?.url;
|
|
3724
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3186
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3725
3187
|
},
|
|
3726
3188
|
/**
|
|
3727
3189
|
*
|
|
@@ -3738,7 +3200,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3738
3200
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdAuditlogGet(workflowId, xApiKey, authorization, page, limit, options);
|
|
3739
3201
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3740
3202
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdAuditlogGet"]?.[localVarOperationServerIndex]?.url;
|
|
3741
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3203
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3742
3204
|
},
|
|
3743
3205
|
/**
|
|
3744
3206
|
*
|
|
@@ -3753,7 +3215,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3753
3215
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdComplianceApprovePut(workflowId, xApiKey, authorization, options);
|
|
3754
3216
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3755
3217
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdComplianceApprovePut"]?.[localVarOperationServerIndex]?.url;
|
|
3756
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3218
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3757
3219
|
},
|
|
3758
3220
|
/**
|
|
3759
3221
|
*
|
|
@@ -3769,7 +3231,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3769
3231
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdComplianceRejectPut(workflowId, v4WorkflowsWorkflowIdComplianceRejectPutRequest, xApiKey, authorization, options);
|
|
3770
3232
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3771
3233
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdComplianceRejectPut"]?.[localVarOperationServerIndex]?.url;
|
|
3772
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3234
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3773
3235
|
},
|
|
3774
3236
|
/**
|
|
3775
3237
|
*
|
|
@@ -3794,7 +3256,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3794
3256
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdDataGet(workflowId, xApiKey, authorization, runId, format, sortBy, order, filters, page, limit, gzip, rowIds, includeAnomalies, options);
|
|
3795
3257
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3796
3258
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdDataGet"]?.[localVarOperationServerIndex]?.url;
|
|
3797
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3259
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3798
3260
|
},
|
|
3799
3261
|
/**
|
|
3800
3262
|
*
|
|
@@ -3807,7 +3269,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3807
3269
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdDelete(workflowId, options);
|
|
3808
3270
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3809
3271
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdDelete"]?.[localVarOperationServerIndex]?.url;
|
|
3810
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3272
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3811
3273
|
},
|
|
3812
3274
|
/**
|
|
3813
3275
|
* Retrieves detailed information about a specific workflow. This endpoint requires authentication and proper team access permissions.
|
|
@@ -3820,7 +3282,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3820
3282
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdGet(workflowId, options);
|
|
3821
3283
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3822
3284
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
3823
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3285
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3824
3286
|
},
|
|
3825
3287
|
/**
|
|
3826
3288
|
*
|
|
@@ -3833,7 +3295,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3833
3295
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdHistoryGet(workflowId, options);
|
|
3834
3296
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3835
3297
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdHistoryGet"]?.[localVarOperationServerIndex]?.url;
|
|
3836
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3298
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3837
3299
|
},
|
|
3838
3300
|
/**
|
|
3839
3301
|
*
|
|
@@ -3847,7 +3309,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3847
3309
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdJobsJobIdGet(workflowId, jobId, options);
|
|
3848
3310
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3849
3311
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdJobsJobIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
3850
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3312
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3851
3313
|
},
|
|
3852
3314
|
/**
|
|
3853
3315
|
*
|
|
@@ -3861,7 +3323,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3861
3323
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdMetadataPut(workflowId, v4WorkflowsWorkflowIdMetadataPutRequest, options);
|
|
3862
3324
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3863
3325
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdMetadataPut"]?.[localVarOperationServerIndex]?.url;
|
|
3864
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3326
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3865
3327
|
},
|
|
3866
3328
|
/**
|
|
3867
3329
|
*
|
|
@@ -3874,7 +3336,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3874
3336
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdPausePut(workflowId, options);
|
|
3875
3337
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3876
3338
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdPausePut"]?.[localVarOperationServerIndex]?.url;
|
|
3877
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3339
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3878
3340
|
},
|
|
3879
3341
|
/**
|
|
3880
3342
|
* 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.
|
|
@@ -3887,7 +3349,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3887
3349
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdResumePut(workflowId, options);
|
|
3888
3350
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3889
3351
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdResumePut"]?.[localVarOperationServerIndex]?.url;
|
|
3890
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3352
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3891
3353
|
},
|
|
3892
3354
|
/**
|
|
3893
3355
|
*
|
|
@@ -3901,7 +3363,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3901
3363
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdRunPut(workflowId, v4WorkflowsWorkflowIdRunPutRequest, options);
|
|
3902
3364
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3903
3365
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdRunPut"]?.[localVarOperationServerIndex]?.url;
|
|
3904
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3366
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3905
3367
|
},
|
|
3906
3368
|
/**
|
|
3907
3369
|
*
|
|
@@ -3915,7 +3377,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3915
3377
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdSchedulePut(workflowId, v4WorkflowsWorkflowIdSchedulePutRequest, options);
|
|
3916
3378
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3917
3379
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdSchedulePut"]?.[localVarOperationServerIndex]?.url;
|
|
3918
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3380
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3919
3381
|
},
|
|
3920
3382
|
/**
|
|
3921
3383
|
*
|
|
@@ -3930,7 +3392,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3930
3392
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5ChangesChangeIdGet(changeId, xApiKey, authorization, options);
|
|
3931
3393
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3932
3394
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5ChangesChangeIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
3933
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3395
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3934
3396
|
},
|
|
3935
3397
|
/**
|
|
3936
3398
|
*
|
|
@@ -3949,60 +3411,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3949
3411
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5ChangesGet(xApiKey, authorization, workflowIds, startDate, endDate, skip, limit, options);
|
|
3950
3412
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3951
3413
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5ChangesGet"]?.[localVarOperationServerIndex]?.url;
|
|
3952
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3953
|
-
},
|
|
3954
|
-
/**
|
|
3955
|
-
* Permanently deletes a workflow and its associated tags
|
|
3956
|
-
* @summary Delete a workflow
|
|
3957
|
-
* @param {string} id The ID of the workflow to delete
|
|
3958
|
-
* @param {*} [options] Override http request option.
|
|
3959
|
-
* @throws {RequiredError}
|
|
3960
|
-
*/
|
|
3961
|
-
async v5WorkflowsIdDelete(id, options) {
|
|
3962
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsIdDelete(id, options);
|
|
3963
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3964
|
-
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsIdDelete"]?.[localVarOperationServerIndex]?.url;
|
|
3965
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3966
|
-
},
|
|
3967
|
-
/**
|
|
3968
|
-
* Retrieves a specific workflow and its associated tags by ID
|
|
3969
|
-
* @summary Get workflow by ID
|
|
3970
|
-
* @param {string} id The ID of the workflow to retrieve
|
|
3971
|
-
* @param {*} [options] Override http request option.
|
|
3972
|
-
* @throws {RequiredError}
|
|
3973
|
-
*/
|
|
3974
|
-
async v5WorkflowsIdGet(id, options) {
|
|
3975
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsIdGet(id, options);
|
|
3976
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3977
|
-
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
3978
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3979
|
-
},
|
|
3980
|
-
/**
|
|
3981
|
-
* Updates an existing workflow\'s properties
|
|
3982
|
-
* @summary Update a workflow
|
|
3983
|
-
* @param {string} id The ID of the workflow to update
|
|
3984
|
-
* @param {V5WorkflowsIdPutRequest} v5WorkflowsIdPutRequest
|
|
3985
|
-
* @param {*} [options] Override http request option.
|
|
3986
|
-
* @throws {RequiredError}
|
|
3987
|
-
*/
|
|
3988
|
-
async v5WorkflowsIdPut(id, v5WorkflowsIdPutRequest, options) {
|
|
3989
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsIdPut(id, v5WorkflowsIdPutRequest, options);
|
|
3990
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3991
|
-
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsIdPut"]?.[localVarOperationServerIndex]?.url;
|
|
3992
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3993
|
-
},
|
|
3994
|
-
/**
|
|
3995
|
-
* Creates a new workflow in pending state
|
|
3996
|
-
* @summary Create a new workflow
|
|
3997
|
-
* @param {V5WorkflowsPostRequest} v5WorkflowsPostRequest
|
|
3998
|
-
* @param {*} [options] Override http request option.
|
|
3999
|
-
* @throws {RequiredError}
|
|
4000
|
-
*/
|
|
4001
|
-
async v5WorkflowsPost(v5WorkflowsPostRequest, options) {
|
|
4002
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsPost(v5WorkflowsPostRequest, options);
|
|
4003
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
4004
|
-
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsPost"]?.[localVarOperationServerIndex]?.url;
|
|
4005
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3414
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
4006
3415
|
},
|
|
4007
3416
|
/**
|
|
4008
3417
|
*
|
|
@@ -4019,7 +3428,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
4019
3428
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsWorkflowIdAuditlogGet(workflowId, xApiKey, authorization, page, limit, options);
|
|
4020
3429
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
4021
3430
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsWorkflowIdAuditlogGet"]?.[localVarOperationServerIndex]?.url;
|
|
4022
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3431
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
4023
3432
|
}
|
|
4024
3433
|
};
|
|
4025
3434
|
};
|
|
@@ -4052,7 +3461,7 @@ var WorkflowsApi = class extends BaseAPI {
|
|
|
4052
3461
|
* @throws {RequiredError}
|
|
4053
3462
|
*/
|
|
4054
3463
|
v4WorkflowsGet(requestParameters = {}, options) {
|
|
4055
|
-
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));
|
|
3464
|
+
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));
|
|
4056
3465
|
}
|
|
4057
3466
|
/**
|
|
4058
3467
|
* Create a new workflow with schema, custom fields, or agentic navigation mode
|
|
@@ -4125,179 +3534,583 @@ var WorkflowsApi = class extends BaseAPI {
|
|
|
4125
3534
|
return WorkflowsApiFp(this.configuration).v4WorkflowsWorkflowIdGet(requestParameters.workflowId, options).then((request) => request(this.axios, this.basePath));
|
|
4126
3535
|
}
|
|
4127
3536
|
/**
|
|
4128
|
-
*
|
|
4129
|
-
* @summary Get the workflow run history
|
|
4130
|
-
* @param {WorkflowsApiV4WorkflowsWorkflowIdHistoryGetRequest} requestParameters Request parameters.
|
|
4131
|
-
* @param {*} [options] Override http request option.
|
|
4132
|
-
* @throws {RequiredError}
|
|
3537
|
+
*
|
|
3538
|
+
* @summary Get the workflow run history
|
|
3539
|
+
* @param {WorkflowsApiV4WorkflowsWorkflowIdHistoryGetRequest} requestParameters Request parameters.
|
|
3540
|
+
* @param {*} [options] Override http request option.
|
|
3541
|
+
* @throws {RequiredError}
|
|
3542
|
+
*/
|
|
3543
|
+
v4WorkflowsWorkflowIdHistoryGet(requestParameters, options) {
|
|
3544
|
+
return WorkflowsApiFp(this.configuration).v4WorkflowsWorkflowIdHistoryGet(requestParameters.workflowId, options).then((request) => request(this.axios, this.basePath));
|
|
3545
|
+
}
|
|
3546
|
+
/**
|
|
3547
|
+
*
|
|
3548
|
+
* @summary Get job status and telemetry
|
|
3549
|
+
* @param {WorkflowsApiV4WorkflowsWorkflowIdJobsJobIdGetRequest} requestParameters Request parameters.
|
|
3550
|
+
* @param {*} [options] Override http request option.
|
|
3551
|
+
* @throws {RequiredError}
|
|
3552
|
+
*/
|
|
3553
|
+
v4WorkflowsWorkflowIdJobsJobIdGet(requestParameters, options) {
|
|
3554
|
+
return WorkflowsApiFp(this.configuration).v4WorkflowsWorkflowIdJobsJobIdGet(requestParameters.workflowId, requestParameters.jobId, options).then((request) => request(this.axios, this.basePath));
|
|
3555
|
+
}
|
|
3556
|
+
/**
|
|
3557
|
+
*
|
|
3558
|
+
* @summary Update workflow metadata
|
|
3559
|
+
* @param {WorkflowsApiV4WorkflowsWorkflowIdMetadataPutRequest} requestParameters Request parameters.
|
|
3560
|
+
* @param {*} [options] Override http request option.
|
|
3561
|
+
* @throws {RequiredError}
|
|
3562
|
+
*/
|
|
3563
|
+
v4WorkflowsWorkflowIdMetadataPut(requestParameters, options) {
|
|
3564
|
+
return WorkflowsApiFp(this.configuration).v4WorkflowsWorkflowIdMetadataPut(requestParameters.workflowId, requestParameters.v4WorkflowsWorkflowIdMetadataPutRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3565
|
+
}
|
|
3566
|
+
/**
|
|
3567
|
+
*
|
|
3568
|
+
* @summary Pause a workflow
|
|
3569
|
+
* @param {WorkflowsApiV4WorkflowsWorkflowIdPausePutRequest} requestParameters Request parameters.
|
|
3570
|
+
* @param {*} [options] Override http request option.
|
|
3571
|
+
* @throws {RequiredError}
|
|
3572
|
+
*/
|
|
3573
|
+
v4WorkflowsWorkflowIdPausePut(requestParameters, options) {
|
|
3574
|
+
return WorkflowsApiFp(this.configuration).v4WorkflowsWorkflowIdPausePut(requestParameters.workflowId, options).then((request) => request(this.axios, this.basePath));
|
|
3575
|
+
}
|
|
3576
|
+
/**
|
|
3577
|
+
* 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.
|
|
3578
|
+
* @summary Resume a workflow
|
|
3579
|
+
* @param {WorkflowsApiV4WorkflowsWorkflowIdResumePutRequest} requestParameters Request parameters.
|
|
3580
|
+
* @param {*} [options] Override http request option.
|
|
3581
|
+
* @throws {RequiredError}
|
|
3582
|
+
*/
|
|
3583
|
+
v4WorkflowsWorkflowIdResumePut(requestParameters, options) {
|
|
3584
|
+
return WorkflowsApiFp(this.configuration).v4WorkflowsWorkflowIdResumePut(requestParameters.workflowId, options).then((request) => request(this.axios, this.basePath));
|
|
3585
|
+
}
|
|
3586
|
+
/**
|
|
3587
|
+
*
|
|
3588
|
+
* @summary Run a workflow
|
|
3589
|
+
* @param {WorkflowsApiV4WorkflowsWorkflowIdRunPutRequest} requestParameters Request parameters.
|
|
3590
|
+
* @param {*} [options] Override http request option.
|
|
3591
|
+
* @throws {RequiredError}
|
|
3592
|
+
*/
|
|
3593
|
+
v4WorkflowsWorkflowIdRunPut(requestParameters, options) {
|
|
3594
|
+
return WorkflowsApiFp(this.configuration).v4WorkflowsWorkflowIdRunPut(requestParameters.workflowId, requestParameters.v4WorkflowsWorkflowIdRunPutRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3595
|
+
}
|
|
3596
|
+
/**
|
|
3597
|
+
*
|
|
3598
|
+
* @summary Schedule a workflow
|
|
3599
|
+
* @param {WorkflowsApiV4WorkflowsWorkflowIdSchedulePutRequest} requestParameters Request parameters.
|
|
3600
|
+
* @param {*} [options] Override http request option.
|
|
3601
|
+
* @throws {RequiredError}
|
|
3602
|
+
*/
|
|
3603
|
+
v4WorkflowsWorkflowIdSchedulePut(requestParameters, options) {
|
|
3604
|
+
return WorkflowsApiFp(this.configuration).v4WorkflowsWorkflowIdSchedulePut(requestParameters.workflowId, requestParameters.v4WorkflowsWorkflowIdSchedulePutRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3605
|
+
}
|
|
3606
|
+
/**
|
|
3607
|
+
*
|
|
3608
|
+
* @summary Get data change by ID (PostgreSQL)
|
|
3609
|
+
* @param {WorkflowsApiV5ChangesChangeIdGetRequest} requestParameters Request parameters.
|
|
3610
|
+
* @param {*} [options] Override http request option.
|
|
3611
|
+
* @throws {RequiredError}
|
|
3612
|
+
*/
|
|
3613
|
+
v5ChangesChangeIdGet(requestParameters, options) {
|
|
3614
|
+
return WorkflowsApiFp(this.configuration).v5ChangesChangeIdGet(requestParameters.changeId, requestParameters.xApiKey, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
3615
|
+
}
|
|
3616
|
+
/**
|
|
3617
|
+
*
|
|
3618
|
+
* @summary Get all data changes (PostgreSQL)
|
|
3619
|
+
* @param {WorkflowsApiV5ChangesGetRequest} requestParameters Request parameters.
|
|
3620
|
+
* @param {*} [options] Override http request option.
|
|
3621
|
+
* @throws {RequiredError}
|
|
3622
|
+
*/
|
|
3623
|
+
v5ChangesGet(requestParameters = {}, options) {
|
|
3624
|
+
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));
|
|
3625
|
+
}
|
|
3626
|
+
/**
|
|
3627
|
+
*
|
|
3628
|
+
* @summary Get workflow audit log entries
|
|
3629
|
+
* @param {WorkflowsApiV5WorkflowsWorkflowIdAuditlogGetRequest} requestParameters Request parameters.
|
|
3630
|
+
* @param {*} [options] Override http request option.
|
|
3631
|
+
* @throws {RequiredError}
|
|
3632
|
+
*/
|
|
3633
|
+
v5WorkflowsWorkflowIdAuditlogGet(requestParameters, options) {
|
|
3634
|
+
return WorkflowsApiFp(this.configuration).v5WorkflowsWorkflowIdAuditlogGet(requestParameters.workflowId, requestParameters.xApiKey, requestParameters.authorization, requestParameters.page, requestParameters.limit, options).then((request) => request(this.axios, this.basePath));
|
|
3635
|
+
}
|
|
3636
|
+
};
|
|
3637
|
+
|
|
3638
|
+
// src/generated/configuration.ts
|
|
3639
|
+
var Configuration = class {
|
|
3640
|
+
constructor(param = {}) {
|
|
3641
|
+
this.apiKey = param.apiKey;
|
|
3642
|
+
this.username = param.username;
|
|
3643
|
+
this.password = param.password;
|
|
3644
|
+
this.accessToken = param.accessToken;
|
|
3645
|
+
this.basePath = param.basePath;
|
|
3646
|
+
this.serverIndex = param.serverIndex;
|
|
3647
|
+
this.baseOptions = {
|
|
3648
|
+
...param.baseOptions,
|
|
3649
|
+
headers: {
|
|
3650
|
+
...param.baseOptions?.headers
|
|
3651
|
+
}
|
|
3652
|
+
};
|
|
3653
|
+
this.formDataCtor = param.formDataCtor;
|
|
3654
|
+
}
|
|
3655
|
+
/**
|
|
3656
|
+
* Check if the given MIME is a JSON MIME.
|
|
3657
|
+
* JSON MIME examples:
|
|
3658
|
+
* application/json
|
|
3659
|
+
* application/json; charset=UTF8
|
|
3660
|
+
* APPLICATION/JSON
|
|
3661
|
+
* application/vnd.company+json
|
|
3662
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
3663
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
3664
|
+
*/
|
|
3665
|
+
isJsonMime(mime) {
|
|
3666
|
+
const jsonMime = new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$", "i");
|
|
3667
|
+
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === "application/json-patch+json");
|
|
3668
|
+
}
|
|
3669
|
+
};
|
|
3670
|
+
|
|
3671
|
+
// src/generated/models/data-field.ts
|
|
3672
|
+
var DataFieldDataTypeEnum = {
|
|
3673
|
+
String: "STRING",
|
|
3674
|
+
Number: "NUMBER",
|
|
3675
|
+
Boolean: "BOOLEAN",
|
|
3676
|
+
Date: "DATE",
|
|
3677
|
+
Datetime: "DATETIME",
|
|
3678
|
+
Money: "MONEY",
|
|
3679
|
+
Image: "IMAGE",
|
|
3680
|
+
Link: "LINK",
|
|
3681
|
+
Object: "OBJECT",
|
|
3682
|
+
Array: "ARRAY"
|
|
3683
|
+
};
|
|
3684
|
+
|
|
3685
|
+
// src/domains/extraction/extraction.acl.ts
|
|
3686
|
+
var FetchDataOptions = class {
|
|
3687
|
+
};
|
|
3688
|
+
var CanonicalSchemaFieldDataType = {
|
|
3689
|
+
String: DataFieldDataTypeEnum.String,
|
|
3690
|
+
Number: DataFieldDataTypeEnum.Number,
|
|
3691
|
+
Boolean: DataFieldDataTypeEnum.Boolean,
|
|
3692
|
+
Date: DataFieldDataTypeEnum.Date,
|
|
3693
|
+
Datetime: DataFieldDataTypeEnum.Datetime,
|
|
3694
|
+
Money: DataFieldDataTypeEnum.Money,
|
|
3695
|
+
Image: DataFieldDataTypeEnum.Image,
|
|
3696
|
+
Link: DataFieldDataTypeEnum.Link,
|
|
3697
|
+
Object: DataFieldDataTypeEnum.Object,
|
|
3698
|
+
Array: DataFieldDataTypeEnum.Array
|
|
3699
|
+
};
|
|
3700
|
+
var SchemaFieldDataType = {
|
|
3701
|
+
...CanonicalSchemaFieldDataType,
|
|
3702
|
+
/** @deprecated use `SchemaFieldDataType.String` */
|
|
3703
|
+
Text: DataFieldDataTypeEnum.String,
|
|
3704
|
+
/** @deprecated use `SchemaFieldDataType.Link` */
|
|
3705
|
+
Url: DataFieldDataTypeEnum.Link
|
|
3706
|
+
};
|
|
3707
|
+
|
|
3708
|
+
// src/runtime/pagination/paginator.ts
|
|
3709
|
+
var PagedIterator = class {
|
|
3710
|
+
constructor(fetchPage) {
|
|
3711
|
+
this.fetchPage = fetchPage;
|
|
3712
|
+
}
|
|
3713
|
+
/**
|
|
3714
|
+
* Fetch all items across all pages
|
|
3715
|
+
* @param options Base options (page will be overridden)
|
|
3716
|
+
* @returns Array of all items
|
|
3717
|
+
*/
|
|
3718
|
+
async fetchAll(options = {}) {
|
|
3719
|
+
const allItems = [];
|
|
3720
|
+
let currentPage = 1;
|
|
3721
|
+
let hasMore = true;
|
|
3722
|
+
while (hasMore) {
|
|
3723
|
+
const result = await this.fetchPage({ ...options, page: currentPage });
|
|
3724
|
+
allItems.push(...result.data);
|
|
3725
|
+
const pagination = result.pagination;
|
|
3726
|
+
hasMore = pagination.page !== void 0 && pagination.totalPages !== void 0 && pagination.page < pagination.totalPages;
|
|
3727
|
+
currentPage++;
|
|
3728
|
+
}
|
|
3729
|
+
return allItems;
|
|
3730
|
+
}
|
|
3731
|
+
/**
|
|
3732
|
+
* Create an async iterator for pages
|
|
3733
|
+
* @param options Base options (page will be overridden)
|
|
3734
|
+
* @returns Async generator that yields pages
|
|
4133
3735
|
*/
|
|
4134
|
-
|
|
4135
|
-
|
|
3736
|
+
async *pages(options = {}) {
|
|
3737
|
+
let currentPage = 1;
|
|
3738
|
+
let hasMore = true;
|
|
3739
|
+
while (hasMore) {
|
|
3740
|
+
const result = await this.fetchPage({ ...options, page: currentPage });
|
|
3741
|
+
yield result;
|
|
3742
|
+
const pagination = result.pagination;
|
|
3743
|
+
hasMore = pagination.page !== void 0 && pagination.totalPages !== void 0 && pagination.page < pagination.totalPages;
|
|
3744
|
+
currentPage++;
|
|
3745
|
+
}
|
|
4136
3746
|
}
|
|
4137
3747
|
/**
|
|
4138
|
-
*
|
|
4139
|
-
* @
|
|
4140
|
-
* @
|
|
4141
|
-
* @param {*} [options] Override http request option.
|
|
4142
|
-
* @throws {RequiredError}
|
|
3748
|
+
* Create an async iterator for individual items
|
|
3749
|
+
* @param options Base options (page will be overridden)
|
|
3750
|
+
* @returns Async generator that yields items
|
|
4143
3751
|
*/
|
|
4144
|
-
|
|
4145
|
-
|
|
3752
|
+
async *items(options = {}) {
|
|
3753
|
+
for await (const page of this.pages(options)) {
|
|
3754
|
+
for (const item of page.data) {
|
|
3755
|
+
yield item;
|
|
3756
|
+
}
|
|
3757
|
+
}
|
|
4146
3758
|
}
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
v4WorkflowsWorkflowIdMetadataPut(requestParameters, options) {
|
|
4155
|
-
return WorkflowsApiFp(this.configuration).v4WorkflowsWorkflowIdMetadataPut(requestParameters.workflowId, requestParameters.v4WorkflowsWorkflowIdMetadataPutRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3759
|
+
};
|
|
3760
|
+
|
|
3761
|
+
// src/domains/extraction/services/data-fetcher.service.ts
|
|
3762
|
+
var DataFetcherService = class {
|
|
3763
|
+
constructor(workflowsApi) {
|
|
3764
|
+
this.workflowsApi = workflowsApi;
|
|
3765
|
+
this.defaultLimit = 100;
|
|
4156
3766
|
}
|
|
4157
3767
|
/**
|
|
4158
|
-
*
|
|
4159
|
-
* @summary Pause a workflow
|
|
4160
|
-
* @param {WorkflowsApiV4WorkflowsWorkflowIdPausePutRequest} requestParameters Request parameters.
|
|
4161
|
-
* @param {*} [options] Override http request option.
|
|
4162
|
-
* @throws {RequiredError}
|
|
3768
|
+
* Fetch a page of workflow data
|
|
4163
3769
|
*/
|
|
4164
|
-
|
|
4165
|
-
|
|
3770
|
+
async fetchData(options) {
|
|
3771
|
+
const response = await this.workflowsApi.v4WorkflowsWorkflowIdDataGet({
|
|
3772
|
+
...options,
|
|
3773
|
+
page: options.page ?? 1,
|
|
3774
|
+
limit: options.limit ?? this.defaultLimit
|
|
3775
|
+
});
|
|
3776
|
+
const result = response.data;
|
|
3777
|
+
return result;
|
|
4166
3778
|
}
|
|
4167
3779
|
/**
|
|
4168
|
-
*
|
|
4169
|
-
* @summary Resume a workflow
|
|
4170
|
-
* @param {WorkflowsApiV4WorkflowsWorkflowIdResumePutRequest} requestParameters Request parameters.
|
|
4171
|
-
* @param {*} [options] Override http request option.
|
|
4172
|
-
* @throws {RequiredError}
|
|
3780
|
+
* Fetch all pages of workflow data
|
|
4173
3781
|
*/
|
|
4174
|
-
|
|
4175
|
-
|
|
3782
|
+
async fetchAllData(options) {
|
|
3783
|
+
const iterator = new PagedIterator(
|
|
3784
|
+
(pageOptions) => this.fetchData({ ...options, ...pageOptions })
|
|
3785
|
+
);
|
|
3786
|
+
return iterator.fetchAll({ limit: options.limit ?? this.defaultLimit });
|
|
4176
3787
|
}
|
|
4177
3788
|
/**
|
|
4178
|
-
*
|
|
4179
|
-
* @summary Run a workflow
|
|
4180
|
-
* @param {WorkflowsApiV4WorkflowsWorkflowIdRunPutRequest} requestParameters Request parameters.
|
|
4181
|
-
* @param {*} [options] Override http request option.
|
|
4182
|
-
* @throws {RequiredError}
|
|
3789
|
+
* Create an async iterator for paginated data fetching
|
|
4183
3790
|
*/
|
|
4184
|
-
|
|
4185
|
-
|
|
3791
|
+
async *fetchDataPages(options) {
|
|
3792
|
+
const iterator = new PagedIterator(
|
|
3793
|
+
(pageOptions) => this.fetchData({ ...options, ...pageOptions })
|
|
3794
|
+
);
|
|
3795
|
+
for await (const page of iterator.pages({
|
|
3796
|
+
limit: options.limit ?? this.defaultLimit
|
|
3797
|
+
})) {
|
|
3798
|
+
yield page;
|
|
3799
|
+
}
|
|
3800
|
+
}
|
|
3801
|
+
};
|
|
3802
|
+
|
|
3803
|
+
// src/runtime/exceptions/base.exception.ts
|
|
3804
|
+
var KadoaErrorCode = {
|
|
3805
|
+
AUTH_ERROR: "AUTH_ERROR",
|
|
3806
|
+
VALIDATION_ERROR: "VALIDATION_ERROR",
|
|
3807
|
+
BAD_REQUEST: "BAD_REQUEST",
|
|
3808
|
+
NOT_FOUND: "NOT_FOUND",
|
|
3809
|
+
INTERNAL_ERROR: "INTERNAL_ERROR"
|
|
3810
|
+
};
|
|
3811
|
+
var _KadoaSdkException = class _KadoaSdkException extends Error {
|
|
3812
|
+
constructor(message, options) {
|
|
3813
|
+
super(message);
|
|
3814
|
+
this.name = "KadoaSdkException";
|
|
3815
|
+
this.code = options?.code ?? "UNKNOWN";
|
|
3816
|
+
this.details = options?.details;
|
|
3817
|
+
if (options && "cause" in options) this.cause = options.cause;
|
|
3818
|
+
Error.captureStackTrace?.(this, _KadoaSdkException);
|
|
3819
|
+
}
|
|
3820
|
+
static from(error, details) {
|
|
3821
|
+
if (error instanceof _KadoaSdkException) return error;
|
|
3822
|
+
const message = error instanceof Error ? error.message : typeof error === "string" ? error : "Unexpected error";
|
|
3823
|
+
return new _KadoaSdkException(message, {
|
|
3824
|
+
code: "UNKNOWN",
|
|
3825
|
+
details,
|
|
3826
|
+
cause: error
|
|
3827
|
+
});
|
|
3828
|
+
}
|
|
3829
|
+
toJSON() {
|
|
3830
|
+
return {
|
|
3831
|
+
name: this.name,
|
|
3832
|
+
message: this.message,
|
|
3833
|
+
code: this.code,
|
|
3834
|
+
details: this.details
|
|
3835
|
+
};
|
|
3836
|
+
}
|
|
3837
|
+
toString() {
|
|
3838
|
+
return [this.name, this.code, this.message].filter(Boolean).join(": ");
|
|
3839
|
+
}
|
|
3840
|
+
toDetailedString() {
|
|
3841
|
+
const parts = [`${this.name}: ${this.message}`, `Code: ${this.code}`];
|
|
3842
|
+
if (this.details && Object.keys(this.details).length > 0) {
|
|
3843
|
+
parts.push(`Details: ${JSON.stringify(this.details, null, 2)}`);
|
|
3844
|
+
}
|
|
3845
|
+
if (this.cause) {
|
|
3846
|
+
parts.push(`Cause: ${this.cause}`);
|
|
3847
|
+
}
|
|
3848
|
+
return parts.join("\n");
|
|
3849
|
+
}
|
|
3850
|
+
static isInstance(error) {
|
|
3851
|
+
return error instanceof _KadoaSdkException;
|
|
3852
|
+
}
|
|
3853
|
+
static wrap(error, extra) {
|
|
3854
|
+
if (error instanceof _KadoaSdkException) return error;
|
|
3855
|
+
const message = extra?.message || (error instanceof Error ? error.message : typeof error === "string" ? error : "Unexpected error");
|
|
3856
|
+
return new _KadoaSdkException(message, {
|
|
3857
|
+
code: "UNKNOWN",
|
|
3858
|
+
details: extra?.details,
|
|
3859
|
+
cause: error
|
|
3860
|
+
});
|
|
3861
|
+
}
|
|
3862
|
+
};
|
|
3863
|
+
_KadoaSdkException.ERROR_MESSAGES = {
|
|
3864
|
+
// General errors
|
|
3865
|
+
CONFIG_ERROR: "Invalid configuration provided",
|
|
3866
|
+
AUTH_FAILED: "Authentication failed. Please check your API key",
|
|
3867
|
+
RATE_LIMITED: "Rate limit exceeded. Please try again later",
|
|
3868
|
+
NETWORK_ERROR: "Network error occurred",
|
|
3869
|
+
SERVER_ERROR: "Server error occurred",
|
|
3870
|
+
PARSE_ERROR: "Failed to parse response",
|
|
3871
|
+
BAD_REQUEST: "Bad request",
|
|
3872
|
+
ABORTED: "Aborted",
|
|
3873
|
+
NOT_FOUND: "Not found",
|
|
3874
|
+
// Workflow specific errors
|
|
3875
|
+
NO_WORKFLOW_ID: "Failed to start extraction process - no ID received",
|
|
3876
|
+
WORKFLOW_CREATE_FAILED: "Failed to create workflow",
|
|
3877
|
+
WORKFLOW_TIMEOUT: "Workflow processing timed out",
|
|
3878
|
+
WORKFLOW_UNEXPECTED_STATUS: "Extraction completed with unexpected status",
|
|
3879
|
+
PROGRESS_CHECK_FAILED: "Failed to check extraction progress",
|
|
3880
|
+
DATA_FETCH_FAILED: "Failed to retrieve extracted data from workflow",
|
|
3881
|
+
// Extraction specific errors
|
|
3882
|
+
NO_URLS: "At least one URL is required for extraction",
|
|
3883
|
+
NO_API_KEY: "API key is required for entity detection",
|
|
3884
|
+
LINK_REQUIRED: "Link is required for entity field detection",
|
|
3885
|
+
NO_PREDICTIONS: "No entity predictions returned from the API",
|
|
3886
|
+
EXTRACTION_FAILED: "Data extraction failed for the provided URLs",
|
|
3887
|
+
ENTITY_FETCH_FAILED: "Failed to fetch entity fields",
|
|
3888
|
+
ENTITY_INVARIANT_VIOLATION: "No valid entity provided",
|
|
3889
|
+
// Schema specific errors
|
|
3890
|
+
SCHEMA_NOT_FOUND: "Schema not found",
|
|
3891
|
+
SCHEMA_FETCH_ERROR: "Failed to fetch schema",
|
|
3892
|
+
SCHEMAS_FETCH_ERROR: "Failed to fetch schemas",
|
|
3893
|
+
SCHEMA_CREATE_FAILED: "Failed to create schema",
|
|
3894
|
+
SCHEMA_UPDATE_FAILED: "Failed to update schema",
|
|
3895
|
+
SCHEMA_DELETE_FAILED: "Failed to delete schema"
|
|
3896
|
+
};
|
|
3897
|
+
var KadoaSdkException = _KadoaSdkException;
|
|
3898
|
+
var ERROR_MESSAGES = KadoaSdkException.ERROR_MESSAGES;
|
|
3899
|
+
var KadoaHttpException = class _KadoaHttpException extends KadoaSdkException {
|
|
3900
|
+
constructor(message, options) {
|
|
3901
|
+
super(message, {
|
|
3902
|
+
code: options?.code,
|
|
3903
|
+
details: options?.details,
|
|
3904
|
+
cause: options?.cause
|
|
3905
|
+
});
|
|
3906
|
+
this.name = "KadoaHttpException";
|
|
3907
|
+
this.httpStatus = options?.httpStatus;
|
|
3908
|
+
this.requestId = options?.requestId;
|
|
3909
|
+
this.endpoint = options?.endpoint;
|
|
3910
|
+
this.method = options?.method;
|
|
3911
|
+
this.responseBody = options?.responseBody;
|
|
3912
|
+
}
|
|
3913
|
+
static fromAxiosError(error, extra) {
|
|
3914
|
+
const status = error.response?.status;
|
|
3915
|
+
const requestId = error.response?.headers?.["x-request-id"] || error.response?.headers?.["x-amzn-requestid"];
|
|
3916
|
+
const method = error.config?.method?.toUpperCase();
|
|
3917
|
+
const url = error.config?.url;
|
|
3918
|
+
return new _KadoaHttpException(extra?.message || error.message, {
|
|
3919
|
+
code: _KadoaHttpException.mapStatusToCode(error),
|
|
3920
|
+
httpStatus: status,
|
|
3921
|
+
requestId,
|
|
3922
|
+
endpoint: url,
|
|
3923
|
+
method,
|
|
3924
|
+
responseBody: error.response?.data,
|
|
3925
|
+
details: extra?.details,
|
|
3926
|
+
cause: error
|
|
3927
|
+
});
|
|
3928
|
+
}
|
|
3929
|
+
toJSON() {
|
|
3930
|
+
return {
|
|
3931
|
+
...super.toJSON(),
|
|
3932
|
+
httpStatus: this.httpStatus,
|
|
3933
|
+
requestId: this.requestId,
|
|
3934
|
+
endpoint: this.endpoint,
|
|
3935
|
+
method: this.method,
|
|
3936
|
+
responseBody: this.responseBody
|
|
3937
|
+
};
|
|
3938
|
+
}
|
|
3939
|
+
toDetailedString() {
|
|
3940
|
+
const parts = [`${this.name}: ${this.message}`, `Code: ${this.code}`];
|
|
3941
|
+
if (this.httpStatus) {
|
|
3942
|
+
parts.push(`HTTP Status: ${this.httpStatus}`);
|
|
3943
|
+
}
|
|
3944
|
+
if (this.method && this.endpoint) {
|
|
3945
|
+
parts.push(`Request: ${this.method} ${this.endpoint}`);
|
|
3946
|
+
}
|
|
3947
|
+
if (this.requestId) {
|
|
3948
|
+
parts.push(`Request ID: ${this.requestId}`);
|
|
3949
|
+
}
|
|
3950
|
+
if (this.responseBody) {
|
|
3951
|
+
parts.push(
|
|
3952
|
+
`Response Body: ${JSON.stringify(this.responseBody, null, 2)}`
|
|
3953
|
+
);
|
|
3954
|
+
}
|
|
3955
|
+
if (this.details && Object.keys(this.details).length > 0) {
|
|
3956
|
+
parts.push(`Details: ${JSON.stringify(this.details, null, 2)}`);
|
|
3957
|
+
}
|
|
3958
|
+
if (this.cause) {
|
|
3959
|
+
parts.push(`Cause: ${this.cause}`);
|
|
3960
|
+
}
|
|
3961
|
+
return parts.join("\n");
|
|
4186
3962
|
}
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
v4WorkflowsWorkflowIdSchedulePut(requestParameters, options) {
|
|
4195
|
-
return WorkflowsApiFp(this.configuration).v4WorkflowsWorkflowIdSchedulePut(requestParameters.workflowId, requestParameters.v4WorkflowsWorkflowIdSchedulePutRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3963
|
+
static wrap(error, extra) {
|
|
3964
|
+
if (error instanceof _KadoaHttpException) return error;
|
|
3965
|
+
if (error instanceof KadoaSdkException) return error;
|
|
3966
|
+
if (globalAxios2.isAxiosError(error)) {
|
|
3967
|
+
return _KadoaHttpException.fromAxiosError(error, extra);
|
|
3968
|
+
}
|
|
3969
|
+
return KadoaSdkException.wrap(error, extra);
|
|
4196
3970
|
}
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
3971
|
+
static mapStatusToCode(errorOrStatus) {
|
|
3972
|
+
const status = typeof errorOrStatus === "number" ? errorOrStatus : errorOrStatus.response?.status;
|
|
3973
|
+
if (!status) {
|
|
3974
|
+
if (typeof errorOrStatus === "number") return "UNKNOWN";
|
|
3975
|
+
return errorOrStatus.code === "ECONNABORTED" ? "TIMEOUT" : errorOrStatus.request ? "NETWORK_ERROR" : "UNKNOWN";
|
|
3976
|
+
}
|
|
3977
|
+
if (status === 401 || status === 403) return "AUTH_ERROR";
|
|
3978
|
+
if (status === 404) return "NOT_FOUND";
|
|
3979
|
+
if (status === 408) return "TIMEOUT";
|
|
3980
|
+
if (status === 429) return "RATE_LIMITED";
|
|
3981
|
+
if (status >= 400 && status < 500) return "VALIDATION_ERROR";
|
|
3982
|
+
if (status >= 500) return "HTTP_ERROR";
|
|
3983
|
+
return "UNKNOWN";
|
|
4206
3984
|
}
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
3985
|
+
};
|
|
3986
|
+
var createLogger = (namespace) => createDebug__default.default(`kadoa:${namespace}`);
|
|
3987
|
+
var logger = {
|
|
3988
|
+
client: createLogger("client"),
|
|
3989
|
+
wss: createLogger("wss"),
|
|
3990
|
+
extraction: createLogger("extraction"),
|
|
3991
|
+
http: createLogger("http"),
|
|
3992
|
+
workflow: createLogger("workflow"),
|
|
3993
|
+
crawl: createLogger("crawl"),
|
|
3994
|
+
notifications: createLogger("notifications"),
|
|
3995
|
+
schemas: createLogger("schemas"),
|
|
3996
|
+
validation: createLogger("validation")
|
|
3997
|
+
};
|
|
3998
|
+
var _SchemaBuilder = class _SchemaBuilder {
|
|
3999
|
+
constructor() {
|
|
4000
|
+
this.fields = [];
|
|
4216
4001
|
}
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
* @summary Delete a workflow
|
|
4220
|
-
* @param {WorkflowsApiV5WorkflowsIdDeleteRequest} requestParameters Request parameters.
|
|
4221
|
-
* @param {*} [options] Override http request option.
|
|
4222
|
-
* @throws {RequiredError}
|
|
4223
|
-
*/
|
|
4224
|
-
v5WorkflowsIdDelete(requestParameters, options) {
|
|
4225
|
-
return WorkflowsApiFp(this.configuration).v5WorkflowsIdDelete(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
|
|
4002
|
+
hasSchemaFields() {
|
|
4003
|
+
return this.fields.some((field) => field.fieldType === "SCHEMA");
|
|
4226
4004
|
}
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
* @param {WorkflowsApiV5WorkflowsIdGetRequest} requestParameters Request parameters.
|
|
4231
|
-
* @param {*} [options] Override http request option.
|
|
4232
|
-
* @throws {RequiredError}
|
|
4233
|
-
*/
|
|
4234
|
-
v5WorkflowsIdGet(requestParameters, options) {
|
|
4235
|
-
return WorkflowsApiFp(this.configuration).v5WorkflowsIdGet(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
|
|
4005
|
+
entity(entityName) {
|
|
4006
|
+
this.entityName = entityName;
|
|
4007
|
+
return this;
|
|
4236
4008
|
}
|
|
4237
4009
|
/**
|
|
4238
|
-
*
|
|
4239
|
-
* @
|
|
4240
|
-
* @param
|
|
4241
|
-
* @param
|
|
4242
|
-
* @
|
|
4010
|
+
* Add a structured field to the schema
|
|
4011
|
+
* @param name - Field name (alphanumeric only)
|
|
4012
|
+
* @param description - Field description
|
|
4013
|
+
* @param dataType - Data type (STRING, NUMBER, BOOLEAN, etc.)
|
|
4014
|
+
* @param options - Optional field configuration
|
|
4243
4015
|
*/
|
|
4244
|
-
|
|
4245
|
-
|
|
4016
|
+
field(name, description, dataType, options) {
|
|
4017
|
+
this.validateFieldName(name);
|
|
4018
|
+
const requiresExample = _SchemaBuilder.TYPES_REQUIRING_EXAMPLE.includes(dataType);
|
|
4019
|
+
if (requiresExample && !options?.example) {
|
|
4020
|
+
throw new KadoaSdkException(
|
|
4021
|
+
`Field "${name}" with type ${dataType} requires an example`,
|
|
4022
|
+
{ code: "VALIDATION_ERROR", details: { name, dataType } }
|
|
4023
|
+
);
|
|
4024
|
+
}
|
|
4025
|
+
this.fields.push({
|
|
4026
|
+
name,
|
|
4027
|
+
description,
|
|
4028
|
+
dataType,
|
|
4029
|
+
fieldType: "SCHEMA",
|
|
4030
|
+
example: options?.example,
|
|
4031
|
+
isKey: options?.isKey
|
|
4032
|
+
});
|
|
4033
|
+
return this;
|
|
4246
4034
|
}
|
|
4247
4035
|
/**
|
|
4248
|
-
*
|
|
4249
|
-
* @
|
|
4250
|
-
* @param
|
|
4251
|
-
* @param
|
|
4252
|
-
* @throws {RequiredError}
|
|
4036
|
+
* Add a classification field to categorize content
|
|
4037
|
+
* @param name - Field name (alphanumeric only)
|
|
4038
|
+
* @param description - Field description
|
|
4039
|
+
* @param categories - Array of category definitions
|
|
4253
4040
|
*/
|
|
4254
|
-
|
|
4255
|
-
|
|
4041
|
+
classify(name, description, categories) {
|
|
4042
|
+
this.validateFieldName(name);
|
|
4043
|
+
this.fields.push({
|
|
4044
|
+
name,
|
|
4045
|
+
description,
|
|
4046
|
+
fieldType: "CLASSIFICATION",
|
|
4047
|
+
categories
|
|
4048
|
+
});
|
|
4049
|
+
return this;
|
|
4256
4050
|
}
|
|
4257
4051
|
/**
|
|
4258
|
-
*
|
|
4259
|
-
* @
|
|
4260
|
-
* @param {WorkflowsApiV5WorkflowsWorkflowIdAuditlogGetRequest} requestParameters Request parameters.
|
|
4261
|
-
* @param {*} [options] Override http request option.
|
|
4262
|
-
* @throws {RequiredError}
|
|
4052
|
+
* Add raw page content to extract
|
|
4053
|
+
* @param name - Raw content format(s): "html", "markdown", or "url"
|
|
4263
4054
|
*/
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
}
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
var Configuration = class {
|
|
4271
|
-
constructor(param = {}) {
|
|
4272
|
-
this.apiKey = param.apiKey;
|
|
4273
|
-
this.username = param.username;
|
|
4274
|
-
this.password = param.password;
|
|
4275
|
-
this.accessToken = param.accessToken;
|
|
4276
|
-
this.basePath = param.basePath;
|
|
4277
|
-
this.serverIndex = param.serverIndex;
|
|
4278
|
-
this.baseOptions = {
|
|
4279
|
-
...param.baseOptions,
|
|
4280
|
-
headers: {
|
|
4281
|
-
...param.baseOptions?.headers
|
|
4055
|
+
raw(name) {
|
|
4056
|
+
const names = Array.isArray(name) ? name : [name];
|
|
4057
|
+
for (const name2 of names) {
|
|
4058
|
+
const fieldName = `raw${esToolkit.upperFirst(esToolkit.camelCase(name2))}`;
|
|
4059
|
+
if (this.fields.some((field) => field.name === fieldName)) {
|
|
4060
|
+
continue;
|
|
4282
4061
|
}
|
|
4062
|
+
this.fields.push({
|
|
4063
|
+
name: fieldName,
|
|
4064
|
+
description: `Raw page content in ${name2.toUpperCase()} format`,
|
|
4065
|
+
fieldType: "METADATA",
|
|
4066
|
+
metadataKey: name2
|
|
4067
|
+
});
|
|
4068
|
+
}
|
|
4069
|
+
return this;
|
|
4070
|
+
}
|
|
4071
|
+
build() {
|
|
4072
|
+
if (this.hasSchemaFields() && !this.entityName) {
|
|
4073
|
+
throw new KadoaSdkException(
|
|
4074
|
+
"Entity name is required when schema fields are present",
|
|
4075
|
+
{
|
|
4076
|
+
code: "VALIDATION_ERROR",
|
|
4077
|
+
details: { entityName: this.entityName }
|
|
4078
|
+
}
|
|
4079
|
+
);
|
|
4080
|
+
}
|
|
4081
|
+
return {
|
|
4082
|
+
entityName: this.entityName,
|
|
4083
|
+
fields: this.fields
|
|
4283
4084
|
};
|
|
4284
|
-
this.formDataCtor = param.formDataCtor;
|
|
4285
4085
|
}
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4086
|
+
validateFieldName(name) {
|
|
4087
|
+
if (!_SchemaBuilder.FIELD_NAME_PATTERN.test(name)) {
|
|
4088
|
+
throw new KadoaSdkException(
|
|
4089
|
+
`Field name "${name}" must be alphanumeric only (no underscores or special characters)`,
|
|
4090
|
+
{
|
|
4091
|
+
code: "VALIDATION_ERROR",
|
|
4092
|
+
details: { name, pattern: "^[A-Za-z0-9]+$" }
|
|
4093
|
+
}
|
|
4094
|
+
);
|
|
4095
|
+
}
|
|
4096
|
+
const lowerName = name.toLowerCase();
|
|
4097
|
+
if (this.fields.some((f) => f.name.toLowerCase() === lowerName)) {
|
|
4098
|
+
throw new KadoaSdkException(`Duplicate field name: "${name}"`, {
|
|
4099
|
+
code: "VALIDATION_ERROR",
|
|
4100
|
+
details: { name }
|
|
4101
|
+
});
|
|
4102
|
+
}
|
|
4299
4103
|
}
|
|
4300
4104
|
};
|
|
4105
|
+
_SchemaBuilder.FIELD_NAME_PATTERN = /^[A-Za-z0-9]+$/;
|
|
4106
|
+
_SchemaBuilder.TYPES_REQUIRING_EXAMPLE = [
|
|
4107
|
+
"STRING",
|
|
4108
|
+
"IMAGE",
|
|
4109
|
+
"LINK",
|
|
4110
|
+
"OBJECT",
|
|
4111
|
+
"ARRAY"
|
|
4112
|
+
];
|
|
4113
|
+
var SchemaBuilder = _SchemaBuilder;
|
|
4301
4114
|
|
|
4302
4115
|
// src/domains/schemas/schemas.service.ts
|
|
4303
4116
|
var debug = logger.schemas;
|
|
@@ -4334,9 +4147,7 @@ var SchemasService = class {
|
|
|
4334
4147
|
fields: built.fields,
|
|
4335
4148
|
...built.entityName ? { entity: built.entityName } : {}
|
|
4336
4149
|
};
|
|
4337
|
-
return service.createSchema(
|
|
4338
|
-
createSchemaBody
|
|
4339
|
-
);
|
|
4150
|
+
return service.createSchema(createSchemaBody);
|
|
4340
4151
|
}
|
|
4341
4152
|
}();
|
|
4342
4153
|
}
|
|
@@ -4430,7 +4241,8 @@ var EntityResolverService = class {
|
|
|
4430
4241
|
const entityPrediction = await this.fetchEntityFields({
|
|
4431
4242
|
link: options.link,
|
|
4432
4243
|
location: options.location,
|
|
4433
|
-
navigationMode: options.navigationMode
|
|
4244
|
+
navigationMode: options.navigationMode,
|
|
4245
|
+
selectorMode: options.selectorMode ?? false
|
|
4434
4246
|
});
|
|
4435
4247
|
const entity = entityPrediction.entity;
|
|
4436
4248
|
return {
|
|
@@ -4592,6 +4404,18 @@ var ExtractionService = class {
|
|
|
4592
4404
|
DEFAULT_OPTIONS,
|
|
4593
4405
|
options
|
|
4594
4406
|
);
|
|
4407
|
+
const isRealTime = config.interval === "REAL_TIME";
|
|
4408
|
+
if (isRealTime) {
|
|
4409
|
+
throw new KadoaSdkException(
|
|
4410
|
+
"extraction.run()/submit() are not supported for real-time workflows. Use the builder API, call waitForReady(), and subscribe via client.realtime.onEvent(...).",
|
|
4411
|
+
{
|
|
4412
|
+
code: "BAD_REQUEST",
|
|
4413
|
+
details: {
|
|
4414
|
+
interval: "REAL_TIME"
|
|
4415
|
+
}
|
|
4416
|
+
}
|
|
4417
|
+
);
|
|
4418
|
+
}
|
|
4595
4419
|
let workflowId;
|
|
4596
4420
|
const resolvedEntity = await this.entityResolverService.resolveEntity(
|
|
4597
4421
|
options.entity || "ai-detection",
|
|
@@ -4740,7 +4564,9 @@ var ExtractionBuilderService = class {
|
|
|
4740
4564
|
name,
|
|
4741
4565
|
description,
|
|
4742
4566
|
navigationMode,
|
|
4743
|
-
extraction
|
|
4567
|
+
extraction,
|
|
4568
|
+
additionalData,
|
|
4569
|
+
bypassPreview
|
|
4744
4570
|
}) {
|
|
4745
4571
|
let entity = "ai-detection";
|
|
4746
4572
|
if (extraction) {
|
|
@@ -4758,7 +4584,8 @@ var ExtractionBuilderService = class {
|
|
|
4758
4584
|
description,
|
|
4759
4585
|
navigationMode: navigationMode || "single-page",
|
|
4760
4586
|
entity,
|
|
4761
|
-
bypassPreview: false
|
|
4587
|
+
bypassPreview: bypassPreview ?? false,
|
|
4588
|
+
additionalData
|
|
4762
4589
|
};
|
|
4763
4590
|
return this;
|
|
4764
4591
|
}
|
|
@@ -4793,12 +4620,15 @@ var ExtractionBuilderService = class {
|
|
|
4793
4620
|
async create() {
|
|
4794
4621
|
assert__default.default(this._options, "Options are not set");
|
|
4795
4622
|
const { urls, name, description, navigationMode, entity } = this.options;
|
|
4623
|
+
const isRealTime = this._options.interval === "REAL_TIME";
|
|
4624
|
+
const useSelectorMode = isRealTime && entity === "ai-detection";
|
|
4796
4625
|
const resolvedEntity = await this.entityResolverService.resolveEntity(
|
|
4797
4626
|
entity,
|
|
4798
4627
|
{
|
|
4799
4628
|
link: urls[0],
|
|
4800
4629
|
location: this._options.location,
|
|
4801
|
-
navigationMode
|
|
4630
|
+
navigationMode,
|
|
4631
|
+
selectorMode: useSelectorMode
|
|
4802
4632
|
}
|
|
4803
4633
|
);
|
|
4804
4634
|
const workflow = await this.workflowsCoreService.create({
|
|
@@ -4812,7 +4642,9 @@ var ExtractionBuilderService = class {
|
|
|
4812
4642
|
fields: resolvedEntity.fields,
|
|
4813
4643
|
autoStart: false,
|
|
4814
4644
|
interval: this._options.interval,
|
|
4815
|
-
schedules: this._options.schedules
|
|
4645
|
+
schedules: this._options.schedules,
|
|
4646
|
+
additionalData: this._options.additionalData,
|
|
4647
|
+
bypassPreview: this._options.bypassPreview
|
|
4816
4648
|
});
|
|
4817
4649
|
if (this._notificationOptions) {
|
|
4818
4650
|
await this.notificationSetupService.setup({
|
|
@@ -4823,9 +4655,35 @@ var ExtractionBuilderService = class {
|
|
|
4823
4655
|
this._workflowId = workflow.id;
|
|
4824
4656
|
return this;
|
|
4825
4657
|
}
|
|
4658
|
+
async waitForReady(options) {
|
|
4659
|
+
assert__default.default(this._workflowId, "Workflow ID is not set");
|
|
4660
|
+
const targetState = options?.targetState ?? "PREVIEW";
|
|
4661
|
+
const current = await this.workflowsCoreService.get(this._workflowId);
|
|
4662
|
+
if (current.state === targetState || targetState === "PREVIEW" && current.state === "ACTIVE") {
|
|
4663
|
+
return current;
|
|
4664
|
+
}
|
|
4665
|
+
const workflow = await this.workflowsCoreService.wait(this._workflowId, {
|
|
4666
|
+
targetState,
|
|
4667
|
+
pollIntervalMs: options?.pollIntervalMs,
|
|
4668
|
+
timeoutMs: options?.timeoutMs
|
|
4669
|
+
});
|
|
4670
|
+
return workflow;
|
|
4671
|
+
}
|
|
4826
4672
|
async run(options) {
|
|
4827
4673
|
assert__default.default(this._options, "Options are not set");
|
|
4828
4674
|
assert__default.default(this._workflowId, "Workflow ID is not set");
|
|
4675
|
+
if (this._options.interval === "REAL_TIME") {
|
|
4676
|
+
throw new KadoaSdkException(
|
|
4677
|
+
"run() is not supported for real-time workflows. Use waitForReady() and subscribe via client.realtime.onEvent(...).",
|
|
4678
|
+
{
|
|
4679
|
+
code: "BAD_REQUEST",
|
|
4680
|
+
details: {
|
|
4681
|
+
interval: "REAL_TIME",
|
|
4682
|
+
workflowId: this._workflowId
|
|
4683
|
+
}
|
|
4684
|
+
}
|
|
4685
|
+
);
|
|
4686
|
+
}
|
|
4829
4687
|
const startedJob = await this.workflowsCoreService.runWorkflow(
|
|
4830
4688
|
this._workflowId,
|
|
4831
4689
|
{ variables: options?.variables, limit: options?.limit }
|
|
@@ -4843,6 +4701,18 @@ var ExtractionBuilderService = class {
|
|
|
4843
4701
|
async submit(options) {
|
|
4844
4702
|
assert__default.default(this._options, "Options are not set");
|
|
4845
4703
|
assert__default.default(this._workflowId, "Workflow ID is not set");
|
|
4704
|
+
if (this._options.interval === "REAL_TIME") {
|
|
4705
|
+
throw new KadoaSdkException(
|
|
4706
|
+
"submit() is not supported for real-time workflows. Use waitForReady() and subscribe via client.realtime.onEvent(...).",
|
|
4707
|
+
{
|
|
4708
|
+
code: "BAD_REQUEST",
|
|
4709
|
+
details: {
|
|
4710
|
+
interval: "REAL_TIME",
|
|
4711
|
+
workflowId: this._workflowId
|
|
4712
|
+
}
|
|
4713
|
+
}
|
|
4714
|
+
);
|
|
4715
|
+
}
|
|
4846
4716
|
const submittedJob = await this.workflowsCoreService.runWorkflow(
|
|
4847
4717
|
this._workflowId,
|
|
4848
4718
|
{ variables: options?.variables, limit: options?.limit }
|
|
@@ -5298,7 +5168,7 @@ var WSS_API_URI = process.env.KADOA_WSS_API_URI ?? "wss://realtime.kadoa.com";
|
|
|
5298
5168
|
var REALTIME_API_URI = process.env.KADOA_REALTIME_API_URI ?? "https://realtime.kadoa.com";
|
|
5299
5169
|
|
|
5300
5170
|
// src/version.ts
|
|
5301
|
-
var SDK_VERSION = "0.
|
|
5171
|
+
var SDK_VERSION = "0.16.1";
|
|
5302
5172
|
var SDK_NAME = "kadoa-node-sdk";
|
|
5303
5173
|
var SDK_LANGUAGE = "node";
|
|
5304
5174
|
|
|
@@ -5565,6 +5435,28 @@ async function pollUntil(pollFn, isComplete, options = {}) {
|
|
|
5565
5435
|
);
|
|
5566
5436
|
}
|
|
5567
5437
|
|
|
5438
|
+
// src/runtime/utils/validation.ts
|
|
5439
|
+
function validateAdditionalData(additionalData) {
|
|
5440
|
+
if (additionalData === void 0) return;
|
|
5441
|
+
if (additionalData === null || typeof additionalData !== "object" || Array.isArray(additionalData)) {
|
|
5442
|
+
throw new KadoaSdkException("additionalData must be a plain object", {
|
|
5443
|
+
code: "VALIDATION_ERROR"
|
|
5444
|
+
});
|
|
5445
|
+
}
|
|
5446
|
+
try {
|
|
5447
|
+
const serialized = JSON.stringify(additionalData);
|
|
5448
|
+
if (serialized.length > 100 * 1024) {
|
|
5449
|
+
console.warn(
|
|
5450
|
+
"[Kadoa SDK] additionalData exceeds 100KB, consider reducing size"
|
|
5451
|
+
);
|
|
5452
|
+
}
|
|
5453
|
+
} catch {
|
|
5454
|
+
throw new KadoaSdkException("additionalData must be JSON-serializable", {
|
|
5455
|
+
code: "VALIDATION_ERROR"
|
|
5456
|
+
});
|
|
5457
|
+
}
|
|
5458
|
+
}
|
|
5459
|
+
|
|
5568
5460
|
// src/domains/validation/validation-core.service.ts
|
|
5569
5461
|
var ValidationCoreService = class {
|
|
5570
5462
|
constructor(client) {
|
|
@@ -5846,6 +5738,7 @@ var WorkflowsCoreService = class {
|
|
|
5846
5738
|
this.workflowsApi = workflowsApi;
|
|
5847
5739
|
}
|
|
5848
5740
|
async create(input) {
|
|
5741
|
+
validateAdditionalData(input.additionalData);
|
|
5849
5742
|
const request = {
|
|
5850
5743
|
urls: input.urls,
|
|
5851
5744
|
name: input.name,
|
|
@@ -5860,7 +5753,8 @@ var WorkflowsCoreService = class {
|
|
|
5860
5753
|
monitoring: input.monitoring,
|
|
5861
5754
|
location: input.location,
|
|
5862
5755
|
autoStart: input.autoStart,
|
|
5863
|
-
schedules: input.schedules
|
|
5756
|
+
schedules: input.schedules,
|
|
5757
|
+
additionalData: input.additionalData
|
|
5864
5758
|
};
|
|
5865
5759
|
const response = await this.workflowsApi.v4WorkflowsPost({
|
|
5866
5760
|
createWorkflowBody: request
|
|
@@ -5892,11 +5786,28 @@ var WorkflowsCoreService = class {
|
|
|
5892
5786
|
});
|
|
5893
5787
|
return response.data?.workflows?.[0];
|
|
5894
5788
|
}
|
|
5789
|
+
/**
|
|
5790
|
+
* @deprecated Use delete(id) instead.
|
|
5791
|
+
*/
|
|
5895
5792
|
async cancel(id) {
|
|
5793
|
+
console.warn(
|
|
5794
|
+
"[Kadoa SDK] workflow.cancel(id) will be deprecated. Use workflow.delete(id)."
|
|
5795
|
+
);
|
|
5796
|
+
await this.delete(id);
|
|
5797
|
+
}
|
|
5798
|
+
async delete(id) {
|
|
5896
5799
|
await this.workflowsApi.v4WorkflowsWorkflowIdDelete({
|
|
5897
5800
|
workflowId: id
|
|
5898
5801
|
});
|
|
5899
5802
|
}
|
|
5803
|
+
async update(id, input) {
|
|
5804
|
+
validateAdditionalData(input.additionalData);
|
|
5805
|
+
const response = await this.workflowsApi.v4WorkflowsWorkflowIdMetadataPut({
|
|
5806
|
+
workflowId: id,
|
|
5807
|
+
v4WorkflowsWorkflowIdMetadataPutRequest: input
|
|
5808
|
+
});
|
|
5809
|
+
return response.data;
|
|
5810
|
+
}
|
|
5900
5811
|
async resume(id) {
|
|
5901
5812
|
await this.workflowsApi.v4WorkflowsWorkflowIdResumePut({
|
|
5902
5813
|
workflowId: id
|
|
@@ -6032,7 +5943,7 @@ var KadoaClient = class {
|
|
|
6032
5943
|
headers
|
|
6033
5944
|
}
|
|
6034
5945
|
});
|
|
6035
|
-
this._axiosInstance =
|
|
5946
|
+
this._axiosInstance = globalAxios2__default.default.create({
|
|
6036
5947
|
timeout: this._timeout,
|
|
6037
5948
|
headers
|
|
6038
5949
|
});
|
|
@@ -6051,7 +5962,7 @@ var KadoaClient = class {
|
|
|
6051
5962
|
return response;
|
|
6052
5963
|
},
|
|
6053
5964
|
(error) => {
|
|
6054
|
-
if (error instanceof
|
|
5965
|
+
if (error instanceof globalAxios2.AxiosError) {
|
|
6055
5966
|
const status = error.response?.status;
|
|
6056
5967
|
if (status === 400) {
|
|
6057
5968
|
throw KadoaHttpException.wrap(error);
|
|
@@ -6274,5 +6185,6 @@ exports.ValidationCoreService = ValidationCoreService;
|
|
|
6274
6185
|
exports.ValidationRulesService = ValidationRulesService;
|
|
6275
6186
|
exports.WorkflowsCoreService = WorkflowsCoreService;
|
|
6276
6187
|
exports.pollUntil = pollUntil;
|
|
6188
|
+
exports.validateAdditionalData = validateAdditionalData;
|
|
6277
6189
|
//# sourceMappingURL=index.js.map
|
|
6278
6190
|
//# sourceMappingURL=index.js.map
|