@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/dist/index.js CHANGED
@@ -1,16 +1,16 @@
1
1
  'use strict';
2
2
 
3
- var globalAxios5 = require('axios');
3
+ var globalAxios2 = require('axios');
4
+ var url = require('url');
4
5
  var createDebug = require('debug');
5
6
  var esToolkit = require('es-toolkit');
6
- var url = require('url');
7
7
  var assert = require('assert');
8
8
  var zod = require('zod');
9
9
  var uuid = require('uuid');
10
10
 
11
11
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
12
12
 
13
- var globalAxios5__default = /*#__PURE__*/_interopDefault(globalAxios5);
13
+ var globalAxios2__default = /*#__PURE__*/_interopDefault(globalAxios2);
14
14
  var createDebug__default = /*#__PURE__*/_interopDefault(createDebug);
15
15
  var assert__default = /*#__PURE__*/_interopDefault(assert);
16
16
 
@@ -20,489 +20,70 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
20
20
  if (typeof require !== "undefined") return require.apply(this, arguments);
21
21
  throw Error('Dynamic require of "' + x + '" is not supported');
22
22
  });
23
-
24
- // src/domains/extraction/extraction.acl.ts
25
- var FetchDataOptions = class {
26
- };
27
- var SchemaFieldDataType = {
28
- Text: "TEXT",
29
- Number: "NUMBER",
30
- Date: "DATE",
31
- Url: "URL",
32
- Email: "EMAIL",
33
- Image: "IMAGE",
34
- Video: "VIDEO",
35
- Phone: "PHONE",
36
- Boolean: "BOOLEAN",
37
- Location: "LOCATION",
38
- Array: "ARRAY",
39
- Object: "OBJECT"
40
- };
41
-
42
- // src/runtime/pagination/paginator.ts
43
- var PagedIterator = class {
44
- constructor(fetchPage) {
45
- this.fetchPage = fetchPage;
46
- }
47
- /**
48
- * Fetch all items across all pages
49
- * @param options Base options (page will be overridden)
50
- * @returns Array of all items
51
- */
52
- async fetchAll(options = {}) {
53
- const allItems = [];
54
- let currentPage = 1;
55
- let hasMore = true;
56
- while (hasMore) {
57
- const result = await this.fetchPage({ ...options, page: currentPage });
58
- allItems.push(...result.data);
59
- const pagination = result.pagination;
60
- hasMore = pagination.page !== void 0 && pagination.totalPages !== void 0 && pagination.page < pagination.totalPages;
61
- currentPage++;
62
- }
63
- return allItems;
64
- }
65
- /**
66
- * Create an async iterator for pages
67
- * @param options Base options (page will be overridden)
68
- * @returns Async generator that yields pages
69
- */
70
- async *pages(options = {}) {
71
- let currentPage = 1;
72
- let hasMore = true;
73
- while (hasMore) {
74
- const result = await this.fetchPage({ ...options, page: currentPage });
75
- yield result;
76
- const pagination = result.pagination;
77
- hasMore = pagination.page !== void 0 && pagination.totalPages !== void 0 && pagination.page < pagination.totalPages;
78
- currentPage++;
79
- }
80
- }
81
- /**
82
- * Create an async iterator for individual items
83
- * @param options Base options (page will be overridden)
84
- * @returns Async generator that yields items
85
- */
86
- async *items(options = {}) {
87
- for await (const page of this.pages(options)) {
88
- for (const item of page.data) {
89
- yield item;
90
- }
23
+ var BASE_PATH = "https://api.kadoa.com".replace(/\/+$/, "");
24
+ var BaseAPI = class {
25
+ constructor(configuration, basePath = BASE_PATH, axios2 = globalAxios2__default.default) {
26
+ this.basePath = basePath;
27
+ this.axios = axios2;
28
+ if (configuration) {
29
+ this.configuration = configuration;
30
+ this.basePath = configuration.basePath ?? basePath;
91
31
  }
92
32
  }
93
33
  };
94
-
95
- // src/domains/extraction/services/data-fetcher.service.ts
96
- var DataFetcherService = class {
97
- constructor(workflowsApi) {
98
- this.workflowsApi = workflowsApi;
99
- this.defaultLimit = 100;
100
- }
101
- /**
102
- * Fetch a page of workflow data
103
- */
104
- async fetchData(options) {
105
- const response = await this.workflowsApi.v4WorkflowsWorkflowIdDataGet({
106
- ...options,
107
- page: options.page ?? 1,
108
- limit: options.limit ?? this.defaultLimit
109
- });
110
- const result = response.data;
111
- return result;
112
- }
113
- /**
114
- * Fetch all pages of workflow data
115
- */
116
- async fetchAllData(options) {
117
- const iterator = new PagedIterator(
118
- (pageOptions) => this.fetchData({ ...options, ...pageOptions })
119
- );
120
- return iterator.fetchAll({ limit: options.limit ?? this.defaultLimit });
121
- }
122
- /**
123
- * Create an async iterator for paginated data fetching
124
- */
125
- async *fetchDataPages(options) {
126
- const iterator = new PagedIterator(
127
- (pageOptions) => this.fetchData({ ...options, ...pageOptions })
128
- );
129
- for await (const page of iterator.pages({
130
- limit: options.limit ?? this.defaultLimit
131
- })) {
132
- yield page;
133
- }
34
+ var RequiredError = class extends Error {
35
+ constructor(field, msg) {
36
+ super(msg);
37
+ this.field = field;
38
+ this.name = "RequiredError";
134
39
  }
135
40
  };
136
-
137
- // src/runtime/exceptions/base.exception.ts
138
- var KadoaErrorCode = {
139
- AUTH_ERROR: "AUTH_ERROR",
140
- VALIDATION_ERROR: "VALIDATION_ERROR",
141
- BAD_REQUEST: "BAD_REQUEST",
142
- NOT_FOUND: "NOT_FOUND",
143
- INTERNAL_ERROR: "INTERNAL_ERROR"
144
- };
145
- var _KadoaSdkException = class _KadoaSdkException extends Error {
146
- constructor(message, options) {
147
- super(message);
148
- this.name = "KadoaSdkException";
149
- this.code = options?.code ?? "UNKNOWN";
150
- this.details = options?.details;
151
- if (options && "cause" in options) this.cause = options.cause;
152
- Error.captureStackTrace?.(this, _KadoaSdkException);
153
- }
154
- static from(error, details) {
155
- if (error instanceof _KadoaSdkException) return error;
156
- const message = error instanceof Error ? error.message : typeof error === "string" ? error : "Unexpected error";
157
- return new _KadoaSdkException(message, {
158
- code: "UNKNOWN",
159
- details,
160
- cause: error
161
- });
41
+ var operationServerMap = {};
42
+ var DUMMY_BASE_URL = "https://example.com";
43
+ var assertParamExists = function(functionName, paramName, paramValue) {
44
+ if (paramValue === null || paramValue === void 0) {
45
+ throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
162
46
  }
163
- toJSON() {
164
- return {
165
- name: this.name,
166
- message: this.message,
167
- code: this.code,
168
- details: this.details
169
- };
47
+ };
48
+ var setApiKeyToObject = async function(object, keyParamName, configuration) {
49
+ if (configuration && configuration.apiKey) {
50
+ const localVarApiKeyValue = typeof configuration.apiKey === "function" ? await configuration.apiKey(keyParamName) : await configuration.apiKey;
51
+ object[keyParamName] = localVarApiKeyValue;
170
52
  }
171
- toString() {
172
- return [this.name, this.code, this.message].filter(Boolean).join(": ");
53
+ };
54
+ var setBearerAuthToObject = async function(object, configuration) {
55
+ if (configuration && configuration.accessToken) {
56
+ const accessToken = typeof configuration.accessToken === "function" ? await configuration.accessToken() : await configuration.accessToken;
57
+ object["Authorization"] = "Bearer " + accessToken;
173
58
  }
174
- toDetailedString() {
175
- const parts = [`${this.name}: ${this.message}`, `Code: ${this.code}`];
176
- if (this.details && Object.keys(this.details).length > 0) {
177
- parts.push(`Details: ${JSON.stringify(this.details, null, 2)}`);
59
+ };
60
+ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
61
+ if (parameter == null) return;
62
+ if (typeof parameter === "object") {
63
+ if (Array.isArray(parameter)) {
64
+ parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
65
+ } else {
66
+ Object.keys(parameter).forEach(
67
+ (currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
68
+ );
178
69
  }
179
- if (this.cause) {
180
- parts.push(`Cause: ${this.cause}`);
70
+ } else {
71
+ if (urlSearchParams.has(key)) {
72
+ urlSearchParams.append(key, parameter);
73
+ } else {
74
+ urlSearchParams.set(key, parameter);
181
75
  }
182
- return parts.join("\n");
183
- }
184
- static isInstance(error) {
185
- return error instanceof _KadoaSdkException;
186
- }
187
- static wrap(error, extra) {
188
- if (error instanceof _KadoaSdkException) return error;
189
- const message = extra?.message || (error instanceof Error ? error.message : typeof error === "string" ? error : "Unexpected error");
190
- return new _KadoaSdkException(message, {
191
- code: "UNKNOWN",
192
- details: extra?.details,
193
- cause: error
194
- });
195
76
  }
77
+ }
78
+ var setSearchParams = function(url$1, ...objects) {
79
+ const searchParams = new url.URLSearchParams(url$1.search);
80
+ setFlattenedQueryParams(searchParams, objects);
81
+ url$1.search = searchParams.toString();
196
82
  };
197
- _KadoaSdkException.ERROR_MESSAGES = {
198
- // General errors
199
- CONFIG_ERROR: "Invalid configuration provided",
200
- AUTH_FAILED: "Authentication failed. Please check your API key",
201
- RATE_LIMITED: "Rate limit exceeded. Please try again later",
202
- NETWORK_ERROR: "Network error occurred",
203
- SERVER_ERROR: "Server error occurred",
204
- PARSE_ERROR: "Failed to parse response",
205
- BAD_REQUEST: "Bad request",
206
- ABORTED: "Aborted",
207
- NOT_FOUND: "Not found",
208
- // Workflow specific errors
209
- NO_WORKFLOW_ID: "Failed to start extraction process - no ID received",
210
- WORKFLOW_CREATE_FAILED: "Failed to create workflow",
211
- WORKFLOW_TIMEOUT: "Workflow processing timed out",
212
- WORKFLOW_UNEXPECTED_STATUS: "Extraction completed with unexpected status",
213
- PROGRESS_CHECK_FAILED: "Failed to check extraction progress",
214
- DATA_FETCH_FAILED: "Failed to retrieve extracted data from workflow",
215
- // Extraction specific errors
216
- NO_URLS: "At least one URL is required for extraction",
217
- NO_API_KEY: "API key is required for entity detection",
218
- LINK_REQUIRED: "Link is required for entity field detection",
219
- NO_PREDICTIONS: "No entity predictions returned from the API",
220
- EXTRACTION_FAILED: "Data extraction failed for the provided URLs",
221
- ENTITY_FETCH_FAILED: "Failed to fetch entity fields",
222
- ENTITY_INVARIANT_VIOLATION: "No valid entity provided",
223
- // Schema specific errors
224
- SCHEMA_NOT_FOUND: "Schema not found",
225
- SCHEMA_FETCH_ERROR: "Failed to fetch schema",
226
- SCHEMAS_FETCH_ERROR: "Failed to fetch schemas",
227
- SCHEMA_CREATE_FAILED: "Failed to create schema",
228
- SCHEMA_UPDATE_FAILED: "Failed to update schema",
229
- SCHEMA_DELETE_FAILED: "Failed to delete schema"
230
- };
231
- var KadoaSdkException = _KadoaSdkException;
232
- var ERROR_MESSAGES = KadoaSdkException.ERROR_MESSAGES;
233
- var KadoaHttpException = class _KadoaHttpException extends KadoaSdkException {
234
- constructor(message, options) {
235
- super(message, {
236
- code: options?.code,
237
- details: options?.details,
238
- cause: options?.cause
239
- });
240
- this.name = "KadoaHttpException";
241
- this.httpStatus = options?.httpStatus;
242
- this.requestId = options?.requestId;
243
- this.endpoint = options?.endpoint;
244
- this.method = options?.method;
245
- this.responseBody = options?.responseBody;
246
- }
247
- static fromAxiosError(error, extra) {
248
- const status = error.response?.status;
249
- const requestId = error.response?.headers?.["x-request-id"] || error.response?.headers?.["x-amzn-requestid"];
250
- const method = error.config?.method?.toUpperCase();
251
- const url = error.config?.url;
252
- return new _KadoaHttpException(extra?.message || error.message, {
253
- code: _KadoaHttpException.mapStatusToCode(error),
254
- httpStatus: status,
255
- requestId,
256
- endpoint: url,
257
- method,
258
- responseBody: error.response?.data,
259
- details: extra?.details,
260
- cause: error
261
- });
262
- }
263
- toJSON() {
264
- return {
265
- ...super.toJSON(),
266
- httpStatus: this.httpStatus,
267
- requestId: this.requestId,
268
- endpoint: this.endpoint,
269
- method: this.method,
270
- responseBody: this.responseBody
271
- };
272
- }
273
- toDetailedString() {
274
- const parts = [`${this.name}: ${this.message}`, `Code: ${this.code}`];
275
- if (this.httpStatus) {
276
- parts.push(`HTTP Status: ${this.httpStatus}`);
277
- }
278
- if (this.method && this.endpoint) {
279
- parts.push(`Request: ${this.method} ${this.endpoint}`);
280
- }
281
- if (this.requestId) {
282
- parts.push(`Request ID: ${this.requestId}`);
283
- }
284
- if (this.responseBody) {
285
- parts.push(
286
- `Response Body: ${JSON.stringify(this.responseBody, null, 2)}`
287
- );
288
- }
289
- if (this.details && Object.keys(this.details).length > 0) {
290
- parts.push(`Details: ${JSON.stringify(this.details, null, 2)}`);
291
- }
292
- if (this.cause) {
293
- parts.push(`Cause: ${this.cause}`);
294
- }
295
- return parts.join("\n");
296
- }
297
- static wrap(error, extra) {
298
- if (error instanceof _KadoaHttpException) return error;
299
- if (error instanceof KadoaSdkException) return error;
300
- if (globalAxios5.isAxiosError(error)) {
301
- return _KadoaHttpException.fromAxiosError(error, extra);
302
- }
303
- return KadoaSdkException.wrap(error, extra);
304
- }
305
- static mapStatusToCode(errorOrStatus) {
306
- const status = typeof errorOrStatus === "number" ? errorOrStatus : errorOrStatus.response?.status;
307
- if (!status) {
308
- if (typeof errorOrStatus === "number") return "UNKNOWN";
309
- return errorOrStatus.code === "ECONNABORTED" ? "TIMEOUT" : errorOrStatus.request ? "NETWORK_ERROR" : "UNKNOWN";
310
- }
311
- if (status === 401 || status === 403) return "AUTH_ERROR";
312
- if (status === 404) return "NOT_FOUND";
313
- if (status === 408) return "TIMEOUT";
314
- if (status === 429) return "RATE_LIMITED";
315
- if (status >= 400 && status < 500) return "VALIDATION_ERROR";
316
- if (status >= 500) return "HTTP_ERROR";
317
- return "UNKNOWN";
318
- }
319
- };
320
- var createLogger = (namespace) => createDebug__default.default(`kadoa:${namespace}`);
321
- var logger = {
322
- client: createLogger("client"),
323
- wss: createLogger("wss"),
324
- extraction: createLogger("extraction"),
325
- http: createLogger("http"),
326
- workflow: createLogger("workflow"),
327
- crawl: createLogger("crawl"),
328
- notifications: createLogger("notifications"),
329
- schemas: createLogger("schemas"),
330
- validation: createLogger("validation")
331
- };
332
- var _SchemaBuilder = class _SchemaBuilder {
333
- constructor() {
334
- this.fields = [];
335
- }
336
- entity(entityName) {
337
- this.entityName = entityName;
338
- return this;
339
- }
340
- /**
341
- * Add a structured field to the schema
342
- * @param name - Field name (alphanumeric only)
343
- * @param description - Field description
344
- * @param dataType - Data type (STRING, NUMBER, BOOLEAN, etc.)
345
- * @param options - Optional field configuration
346
- */
347
- field(name, description, dataType, options) {
348
- this.validateFieldName(name);
349
- const requiresExample = _SchemaBuilder.TYPES_REQUIRING_EXAMPLE.includes(dataType);
350
- if (requiresExample && !options?.example) {
351
- throw new KadoaSdkException(
352
- `Field "${name}" with type ${dataType} requires an example`,
353
- { code: "VALIDATION_ERROR", details: { name, dataType } }
354
- );
355
- }
356
- this.fields.push({
357
- name,
358
- description,
359
- dataType,
360
- fieldType: "SCHEMA",
361
- example: options?.example,
362
- isKey: options?.isKey
363
- });
364
- return this;
365
- }
366
- /**
367
- * Add a classification field to categorize content
368
- * @param name - Field name (alphanumeric only)
369
- * @param description - Field description
370
- * @param categories - Array of category definitions
371
- */
372
- classify(name, description, categories) {
373
- this.validateFieldName(name);
374
- this.fields.push({
375
- name,
376
- description,
377
- fieldType: "CLASSIFICATION",
378
- categories
379
- });
380
- return this;
381
- }
382
- /**
383
- * Add raw page content to extract
384
- * @param name - Raw content format(s): "html", "markdown", or "url"
385
- */
386
- raw(name) {
387
- const names = Array.isArray(name) ? name : [name];
388
- for (const name2 of names) {
389
- const fieldName = `raw${esToolkit.upperFirst(esToolkit.camelCase(name2))}`;
390
- if (this.fields.some((field) => field.name === fieldName)) {
391
- continue;
392
- }
393
- this.fields.push({
394
- name: fieldName,
395
- description: `Raw page content in ${name2.toUpperCase()} format`,
396
- fieldType: "METADATA",
397
- metadataKey: name2
398
- });
399
- }
400
- return this;
401
- }
402
- build() {
403
- if (!this.entityName) {
404
- throw new KadoaSdkException("Entity name is required", {
405
- code: "VALIDATION_ERROR",
406
- details: { entityName: this.entityName }
407
- });
408
- }
409
- return {
410
- entityName: this.entityName,
411
- fields: this.fields
412
- };
413
- }
414
- validateFieldName(name) {
415
- if (!_SchemaBuilder.FIELD_NAME_PATTERN.test(name)) {
416
- throw new KadoaSdkException(
417
- `Field name "${name}" must be alphanumeric only (no underscores or special characters)`,
418
- {
419
- code: "VALIDATION_ERROR",
420
- details: { name, pattern: "^[A-Za-z0-9]+$" }
421
- }
422
- );
423
- }
424
- const lowerName = name.toLowerCase();
425
- if (this.fields.some((f) => f.name.toLowerCase() === lowerName)) {
426
- throw new KadoaSdkException(`Duplicate field name: "${name}"`, {
427
- code: "VALIDATION_ERROR",
428
- details: { name }
429
- });
430
- }
431
- }
432
- };
433
- _SchemaBuilder.FIELD_NAME_PATTERN = /^[A-Za-z0-9]+$/;
434
- _SchemaBuilder.TYPES_REQUIRING_EXAMPLE = [
435
- "STRING",
436
- "IMAGE",
437
- "LINK",
438
- "OBJECT",
439
- "ARRAY"
440
- ];
441
- var SchemaBuilder = _SchemaBuilder;
442
- var BASE_PATH = "https://api.kadoa.com".replace(/\/+$/, "");
443
- var BaseAPI = class {
444
- constructor(configuration, basePath = BASE_PATH, axios2 = globalAxios5__default.default) {
445
- this.basePath = basePath;
446
- this.axios = axios2;
447
- if (configuration) {
448
- this.configuration = configuration;
449
- this.basePath = configuration.basePath ?? basePath;
450
- }
451
- }
452
- };
453
- var RequiredError = class extends Error {
454
- constructor(field, msg) {
455
- super(msg);
456
- this.field = field;
457
- this.name = "RequiredError";
458
- }
459
- };
460
- var operationServerMap = {};
461
- var DUMMY_BASE_URL = "https://example.com";
462
- var assertParamExists = function(functionName, paramName, paramValue) {
463
- if (paramValue === null || paramValue === void 0) {
464
- throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
465
- }
466
- };
467
- var setApiKeyToObject = async function(object, keyParamName, configuration) {
468
- if (configuration && configuration.apiKey) {
469
- const localVarApiKeyValue = typeof configuration.apiKey === "function" ? await configuration.apiKey(keyParamName) : await configuration.apiKey;
470
- object[keyParamName] = localVarApiKeyValue;
471
- }
472
- };
473
- var setBearerAuthToObject = async function(object, configuration) {
474
- if (configuration && configuration.accessToken) {
475
- const accessToken = typeof configuration.accessToken === "function" ? await configuration.accessToken() : await configuration.accessToken;
476
- object["Authorization"] = "Bearer " + accessToken;
477
- }
478
- };
479
- function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
480
- if (parameter == null) return;
481
- if (typeof parameter === "object") {
482
- if (Array.isArray(parameter)) {
483
- parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
484
- } else {
485
- Object.keys(parameter).forEach(
486
- (currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
487
- );
488
- }
489
- } else {
490
- if (urlSearchParams.has(key)) {
491
- urlSearchParams.append(key, parameter);
492
- } else {
493
- urlSearchParams.set(key, parameter);
494
- }
495
- }
496
- }
497
- var setSearchParams = function(url$1, ...objects) {
498
- const searchParams = new url.URLSearchParams(url$1.search);
499
- setFlattenedQueryParams(searchParams, objects);
500
- url$1.search = searchParams.toString();
501
- };
502
- var serializeDataIfNeeded = function(value, requestOptions, configuration) {
503
- const nonString = typeof value !== "string";
504
- const needsSerialization = nonString && configuration && configuration.isJsonMime ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) : nonString;
505
- return needsSerialization ? JSON.stringify(value !== void 0 ? value : {}) : value || "";
83
+ var serializeDataIfNeeded = function(value, requestOptions, configuration) {
84
+ const nonString = typeof value !== "string";
85
+ const needsSerialization = nonString && configuration && configuration.isJsonMime ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) : nonString;
86
+ return needsSerialization ? JSON.stringify(value !== void 0 ? value : {}) : value || "";
506
87
  };
507
88
  var toPathString = function(url) {
508
89
  return url.pathname + url.search + url.hash;
@@ -1218,7 +799,7 @@ var DataValidationApiFp = function(configuration) {
1218
799
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesActionsBulkApprovePost(bulkApproveRules, options);
1219
800
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1220
801
  const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesActionsBulkApprovePost"]?.[localVarOperationServerIndex]?.url;
1221
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
802
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1222
803
  },
1223
804
  /**
1224
805
  * Bulk delete rules for a workflow
@@ -1230,7 +811,7 @@ var DataValidationApiFp = function(configuration) {
1230
811
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesActionsBulkDeletePost(bulkDeleteRules, options);
1231
812
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1232
813
  const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesActionsBulkDeletePost"]?.[localVarOperationServerIndex]?.url;
1233
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
814
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1234
815
  },
1235
816
  /**
1236
817
  * Delete all validation rules with optional filtering
@@ -1242,7 +823,7 @@ var DataValidationApiFp = function(configuration) {
1242
823
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesActionsDeleteAllDelete(deleteRuleWithReason, options);
1243
824
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1244
825
  const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesActionsDeleteAllDelete"]?.[localVarOperationServerIndex]?.url;
1245
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
826
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1246
827
  },
1247
828
  /**
1248
829
  * Generate a validation rule
@@ -1254,7 +835,7 @@ var DataValidationApiFp = function(configuration) {
1254
835
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesActionsGeneratePost(generateRule, options);
1255
836
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1256
837
  const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesActionsGeneratePost"]?.[localVarOperationServerIndex]?.url;
1257
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
838
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1258
839
  },
1259
840
  /**
1260
841
  * Generate multiple validation rules
@@ -1266,7 +847,7 @@ var DataValidationApiFp = function(configuration) {
1266
847
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesActionsGenerateRulesPost(generateRules, options);
1267
848
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1268
849
  const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesActionsGenerateRulesPost"]?.[localVarOperationServerIndex]?.url;
1269
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
850
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1270
851
  },
1271
852
  /**
1272
853
  * List validation rules with optional filtering
@@ -1283,7 +864,7 @@ var DataValidationApiFp = function(configuration) {
1283
864
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesGet(groupId, workflowId, status, page, pageSize, includeDeleted, options);
1284
865
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1285
866
  const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesGet"]?.[localVarOperationServerIndex]?.url;
1286
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
867
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1287
868
  },
1288
869
  /**
1289
870
  * Create a new validation rule
@@ -1295,7 +876,7 @@ var DataValidationApiFp = function(configuration) {
1295
876
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesPost(createRule, options);
1296
877
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1297
878
  const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesPost"]?.[localVarOperationServerIndex]?.url;
1298
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
879
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1299
880
  },
1300
881
  /**
1301
882
  * Delete a validation rule with reason
@@ -1308,7 +889,7 @@ var DataValidationApiFp = function(configuration) {
1308
889
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesRuleIdDelete(ruleId, deleteRuleWithReason, options);
1309
890
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1310
891
  const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesRuleIdDelete"]?.[localVarOperationServerIndex]?.url;
1311
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
892
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1312
893
  },
1313
894
  /**
1314
895
  * Disable a validation rule with reason
@@ -1321,7 +902,7 @@ var DataValidationApiFp = function(configuration) {
1321
902
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesRuleIdDisablePost(ruleId, disableRule, options);
1322
903
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1323
904
  const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesRuleIdDisablePost"]?.[localVarOperationServerIndex]?.url;
1324
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
905
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1325
906
  },
1326
907
  /**
1327
908
  * Get a validation rule by ID
@@ -1334,7 +915,7 @@ var DataValidationApiFp = function(configuration) {
1334
915
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesRuleIdGet(ruleId, includeDeleted, options);
1335
916
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1336
917
  const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesRuleIdGet"]?.[localVarOperationServerIndex]?.url;
1337
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
918
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1338
919
  },
1339
920
  /**
1340
921
  * Update a validation rule
@@ -1347,7 +928,7 @@ var DataValidationApiFp = function(configuration) {
1347
928
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationRulesRuleIdPut(ruleId, updateRule, options);
1348
929
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1349
930
  const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationRulesRuleIdPut"]?.[localVarOperationServerIndex]?.url;
1350
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
931
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1351
932
  },
1352
933
  /**
1353
934
  * Get all anomalies for a validation
@@ -1362,7 +943,7 @@ var DataValidationApiFp = function(configuration) {
1362
943
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationValidationsValidationIdAnomaliesGet(validationId, page, pageSize, options);
1363
944
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1364
945
  const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationValidationsValidationIdAnomaliesGet"]?.[localVarOperationServerIndex]?.url;
1365
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
946
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1366
947
  },
1367
948
  /**
1368
949
  * Get anomalies for a specific rule
@@ -1378,7 +959,7 @@ var DataValidationApiFp = function(configuration) {
1378
959
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet(validationId, ruleName, page, pageSize, options);
1379
960
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1380
961
  const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationValidationsValidationIdAnomaliesRulesRuleNameGet"]?.[localVarOperationServerIndex]?.url;
1381
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
962
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1382
963
  },
1383
964
  /**
1384
965
  * Get validation details
@@ -1392,7 +973,7 @@ var DataValidationApiFp = function(configuration) {
1392
973
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationValidationsValidationIdGet(validationId, includeDryRun, options);
1393
974
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1394
975
  const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationValidationsValidationIdGet"]?.[localVarOperationServerIndex]?.url;
1395
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
976
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1396
977
  },
1397
978
  /**
1398
979
  * Schedule a data validation job (alternative path)
@@ -1407,7 +988,7 @@ var DataValidationApiFp = function(configuration) {
1407
988
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowIdJobsJobIdValidatePost(workflowId, jobId, dataValidationRequestBody, options);
1408
989
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1409
990
  const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowIdJobsJobIdValidatePost"]?.[localVarOperationServerIndex]?.url;
1410
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
991
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1411
992
  },
1412
993
  /**
1413
994
  * Schedule a data validation job
@@ -1422,7 +1003,7 @@ var DataValidationApiFp = function(configuration) {
1422
1003
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost(workflowId, jobId, dataValidationRequestBody, options);
1423
1004
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1424
1005
  const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidatePost"]?.[localVarOperationServerIndex]?.url;
1425
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1006
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1426
1007
  },
1427
1008
  /**
1428
1009
  * List all validations for a job
@@ -1439,7 +1020,7 @@ var DataValidationApiFp = function(configuration) {
1439
1020
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet(workflowId, jobId, page, pageSize, includeDryRun, options);
1440
1021
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1441
1022
  const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsGet"]?.[localVarOperationServerIndex]?.url;
1442
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1023
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1443
1024
  },
1444
1025
  /**
1445
1026
  * Get latest validation for a job
@@ -1454,7 +1035,7 @@ var DataValidationApiFp = function(configuration) {
1454
1035
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet(workflowId, jobId, includeDryRun, options);
1455
1036
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1456
1037
  const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowsWorkflowIdJobsJobIdValidationsLatestGet"]?.[localVarOperationServerIndex]?.url;
1457
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1038
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1458
1039
  },
1459
1040
  /**
1460
1041
  * Retrieves the current data validation configuration for a specific workflow
@@ -1467,7 +1048,7 @@ var DataValidationApiFp = function(configuration) {
1467
1048
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowsWorkflowIdValidationConfigGet(workflowId, options);
1468
1049
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1469
1050
  const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationConfigGet"]?.[localVarOperationServerIndex]?.url;
1470
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1051
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1471
1052
  },
1472
1053
  /**
1473
1054
  * Updates the complete data validation configuration including alerting settings
@@ -1481,7 +1062,7 @@ var DataValidationApiFp = function(configuration) {
1481
1062
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowsWorkflowIdValidationConfigPut(workflowId, v4DataValidationWorkflowsWorkflowIdValidationConfigPutRequest, options);
1482
1063
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1483
1064
  const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationConfigPut"]?.[localVarOperationServerIndex]?.url;
1484
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1065
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1485
1066
  },
1486
1067
  /**
1487
1068
  * Enables or disables data validation for a specific workflow
@@ -1495,7 +1076,7 @@ var DataValidationApiFp = function(configuration) {
1495
1076
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowsWorkflowIdValidationTogglePut(workflowId, v4DataValidationWorkflowsWorkflowIdValidationTogglePutRequest, options);
1496
1077
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1497
1078
  const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationTogglePut"]?.[localVarOperationServerIndex]?.url;
1498
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1079
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1499
1080
  },
1500
1081
  /**
1501
1082
  * Get latest validation for the most recent job of a workflow
@@ -1509,7 +1090,7 @@ var DataValidationApiFp = function(configuration) {
1509
1090
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4DataValidationWorkflowsWorkflowIdValidationsLatestGet(workflowId, includeDryRun, options);
1510
1091
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1511
1092
  const localVarOperationServerBasePath = operationServerMap["DataValidationApi.v4DataValidationWorkflowsWorkflowIdValidationsLatestGet"]?.[localVarOperationServerIndex]?.url;
1512
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1093
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1513
1094
  }
1514
1095
  };
1515
1096
  };
@@ -2162,7 +1743,7 @@ var NotificationsApiFp = function(configuration) {
2162
1743
  const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsChannelsChannelIdDelete(channelId, options);
2163
1744
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2164
1745
  const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsChannelsChannelIdDelete"]?.[localVarOperationServerIndex]?.url;
2165
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1746
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
2166
1747
  },
2167
1748
  /**
2168
1749
  *
@@ -2175,7 +1756,7 @@ var NotificationsApiFp = function(configuration) {
2175
1756
  const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsChannelsChannelIdGet(channelId, options);
2176
1757
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2177
1758
  const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsChannelsChannelIdGet"]?.[localVarOperationServerIndex]?.url;
2178
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1759
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
2179
1760
  },
2180
1761
  /**
2181
1762
  *
@@ -2189,7 +1770,7 @@ var NotificationsApiFp = function(configuration) {
2189
1770
  const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsChannelsChannelIdPut(channelId, v5NotificationsChannelsPostRequest, options);
2190
1771
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2191
1772
  const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsChannelsChannelIdPut"]?.[localVarOperationServerIndex]?.url;
2192
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1773
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
2193
1774
  },
2194
1775
  /**
2195
1776
  *
@@ -2202,7 +1783,7 @@ var NotificationsApiFp = function(configuration) {
2202
1783
  const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsChannelsGet(workflowId, options);
2203
1784
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2204
1785
  const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsChannelsGet"]?.[localVarOperationServerIndex]?.url;
2205
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1786
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
2206
1787
  },
2207
1788
  /**
2208
1789
  *
@@ -2215,7 +1796,7 @@ var NotificationsApiFp = function(configuration) {
2215
1796
  const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsChannelsPost(v5NotificationsChannelsPostRequest, options);
2216
1797
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2217
1798
  const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsChannelsPost"]?.[localVarOperationServerIndex]?.url;
2218
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1799
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
2219
1800
  },
2220
1801
  /**
2221
1802
  *
@@ -2228,7 +1809,7 @@ var NotificationsApiFp = function(configuration) {
2228
1809
  const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsEventTypesEventTypeGet(eventType, options);
2229
1810
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2230
1811
  const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsEventTypesEventTypeGet"]?.[localVarOperationServerIndex]?.url;
2231
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1812
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
2232
1813
  },
2233
1814
  /**
2234
1815
  *
@@ -2240,7 +1821,7 @@ var NotificationsApiFp = function(configuration) {
2240
1821
  const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsEventTypesGet(options);
2241
1822
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2242
1823
  const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsEventTypesGet"]?.[localVarOperationServerIndex]?.url;
2243
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1824
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
2244
1825
  },
2245
1826
  /**
2246
1827
  *
@@ -2258,7 +1839,7 @@ var NotificationsApiFp = function(configuration) {
2258
1839
  const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsLogsGet(workflowId, eventType, startDate, endDate, limit, offset, options);
2259
1840
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2260
1841
  const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsLogsGet"]?.[localVarOperationServerIndex]?.url;
2261
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1842
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
2262
1843
  },
2263
1844
  /**
2264
1845
  *
@@ -2272,7 +1853,7 @@ var NotificationsApiFp = function(configuration) {
2272
1853
  const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsSettingsGet(workflowId, eventType, options);
2273
1854
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2274
1855
  const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsSettingsGet"]?.[localVarOperationServerIndex]?.url;
2275
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1856
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
2276
1857
  },
2277
1858
  /**
2278
1859
  *
@@ -2285,7 +1866,7 @@ var NotificationsApiFp = function(configuration) {
2285
1866
  const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsSettingsPost(v5NotificationsSettingsPostRequest, options);
2286
1867
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2287
1868
  const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsSettingsPost"]?.[localVarOperationServerIndex]?.url;
2288
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1869
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
2289
1870
  },
2290
1871
  /**
2291
1872
  *
@@ -2298,7 +1879,7 @@ var NotificationsApiFp = function(configuration) {
2298
1879
  const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsSettingsSettingsIdDelete(settingsId, options);
2299
1880
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2300
1881
  const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsSettingsSettingsIdDelete"]?.[localVarOperationServerIndex]?.url;
2301
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1882
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
2302
1883
  },
2303
1884
  /**
2304
1885
  *
@@ -2311,7 +1892,7 @@ var NotificationsApiFp = function(configuration) {
2311
1892
  const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsSettingsSettingsIdGet(settingsId, options);
2312
1893
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2313
1894
  const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsSettingsSettingsIdGet"]?.[localVarOperationServerIndex]?.url;
2314
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1895
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
2315
1896
  },
2316
1897
  /**
2317
1898
  *
@@ -2325,7 +1906,7 @@ var NotificationsApiFp = function(configuration) {
2325
1906
  const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsSettingsSettingsIdPut(settingsId, v5NotificationsSettingsSettingsIdPutRequest, options);
2326
1907
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2327
1908
  const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsSettingsSettingsIdPut"]?.[localVarOperationServerIndex]?.url;
2328
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1909
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
2329
1910
  },
2330
1911
  /**
2331
1912
  *
@@ -2338,7 +1919,7 @@ var NotificationsApiFp = function(configuration) {
2338
1919
  const localVarAxiosArgs = await localVarAxiosParamCreator.v5NotificationsTestPost(v5NotificationsTestPostRequest, options);
2339
1920
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2340
1921
  const localVarOperationServerBasePath = operationServerMap["NotificationsApi.v5NotificationsTestPost"]?.[localVarOperationServerIndex]?.url;
2341
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1922
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
2342
1923
  }
2343
1924
  };
2344
1925
  };
@@ -2648,7 +2229,7 @@ var SchemasApiFp = function(configuration) {
2648
2229
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4SchemasGet(options);
2649
2230
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2650
2231
  const localVarOperationServerBasePath = operationServerMap["SchemasApi.v4SchemasGet"]?.[localVarOperationServerIndex]?.url;
2651
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
2232
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
2652
2233
  },
2653
2234
  /**
2654
2235
  * Create a new data schema with specified fields and entity type
@@ -2661,7 +2242,7 @@ var SchemasApiFp = function(configuration) {
2661
2242
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4SchemasPost(createSchemaBody, options);
2662
2243
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2663
2244
  const localVarOperationServerBasePath = operationServerMap["SchemasApi.v4SchemasPost"]?.[localVarOperationServerIndex]?.url;
2664
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
2245
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
2665
2246
  },
2666
2247
  /**
2667
2248
  * Delete a schema and all its revisions
@@ -2674,7 +2255,7 @@ var SchemasApiFp = function(configuration) {
2674
2255
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4SchemasSchemaIdDelete(schemaId, options);
2675
2256
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2676
2257
  const localVarOperationServerBasePath = operationServerMap["SchemasApi.v4SchemasSchemaIdDelete"]?.[localVarOperationServerIndex]?.url;
2677
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
2258
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
2678
2259
  },
2679
2260
  /**
2680
2261
  * Retrieve a specific schema by its unique identifier
@@ -2687,7 +2268,7 @@ var SchemasApiFp = function(configuration) {
2687
2268
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4SchemasSchemaIdGet(schemaId, options);
2688
2269
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2689
2270
  const localVarOperationServerBasePath = operationServerMap["SchemasApi.v4SchemasSchemaIdGet"]?.[localVarOperationServerIndex]?.url;
2690
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
2271
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
2691
2272
  },
2692
2273
  /**
2693
2274
  * Update schema metadata or create a new revision with updated fields
@@ -2701,7 +2282,7 @@ var SchemasApiFp = function(configuration) {
2701
2282
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4SchemasSchemaIdPut(schemaId, updateSchemaBody, options);
2702
2283
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2703
2284
  const localVarOperationServerBasePath = operationServerMap["SchemasApi.v4SchemasSchemaIdPut"]?.[localVarOperationServerIndex]?.url;
2704
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
2285
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
2705
2286
  }
2706
2287
  };
2707
2288
  };
@@ -2859,12 +2440,13 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
2859
2440
  * @param {V4WorkflowsGetMonitoringEnum} [monitoring] Filter workflows by monitoring status
2860
2441
  * @param {V4WorkflowsGetUpdateIntervalEnum} [updateInterval] Filter workflows by update interval
2861
2442
  * @param {string} [templateId] Filter workflows by template ID (DEPRECATED - templates replaced by schemas)
2443
+ * @param {string} [userId] Filter workflows by user ID (only works in team context)
2862
2444
  * @param {V4WorkflowsGetIncludeDeletedEnum} [includeDeleted] Include deleted workflows (for compliance officers)
2863
2445
  * @param {V4WorkflowsGetFormatEnum} [format] Response format (json or csv for export)
2864
2446
  * @param {*} [options] Override http request option.
2865
2447
  * @throws {RequiredError}
2866
2448
  */
2867
- v4WorkflowsGet: async (search, skip, limit, state, tags, monitoring, updateInterval, templateId, includeDeleted, format, options = {}) => {
2449
+ v4WorkflowsGet: async (search, skip, limit, state, tags, monitoring, updateInterval, templateId, userId, includeDeleted, format, options = {}) => {
2868
2450
  const localVarPath = `/v4/workflows`;
2869
2451
  const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
2870
2452
  let baseOptions;
@@ -2899,6 +2481,9 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
2899
2481
  if (templateId !== void 0) {
2900
2482
  localVarQueryParameter["templateId"] = templateId;
2901
2483
  }
2484
+ if (userId !== void 0) {
2485
+ localVarQueryParameter["userId"] = userId;
2486
+ }
2902
2487
  if (includeDeleted !== void 0) {
2903
2488
  localVarQueryParameter["includeDeleted"] = includeDeleted;
2904
2489
  }
@@ -3481,124 +3066,6 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
3481
3066
  options: localVarRequestOptions
3482
3067
  };
3483
3068
  },
3484
- /**
3485
- * Permanently deletes a workflow and its associated tags
3486
- * @summary Delete a workflow
3487
- * @param {string} id The ID of the workflow to delete
3488
- * @param {*} [options] Override http request option.
3489
- * @throws {RequiredError}
3490
- */
3491
- v5WorkflowsIdDelete: async (id, options = {}) => {
3492
- assertParamExists("v5WorkflowsIdDelete", "id", id);
3493
- const localVarPath = `/v5/workflows/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
3494
- const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
3495
- let baseOptions;
3496
- if (configuration) {
3497
- baseOptions = configuration.baseOptions;
3498
- }
3499
- const localVarRequestOptions = { method: "DELETE", ...baseOptions, ...options };
3500
- const localVarHeaderParameter = {};
3501
- const localVarQueryParameter = {};
3502
- await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
3503
- await setBearerAuthToObject(localVarHeaderParameter, configuration);
3504
- setSearchParams(localVarUrlObj, localVarQueryParameter);
3505
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3506
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
3507
- return {
3508
- url: toPathString(localVarUrlObj),
3509
- options: localVarRequestOptions
3510
- };
3511
- },
3512
- /**
3513
- * Retrieves a specific workflow and its associated tags by ID
3514
- * @summary Get workflow by ID
3515
- * @param {string} id The ID of the workflow to retrieve
3516
- * @param {*} [options] Override http request option.
3517
- * @throws {RequiredError}
3518
- */
3519
- v5WorkflowsIdGet: async (id, options = {}) => {
3520
- assertParamExists("v5WorkflowsIdGet", "id", id);
3521
- const localVarPath = `/v5/workflows/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
3522
- const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
3523
- let baseOptions;
3524
- if (configuration) {
3525
- baseOptions = configuration.baseOptions;
3526
- }
3527
- const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
3528
- const localVarHeaderParameter = {};
3529
- const localVarQueryParameter = {};
3530
- await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
3531
- await setBearerAuthToObject(localVarHeaderParameter, configuration);
3532
- setSearchParams(localVarUrlObj, localVarQueryParameter);
3533
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3534
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
3535
- return {
3536
- url: toPathString(localVarUrlObj),
3537
- options: localVarRequestOptions
3538
- };
3539
- },
3540
- /**
3541
- * Updates an existing workflow\'s properties
3542
- * @summary Update a workflow
3543
- * @param {string} id The ID of the workflow to update
3544
- * @param {V5WorkflowsIdPutRequest} v5WorkflowsIdPutRequest
3545
- * @param {*} [options] Override http request option.
3546
- * @throws {RequiredError}
3547
- */
3548
- v5WorkflowsIdPut: async (id, v5WorkflowsIdPutRequest, options = {}) => {
3549
- assertParamExists("v5WorkflowsIdPut", "id", id);
3550
- assertParamExists("v5WorkflowsIdPut", "v5WorkflowsIdPutRequest", v5WorkflowsIdPutRequest);
3551
- const localVarPath = `/v5/workflows/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
3552
- const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
3553
- let baseOptions;
3554
- if (configuration) {
3555
- baseOptions = configuration.baseOptions;
3556
- }
3557
- const localVarRequestOptions = { method: "PUT", ...baseOptions, ...options };
3558
- const localVarHeaderParameter = {};
3559
- const localVarQueryParameter = {};
3560
- await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
3561
- await setBearerAuthToObject(localVarHeaderParameter, configuration);
3562
- localVarHeaderParameter["Content-Type"] = "application/json";
3563
- setSearchParams(localVarUrlObj, localVarQueryParameter);
3564
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3565
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
3566
- localVarRequestOptions.data = serializeDataIfNeeded(v5WorkflowsIdPutRequest, localVarRequestOptions, configuration);
3567
- return {
3568
- url: toPathString(localVarUrlObj),
3569
- options: localVarRequestOptions
3570
- };
3571
- },
3572
- /**
3573
- * Creates a new workflow in pending state
3574
- * @summary Create a new workflow
3575
- * @param {V5WorkflowsPostRequest} v5WorkflowsPostRequest
3576
- * @param {*} [options] Override http request option.
3577
- * @throws {RequiredError}
3578
- */
3579
- v5WorkflowsPost: async (v5WorkflowsPostRequest, options = {}) => {
3580
- assertParamExists("v5WorkflowsPost", "v5WorkflowsPostRequest", v5WorkflowsPostRequest);
3581
- const localVarPath = `/v5/workflows`;
3582
- const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
3583
- let baseOptions;
3584
- if (configuration) {
3585
- baseOptions = configuration.baseOptions;
3586
- }
3587
- const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
3588
- const localVarHeaderParameter = {};
3589
- const localVarQueryParameter = {};
3590
- await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
3591
- await setBearerAuthToObject(localVarHeaderParameter, configuration);
3592
- localVarHeaderParameter["Content-Type"] = "application/json";
3593
- setSearchParams(localVarUrlObj, localVarQueryParameter);
3594
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3595
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
3596
- localVarRequestOptions.data = serializeDataIfNeeded(v5WorkflowsPostRequest, localVarRequestOptions, configuration);
3597
- return {
3598
- url: toPathString(localVarUrlObj),
3599
- options: localVarRequestOptions
3600
- };
3601
- },
3602
3069
  /**
3603
3070
  *
3604
3071
  * @summary Get workflow audit log entries
@@ -3661,7 +3128,7 @@ var WorkflowsApiFp = function(configuration) {
3661
3128
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4ChangesChangeIdGet(changeId, xApiKey, authorization, options);
3662
3129
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3663
3130
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4ChangesChangeIdGet"]?.[localVarOperationServerIndex]?.url;
3664
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3131
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3665
3132
  },
3666
3133
  /**
3667
3134
  *
@@ -3680,7 +3147,7 @@ var WorkflowsApiFp = function(configuration) {
3680
3147
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4ChangesGet(xApiKey, authorization, workflowIds, startDate, endDate, skip, limit, options);
3681
3148
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3682
3149
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4ChangesGet"]?.[localVarOperationServerIndex]?.url;
3683
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3150
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3684
3151
  },
3685
3152
  /**
3686
3153
  * Retrieves a list of workflows with pagination and search capabilities
@@ -3693,16 +3160,17 @@ var WorkflowsApiFp = function(configuration) {
3693
3160
  * @param {V4WorkflowsGetMonitoringEnum} [monitoring] Filter workflows by monitoring status
3694
3161
  * @param {V4WorkflowsGetUpdateIntervalEnum} [updateInterval] Filter workflows by update interval
3695
3162
  * @param {string} [templateId] Filter workflows by template ID (DEPRECATED - templates replaced by schemas)
3163
+ * @param {string} [userId] Filter workflows by user ID (only works in team context)
3696
3164
  * @param {V4WorkflowsGetIncludeDeletedEnum} [includeDeleted] Include deleted workflows (for compliance officers)
3697
3165
  * @param {V4WorkflowsGetFormatEnum} [format] Response format (json or csv for export)
3698
3166
  * @param {*} [options] Override http request option.
3699
3167
  * @throws {RequiredError}
3700
3168
  */
3701
- async v4WorkflowsGet(search, skip, limit, state, tags, monitoring, updateInterval, templateId, includeDeleted, format, options) {
3702
- const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsGet(search, skip, limit, state, tags, monitoring, updateInterval, templateId, includeDeleted, format, options);
3169
+ async v4WorkflowsGet(search, skip, limit, state, tags, monitoring, updateInterval, templateId, userId, includeDeleted, format, options) {
3170
+ const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsGet(search, skip, limit, state, tags, monitoring, updateInterval, templateId, userId, includeDeleted, format, options);
3703
3171
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3704
3172
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsGet"]?.[localVarOperationServerIndex]?.url;
3705
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3173
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3706
3174
  },
3707
3175
  /**
3708
3176
  * Create a new workflow with schema, custom fields, or agentic navigation mode
@@ -3715,7 +3183,7 @@ var WorkflowsApiFp = function(configuration) {
3715
3183
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsPost(createWorkflowBody, options);
3716
3184
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3717
3185
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsPost"]?.[localVarOperationServerIndex]?.url;
3718
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3186
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3719
3187
  },
3720
3188
  /**
3721
3189
  *
@@ -3732,7 +3200,7 @@ var WorkflowsApiFp = function(configuration) {
3732
3200
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdAuditlogGet(workflowId, xApiKey, authorization, page, limit, options);
3733
3201
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3734
3202
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdAuditlogGet"]?.[localVarOperationServerIndex]?.url;
3735
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3203
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3736
3204
  },
3737
3205
  /**
3738
3206
  *
@@ -3747,7 +3215,7 @@ var WorkflowsApiFp = function(configuration) {
3747
3215
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdComplianceApprovePut(workflowId, xApiKey, authorization, options);
3748
3216
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3749
3217
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdComplianceApprovePut"]?.[localVarOperationServerIndex]?.url;
3750
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3218
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3751
3219
  },
3752
3220
  /**
3753
3221
  *
@@ -3763,7 +3231,7 @@ var WorkflowsApiFp = function(configuration) {
3763
3231
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdComplianceRejectPut(workflowId, v4WorkflowsWorkflowIdComplianceRejectPutRequest, xApiKey, authorization, options);
3764
3232
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3765
3233
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdComplianceRejectPut"]?.[localVarOperationServerIndex]?.url;
3766
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3234
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3767
3235
  },
3768
3236
  /**
3769
3237
  *
@@ -3788,7 +3256,7 @@ var WorkflowsApiFp = function(configuration) {
3788
3256
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdDataGet(workflowId, xApiKey, authorization, runId, format, sortBy, order, filters, page, limit, gzip, rowIds, includeAnomalies, options);
3789
3257
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3790
3258
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdDataGet"]?.[localVarOperationServerIndex]?.url;
3791
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3259
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3792
3260
  },
3793
3261
  /**
3794
3262
  *
@@ -3801,7 +3269,7 @@ var WorkflowsApiFp = function(configuration) {
3801
3269
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdDelete(workflowId, options);
3802
3270
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3803
3271
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdDelete"]?.[localVarOperationServerIndex]?.url;
3804
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3272
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3805
3273
  },
3806
3274
  /**
3807
3275
  * Retrieves detailed information about a specific workflow. This endpoint requires authentication and proper team access permissions.
@@ -3814,7 +3282,7 @@ var WorkflowsApiFp = function(configuration) {
3814
3282
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdGet(workflowId, options);
3815
3283
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3816
3284
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdGet"]?.[localVarOperationServerIndex]?.url;
3817
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3285
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3818
3286
  },
3819
3287
  /**
3820
3288
  *
@@ -3827,7 +3295,7 @@ var WorkflowsApiFp = function(configuration) {
3827
3295
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdHistoryGet(workflowId, options);
3828
3296
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3829
3297
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdHistoryGet"]?.[localVarOperationServerIndex]?.url;
3830
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3298
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3831
3299
  },
3832
3300
  /**
3833
3301
  *
@@ -3841,7 +3309,7 @@ var WorkflowsApiFp = function(configuration) {
3841
3309
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdJobsJobIdGet(workflowId, jobId, options);
3842
3310
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3843
3311
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdJobsJobIdGet"]?.[localVarOperationServerIndex]?.url;
3844
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3312
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3845
3313
  },
3846
3314
  /**
3847
3315
  *
@@ -3855,7 +3323,7 @@ var WorkflowsApiFp = function(configuration) {
3855
3323
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdMetadataPut(workflowId, v4WorkflowsWorkflowIdMetadataPutRequest, options);
3856
3324
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3857
3325
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdMetadataPut"]?.[localVarOperationServerIndex]?.url;
3858
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3326
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3859
3327
  },
3860
3328
  /**
3861
3329
  *
@@ -3868,7 +3336,7 @@ var WorkflowsApiFp = function(configuration) {
3868
3336
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdPausePut(workflowId, options);
3869
3337
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3870
3338
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdPausePut"]?.[localVarOperationServerIndex]?.url;
3871
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3339
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3872
3340
  },
3873
3341
  /**
3874
3342
  * Resumes a paused, preview, or error workflow. If the user\'s team/organization or any of the user\'s organizations has the COMPLIANCE_REVIEW rule enabled, the workflow will be sent for compliance review instead of being directly activated.
@@ -3881,7 +3349,7 @@ var WorkflowsApiFp = function(configuration) {
3881
3349
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdResumePut(workflowId, options);
3882
3350
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3883
3351
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdResumePut"]?.[localVarOperationServerIndex]?.url;
3884
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3352
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3885
3353
  },
3886
3354
  /**
3887
3355
  *
@@ -3895,7 +3363,7 @@ var WorkflowsApiFp = function(configuration) {
3895
3363
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdRunPut(workflowId, v4WorkflowsWorkflowIdRunPutRequest, options);
3896
3364
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3897
3365
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdRunPut"]?.[localVarOperationServerIndex]?.url;
3898
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3366
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3899
3367
  },
3900
3368
  /**
3901
3369
  *
@@ -3909,7 +3377,7 @@ var WorkflowsApiFp = function(configuration) {
3909
3377
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdSchedulePut(workflowId, v4WorkflowsWorkflowIdSchedulePutRequest, options);
3910
3378
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3911
3379
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdSchedulePut"]?.[localVarOperationServerIndex]?.url;
3912
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3380
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3913
3381
  },
3914
3382
  /**
3915
3383
  *
@@ -3924,7 +3392,7 @@ var WorkflowsApiFp = function(configuration) {
3924
3392
  const localVarAxiosArgs = await localVarAxiosParamCreator.v5ChangesChangeIdGet(changeId, xApiKey, authorization, options);
3925
3393
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3926
3394
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5ChangesChangeIdGet"]?.[localVarOperationServerIndex]?.url;
3927
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3395
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3928
3396
  },
3929
3397
  /**
3930
3398
  *
@@ -3943,60 +3411,7 @@ var WorkflowsApiFp = function(configuration) {
3943
3411
  const localVarAxiosArgs = await localVarAxiosParamCreator.v5ChangesGet(xApiKey, authorization, workflowIds, startDate, endDate, skip, limit, options);
3944
3412
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3945
3413
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5ChangesGet"]?.[localVarOperationServerIndex]?.url;
3946
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3947
- },
3948
- /**
3949
- * Permanently deletes a workflow and its associated tags
3950
- * @summary Delete a workflow
3951
- * @param {string} id The ID of the workflow to delete
3952
- * @param {*} [options] Override http request option.
3953
- * @throws {RequiredError}
3954
- */
3955
- async v5WorkflowsIdDelete(id, options) {
3956
- const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsIdDelete(id, options);
3957
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3958
- const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsIdDelete"]?.[localVarOperationServerIndex]?.url;
3959
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3960
- },
3961
- /**
3962
- * Retrieves a specific workflow and its associated tags by ID
3963
- * @summary Get workflow by ID
3964
- * @param {string} id The ID of the workflow to retrieve
3965
- * @param {*} [options] Override http request option.
3966
- * @throws {RequiredError}
3967
- */
3968
- async v5WorkflowsIdGet(id, options) {
3969
- const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsIdGet(id, options);
3970
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3971
- const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsIdGet"]?.[localVarOperationServerIndex]?.url;
3972
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3973
- },
3974
- /**
3975
- * Updates an existing workflow\'s properties
3976
- * @summary Update a workflow
3977
- * @param {string} id The ID of the workflow to update
3978
- * @param {V5WorkflowsIdPutRequest} v5WorkflowsIdPutRequest
3979
- * @param {*} [options] Override http request option.
3980
- * @throws {RequiredError}
3981
- */
3982
- async v5WorkflowsIdPut(id, v5WorkflowsIdPutRequest, options) {
3983
- const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsIdPut(id, v5WorkflowsIdPutRequest, options);
3984
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3985
- const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsIdPut"]?.[localVarOperationServerIndex]?.url;
3986
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3987
- },
3988
- /**
3989
- * Creates a new workflow in pending state
3990
- * @summary Create a new workflow
3991
- * @param {V5WorkflowsPostRequest} v5WorkflowsPostRequest
3992
- * @param {*} [options] Override http request option.
3993
- * @throws {RequiredError}
3994
- */
3995
- async v5WorkflowsPost(v5WorkflowsPostRequest, options) {
3996
- const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsPost(v5WorkflowsPostRequest, options);
3997
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3998
- const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsPost"]?.[localVarOperationServerIndex]?.url;
3999
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3414
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
4000
3415
  },
4001
3416
  /**
4002
3417
  *
@@ -4013,7 +3428,7 @@ var WorkflowsApiFp = function(configuration) {
4013
3428
  const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsWorkflowIdAuditlogGet(workflowId, xApiKey, authorization, page, limit, options);
4014
3429
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
4015
3430
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsWorkflowIdAuditlogGet"]?.[localVarOperationServerIndex]?.url;
4016
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios5__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
3431
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
4017
3432
  }
4018
3433
  };
4019
3434
  };
@@ -4046,7 +3461,7 @@ var WorkflowsApi = class extends BaseAPI {
4046
3461
  * @throws {RequiredError}
4047
3462
  */
4048
3463
  v4WorkflowsGet(requestParameters = {}, options) {
4049
- return WorkflowsApiFp(this.configuration).v4WorkflowsGet(requestParameters.search, requestParameters.skip, requestParameters.limit, requestParameters.state, requestParameters.tags, requestParameters.monitoring, requestParameters.updateInterval, requestParameters.templateId, requestParameters.includeDeleted, requestParameters.format, options).then((request) => request(this.axios, this.basePath));
3464
+ return WorkflowsApiFp(this.configuration).v4WorkflowsGet(requestParameters.search, requestParameters.skip, requestParameters.limit, requestParameters.state, requestParameters.tags, requestParameters.monitoring, requestParameters.updateInterval, requestParameters.templateId, requestParameters.userId, requestParameters.includeDeleted, requestParameters.format, options).then((request) => request(this.axios, this.basePath));
4050
3465
  }
4051
3466
  /**
4052
3467
  * Create a new workflow with schema, custom fields, or agentic navigation mode
@@ -4188,110 +3603,514 @@ var WorkflowsApi = class extends BaseAPI {
4188
3603
  v4WorkflowsWorkflowIdSchedulePut(requestParameters, options) {
4189
3604
  return WorkflowsApiFp(this.configuration).v4WorkflowsWorkflowIdSchedulePut(requestParameters.workflowId, requestParameters.v4WorkflowsWorkflowIdSchedulePutRequest, options).then((request) => request(this.axios, this.basePath));
4190
3605
  }
4191
- /**
4192
- *
4193
- * @summary Get data change by ID (PostgreSQL)
4194
- * @param {WorkflowsApiV5ChangesChangeIdGetRequest} requestParameters Request parameters.
4195
- * @param {*} [options] Override http request option.
4196
- * @throws {RequiredError}
4197
- */
4198
- v5ChangesChangeIdGet(requestParameters, options) {
4199
- return WorkflowsApiFp(this.configuration).v5ChangesChangeIdGet(requestParameters.changeId, requestParameters.xApiKey, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
3606
+ /**
3607
+ *
3608
+ * @summary Get data change by ID (PostgreSQL)
3609
+ * @param {WorkflowsApiV5ChangesChangeIdGetRequest} requestParameters Request parameters.
3610
+ * @param {*} [options] Override http request option.
3611
+ * @throws {RequiredError}
3612
+ */
3613
+ v5ChangesChangeIdGet(requestParameters, options) {
3614
+ return WorkflowsApiFp(this.configuration).v5ChangesChangeIdGet(requestParameters.changeId, requestParameters.xApiKey, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
3615
+ }
3616
+ /**
3617
+ *
3618
+ * @summary Get all data changes (PostgreSQL)
3619
+ * @param {WorkflowsApiV5ChangesGetRequest} requestParameters Request parameters.
3620
+ * @param {*} [options] Override http request option.
3621
+ * @throws {RequiredError}
3622
+ */
3623
+ v5ChangesGet(requestParameters = {}, options) {
3624
+ return WorkflowsApiFp(this.configuration).v5ChangesGet(requestParameters.xApiKey, requestParameters.authorization, requestParameters.workflowIds, requestParameters.startDate, requestParameters.endDate, requestParameters.skip, requestParameters.limit, options).then((request) => request(this.axios, this.basePath));
3625
+ }
3626
+ /**
3627
+ *
3628
+ * @summary Get workflow audit log entries
3629
+ * @param {WorkflowsApiV5WorkflowsWorkflowIdAuditlogGetRequest} requestParameters Request parameters.
3630
+ * @param {*} [options] Override http request option.
3631
+ * @throws {RequiredError}
3632
+ */
3633
+ v5WorkflowsWorkflowIdAuditlogGet(requestParameters, options) {
3634
+ return WorkflowsApiFp(this.configuration).v5WorkflowsWorkflowIdAuditlogGet(requestParameters.workflowId, requestParameters.xApiKey, requestParameters.authorization, requestParameters.page, requestParameters.limit, options).then((request) => request(this.axios, this.basePath));
3635
+ }
3636
+ };
3637
+
3638
+ // src/generated/configuration.ts
3639
+ var Configuration = class {
3640
+ constructor(param = {}) {
3641
+ this.apiKey = param.apiKey;
3642
+ this.username = param.username;
3643
+ this.password = param.password;
3644
+ this.accessToken = param.accessToken;
3645
+ this.basePath = param.basePath;
3646
+ this.serverIndex = param.serverIndex;
3647
+ this.baseOptions = {
3648
+ ...param.baseOptions,
3649
+ headers: {
3650
+ ...param.baseOptions?.headers
3651
+ }
3652
+ };
3653
+ this.formDataCtor = param.formDataCtor;
3654
+ }
3655
+ /**
3656
+ * Check if the given MIME is a JSON MIME.
3657
+ * JSON MIME examples:
3658
+ * application/json
3659
+ * application/json; charset=UTF8
3660
+ * APPLICATION/JSON
3661
+ * application/vnd.company+json
3662
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
3663
+ * @return True if the given MIME is JSON, false otherwise.
3664
+ */
3665
+ isJsonMime(mime) {
3666
+ const jsonMime = new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$", "i");
3667
+ return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === "application/json-patch+json");
3668
+ }
3669
+ };
3670
+
3671
+ // src/generated/models/data-field.ts
3672
+ var DataFieldDataTypeEnum = {
3673
+ String: "STRING",
3674
+ Number: "NUMBER",
3675
+ Boolean: "BOOLEAN",
3676
+ Date: "DATE",
3677
+ Datetime: "DATETIME",
3678
+ Money: "MONEY",
3679
+ Image: "IMAGE",
3680
+ Link: "LINK",
3681
+ Object: "OBJECT",
3682
+ Array: "ARRAY"
3683
+ };
3684
+
3685
+ // src/domains/extraction/extraction.acl.ts
3686
+ var FetchDataOptions = class {
3687
+ };
3688
+ var CanonicalSchemaFieldDataType = {
3689
+ String: DataFieldDataTypeEnum.String,
3690
+ Number: DataFieldDataTypeEnum.Number,
3691
+ Boolean: DataFieldDataTypeEnum.Boolean,
3692
+ Date: DataFieldDataTypeEnum.Date,
3693
+ Datetime: DataFieldDataTypeEnum.Datetime,
3694
+ Money: DataFieldDataTypeEnum.Money,
3695
+ Image: DataFieldDataTypeEnum.Image,
3696
+ Link: DataFieldDataTypeEnum.Link,
3697
+ Object: DataFieldDataTypeEnum.Object,
3698
+ Array: DataFieldDataTypeEnum.Array
3699
+ };
3700
+ var SchemaFieldDataType = {
3701
+ ...CanonicalSchemaFieldDataType,
3702
+ /** @deprecated use `SchemaFieldDataType.String` */
3703
+ Text: DataFieldDataTypeEnum.String,
3704
+ /** @deprecated use `SchemaFieldDataType.Link` */
3705
+ Url: DataFieldDataTypeEnum.Link
3706
+ };
3707
+
3708
+ // src/runtime/pagination/paginator.ts
3709
+ var PagedIterator = class {
3710
+ constructor(fetchPage) {
3711
+ this.fetchPage = fetchPage;
3712
+ }
3713
+ /**
3714
+ * Fetch all items across all pages
3715
+ * @param options Base options (page will be overridden)
3716
+ * @returns Array of all items
3717
+ */
3718
+ async fetchAll(options = {}) {
3719
+ const allItems = [];
3720
+ let currentPage = 1;
3721
+ let hasMore = true;
3722
+ while (hasMore) {
3723
+ const result = await this.fetchPage({ ...options, page: currentPage });
3724
+ allItems.push(...result.data);
3725
+ const pagination = result.pagination;
3726
+ hasMore = pagination.page !== void 0 && pagination.totalPages !== void 0 && pagination.page < pagination.totalPages;
3727
+ currentPage++;
3728
+ }
3729
+ return allItems;
3730
+ }
3731
+ /**
3732
+ * Create an async iterator for pages
3733
+ * @param options Base options (page will be overridden)
3734
+ * @returns Async generator that yields pages
3735
+ */
3736
+ async *pages(options = {}) {
3737
+ let currentPage = 1;
3738
+ let hasMore = true;
3739
+ while (hasMore) {
3740
+ const result = await this.fetchPage({ ...options, page: currentPage });
3741
+ yield result;
3742
+ const pagination = result.pagination;
3743
+ hasMore = pagination.page !== void 0 && pagination.totalPages !== void 0 && pagination.page < pagination.totalPages;
3744
+ currentPage++;
3745
+ }
3746
+ }
3747
+ /**
3748
+ * Create an async iterator for individual items
3749
+ * @param options Base options (page will be overridden)
3750
+ * @returns Async generator that yields items
3751
+ */
3752
+ async *items(options = {}) {
3753
+ for await (const page of this.pages(options)) {
3754
+ for (const item of page.data) {
3755
+ yield item;
3756
+ }
3757
+ }
3758
+ }
3759
+ };
3760
+
3761
+ // src/domains/extraction/services/data-fetcher.service.ts
3762
+ var DataFetcherService = class {
3763
+ constructor(workflowsApi) {
3764
+ this.workflowsApi = workflowsApi;
3765
+ this.defaultLimit = 100;
3766
+ }
3767
+ /**
3768
+ * Fetch a page of workflow data
3769
+ */
3770
+ async fetchData(options) {
3771
+ const response = await this.workflowsApi.v4WorkflowsWorkflowIdDataGet({
3772
+ ...options,
3773
+ page: options.page ?? 1,
3774
+ limit: options.limit ?? this.defaultLimit
3775
+ });
3776
+ const result = response.data;
3777
+ return result;
3778
+ }
3779
+ /**
3780
+ * Fetch all pages of workflow data
3781
+ */
3782
+ async fetchAllData(options) {
3783
+ const iterator = new PagedIterator(
3784
+ (pageOptions) => this.fetchData({ ...options, ...pageOptions })
3785
+ );
3786
+ return iterator.fetchAll({ limit: options.limit ?? this.defaultLimit });
3787
+ }
3788
+ /**
3789
+ * Create an async iterator for paginated data fetching
3790
+ */
3791
+ async *fetchDataPages(options) {
3792
+ const iterator = new PagedIterator(
3793
+ (pageOptions) => this.fetchData({ ...options, ...pageOptions })
3794
+ );
3795
+ for await (const page of iterator.pages({
3796
+ limit: options.limit ?? this.defaultLimit
3797
+ })) {
3798
+ yield page;
3799
+ }
3800
+ }
3801
+ };
3802
+
3803
+ // src/runtime/exceptions/base.exception.ts
3804
+ var KadoaErrorCode = {
3805
+ AUTH_ERROR: "AUTH_ERROR",
3806
+ VALIDATION_ERROR: "VALIDATION_ERROR",
3807
+ BAD_REQUEST: "BAD_REQUEST",
3808
+ NOT_FOUND: "NOT_FOUND",
3809
+ INTERNAL_ERROR: "INTERNAL_ERROR"
3810
+ };
3811
+ var _KadoaSdkException = class _KadoaSdkException extends Error {
3812
+ constructor(message, options) {
3813
+ super(message);
3814
+ this.name = "KadoaSdkException";
3815
+ this.code = options?.code ?? "UNKNOWN";
3816
+ this.details = options?.details;
3817
+ if (options && "cause" in options) this.cause = options.cause;
3818
+ Error.captureStackTrace?.(this, _KadoaSdkException);
3819
+ }
3820
+ static from(error, details) {
3821
+ if (error instanceof _KadoaSdkException) return error;
3822
+ const message = error instanceof Error ? error.message : typeof error === "string" ? error : "Unexpected error";
3823
+ return new _KadoaSdkException(message, {
3824
+ code: "UNKNOWN",
3825
+ details,
3826
+ cause: error
3827
+ });
3828
+ }
3829
+ toJSON() {
3830
+ return {
3831
+ name: this.name,
3832
+ message: this.message,
3833
+ code: this.code,
3834
+ details: this.details
3835
+ };
3836
+ }
3837
+ toString() {
3838
+ return [this.name, this.code, this.message].filter(Boolean).join(": ");
3839
+ }
3840
+ toDetailedString() {
3841
+ const parts = [`${this.name}: ${this.message}`, `Code: ${this.code}`];
3842
+ if (this.details && Object.keys(this.details).length > 0) {
3843
+ parts.push(`Details: ${JSON.stringify(this.details, null, 2)}`);
3844
+ }
3845
+ if (this.cause) {
3846
+ parts.push(`Cause: ${this.cause}`);
3847
+ }
3848
+ return parts.join("\n");
3849
+ }
3850
+ static isInstance(error) {
3851
+ return error instanceof _KadoaSdkException;
3852
+ }
3853
+ static wrap(error, extra) {
3854
+ if (error instanceof _KadoaSdkException) return error;
3855
+ const message = extra?.message || (error instanceof Error ? error.message : typeof error === "string" ? error : "Unexpected error");
3856
+ return new _KadoaSdkException(message, {
3857
+ code: "UNKNOWN",
3858
+ details: extra?.details,
3859
+ cause: error
3860
+ });
3861
+ }
3862
+ };
3863
+ _KadoaSdkException.ERROR_MESSAGES = {
3864
+ // General errors
3865
+ CONFIG_ERROR: "Invalid configuration provided",
3866
+ AUTH_FAILED: "Authentication failed. Please check your API key",
3867
+ RATE_LIMITED: "Rate limit exceeded. Please try again later",
3868
+ NETWORK_ERROR: "Network error occurred",
3869
+ SERVER_ERROR: "Server error occurred",
3870
+ PARSE_ERROR: "Failed to parse response",
3871
+ BAD_REQUEST: "Bad request",
3872
+ ABORTED: "Aborted",
3873
+ NOT_FOUND: "Not found",
3874
+ // Workflow specific errors
3875
+ NO_WORKFLOW_ID: "Failed to start extraction process - no ID received",
3876
+ WORKFLOW_CREATE_FAILED: "Failed to create workflow",
3877
+ WORKFLOW_TIMEOUT: "Workflow processing timed out",
3878
+ WORKFLOW_UNEXPECTED_STATUS: "Extraction completed with unexpected status",
3879
+ PROGRESS_CHECK_FAILED: "Failed to check extraction progress",
3880
+ DATA_FETCH_FAILED: "Failed to retrieve extracted data from workflow",
3881
+ // Extraction specific errors
3882
+ NO_URLS: "At least one URL is required for extraction",
3883
+ NO_API_KEY: "API key is required for entity detection",
3884
+ LINK_REQUIRED: "Link is required for entity field detection",
3885
+ NO_PREDICTIONS: "No entity predictions returned from the API",
3886
+ EXTRACTION_FAILED: "Data extraction failed for the provided URLs",
3887
+ ENTITY_FETCH_FAILED: "Failed to fetch entity fields",
3888
+ ENTITY_INVARIANT_VIOLATION: "No valid entity provided",
3889
+ // Schema specific errors
3890
+ SCHEMA_NOT_FOUND: "Schema not found",
3891
+ SCHEMA_FETCH_ERROR: "Failed to fetch schema",
3892
+ SCHEMAS_FETCH_ERROR: "Failed to fetch schemas",
3893
+ SCHEMA_CREATE_FAILED: "Failed to create schema",
3894
+ SCHEMA_UPDATE_FAILED: "Failed to update schema",
3895
+ SCHEMA_DELETE_FAILED: "Failed to delete schema"
3896
+ };
3897
+ var KadoaSdkException = _KadoaSdkException;
3898
+ var ERROR_MESSAGES = KadoaSdkException.ERROR_MESSAGES;
3899
+ var KadoaHttpException = class _KadoaHttpException extends KadoaSdkException {
3900
+ constructor(message, options) {
3901
+ super(message, {
3902
+ code: options?.code,
3903
+ details: options?.details,
3904
+ cause: options?.cause
3905
+ });
3906
+ this.name = "KadoaHttpException";
3907
+ this.httpStatus = options?.httpStatus;
3908
+ this.requestId = options?.requestId;
3909
+ this.endpoint = options?.endpoint;
3910
+ this.method = options?.method;
3911
+ this.responseBody = options?.responseBody;
3912
+ }
3913
+ static fromAxiosError(error, extra) {
3914
+ const status = error.response?.status;
3915
+ const requestId = error.response?.headers?.["x-request-id"] || error.response?.headers?.["x-amzn-requestid"];
3916
+ const method = error.config?.method?.toUpperCase();
3917
+ const url = error.config?.url;
3918
+ return new _KadoaHttpException(extra?.message || error.message, {
3919
+ code: _KadoaHttpException.mapStatusToCode(error),
3920
+ httpStatus: status,
3921
+ requestId,
3922
+ endpoint: url,
3923
+ method,
3924
+ responseBody: error.response?.data,
3925
+ details: extra?.details,
3926
+ cause: error
3927
+ });
3928
+ }
3929
+ toJSON() {
3930
+ return {
3931
+ ...super.toJSON(),
3932
+ httpStatus: this.httpStatus,
3933
+ requestId: this.requestId,
3934
+ endpoint: this.endpoint,
3935
+ method: this.method,
3936
+ responseBody: this.responseBody
3937
+ };
3938
+ }
3939
+ toDetailedString() {
3940
+ const parts = [`${this.name}: ${this.message}`, `Code: ${this.code}`];
3941
+ if (this.httpStatus) {
3942
+ parts.push(`HTTP Status: ${this.httpStatus}`);
3943
+ }
3944
+ if (this.method && this.endpoint) {
3945
+ parts.push(`Request: ${this.method} ${this.endpoint}`);
3946
+ }
3947
+ if (this.requestId) {
3948
+ parts.push(`Request ID: ${this.requestId}`);
3949
+ }
3950
+ if (this.responseBody) {
3951
+ parts.push(
3952
+ `Response Body: ${JSON.stringify(this.responseBody, null, 2)}`
3953
+ );
3954
+ }
3955
+ if (this.details && Object.keys(this.details).length > 0) {
3956
+ parts.push(`Details: ${JSON.stringify(this.details, null, 2)}`);
3957
+ }
3958
+ if (this.cause) {
3959
+ parts.push(`Cause: ${this.cause}`);
3960
+ }
3961
+ return parts.join("\n");
3962
+ }
3963
+ static wrap(error, extra) {
3964
+ if (error instanceof _KadoaHttpException) return error;
3965
+ if (error instanceof KadoaSdkException) return error;
3966
+ if (globalAxios2.isAxiosError(error)) {
3967
+ return _KadoaHttpException.fromAxiosError(error, extra);
3968
+ }
3969
+ return KadoaSdkException.wrap(error, extra);
3970
+ }
3971
+ static mapStatusToCode(errorOrStatus) {
3972
+ const status = typeof errorOrStatus === "number" ? errorOrStatus : errorOrStatus.response?.status;
3973
+ if (!status) {
3974
+ if (typeof errorOrStatus === "number") return "UNKNOWN";
3975
+ return errorOrStatus.code === "ECONNABORTED" ? "TIMEOUT" : errorOrStatus.request ? "NETWORK_ERROR" : "UNKNOWN";
3976
+ }
3977
+ if (status === 401 || status === 403) return "AUTH_ERROR";
3978
+ if (status === 404) return "NOT_FOUND";
3979
+ if (status === 408) return "TIMEOUT";
3980
+ if (status === 429) return "RATE_LIMITED";
3981
+ if (status >= 400 && status < 500) return "VALIDATION_ERROR";
3982
+ if (status >= 500) return "HTTP_ERROR";
3983
+ return "UNKNOWN";
4200
3984
  }
4201
- /**
4202
- *
4203
- * @summary Get all data changes (PostgreSQL)
4204
- * @param {WorkflowsApiV5ChangesGetRequest} requestParameters Request parameters.
4205
- * @param {*} [options] Override http request option.
4206
- * @throws {RequiredError}
4207
- */
4208
- v5ChangesGet(requestParameters = {}, options) {
4209
- 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));
3985
+ };
3986
+ var createLogger = (namespace) => createDebug__default.default(`kadoa:${namespace}`);
3987
+ var logger = {
3988
+ client: createLogger("client"),
3989
+ wss: createLogger("wss"),
3990
+ extraction: createLogger("extraction"),
3991
+ http: createLogger("http"),
3992
+ workflow: createLogger("workflow"),
3993
+ crawl: createLogger("crawl"),
3994
+ notifications: createLogger("notifications"),
3995
+ schemas: createLogger("schemas"),
3996
+ validation: createLogger("validation")
3997
+ };
3998
+ var _SchemaBuilder = class _SchemaBuilder {
3999
+ constructor() {
4000
+ this.fields = [];
4210
4001
  }
4211
- /**
4212
- * Permanently deletes a workflow and its associated tags
4213
- * @summary Delete a workflow
4214
- * @param {WorkflowsApiV5WorkflowsIdDeleteRequest} requestParameters Request parameters.
4215
- * @param {*} [options] Override http request option.
4216
- * @throws {RequiredError}
4217
- */
4218
- v5WorkflowsIdDelete(requestParameters, options) {
4219
- return WorkflowsApiFp(this.configuration).v5WorkflowsIdDelete(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
4002
+ hasSchemaFields() {
4003
+ return this.fields.some((field) => field.fieldType === "SCHEMA");
4220
4004
  }
4221
- /**
4222
- * Retrieves a specific workflow and its associated tags by ID
4223
- * @summary Get workflow by ID
4224
- * @param {WorkflowsApiV5WorkflowsIdGetRequest} requestParameters Request parameters.
4225
- * @param {*} [options] Override http request option.
4226
- * @throws {RequiredError}
4227
- */
4228
- v5WorkflowsIdGet(requestParameters, options) {
4229
- return WorkflowsApiFp(this.configuration).v5WorkflowsIdGet(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
4005
+ entity(entityName) {
4006
+ this.entityName = entityName;
4007
+ return this;
4230
4008
  }
4231
4009
  /**
4232
- * Updates an existing workflow\'s properties
4233
- * @summary Update a workflow
4234
- * @param {WorkflowsApiV5WorkflowsIdPutRequest} requestParameters Request parameters.
4235
- * @param {*} [options] Override http request option.
4236
- * @throws {RequiredError}
4010
+ * Add a structured field to the schema
4011
+ * @param name - Field name (alphanumeric only)
4012
+ * @param description - Field description
4013
+ * @param dataType - Data type (STRING, NUMBER, BOOLEAN, etc.)
4014
+ * @param options - Optional field configuration
4237
4015
  */
4238
- v5WorkflowsIdPut(requestParameters, options) {
4239
- return WorkflowsApiFp(this.configuration).v5WorkflowsIdPut(requestParameters.id, requestParameters.v5WorkflowsIdPutRequest, options).then((request) => request(this.axios, this.basePath));
4016
+ field(name, description, dataType, options) {
4017
+ this.validateFieldName(name);
4018
+ const requiresExample = _SchemaBuilder.TYPES_REQUIRING_EXAMPLE.includes(dataType);
4019
+ if (requiresExample && !options?.example) {
4020
+ throw new KadoaSdkException(
4021
+ `Field "${name}" with type ${dataType} requires an example`,
4022
+ { code: "VALIDATION_ERROR", details: { name, dataType } }
4023
+ );
4024
+ }
4025
+ this.fields.push({
4026
+ name,
4027
+ description,
4028
+ dataType,
4029
+ fieldType: "SCHEMA",
4030
+ example: options?.example,
4031
+ isKey: options?.isKey
4032
+ });
4033
+ return this;
4240
4034
  }
4241
4035
  /**
4242
- * Creates a new workflow in pending state
4243
- * @summary Create a new workflow
4244
- * @param {WorkflowsApiV5WorkflowsPostRequest} requestParameters Request parameters.
4245
- * @param {*} [options] Override http request option.
4246
- * @throws {RequiredError}
4036
+ * Add a classification field to categorize content
4037
+ * @param name - Field name (alphanumeric only)
4038
+ * @param description - Field description
4039
+ * @param categories - Array of category definitions
4247
4040
  */
4248
- v5WorkflowsPost(requestParameters, options) {
4249
- return WorkflowsApiFp(this.configuration).v5WorkflowsPost(requestParameters.v5WorkflowsPostRequest, options).then((request) => request(this.axios, this.basePath));
4041
+ classify(name, description, categories) {
4042
+ this.validateFieldName(name);
4043
+ this.fields.push({
4044
+ name,
4045
+ description,
4046
+ fieldType: "CLASSIFICATION",
4047
+ categories
4048
+ });
4049
+ return this;
4250
4050
  }
4251
4051
  /**
4252
- *
4253
- * @summary Get workflow audit log entries
4254
- * @param {WorkflowsApiV5WorkflowsWorkflowIdAuditlogGetRequest} requestParameters Request parameters.
4255
- * @param {*} [options] Override http request option.
4256
- * @throws {RequiredError}
4052
+ * Add raw page content to extract
4053
+ * @param name - Raw content format(s): "html", "markdown", or "url"
4257
4054
  */
4258
- v5WorkflowsWorkflowIdAuditlogGet(requestParameters, options) {
4259
- return WorkflowsApiFp(this.configuration).v5WorkflowsWorkflowIdAuditlogGet(requestParameters.workflowId, requestParameters.xApiKey, requestParameters.authorization, requestParameters.page, requestParameters.limit, options).then((request) => request(this.axios, this.basePath));
4260
- }
4261
- };
4262
-
4263
- // src/generated/configuration.ts
4264
- var Configuration = class {
4265
- constructor(param = {}) {
4266
- this.apiKey = param.apiKey;
4267
- this.username = param.username;
4268
- this.password = param.password;
4269
- this.accessToken = param.accessToken;
4270
- this.basePath = param.basePath;
4271
- this.serverIndex = param.serverIndex;
4272
- this.baseOptions = {
4273
- ...param.baseOptions,
4274
- headers: {
4275
- ...param.baseOptions?.headers
4055
+ raw(name) {
4056
+ const names = Array.isArray(name) ? name : [name];
4057
+ for (const name2 of names) {
4058
+ const fieldName = `raw${esToolkit.upperFirst(esToolkit.camelCase(name2))}`;
4059
+ if (this.fields.some((field) => field.name === fieldName)) {
4060
+ continue;
4276
4061
  }
4062
+ this.fields.push({
4063
+ name: fieldName,
4064
+ description: `Raw page content in ${name2.toUpperCase()} format`,
4065
+ fieldType: "METADATA",
4066
+ metadataKey: name2
4067
+ });
4068
+ }
4069
+ return this;
4070
+ }
4071
+ build() {
4072
+ if (this.hasSchemaFields() && !this.entityName) {
4073
+ throw new KadoaSdkException(
4074
+ "Entity name is required when schema fields are present",
4075
+ {
4076
+ code: "VALIDATION_ERROR",
4077
+ details: { entityName: this.entityName }
4078
+ }
4079
+ );
4080
+ }
4081
+ return {
4082
+ entityName: this.entityName,
4083
+ fields: this.fields
4277
4084
  };
4278
- this.formDataCtor = param.formDataCtor;
4279
4085
  }
4280
- /**
4281
- * Check if the given MIME is a JSON MIME.
4282
- * JSON MIME examples:
4283
- * application/json
4284
- * application/json; charset=UTF8
4285
- * APPLICATION/JSON
4286
- * application/vnd.company+json
4287
- * @param mime - MIME (Multipurpose Internet Mail Extensions)
4288
- * @return True if the given MIME is JSON, false otherwise.
4289
- */
4290
- isJsonMime(mime) {
4291
- const jsonMime = new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$", "i");
4292
- return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === "application/json-patch+json");
4086
+ validateFieldName(name) {
4087
+ if (!_SchemaBuilder.FIELD_NAME_PATTERN.test(name)) {
4088
+ throw new KadoaSdkException(
4089
+ `Field name "${name}" must be alphanumeric only (no underscores or special characters)`,
4090
+ {
4091
+ code: "VALIDATION_ERROR",
4092
+ details: { name, pattern: "^[A-Za-z0-9]+$" }
4093
+ }
4094
+ );
4095
+ }
4096
+ const lowerName = name.toLowerCase();
4097
+ if (this.fields.some((f) => f.name.toLowerCase() === lowerName)) {
4098
+ throw new KadoaSdkException(`Duplicate field name: "${name}"`, {
4099
+ code: "VALIDATION_ERROR",
4100
+ details: { name }
4101
+ });
4102
+ }
4293
4103
  }
4294
4104
  };
4105
+ _SchemaBuilder.FIELD_NAME_PATTERN = /^[A-Za-z0-9]+$/;
4106
+ _SchemaBuilder.TYPES_REQUIRING_EXAMPLE = [
4107
+ "STRING",
4108
+ "IMAGE",
4109
+ "LINK",
4110
+ "OBJECT",
4111
+ "ARRAY"
4112
+ ];
4113
+ var SchemaBuilder = _SchemaBuilder;
4295
4114
 
4296
4115
  // src/domains/schemas/schemas.service.ts
4297
4116
  var debug = logger.schemas;
@@ -4307,15 +4126,28 @@ var SchemasService = class {
4307
4126
  return new class extends SchemaBuilder {
4308
4127
  constructor() {
4309
4128
  super();
4310
- this.entity(entityName);
4129
+ if (entityName) {
4130
+ this.entity(entityName);
4131
+ }
4311
4132
  }
4312
4133
  async create(name) {
4313
4134
  const built = this.build();
4314
- return service.createSchema({
4315
- name: name || built.entityName,
4316
- entity: built.entityName,
4317
- fields: built.fields
4318
- });
4135
+ const schemaName = name ?? built.entityName;
4136
+ if (!schemaName) {
4137
+ throw new KadoaSdkException(
4138
+ "Schema name is required when entity name is not provided",
4139
+ {
4140
+ code: "VALIDATION_ERROR",
4141
+ details: { name }
4142
+ }
4143
+ );
4144
+ }
4145
+ const createSchemaBody = {
4146
+ name: schemaName,
4147
+ fields: built.fields,
4148
+ ...built.entityName ? { entity: built.entityName } : {}
4149
+ };
4150
+ return service.createSchema(createSchemaBody);
4319
4151
  }
4320
4152
  }();
4321
4153
  }
@@ -4409,10 +4241,12 @@ var EntityResolverService = class {
4409
4241
  const entityPrediction = await this.fetchEntityFields({
4410
4242
  link: options.link,
4411
4243
  location: options.location,
4412
- navigationMode: options.navigationMode
4244
+ navigationMode: options.navigationMode,
4245
+ selectorMode: options.selectorMode ?? false
4413
4246
  });
4247
+ const entity = entityPrediction.entity;
4414
4248
  return {
4415
- entity: entityPrediction.entity,
4249
+ entity,
4416
4250
  fields: entityPrediction.fields
4417
4251
  };
4418
4252
  } else if (entityConfig) {
@@ -4421,10 +4255,10 @@ var EntityResolverService = class {
4421
4255
  entityConfig.schemaId
4422
4256
  );
4423
4257
  return {
4424
- entity: schema.entity ?? "",
4258
+ entity: schema.entity ?? void 0,
4425
4259
  fields: schema.schema
4426
4260
  };
4427
- } else if ("name" in entityConfig && "fields" in entityConfig) {
4261
+ } else if ("fields" in entityConfig) {
4428
4262
  return {
4429
4263
  entity: entityConfig.name,
4430
4264
  fields: entityConfig.fields
@@ -4570,6 +4404,18 @@ var ExtractionService = class {
4570
4404
  DEFAULT_OPTIONS,
4571
4405
  options
4572
4406
  );
4407
+ const isRealTime = config.interval === "REAL_TIME";
4408
+ if (isRealTime) {
4409
+ throw new KadoaSdkException(
4410
+ "extraction.run()/submit() are not supported for real-time workflows. Use the builder API, call waitForReady(), and subscribe via client.realtime.onEvent(...).",
4411
+ {
4412
+ code: "BAD_REQUEST",
4413
+ details: {
4414
+ interval: "REAL_TIME"
4415
+ }
4416
+ }
4417
+ );
4418
+ }
4573
4419
  let workflowId;
4574
4420
  const resolvedEntity = await this.entityResolverService.resolveEntity(
4575
4421
  options.entity || "ai-detection",
@@ -4580,11 +4426,12 @@ var ExtractionService = class {
4580
4426
  }
4581
4427
  );
4582
4428
  const hasNotifications = !!config.notifications;
4583
- const result = await this.workflowsCoreService.create({
4429
+ const workflowRequest = {
4584
4430
  ...config,
4585
- entity: resolvedEntity.entity,
4586
- fields: resolvedEntity.fields
4587
- });
4431
+ fields: resolvedEntity.fields,
4432
+ ...resolvedEntity.entity !== void 0 ? { entity: resolvedEntity.entity } : {}
4433
+ };
4434
+ const result = await this.workflowsCoreService.create(workflowRequest);
4588
4435
  workflowId = result.id;
4589
4436
  if (hasNotifications) {
4590
4437
  const result2 = await this.notificationSetupService.setup({
@@ -4717,7 +4564,9 @@ var ExtractionBuilderService = class {
4717
4564
  name,
4718
4565
  description,
4719
4566
  navigationMode,
4720
- extraction
4567
+ extraction,
4568
+ additionalData,
4569
+ bypassPreview
4721
4570
  }) {
4722
4571
  let entity = "ai-detection";
4723
4572
  if (extraction) {
@@ -4726,7 +4575,7 @@ var ExtractionBuilderService = class {
4726
4575
  entity = { schemaId: result.schemaId };
4727
4576
  } else {
4728
4577
  const builtSchema = result.build();
4729
- entity = { name: builtSchema.entityName, fields: builtSchema.fields };
4578
+ entity = builtSchema.entityName ? { name: builtSchema.entityName, fields: builtSchema.fields } : { fields: builtSchema.fields };
4730
4579
  }
4731
4580
  }
4732
4581
  this._options = {
@@ -4735,7 +4584,8 @@ var ExtractionBuilderService = class {
4735
4584
  description,
4736
4585
  navigationMode: navigationMode || "single-page",
4737
4586
  entity,
4738
- bypassPreview: false
4587
+ bypassPreview: bypassPreview ?? false,
4588
+ additionalData
4739
4589
  };
4740
4590
  return this;
4741
4591
  }
@@ -4770,17 +4620,17 @@ var ExtractionBuilderService = class {
4770
4620
  async create() {
4771
4621
  assert__default.default(this._options, "Options are not set");
4772
4622
  const { urls, name, description, navigationMode, entity } = this.options;
4773
- const resolvedEntity = typeof entity === "object" && "schemaId" in entity ? void 0 : await this.entityResolverService.resolveEntity(entity, {
4774
- link: urls[0],
4775
- location: this._options.location,
4776
- navigationMode
4777
- });
4778
- if (!resolvedEntity) {
4779
- throw new KadoaSdkException(ERROR_MESSAGES.ENTITY_FETCH_FAILED, {
4780
- code: "VALIDATION_ERROR",
4781
- details: { entity }
4782
- });
4783
- }
4623
+ const isRealTime = this._options.interval === "REAL_TIME";
4624
+ const useSelectorMode = isRealTime && entity === "ai-detection";
4625
+ const resolvedEntity = await this.entityResolverService.resolveEntity(
4626
+ entity,
4627
+ {
4628
+ link: urls[0],
4629
+ location: this._options.location,
4630
+ navigationMode,
4631
+ selectorMode: useSelectorMode
4632
+ }
4633
+ );
4784
4634
  const workflow = await this.workflowsCoreService.create({
4785
4635
  urls,
4786
4636
  name,
@@ -4792,7 +4642,9 @@ var ExtractionBuilderService = class {
4792
4642
  fields: resolvedEntity.fields,
4793
4643
  autoStart: false,
4794
4644
  interval: this._options.interval,
4795
- schedules: this._options.schedules
4645
+ schedules: this._options.schedules,
4646
+ additionalData: this._options.additionalData,
4647
+ bypassPreview: this._options.bypassPreview
4796
4648
  });
4797
4649
  if (this._notificationOptions) {
4798
4650
  await this.notificationSetupService.setup({
@@ -4803,9 +4655,35 @@ var ExtractionBuilderService = class {
4803
4655
  this._workflowId = workflow.id;
4804
4656
  return this;
4805
4657
  }
4658
+ async waitForReady(options) {
4659
+ assert__default.default(this._workflowId, "Workflow ID is not set");
4660
+ const targetState = options?.targetState ?? "PREVIEW";
4661
+ const current = await this.workflowsCoreService.get(this._workflowId);
4662
+ if (current.state === targetState || targetState === "PREVIEW" && current.state === "ACTIVE") {
4663
+ return current;
4664
+ }
4665
+ const workflow = await this.workflowsCoreService.wait(this._workflowId, {
4666
+ targetState,
4667
+ pollIntervalMs: options?.pollIntervalMs,
4668
+ timeoutMs: options?.timeoutMs
4669
+ });
4670
+ return workflow;
4671
+ }
4806
4672
  async run(options) {
4807
4673
  assert__default.default(this._options, "Options are not set");
4808
4674
  assert__default.default(this._workflowId, "Workflow ID is not set");
4675
+ if (this._options.interval === "REAL_TIME") {
4676
+ throw new KadoaSdkException(
4677
+ "run() is not supported for real-time workflows. Use waitForReady() and subscribe via client.realtime.onEvent(...).",
4678
+ {
4679
+ code: "BAD_REQUEST",
4680
+ details: {
4681
+ interval: "REAL_TIME",
4682
+ workflowId: this._workflowId
4683
+ }
4684
+ }
4685
+ );
4686
+ }
4809
4687
  const startedJob = await this.workflowsCoreService.runWorkflow(
4810
4688
  this._workflowId,
4811
4689
  { variables: options?.variables, limit: options?.limit }
@@ -4823,6 +4701,18 @@ var ExtractionBuilderService = class {
4823
4701
  async submit(options) {
4824
4702
  assert__default.default(this._options, "Options are not set");
4825
4703
  assert__default.default(this._workflowId, "Workflow ID is not set");
4704
+ if (this._options.interval === "REAL_TIME") {
4705
+ throw new KadoaSdkException(
4706
+ "submit() is not supported for real-time workflows. Use waitForReady() and subscribe via client.realtime.onEvent(...).",
4707
+ {
4708
+ code: "BAD_REQUEST",
4709
+ details: {
4710
+ interval: "REAL_TIME",
4711
+ workflowId: this._workflowId
4712
+ }
4713
+ }
4714
+ );
4715
+ }
4826
4716
  const submittedJob = await this.workflowsCoreService.runWorkflow(
4827
4717
  this._workflowId,
4828
4718
  { variables: options?.variables, limit: options?.limit }
@@ -5278,7 +5168,7 @@ var WSS_API_URI = process.env.KADOA_WSS_API_URI ?? "wss://realtime.kadoa.com";
5278
5168
  var REALTIME_API_URI = process.env.KADOA_REALTIME_API_URI ?? "https://realtime.kadoa.com";
5279
5169
 
5280
5170
  // src/version.ts
5281
- var SDK_VERSION = "0.14.1";
5171
+ var SDK_VERSION = "0.16.1";
5282
5172
  var SDK_NAME = "kadoa-node-sdk";
5283
5173
  var SDK_LANGUAGE = "node";
5284
5174
 
@@ -5545,6 +5435,28 @@ async function pollUntil(pollFn, isComplete, options = {}) {
5545
5435
  );
5546
5436
  }
5547
5437
 
5438
+ // src/runtime/utils/validation.ts
5439
+ function validateAdditionalData(additionalData) {
5440
+ if (additionalData === void 0) return;
5441
+ if (additionalData === null || typeof additionalData !== "object" || Array.isArray(additionalData)) {
5442
+ throw new KadoaSdkException("additionalData must be a plain object", {
5443
+ code: "VALIDATION_ERROR"
5444
+ });
5445
+ }
5446
+ try {
5447
+ const serialized = JSON.stringify(additionalData);
5448
+ if (serialized.length > 100 * 1024) {
5449
+ console.warn(
5450
+ "[Kadoa SDK] additionalData exceeds 100KB, consider reducing size"
5451
+ );
5452
+ }
5453
+ } catch {
5454
+ throw new KadoaSdkException("additionalData must be JSON-serializable", {
5455
+ code: "VALIDATION_ERROR"
5456
+ });
5457
+ }
5458
+ }
5459
+
5548
5460
  // src/domains/validation/validation-core.service.ts
5549
5461
  var ValidationCoreService = class {
5550
5462
  constructor(client) {
@@ -5826,6 +5738,7 @@ var WorkflowsCoreService = class {
5826
5738
  this.workflowsApi = workflowsApi;
5827
5739
  }
5828
5740
  async create(input) {
5741
+ validateAdditionalData(input.additionalData);
5829
5742
  const request = {
5830
5743
  urls: input.urls,
5831
5744
  name: input.name,
@@ -5840,7 +5753,8 @@ var WorkflowsCoreService = class {
5840
5753
  monitoring: input.monitoring,
5841
5754
  location: input.location,
5842
5755
  autoStart: input.autoStart,
5843
- schedules: input.schedules
5756
+ schedules: input.schedules,
5757
+ additionalData: input.additionalData
5844
5758
  };
5845
5759
  const response = await this.workflowsApi.v4WorkflowsPost({
5846
5760
  createWorkflowBody: request
@@ -5872,11 +5786,28 @@ var WorkflowsCoreService = class {
5872
5786
  });
5873
5787
  return response.data?.workflows?.[0];
5874
5788
  }
5789
+ /**
5790
+ * @deprecated Use delete(id) instead.
5791
+ */
5875
5792
  async cancel(id) {
5793
+ console.warn(
5794
+ "[Kadoa SDK] workflow.cancel(id) will be deprecated. Use workflow.delete(id)."
5795
+ );
5796
+ await this.delete(id);
5797
+ }
5798
+ async delete(id) {
5876
5799
  await this.workflowsApi.v4WorkflowsWorkflowIdDelete({
5877
5800
  workflowId: id
5878
5801
  });
5879
5802
  }
5803
+ async update(id, input) {
5804
+ validateAdditionalData(input.additionalData);
5805
+ const response = await this.workflowsApi.v4WorkflowsWorkflowIdMetadataPut({
5806
+ workflowId: id,
5807
+ v4WorkflowsWorkflowIdMetadataPutRequest: input
5808
+ });
5809
+ return response.data;
5810
+ }
5880
5811
  async resume(id) {
5881
5812
  await this.workflowsApi.v4WorkflowsWorkflowIdResumePut({
5882
5813
  workflowId: id
@@ -6012,7 +5943,7 @@ var KadoaClient = class {
6012
5943
  headers
6013
5944
  }
6014
5945
  });
6015
- this._axiosInstance = globalAxios5__default.default.create({
5946
+ this._axiosInstance = globalAxios2__default.default.create({
6016
5947
  timeout: this._timeout,
6017
5948
  headers
6018
5949
  });
@@ -6031,7 +5962,7 @@ var KadoaClient = class {
6031
5962
  return response;
6032
5963
  },
6033
5964
  (error) => {
6034
- if (error instanceof globalAxios5.AxiosError) {
5965
+ if (error instanceof globalAxios2.AxiosError) {
6035
5966
  const status = error.response?.status;
6036
5967
  if (status === 400) {
6037
5968
  throw KadoaHttpException.wrap(error);
@@ -6254,5 +6185,6 @@ exports.ValidationCoreService = ValidationCoreService;
6254
6185
  exports.ValidationRulesService = ValidationRulesService;
6255
6186
  exports.WorkflowsCoreService = WorkflowsCoreService;
6256
6187
  exports.pollUntil = pollUntil;
6188
+ exports.validateAdditionalData = validateAdditionalData;
6257
6189
  //# sourceMappingURL=index.js.map
6258
6190
  //# sourceMappingURL=index.js.map