@kadoa/node-sdk 0.14.1 → 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 +808 -870
- package/dist/index.d.ts +808 -870
- package/dist/index.js +762 -830
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +760 -829
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import globalAxios2, { isAxiosError, AxiosError } from 'axios';
|
|
2
|
+
import { URL, URLSearchParams } from 'url';
|
|
2
3
|
import createDebug from 'debug';
|
|
3
4
|
import { upperFirst, camelCase, merge } from 'es-toolkit';
|
|
4
|
-
import { URL, URLSearchParams } from 'url';
|
|
5
5
|
import assert from 'assert';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
import { v4 } from 'uuid';
|
|
@@ -12,489 +12,70 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
12
12
|
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
13
13
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
14
14
|
});
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Url: "URL",
|
|
24
|
-
Email: "EMAIL",
|
|
25
|
-
Image: "IMAGE",
|
|
26
|
-
Video: "VIDEO",
|
|
27
|
-
Phone: "PHONE",
|
|
28
|
-
Boolean: "BOOLEAN",
|
|
29
|
-
Location: "LOCATION",
|
|
30
|
-
Array: "ARRAY",
|
|
31
|
-
Object: "OBJECT"
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
// src/runtime/pagination/paginator.ts
|
|
35
|
-
var PagedIterator = class {
|
|
36
|
-
constructor(fetchPage) {
|
|
37
|
-
this.fetchPage = fetchPage;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Fetch all items across all pages
|
|
41
|
-
* @param options Base options (page will be overridden)
|
|
42
|
-
* @returns Array of all items
|
|
43
|
-
*/
|
|
44
|
-
async fetchAll(options = {}) {
|
|
45
|
-
const allItems = [];
|
|
46
|
-
let currentPage = 1;
|
|
47
|
-
let hasMore = true;
|
|
48
|
-
while (hasMore) {
|
|
49
|
-
const result = await this.fetchPage({ ...options, page: currentPage });
|
|
50
|
-
allItems.push(...result.data);
|
|
51
|
-
const pagination = result.pagination;
|
|
52
|
-
hasMore = pagination.page !== void 0 && pagination.totalPages !== void 0 && pagination.page < pagination.totalPages;
|
|
53
|
-
currentPage++;
|
|
54
|
-
}
|
|
55
|
-
return allItems;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Create an async iterator for pages
|
|
59
|
-
* @param options Base options (page will be overridden)
|
|
60
|
-
* @returns Async generator that yields pages
|
|
61
|
-
*/
|
|
62
|
-
async *pages(options = {}) {
|
|
63
|
-
let currentPage = 1;
|
|
64
|
-
let hasMore = true;
|
|
65
|
-
while (hasMore) {
|
|
66
|
-
const result = await this.fetchPage({ ...options, page: currentPage });
|
|
67
|
-
yield result;
|
|
68
|
-
const pagination = result.pagination;
|
|
69
|
-
hasMore = pagination.page !== void 0 && pagination.totalPages !== void 0 && pagination.page < pagination.totalPages;
|
|
70
|
-
currentPage++;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Create an async iterator for individual items
|
|
75
|
-
* @param options Base options (page will be overridden)
|
|
76
|
-
* @returns Async generator that yields items
|
|
77
|
-
*/
|
|
78
|
-
async *items(options = {}) {
|
|
79
|
-
for await (const page of this.pages(options)) {
|
|
80
|
-
for (const item of page.data) {
|
|
81
|
-
yield item;
|
|
82
|
-
}
|
|
15
|
+
var BASE_PATH = "https://api.kadoa.com".replace(/\/+$/, "");
|
|
16
|
+
var BaseAPI = class {
|
|
17
|
+
constructor(configuration, basePath = BASE_PATH, axios2 = globalAxios2) {
|
|
18
|
+
this.basePath = basePath;
|
|
19
|
+
this.axios = axios2;
|
|
20
|
+
if (configuration) {
|
|
21
|
+
this.configuration = configuration;
|
|
22
|
+
this.basePath = configuration.basePath ?? basePath;
|
|
83
23
|
}
|
|
84
24
|
}
|
|
85
25
|
};
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
this.
|
|
91
|
-
this.defaultLimit = 100;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Fetch a page of workflow data
|
|
95
|
-
*/
|
|
96
|
-
async fetchData(options) {
|
|
97
|
-
const response = await this.workflowsApi.v4WorkflowsWorkflowIdDataGet({
|
|
98
|
-
...options,
|
|
99
|
-
page: options.page ?? 1,
|
|
100
|
-
limit: options.limit ?? this.defaultLimit
|
|
101
|
-
});
|
|
102
|
-
const result = response.data;
|
|
103
|
-
return result;
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Fetch all pages of workflow data
|
|
107
|
-
*/
|
|
108
|
-
async fetchAllData(options) {
|
|
109
|
-
const iterator = new PagedIterator(
|
|
110
|
-
(pageOptions) => this.fetchData({ ...options, ...pageOptions })
|
|
111
|
-
);
|
|
112
|
-
return iterator.fetchAll({ limit: options.limit ?? this.defaultLimit });
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Create an async iterator for paginated data fetching
|
|
116
|
-
*/
|
|
117
|
-
async *fetchDataPages(options) {
|
|
118
|
-
const iterator = new PagedIterator(
|
|
119
|
-
(pageOptions) => this.fetchData({ ...options, ...pageOptions })
|
|
120
|
-
);
|
|
121
|
-
for await (const page of iterator.pages({
|
|
122
|
-
limit: options.limit ?? this.defaultLimit
|
|
123
|
-
})) {
|
|
124
|
-
yield page;
|
|
125
|
-
}
|
|
26
|
+
var RequiredError = class extends Error {
|
|
27
|
+
constructor(field, msg) {
|
|
28
|
+
super(msg);
|
|
29
|
+
this.field = field;
|
|
30
|
+
this.name = "RequiredError";
|
|
126
31
|
}
|
|
127
32
|
};
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
var
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
BAD_REQUEST: "BAD_REQUEST",
|
|
134
|
-
NOT_FOUND: "NOT_FOUND",
|
|
135
|
-
INTERNAL_ERROR: "INTERNAL_ERROR"
|
|
136
|
-
};
|
|
137
|
-
var _KadoaSdkException = class _KadoaSdkException extends Error {
|
|
138
|
-
constructor(message, options) {
|
|
139
|
-
super(message);
|
|
140
|
-
this.name = "KadoaSdkException";
|
|
141
|
-
this.code = options?.code ?? "UNKNOWN";
|
|
142
|
-
this.details = options?.details;
|
|
143
|
-
if (options && "cause" in options) this.cause = options.cause;
|
|
144
|
-
Error.captureStackTrace?.(this, _KadoaSdkException);
|
|
145
|
-
}
|
|
146
|
-
static from(error, details) {
|
|
147
|
-
if (error instanceof _KadoaSdkException) return error;
|
|
148
|
-
const message = error instanceof Error ? error.message : typeof error === "string" ? error : "Unexpected error";
|
|
149
|
-
return new _KadoaSdkException(message, {
|
|
150
|
-
code: "UNKNOWN",
|
|
151
|
-
details,
|
|
152
|
-
cause: error
|
|
153
|
-
});
|
|
33
|
+
var operationServerMap = {};
|
|
34
|
+
var DUMMY_BASE_URL = "https://example.com";
|
|
35
|
+
var assertParamExists = function(functionName, paramName, paramValue) {
|
|
36
|
+
if (paramValue === null || paramValue === void 0) {
|
|
37
|
+
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
154
38
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
details: this.details
|
|
161
|
-
};
|
|
39
|
+
};
|
|
40
|
+
var setApiKeyToObject = async function(object, keyParamName, configuration) {
|
|
41
|
+
if (configuration && configuration.apiKey) {
|
|
42
|
+
const localVarApiKeyValue = typeof configuration.apiKey === "function" ? await configuration.apiKey(keyParamName) : await configuration.apiKey;
|
|
43
|
+
object[keyParamName] = localVarApiKeyValue;
|
|
162
44
|
}
|
|
163
|
-
|
|
164
|
-
|
|
45
|
+
};
|
|
46
|
+
var setBearerAuthToObject = async function(object, configuration) {
|
|
47
|
+
if (configuration && configuration.accessToken) {
|
|
48
|
+
const accessToken = typeof configuration.accessToken === "function" ? await configuration.accessToken() : await configuration.accessToken;
|
|
49
|
+
object["Authorization"] = "Bearer " + accessToken;
|
|
165
50
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
51
|
+
};
|
|
52
|
+
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
53
|
+
if (parameter == null) return;
|
|
54
|
+
if (typeof parameter === "object") {
|
|
55
|
+
if (Array.isArray(parameter)) {
|
|
56
|
+
parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
57
|
+
} else {
|
|
58
|
+
Object.keys(parameter).forEach(
|
|
59
|
+
(currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
|
|
60
|
+
);
|
|
170
61
|
}
|
|
171
|
-
|
|
172
|
-
|
|
62
|
+
} else {
|
|
63
|
+
if (urlSearchParams.has(key)) {
|
|
64
|
+
urlSearchParams.append(key, parameter);
|
|
65
|
+
} else {
|
|
66
|
+
urlSearchParams.set(key, parameter);
|
|
173
67
|
}
|
|
174
|
-
return parts.join("\n");
|
|
175
|
-
}
|
|
176
|
-
static isInstance(error) {
|
|
177
|
-
return error instanceof _KadoaSdkException;
|
|
178
|
-
}
|
|
179
|
-
static wrap(error, extra) {
|
|
180
|
-
if (error instanceof _KadoaSdkException) return error;
|
|
181
|
-
const message = extra?.message || (error instanceof Error ? error.message : typeof error === "string" ? error : "Unexpected error");
|
|
182
|
-
return new _KadoaSdkException(message, {
|
|
183
|
-
code: "UNKNOWN",
|
|
184
|
-
details: extra?.details,
|
|
185
|
-
cause: error
|
|
186
|
-
});
|
|
187
68
|
}
|
|
69
|
+
}
|
|
70
|
+
var setSearchParams = function(url, ...objects) {
|
|
71
|
+
const searchParams = new URLSearchParams(url.search);
|
|
72
|
+
setFlattenedQueryParams(searchParams, objects);
|
|
73
|
+
url.search = searchParams.toString();
|
|
188
74
|
};
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
RATE_LIMITED: "Rate limit exceeded. Please try again later",
|
|
194
|
-
NETWORK_ERROR: "Network error occurred",
|
|
195
|
-
SERVER_ERROR: "Server error occurred",
|
|
196
|
-
PARSE_ERROR: "Failed to parse response",
|
|
197
|
-
BAD_REQUEST: "Bad request",
|
|
198
|
-
ABORTED: "Aborted",
|
|
199
|
-
NOT_FOUND: "Not found",
|
|
200
|
-
// Workflow specific errors
|
|
201
|
-
NO_WORKFLOW_ID: "Failed to start extraction process - no ID received",
|
|
202
|
-
WORKFLOW_CREATE_FAILED: "Failed to create workflow",
|
|
203
|
-
WORKFLOW_TIMEOUT: "Workflow processing timed out",
|
|
204
|
-
WORKFLOW_UNEXPECTED_STATUS: "Extraction completed with unexpected status",
|
|
205
|
-
PROGRESS_CHECK_FAILED: "Failed to check extraction progress",
|
|
206
|
-
DATA_FETCH_FAILED: "Failed to retrieve extracted data from workflow",
|
|
207
|
-
// Extraction specific errors
|
|
208
|
-
NO_URLS: "At least one URL is required for extraction",
|
|
209
|
-
NO_API_KEY: "API key is required for entity detection",
|
|
210
|
-
LINK_REQUIRED: "Link is required for entity field detection",
|
|
211
|
-
NO_PREDICTIONS: "No entity predictions returned from the API",
|
|
212
|
-
EXTRACTION_FAILED: "Data extraction failed for the provided URLs",
|
|
213
|
-
ENTITY_FETCH_FAILED: "Failed to fetch entity fields",
|
|
214
|
-
ENTITY_INVARIANT_VIOLATION: "No valid entity provided",
|
|
215
|
-
// Schema specific errors
|
|
216
|
-
SCHEMA_NOT_FOUND: "Schema not found",
|
|
217
|
-
SCHEMA_FETCH_ERROR: "Failed to fetch schema",
|
|
218
|
-
SCHEMAS_FETCH_ERROR: "Failed to fetch schemas",
|
|
219
|
-
SCHEMA_CREATE_FAILED: "Failed to create schema",
|
|
220
|
-
SCHEMA_UPDATE_FAILED: "Failed to update schema",
|
|
221
|
-
SCHEMA_DELETE_FAILED: "Failed to delete schema"
|
|
222
|
-
};
|
|
223
|
-
var KadoaSdkException = _KadoaSdkException;
|
|
224
|
-
var ERROR_MESSAGES = KadoaSdkException.ERROR_MESSAGES;
|
|
225
|
-
var KadoaHttpException = class _KadoaHttpException extends KadoaSdkException {
|
|
226
|
-
constructor(message, options) {
|
|
227
|
-
super(message, {
|
|
228
|
-
code: options?.code,
|
|
229
|
-
details: options?.details,
|
|
230
|
-
cause: options?.cause
|
|
231
|
-
});
|
|
232
|
-
this.name = "KadoaHttpException";
|
|
233
|
-
this.httpStatus = options?.httpStatus;
|
|
234
|
-
this.requestId = options?.requestId;
|
|
235
|
-
this.endpoint = options?.endpoint;
|
|
236
|
-
this.method = options?.method;
|
|
237
|
-
this.responseBody = options?.responseBody;
|
|
238
|
-
}
|
|
239
|
-
static fromAxiosError(error, extra) {
|
|
240
|
-
const status = error.response?.status;
|
|
241
|
-
const requestId = error.response?.headers?.["x-request-id"] || error.response?.headers?.["x-amzn-requestid"];
|
|
242
|
-
const method = error.config?.method?.toUpperCase();
|
|
243
|
-
const url = error.config?.url;
|
|
244
|
-
return new _KadoaHttpException(extra?.message || error.message, {
|
|
245
|
-
code: _KadoaHttpException.mapStatusToCode(error),
|
|
246
|
-
httpStatus: status,
|
|
247
|
-
requestId,
|
|
248
|
-
endpoint: url,
|
|
249
|
-
method,
|
|
250
|
-
responseBody: error.response?.data,
|
|
251
|
-
details: extra?.details,
|
|
252
|
-
cause: error
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
toJSON() {
|
|
256
|
-
return {
|
|
257
|
-
...super.toJSON(),
|
|
258
|
-
httpStatus: this.httpStatus,
|
|
259
|
-
requestId: this.requestId,
|
|
260
|
-
endpoint: this.endpoint,
|
|
261
|
-
method: this.method,
|
|
262
|
-
responseBody: this.responseBody
|
|
263
|
-
};
|
|
264
|
-
}
|
|
265
|
-
toDetailedString() {
|
|
266
|
-
const parts = [`${this.name}: ${this.message}`, `Code: ${this.code}`];
|
|
267
|
-
if (this.httpStatus) {
|
|
268
|
-
parts.push(`HTTP Status: ${this.httpStatus}`);
|
|
269
|
-
}
|
|
270
|
-
if (this.method && this.endpoint) {
|
|
271
|
-
parts.push(`Request: ${this.method} ${this.endpoint}`);
|
|
272
|
-
}
|
|
273
|
-
if (this.requestId) {
|
|
274
|
-
parts.push(`Request ID: ${this.requestId}`);
|
|
275
|
-
}
|
|
276
|
-
if (this.responseBody) {
|
|
277
|
-
parts.push(
|
|
278
|
-
`Response Body: ${JSON.stringify(this.responseBody, null, 2)}`
|
|
279
|
-
);
|
|
280
|
-
}
|
|
281
|
-
if (this.details && Object.keys(this.details).length > 0) {
|
|
282
|
-
parts.push(`Details: ${JSON.stringify(this.details, null, 2)}`);
|
|
283
|
-
}
|
|
284
|
-
if (this.cause) {
|
|
285
|
-
parts.push(`Cause: ${this.cause}`);
|
|
286
|
-
}
|
|
287
|
-
return parts.join("\n");
|
|
288
|
-
}
|
|
289
|
-
static wrap(error, extra) {
|
|
290
|
-
if (error instanceof _KadoaHttpException) return error;
|
|
291
|
-
if (error instanceof KadoaSdkException) return error;
|
|
292
|
-
if (isAxiosError(error)) {
|
|
293
|
-
return _KadoaHttpException.fromAxiosError(error, extra);
|
|
294
|
-
}
|
|
295
|
-
return KadoaSdkException.wrap(error, extra);
|
|
296
|
-
}
|
|
297
|
-
static mapStatusToCode(errorOrStatus) {
|
|
298
|
-
const status = typeof errorOrStatus === "number" ? errorOrStatus : errorOrStatus.response?.status;
|
|
299
|
-
if (!status) {
|
|
300
|
-
if (typeof errorOrStatus === "number") return "UNKNOWN";
|
|
301
|
-
return errorOrStatus.code === "ECONNABORTED" ? "TIMEOUT" : errorOrStatus.request ? "NETWORK_ERROR" : "UNKNOWN";
|
|
302
|
-
}
|
|
303
|
-
if (status === 401 || status === 403) return "AUTH_ERROR";
|
|
304
|
-
if (status === 404) return "NOT_FOUND";
|
|
305
|
-
if (status === 408) return "TIMEOUT";
|
|
306
|
-
if (status === 429) return "RATE_LIMITED";
|
|
307
|
-
if (status >= 400 && status < 500) return "VALIDATION_ERROR";
|
|
308
|
-
if (status >= 500) return "HTTP_ERROR";
|
|
309
|
-
return "UNKNOWN";
|
|
310
|
-
}
|
|
311
|
-
};
|
|
312
|
-
var createLogger = (namespace) => createDebug(`kadoa:${namespace}`);
|
|
313
|
-
var logger = {
|
|
314
|
-
client: createLogger("client"),
|
|
315
|
-
wss: createLogger("wss"),
|
|
316
|
-
extraction: createLogger("extraction"),
|
|
317
|
-
http: createLogger("http"),
|
|
318
|
-
workflow: createLogger("workflow"),
|
|
319
|
-
crawl: createLogger("crawl"),
|
|
320
|
-
notifications: createLogger("notifications"),
|
|
321
|
-
schemas: createLogger("schemas"),
|
|
322
|
-
validation: createLogger("validation")
|
|
323
|
-
};
|
|
324
|
-
var _SchemaBuilder = class _SchemaBuilder {
|
|
325
|
-
constructor() {
|
|
326
|
-
this.fields = [];
|
|
327
|
-
}
|
|
328
|
-
entity(entityName) {
|
|
329
|
-
this.entityName = entityName;
|
|
330
|
-
return this;
|
|
331
|
-
}
|
|
332
|
-
/**
|
|
333
|
-
* Add a structured field to the schema
|
|
334
|
-
* @param name - Field name (alphanumeric only)
|
|
335
|
-
* @param description - Field description
|
|
336
|
-
* @param dataType - Data type (STRING, NUMBER, BOOLEAN, etc.)
|
|
337
|
-
* @param options - Optional field configuration
|
|
338
|
-
*/
|
|
339
|
-
field(name, description, dataType, options) {
|
|
340
|
-
this.validateFieldName(name);
|
|
341
|
-
const requiresExample = _SchemaBuilder.TYPES_REQUIRING_EXAMPLE.includes(dataType);
|
|
342
|
-
if (requiresExample && !options?.example) {
|
|
343
|
-
throw new KadoaSdkException(
|
|
344
|
-
`Field "${name}" with type ${dataType} requires an example`,
|
|
345
|
-
{ code: "VALIDATION_ERROR", details: { name, dataType } }
|
|
346
|
-
);
|
|
347
|
-
}
|
|
348
|
-
this.fields.push({
|
|
349
|
-
name,
|
|
350
|
-
description,
|
|
351
|
-
dataType,
|
|
352
|
-
fieldType: "SCHEMA",
|
|
353
|
-
example: options?.example,
|
|
354
|
-
isKey: options?.isKey
|
|
355
|
-
});
|
|
356
|
-
return this;
|
|
357
|
-
}
|
|
358
|
-
/**
|
|
359
|
-
* Add a classification field to categorize content
|
|
360
|
-
* @param name - Field name (alphanumeric only)
|
|
361
|
-
* @param description - Field description
|
|
362
|
-
* @param categories - Array of category definitions
|
|
363
|
-
*/
|
|
364
|
-
classify(name, description, categories) {
|
|
365
|
-
this.validateFieldName(name);
|
|
366
|
-
this.fields.push({
|
|
367
|
-
name,
|
|
368
|
-
description,
|
|
369
|
-
fieldType: "CLASSIFICATION",
|
|
370
|
-
categories
|
|
371
|
-
});
|
|
372
|
-
return this;
|
|
373
|
-
}
|
|
374
|
-
/**
|
|
375
|
-
* Add raw page content to extract
|
|
376
|
-
* @param name - Raw content format(s): "html", "markdown", or "url"
|
|
377
|
-
*/
|
|
378
|
-
raw(name) {
|
|
379
|
-
const names = Array.isArray(name) ? name : [name];
|
|
380
|
-
for (const name2 of names) {
|
|
381
|
-
const fieldName = `raw${upperFirst(camelCase(name2))}`;
|
|
382
|
-
if (this.fields.some((field) => field.name === fieldName)) {
|
|
383
|
-
continue;
|
|
384
|
-
}
|
|
385
|
-
this.fields.push({
|
|
386
|
-
name: fieldName,
|
|
387
|
-
description: `Raw page content in ${name2.toUpperCase()} format`,
|
|
388
|
-
fieldType: "METADATA",
|
|
389
|
-
metadataKey: name2
|
|
390
|
-
});
|
|
391
|
-
}
|
|
392
|
-
return this;
|
|
393
|
-
}
|
|
394
|
-
build() {
|
|
395
|
-
if (!this.entityName) {
|
|
396
|
-
throw new KadoaSdkException("Entity name is required", {
|
|
397
|
-
code: "VALIDATION_ERROR",
|
|
398
|
-
details: { entityName: this.entityName }
|
|
399
|
-
});
|
|
400
|
-
}
|
|
401
|
-
return {
|
|
402
|
-
entityName: this.entityName,
|
|
403
|
-
fields: this.fields
|
|
404
|
-
};
|
|
405
|
-
}
|
|
406
|
-
validateFieldName(name) {
|
|
407
|
-
if (!_SchemaBuilder.FIELD_NAME_PATTERN.test(name)) {
|
|
408
|
-
throw new KadoaSdkException(
|
|
409
|
-
`Field name "${name}" must be alphanumeric only (no underscores or special characters)`,
|
|
410
|
-
{
|
|
411
|
-
code: "VALIDATION_ERROR",
|
|
412
|
-
details: { name, pattern: "^[A-Za-z0-9]+$" }
|
|
413
|
-
}
|
|
414
|
-
);
|
|
415
|
-
}
|
|
416
|
-
const lowerName = name.toLowerCase();
|
|
417
|
-
if (this.fields.some((f) => f.name.toLowerCase() === lowerName)) {
|
|
418
|
-
throw new KadoaSdkException(`Duplicate field name: "${name}"`, {
|
|
419
|
-
code: "VALIDATION_ERROR",
|
|
420
|
-
details: { name }
|
|
421
|
-
});
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
};
|
|
425
|
-
_SchemaBuilder.FIELD_NAME_PATTERN = /^[A-Za-z0-9]+$/;
|
|
426
|
-
_SchemaBuilder.TYPES_REQUIRING_EXAMPLE = [
|
|
427
|
-
"STRING",
|
|
428
|
-
"IMAGE",
|
|
429
|
-
"LINK",
|
|
430
|
-
"OBJECT",
|
|
431
|
-
"ARRAY"
|
|
432
|
-
];
|
|
433
|
-
var SchemaBuilder = _SchemaBuilder;
|
|
434
|
-
var BASE_PATH = "https://api.kadoa.com".replace(/\/+$/, "");
|
|
435
|
-
var BaseAPI = class {
|
|
436
|
-
constructor(configuration, basePath = BASE_PATH, axios2 = globalAxios5) {
|
|
437
|
-
this.basePath = basePath;
|
|
438
|
-
this.axios = axios2;
|
|
439
|
-
if (configuration) {
|
|
440
|
-
this.configuration = configuration;
|
|
441
|
-
this.basePath = configuration.basePath ?? basePath;
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
};
|
|
445
|
-
var RequiredError = class extends Error {
|
|
446
|
-
constructor(field, msg) {
|
|
447
|
-
super(msg);
|
|
448
|
-
this.field = field;
|
|
449
|
-
this.name = "RequiredError";
|
|
450
|
-
}
|
|
451
|
-
};
|
|
452
|
-
var operationServerMap = {};
|
|
453
|
-
var DUMMY_BASE_URL = "https://example.com";
|
|
454
|
-
var assertParamExists = function(functionName, paramName, paramValue) {
|
|
455
|
-
if (paramValue === null || paramValue === void 0) {
|
|
456
|
-
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
457
|
-
}
|
|
458
|
-
};
|
|
459
|
-
var setApiKeyToObject = async function(object, keyParamName, configuration) {
|
|
460
|
-
if (configuration && configuration.apiKey) {
|
|
461
|
-
const localVarApiKeyValue = typeof configuration.apiKey === "function" ? await configuration.apiKey(keyParamName) : await configuration.apiKey;
|
|
462
|
-
object[keyParamName] = localVarApiKeyValue;
|
|
463
|
-
}
|
|
464
|
-
};
|
|
465
|
-
var setBearerAuthToObject = async function(object, configuration) {
|
|
466
|
-
if (configuration && configuration.accessToken) {
|
|
467
|
-
const accessToken = typeof configuration.accessToken === "function" ? await configuration.accessToken() : await configuration.accessToken;
|
|
468
|
-
object["Authorization"] = "Bearer " + accessToken;
|
|
469
|
-
}
|
|
470
|
-
};
|
|
471
|
-
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
472
|
-
if (parameter == null) return;
|
|
473
|
-
if (typeof parameter === "object") {
|
|
474
|
-
if (Array.isArray(parameter)) {
|
|
475
|
-
parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
476
|
-
} else {
|
|
477
|
-
Object.keys(parameter).forEach(
|
|
478
|
-
(currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
|
|
479
|
-
);
|
|
480
|
-
}
|
|
481
|
-
} else {
|
|
482
|
-
if (urlSearchParams.has(key)) {
|
|
483
|
-
urlSearchParams.append(key, parameter);
|
|
484
|
-
} else {
|
|
485
|
-
urlSearchParams.set(key, parameter);
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
var setSearchParams = function(url, ...objects) {
|
|
490
|
-
const searchParams = new URLSearchParams(url.search);
|
|
491
|
-
setFlattenedQueryParams(searchParams, objects);
|
|
492
|
-
url.search = searchParams.toString();
|
|
493
|
-
};
|
|
494
|
-
var serializeDataIfNeeded = function(value, requestOptions, configuration) {
|
|
495
|
-
const nonString = typeof value !== "string";
|
|
496
|
-
const needsSerialization = nonString && configuration && configuration.isJsonMime ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) : nonString;
|
|
497
|
-
return needsSerialization ? JSON.stringify(value !== void 0 ? value : {}) : value || "";
|
|
75
|
+
var serializeDataIfNeeded = function(value, requestOptions, configuration) {
|
|
76
|
+
const nonString = typeof value !== "string";
|
|
77
|
+
const needsSerialization = nonString && configuration && configuration.isJsonMime ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) : nonString;
|
|
78
|
+
return needsSerialization ? JSON.stringify(value !== void 0 ? value : {}) : value || "";
|
|
498
79
|
};
|
|
499
80
|
var toPathString = function(url) {
|
|
500
81
|
return url.pathname + url.search + url.hash;
|
|
@@ -1210,7 +791,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1210
791
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesActionsBulkApprovePost(bulkApproveRules, options);
|
|
1211
792
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1212
793
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesActionsBulkApprovePost"]?.[localVarOperationServerIndex]?.url;
|
|
1213
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
794
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1214
795
|
},
|
|
1215
796
|
/**
|
|
1216
797
|
* Bulk delete rules for a workflow
|
|
@@ -1222,7 +803,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1222
803
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesActionsBulkDeletePost(bulkDeleteRules, options);
|
|
1223
804
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1224
805
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesActionsBulkDeletePost"]?.[localVarOperationServerIndex]?.url;
|
|
1225
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
806
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1226
807
|
},
|
|
1227
808
|
/**
|
|
1228
809
|
* Delete all validation rules with optional filtering
|
|
@@ -1234,7 +815,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1234
815
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesActionsDeleteAllDelete(deleteRuleWithReason, options);
|
|
1235
816
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1236
817
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesActionsDeleteAllDelete"]?.[localVarOperationServerIndex]?.url;
|
|
1237
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
818
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1238
819
|
},
|
|
1239
820
|
/**
|
|
1240
821
|
* Generate a validation rule
|
|
@@ -1246,7 +827,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1246
827
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesActionsGeneratePost(generateRule, options);
|
|
1247
828
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1248
829
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesActionsGeneratePost"]?.[localVarOperationServerIndex]?.url;
|
|
1249
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
830
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1250
831
|
},
|
|
1251
832
|
/**
|
|
1252
833
|
* Generate multiple validation rules
|
|
@@ -1258,7 +839,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1258
839
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesActionsGenerateRulesPost(generateRules, options);
|
|
1259
840
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1260
841
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesActionsGenerateRulesPost"]?.[localVarOperationServerIndex]?.url;
|
|
1261
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
842
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1262
843
|
},
|
|
1263
844
|
/**
|
|
1264
845
|
* List validation rules with optional filtering
|
|
@@ -1275,7 +856,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1275
856
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesGet(groupId, workflowId, status, page, pageSize, includeDeleted, options);
|
|
1276
857
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1277
858
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesGet"]?.[localVarOperationServerIndex]?.url;
|
|
1278
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
859
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1279
860
|
},
|
|
1280
861
|
/**
|
|
1281
862
|
* Create a new validation rule
|
|
@@ -1287,7 +868,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1287
868
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesPost(createRule, options);
|
|
1288
869
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1289
870
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesPost"]?.[localVarOperationServerIndex]?.url;
|
|
1290
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
871
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1291
872
|
},
|
|
1292
873
|
/**
|
|
1293
874
|
* Delete a validation rule with reason
|
|
@@ -1300,7 +881,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1300
881
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesRuleIdDelete(ruleId, deleteRuleWithReason, options);
|
|
1301
882
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1302
883
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesRuleIdDelete"]?.[localVarOperationServerIndex]?.url;
|
|
1303
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
884
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1304
885
|
},
|
|
1305
886
|
/**
|
|
1306
887
|
* Disable a validation rule with reason
|
|
@@ -1313,7 +894,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1313
894
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesRuleIdDisablePost(ruleId, disableRule, options);
|
|
1314
895
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1315
896
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesRuleIdDisablePost"]?.[localVarOperationServerIndex]?.url;
|
|
1316
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
897
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1317
898
|
},
|
|
1318
899
|
/**
|
|
1319
900
|
* Get a validation rule by ID
|
|
@@ -1326,7 +907,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1326
907
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesRuleIdGet(ruleId, includeDeleted, options);
|
|
1327
908
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1328
909
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesRuleIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
1329
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
910
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1330
911
|
},
|
|
1331
912
|
/**
|
|
1332
913
|
* Update a validation rule
|
|
@@ -1339,7 +920,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1339
920
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesRuleIdPut(ruleId, updateRule, options);
|
|
1340
921
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1341
922
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesRuleIdPut"]?.[localVarOperationServerIndex]?.url;
|
|
1342
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
923
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1343
924
|
},
|
|
1344
925
|
/**
|
|
1345
926
|
* Get all anomalies for a validation
|
|
@@ -1354,7 +935,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1354
935
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationValidationsValidationIdAnomaliesGet(validationId, page, pageSize, options);
|
|
1355
936
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1356
937
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationValidationsValidationIdAnomaliesGet"]?.[localVarOperationServerIndex]?.url;
|
|
1357
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
938
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1358
939
|
},
|
|
1359
940
|
/**
|
|
1360
941
|
* Get anomalies for a specific rule
|
|
@@ -1370,7 +951,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1370
951
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet(validationId, ruleName, page, pageSize, options);
|
|
1371
952
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1372
953
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet"]?.[localVarOperationServerIndex]?.url;
|
|
1373
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
954
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1374
955
|
},
|
|
1375
956
|
/**
|
|
1376
957
|
* Get validation details
|
|
@@ -1384,7 +965,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1384
965
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationValidationsValidationIdGet(validationId, includeDryRun, options);
|
|
1385
966
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1386
967
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationValidationsValidationIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
1387
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
968
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1388
969
|
},
|
|
1389
970
|
/**
|
|
1390
971
|
* Schedule a data validation job (alternative path)
|
|
@@ -1399,7 +980,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1399
980
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowIdJobsJobIdValidatePost(workflowId, jobId, dataValidationRequestBody, options);
|
|
1400
981
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1401
982
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowIdJobsJobIdValidatePost"]?.[localVarOperationServerIndex]?.url;
|
|
1402
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
983
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1403
984
|
},
|
|
1404
985
|
/**
|
|
1405
986
|
* Schedule a data validation job
|
|
@@ -1414,7 +995,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1414
995
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost(workflowId, jobId, dataValidationRequestBody, options);
|
|
1415
996
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1416
997
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost"]?.[localVarOperationServerIndex]?.url;
|
|
1417
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
998
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1418
999
|
},
|
|
1419
1000
|
/**
|
|
1420
1001
|
* List all validations for a job
|
|
@@ -1431,7 +1012,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1431
1012
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet(workflowId, jobId, page, pageSize, includeDryRun, options);
|
|
1432
1013
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1433
1014
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet"]?.[localVarOperationServerIndex]?.url;
|
|
1434
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1015
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1435
1016
|
},
|
|
1436
1017
|
/**
|
|
1437
1018
|
* Get latest validation for a job
|
|
@@ -1446,7 +1027,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1446
1027
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet(workflowId, jobId, includeDryRun, options);
|
|
1447
1028
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1448
1029
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet"]?.[localVarOperationServerIndex]?.url;
|
|
1449
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1030
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1450
1031
|
},
|
|
1451
1032
|
/**
|
|
1452
1033
|
* Retrieves the current data validation configuration for a specific workflow
|
|
@@ -1459,7 +1040,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1459
1040
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowsWorkflowIdValidationConfigGet(workflowId, options);
|
|
1460
1041
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1461
1042
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationConfigGet"]?.[localVarOperationServerIndex]?.url;
|
|
1462
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1043
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1463
1044
|
},
|
|
1464
1045
|
/**
|
|
1465
1046
|
* Updates the complete data validation configuration including alerting settings
|
|
@@ -1473,7 +1054,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1473
1054
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowsWorkflowIdValidationConfigPut(workflowId, v4DataValidationWorkflowsWorkflowIdValidationConfigPutRequest, options);
|
|
1474
1055
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1475
1056
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationConfigPut"]?.[localVarOperationServerIndex]?.url;
|
|
1476
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1057
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1477
1058
|
},
|
|
1478
1059
|
/**
|
|
1479
1060
|
* Enables or disables data validation for a specific workflow
|
|
@@ -1487,7 +1068,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1487
1068
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowsWorkflowIdValidationTogglePut(workflowId, v4DataValidationWorkflowsWorkflowIdValidationTogglePutRequest, options);
|
|
1488
1069
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1489
1070
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationTogglePut"]?.[localVarOperationServerIndex]?.url;
|
|
1490
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1071
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1491
1072
|
},
|
|
1492
1073
|
/**
|
|
1493
1074
|
* Get latest validation for the most recent job of a workflow
|
|
@@ -1501,7 +1082,7 @@ var DataValidationApiFp = function(configuration) {
|
|
|
1501
1082
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowsWorkflowIdValidationsLatestGet(workflowId, includeDryRun, options);
|
|
1502
1083
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1503
1084
|
const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationsLatestGet"]?.[localVarOperationServerIndex]?.url;
|
|
1504
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1085
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1505
1086
|
}
|
|
1506
1087
|
};
|
|
1507
1088
|
};
|
|
@@ -2154,7 +1735,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2154
1735
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsChannelsChannelIdDelete(channelId, options);
|
|
2155
1736
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2156
1737
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsChannelsChannelIdDelete"]?.[localVarOperationServerIndex]?.url;
|
|
2157
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1738
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2158
1739
|
},
|
|
2159
1740
|
/**
|
|
2160
1741
|
*
|
|
@@ -2167,7 +1748,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2167
1748
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsChannelsChannelIdGet(channelId, options);
|
|
2168
1749
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2169
1750
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsChannelsChannelIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
2170
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1751
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2171
1752
|
},
|
|
2172
1753
|
/**
|
|
2173
1754
|
*
|
|
@@ -2181,7 +1762,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2181
1762
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsChannelsChannelIdPut(channelId, v5NotificationsChannelsPostRequest, options);
|
|
2182
1763
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2183
1764
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsChannelsChannelIdPut"]?.[localVarOperationServerIndex]?.url;
|
|
2184
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1765
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2185
1766
|
},
|
|
2186
1767
|
/**
|
|
2187
1768
|
*
|
|
@@ -2194,7 +1775,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2194
1775
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsChannelsGet(workflowId, options);
|
|
2195
1776
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2196
1777
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsChannelsGet"]?.[localVarOperationServerIndex]?.url;
|
|
2197
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1778
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2198
1779
|
},
|
|
2199
1780
|
/**
|
|
2200
1781
|
*
|
|
@@ -2207,7 +1788,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2207
1788
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsChannelsPost(v5NotificationsChannelsPostRequest, options);
|
|
2208
1789
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2209
1790
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsChannelsPost"]?.[localVarOperationServerIndex]?.url;
|
|
2210
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1791
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2211
1792
|
},
|
|
2212
1793
|
/**
|
|
2213
1794
|
*
|
|
@@ -2220,7 +1801,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2220
1801
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsEventTypesEventTypeGet(eventType, options);
|
|
2221
1802
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2222
1803
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsEventTypesEventTypeGet"]?.[localVarOperationServerIndex]?.url;
|
|
2223
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1804
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2224
1805
|
},
|
|
2225
1806
|
/**
|
|
2226
1807
|
*
|
|
@@ -2232,7 +1813,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2232
1813
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsEventTypesGet(options);
|
|
2233
1814
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2234
1815
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsEventTypesGet"]?.[localVarOperationServerIndex]?.url;
|
|
2235
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1816
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2236
1817
|
},
|
|
2237
1818
|
/**
|
|
2238
1819
|
*
|
|
@@ -2250,7 +1831,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2250
1831
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsLogsGet(workflowId, eventType, startDate, endDate, limit, offset, options);
|
|
2251
1832
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2252
1833
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsLogsGet"]?.[localVarOperationServerIndex]?.url;
|
|
2253
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1834
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2254
1835
|
},
|
|
2255
1836
|
/**
|
|
2256
1837
|
*
|
|
@@ -2264,7 +1845,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2264
1845
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsSettingsGet(workflowId, eventType, options);
|
|
2265
1846
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2266
1847
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsSettingsGet"]?.[localVarOperationServerIndex]?.url;
|
|
2267
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1848
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2268
1849
|
},
|
|
2269
1850
|
/**
|
|
2270
1851
|
*
|
|
@@ -2277,7 +1858,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2277
1858
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsSettingsPost(v5NotificationsSettingsPostRequest, options);
|
|
2278
1859
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2279
1860
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsSettingsPost"]?.[localVarOperationServerIndex]?.url;
|
|
2280
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1861
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2281
1862
|
},
|
|
2282
1863
|
/**
|
|
2283
1864
|
*
|
|
@@ -2290,7 +1871,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2290
1871
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsSettingsSettingsIdDelete(settingsId, options);
|
|
2291
1872
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2292
1873
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsSettingsSettingsIdDelete"]?.[localVarOperationServerIndex]?.url;
|
|
2293
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1874
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2294
1875
|
},
|
|
2295
1876
|
/**
|
|
2296
1877
|
*
|
|
@@ -2303,7 +1884,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2303
1884
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsSettingsSettingsIdGet(settingsId, options);
|
|
2304
1885
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2305
1886
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsSettingsSettingsIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
2306
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1887
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2307
1888
|
},
|
|
2308
1889
|
/**
|
|
2309
1890
|
*
|
|
@@ -2317,7 +1898,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2317
1898
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsSettingsSettingsIdPut(settingsId, v5NotificationsSettingsSettingsIdPutRequest, options);
|
|
2318
1899
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2319
1900
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsSettingsSettingsIdPut"]?.[localVarOperationServerIndex]?.url;
|
|
2320
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1901
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2321
1902
|
},
|
|
2322
1903
|
/**
|
|
2323
1904
|
*
|
|
@@ -2330,7 +1911,7 @@ var NotificationsApiFp = function(configuration) {
|
|
|
2330
1911
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsTestPost(v5NotificationsTestPostRequest, options);
|
|
2331
1912
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2332
1913
|
const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsTestPost"]?.[localVarOperationServerIndex]?.url;
|
|
2333
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1914
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2334
1915
|
}
|
|
2335
1916
|
};
|
|
2336
1917
|
};
|
|
@@ -2640,7 +2221,7 @@ var SchemasApiFp = function(configuration) {
|
|
|
2640
2221
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4SchemasGet(options);
|
|
2641
2222
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2642
2223
|
const localVarOperationServerBasePath = operationServerMap["SchemasApi.v4SchemasGet"]?.[localVarOperationServerIndex]?.url;
|
|
2643
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
2224
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2644
2225
|
},
|
|
2645
2226
|
/**
|
|
2646
2227
|
* Create a new data schema with specified fields and entity type
|
|
@@ -2653,7 +2234,7 @@ var SchemasApiFp = function(configuration) {
|
|
|
2653
2234
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4SchemasPost(createSchemaBody, options);
|
|
2654
2235
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2655
2236
|
const localVarOperationServerBasePath = operationServerMap["SchemasApi.v4SchemasPost"]?.[localVarOperationServerIndex]?.url;
|
|
2656
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
2237
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2657
2238
|
},
|
|
2658
2239
|
/**
|
|
2659
2240
|
* Delete a schema and all its revisions
|
|
@@ -2666,7 +2247,7 @@ var SchemasApiFp = function(configuration) {
|
|
|
2666
2247
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4SchemasSchemaIdDelete(schemaId, options);
|
|
2667
2248
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2668
2249
|
const localVarOperationServerBasePath = operationServerMap["SchemasApi.v4SchemasSchemaIdDelete"]?.[localVarOperationServerIndex]?.url;
|
|
2669
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
2250
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2670
2251
|
},
|
|
2671
2252
|
/**
|
|
2672
2253
|
* Retrieve a specific schema by its unique identifier
|
|
@@ -2679,7 +2260,7 @@ var SchemasApiFp = function(configuration) {
|
|
|
2679
2260
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4SchemasSchemaIdGet(schemaId, options);
|
|
2680
2261
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2681
2262
|
const localVarOperationServerBasePath = operationServerMap["SchemasApi.v4SchemasSchemaIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
2682
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
2263
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2683
2264
|
},
|
|
2684
2265
|
/**
|
|
2685
2266
|
* Update schema metadata or create a new revision with updated fields
|
|
@@ -2693,7 +2274,7 @@ var SchemasApiFp = function(configuration) {
|
|
|
2693
2274
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4SchemasSchemaIdPut(schemaId, updateSchemaBody, options);
|
|
2694
2275
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2695
2276
|
const localVarOperationServerBasePath = operationServerMap["SchemasApi.v4SchemasSchemaIdPut"]?.[localVarOperationServerIndex]?.url;
|
|
2696
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
2277
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2697
2278
|
}
|
|
2698
2279
|
};
|
|
2699
2280
|
};
|
|
@@ -2851,12 +2432,13 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
|
2851
2432
|
* @param {V4WorkflowsGetMonitoringEnum} [monitoring] Filter workflows by monitoring status
|
|
2852
2433
|
* @param {V4WorkflowsGetUpdateIntervalEnum} [updateInterval] Filter workflows by update interval
|
|
2853
2434
|
* @param {string} [templateId] Filter workflows by template ID (DEPRECATED - templates replaced by schemas)
|
|
2435
|
+
* @param {string} [userId] Filter workflows by user ID (only works in team context)
|
|
2854
2436
|
* @param {V4WorkflowsGetIncludeDeletedEnum} [includeDeleted] Include deleted workflows (for compliance officers)
|
|
2855
2437
|
* @param {V4WorkflowsGetFormatEnum} [format] Response format (json or csv for export)
|
|
2856
2438
|
* @param {*} [options] Override http request option.
|
|
2857
2439
|
* @throws {RequiredError}
|
|
2858
2440
|
*/
|
|
2859
|
-
v4WorkflowsGet: async (search, skip, limit, state, tags, monitoring, updateInterval, templateId, includeDeleted, format, options = {}) => {
|
|
2441
|
+
v4WorkflowsGet: async (search, skip, limit, state, tags, monitoring, updateInterval, templateId, userId, includeDeleted, format, options = {}) => {
|
|
2860
2442
|
const localVarPath = `/v4/workflows`;
|
|
2861
2443
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2862
2444
|
let baseOptions;
|
|
@@ -2891,6 +2473,9 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
|
2891
2473
|
if (templateId !== void 0) {
|
|
2892
2474
|
localVarQueryParameter["templateId"] = templateId;
|
|
2893
2475
|
}
|
|
2476
|
+
if (userId !== void 0) {
|
|
2477
|
+
localVarQueryParameter["userId"] = userId;
|
|
2478
|
+
}
|
|
2894
2479
|
if (includeDeleted !== void 0) {
|
|
2895
2480
|
localVarQueryParameter["includeDeleted"] = includeDeleted;
|
|
2896
2481
|
}
|
|
@@ -3473,124 +3058,6 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
|
3473
3058
|
options: localVarRequestOptions
|
|
3474
3059
|
};
|
|
3475
3060
|
},
|
|
3476
|
-
/**
|
|
3477
|
-
* Permanently deletes a workflow and its associated tags
|
|
3478
|
-
* @summary Delete a workflow
|
|
3479
|
-
* @param {string} id The ID of the workflow to delete
|
|
3480
|
-
* @param {*} [options] Override http request option.
|
|
3481
|
-
* @throws {RequiredError}
|
|
3482
|
-
*/
|
|
3483
|
-
v5WorkflowsIdDelete: async (id, options = {}) => {
|
|
3484
|
-
assertParamExists("v5WorkflowsIdDelete", "id", id);
|
|
3485
|
-
const localVarPath = `/v5/workflows/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
3486
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3487
|
-
let baseOptions;
|
|
3488
|
-
if (configuration) {
|
|
3489
|
-
baseOptions = configuration.baseOptions;
|
|
3490
|
-
}
|
|
3491
|
-
const localVarRequestOptions = { method: "DELETE", ...baseOptions, ...options };
|
|
3492
|
-
const localVarHeaderParameter = {};
|
|
3493
|
-
const localVarQueryParameter = {};
|
|
3494
|
-
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
3495
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3496
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3497
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3498
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
3499
|
-
return {
|
|
3500
|
-
url: toPathString(localVarUrlObj),
|
|
3501
|
-
options: localVarRequestOptions
|
|
3502
|
-
};
|
|
3503
|
-
},
|
|
3504
|
-
/**
|
|
3505
|
-
* Retrieves a specific workflow and its associated tags by ID
|
|
3506
|
-
* @summary Get workflow by ID
|
|
3507
|
-
* @param {string} id The ID of the workflow to retrieve
|
|
3508
|
-
* @param {*} [options] Override http request option.
|
|
3509
|
-
* @throws {RequiredError}
|
|
3510
|
-
*/
|
|
3511
|
-
v5WorkflowsIdGet: async (id, options = {}) => {
|
|
3512
|
-
assertParamExists("v5WorkflowsIdGet", "id", id);
|
|
3513
|
-
const localVarPath = `/v5/workflows/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
3514
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3515
|
-
let baseOptions;
|
|
3516
|
-
if (configuration) {
|
|
3517
|
-
baseOptions = configuration.baseOptions;
|
|
3518
|
-
}
|
|
3519
|
-
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
3520
|
-
const localVarHeaderParameter = {};
|
|
3521
|
-
const localVarQueryParameter = {};
|
|
3522
|
-
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
3523
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3524
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3525
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3526
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
3527
|
-
return {
|
|
3528
|
-
url: toPathString(localVarUrlObj),
|
|
3529
|
-
options: localVarRequestOptions
|
|
3530
|
-
};
|
|
3531
|
-
},
|
|
3532
|
-
/**
|
|
3533
|
-
* Updates an existing workflow\'s properties
|
|
3534
|
-
* @summary Update a workflow
|
|
3535
|
-
* @param {string} id The ID of the workflow to update
|
|
3536
|
-
* @param {V5WorkflowsIdPutRequest} v5WorkflowsIdPutRequest
|
|
3537
|
-
* @param {*} [options] Override http request option.
|
|
3538
|
-
* @throws {RequiredError}
|
|
3539
|
-
*/
|
|
3540
|
-
v5WorkflowsIdPut: async (id, v5WorkflowsIdPutRequest, options = {}) => {
|
|
3541
|
-
assertParamExists("v5WorkflowsIdPut", "id", id);
|
|
3542
|
-
assertParamExists("v5WorkflowsIdPut", "v5WorkflowsIdPutRequest", v5WorkflowsIdPutRequest);
|
|
3543
|
-
const localVarPath = `/v5/workflows/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
3544
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3545
|
-
let baseOptions;
|
|
3546
|
-
if (configuration) {
|
|
3547
|
-
baseOptions = configuration.baseOptions;
|
|
3548
|
-
}
|
|
3549
|
-
const localVarRequestOptions = { method: "PUT", ...baseOptions, ...options };
|
|
3550
|
-
const localVarHeaderParameter = {};
|
|
3551
|
-
const localVarQueryParameter = {};
|
|
3552
|
-
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
3553
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3554
|
-
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
3555
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3556
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3557
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
3558
|
-
localVarRequestOptions.data = serializeDataIfNeeded(v5WorkflowsIdPutRequest, localVarRequestOptions, configuration);
|
|
3559
|
-
return {
|
|
3560
|
-
url: toPathString(localVarUrlObj),
|
|
3561
|
-
options: localVarRequestOptions
|
|
3562
|
-
};
|
|
3563
|
-
},
|
|
3564
|
-
/**
|
|
3565
|
-
* Creates a new workflow in pending state
|
|
3566
|
-
* @summary Create a new workflow
|
|
3567
|
-
* @param {V5WorkflowsPostRequest} v5WorkflowsPostRequest
|
|
3568
|
-
* @param {*} [options] Override http request option.
|
|
3569
|
-
* @throws {RequiredError}
|
|
3570
|
-
*/
|
|
3571
|
-
v5WorkflowsPost: async (v5WorkflowsPostRequest, options = {}) => {
|
|
3572
|
-
assertParamExists("v5WorkflowsPost", "v5WorkflowsPostRequest", v5WorkflowsPostRequest);
|
|
3573
|
-
const localVarPath = `/v5/workflows`;
|
|
3574
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3575
|
-
let baseOptions;
|
|
3576
|
-
if (configuration) {
|
|
3577
|
-
baseOptions = configuration.baseOptions;
|
|
3578
|
-
}
|
|
3579
|
-
const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
|
|
3580
|
-
const localVarHeaderParameter = {};
|
|
3581
|
-
const localVarQueryParameter = {};
|
|
3582
|
-
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
3583
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3584
|
-
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
3585
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3586
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3587
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
3588
|
-
localVarRequestOptions.data = serializeDataIfNeeded(v5WorkflowsPostRequest, localVarRequestOptions, configuration);
|
|
3589
|
-
return {
|
|
3590
|
-
url: toPathString(localVarUrlObj),
|
|
3591
|
-
options: localVarRequestOptions
|
|
3592
|
-
};
|
|
3593
|
-
},
|
|
3594
3061
|
/**
|
|
3595
3062
|
*
|
|
3596
3063
|
* @summary Get workflow audit log entries
|
|
@@ -3653,7 +3120,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3653
3120
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4ChangesChangeIdGet(changeId, xApiKey, authorization, options);
|
|
3654
3121
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3655
3122
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4ChangesChangeIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
3656
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3123
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3657
3124
|
},
|
|
3658
3125
|
/**
|
|
3659
3126
|
*
|
|
@@ -3672,7 +3139,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3672
3139
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4ChangesGet(xApiKey, authorization, workflowIds, startDate, endDate, skip, limit, options);
|
|
3673
3140
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3674
3141
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4ChangesGet"]?.[localVarOperationServerIndex]?.url;
|
|
3675
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3142
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3676
3143
|
},
|
|
3677
3144
|
/**
|
|
3678
3145
|
* Retrieves a list of workflows with pagination and search capabilities
|
|
@@ -3685,16 +3152,17 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3685
3152
|
* @param {V4WorkflowsGetMonitoringEnum} [monitoring] Filter workflows by monitoring status
|
|
3686
3153
|
* @param {V4WorkflowsGetUpdateIntervalEnum} [updateInterval] Filter workflows by update interval
|
|
3687
3154
|
* @param {string} [templateId] Filter workflows by template ID (DEPRECATED - templates replaced by schemas)
|
|
3155
|
+
* @param {string} [userId] Filter workflows by user ID (only works in team context)
|
|
3688
3156
|
* @param {V4WorkflowsGetIncludeDeletedEnum} [includeDeleted] Include deleted workflows (for compliance officers)
|
|
3689
3157
|
* @param {V4WorkflowsGetFormatEnum} [format] Response format (json or csv for export)
|
|
3690
3158
|
* @param {*} [options] Override http request option.
|
|
3691
3159
|
* @throws {RequiredError}
|
|
3692
3160
|
*/
|
|
3693
|
-
async v4WorkflowsGet(search, skip, limit, state, tags, monitoring, updateInterval, templateId, includeDeleted, format, options) {
|
|
3694
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsGet(search, skip, limit, state, tags, monitoring, updateInterval, templateId, includeDeleted, format, options);
|
|
3161
|
+
async v4WorkflowsGet(search, skip, limit, state, tags, monitoring, updateInterval, templateId, userId, includeDeleted, format, options) {
|
|
3162
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsGet(search, skip, limit, state, tags, monitoring, updateInterval, templateId, userId, includeDeleted, format, options);
|
|
3695
3163
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3696
3164
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsGet"]?.[localVarOperationServerIndex]?.url;
|
|
3697
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3165
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3698
3166
|
},
|
|
3699
3167
|
/**
|
|
3700
3168
|
* Create a new workflow with schema, custom fields, or agentic navigation mode
|
|
@@ -3707,7 +3175,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3707
3175
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsPost(createWorkflowBody, options);
|
|
3708
3176
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3709
3177
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsPost"]?.[localVarOperationServerIndex]?.url;
|
|
3710
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3178
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3711
3179
|
},
|
|
3712
3180
|
/**
|
|
3713
3181
|
*
|
|
@@ -3724,7 +3192,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3724
3192
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdAuditlogGet(workflowId, xApiKey, authorization, page, limit, options);
|
|
3725
3193
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3726
3194
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdAuditlogGet"]?.[localVarOperationServerIndex]?.url;
|
|
3727
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3195
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3728
3196
|
},
|
|
3729
3197
|
/**
|
|
3730
3198
|
*
|
|
@@ -3739,7 +3207,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3739
3207
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdComplianceApprovePut(workflowId, xApiKey, authorization, options);
|
|
3740
3208
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3741
3209
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdComplianceApprovePut"]?.[localVarOperationServerIndex]?.url;
|
|
3742
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3210
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3743
3211
|
},
|
|
3744
3212
|
/**
|
|
3745
3213
|
*
|
|
@@ -3755,7 +3223,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3755
3223
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdComplianceRejectPut(workflowId, v4WorkflowsWorkflowIdComplianceRejectPutRequest, xApiKey, authorization, options);
|
|
3756
3224
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3757
3225
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdComplianceRejectPut"]?.[localVarOperationServerIndex]?.url;
|
|
3758
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3226
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3759
3227
|
},
|
|
3760
3228
|
/**
|
|
3761
3229
|
*
|
|
@@ -3780,7 +3248,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3780
3248
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdDataGet(workflowId, xApiKey, authorization, runId, format, sortBy, order, filters, page, limit, gzip, rowIds, includeAnomalies, options);
|
|
3781
3249
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3782
3250
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdDataGet"]?.[localVarOperationServerIndex]?.url;
|
|
3783
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3251
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3784
3252
|
},
|
|
3785
3253
|
/**
|
|
3786
3254
|
*
|
|
@@ -3793,7 +3261,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3793
3261
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdDelete(workflowId, options);
|
|
3794
3262
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3795
3263
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdDelete"]?.[localVarOperationServerIndex]?.url;
|
|
3796
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3264
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3797
3265
|
},
|
|
3798
3266
|
/**
|
|
3799
3267
|
* Retrieves detailed information about a specific workflow. This endpoint requires authentication and proper team access permissions.
|
|
@@ -3806,7 +3274,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3806
3274
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdGet(workflowId, options);
|
|
3807
3275
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3808
3276
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
3809
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3277
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3810
3278
|
},
|
|
3811
3279
|
/**
|
|
3812
3280
|
*
|
|
@@ -3819,7 +3287,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3819
3287
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdHistoryGet(workflowId, options);
|
|
3820
3288
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3821
3289
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdHistoryGet"]?.[localVarOperationServerIndex]?.url;
|
|
3822
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3290
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3823
3291
|
},
|
|
3824
3292
|
/**
|
|
3825
3293
|
*
|
|
@@ -3833,7 +3301,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3833
3301
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdJobsJobIdGet(workflowId, jobId, options);
|
|
3834
3302
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3835
3303
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdJobsJobIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
3836
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3304
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3837
3305
|
},
|
|
3838
3306
|
/**
|
|
3839
3307
|
*
|
|
@@ -3847,7 +3315,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3847
3315
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdMetadataPut(workflowId, v4WorkflowsWorkflowIdMetadataPutRequest, options);
|
|
3848
3316
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3849
3317
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdMetadataPut"]?.[localVarOperationServerIndex]?.url;
|
|
3850
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3318
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3851
3319
|
},
|
|
3852
3320
|
/**
|
|
3853
3321
|
*
|
|
@@ -3860,7 +3328,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3860
3328
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdPausePut(workflowId, options);
|
|
3861
3329
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3862
3330
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdPausePut"]?.[localVarOperationServerIndex]?.url;
|
|
3863
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3331
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3864
3332
|
},
|
|
3865
3333
|
/**
|
|
3866
3334
|
* Resumes a paused, preview, or error workflow. If the user\'s team/organization or any of the user\'s organizations has the COMPLIANCE_REVIEW rule enabled, the workflow will be sent for compliance review instead of being directly activated.
|
|
@@ -3873,7 +3341,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3873
3341
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdResumePut(workflowId, options);
|
|
3874
3342
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3875
3343
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdResumePut"]?.[localVarOperationServerIndex]?.url;
|
|
3876
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3344
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3877
3345
|
},
|
|
3878
3346
|
/**
|
|
3879
3347
|
*
|
|
@@ -3887,7 +3355,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3887
3355
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdRunPut(workflowId, v4WorkflowsWorkflowIdRunPutRequest, options);
|
|
3888
3356
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3889
3357
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdRunPut"]?.[localVarOperationServerIndex]?.url;
|
|
3890
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3358
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3891
3359
|
},
|
|
3892
3360
|
/**
|
|
3893
3361
|
*
|
|
@@ -3901,7 +3369,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3901
3369
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdSchedulePut(workflowId, v4WorkflowsWorkflowIdSchedulePutRequest, options);
|
|
3902
3370
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3903
3371
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdSchedulePut"]?.[localVarOperationServerIndex]?.url;
|
|
3904
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3372
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3905
3373
|
},
|
|
3906
3374
|
/**
|
|
3907
3375
|
*
|
|
@@ -3916,7 +3384,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3916
3384
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5ChangesChangeIdGet(changeId, xApiKey, authorization, options);
|
|
3917
3385
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3918
3386
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5ChangesChangeIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
3919
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3387
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3920
3388
|
},
|
|
3921
3389
|
/**
|
|
3922
3390
|
*
|
|
@@ -3935,60 +3403,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
3935
3403
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5ChangesGet(xApiKey, authorization, workflowIds, startDate, endDate, skip, limit, options);
|
|
3936
3404
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3937
3405
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5ChangesGet"]?.[localVarOperationServerIndex]?.url;
|
|
3938
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3939
|
-
},
|
|
3940
|
-
/**
|
|
3941
|
-
* Permanently deletes a workflow and its associated tags
|
|
3942
|
-
* @summary Delete a workflow
|
|
3943
|
-
* @param {string} id The ID of the workflow to delete
|
|
3944
|
-
* @param {*} [options] Override http request option.
|
|
3945
|
-
* @throws {RequiredError}
|
|
3946
|
-
*/
|
|
3947
|
-
async v5WorkflowsIdDelete(id, options) {
|
|
3948
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsIdDelete(id, options);
|
|
3949
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3950
|
-
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsIdDelete"]?.[localVarOperationServerIndex]?.url;
|
|
3951
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3952
|
-
},
|
|
3953
|
-
/**
|
|
3954
|
-
* Retrieves a specific workflow and its associated tags by ID
|
|
3955
|
-
* @summary Get workflow by ID
|
|
3956
|
-
* @param {string} id The ID of the workflow to retrieve
|
|
3957
|
-
* @param {*} [options] Override http request option.
|
|
3958
|
-
* @throws {RequiredError}
|
|
3959
|
-
*/
|
|
3960
|
-
async v5WorkflowsIdGet(id, options) {
|
|
3961
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsIdGet(id, options);
|
|
3962
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3963
|
-
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
3964
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3965
|
-
},
|
|
3966
|
-
/**
|
|
3967
|
-
* Updates an existing workflow\'s properties
|
|
3968
|
-
* @summary Update a workflow
|
|
3969
|
-
* @param {string} id The ID of the workflow to update
|
|
3970
|
-
* @param {V5WorkflowsIdPutRequest} v5WorkflowsIdPutRequest
|
|
3971
|
-
* @param {*} [options] Override http request option.
|
|
3972
|
-
* @throws {RequiredError}
|
|
3973
|
-
*/
|
|
3974
|
-
async v5WorkflowsIdPut(id, v5WorkflowsIdPutRequest, options) {
|
|
3975
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsIdPut(id, v5WorkflowsIdPutRequest, options);
|
|
3976
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3977
|
-
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsIdPut"]?.[localVarOperationServerIndex]?.url;
|
|
3978
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3979
|
-
},
|
|
3980
|
-
/**
|
|
3981
|
-
* Creates a new workflow in pending state
|
|
3982
|
-
* @summary Create a new workflow
|
|
3983
|
-
* @param {V5WorkflowsPostRequest} v5WorkflowsPostRequest
|
|
3984
|
-
* @param {*} [options] Override http request option.
|
|
3985
|
-
* @throws {RequiredError}
|
|
3986
|
-
*/
|
|
3987
|
-
async v5WorkflowsPost(v5WorkflowsPostRequest, options) {
|
|
3988
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsPost(v5WorkflowsPostRequest, options);
|
|
3989
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3990
|
-
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsPost"]?.[localVarOperationServerIndex]?.url;
|
|
3991
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3406
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3992
3407
|
},
|
|
3993
3408
|
/**
|
|
3994
3409
|
*
|
|
@@ -4005,7 +3420,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
4005
3420
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsWorkflowIdAuditlogGet(workflowId, xApiKey, authorization, page, limit, options);
|
|
4006
3421
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
4007
3422
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsWorkflowIdAuditlogGet"]?.[localVarOperationServerIndex]?.url;
|
|
4008
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
3423
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
4009
3424
|
}
|
|
4010
3425
|
};
|
|
4011
3426
|
};
|
|
@@ -4038,7 +3453,7 @@ var WorkflowsApi = class extends BaseAPI {
|
|
|
4038
3453
|
* @throws {RequiredError}
|
|
4039
3454
|
*/
|
|
4040
3455
|
v4WorkflowsGet(requestParameters = {}, options) {
|
|
4041
|
-
return WorkflowsApiFp(this.configuration).v4WorkflowsGet(requestParameters.search, requestParameters.skip, requestParameters.limit, requestParameters.state, requestParameters.tags, requestParameters.monitoring, requestParameters.updateInterval, requestParameters.templateId, requestParameters.includeDeleted, requestParameters.format, options).then((request) => request(this.axios, this.basePath));
|
|
3456
|
+
return WorkflowsApiFp(this.configuration).v4WorkflowsGet(requestParameters.search, requestParameters.skip, requestParameters.limit, requestParameters.state, requestParameters.tags, requestParameters.monitoring, requestParameters.updateInterval, requestParameters.templateId, requestParameters.userId, requestParameters.includeDeleted, requestParameters.format, options).then((request) => request(this.axios, this.basePath));
|
|
4042
3457
|
}
|
|
4043
3458
|
/**
|
|
4044
3459
|
* Create a new workflow with schema, custom fields, or agentic navigation mode
|
|
@@ -4180,110 +3595,514 @@ var WorkflowsApi = class extends BaseAPI {
|
|
|
4180
3595
|
v4WorkflowsWorkflowIdSchedulePut(requestParameters, options) {
|
|
4181
3596
|
return WorkflowsApiFp(this.configuration).v4WorkflowsWorkflowIdSchedulePut(requestParameters.workflowId, requestParameters.v4WorkflowsWorkflowIdSchedulePutRequest, options).then((request) => request(this.axios, this.basePath));
|
|
4182
3597
|
}
|
|
4183
|
-
/**
|
|
4184
|
-
*
|
|
4185
|
-
* @summary Get data change by ID (PostgreSQL)
|
|
4186
|
-
* @param {WorkflowsApiV5ChangesChangeIdGetRequest} requestParameters Request parameters.
|
|
4187
|
-
* @param {*} [options] Override http request option.
|
|
4188
|
-
* @throws {RequiredError}
|
|
4189
|
-
*/
|
|
4190
|
-
v5ChangesChangeIdGet(requestParameters, options) {
|
|
4191
|
-
return WorkflowsApiFp(this.configuration).v5ChangesChangeIdGet(requestParameters.changeId, requestParameters.xApiKey, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
3598
|
+
/**
|
|
3599
|
+
*
|
|
3600
|
+
* @summary Get data change by ID (PostgreSQL)
|
|
3601
|
+
* @param {WorkflowsApiV5ChangesChangeIdGetRequest} requestParameters Request parameters.
|
|
3602
|
+
* @param {*} [options] Override http request option.
|
|
3603
|
+
* @throws {RequiredError}
|
|
3604
|
+
*/
|
|
3605
|
+
v5ChangesChangeIdGet(requestParameters, options) {
|
|
3606
|
+
return WorkflowsApiFp(this.configuration).v5ChangesChangeIdGet(requestParameters.changeId, requestParameters.xApiKey, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
3607
|
+
}
|
|
3608
|
+
/**
|
|
3609
|
+
*
|
|
3610
|
+
* @summary Get all data changes (PostgreSQL)
|
|
3611
|
+
* @param {WorkflowsApiV5ChangesGetRequest} requestParameters Request parameters.
|
|
3612
|
+
* @param {*} [options] Override http request option.
|
|
3613
|
+
* @throws {RequiredError}
|
|
3614
|
+
*/
|
|
3615
|
+
v5ChangesGet(requestParameters = {}, options) {
|
|
3616
|
+
return WorkflowsApiFp(this.configuration).v5ChangesGet(requestParameters.xApiKey, requestParameters.authorization, requestParameters.workflowIds, requestParameters.startDate, requestParameters.endDate, requestParameters.skip, requestParameters.limit, options).then((request) => request(this.axios, this.basePath));
|
|
3617
|
+
}
|
|
3618
|
+
/**
|
|
3619
|
+
*
|
|
3620
|
+
* @summary Get workflow audit log entries
|
|
3621
|
+
* @param {WorkflowsApiV5WorkflowsWorkflowIdAuditlogGetRequest} requestParameters Request parameters.
|
|
3622
|
+
* @param {*} [options] Override http request option.
|
|
3623
|
+
* @throws {RequiredError}
|
|
3624
|
+
*/
|
|
3625
|
+
v5WorkflowsWorkflowIdAuditlogGet(requestParameters, options) {
|
|
3626
|
+
return WorkflowsApiFp(this.configuration).v5WorkflowsWorkflowIdAuditlogGet(requestParameters.workflowId, requestParameters.xApiKey, requestParameters.authorization, requestParameters.page, requestParameters.limit, options).then((request) => request(this.axios, this.basePath));
|
|
3627
|
+
}
|
|
3628
|
+
};
|
|
3629
|
+
|
|
3630
|
+
// src/generated/configuration.ts
|
|
3631
|
+
var Configuration = class {
|
|
3632
|
+
constructor(param = {}) {
|
|
3633
|
+
this.apiKey = param.apiKey;
|
|
3634
|
+
this.username = param.username;
|
|
3635
|
+
this.password = param.password;
|
|
3636
|
+
this.accessToken = param.accessToken;
|
|
3637
|
+
this.basePath = param.basePath;
|
|
3638
|
+
this.serverIndex = param.serverIndex;
|
|
3639
|
+
this.baseOptions = {
|
|
3640
|
+
...param.baseOptions,
|
|
3641
|
+
headers: {
|
|
3642
|
+
...param.baseOptions?.headers
|
|
3643
|
+
}
|
|
3644
|
+
};
|
|
3645
|
+
this.formDataCtor = param.formDataCtor;
|
|
3646
|
+
}
|
|
3647
|
+
/**
|
|
3648
|
+
* Check if the given MIME is a JSON MIME.
|
|
3649
|
+
* JSON MIME examples:
|
|
3650
|
+
* application/json
|
|
3651
|
+
* application/json; charset=UTF8
|
|
3652
|
+
* APPLICATION/JSON
|
|
3653
|
+
* application/vnd.company+json
|
|
3654
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
3655
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
3656
|
+
*/
|
|
3657
|
+
isJsonMime(mime) {
|
|
3658
|
+
const jsonMime = new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$", "i");
|
|
3659
|
+
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === "application/json-patch+json");
|
|
3660
|
+
}
|
|
3661
|
+
};
|
|
3662
|
+
|
|
3663
|
+
// src/generated/models/data-field.ts
|
|
3664
|
+
var DataFieldDataTypeEnum = {
|
|
3665
|
+
String: "STRING",
|
|
3666
|
+
Number: "NUMBER",
|
|
3667
|
+
Boolean: "BOOLEAN",
|
|
3668
|
+
Date: "DATE",
|
|
3669
|
+
Datetime: "DATETIME",
|
|
3670
|
+
Money: "MONEY",
|
|
3671
|
+
Image: "IMAGE",
|
|
3672
|
+
Link: "LINK",
|
|
3673
|
+
Object: "OBJECT",
|
|
3674
|
+
Array: "ARRAY"
|
|
3675
|
+
};
|
|
3676
|
+
|
|
3677
|
+
// src/domains/extraction/extraction.acl.ts
|
|
3678
|
+
var FetchDataOptions = class {
|
|
3679
|
+
};
|
|
3680
|
+
var CanonicalSchemaFieldDataType = {
|
|
3681
|
+
String: DataFieldDataTypeEnum.String,
|
|
3682
|
+
Number: DataFieldDataTypeEnum.Number,
|
|
3683
|
+
Boolean: DataFieldDataTypeEnum.Boolean,
|
|
3684
|
+
Date: DataFieldDataTypeEnum.Date,
|
|
3685
|
+
Datetime: DataFieldDataTypeEnum.Datetime,
|
|
3686
|
+
Money: DataFieldDataTypeEnum.Money,
|
|
3687
|
+
Image: DataFieldDataTypeEnum.Image,
|
|
3688
|
+
Link: DataFieldDataTypeEnum.Link,
|
|
3689
|
+
Object: DataFieldDataTypeEnum.Object,
|
|
3690
|
+
Array: DataFieldDataTypeEnum.Array
|
|
3691
|
+
};
|
|
3692
|
+
var SchemaFieldDataType = {
|
|
3693
|
+
...CanonicalSchemaFieldDataType,
|
|
3694
|
+
/** @deprecated use `SchemaFieldDataType.String` */
|
|
3695
|
+
Text: DataFieldDataTypeEnum.String,
|
|
3696
|
+
/** @deprecated use `SchemaFieldDataType.Link` */
|
|
3697
|
+
Url: DataFieldDataTypeEnum.Link
|
|
3698
|
+
};
|
|
3699
|
+
|
|
3700
|
+
// src/runtime/pagination/paginator.ts
|
|
3701
|
+
var PagedIterator = class {
|
|
3702
|
+
constructor(fetchPage) {
|
|
3703
|
+
this.fetchPage = fetchPage;
|
|
3704
|
+
}
|
|
3705
|
+
/**
|
|
3706
|
+
* Fetch all items across all pages
|
|
3707
|
+
* @param options Base options (page will be overridden)
|
|
3708
|
+
* @returns Array of all items
|
|
3709
|
+
*/
|
|
3710
|
+
async fetchAll(options = {}) {
|
|
3711
|
+
const allItems = [];
|
|
3712
|
+
let currentPage = 1;
|
|
3713
|
+
let hasMore = true;
|
|
3714
|
+
while (hasMore) {
|
|
3715
|
+
const result = await this.fetchPage({ ...options, page: currentPage });
|
|
3716
|
+
allItems.push(...result.data);
|
|
3717
|
+
const pagination = result.pagination;
|
|
3718
|
+
hasMore = pagination.page !== void 0 && pagination.totalPages !== void 0 && pagination.page < pagination.totalPages;
|
|
3719
|
+
currentPage++;
|
|
3720
|
+
}
|
|
3721
|
+
return allItems;
|
|
3722
|
+
}
|
|
3723
|
+
/**
|
|
3724
|
+
* Create an async iterator for pages
|
|
3725
|
+
* @param options Base options (page will be overridden)
|
|
3726
|
+
* @returns Async generator that yields pages
|
|
3727
|
+
*/
|
|
3728
|
+
async *pages(options = {}) {
|
|
3729
|
+
let currentPage = 1;
|
|
3730
|
+
let hasMore = true;
|
|
3731
|
+
while (hasMore) {
|
|
3732
|
+
const result = await this.fetchPage({ ...options, page: currentPage });
|
|
3733
|
+
yield result;
|
|
3734
|
+
const pagination = result.pagination;
|
|
3735
|
+
hasMore = pagination.page !== void 0 && pagination.totalPages !== void 0 && pagination.page < pagination.totalPages;
|
|
3736
|
+
currentPage++;
|
|
3737
|
+
}
|
|
3738
|
+
}
|
|
3739
|
+
/**
|
|
3740
|
+
* Create an async iterator for individual items
|
|
3741
|
+
* @param options Base options (page will be overridden)
|
|
3742
|
+
* @returns Async generator that yields items
|
|
3743
|
+
*/
|
|
3744
|
+
async *items(options = {}) {
|
|
3745
|
+
for await (const page of this.pages(options)) {
|
|
3746
|
+
for (const item of page.data) {
|
|
3747
|
+
yield item;
|
|
3748
|
+
}
|
|
3749
|
+
}
|
|
3750
|
+
}
|
|
3751
|
+
};
|
|
3752
|
+
|
|
3753
|
+
// src/domains/extraction/services/data-fetcher.service.ts
|
|
3754
|
+
var DataFetcherService = class {
|
|
3755
|
+
constructor(workflowsApi) {
|
|
3756
|
+
this.workflowsApi = workflowsApi;
|
|
3757
|
+
this.defaultLimit = 100;
|
|
3758
|
+
}
|
|
3759
|
+
/**
|
|
3760
|
+
* Fetch a page of workflow data
|
|
3761
|
+
*/
|
|
3762
|
+
async fetchData(options) {
|
|
3763
|
+
const response = await this.workflowsApi.v4WorkflowsWorkflowIdDataGet({
|
|
3764
|
+
...options,
|
|
3765
|
+
page: options.page ?? 1,
|
|
3766
|
+
limit: options.limit ?? this.defaultLimit
|
|
3767
|
+
});
|
|
3768
|
+
const result = response.data;
|
|
3769
|
+
return result;
|
|
3770
|
+
}
|
|
3771
|
+
/**
|
|
3772
|
+
* Fetch all pages of workflow data
|
|
3773
|
+
*/
|
|
3774
|
+
async fetchAllData(options) {
|
|
3775
|
+
const iterator = new PagedIterator(
|
|
3776
|
+
(pageOptions) => this.fetchData({ ...options, ...pageOptions })
|
|
3777
|
+
);
|
|
3778
|
+
return iterator.fetchAll({ limit: options.limit ?? this.defaultLimit });
|
|
3779
|
+
}
|
|
3780
|
+
/**
|
|
3781
|
+
* Create an async iterator for paginated data fetching
|
|
3782
|
+
*/
|
|
3783
|
+
async *fetchDataPages(options) {
|
|
3784
|
+
const iterator = new PagedIterator(
|
|
3785
|
+
(pageOptions) => this.fetchData({ ...options, ...pageOptions })
|
|
3786
|
+
);
|
|
3787
|
+
for await (const page of iterator.pages({
|
|
3788
|
+
limit: options.limit ?? this.defaultLimit
|
|
3789
|
+
})) {
|
|
3790
|
+
yield page;
|
|
3791
|
+
}
|
|
3792
|
+
}
|
|
3793
|
+
};
|
|
3794
|
+
|
|
3795
|
+
// src/runtime/exceptions/base.exception.ts
|
|
3796
|
+
var KadoaErrorCode = {
|
|
3797
|
+
AUTH_ERROR: "AUTH_ERROR",
|
|
3798
|
+
VALIDATION_ERROR: "VALIDATION_ERROR",
|
|
3799
|
+
BAD_REQUEST: "BAD_REQUEST",
|
|
3800
|
+
NOT_FOUND: "NOT_FOUND",
|
|
3801
|
+
INTERNAL_ERROR: "INTERNAL_ERROR"
|
|
3802
|
+
};
|
|
3803
|
+
var _KadoaSdkException = class _KadoaSdkException extends Error {
|
|
3804
|
+
constructor(message, options) {
|
|
3805
|
+
super(message);
|
|
3806
|
+
this.name = "KadoaSdkException";
|
|
3807
|
+
this.code = options?.code ?? "UNKNOWN";
|
|
3808
|
+
this.details = options?.details;
|
|
3809
|
+
if (options && "cause" in options) this.cause = options.cause;
|
|
3810
|
+
Error.captureStackTrace?.(this, _KadoaSdkException);
|
|
3811
|
+
}
|
|
3812
|
+
static from(error, details) {
|
|
3813
|
+
if (error instanceof _KadoaSdkException) return error;
|
|
3814
|
+
const message = error instanceof Error ? error.message : typeof error === "string" ? error : "Unexpected error";
|
|
3815
|
+
return new _KadoaSdkException(message, {
|
|
3816
|
+
code: "UNKNOWN",
|
|
3817
|
+
details,
|
|
3818
|
+
cause: error
|
|
3819
|
+
});
|
|
3820
|
+
}
|
|
3821
|
+
toJSON() {
|
|
3822
|
+
return {
|
|
3823
|
+
name: this.name,
|
|
3824
|
+
message: this.message,
|
|
3825
|
+
code: this.code,
|
|
3826
|
+
details: this.details
|
|
3827
|
+
};
|
|
3828
|
+
}
|
|
3829
|
+
toString() {
|
|
3830
|
+
return [this.name, this.code, this.message].filter(Boolean).join(": ");
|
|
3831
|
+
}
|
|
3832
|
+
toDetailedString() {
|
|
3833
|
+
const parts = [`${this.name}: ${this.message}`, `Code: ${this.code}`];
|
|
3834
|
+
if (this.details && Object.keys(this.details).length > 0) {
|
|
3835
|
+
parts.push(`Details: ${JSON.stringify(this.details, null, 2)}`);
|
|
3836
|
+
}
|
|
3837
|
+
if (this.cause) {
|
|
3838
|
+
parts.push(`Cause: ${this.cause}`);
|
|
3839
|
+
}
|
|
3840
|
+
return parts.join("\n");
|
|
3841
|
+
}
|
|
3842
|
+
static isInstance(error) {
|
|
3843
|
+
return error instanceof _KadoaSdkException;
|
|
3844
|
+
}
|
|
3845
|
+
static wrap(error, extra) {
|
|
3846
|
+
if (error instanceof _KadoaSdkException) return error;
|
|
3847
|
+
const message = extra?.message || (error instanceof Error ? error.message : typeof error === "string" ? error : "Unexpected error");
|
|
3848
|
+
return new _KadoaSdkException(message, {
|
|
3849
|
+
code: "UNKNOWN",
|
|
3850
|
+
details: extra?.details,
|
|
3851
|
+
cause: error
|
|
3852
|
+
});
|
|
3853
|
+
}
|
|
3854
|
+
};
|
|
3855
|
+
_KadoaSdkException.ERROR_MESSAGES = {
|
|
3856
|
+
// General errors
|
|
3857
|
+
CONFIG_ERROR: "Invalid configuration provided",
|
|
3858
|
+
AUTH_FAILED: "Authentication failed. Please check your API key",
|
|
3859
|
+
RATE_LIMITED: "Rate limit exceeded. Please try again later",
|
|
3860
|
+
NETWORK_ERROR: "Network error occurred",
|
|
3861
|
+
SERVER_ERROR: "Server error occurred",
|
|
3862
|
+
PARSE_ERROR: "Failed to parse response",
|
|
3863
|
+
BAD_REQUEST: "Bad request",
|
|
3864
|
+
ABORTED: "Aborted",
|
|
3865
|
+
NOT_FOUND: "Not found",
|
|
3866
|
+
// Workflow specific errors
|
|
3867
|
+
NO_WORKFLOW_ID: "Failed to start extraction process - no ID received",
|
|
3868
|
+
WORKFLOW_CREATE_FAILED: "Failed to create workflow",
|
|
3869
|
+
WORKFLOW_TIMEOUT: "Workflow processing timed out",
|
|
3870
|
+
WORKFLOW_UNEXPECTED_STATUS: "Extraction completed with unexpected status",
|
|
3871
|
+
PROGRESS_CHECK_FAILED: "Failed to check extraction progress",
|
|
3872
|
+
DATA_FETCH_FAILED: "Failed to retrieve extracted data from workflow",
|
|
3873
|
+
// Extraction specific errors
|
|
3874
|
+
NO_URLS: "At least one URL is required for extraction",
|
|
3875
|
+
NO_API_KEY: "API key is required for entity detection",
|
|
3876
|
+
LINK_REQUIRED: "Link is required for entity field detection",
|
|
3877
|
+
NO_PREDICTIONS: "No entity predictions returned from the API",
|
|
3878
|
+
EXTRACTION_FAILED: "Data extraction failed for the provided URLs",
|
|
3879
|
+
ENTITY_FETCH_FAILED: "Failed to fetch entity fields",
|
|
3880
|
+
ENTITY_INVARIANT_VIOLATION: "No valid entity provided",
|
|
3881
|
+
// Schema specific errors
|
|
3882
|
+
SCHEMA_NOT_FOUND: "Schema not found",
|
|
3883
|
+
SCHEMA_FETCH_ERROR: "Failed to fetch schema",
|
|
3884
|
+
SCHEMAS_FETCH_ERROR: "Failed to fetch schemas",
|
|
3885
|
+
SCHEMA_CREATE_FAILED: "Failed to create schema",
|
|
3886
|
+
SCHEMA_UPDATE_FAILED: "Failed to update schema",
|
|
3887
|
+
SCHEMA_DELETE_FAILED: "Failed to delete schema"
|
|
3888
|
+
};
|
|
3889
|
+
var KadoaSdkException = _KadoaSdkException;
|
|
3890
|
+
var ERROR_MESSAGES = KadoaSdkException.ERROR_MESSAGES;
|
|
3891
|
+
var KadoaHttpException = class _KadoaHttpException extends KadoaSdkException {
|
|
3892
|
+
constructor(message, options) {
|
|
3893
|
+
super(message, {
|
|
3894
|
+
code: options?.code,
|
|
3895
|
+
details: options?.details,
|
|
3896
|
+
cause: options?.cause
|
|
3897
|
+
});
|
|
3898
|
+
this.name = "KadoaHttpException";
|
|
3899
|
+
this.httpStatus = options?.httpStatus;
|
|
3900
|
+
this.requestId = options?.requestId;
|
|
3901
|
+
this.endpoint = options?.endpoint;
|
|
3902
|
+
this.method = options?.method;
|
|
3903
|
+
this.responseBody = options?.responseBody;
|
|
3904
|
+
}
|
|
3905
|
+
static fromAxiosError(error, extra) {
|
|
3906
|
+
const status = error.response?.status;
|
|
3907
|
+
const requestId = error.response?.headers?.["x-request-id"] || error.response?.headers?.["x-amzn-requestid"];
|
|
3908
|
+
const method = error.config?.method?.toUpperCase();
|
|
3909
|
+
const url = error.config?.url;
|
|
3910
|
+
return new _KadoaHttpException(extra?.message || error.message, {
|
|
3911
|
+
code: _KadoaHttpException.mapStatusToCode(error),
|
|
3912
|
+
httpStatus: status,
|
|
3913
|
+
requestId,
|
|
3914
|
+
endpoint: url,
|
|
3915
|
+
method,
|
|
3916
|
+
responseBody: error.response?.data,
|
|
3917
|
+
details: extra?.details,
|
|
3918
|
+
cause: error
|
|
3919
|
+
});
|
|
3920
|
+
}
|
|
3921
|
+
toJSON() {
|
|
3922
|
+
return {
|
|
3923
|
+
...super.toJSON(),
|
|
3924
|
+
httpStatus: this.httpStatus,
|
|
3925
|
+
requestId: this.requestId,
|
|
3926
|
+
endpoint: this.endpoint,
|
|
3927
|
+
method: this.method,
|
|
3928
|
+
responseBody: this.responseBody
|
|
3929
|
+
};
|
|
3930
|
+
}
|
|
3931
|
+
toDetailedString() {
|
|
3932
|
+
const parts = [`${this.name}: ${this.message}`, `Code: ${this.code}`];
|
|
3933
|
+
if (this.httpStatus) {
|
|
3934
|
+
parts.push(`HTTP Status: ${this.httpStatus}`);
|
|
3935
|
+
}
|
|
3936
|
+
if (this.method && this.endpoint) {
|
|
3937
|
+
parts.push(`Request: ${this.method} ${this.endpoint}`);
|
|
3938
|
+
}
|
|
3939
|
+
if (this.requestId) {
|
|
3940
|
+
parts.push(`Request ID: ${this.requestId}`);
|
|
3941
|
+
}
|
|
3942
|
+
if (this.responseBody) {
|
|
3943
|
+
parts.push(
|
|
3944
|
+
`Response Body: ${JSON.stringify(this.responseBody, null, 2)}`
|
|
3945
|
+
);
|
|
3946
|
+
}
|
|
3947
|
+
if (this.details && Object.keys(this.details).length > 0) {
|
|
3948
|
+
parts.push(`Details: ${JSON.stringify(this.details, null, 2)}`);
|
|
3949
|
+
}
|
|
3950
|
+
if (this.cause) {
|
|
3951
|
+
parts.push(`Cause: ${this.cause}`);
|
|
3952
|
+
}
|
|
3953
|
+
return parts.join("\n");
|
|
3954
|
+
}
|
|
3955
|
+
static wrap(error, extra) {
|
|
3956
|
+
if (error instanceof _KadoaHttpException) return error;
|
|
3957
|
+
if (error instanceof KadoaSdkException) return error;
|
|
3958
|
+
if (isAxiosError(error)) {
|
|
3959
|
+
return _KadoaHttpException.fromAxiosError(error, extra);
|
|
3960
|
+
}
|
|
3961
|
+
return KadoaSdkException.wrap(error, extra);
|
|
3962
|
+
}
|
|
3963
|
+
static mapStatusToCode(errorOrStatus) {
|
|
3964
|
+
const status = typeof errorOrStatus === "number" ? errorOrStatus : errorOrStatus.response?.status;
|
|
3965
|
+
if (!status) {
|
|
3966
|
+
if (typeof errorOrStatus === "number") return "UNKNOWN";
|
|
3967
|
+
return errorOrStatus.code === "ECONNABORTED" ? "TIMEOUT" : errorOrStatus.request ? "NETWORK_ERROR" : "UNKNOWN";
|
|
3968
|
+
}
|
|
3969
|
+
if (status === 401 || status === 403) return "AUTH_ERROR";
|
|
3970
|
+
if (status === 404) return "NOT_FOUND";
|
|
3971
|
+
if (status === 408) return "TIMEOUT";
|
|
3972
|
+
if (status === 429) return "RATE_LIMITED";
|
|
3973
|
+
if (status >= 400 && status < 500) return "VALIDATION_ERROR";
|
|
3974
|
+
if (status >= 500) return "HTTP_ERROR";
|
|
3975
|
+
return "UNKNOWN";
|
|
4192
3976
|
}
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
3977
|
+
};
|
|
3978
|
+
var createLogger = (namespace) => createDebug(`kadoa:${namespace}`);
|
|
3979
|
+
var logger = {
|
|
3980
|
+
client: createLogger("client"),
|
|
3981
|
+
wss: createLogger("wss"),
|
|
3982
|
+
extraction: createLogger("extraction"),
|
|
3983
|
+
http: createLogger("http"),
|
|
3984
|
+
workflow: createLogger("workflow"),
|
|
3985
|
+
crawl: createLogger("crawl"),
|
|
3986
|
+
notifications: createLogger("notifications"),
|
|
3987
|
+
schemas: createLogger("schemas"),
|
|
3988
|
+
validation: createLogger("validation")
|
|
3989
|
+
};
|
|
3990
|
+
var _SchemaBuilder = class _SchemaBuilder {
|
|
3991
|
+
constructor() {
|
|
3992
|
+
this.fields = [];
|
|
4202
3993
|
}
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
* @summary Delete a workflow
|
|
4206
|
-
* @param {WorkflowsApiV5WorkflowsIdDeleteRequest} requestParameters Request parameters.
|
|
4207
|
-
* @param {*} [options] Override http request option.
|
|
4208
|
-
* @throws {RequiredError}
|
|
4209
|
-
*/
|
|
4210
|
-
v5WorkflowsIdDelete(requestParameters, options) {
|
|
4211
|
-
return WorkflowsApiFp(this.configuration).v5WorkflowsIdDelete(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
|
|
3994
|
+
hasSchemaFields() {
|
|
3995
|
+
return this.fields.some((field) => field.fieldType === "SCHEMA");
|
|
4212
3996
|
}
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
* @param {WorkflowsApiV5WorkflowsIdGetRequest} requestParameters Request parameters.
|
|
4217
|
-
* @param {*} [options] Override http request option.
|
|
4218
|
-
* @throws {RequiredError}
|
|
4219
|
-
*/
|
|
4220
|
-
v5WorkflowsIdGet(requestParameters, options) {
|
|
4221
|
-
return WorkflowsApiFp(this.configuration).v5WorkflowsIdGet(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
|
|
3997
|
+
entity(entityName) {
|
|
3998
|
+
this.entityName = entityName;
|
|
3999
|
+
return this;
|
|
4222
4000
|
}
|
|
4223
4001
|
/**
|
|
4224
|
-
*
|
|
4225
|
-
* @
|
|
4226
|
-
* @param
|
|
4227
|
-
* @param
|
|
4228
|
-
* @
|
|
4002
|
+
* Add a structured field to the schema
|
|
4003
|
+
* @param name - Field name (alphanumeric only)
|
|
4004
|
+
* @param description - Field description
|
|
4005
|
+
* @param dataType - Data type (STRING, NUMBER, BOOLEAN, etc.)
|
|
4006
|
+
* @param options - Optional field configuration
|
|
4229
4007
|
*/
|
|
4230
|
-
|
|
4231
|
-
|
|
4008
|
+
field(name, description, dataType, options) {
|
|
4009
|
+
this.validateFieldName(name);
|
|
4010
|
+
const requiresExample = _SchemaBuilder.TYPES_REQUIRING_EXAMPLE.includes(dataType);
|
|
4011
|
+
if (requiresExample && !options?.example) {
|
|
4012
|
+
throw new KadoaSdkException(
|
|
4013
|
+
`Field "${name}" with type ${dataType} requires an example`,
|
|
4014
|
+
{ code: "VALIDATION_ERROR", details: { name, dataType } }
|
|
4015
|
+
);
|
|
4016
|
+
}
|
|
4017
|
+
this.fields.push({
|
|
4018
|
+
name,
|
|
4019
|
+
description,
|
|
4020
|
+
dataType,
|
|
4021
|
+
fieldType: "SCHEMA",
|
|
4022
|
+
example: options?.example,
|
|
4023
|
+
isKey: options?.isKey
|
|
4024
|
+
});
|
|
4025
|
+
return this;
|
|
4232
4026
|
}
|
|
4233
4027
|
/**
|
|
4234
|
-
*
|
|
4235
|
-
* @
|
|
4236
|
-
* @param
|
|
4237
|
-
* @param
|
|
4238
|
-
* @throws {RequiredError}
|
|
4028
|
+
* Add a classification field to categorize content
|
|
4029
|
+
* @param name - Field name (alphanumeric only)
|
|
4030
|
+
* @param description - Field description
|
|
4031
|
+
* @param categories - Array of category definitions
|
|
4239
4032
|
*/
|
|
4240
|
-
|
|
4241
|
-
|
|
4033
|
+
classify(name, description, categories) {
|
|
4034
|
+
this.validateFieldName(name);
|
|
4035
|
+
this.fields.push({
|
|
4036
|
+
name,
|
|
4037
|
+
description,
|
|
4038
|
+
fieldType: "CLASSIFICATION",
|
|
4039
|
+
categories
|
|
4040
|
+
});
|
|
4041
|
+
return this;
|
|
4242
4042
|
}
|
|
4243
4043
|
/**
|
|
4244
|
-
*
|
|
4245
|
-
* @
|
|
4246
|
-
* @param {WorkflowsApiV5WorkflowsWorkflowIdAuditlogGetRequest} requestParameters Request parameters.
|
|
4247
|
-
* @param {*} [options] Override http request option.
|
|
4248
|
-
* @throws {RequiredError}
|
|
4044
|
+
* Add raw page content to extract
|
|
4045
|
+
* @param name - Raw content format(s): "html", "markdown", or "url"
|
|
4249
4046
|
*/
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
}
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
var Configuration = class {
|
|
4257
|
-
constructor(param = {}) {
|
|
4258
|
-
this.apiKey = param.apiKey;
|
|
4259
|
-
this.username = param.username;
|
|
4260
|
-
this.password = param.password;
|
|
4261
|
-
this.accessToken = param.accessToken;
|
|
4262
|
-
this.basePath = param.basePath;
|
|
4263
|
-
this.serverIndex = param.serverIndex;
|
|
4264
|
-
this.baseOptions = {
|
|
4265
|
-
...param.baseOptions,
|
|
4266
|
-
headers: {
|
|
4267
|
-
...param.baseOptions?.headers
|
|
4047
|
+
raw(name) {
|
|
4048
|
+
const names = Array.isArray(name) ? name : [name];
|
|
4049
|
+
for (const name2 of names) {
|
|
4050
|
+
const fieldName = `raw${upperFirst(camelCase(name2))}`;
|
|
4051
|
+
if (this.fields.some((field) => field.name === fieldName)) {
|
|
4052
|
+
continue;
|
|
4268
4053
|
}
|
|
4054
|
+
this.fields.push({
|
|
4055
|
+
name: fieldName,
|
|
4056
|
+
description: `Raw page content in ${name2.toUpperCase()} format`,
|
|
4057
|
+
fieldType: "METADATA",
|
|
4058
|
+
metadataKey: name2
|
|
4059
|
+
});
|
|
4060
|
+
}
|
|
4061
|
+
return this;
|
|
4062
|
+
}
|
|
4063
|
+
build() {
|
|
4064
|
+
if (this.hasSchemaFields() && !this.entityName) {
|
|
4065
|
+
throw new KadoaSdkException(
|
|
4066
|
+
"Entity name is required when schema fields are present",
|
|
4067
|
+
{
|
|
4068
|
+
code: "VALIDATION_ERROR",
|
|
4069
|
+
details: { entityName: this.entityName }
|
|
4070
|
+
}
|
|
4071
|
+
);
|
|
4072
|
+
}
|
|
4073
|
+
return {
|
|
4074
|
+
entityName: this.entityName,
|
|
4075
|
+
fields: this.fields
|
|
4269
4076
|
};
|
|
4270
|
-
this.formDataCtor = param.formDataCtor;
|
|
4271
4077
|
}
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4078
|
+
validateFieldName(name) {
|
|
4079
|
+
if (!_SchemaBuilder.FIELD_NAME_PATTERN.test(name)) {
|
|
4080
|
+
throw new KadoaSdkException(
|
|
4081
|
+
`Field name "${name}" must be alphanumeric only (no underscores or special characters)`,
|
|
4082
|
+
{
|
|
4083
|
+
code: "VALIDATION_ERROR",
|
|
4084
|
+
details: { name, pattern: "^[A-Za-z0-9]+$" }
|
|
4085
|
+
}
|
|
4086
|
+
);
|
|
4087
|
+
}
|
|
4088
|
+
const lowerName = name.toLowerCase();
|
|
4089
|
+
if (this.fields.some((f) => f.name.toLowerCase() === lowerName)) {
|
|
4090
|
+
throw new KadoaSdkException(`Duplicate field name: "${name}"`, {
|
|
4091
|
+
code: "VALIDATION_ERROR",
|
|
4092
|
+
details: { name }
|
|
4093
|
+
});
|
|
4094
|
+
}
|
|
4285
4095
|
}
|
|
4286
4096
|
};
|
|
4097
|
+
_SchemaBuilder.FIELD_NAME_PATTERN = /^[A-Za-z0-9]+$/;
|
|
4098
|
+
_SchemaBuilder.TYPES_REQUIRING_EXAMPLE = [
|
|
4099
|
+
"STRING",
|
|
4100
|
+
"IMAGE",
|
|
4101
|
+
"LINK",
|
|
4102
|
+
"OBJECT",
|
|
4103
|
+
"ARRAY"
|
|
4104
|
+
];
|
|
4105
|
+
var SchemaBuilder = _SchemaBuilder;
|
|
4287
4106
|
|
|
4288
4107
|
// src/domains/schemas/schemas.service.ts
|
|
4289
4108
|
var debug = logger.schemas;
|
|
@@ -4299,15 +4118,28 @@ var SchemasService = class {
|
|
|
4299
4118
|
return new class extends SchemaBuilder {
|
|
4300
4119
|
constructor() {
|
|
4301
4120
|
super();
|
|
4302
|
-
|
|
4121
|
+
if (entityName) {
|
|
4122
|
+
this.entity(entityName);
|
|
4123
|
+
}
|
|
4303
4124
|
}
|
|
4304
4125
|
async create(name) {
|
|
4305
4126
|
const built = this.build();
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4127
|
+
const schemaName = name ?? built.entityName;
|
|
4128
|
+
if (!schemaName) {
|
|
4129
|
+
throw new KadoaSdkException(
|
|
4130
|
+
"Schema name is required when entity name is not provided",
|
|
4131
|
+
{
|
|
4132
|
+
code: "VALIDATION_ERROR",
|
|
4133
|
+
details: { name }
|
|
4134
|
+
}
|
|
4135
|
+
);
|
|
4136
|
+
}
|
|
4137
|
+
const createSchemaBody = {
|
|
4138
|
+
name: schemaName,
|
|
4139
|
+
fields: built.fields,
|
|
4140
|
+
...built.entityName ? { entity: built.entityName } : {}
|
|
4141
|
+
};
|
|
4142
|
+
return service.createSchema(createSchemaBody);
|
|
4311
4143
|
}
|
|
4312
4144
|
}();
|
|
4313
4145
|
}
|
|
@@ -4401,10 +4233,12 @@ var EntityResolverService = class {
|
|
|
4401
4233
|
const entityPrediction = await this.fetchEntityFields({
|
|
4402
4234
|
link: options.link,
|
|
4403
4235
|
location: options.location,
|
|
4404
|
-
navigationMode: options.navigationMode
|
|
4236
|
+
navigationMode: options.navigationMode,
|
|
4237
|
+
selectorMode: options.selectorMode ?? false
|
|
4405
4238
|
});
|
|
4239
|
+
const entity = entityPrediction.entity;
|
|
4406
4240
|
return {
|
|
4407
|
-
entity
|
|
4241
|
+
entity,
|
|
4408
4242
|
fields: entityPrediction.fields
|
|
4409
4243
|
};
|
|
4410
4244
|
} else if (entityConfig) {
|
|
@@ -4413,10 +4247,10 @@ var EntityResolverService = class {
|
|
|
4413
4247
|
entityConfig.schemaId
|
|
4414
4248
|
);
|
|
4415
4249
|
return {
|
|
4416
|
-
entity: schema.entity ??
|
|
4250
|
+
entity: schema.entity ?? void 0,
|
|
4417
4251
|
fields: schema.schema
|
|
4418
4252
|
};
|
|
4419
|
-
} else if ("
|
|
4253
|
+
} else if ("fields" in entityConfig) {
|
|
4420
4254
|
return {
|
|
4421
4255
|
entity: entityConfig.name,
|
|
4422
4256
|
fields: entityConfig.fields
|
|
@@ -4562,6 +4396,18 @@ var ExtractionService = class {
|
|
|
4562
4396
|
DEFAULT_OPTIONS,
|
|
4563
4397
|
options
|
|
4564
4398
|
);
|
|
4399
|
+
const isRealTime = config.interval === "REAL_TIME";
|
|
4400
|
+
if (isRealTime) {
|
|
4401
|
+
throw new KadoaSdkException(
|
|
4402
|
+
"extraction.run()/submit() are not supported for real-time workflows. Use the builder API, call waitForReady(), and subscribe via client.realtime.onEvent(...).",
|
|
4403
|
+
{
|
|
4404
|
+
code: "BAD_REQUEST",
|
|
4405
|
+
details: {
|
|
4406
|
+
interval: "REAL_TIME"
|
|
4407
|
+
}
|
|
4408
|
+
}
|
|
4409
|
+
);
|
|
4410
|
+
}
|
|
4565
4411
|
let workflowId;
|
|
4566
4412
|
const resolvedEntity = await this.entityResolverService.resolveEntity(
|
|
4567
4413
|
options.entity || "ai-detection",
|
|
@@ -4572,11 +4418,12 @@ var ExtractionService = class {
|
|
|
4572
4418
|
}
|
|
4573
4419
|
);
|
|
4574
4420
|
const hasNotifications = !!config.notifications;
|
|
4575
|
-
const
|
|
4421
|
+
const workflowRequest = {
|
|
4576
4422
|
...config,
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
}
|
|
4423
|
+
fields: resolvedEntity.fields,
|
|
4424
|
+
...resolvedEntity.entity !== void 0 ? { entity: resolvedEntity.entity } : {}
|
|
4425
|
+
};
|
|
4426
|
+
const result = await this.workflowsCoreService.create(workflowRequest);
|
|
4580
4427
|
workflowId = result.id;
|
|
4581
4428
|
if (hasNotifications) {
|
|
4582
4429
|
const result2 = await this.notificationSetupService.setup({
|
|
@@ -4709,7 +4556,9 @@ var ExtractionBuilderService = class {
|
|
|
4709
4556
|
name,
|
|
4710
4557
|
description,
|
|
4711
4558
|
navigationMode,
|
|
4712
|
-
extraction
|
|
4559
|
+
extraction,
|
|
4560
|
+
additionalData,
|
|
4561
|
+
bypassPreview
|
|
4713
4562
|
}) {
|
|
4714
4563
|
let entity = "ai-detection";
|
|
4715
4564
|
if (extraction) {
|
|
@@ -4718,7 +4567,7 @@ var ExtractionBuilderService = class {
|
|
|
4718
4567
|
entity = { schemaId: result.schemaId };
|
|
4719
4568
|
} else {
|
|
4720
4569
|
const builtSchema = result.build();
|
|
4721
|
-
entity = { name: builtSchema.entityName, fields: builtSchema.fields };
|
|
4570
|
+
entity = builtSchema.entityName ? { name: builtSchema.entityName, fields: builtSchema.fields } : { fields: builtSchema.fields };
|
|
4722
4571
|
}
|
|
4723
4572
|
}
|
|
4724
4573
|
this._options = {
|
|
@@ -4727,7 +4576,8 @@ var ExtractionBuilderService = class {
|
|
|
4727
4576
|
description,
|
|
4728
4577
|
navigationMode: navigationMode || "single-page",
|
|
4729
4578
|
entity,
|
|
4730
|
-
bypassPreview: false
|
|
4579
|
+
bypassPreview: bypassPreview ?? false,
|
|
4580
|
+
additionalData
|
|
4731
4581
|
};
|
|
4732
4582
|
return this;
|
|
4733
4583
|
}
|
|
@@ -4762,17 +4612,17 @@ var ExtractionBuilderService = class {
|
|
|
4762
4612
|
async create() {
|
|
4763
4613
|
assert(this._options, "Options are not set");
|
|
4764
4614
|
const { urls, name, description, navigationMode, entity } = this.options;
|
|
4765
|
-
const
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
}
|
|
4775
|
-
|
|
4615
|
+
const isRealTime = this._options.interval === "REAL_TIME";
|
|
4616
|
+
const useSelectorMode = isRealTime && entity === "ai-detection";
|
|
4617
|
+
const resolvedEntity = await this.entityResolverService.resolveEntity(
|
|
4618
|
+
entity,
|
|
4619
|
+
{
|
|
4620
|
+
link: urls[0],
|
|
4621
|
+
location: this._options.location,
|
|
4622
|
+
navigationMode,
|
|
4623
|
+
selectorMode: useSelectorMode
|
|
4624
|
+
}
|
|
4625
|
+
);
|
|
4776
4626
|
const workflow = await this.workflowsCoreService.create({
|
|
4777
4627
|
urls,
|
|
4778
4628
|
name,
|
|
@@ -4784,7 +4634,9 @@ var ExtractionBuilderService = class {
|
|
|
4784
4634
|
fields: resolvedEntity.fields,
|
|
4785
4635
|
autoStart: false,
|
|
4786
4636
|
interval: this._options.interval,
|
|
4787
|
-
schedules: this._options.schedules
|
|
4637
|
+
schedules: this._options.schedules,
|
|
4638
|
+
additionalData: this._options.additionalData,
|
|
4639
|
+
bypassPreview: this._options.bypassPreview
|
|
4788
4640
|
});
|
|
4789
4641
|
if (this._notificationOptions) {
|
|
4790
4642
|
await this.notificationSetupService.setup({
|
|
@@ -4795,9 +4647,35 @@ var ExtractionBuilderService = class {
|
|
|
4795
4647
|
this._workflowId = workflow.id;
|
|
4796
4648
|
return this;
|
|
4797
4649
|
}
|
|
4650
|
+
async waitForReady(options) {
|
|
4651
|
+
assert(this._workflowId, "Workflow ID is not set");
|
|
4652
|
+
const targetState = options?.targetState ?? "PREVIEW";
|
|
4653
|
+
const current = await this.workflowsCoreService.get(this._workflowId);
|
|
4654
|
+
if (current.state === targetState || targetState === "PREVIEW" && current.state === "ACTIVE") {
|
|
4655
|
+
return current;
|
|
4656
|
+
}
|
|
4657
|
+
const workflow = await this.workflowsCoreService.wait(this._workflowId, {
|
|
4658
|
+
targetState,
|
|
4659
|
+
pollIntervalMs: options?.pollIntervalMs,
|
|
4660
|
+
timeoutMs: options?.timeoutMs
|
|
4661
|
+
});
|
|
4662
|
+
return workflow;
|
|
4663
|
+
}
|
|
4798
4664
|
async run(options) {
|
|
4799
4665
|
assert(this._options, "Options are not set");
|
|
4800
4666
|
assert(this._workflowId, "Workflow ID is not set");
|
|
4667
|
+
if (this._options.interval === "REAL_TIME") {
|
|
4668
|
+
throw new KadoaSdkException(
|
|
4669
|
+
"run() is not supported for real-time workflows. Use waitForReady() and subscribe via client.realtime.onEvent(...).",
|
|
4670
|
+
{
|
|
4671
|
+
code: "BAD_REQUEST",
|
|
4672
|
+
details: {
|
|
4673
|
+
interval: "REAL_TIME",
|
|
4674
|
+
workflowId: this._workflowId
|
|
4675
|
+
}
|
|
4676
|
+
}
|
|
4677
|
+
);
|
|
4678
|
+
}
|
|
4801
4679
|
const startedJob = await this.workflowsCoreService.runWorkflow(
|
|
4802
4680
|
this._workflowId,
|
|
4803
4681
|
{ variables: options?.variables, limit: options?.limit }
|
|
@@ -4815,6 +4693,18 @@ var ExtractionBuilderService = class {
|
|
|
4815
4693
|
async submit(options) {
|
|
4816
4694
|
assert(this._options, "Options are not set");
|
|
4817
4695
|
assert(this._workflowId, "Workflow ID is not set");
|
|
4696
|
+
if (this._options.interval === "REAL_TIME") {
|
|
4697
|
+
throw new KadoaSdkException(
|
|
4698
|
+
"submit() is not supported for real-time workflows. Use waitForReady() and subscribe via client.realtime.onEvent(...).",
|
|
4699
|
+
{
|
|
4700
|
+
code: "BAD_REQUEST",
|
|
4701
|
+
details: {
|
|
4702
|
+
interval: "REAL_TIME",
|
|
4703
|
+
workflowId: this._workflowId
|
|
4704
|
+
}
|
|
4705
|
+
}
|
|
4706
|
+
);
|
|
4707
|
+
}
|
|
4818
4708
|
const submittedJob = await this.workflowsCoreService.runWorkflow(
|
|
4819
4709
|
this._workflowId,
|
|
4820
4710
|
{ variables: options?.variables, limit: options?.limit }
|
|
@@ -5270,7 +5160,7 @@ var WSS_API_URI = process.env.KADOA_WSS_API_URI ?? "wss://realtime.kadoa.com";
|
|
|
5270
5160
|
var REALTIME_API_URI = process.env.KADOA_REALTIME_API_URI ?? "https://realtime.kadoa.com";
|
|
5271
5161
|
|
|
5272
5162
|
// src/version.ts
|
|
5273
|
-
var SDK_VERSION = "0.
|
|
5163
|
+
var SDK_VERSION = "0.16.1";
|
|
5274
5164
|
var SDK_NAME = "kadoa-node-sdk";
|
|
5275
5165
|
var SDK_LANGUAGE = "node";
|
|
5276
5166
|
|
|
@@ -5537,6 +5427,28 @@ async function pollUntil(pollFn, isComplete, options = {}) {
|
|
|
5537
5427
|
);
|
|
5538
5428
|
}
|
|
5539
5429
|
|
|
5430
|
+
// src/runtime/utils/validation.ts
|
|
5431
|
+
function validateAdditionalData(additionalData) {
|
|
5432
|
+
if (additionalData === void 0) return;
|
|
5433
|
+
if (additionalData === null || typeof additionalData !== "object" || Array.isArray(additionalData)) {
|
|
5434
|
+
throw new KadoaSdkException("additionalData must be a plain object", {
|
|
5435
|
+
code: "VALIDATION_ERROR"
|
|
5436
|
+
});
|
|
5437
|
+
}
|
|
5438
|
+
try {
|
|
5439
|
+
const serialized = JSON.stringify(additionalData);
|
|
5440
|
+
if (serialized.length > 100 * 1024) {
|
|
5441
|
+
console.warn(
|
|
5442
|
+
"[Kadoa SDK] additionalData exceeds 100KB, consider reducing size"
|
|
5443
|
+
);
|
|
5444
|
+
}
|
|
5445
|
+
} catch {
|
|
5446
|
+
throw new KadoaSdkException("additionalData must be JSON-serializable", {
|
|
5447
|
+
code: "VALIDATION_ERROR"
|
|
5448
|
+
});
|
|
5449
|
+
}
|
|
5450
|
+
}
|
|
5451
|
+
|
|
5540
5452
|
// src/domains/validation/validation-core.service.ts
|
|
5541
5453
|
var ValidationCoreService = class {
|
|
5542
5454
|
constructor(client) {
|
|
@@ -5818,6 +5730,7 @@ var WorkflowsCoreService = class {
|
|
|
5818
5730
|
this.workflowsApi = workflowsApi;
|
|
5819
5731
|
}
|
|
5820
5732
|
async create(input) {
|
|
5733
|
+
validateAdditionalData(input.additionalData);
|
|
5821
5734
|
const request = {
|
|
5822
5735
|
urls: input.urls,
|
|
5823
5736
|
name: input.name,
|
|
@@ -5832,7 +5745,8 @@ var WorkflowsCoreService = class {
|
|
|
5832
5745
|
monitoring: input.monitoring,
|
|
5833
5746
|
location: input.location,
|
|
5834
5747
|
autoStart: input.autoStart,
|
|
5835
|
-
schedules: input.schedules
|
|
5748
|
+
schedules: input.schedules,
|
|
5749
|
+
additionalData: input.additionalData
|
|
5836
5750
|
};
|
|
5837
5751
|
const response = await this.workflowsApi.v4WorkflowsPost({
|
|
5838
5752
|
createWorkflowBody: request
|
|
@@ -5864,11 +5778,28 @@ var WorkflowsCoreService = class {
|
|
|
5864
5778
|
});
|
|
5865
5779
|
return response.data?.workflows?.[0];
|
|
5866
5780
|
}
|
|
5781
|
+
/**
|
|
5782
|
+
* @deprecated Use delete(id) instead.
|
|
5783
|
+
*/
|
|
5867
5784
|
async cancel(id) {
|
|
5785
|
+
console.warn(
|
|
5786
|
+
"[Kadoa SDK] workflow.cancel(id) will be deprecated. Use workflow.delete(id)."
|
|
5787
|
+
);
|
|
5788
|
+
await this.delete(id);
|
|
5789
|
+
}
|
|
5790
|
+
async delete(id) {
|
|
5868
5791
|
await this.workflowsApi.v4WorkflowsWorkflowIdDelete({
|
|
5869
5792
|
workflowId: id
|
|
5870
5793
|
});
|
|
5871
5794
|
}
|
|
5795
|
+
async update(id, input) {
|
|
5796
|
+
validateAdditionalData(input.additionalData);
|
|
5797
|
+
const response = await this.workflowsApi.v4WorkflowsWorkflowIdMetadataPut({
|
|
5798
|
+
workflowId: id,
|
|
5799
|
+
v4WorkflowsWorkflowIdMetadataPutRequest: input
|
|
5800
|
+
});
|
|
5801
|
+
return response.data;
|
|
5802
|
+
}
|
|
5872
5803
|
async resume(id) {
|
|
5873
5804
|
await this.workflowsApi.v4WorkflowsWorkflowIdResumePut({
|
|
5874
5805
|
workflowId: id
|
|
@@ -6004,7 +5935,7 @@ var KadoaClient = class {
|
|
|
6004
5935
|
headers
|
|
6005
5936
|
}
|
|
6006
5937
|
});
|
|
6007
|
-
this._axiosInstance =
|
|
5938
|
+
this._axiosInstance = globalAxios2.create({
|
|
6008
5939
|
timeout: this._timeout,
|
|
6009
5940
|
headers
|
|
6010
5941
|
});
|
|
@@ -6223,6 +6154,6 @@ var KadoaClient = class {
|
|
|
6223
6154
|
}
|
|
6224
6155
|
};
|
|
6225
6156
|
|
|
6226
|
-
export { DataFetcherService, ERROR_MESSAGES, EntityResolverService, ExtractionBuilderService, ExtractionService, FetchDataOptions, KadoaClient, KadoaHttpException, KadoaSdkException, NotificationChannelType, NotificationChannelsService, V5NotificationsSettingsGetEventTypeEnum as NotificationSettingsEventTypeEnum, NotificationSettingsService, NotificationSetupService, Realtime, SchemaBuilder, SchemaFieldDataType, SchemasService, UserService, ValidationCoreService, ValidationRulesService, WorkflowsCoreService, pollUntil };
|
|
6157
|
+
export { DataFetcherService, ERROR_MESSAGES, EntityResolverService, ExtractionBuilderService, ExtractionService, FetchDataOptions, KadoaClient, KadoaHttpException, KadoaSdkException, NotificationChannelType, NotificationChannelsService, V5NotificationsSettingsGetEventTypeEnum as NotificationSettingsEventTypeEnum, NotificationSettingsService, NotificationSetupService, Realtime, SchemaBuilder, SchemaFieldDataType, SchemasService, UserService, ValidationCoreService, ValidationRulesService, WorkflowsCoreService, pollUntil, validateAdditionalData };
|
|
6227
6158
|
//# sourceMappingURL=index.mjs.map
|
|
6228
6159
|
//# sourceMappingURL=index.mjs.map
|