@kadoa/node-sdk 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -19
- package/dist/index.d.mts +4777 -341
- package/dist/index.d.ts +4777 -341
- package/dist/index.js +1496 -805
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1519 -825
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -2
package/dist/index.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var events = require('events');
|
|
4
|
-
var
|
|
5
|
-
var object = require('es-toolkit/object');
|
|
4
|
+
var globalAxios3 = require('axios');
|
|
6
5
|
var url = require('url');
|
|
7
6
|
|
|
8
7
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
8
|
|
|
10
|
-
var
|
|
9
|
+
var globalAxios3__default = /*#__PURE__*/_interopDefault(globalAxios3);
|
|
11
10
|
|
|
12
|
-
// src/events/
|
|
11
|
+
// src/core/events/event-emitter.ts
|
|
13
12
|
var KadoaEventEmitter = class extends events.EventEmitter {
|
|
14
13
|
/**
|
|
15
14
|
* Emit a typed SDK event
|
|
@@ -50,8 +49,8 @@ var KadoaEventEmitter = class extends events.EventEmitter {
|
|
|
50
49
|
}
|
|
51
50
|
};
|
|
52
51
|
|
|
53
|
-
// src/exceptions/
|
|
54
|
-
var
|
|
52
|
+
// src/core/exceptions/base.exception.ts
|
|
53
|
+
var _KadoaSdkException = class _KadoaSdkException extends Error {
|
|
55
54
|
constructor(message, options) {
|
|
56
55
|
super(message);
|
|
57
56
|
this.name = "KadoaSdkException";
|
|
@@ -80,9 +79,54 @@ var KadoaSdkException = class _KadoaSdkException extends Error {
|
|
|
80
79
|
toString() {
|
|
81
80
|
return [this.name, this.code, this.message].filter(Boolean).join(": ");
|
|
82
81
|
}
|
|
82
|
+
toDetailedString() {
|
|
83
|
+
const parts = [`${this.name}: ${this.message}`, `Code: ${this.code}`];
|
|
84
|
+
if (this.details && Object.keys(this.details).length > 0) {
|
|
85
|
+
parts.push(`Details: ${JSON.stringify(this.details, null, 2)}`);
|
|
86
|
+
}
|
|
87
|
+
if (this.cause) {
|
|
88
|
+
parts.push(`Cause: ${this.cause}`);
|
|
89
|
+
}
|
|
90
|
+
return parts.join("\n");
|
|
91
|
+
}
|
|
92
|
+
static isInstance(error) {
|
|
93
|
+
return error instanceof _KadoaSdkException;
|
|
94
|
+
}
|
|
95
|
+
static wrap(error, extra) {
|
|
96
|
+
if (error instanceof _KadoaSdkException) return error;
|
|
97
|
+
const message = extra?.message || (error instanceof Error ? error.message : typeof error === "string" ? error : "Unexpected error");
|
|
98
|
+
return new _KadoaSdkException(message, {
|
|
99
|
+
code: "UNKNOWN",
|
|
100
|
+
details: extra?.details,
|
|
101
|
+
cause: error
|
|
102
|
+
});
|
|
103
|
+
}
|
|
83
104
|
};
|
|
84
|
-
|
|
85
|
-
//
|
|
105
|
+
_KadoaSdkException.ERROR_MESSAGES = {
|
|
106
|
+
// General errors
|
|
107
|
+
CONFIG_ERROR: "Invalid configuration provided",
|
|
108
|
+
AUTH_FAILED: "Authentication failed. Please check your API key",
|
|
109
|
+
RATE_LIMITED: "Rate limit exceeded. Please try again later",
|
|
110
|
+
NETWORK_ERROR: "Network error occurred",
|
|
111
|
+
SERVER_ERROR: "Server error occurred",
|
|
112
|
+
PARSE_ERROR: "Failed to parse response",
|
|
113
|
+
// Workflow specific errors
|
|
114
|
+
NO_WORKFLOW_ID: "Failed to start extraction process - no ID received",
|
|
115
|
+
WORKFLOW_CREATE_FAILED: "Failed to create workflow",
|
|
116
|
+
WORKFLOW_TIMEOUT: "Workflow processing timed out",
|
|
117
|
+
WORKFLOW_UNEXPECTED_STATUS: "Extraction completed with unexpected status",
|
|
118
|
+
PROGRESS_CHECK_FAILED: "Failed to check extraction progress",
|
|
119
|
+
DATA_FETCH_FAILED: "Failed to retrieve extracted data from workflow",
|
|
120
|
+
// Extraction specific errors
|
|
121
|
+
NO_URLS: "At least one URL is required for extraction",
|
|
122
|
+
NO_API_KEY: "API key is required for entity detection",
|
|
123
|
+
LINK_REQUIRED: "Link is required for entity field detection",
|
|
124
|
+
NO_PREDICTIONS: "No entity predictions returned from the API",
|
|
125
|
+
EXTRACTION_FAILED: "Data extraction failed for the provided URLs",
|
|
126
|
+
ENTITY_FETCH_FAILED: "Failed to fetch entity fields"
|
|
127
|
+
};
|
|
128
|
+
var KadoaSdkException = _KadoaSdkException;
|
|
129
|
+
var ERROR_MESSAGES = KadoaSdkException.ERROR_MESSAGES;
|
|
86
130
|
var KadoaHttpException = class _KadoaHttpException extends KadoaSdkException {
|
|
87
131
|
constructor(message, options) {
|
|
88
132
|
super(message, {
|
|
@@ -123,10 +167,43 @@ var KadoaHttpException = class _KadoaHttpException extends KadoaSdkException {
|
|
|
123
167
|
responseBody: this.responseBody
|
|
124
168
|
};
|
|
125
169
|
}
|
|
126
|
-
|
|
127
|
-
const
|
|
170
|
+
toDetailedString() {
|
|
171
|
+
const parts = [`${this.name}: ${this.message}`, `Code: ${this.code}`];
|
|
172
|
+
if (this.httpStatus) {
|
|
173
|
+
parts.push(`HTTP Status: ${this.httpStatus}`);
|
|
174
|
+
}
|
|
175
|
+
if (this.method && this.endpoint) {
|
|
176
|
+
parts.push(`Request: ${this.method} ${this.endpoint}`);
|
|
177
|
+
}
|
|
178
|
+
if (this.requestId) {
|
|
179
|
+
parts.push(`Request ID: ${this.requestId}`);
|
|
180
|
+
}
|
|
181
|
+
if (this.responseBody) {
|
|
182
|
+
parts.push(
|
|
183
|
+
`Response Body: ${JSON.stringify(this.responseBody, null, 2)}`
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
if (this.details && Object.keys(this.details).length > 0) {
|
|
187
|
+
parts.push(`Details: ${JSON.stringify(this.details, null, 2)}`);
|
|
188
|
+
}
|
|
189
|
+
if (this.cause) {
|
|
190
|
+
parts.push(`Cause: ${this.cause}`);
|
|
191
|
+
}
|
|
192
|
+
return parts.join("\n");
|
|
193
|
+
}
|
|
194
|
+
static wrap(error, extra) {
|
|
195
|
+
if (error instanceof _KadoaHttpException) return error;
|
|
196
|
+
if (error instanceof KadoaSdkException) return error;
|
|
197
|
+
if (globalAxios3.isAxiosError(error)) {
|
|
198
|
+
return _KadoaHttpException.fromAxiosError(error, extra);
|
|
199
|
+
}
|
|
200
|
+
return KadoaSdkException.wrap(error, extra);
|
|
201
|
+
}
|
|
202
|
+
static mapStatusToCode(errorOrStatus) {
|
|
203
|
+
const status = typeof errorOrStatus === "number" ? errorOrStatus : errorOrStatus.response?.status;
|
|
128
204
|
if (!status) {
|
|
129
|
-
|
|
205
|
+
if (typeof errorOrStatus === "number") return "UNKNOWN";
|
|
206
|
+
return errorOrStatus.code === "ECONNABORTED" ? "TIMEOUT" : errorOrStatus.request ? "NETWORK_ERROR" : "UNKNOWN";
|
|
130
207
|
}
|
|
131
208
|
if (status === 401 || status === 403) return "AUTH_ERROR";
|
|
132
209
|
if (status === 404) return "NOT_FOUND";
|
|
@@ -137,56 +214,9 @@ var KadoaHttpException = class _KadoaHttpException extends KadoaSdkException {
|
|
|
137
214
|
return "UNKNOWN";
|
|
138
215
|
}
|
|
139
216
|
};
|
|
140
|
-
function isKadoaSdkException(error) {
|
|
141
|
-
return error instanceof KadoaSdkException;
|
|
142
|
-
}
|
|
143
|
-
function isKadoaHttpException(error) {
|
|
144
|
-
return error instanceof KadoaHttpException;
|
|
145
|
-
}
|
|
146
|
-
function wrapKadoaError(error, extra) {
|
|
147
|
-
if (error instanceof globalAxios2.AxiosError)
|
|
148
|
-
return KadoaHttpException.fromAxiosError(error, extra);
|
|
149
|
-
return KadoaSdkException.from(error, extra?.details);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
// src/extraction/constants.ts
|
|
153
|
-
var DEFAULT_OPTIONS = {
|
|
154
|
-
pollingInterval: 5e3,
|
|
155
|
-
maxWaitTime: 3e5,
|
|
156
|
-
navigationMode: "single-page",
|
|
157
|
-
location: { type: "auto" },
|
|
158
|
-
name: "Untitled Workflow",
|
|
159
|
-
maxRecords: 99999
|
|
160
|
-
};
|
|
161
|
-
var TERMINAL_RUN_STATES = /* @__PURE__ */ new Set([
|
|
162
|
-
"FINISHED",
|
|
163
|
-
"SUCCESS",
|
|
164
|
-
"FAILED",
|
|
165
|
-
"ERROR",
|
|
166
|
-
"STOPPED",
|
|
167
|
-
"CANCELLED"
|
|
168
|
-
]);
|
|
169
|
-
var SUCCESSFUL_RUN_STATES = /* @__PURE__ */ new Set(["FINISHED", "SUCCESS"]);
|
|
170
|
-
var ENTITY_API_ENDPOINT = "/v4/entity";
|
|
171
|
-
var DEFAULT_API_BASE_URL = "https://api.kadoa.com";
|
|
172
|
-
var ERROR_MESSAGES = {
|
|
173
|
-
NO_URLS: "At least one URL is required for extraction",
|
|
174
|
-
NO_API_KEY: "API key is required for entity detection",
|
|
175
|
-
LINK_REQUIRED: "Link is required for entity field detection",
|
|
176
|
-
NO_WORKFLOW_ID: "Failed to start extraction process - no ID received",
|
|
177
|
-
NO_PREDICTIONS: "No entity predictions returned from the API",
|
|
178
|
-
PARSE_ERROR: "Failed to parse entity response",
|
|
179
|
-
NETWORK_ERROR: "Network error while fetching entity fields",
|
|
180
|
-
AUTH_FAILED: "Authentication failed. Please check your API key",
|
|
181
|
-
RATE_LIMITED: "Rate limit exceeded. Please try again later",
|
|
182
|
-
SERVER_ERROR: "Server error while fetching entity fields",
|
|
183
|
-
DATA_FETCH_FAILED: "Failed to retrieve extracted data from workflow",
|
|
184
|
-
PROGRESS_CHECK_FAILED: "Failed to check extraction progress",
|
|
185
|
-
EXTRACTION_FAILED: "Data extraction failed for the provided URLs"
|
|
186
|
-
};
|
|
187
217
|
var BASE_PATH = "https://api.kadoa.com".replace(/\/+$/, "");
|
|
188
218
|
var BaseAPI = class {
|
|
189
|
-
constructor(configuration, basePath = BASE_PATH, axios2 =
|
|
219
|
+
constructor(configuration, basePath = BASE_PATH, axios2 = globalAxios3__default.default) {
|
|
190
220
|
this.basePath = basePath;
|
|
191
221
|
this.axios = axios2;
|
|
192
222
|
if (configuration) {
|
|
@@ -252,179 +282,94 @@ var serializeDataIfNeeded = function(value, requestOptions, configuration) {
|
|
|
252
282
|
var toPathString = function(url) {
|
|
253
283
|
return url.pathname + url.search + url.hash;
|
|
254
284
|
};
|
|
255
|
-
var createRequestFunction = function(axiosArgs,
|
|
256
|
-
return (axios2 =
|
|
285
|
+
var createRequestFunction = function(axiosArgs, globalAxios4, BASE_PATH2, configuration) {
|
|
286
|
+
return (axios2 = globalAxios4, basePath = BASE_PATH2) => {
|
|
257
287
|
const axiosRequestArgs = { ...axiosArgs.options, url: (axios2.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url };
|
|
258
288
|
return axios2.request(axiosRequestArgs);
|
|
259
289
|
};
|
|
260
290
|
};
|
|
261
|
-
var
|
|
291
|
+
var CrawlApiAxiosParamCreator = function(configuration) {
|
|
262
292
|
return {
|
|
263
293
|
/**
|
|
264
|
-
*
|
|
265
|
-
* @summary
|
|
266
|
-
* @param {string}
|
|
267
|
-
* @param {
|
|
268
|
-
* @param {string} [authorization] Bearer token for authorization
|
|
294
|
+
* Pauses a currently active crawling session identified by the provided session ID.
|
|
295
|
+
* @summary Pause an active crawling session
|
|
296
|
+
* @param {string} xApiKey API key for authentication
|
|
297
|
+
* @param {V4CrawlPausePostRequest} v4CrawlPausePostRequest
|
|
269
298
|
* @param {*} [options] Override http request option.
|
|
270
299
|
* @throws {RequiredError}
|
|
271
300
|
*/
|
|
272
|
-
|
|
273
|
-
assertParamExists("
|
|
274
|
-
|
|
301
|
+
v4CrawlPausePost: async (xApiKey, v4CrawlPausePostRequest, options = {}) => {
|
|
302
|
+
assertParamExists("v4CrawlPausePost", "xApiKey", xApiKey);
|
|
303
|
+
assertParamExists("v4CrawlPausePost", "v4CrawlPausePostRequest", v4CrawlPausePostRequest);
|
|
304
|
+
const localVarPath = `/v4/crawl/pause`;
|
|
275
305
|
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
276
306
|
let baseOptions;
|
|
277
307
|
if (configuration) {
|
|
278
308
|
baseOptions = configuration.baseOptions;
|
|
279
309
|
}
|
|
280
|
-
const localVarRequestOptions = { method: "
|
|
310
|
+
const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
|
|
281
311
|
const localVarHeaderParameter = {};
|
|
282
312
|
const localVarQueryParameter = {};
|
|
283
313
|
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
284
|
-
|
|
314
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
285
315
|
if (xApiKey != null) {
|
|
286
316
|
localVarHeaderParameter["x-api-key"] = String(xApiKey);
|
|
287
317
|
}
|
|
288
|
-
if (authorization != null) {
|
|
289
|
-
localVarHeaderParameter["Authorization"] = String(authorization);
|
|
290
|
-
}
|
|
291
318
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
292
319
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
293
320
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
321
|
+
localVarRequestOptions.data = serializeDataIfNeeded(v4CrawlPausePostRequest, localVarRequestOptions, configuration);
|
|
294
322
|
return {
|
|
295
323
|
url: toPathString(localVarUrlObj),
|
|
296
324
|
options: localVarRequestOptions
|
|
297
325
|
};
|
|
298
326
|
},
|
|
299
327
|
/**
|
|
300
|
-
*
|
|
301
|
-
* @summary
|
|
302
|
-
* @param {string}
|
|
303
|
-
* @param {
|
|
304
|
-
* @param {string} [workflowIds] Comma-separated list of workflow IDs. If not provided, returns changes for all ACTIVE workflows
|
|
305
|
-
* @param {string} [startDate] Start date to filter changes (ISO format)
|
|
306
|
-
* @param {string} [endDate] End date to filter changes (ISO format)
|
|
307
|
-
* @param {number} [skip] Number of records to skip for pagination
|
|
308
|
-
* @param {number} [limit] Number of records to return for pagination
|
|
328
|
+
* Initiates a crawling session with the specified URL and optional filters for paths.
|
|
329
|
+
* @summary Start a new crawling session
|
|
330
|
+
* @param {string} xApiKey API key for authentication
|
|
331
|
+
* @param {V4CrawlPostRequest} v4CrawlPostRequest
|
|
309
332
|
* @param {*} [options] Override http request option.
|
|
310
333
|
* @throws {RequiredError}
|
|
311
334
|
*/
|
|
312
|
-
|
|
313
|
-
|
|
335
|
+
v4CrawlPost: async (xApiKey, v4CrawlPostRequest, options = {}) => {
|
|
336
|
+
assertParamExists("v4CrawlPost", "xApiKey", xApiKey);
|
|
337
|
+
assertParamExists("v4CrawlPost", "v4CrawlPostRequest", v4CrawlPostRequest);
|
|
338
|
+
const localVarPath = `/v4/crawl`;
|
|
314
339
|
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
315
340
|
let baseOptions;
|
|
316
341
|
if (configuration) {
|
|
317
342
|
baseOptions = configuration.baseOptions;
|
|
318
343
|
}
|
|
319
|
-
const localVarRequestOptions = { method: "
|
|
344
|
+
const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
|
|
320
345
|
const localVarHeaderParameter = {};
|
|
321
346
|
const localVarQueryParameter = {};
|
|
322
347
|
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
323
|
-
|
|
324
|
-
if (workflowIds !== void 0) {
|
|
325
|
-
localVarQueryParameter["workflowIds"] = workflowIds;
|
|
326
|
-
}
|
|
327
|
-
if (startDate !== void 0) {
|
|
328
|
-
localVarQueryParameter["startDate"] = startDate instanceof Date ? startDate.toISOString() : startDate;
|
|
329
|
-
}
|
|
330
|
-
if (endDate !== void 0) {
|
|
331
|
-
localVarQueryParameter["endDate"] = endDate instanceof Date ? endDate.toISOString() : endDate;
|
|
332
|
-
}
|
|
333
|
-
if (skip !== void 0) {
|
|
334
|
-
localVarQueryParameter["skip"] = skip;
|
|
335
|
-
}
|
|
336
|
-
if (limit !== void 0) {
|
|
337
|
-
localVarQueryParameter["limit"] = limit;
|
|
338
|
-
}
|
|
348
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
339
349
|
if (xApiKey != null) {
|
|
340
350
|
localVarHeaderParameter["x-api-key"] = String(xApiKey);
|
|
341
351
|
}
|
|
342
|
-
if (authorization != null) {
|
|
343
|
-
localVarHeaderParameter["Authorization"] = String(authorization);
|
|
344
|
-
}
|
|
345
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
346
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
347
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
348
|
-
return {
|
|
349
|
-
url: toPathString(localVarUrlObj),
|
|
350
|
-
options: localVarRequestOptions
|
|
351
|
-
};
|
|
352
|
-
},
|
|
353
|
-
/**
|
|
354
|
-
* Retrieves a list of workflows with pagination and search capabilities
|
|
355
|
-
* @summary Get a list of workflows
|
|
356
|
-
* @param {string} [search] Search term to filter workflows by name or URL
|
|
357
|
-
* @param {number} [skip] Number of items to skip
|
|
358
|
-
* @param {number} [limit] Maximum number of items to return
|
|
359
|
-
* @param {V4WorkflowsGetStateEnum} [state] Filter workflows by state
|
|
360
|
-
* @param {Array<string>} [tags] Filter workflows by tags
|
|
361
|
-
* @param {V4WorkflowsGetMonitoringEnum} [monitoring] Filter workflows by monitoring status
|
|
362
|
-
* @param {V4WorkflowsGetUpdateIntervalEnum} [updateInterval] Filter workflows by update interval
|
|
363
|
-
* @param {string} [templateId] Filter workflows by template ID (DEPRECATED - templates replaced by schemas)
|
|
364
|
-
* @param {V4WorkflowsGetIncludeDeletedEnum} [includeDeleted] Include deleted workflows (for compliance officers)
|
|
365
|
-
* @param {V4WorkflowsGetFormatEnum} [format] Response format (json or csv for export)
|
|
366
|
-
* @param {*} [options] Override http request option.
|
|
367
|
-
* @throws {RequiredError}
|
|
368
|
-
*/
|
|
369
|
-
v4WorkflowsGet: async (search, skip, limit, state, tags, monitoring, updateInterval, templateId, includeDeleted, format, options = {}) => {
|
|
370
|
-
const localVarPath = `/v4/workflows`;
|
|
371
|
-
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
372
|
-
let baseOptions;
|
|
373
|
-
if (configuration) {
|
|
374
|
-
baseOptions = configuration.baseOptions;
|
|
375
|
-
}
|
|
376
|
-
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
377
|
-
const localVarHeaderParameter = {};
|
|
378
|
-
const localVarQueryParameter = {};
|
|
379
|
-
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
380
|
-
if (search !== void 0) {
|
|
381
|
-
localVarQueryParameter["search"] = search;
|
|
382
|
-
}
|
|
383
|
-
if (skip !== void 0) {
|
|
384
|
-
localVarQueryParameter["skip"] = skip;
|
|
385
|
-
}
|
|
386
|
-
if (limit !== void 0) {
|
|
387
|
-
localVarQueryParameter["limit"] = limit;
|
|
388
|
-
}
|
|
389
|
-
if (state !== void 0) {
|
|
390
|
-
localVarQueryParameter["state"] = state;
|
|
391
|
-
}
|
|
392
|
-
if (tags) {
|
|
393
|
-
localVarQueryParameter["tags"] = tags;
|
|
394
|
-
}
|
|
395
|
-
if (monitoring !== void 0) {
|
|
396
|
-
localVarQueryParameter["monitoring"] = monitoring;
|
|
397
|
-
}
|
|
398
|
-
if (updateInterval !== void 0) {
|
|
399
|
-
localVarQueryParameter["updateInterval"] = updateInterval;
|
|
400
|
-
}
|
|
401
|
-
if (templateId !== void 0) {
|
|
402
|
-
localVarQueryParameter["templateId"] = templateId;
|
|
403
|
-
}
|
|
404
|
-
if (includeDeleted !== void 0) {
|
|
405
|
-
localVarQueryParameter["includeDeleted"] = includeDeleted;
|
|
406
|
-
}
|
|
407
|
-
if (format !== void 0) {
|
|
408
|
-
localVarQueryParameter["format"] = format;
|
|
409
|
-
}
|
|
410
352
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
411
353
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
412
354
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
355
|
+
localVarRequestOptions.data = serializeDataIfNeeded(v4CrawlPostRequest, localVarRequestOptions, configuration);
|
|
413
356
|
return {
|
|
414
357
|
url: toPathString(localVarUrlObj),
|
|
415
358
|
options: localVarRequestOptions
|
|
416
359
|
};
|
|
417
360
|
},
|
|
418
361
|
/**
|
|
419
|
-
*
|
|
420
|
-
* @summary
|
|
421
|
-
* @param {
|
|
362
|
+
* Resumes a previously paused crawling session identified by the provided session ID.
|
|
363
|
+
* @summary Resume a paused crawling session
|
|
364
|
+
* @param {string} xApiKey API key for authentication
|
|
365
|
+
* @param {V4CrawlResumePostRequest} v4CrawlResumePostRequest
|
|
422
366
|
* @param {*} [options] Override http request option.
|
|
423
367
|
* @throws {RequiredError}
|
|
424
368
|
*/
|
|
425
|
-
|
|
426
|
-
assertParamExists("
|
|
427
|
-
|
|
369
|
+
v4CrawlResumePost: async (xApiKey, v4CrawlResumePostRequest, options = {}) => {
|
|
370
|
+
assertParamExists("v4CrawlResumePost", "xApiKey", xApiKey);
|
|
371
|
+
assertParamExists("v4CrawlResumePost", "v4CrawlResumePostRequest", v4CrawlResumePostRequest);
|
|
372
|
+
const localVarPath = `/v4/crawl/resume`;
|
|
428
373
|
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
429
374
|
let baseOptions;
|
|
430
375
|
if (configuration) {
|
|
@@ -434,89 +379,109 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
|
434
379
|
const localVarHeaderParameter = {};
|
|
435
380
|
const localVarQueryParameter = {};
|
|
436
381
|
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
437
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
438
382
|
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
383
|
+
if (xApiKey != null) {
|
|
384
|
+
localVarHeaderParameter["x-api-key"] = String(xApiKey);
|
|
385
|
+
}
|
|
439
386
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
440
387
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
441
388
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
442
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
389
|
+
localVarRequestOptions.data = serializeDataIfNeeded(v4CrawlResumePostRequest, localVarRequestOptions, configuration);
|
|
443
390
|
return {
|
|
444
391
|
url: toPathString(localVarUrlObj),
|
|
445
392
|
options: localVarRequestOptions
|
|
446
393
|
};
|
|
447
394
|
},
|
|
448
395
|
/**
|
|
449
|
-
*
|
|
450
|
-
* @summary
|
|
451
|
-
* @param {
|
|
396
|
+
* Fetches paginated data of crawled pages for a specific crawling session.
|
|
397
|
+
* @summary Retrieve crawled pages from a crawling session
|
|
398
|
+
* @param {string} xApiKey API key for authentication
|
|
399
|
+
* @param {string} sessionId Unique ID of the crawling session
|
|
400
|
+
* @param {number} [currentPage] Current page number for pagination
|
|
401
|
+
* @param {number} [pageSize] Number of items per page for pagination
|
|
452
402
|
* @param {*} [options] Override http request option.
|
|
453
403
|
* @throws {RequiredError}
|
|
454
404
|
*/
|
|
455
|
-
|
|
456
|
-
assertParamExists("
|
|
457
|
-
|
|
405
|
+
v4CrawlSessionIdPagesGet: async (xApiKey, sessionId, currentPage, pageSize, options = {}) => {
|
|
406
|
+
assertParamExists("v4CrawlSessionIdPagesGet", "xApiKey", xApiKey);
|
|
407
|
+
assertParamExists("v4CrawlSessionIdPagesGet", "sessionId", sessionId);
|
|
408
|
+
const localVarPath = `/v4/crawl/{sessionId}/pages`.replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId)));
|
|
458
409
|
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
459
410
|
let baseOptions;
|
|
460
411
|
if (configuration) {
|
|
461
412
|
baseOptions = configuration.baseOptions;
|
|
462
413
|
}
|
|
463
|
-
const localVarRequestOptions = { method: "
|
|
414
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
464
415
|
const localVarHeaderParameter = {};
|
|
465
416
|
const localVarQueryParameter = {};
|
|
466
417
|
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
467
|
-
|
|
418
|
+
if (currentPage !== void 0) {
|
|
419
|
+
localVarQueryParameter["currentPage"] = currentPage;
|
|
420
|
+
}
|
|
421
|
+
if (pageSize !== void 0) {
|
|
422
|
+
localVarQueryParameter["pageSize"] = pageSize;
|
|
423
|
+
}
|
|
424
|
+
if (xApiKey != null) {
|
|
425
|
+
localVarHeaderParameter["x-api-key"] = String(xApiKey);
|
|
426
|
+
}
|
|
468
427
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
469
428
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
470
429
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
471
|
-
localVarRequestOptions.data = serializeDataIfNeeded(v4WorkflowsSetupEditPostRequest, localVarRequestOptions, configuration);
|
|
472
430
|
return {
|
|
473
431
|
url: toPathString(localVarUrlObj),
|
|
474
432
|
options: localVarRequestOptions
|
|
475
433
|
};
|
|
476
434
|
},
|
|
477
435
|
/**
|
|
478
|
-
*
|
|
479
|
-
* @summary
|
|
480
|
-
* @param {
|
|
436
|
+
* Fetches data for a specific page from a crawling session by page ID, optionally allowing format specification.
|
|
437
|
+
* @summary Retrieve detailed data for a specific crawled page
|
|
438
|
+
* @param {string} xApiKey API key for authentication
|
|
439
|
+
* @param {string} sessionId Unique ID of the crawling session
|
|
440
|
+
* @param {string} pageId Unique ID of the crawled page
|
|
441
|
+
* @param {string} [format] Desired format for the page data
|
|
481
442
|
* @param {*} [options] Override http request option.
|
|
482
443
|
* @throws {RequiredError}
|
|
483
444
|
*/
|
|
484
|
-
|
|
485
|
-
assertParamExists("
|
|
486
|
-
|
|
445
|
+
v4CrawlSessionIdPagesPageIdGet: async (xApiKey, sessionId, pageId, format, options = {}) => {
|
|
446
|
+
assertParamExists("v4CrawlSessionIdPagesPageIdGet", "xApiKey", xApiKey);
|
|
447
|
+
assertParamExists("v4CrawlSessionIdPagesPageIdGet", "sessionId", sessionId);
|
|
448
|
+
assertParamExists("v4CrawlSessionIdPagesPageIdGet", "pageId", pageId);
|
|
449
|
+
const localVarPath = `/v4/crawl/{sessionId}/pages/{pageId}`.replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId))).replace(`{${"pageId"}}`, encodeURIComponent(String(pageId)));
|
|
487
450
|
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
488
451
|
let baseOptions;
|
|
489
452
|
if (configuration) {
|
|
490
453
|
baseOptions = configuration.baseOptions;
|
|
491
454
|
}
|
|
492
|
-
const localVarRequestOptions = { method: "
|
|
455
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
493
456
|
const localVarHeaderParameter = {};
|
|
494
457
|
const localVarQueryParameter = {};
|
|
495
458
|
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
496
|
-
|
|
459
|
+
if (format !== void 0) {
|
|
460
|
+
localVarQueryParameter["format"] = format;
|
|
461
|
+
}
|
|
462
|
+
if (xApiKey != null) {
|
|
463
|
+
localVarHeaderParameter["x-api-key"] = String(xApiKey);
|
|
464
|
+
}
|
|
497
465
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
498
466
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
499
467
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
500
|
-
localVarRequestOptions.data = serializeDataIfNeeded(v4WorkflowsSetupPostRequest, localVarRequestOptions, configuration);
|
|
501
468
|
return {
|
|
502
469
|
url: toPathString(localVarUrlObj),
|
|
503
470
|
options: localVarRequestOptions
|
|
504
471
|
};
|
|
505
472
|
},
|
|
506
473
|
/**
|
|
507
|
-
*
|
|
508
|
-
* @summary
|
|
509
|
-
* @param {string}
|
|
510
|
-
* @param {string}
|
|
511
|
-
* @param {string} [authorization] Bearer token for authorization
|
|
512
|
-
* @param {number} [page] Page number for pagination
|
|
513
|
-
* @param {number} [limit] Number of items per page
|
|
474
|
+
* Fetches the current status of a specified crawling session using the session ID.
|
|
475
|
+
* @summary Retrieve the status of a crawling session
|
|
476
|
+
* @param {string} xApiKey API key for authentication
|
|
477
|
+
* @param {string} sessionId Unique ID of the crawling session
|
|
514
478
|
* @param {*} [options] Override http request option.
|
|
515
479
|
* @throws {RequiredError}
|
|
516
480
|
*/
|
|
517
|
-
|
|
518
|
-
assertParamExists("
|
|
519
|
-
|
|
481
|
+
v4CrawlSessionIdStatusGet: async (xApiKey, sessionId, options = {}) => {
|
|
482
|
+
assertParamExists("v4CrawlSessionIdStatusGet", "xApiKey", xApiKey);
|
|
483
|
+
assertParamExists("v4CrawlSessionIdStatusGet", "sessionId", sessionId);
|
|
484
|
+
const localVarPath = `/v4/crawl/{sessionId}/status`.replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId)));
|
|
520
485
|
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
521
486
|
let baseOptions;
|
|
522
487
|
if (configuration) {
|
|
@@ -526,19 +491,9 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
|
526
491
|
const localVarHeaderParameter = {};
|
|
527
492
|
const localVarQueryParameter = {};
|
|
528
493
|
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
529
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
530
|
-
if (page !== void 0) {
|
|
531
|
-
localVarQueryParameter["page"] = page;
|
|
532
|
-
}
|
|
533
|
-
if (limit !== void 0) {
|
|
534
|
-
localVarQueryParameter["limit"] = limit;
|
|
535
|
-
}
|
|
536
494
|
if (xApiKey != null) {
|
|
537
495
|
localVarHeaderParameter["x-api-key"] = String(xApiKey);
|
|
538
496
|
}
|
|
539
|
-
if (authorization != null) {
|
|
540
|
-
localVarHeaderParameter["Authorization"] = String(authorization);
|
|
541
|
-
}
|
|
542
497
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
543
498
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
544
499
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
@@ -546,28 +501,194 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
|
546
501
|
url: toPathString(localVarUrlObj),
|
|
547
502
|
options: localVarRequestOptions
|
|
548
503
|
};
|
|
504
|
+
}
|
|
505
|
+
};
|
|
506
|
+
};
|
|
507
|
+
var CrawlApiFp = function(configuration) {
|
|
508
|
+
const localVarAxiosParamCreator = CrawlApiAxiosParamCreator(configuration);
|
|
509
|
+
return {
|
|
510
|
+
/**
|
|
511
|
+
* Pauses a currently active crawling session identified by the provided session ID.
|
|
512
|
+
* @summary Pause an active crawling session
|
|
513
|
+
* @param {string} xApiKey API key for authentication
|
|
514
|
+
* @param {V4CrawlPausePostRequest} v4CrawlPausePostRequest
|
|
515
|
+
* @param {*} [options] Override http request option.
|
|
516
|
+
* @throws {RequiredError}
|
|
517
|
+
*/
|
|
518
|
+
async v4CrawlPausePost(xApiKey, v4CrawlPausePostRequest, options) {
|
|
519
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.v4CrawlPausePost(xApiKey, v4CrawlPausePostRequest, options);
|
|
520
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
521
|
+
const localVarOperationServerBasePath = operationServerMap["CrawlApi.v4CrawlPausePost"]?.[localVarOperationServerIndex]?.url;
|
|
522
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
549
523
|
},
|
|
550
524
|
/**
|
|
551
|
-
*
|
|
552
|
-
* @summary
|
|
553
|
-
* @param {string}
|
|
554
|
-
* @param {
|
|
555
|
-
* @param {string} [authorization] Bearer token for authorization
|
|
525
|
+
* Initiates a crawling session with the specified URL and optional filters for paths.
|
|
526
|
+
* @summary Start a new crawling session
|
|
527
|
+
* @param {string} xApiKey API key for authentication
|
|
528
|
+
* @param {V4CrawlPostRequest} v4CrawlPostRequest
|
|
556
529
|
* @param {*} [options] Override http request option.
|
|
557
530
|
* @throws {RequiredError}
|
|
558
531
|
*/
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
const
|
|
532
|
+
async v4CrawlPost(xApiKey, v4CrawlPostRequest, options) {
|
|
533
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.v4CrawlPost(xApiKey, v4CrawlPostRequest, options);
|
|
534
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
535
|
+
const localVarOperationServerBasePath = operationServerMap["CrawlApi.v4CrawlPost"]?.[localVarOperationServerIndex]?.url;
|
|
536
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
537
|
+
},
|
|
538
|
+
/**
|
|
539
|
+
* Resumes a previously paused crawling session identified by the provided session ID.
|
|
540
|
+
* @summary Resume a paused crawling session
|
|
541
|
+
* @param {string} xApiKey API key for authentication
|
|
542
|
+
* @param {V4CrawlResumePostRequest} v4CrawlResumePostRequest
|
|
543
|
+
* @param {*} [options] Override http request option.
|
|
544
|
+
* @throws {RequiredError}
|
|
545
|
+
*/
|
|
546
|
+
async v4CrawlResumePost(xApiKey, v4CrawlResumePostRequest, options) {
|
|
547
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.v4CrawlResumePost(xApiKey, v4CrawlResumePostRequest, options);
|
|
548
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
549
|
+
const localVarOperationServerBasePath = operationServerMap["CrawlApi.v4CrawlResumePost"]?.[localVarOperationServerIndex]?.url;
|
|
550
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
551
|
+
},
|
|
552
|
+
/**
|
|
553
|
+
* Fetches paginated data of crawled pages for a specific crawling session.
|
|
554
|
+
* @summary Retrieve crawled pages from a crawling session
|
|
555
|
+
* @param {string} xApiKey API key for authentication
|
|
556
|
+
* @param {string} sessionId Unique ID of the crawling session
|
|
557
|
+
* @param {number} [currentPage] Current page number for pagination
|
|
558
|
+
* @param {number} [pageSize] Number of items per page for pagination
|
|
559
|
+
* @param {*} [options] Override http request option.
|
|
560
|
+
* @throws {RequiredError}
|
|
561
|
+
*/
|
|
562
|
+
async v4CrawlSessionIdPagesGet(xApiKey, sessionId, currentPage, pageSize, options) {
|
|
563
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.v4CrawlSessionIdPagesGet(xApiKey, sessionId, currentPage, pageSize, options);
|
|
564
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
565
|
+
const localVarOperationServerBasePath = operationServerMap["CrawlApi.v4CrawlSessionIdPagesGet"]?.[localVarOperationServerIndex]?.url;
|
|
566
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
567
|
+
},
|
|
568
|
+
/**
|
|
569
|
+
* Fetches data for a specific page from a crawling session by page ID, optionally allowing format specification.
|
|
570
|
+
* @summary Retrieve detailed data for a specific crawled page
|
|
571
|
+
* @param {string} xApiKey API key for authentication
|
|
572
|
+
* @param {string} sessionId Unique ID of the crawling session
|
|
573
|
+
* @param {string} pageId Unique ID of the crawled page
|
|
574
|
+
* @param {string} [format] Desired format for the page data
|
|
575
|
+
* @param {*} [options] Override http request option.
|
|
576
|
+
* @throws {RequiredError}
|
|
577
|
+
*/
|
|
578
|
+
async v4CrawlSessionIdPagesPageIdGet(xApiKey, sessionId, pageId, format, options) {
|
|
579
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.v4CrawlSessionIdPagesPageIdGet(xApiKey, sessionId, pageId, format, options);
|
|
580
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
581
|
+
const localVarOperationServerBasePath = operationServerMap["CrawlApi.v4CrawlSessionIdPagesPageIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
582
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
583
|
+
},
|
|
584
|
+
/**
|
|
585
|
+
* Fetches the current status of a specified crawling session using the session ID.
|
|
586
|
+
* @summary Retrieve the status of a crawling session
|
|
587
|
+
* @param {string} xApiKey API key for authentication
|
|
588
|
+
* @param {string} sessionId Unique ID of the crawling session
|
|
589
|
+
* @param {*} [options] Override http request option.
|
|
590
|
+
* @throws {RequiredError}
|
|
591
|
+
*/
|
|
592
|
+
async v4CrawlSessionIdStatusGet(xApiKey, sessionId, options) {
|
|
593
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.v4CrawlSessionIdStatusGet(xApiKey, sessionId, options);
|
|
594
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
595
|
+
const localVarOperationServerBasePath = operationServerMap["CrawlApi.v4CrawlSessionIdStatusGet"]?.[localVarOperationServerIndex]?.url;
|
|
596
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
597
|
+
}
|
|
598
|
+
};
|
|
599
|
+
};
|
|
600
|
+
var CrawlApi = class extends BaseAPI {
|
|
601
|
+
/**
|
|
602
|
+
* Pauses a currently active crawling session identified by the provided session ID.
|
|
603
|
+
* @summary Pause an active crawling session
|
|
604
|
+
* @param {CrawlApiV4CrawlPausePostRequest} requestParameters Request parameters.
|
|
605
|
+
* @param {*} [options] Override http request option.
|
|
606
|
+
* @throws {RequiredError}
|
|
607
|
+
* @memberof CrawlApi
|
|
608
|
+
*/
|
|
609
|
+
v4CrawlPausePost(requestParameters, options) {
|
|
610
|
+
return CrawlApiFp(this.configuration).v4CrawlPausePost(requestParameters.xApiKey, requestParameters.v4CrawlPausePostRequest, options).then((request) => request(this.axios, this.basePath));
|
|
611
|
+
}
|
|
612
|
+
/**
|
|
613
|
+
* Initiates a crawling session with the specified URL and optional filters for paths.
|
|
614
|
+
* @summary Start a new crawling session
|
|
615
|
+
* @param {CrawlApiV4CrawlPostRequest} requestParameters Request parameters.
|
|
616
|
+
* @param {*} [options] Override http request option.
|
|
617
|
+
* @throws {RequiredError}
|
|
618
|
+
* @memberof CrawlApi
|
|
619
|
+
*/
|
|
620
|
+
v4CrawlPost(requestParameters, options) {
|
|
621
|
+
return CrawlApiFp(this.configuration).v4CrawlPost(requestParameters.xApiKey, requestParameters.v4CrawlPostRequest, options).then((request) => request(this.axios, this.basePath));
|
|
622
|
+
}
|
|
623
|
+
/**
|
|
624
|
+
* Resumes a previously paused crawling session identified by the provided session ID.
|
|
625
|
+
* @summary Resume a paused crawling session
|
|
626
|
+
* @param {CrawlApiV4CrawlResumePostRequest} requestParameters Request parameters.
|
|
627
|
+
* @param {*} [options] Override http request option.
|
|
628
|
+
* @throws {RequiredError}
|
|
629
|
+
* @memberof CrawlApi
|
|
630
|
+
*/
|
|
631
|
+
v4CrawlResumePost(requestParameters, options) {
|
|
632
|
+
return CrawlApiFp(this.configuration).v4CrawlResumePost(requestParameters.xApiKey, requestParameters.v4CrawlResumePostRequest, options).then((request) => request(this.axios, this.basePath));
|
|
633
|
+
}
|
|
634
|
+
/**
|
|
635
|
+
* Fetches paginated data of crawled pages for a specific crawling session.
|
|
636
|
+
* @summary Retrieve crawled pages from a crawling session
|
|
637
|
+
* @param {CrawlApiV4CrawlSessionIdPagesGetRequest} requestParameters Request parameters.
|
|
638
|
+
* @param {*} [options] Override http request option.
|
|
639
|
+
* @throws {RequiredError}
|
|
640
|
+
* @memberof CrawlApi
|
|
641
|
+
*/
|
|
642
|
+
v4CrawlSessionIdPagesGet(requestParameters, options) {
|
|
643
|
+
return CrawlApiFp(this.configuration).v4CrawlSessionIdPagesGet(requestParameters.xApiKey, requestParameters.sessionId, requestParameters.currentPage, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
|
|
644
|
+
}
|
|
645
|
+
/**
|
|
646
|
+
* Fetches data for a specific page from a crawling session by page ID, optionally allowing format specification.
|
|
647
|
+
* @summary Retrieve detailed data for a specific crawled page
|
|
648
|
+
* @param {CrawlApiV4CrawlSessionIdPagesPageIdGetRequest} requestParameters Request parameters.
|
|
649
|
+
* @param {*} [options] Override http request option.
|
|
650
|
+
* @throws {RequiredError}
|
|
651
|
+
* @memberof CrawlApi
|
|
652
|
+
*/
|
|
653
|
+
v4CrawlSessionIdPagesPageIdGet(requestParameters, options) {
|
|
654
|
+
return CrawlApiFp(this.configuration).v4CrawlSessionIdPagesPageIdGet(requestParameters.xApiKey, requestParameters.sessionId, requestParameters.pageId, requestParameters.format, options).then((request) => request(this.axios, this.basePath));
|
|
655
|
+
}
|
|
656
|
+
/**
|
|
657
|
+
* Fetches the current status of a specified crawling session using the session ID.
|
|
658
|
+
* @summary Retrieve the status of a crawling session
|
|
659
|
+
* @param {CrawlApiV4CrawlSessionIdStatusGetRequest} requestParameters Request parameters.
|
|
660
|
+
* @param {*} [options] Override http request option.
|
|
661
|
+
* @throws {RequiredError}
|
|
662
|
+
* @memberof CrawlApi
|
|
663
|
+
*/
|
|
664
|
+
v4CrawlSessionIdStatusGet(requestParameters, options) {
|
|
665
|
+
return CrawlApiFp(this.configuration).v4CrawlSessionIdStatusGet(requestParameters.xApiKey, requestParameters.sessionId, options).then((request) => request(this.axios, this.basePath));
|
|
666
|
+
}
|
|
667
|
+
};
|
|
668
|
+
var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
669
|
+
return {
|
|
670
|
+
/**
|
|
671
|
+
*
|
|
672
|
+
* @summary Get data change by ID
|
|
673
|
+
* @param {string} changeId ID of the workflow change to retrieve
|
|
674
|
+
* @param {string} [xApiKey] API key for authorization
|
|
675
|
+
* @param {string} [authorization] Bearer token for authorization
|
|
676
|
+
* @param {*} [options] Override http request option.
|
|
677
|
+
* @throws {RequiredError}
|
|
678
|
+
*/
|
|
679
|
+
v4ChangesChangeIdGet: async (changeId, xApiKey, authorization, options = {}) => {
|
|
680
|
+
assertParamExists("v4ChangesChangeIdGet", "changeId", changeId);
|
|
681
|
+
const localVarPath = `/v4/changes/{changeId}`.replace(`{${"changeId"}}`, encodeURIComponent(String(changeId)));
|
|
562
682
|
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
563
683
|
let baseOptions;
|
|
564
684
|
if (configuration) {
|
|
565
685
|
baseOptions = configuration.baseOptions;
|
|
566
686
|
}
|
|
567
|
-
const localVarRequestOptions = { method: "
|
|
687
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
568
688
|
const localVarHeaderParameter = {};
|
|
569
689
|
const localVarQueryParameter = {};
|
|
570
690
|
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
691
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
571
692
|
if (xApiKey != null) {
|
|
572
693
|
localVarHeaderParameter["x-api-key"] = String(xApiKey);
|
|
573
694
|
}
|
|
@@ -584,28 +705,44 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
|
584
705
|
},
|
|
585
706
|
/**
|
|
586
707
|
*
|
|
587
|
-
* @summary
|
|
588
|
-
* @param {string} workflowId ID of the workflow to reject
|
|
589
|
-
* @param {V4WorkflowsWorkflowIdComplianceRejectPutRequest} v4WorkflowsWorkflowIdComplianceRejectPutRequest
|
|
708
|
+
* @summary Get all data changes
|
|
590
709
|
* @param {string} [xApiKey] API key for authorization
|
|
591
710
|
* @param {string} [authorization] Bearer token for authorization
|
|
711
|
+
* @param {string} [workflowIds] Comma-separated list of workflow IDs. If not provided, returns changes for all ACTIVE workflows
|
|
712
|
+
* @param {string} [startDate] Start date to filter changes (ISO format)
|
|
713
|
+
* @param {string} [endDate] End date to filter changes (ISO format)
|
|
714
|
+
* @param {number} [skip] Number of records to skip for pagination
|
|
715
|
+
* @param {number} [limit] Number of records to return for pagination
|
|
592
716
|
* @param {*} [options] Override http request option.
|
|
593
717
|
* @throws {RequiredError}
|
|
594
718
|
*/
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
assertParamExists("v4WorkflowsWorkflowIdComplianceRejectPut", "v4WorkflowsWorkflowIdComplianceRejectPutRequest", v4WorkflowsWorkflowIdComplianceRejectPutRequest);
|
|
598
|
-
const localVarPath = `/v4/workflows/{workflowId}/compliance-reject`.replace(`{${"workflowId"}}`, encodeURIComponent(String(workflowId)));
|
|
719
|
+
v4ChangesGet: async (xApiKey, authorization, workflowIds, startDate, endDate, skip, limit, options = {}) => {
|
|
720
|
+
const localVarPath = `/v4/changes`;
|
|
599
721
|
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
600
722
|
let baseOptions;
|
|
601
723
|
if (configuration) {
|
|
602
724
|
baseOptions = configuration.baseOptions;
|
|
603
725
|
}
|
|
604
|
-
const localVarRequestOptions = { method: "
|
|
726
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
605
727
|
const localVarHeaderParameter = {};
|
|
606
728
|
const localVarQueryParameter = {};
|
|
607
729
|
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
608
|
-
localVarHeaderParameter
|
|
730
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
731
|
+
if (workflowIds !== void 0) {
|
|
732
|
+
localVarQueryParameter["workflowIds"] = workflowIds;
|
|
733
|
+
}
|
|
734
|
+
if (startDate !== void 0) {
|
|
735
|
+
localVarQueryParameter["startDate"] = startDate instanceof Date ? startDate.toISOString() : startDate;
|
|
736
|
+
}
|
|
737
|
+
if (endDate !== void 0) {
|
|
738
|
+
localVarQueryParameter["endDate"] = endDate instanceof Date ? endDate.toISOString() : endDate;
|
|
739
|
+
}
|
|
740
|
+
if (skip !== void 0) {
|
|
741
|
+
localVarQueryParameter["skip"] = skip;
|
|
742
|
+
}
|
|
743
|
+
if (limit !== void 0) {
|
|
744
|
+
localVarQueryParameter["limit"] = limit;
|
|
745
|
+
}
|
|
609
746
|
if (xApiKey != null) {
|
|
610
747
|
localVarHeaderParameter["x-api-key"] = String(xApiKey);
|
|
611
748
|
}
|
|
@@ -615,34 +752,29 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
|
615
752
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
616
753
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
617
754
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
618
|
-
localVarRequestOptions.data = serializeDataIfNeeded(v4WorkflowsWorkflowIdComplianceRejectPutRequest, localVarRequestOptions, configuration);
|
|
619
755
|
return {
|
|
620
756
|
url: toPathString(localVarUrlObj),
|
|
621
757
|
options: localVarRequestOptions
|
|
622
758
|
};
|
|
623
759
|
},
|
|
624
760
|
/**
|
|
625
|
-
*
|
|
626
|
-
* @summary Get
|
|
627
|
-
* @param {string}
|
|
628
|
-
* @param {
|
|
629
|
-
* @param {
|
|
630
|
-
* @param {
|
|
631
|
-
* @param {
|
|
632
|
-
* @param {
|
|
633
|
-
* @param {
|
|
634
|
-
* @param {string} [
|
|
635
|
-
* @param {
|
|
636
|
-
* @param {
|
|
637
|
-
* @param {boolean} [gzip] Enable gzip compression for the response
|
|
638
|
-
* @param {string} [rowIds] Filter results by specific row IDs (comma-separated or JSON array)
|
|
639
|
-
* @param {boolean} [includeAnomalies] Include validation anomalies for each row in the response
|
|
761
|
+
* Retrieves a list of workflows with pagination and search capabilities
|
|
762
|
+
* @summary Get a list of workflows
|
|
763
|
+
* @param {string} [search] Search term to filter workflows by name or URL
|
|
764
|
+
* @param {number} [skip] Number of items to skip
|
|
765
|
+
* @param {number} [limit] Maximum number of items to return
|
|
766
|
+
* @param {V4WorkflowsGetStateEnum} [state] Filter workflows by state
|
|
767
|
+
* @param {Array<string>} [tags] Filter workflows by tags
|
|
768
|
+
* @param {V4WorkflowsGetMonitoringEnum} [monitoring] Filter workflows by monitoring status
|
|
769
|
+
* @param {V4WorkflowsGetUpdateIntervalEnum} [updateInterval] Filter workflows by update interval
|
|
770
|
+
* @param {string} [templateId] Filter workflows by template ID (DEPRECATED - templates replaced by schemas)
|
|
771
|
+
* @param {V4WorkflowsGetIncludeDeletedEnum} [includeDeleted] Include deleted workflows (for compliance officers)
|
|
772
|
+
* @param {V4WorkflowsGetFormatEnum} [format] Response format (json or csv for export)
|
|
640
773
|
* @param {*} [options] Override http request option.
|
|
641
774
|
* @throws {RequiredError}
|
|
642
775
|
*/
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
const localVarPath = `/v4/workflows/{workflowId}/data`.replace(`{${"workflowId"}}`, encodeURIComponent(String(workflowId)));
|
|
776
|
+
v4WorkflowsGet: async (search, skip, limit, state, tags, monitoring, updateInterval, templateId, includeDeleted, format, options = {}) => {
|
|
777
|
+
const localVarPath = `/v4/workflows`;
|
|
646
778
|
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
647
779
|
let baseOptions;
|
|
648
780
|
if (configuration) {
|
|
@@ -652,42 +784,35 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
|
652
784
|
const localVarHeaderParameter = {};
|
|
653
785
|
const localVarQueryParameter = {};
|
|
654
786
|
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
localVarQueryParameter["runId"] = runId;
|
|
658
|
-
}
|
|
659
|
-
if (format !== void 0) {
|
|
660
|
-
localVarQueryParameter["format"] = format;
|
|
661
|
-
}
|
|
662
|
-
if (sortBy !== void 0) {
|
|
663
|
-
localVarQueryParameter["sortBy"] = sortBy;
|
|
664
|
-
}
|
|
665
|
-
if (order !== void 0) {
|
|
666
|
-
localVarQueryParameter["order"] = order;
|
|
667
|
-
}
|
|
668
|
-
if (filters !== void 0) {
|
|
669
|
-
localVarQueryParameter["filters"] = filters;
|
|
787
|
+
if (search !== void 0) {
|
|
788
|
+
localVarQueryParameter["search"] = search;
|
|
670
789
|
}
|
|
671
|
-
if (
|
|
672
|
-
localVarQueryParameter["
|
|
790
|
+
if (skip !== void 0) {
|
|
791
|
+
localVarQueryParameter["skip"] = skip;
|
|
673
792
|
}
|
|
674
793
|
if (limit !== void 0) {
|
|
675
794
|
localVarQueryParameter["limit"] = limit;
|
|
676
795
|
}
|
|
677
|
-
if (
|
|
678
|
-
localVarQueryParameter["
|
|
796
|
+
if (state !== void 0) {
|
|
797
|
+
localVarQueryParameter["state"] = state;
|
|
679
798
|
}
|
|
680
|
-
if (
|
|
681
|
-
localVarQueryParameter["
|
|
799
|
+
if (tags) {
|
|
800
|
+
localVarQueryParameter["tags"] = tags;
|
|
682
801
|
}
|
|
683
|
-
if (
|
|
684
|
-
localVarQueryParameter["
|
|
802
|
+
if (monitoring !== void 0) {
|
|
803
|
+
localVarQueryParameter["monitoring"] = monitoring;
|
|
685
804
|
}
|
|
686
|
-
if (
|
|
687
|
-
|
|
805
|
+
if (updateInterval !== void 0) {
|
|
806
|
+
localVarQueryParameter["updateInterval"] = updateInterval;
|
|
688
807
|
}
|
|
689
|
-
if (
|
|
690
|
-
|
|
808
|
+
if (templateId !== void 0) {
|
|
809
|
+
localVarQueryParameter["templateId"] = templateId;
|
|
810
|
+
}
|
|
811
|
+
if (includeDeleted !== void 0) {
|
|
812
|
+
localVarQueryParameter["includeDeleted"] = includeDeleted;
|
|
813
|
+
}
|
|
814
|
+
if (format !== void 0) {
|
|
815
|
+
localVarQueryParameter["format"] = format;
|
|
691
816
|
}
|
|
692
817
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
693
818
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -699,53 +824,58 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
|
699
824
|
},
|
|
700
825
|
/**
|
|
701
826
|
*
|
|
702
|
-
* @summary
|
|
703
|
-
* @param {
|
|
827
|
+
* @summary Create a new workflow
|
|
828
|
+
* @param {V4WorkflowsPostRequest} v4WorkflowsPostRequest
|
|
704
829
|
* @param {*} [options] Override http request option.
|
|
705
830
|
* @throws {RequiredError}
|
|
706
831
|
*/
|
|
707
|
-
|
|
708
|
-
assertParamExists("
|
|
709
|
-
const localVarPath = `/v4/workflows
|
|
832
|
+
v4WorkflowsPost: async (v4WorkflowsPostRequest, options = {}) => {
|
|
833
|
+
assertParamExists("v4WorkflowsPost", "v4WorkflowsPostRequest", v4WorkflowsPostRequest);
|
|
834
|
+
const localVarPath = `/v4/workflows`;
|
|
710
835
|
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
711
836
|
let baseOptions;
|
|
712
837
|
if (configuration) {
|
|
713
838
|
baseOptions = configuration.baseOptions;
|
|
714
839
|
}
|
|
715
|
-
const localVarRequestOptions = { method: "
|
|
840
|
+
const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
|
|
716
841
|
const localVarHeaderParameter = {};
|
|
717
842
|
const localVarQueryParameter = {};
|
|
718
843
|
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
844
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
845
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
719
846
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
720
847
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
721
848
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
849
|
+
localVarRequestOptions.data = serializeDataIfNeeded(v4WorkflowsPostRequest, localVarRequestOptions, configuration);
|
|
722
850
|
return {
|
|
723
851
|
url: toPathString(localVarUrlObj),
|
|
724
852
|
options: localVarRequestOptions
|
|
725
853
|
};
|
|
726
854
|
},
|
|
727
855
|
/**
|
|
728
|
-
*
|
|
729
|
-
* @summary
|
|
730
|
-
* @param {
|
|
856
|
+
*
|
|
857
|
+
* @summary Edit an existing workflow
|
|
858
|
+
* @param {V4WorkflowsSetupEditPostRequest} v4WorkflowsSetupEditPostRequest Updated information to edit an existing workflow
|
|
731
859
|
* @param {*} [options] Override http request option.
|
|
732
860
|
* @throws {RequiredError}
|
|
733
861
|
*/
|
|
734
|
-
|
|
735
|
-
assertParamExists("
|
|
736
|
-
const localVarPath = `/v4/workflows/
|
|
862
|
+
v4WorkflowsSetupEditPost: async (v4WorkflowsSetupEditPostRequest, options = {}) => {
|
|
863
|
+
assertParamExists("v4WorkflowsSetupEditPost", "v4WorkflowsSetupEditPostRequest", v4WorkflowsSetupEditPostRequest);
|
|
864
|
+
const localVarPath = `/v4/workflows/setup/edit`;
|
|
737
865
|
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
738
866
|
let baseOptions;
|
|
739
867
|
if (configuration) {
|
|
740
868
|
baseOptions = configuration.baseOptions;
|
|
741
869
|
}
|
|
742
|
-
const localVarRequestOptions = { method: "
|
|
870
|
+
const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
|
|
743
871
|
const localVarHeaderParameter = {};
|
|
744
872
|
const localVarQueryParameter = {};
|
|
745
873
|
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
874
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
746
875
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
747
876
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
748
877
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
878
|
+
localVarRequestOptions.data = serializeDataIfNeeded(v4WorkflowsSetupEditPostRequest, localVarRequestOptions, configuration);
|
|
749
879
|
return {
|
|
750
880
|
url: toPathString(localVarUrlObj),
|
|
751
881
|
options: localVarRequestOptions
|
|
@@ -753,26 +883,28 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
|
753
883
|
},
|
|
754
884
|
/**
|
|
755
885
|
*
|
|
756
|
-
* @summary
|
|
757
|
-
* @param {
|
|
886
|
+
* @summary Set up a new workflow
|
|
887
|
+
* @param {V4WorkflowsSetupPostRequest} v4WorkflowsSetupPostRequest Required information to set up a new workflow
|
|
758
888
|
* @param {*} [options] Override http request option.
|
|
759
889
|
* @throws {RequiredError}
|
|
760
890
|
*/
|
|
761
|
-
|
|
762
|
-
assertParamExists("
|
|
763
|
-
const localVarPath = `/v4/workflows/
|
|
891
|
+
v4WorkflowsSetupPost: async (v4WorkflowsSetupPostRequest, options = {}) => {
|
|
892
|
+
assertParamExists("v4WorkflowsSetupPost", "v4WorkflowsSetupPostRequest", v4WorkflowsSetupPostRequest);
|
|
893
|
+
const localVarPath = `/v4/workflows/setup`;
|
|
764
894
|
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
765
895
|
let baseOptions;
|
|
766
896
|
if (configuration) {
|
|
767
897
|
baseOptions = configuration.baseOptions;
|
|
768
898
|
}
|
|
769
|
-
const localVarRequestOptions = { method: "
|
|
899
|
+
const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
|
|
770
900
|
const localVarHeaderParameter = {};
|
|
771
901
|
const localVarQueryParameter = {};
|
|
772
902
|
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
903
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
773
904
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
774
905
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
775
906
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
907
|
+
localVarRequestOptions.data = serializeDataIfNeeded(v4WorkflowsSetupPostRequest, localVarRequestOptions, configuration);
|
|
776
908
|
return {
|
|
777
909
|
url: toPathString(localVarUrlObj),
|
|
778
910
|
options: localVarRequestOptions
|
|
@@ -780,30 +912,43 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
|
780
912
|
},
|
|
781
913
|
/**
|
|
782
914
|
*
|
|
783
|
-
* @summary
|
|
784
|
-
* @param {string} workflowId ID of the workflow to
|
|
785
|
-
* @param {
|
|
915
|
+
* @summary Get workflow audit log entries
|
|
916
|
+
* @param {string} workflowId ID of the workflow to retrieve audit logs from
|
|
917
|
+
* @param {string} [xApiKey] API key for authorization
|
|
918
|
+
* @param {string} [authorization] Bearer token for authorization
|
|
919
|
+
* @param {number} [page] Page number for pagination
|
|
920
|
+
* @param {number} [limit] Number of items per page
|
|
786
921
|
* @param {*} [options] Override http request option.
|
|
787
922
|
* @throws {RequiredError}
|
|
788
923
|
*/
|
|
789
|
-
|
|
790
|
-
assertParamExists("
|
|
791
|
-
|
|
792
|
-
const localVarPath = `/v4/workflows/{workflowId}/metadata`.replace(`{${"workflowId"}}`, encodeURIComponent(String(workflowId)));
|
|
924
|
+
v4WorkflowsWorkflowIdAuditlogGet: async (workflowId, xApiKey, authorization, page, limit, options = {}) => {
|
|
925
|
+
assertParamExists("v4WorkflowsWorkflowIdAuditlogGet", "workflowId", workflowId);
|
|
926
|
+
const localVarPath = `/v4/workflows/{workflowId}/auditlog`.replace(`{${"workflowId"}}`, encodeURIComponent(String(workflowId)));
|
|
793
927
|
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
794
928
|
let baseOptions;
|
|
795
929
|
if (configuration) {
|
|
796
930
|
baseOptions = configuration.baseOptions;
|
|
797
931
|
}
|
|
798
|
-
const localVarRequestOptions = { method: "
|
|
932
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
799
933
|
const localVarHeaderParameter = {};
|
|
800
934
|
const localVarQueryParameter = {};
|
|
801
935
|
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
802
|
-
localVarHeaderParameter
|
|
803
|
-
|
|
936
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
937
|
+
if (page !== void 0) {
|
|
938
|
+
localVarQueryParameter["page"] = page;
|
|
939
|
+
}
|
|
940
|
+
if (limit !== void 0) {
|
|
941
|
+
localVarQueryParameter["limit"] = limit;
|
|
942
|
+
}
|
|
943
|
+
if (xApiKey != null) {
|
|
944
|
+
localVarHeaderParameter["x-api-key"] = String(xApiKey);
|
|
945
|
+
}
|
|
946
|
+
if (authorization != null) {
|
|
947
|
+
localVarHeaderParameter["Authorization"] = String(authorization);
|
|
948
|
+
}
|
|
949
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
804
950
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
805
951
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
806
|
-
localVarRequestOptions.data = serializeDataIfNeeded(v4WorkflowsWorkflowIdMetadataPutRequest, localVarRequestOptions, configuration);
|
|
807
952
|
return {
|
|
808
953
|
url: toPathString(localVarUrlObj),
|
|
809
954
|
options: localVarRequestOptions
|
|
@@ -811,14 +956,16 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
|
811
956
|
},
|
|
812
957
|
/**
|
|
813
958
|
*
|
|
814
|
-
* @summary
|
|
815
|
-
* @param {string} workflowId
|
|
959
|
+
* @summary Approve workflow for compliance
|
|
960
|
+
* @param {string} workflowId ID of the workflow to approve
|
|
961
|
+
* @param {string} [xApiKey] API key for authorization
|
|
962
|
+
* @param {string} [authorization] Bearer token for authorization
|
|
816
963
|
* @param {*} [options] Override http request option.
|
|
817
964
|
* @throws {RequiredError}
|
|
818
965
|
*/
|
|
819
|
-
|
|
820
|
-
assertParamExists("
|
|
821
|
-
const localVarPath = `/v4/workflows/{workflowId}/
|
|
966
|
+
v4WorkflowsWorkflowIdComplianceApprovePut: async (workflowId, xApiKey, authorization, options = {}) => {
|
|
967
|
+
assertParamExists("v4WorkflowsWorkflowIdComplianceApprovePut", "workflowId", workflowId);
|
|
968
|
+
const localVarPath = `/v4/workflows/{workflowId}/compliance-approve`.replace(`{${"workflowId"}}`, encodeURIComponent(String(workflowId)));
|
|
822
969
|
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
823
970
|
let baseOptions;
|
|
824
971
|
if (configuration) {
|
|
@@ -828,6 +975,12 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
|
828
975
|
const localVarHeaderParameter = {};
|
|
829
976
|
const localVarQueryParameter = {};
|
|
830
977
|
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
978
|
+
if (xApiKey != null) {
|
|
979
|
+
localVarHeaderParameter["x-api-key"] = String(xApiKey);
|
|
980
|
+
}
|
|
981
|
+
if (authorization != null) {
|
|
982
|
+
localVarHeaderParameter["Authorization"] = String(authorization);
|
|
983
|
+
}
|
|
831
984
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
832
985
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
833
986
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
@@ -837,15 +990,19 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
|
837
990
|
};
|
|
838
991
|
},
|
|
839
992
|
/**
|
|
840
|
-
*
|
|
841
|
-
* @summary
|
|
842
|
-
* @param {string} workflowId
|
|
993
|
+
*
|
|
994
|
+
* @summary Reject workflow for compliance
|
|
995
|
+
* @param {string} workflowId ID of the workflow to reject
|
|
996
|
+
* @param {V4WorkflowsWorkflowIdComplianceRejectPutRequest} v4WorkflowsWorkflowIdComplianceRejectPutRequest
|
|
997
|
+
* @param {string} [xApiKey] API key for authorization
|
|
998
|
+
* @param {string} [authorization] Bearer token for authorization
|
|
843
999
|
* @param {*} [options] Override http request option.
|
|
844
1000
|
* @throws {RequiredError}
|
|
845
1001
|
*/
|
|
846
|
-
|
|
847
|
-
assertParamExists("
|
|
848
|
-
|
|
1002
|
+
v4WorkflowsWorkflowIdComplianceRejectPut: async (workflowId, v4WorkflowsWorkflowIdComplianceRejectPutRequest, xApiKey, authorization, options = {}) => {
|
|
1003
|
+
assertParamExists("v4WorkflowsWorkflowIdComplianceRejectPut", "workflowId", workflowId);
|
|
1004
|
+
assertParamExists("v4WorkflowsWorkflowIdComplianceRejectPut", "v4WorkflowsWorkflowIdComplianceRejectPutRequest", v4WorkflowsWorkflowIdComplianceRejectPutRequest);
|
|
1005
|
+
const localVarPath = `/v4/workflows/{workflowId}/compliance-reject`.replace(`{${"workflowId"}}`, encodeURIComponent(String(workflowId)));
|
|
849
1006
|
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
850
1007
|
let baseOptions;
|
|
851
1008
|
if (configuration) {
|
|
@@ -855,9 +1012,17 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
|
855
1012
|
const localVarHeaderParameter = {};
|
|
856
1013
|
const localVarQueryParameter = {};
|
|
857
1014
|
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
1015
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
1016
|
+
if (xApiKey != null) {
|
|
1017
|
+
localVarHeaderParameter["x-api-key"] = String(xApiKey);
|
|
1018
|
+
}
|
|
1019
|
+
if (authorization != null) {
|
|
1020
|
+
localVarHeaderParameter["Authorization"] = String(authorization);
|
|
1021
|
+
}
|
|
858
1022
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
859
1023
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
860
1024
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1025
|
+
localVarRequestOptions.data = serializeDataIfNeeded(v4WorkflowsWorkflowIdComplianceRejectPutRequest, localVarRequestOptions, configuration);
|
|
861
1026
|
return {
|
|
862
1027
|
url: toPathString(localVarUrlObj),
|
|
863
1028
|
options: localVarRequestOptions
|
|
@@ -865,23 +1030,72 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
|
865
1030
|
},
|
|
866
1031
|
/**
|
|
867
1032
|
*
|
|
868
|
-
* @summary
|
|
869
|
-
* @param {string} workflowId
|
|
1033
|
+
* @summary Get workflow data by ID
|
|
1034
|
+
* @param {string} workflowId ID of the workflow to retrieve data from
|
|
1035
|
+
* @param {string} [xApiKey] API key for authorization
|
|
1036
|
+
* @param {string} [authorization] Bearer token for authorization
|
|
1037
|
+
* @param {string} [runId] ID of a specific run to retrieve data from
|
|
1038
|
+
* @param {V4WorkflowsWorkflowIdDataGetFormatEnum} [format] Format of the response data
|
|
1039
|
+
* @param {string} [sortBy] Field to sort the results by
|
|
1040
|
+
* @param {V4WorkflowsWorkflowIdDataGetOrderEnum} [order] Sort order (ascending or descending)
|
|
1041
|
+
* @param {string} [filters] JSON-encoded array of filter objects
|
|
1042
|
+
* @param {number} [page] Page number for pagination
|
|
1043
|
+
* @param {number} [limit] Number of items per page (0 for streaming all data)
|
|
1044
|
+
* @param {boolean} [gzip] Enable gzip compression for the response
|
|
1045
|
+
* @param {string} [rowIds] Filter results by specific row IDs (comma-separated or JSON array)
|
|
1046
|
+
* @param {boolean} [includeAnomalies] Include validation anomalies for each row in the response
|
|
870
1047
|
* @param {*} [options] Override http request option.
|
|
871
1048
|
* @throws {RequiredError}
|
|
872
1049
|
*/
|
|
873
|
-
|
|
874
|
-
assertParamExists("
|
|
875
|
-
const localVarPath = `/v4/workflows/{workflowId}/
|
|
1050
|
+
v4WorkflowsWorkflowIdDataGet: async (workflowId, xApiKey, authorization, runId, format, sortBy, order, filters, page, limit, gzip, rowIds, includeAnomalies, options = {}) => {
|
|
1051
|
+
assertParamExists("v4WorkflowsWorkflowIdDataGet", "workflowId", workflowId);
|
|
1052
|
+
const localVarPath = `/v4/workflows/{workflowId}/data`.replace(`{${"workflowId"}}`, encodeURIComponent(String(workflowId)));
|
|
876
1053
|
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
877
1054
|
let baseOptions;
|
|
878
1055
|
if (configuration) {
|
|
879
1056
|
baseOptions = configuration.baseOptions;
|
|
880
1057
|
}
|
|
881
|
-
const localVarRequestOptions = { method: "
|
|
1058
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
882
1059
|
const localVarHeaderParameter = {};
|
|
883
1060
|
const localVarQueryParameter = {};
|
|
884
1061
|
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
1062
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1063
|
+
if (runId !== void 0) {
|
|
1064
|
+
localVarQueryParameter["runId"] = runId;
|
|
1065
|
+
}
|
|
1066
|
+
if (format !== void 0) {
|
|
1067
|
+
localVarQueryParameter["format"] = format;
|
|
1068
|
+
}
|
|
1069
|
+
if (sortBy !== void 0) {
|
|
1070
|
+
localVarQueryParameter["sortBy"] = sortBy;
|
|
1071
|
+
}
|
|
1072
|
+
if (order !== void 0) {
|
|
1073
|
+
localVarQueryParameter["order"] = order;
|
|
1074
|
+
}
|
|
1075
|
+
if (filters !== void 0) {
|
|
1076
|
+
localVarQueryParameter["filters"] = filters;
|
|
1077
|
+
}
|
|
1078
|
+
if (page !== void 0) {
|
|
1079
|
+
localVarQueryParameter["page"] = page;
|
|
1080
|
+
}
|
|
1081
|
+
if (limit !== void 0) {
|
|
1082
|
+
localVarQueryParameter["limit"] = limit;
|
|
1083
|
+
}
|
|
1084
|
+
if (gzip !== void 0) {
|
|
1085
|
+
localVarQueryParameter["gzip"] = gzip;
|
|
1086
|
+
}
|
|
1087
|
+
if (rowIds !== void 0) {
|
|
1088
|
+
localVarQueryParameter["rowIds"] = rowIds;
|
|
1089
|
+
}
|
|
1090
|
+
if (includeAnomalies !== void 0) {
|
|
1091
|
+
localVarQueryParameter["includeAnomalies"] = includeAnomalies;
|
|
1092
|
+
}
|
|
1093
|
+
if (xApiKey != null) {
|
|
1094
|
+
localVarHeaderParameter["x-api-key"] = String(xApiKey);
|
|
1095
|
+
}
|
|
1096
|
+
if (authorization != null) {
|
|
1097
|
+
localVarHeaderParameter["Authorization"] = String(authorization);
|
|
1098
|
+
}
|
|
885
1099
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
886
1100
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
887
1101
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
@@ -892,47 +1106,41 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
|
892
1106
|
},
|
|
893
1107
|
/**
|
|
894
1108
|
*
|
|
895
|
-
* @summary
|
|
896
|
-
* @param {string} workflowId The ID of the workflow to
|
|
897
|
-
* @param {V4WorkflowsWorkflowIdSchedulePutRequest} v4WorkflowsWorkflowIdSchedulePutRequest ISO date (attention its timezone UTC) string required in request body
|
|
1109
|
+
* @summary Delete a workflow
|
|
1110
|
+
* @param {string} workflowId The ID of the workflow to delete
|
|
898
1111
|
* @param {*} [options] Override http request option.
|
|
899
1112
|
* @throws {RequiredError}
|
|
900
1113
|
*/
|
|
901
|
-
|
|
902
|
-
assertParamExists("
|
|
903
|
-
|
|
904
|
-
const localVarPath = `/v4/workflows/{workflowId}/schedule`.replace(`{${"workflowId"}}`, encodeURIComponent(String(workflowId)));
|
|
1114
|
+
v4WorkflowsWorkflowIdDelete: async (workflowId, options = {}) => {
|
|
1115
|
+
assertParamExists("v4WorkflowsWorkflowIdDelete", "workflowId", workflowId);
|
|
1116
|
+
const localVarPath = `/v4/workflows/{workflowId}`.replace(`{${"workflowId"}}`, encodeURIComponent(String(workflowId)));
|
|
905
1117
|
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
906
1118
|
let baseOptions;
|
|
907
1119
|
if (configuration) {
|
|
908
1120
|
baseOptions = configuration.baseOptions;
|
|
909
1121
|
}
|
|
910
|
-
const localVarRequestOptions = { method: "
|
|
1122
|
+
const localVarRequestOptions = { method: "DELETE", ...baseOptions, ...options };
|
|
911
1123
|
const localVarHeaderParameter = {};
|
|
912
1124
|
const localVarQueryParameter = {};
|
|
913
1125
|
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
914
|
-
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
915
1126
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
916
1127
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
917
1128
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
918
|
-
localVarRequestOptions.data = serializeDataIfNeeded(v4WorkflowsWorkflowIdSchedulePutRequest, localVarRequestOptions, configuration);
|
|
919
1129
|
return {
|
|
920
1130
|
url: toPathString(localVarUrlObj),
|
|
921
1131
|
options: localVarRequestOptions
|
|
922
1132
|
};
|
|
923
1133
|
},
|
|
924
1134
|
/**
|
|
925
|
-
*
|
|
926
|
-
* @summary Get
|
|
927
|
-
* @param {string}
|
|
928
|
-
* @param {string} [xApiKey] API key for authorization
|
|
929
|
-
* @param {string} [authorization] Bearer token for authorization
|
|
1135
|
+
* Retrieves detailed information about a specific workflow. This endpoint requires authentication and proper team access permissions.
|
|
1136
|
+
* @summary Get workflow by ID
|
|
1137
|
+
* @param {string} workflowId ID of the workflow to retrieve
|
|
930
1138
|
* @param {*} [options] Override http request option.
|
|
931
1139
|
* @throws {RequiredError}
|
|
932
1140
|
*/
|
|
933
|
-
|
|
934
|
-
assertParamExists("
|
|
935
|
-
const localVarPath = `/
|
|
1141
|
+
v4WorkflowsWorkflowIdGet: async (workflowId, options = {}) => {
|
|
1142
|
+
assertParamExists("v4WorkflowsWorkflowIdGet", "workflowId", workflowId);
|
|
1143
|
+
const localVarPath = `/v4/workflows/{workflowId}`.replace(`{${"workflowId"}}`, encodeURIComponent(String(workflowId)));
|
|
936
1144
|
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
937
1145
|
let baseOptions;
|
|
938
1146
|
if (configuration) {
|
|
@@ -942,13 +1150,6 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
|
942
1150
|
const localVarHeaderParameter = {};
|
|
943
1151
|
const localVarQueryParameter = {};
|
|
944
1152
|
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
945
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
946
|
-
if (xApiKey != null) {
|
|
947
|
-
localVarHeaderParameter["x-api-key"] = String(xApiKey);
|
|
948
|
-
}
|
|
949
|
-
if (authorization != null) {
|
|
950
|
-
localVarHeaderParameter["Authorization"] = String(authorization);
|
|
951
|
-
}
|
|
952
1153
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
953
1154
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
954
1155
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
@@ -959,19 +1160,14 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
|
959
1160
|
},
|
|
960
1161
|
/**
|
|
961
1162
|
*
|
|
962
|
-
* @summary Get
|
|
963
|
-
* @param {string}
|
|
964
|
-
* @param {string} [authorization] Bearer token for authorization
|
|
965
|
-
* @param {string} [workflowIds] Comma-separated list of workflow IDs. If not provided, returns changes for all ACTIVE workflows
|
|
966
|
-
* @param {string} [startDate] Start date to filter changes (ISO format)
|
|
967
|
-
* @param {string} [endDate] End date to filter changes (ISO format)
|
|
968
|
-
* @param {number} [skip] Number of records to skip for pagination
|
|
969
|
-
* @param {number} [limit] Number of records to return for pagination
|
|
1163
|
+
* @summary Get the workflow run history
|
|
1164
|
+
* @param {string} workflowId The unique identifier of the workflow whose runs history is to be retrieved
|
|
970
1165
|
* @param {*} [options] Override http request option.
|
|
971
1166
|
* @throws {RequiredError}
|
|
972
1167
|
*/
|
|
973
|
-
|
|
974
|
-
|
|
1168
|
+
v4WorkflowsWorkflowIdHistoryGet: async (workflowId, options = {}) => {
|
|
1169
|
+
assertParamExists("v4WorkflowsWorkflowIdHistoryGet", "workflowId", workflowId);
|
|
1170
|
+
const localVarPath = `/v4/workflows/{workflowId}/history`.replace(`{${"workflowId"}}`, encodeURIComponent(String(workflowId)));
|
|
975
1171
|
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
976
1172
|
let baseOptions;
|
|
977
1173
|
if (configuration) {
|
|
@@ -981,28 +1177,6 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
|
981
1177
|
const localVarHeaderParameter = {};
|
|
982
1178
|
const localVarQueryParameter = {};
|
|
983
1179
|
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
984
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
985
|
-
if (workflowIds !== void 0) {
|
|
986
|
-
localVarQueryParameter["workflowIds"] = workflowIds;
|
|
987
|
-
}
|
|
988
|
-
if (startDate !== void 0) {
|
|
989
|
-
localVarQueryParameter["startDate"] = startDate instanceof Date ? startDate.toISOString() : startDate;
|
|
990
|
-
}
|
|
991
|
-
if (endDate !== void 0) {
|
|
992
|
-
localVarQueryParameter["endDate"] = endDate instanceof Date ? endDate.toISOString() : endDate;
|
|
993
|
-
}
|
|
994
|
-
if (skip !== void 0) {
|
|
995
|
-
localVarQueryParameter["skip"] = skip;
|
|
996
|
-
}
|
|
997
|
-
if (limit !== void 0) {
|
|
998
|
-
localVarQueryParameter["limit"] = limit;
|
|
999
|
-
}
|
|
1000
|
-
if (xApiKey != null) {
|
|
1001
|
-
localVarHeaderParameter["x-api-key"] = String(xApiKey);
|
|
1002
|
-
}
|
|
1003
|
-
if (authorization != null) {
|
|
1004
|
-
localVarHeaderParameter["Authorization"] = String(authorization);
|
|
1005
|
-
}
|
|
1006
1180
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1007
1181
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1008
1182
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
@@ -1012,53 +1186,55 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
|
1012
1186
|
};
|
|
1013
1187
|
},
|
|
1014
1188
|
/**
|
|
1015
|
-
*
|
|
1016
|
-
* @summary
|
|
1017
|
-
* @param {string}
|
|
1189
|
+
*
|
|
1190
|
+
* @summary Update workflow metadata
|
|
1191
|
+
* @param {string} workflowId ID of the workflow to update
|
|
1192
|
+
* @param {V4WorkflowsWorkflowIdMetadataPutRequest} v4WorkflowsWorkflowIdMetadataPutRequest
|
|
1018
1193
|
* @param {*} [options] Override http request option.
|
|
1019
1194
|
* @throws {RequiredError}
|
|
1020
1195
|
*/
|
|
1021
|
-
|
|
1022
|
-
assertParamExists("
|
|
1023
|
-
|
|
1196
|
+
v4WorkflowsWorkflowIdMetadataPut: async (workflowId, v4WorkflowsWorkflowIdMetadataPutRequest, options = {}) => {
|
|
1197
|
+
assertParamExists("v4WorkflowsWorkflowIdMetadataPut", "workflowId", workflowId);
|
|
1198
|
+
assertParamExists("v4WorkflowsWorkflowIdMetadataPut", "v4WorkflowsWorkflowIdMetadataPutRequest", v4WorkflowsWorkflowIdMetadataPutRequest);
|
|
1199
|
+
const localVarPath = `/v4/workflows/{workflowId}/metadata`.replace(`{${"workflowId"}}`, encodeURIComponent(String(workflowId)));
|
|
1024
1200
|
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
1025
1201
|
let baseOptions;
|
|
1026
1202
|
if (configuration) {
|
|
1027
1203
|
baseOptions = configuration.baseOptions;
|
|
1028
1204
|
}
|
|
1029
|
-
const localVarRequestOptions = { method: "
|
|
1205
|
+
const localVarRequestOptions = { method: "PUT", ...baseOptions, ...options };
|
|
1030
1206
|
const localVarHeaderParameter = {};
|
|
1031
1207
|
const localVarQueryParameter = {};
|
|
1032
1208
|
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
1033
|
-
|
|
1209
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
1034
1210
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1035
1211
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1036
1212
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1213
|
+
localVarRequestOptions.data = serializeDataIfNeeded(v4WorkflowsWorkflowIdMetadataPutRequest, localVarRequestOptions, configuration);
|
|
1037
1214
|
return {
|
|
1038
1215
|
url: toPathString(localVarUrlObj),
|
|
1039
1216
|
options: localVarRequestOptions
|
|
1040
1217
|
};
|
|
1041
1218
|
},
|
|
1042
1219
|
/**
|
|
1043
|
-
*
|
|
1044
|
-
* @summary
|
|
1045
|
-
* @param {string}
|
|
1220
|
+
*
|
|
1221
|
+
* @summary Pause a workflow
|
|
1222
|
+
* @param {string} workflowId The ID of the workflow to pause
|
|
1046
1223
|
* @param {*} [options] Override http request option.
|
|
1047
1224
|
* @throws {RequiredError}
|
|
1048
1225
|
*/
|
|
1049
|
-
|
|
1050
|
-
assertParamExists("
|
|
1051
|
-
const localVarPath = `/
|
|
1226
|
+
v4WorkflowsWorkflowIdPausePut: async (workflowId, options = {}) => {
|
|
1227
|
+
assertParamExists("v4WorkflowsWorkflowIdPausePut", "workflowId", workflowId);
|
|
1228
|
+
const localVarPath = `/v4/workflows/{workflowId}/pause`.replace(`{${"workflowId"}}`, encodeURIComponent(String(workflowId)));
|
|
1052
1229
|
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
1053
1230
|
let baseOptions;
|
|
1054
1231
|
if (configuration) {
|
|
1055
1232
|
baseOptions = configuration.baseOptions;
|
|
1056
1233
|
}
|
|
1057
|
-
const localVarRequestOptions = { method: "
|
|
1234
|
+
const localVarRequestOptions = { method: "PUT", ...baseOptions, ...options };
|
|
1058
1235
|
const localVarHeaderParameter = {};
|
|
1059
1236
|
const localVarQueryParameter = {};
|
|
1060
1237
|
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
1061
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1062
1238
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1063
1239
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1064
1240
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
@@ -1068,17 +1244,15 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
|
1068
1244
|
};
|
|
1069
1245
|
},
|
|
1070
1246
|
/**
|
|
1071
|
-
*
|
|
1072
|
-
* @summary
|
|
1073
|
-
* @param {string}
|
|
1074
|
-
* @param {V5WorkflowsIdPutRequest} v5WorkflowsIdPutRequest
|
|
1247
|
+
* 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.
|
|
1248
|
+
* @summary Resume a workflow
|
|
1249
|
+
* @param {string} workflowId The ID of the workflow to resume
|
|
1075
1250
|
* @param {*} [options] Override http request option.
|
|
1076
1251
|
* @throws {RequiredError}
|
|
1077
1252
|
*/
|
|
1078
|
-
|
|
1079
|
-
assertParamExists("
|
|
1080
|
-
|
|
1081
|
-
const localVarPath = `/v5/workflows/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
1253
|
+
v4WorkflowsWorkflowIdResumePut: async (workflowId, options = {}) => {
|
|
1254
|
+
assertParamExists("v4WorkflowsWorkflowIdResumePut", "workflowId", workflowId);
|
|
1255
|
+
const localVarPath = `/v4/workflows/{workflowId}/resume`.replace(`{${"workflowId"}}`, encodeURIComponent(String(workflowId)));
|
|
1082
1256
|
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
1083
1257
|
let baseOptions;
|
|
1084
1258
|
if (configuration) {
|
|
@@ -1088,33 +1262,266 @@ var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
|
1088
1262
|
const localVarHeaderParameter = {};
|
|
1089
1263
|
const localVarQueryParameter = {};
|
|
1090
1264
|
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
1091
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1092
|
-
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
1093
1265
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1094
1266
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1095
1267
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1096
|
-
localVarRequestOptions.data = serializeDataIfNeeded(v5WorkflowsIdPutRequest, localVarRequestOptions, configuration);
|
|
1097
1268
|
return {
|
|
1098
1269
|
url: toPathString(localVarUrlObj),
|
|
1099
1270
|
options: localVarRequestOptions
|
|
1100
1271
|
};
|
|
1101
1272
|
},
|
|
1102
1273
|
/**
|
|
1103
|
-
*
|
|
1104
|
-
* @summary
|
|
1105
|
-
* @param {
|
|
1274
|
+
*
|
|
1275
|
+
* @summary Run a workflow
|
|
1276
|
+
* @param {string} workflowId The ID of the workflow to run
|
|
1106
1277
|
* @param {*} [options] Override http request option.
|
|
1107
1278
|
* @throws {RequiredError}
|
|
1108
1279
|
*/
|
|
1109
|
-
|
|
1110
|
-
assertParamExists("
|
|
1111
|
-
const localVarPath = `/
|
|
1280
|
+
v4WorkflowsWorkflowIdRunPut: async (workflowId, options = {}) => {
|
|
1281
|
+
assertParamExists("v4WorkflowsWorkflowIdRunPut", "workflowId", workflowId);
|
|
1282
|
+
const localVarPath = `/v4/workflows/{workflowId}/run`.replace(`{${"workflowId"}}`, encodeURIComponent(String(workflowId)));
|
|
1112
1283
|
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
1113
1284
|
let baseOptions;
|
|
1114
1285
|
if (configuration) {
|
|
1115
1286
|
baseOptions = configuration.baseOptions;
|
|
1116
1287
|
}
|
|
1117
|
-
const localVarRequestOptions = { method: "
|
|
1288
|
+
const localVarRequestOptions = { method: "PUT", ...baseOptions, ...options };
|
|
1289
|
+
const localVarHeaderParameter = {};
|
|
1290
|
+
const localVarQueryParameter = {};
|
|
1291
|
+
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
1292
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1293
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1294
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1295
|
+
return {
|
|
1296
|
+
url: toPathString(localVarUrlObj),
|
|
1297
|
+
options: localVarRequestOptions
|
|
1298
|
+
};
|
|
1299
|
+
},
|
|
1300
|
+
/**
|
|
1301
|
+
*
|
|
1302
|
+
* @summary Schedule a workflow
|
|
1303
|
+
* @param {string} workflowId The ID of the workflow to schedule
|
|
1304
|
+
* @param {V4WorkflowsWorkflowIdSchedulePutRequest} v4WorkflowsWorkflowIdSchedulePutRequest ISO date (attention its timezone UTC) string required in request body
|
|
1305
|
+
* @param {*} [options] Override http request option.
|
|
1306
|
+
* @throws {RequiredError}
|
|
1307
|
+
*/
|
|
1308
|
+
v4WorkflowsWorkflowIdSchedulePut: async (workflowId, v4WorkflowsWorkflowIdSchedulePutRequest, options = {}) => {
|
|
1309
|
+
assertParamExists("v4WorkflowsWorkflowIdSchedulePut", "workflowId", workflowId);
|
|
1310
|
+
assertParamExists("v4WorkflowsWorkflowIdSchedulePut", "v4WorkflowsWorkflowIdSchedulePutRequest", v4WorkflowsWorkflowIdSchedulePutRequest);
|
|
1311
|
+
const localVarPath = `/v4/workflows/{workflowId}/schedule`.replace(`{${"workflowId"}}`, encodeURIComponent(String(workflowId)));
|
|
1312
|
+
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
1313
|
+
let baseOptions;
|
|
1314
|
+
if (configuration) {
|
|
1315
|
+
baseOptions = configuration.baseOptions;
|
|
1316
|
+
}
|
|
1317
|
+
const localVarRequestOptions = { method: "PUT", ...baseOptions, ...options };
|
|
1318
|
+
const localVarHeaderParameter = {};
|
|
1319
|
+
const localVarQueryParameter = {};
|
|
1320
|
+
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
1321
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
1322
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1323
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1324
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1325
|
+
localVarRequestOptions.data = serializeDataIfNeeded(v4WorkflowsWorkflowIdSchedulePutRequest, localVarRequestOptions, configuration);
|
|
1326
|
+
return {
|
|
1327
|
+
url: toPathString(localVarUrlObj),
|
|
1328
|
+
options: localVarRequestOptions
|
|
1329
|
+
};
|
|
1330
|
+
},
|
|
1331
|
+
/**
|
|
1332
|
+
*
|
|
1333
|
+
* @summary Get data change by ID (PostgreSQL)
|
|
1334
|
+
* @param {string} changeId ID of the workflow change to retrieve
|
|
1335
|
+
* @param {string} [xApiKey] API key for authorization
|
|
1336
|
+
* @param {string} [authorization] Bearer token for authorization
|
|
1337
|
+
* @param {*} [options] Override http request option.
|
|
1338
|
+
* @throws {RequiredError}
|
|
1339
|
+
*/
|
|
1340
|
+
v5ChangesChangeIdGet: async (changeId, xApiKey, authorization, options = {}) => {
|
|
1341
|
+
assertParamExists("v5ChangesChangeIdGet", "changeId", changeId);
|
|
1342
|
+
const localVarPath = `/v5/changes/{changeId}`.replace(`{${"changeId"}}`, encodeURIComponent(String(changeId)));
|
|
1343
|
+
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
1344
|
+
let baseOptions;
|
|
1345
|
+
if (configuration) {
|
|
1346
|
+
baseOptions = configuration.baseOptions;
|
|
1347
|
+
}
|
|
1348
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
1349
|
+
const localVarHeaderParameter = {};
|
|
1350
|
+
const localVarQueryParameter = {};
|
|
1351
|
+
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
1352
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1353
|
+
if (xApiKey != null) {
|
|
1354
|
+
localVarHeaderParameter["x-api-key"] = String(xApiKey);
|
|
1355
|
+
}
|
|
1356
|
+
if (authorization != null) {
|
|
1357
|
+
localVarHeaderParameter["Authorization"] = String(authorization);
|
|
1358
|
+
}
|
|
1359
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1360
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1361
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1362
|
+
return {
|
|
1363
|
+
url: toPathString(localVarUrlObj),
|
|
1364
|
+
options: localVarRequestOptions
|
|
1365
|
+
};
|
|
1366
|
+
},
|
|
1367
|
+
/**
|
|
1368
|
+
*
|
|
1369
|
+
* @summary Get all data changes (PostgreSQL)
|
|
1370
|
+
* @param {string} [xApiKey] API key for authorization
|
|
1371
|
+
* @param {string} [authorization] Bearer token for authorization
|
|
1372
|
+
* @param {string} [workflowIds] Comma-separated list of workflow IDs. If not provided, returns changes for all ACTIVE workflows
|
|
1373
|
+
* @param {string} [startDate] Start date to filter changes (ISO format)
|
|
1374
|
+
* @param {string} [endDate] End date to filter changes (ISO format)
|
|
1375
|
+
* @param {number} [skip] Number of records to skip for pagination
|
|
1376
|
+
* @param {number} [limit] Number of records to return for pagination
|
|
1377
|
+
* @param {*} [options] Override http request option.
|
|
1378
|
+
* @throws {RequiredError}
|
|
1379
|
+
*/
|
|
1380
|
+
v5ChangesGet: async (xApiKey, authorization, workflowIds, startDate, endDate, skip, limit, options = {}) => {
|
|
1381
|
+
const localVarPath = `/v5/changes`;
|
|
1382
|
+
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
1383
|
+
let baseOptions;
|
|
1384
|
+
if (configuration) {
|
|
1385
|
+
baseOptions = configuration.baseOptions;
|
|
1386
|
+
}
|
|
1387
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
1388
|
+
const localVarHeaderParameter = {};
|
|
1389
|
+
const localVarQueryParameter = {};
|
|
1390
|
+
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
1391
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1392
|
+
if (workflowIds !== void 0) {
|
|
1393
|
+
localVarQueryParameter["workflowIds"] = workflowIds;
|
|
1394
|
+
}
|
|
1395
|
+
if (startDate !== void 0) {
|
|
1396
|
+
localVarQueryParameter["startDate"] = startDate instanceof Date ? startDate.toISOString() : startDate;
|
|
1397
|
+
}
|
|
1398
|
+
if (endDate !== void 0) {
|
|
1399
|
+
localVarQueryParameter["endDate"] = endDate instanceof Date ? endDate.toISOString() : endDate;
|
|
1400
|
+
}
|
|
1401
|
+
if (skip !== void 0) {
|
|
1402
|
+
localVarQueryParameter["skip"] = skip;
|
|
1403
|
+
}
|
|
1404
|
+
if (limit !== void 0) {
|
|
1405
|
+
localVarQueryParameter["limit"] = limit;
|
|
1406
|
+
}
|
|
1407
|
+
if (xApiKey != null) {
|
|
1408
|
+
localVarHeaderParameter["x-api-key"] = String(xApiKey);
|
|
1409
|
+
}
|
|
1410
|
+
if (authorization != null) {
|
|
1411
|
+
localVarHeaderParameter["Authorization"] = String(authorization);
|
|
1412
|
+
}
|
|
1413
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1414
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1415
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1416
|
+
return {
|
|
1417
|
+
url: toPathString(localVarUrlObj),
|
|
1418
|
+
options: localVarRequestOptions
|
|
1419
|
+
};
|
|
1420
|
+
},
|
|
1421
|
+
/**
|
|
1422
|
+
* Permanently deletes a workflow and its associated tags
|
|
1423
|
+
* @summary Delete a workflow
|
|
1424
|
+
* @param {string} id The ID of the workflow to delete
|
|
1425
|
+
* @param {*} [options] Override http request option.
|
|
1426
|
+
* @throws {RequiredError}
|
|
1427
|
+
*/
|
|
1428
|
+
v5WorkflowsIdDelete: async (id, options = {}) => {
|
|
1429
|
+
assertParamExists("v5WorkflowsIdDelete", "id", id);
|
|
1430
|
+
const localVarPath = `/v5/workflows/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
1431
|
+
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
1432
|
+
let baseOptions;
|
|
1433
|
+
if (configuration) {
|
|
1434
|
+
baseOptions = configuration.baseOptions;
|
|
1435
|
+
}
|
|
1436
|
+
const localVarRequestOptions = { method: "DELETE", ...baseOptions, ...options };
|
|
1437
|
+
const localVarHeaderParameter = {};
|
|
1438
|
+
const localVarQueryParameter = {};
|
|
1439
|
+
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
1440
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1441
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1442
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1443
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1444
|
+
return {
|
|
1445
|
+
url: toPathString(localVarUrlObj),
|
|
1446
|
+
options: localVarRequestOptions
|
|
1447
|
+
};
|
|
1448
|
+
},
|
|
1449
|
+
/**
|
|
1450
|
+
* Retrieves a specific workflow and its associated tags by ID
|
|
1451
|
+
* @summary Get workflow by ID
|
|
1452
|
+
* @param {string} id The ID of the workflow to retrieve
|
|
1453
|
+
* @param {*} [options] Override http request option.
|
|
1454
|
+
* @throws {RequiredError}
|
|
1455
|
+
*/
|
|
1456
|
+
v5WorkflowsIdGet: async (id, options = {}) => {
|
|
1457
|
+
assertParamExists("v5WorkflowsIdGet", "id", id);
|
|
1458
|
+
const localVarPath = `/v5/workflows/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
1459
|
+
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
1460
|
+
let baseOptions;
|
|
1461
|
+
if (configuration) {
|
|
1462
|
+
baseOptions = configuration.baseOptions;
|
|
1463
|
+
}
|
|
1464
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
1465
|
+
const localVarHeaderParameter = {};
|
|
1466
|
+
const localVarQueryParameter = {};
|
|
1467
|
+
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
1468
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1469
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1470
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1471
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1472
|
+
return {
|
|
1473
|
+
url: toPathString(localVarUrlObj),
|
|
1474
|
+
options: localVarRequestOptions
|
|
1475
|
+
};
|
|
1476
|
+
},
|
|
1477
|
+
/**
|
|
1478
|
+
* Updates an existing workflow\'s properties
|
|
1479
|
+
* @summary Update a workflow
|
|
1480
|
+
* @param {string} id The ID of the workflow to update
|
|
1481
|
+
* @param {V5WorkflowsIdPutRequest} v5WorkflowsIdPutRequest
|
|
1482
|
+
* @param {*} [options] Override http request option.
|
|
1483
|
+
* @throws {RequiredError}
|
|
1484
|
+
*/
|
|
1485
|
+
v5WorkflowsIdPut: async (id, v5WorkflowsIdPutRequest, options = {}) => {
|
|
1486
|
+
assertParamExists("v5WorkflowsIdPut", "id", id);
|
|
1487
|
+
assertParamExists("v5WorkflowsIdPut", "v5WorkflowsIdPutRequest", v5WorkflowsIdPutRequest);
|
|
1488
|
+
const localVarPath = `/v5/workflows/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
1489
|
+
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
1490
|
+
let baseOptions;
|
|
1491
|
+
if (configuration) {
|
|
1492
|
+
baseOptions = configuration.baseOptions;
|
|
1493
|
+
}
|
|
1494
|
+
const localVarRequestOptions = { method: "PUT", ...baseOptions, ...options };
|
|
1495
|
+
const localVarHeaderParameter = {};
|
|
1496
|
+
const localVarQueryParameter = {};
|
|
1497
|
+
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
1498
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1499
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
1500
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1501
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1502
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1503
|
+
localVarRequestOptions.data = serializeDataIfNeeded(v5WorkflowsIdPutRequest, localVarRequestOptions, configuration);
|
|
1504
|
+
return {
|
|
1505
|
+
url: toPathString(localVarUrlObj),
|
|
1506
|
+
options: localVarRequestOptions
|
|
1507
|
+
};
|
|
1508
|
+
},
|
|
1509
|
+
/**
|
|
1510
|
+
* Creates a new workflow in pending state
|
|
1511
|
+
* @summary Create a new workflow
|
|
1512
|
+
* @param {V5WorkflowsPostRequest} v5WorkflowsPostRequest
|
|
1513
|
+
* @param {*} [options] Override http request option.
|
|
1514
|
+
* @throws {RequiredError}
|
|
1515
|
+
*/
|
|
1516
|
+
v5WorkflowsPost: async (v5WorkflowsPostRequest, options = {}) => {
|
|
1517
|
+
assertParamExists("v5WorkflowsPost", "v5WorkflowsPostRequest", v5WorkflowsPostRequest);
|
|
1518
|
+
const localVarPath = `/v5/workflows`;
|
|
1519
|
+
const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
|
|
1520
|
+
let baseOptions;
|
|
1521
|
+
if (configuration) {
|
|
1522
|
+
baseOptions = configuration.baseOptions;
|
|
1523
|
+
}
|
|
1524
|
+
const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
|
|
1118
1525
|
const localVarHeaderParameter = {};
|
|
1119
1526
|
const localVarQueryParameter = {};
|
|
1120
1527
|
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
@@ -1191,7 +1598,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1191
1598
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4ChangesChangeIdGet(changeId, xApiKey, authorization, options);
|
|
1192
1599
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1193
1600
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4ChangesChangeIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
1194
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1601
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1195
1602
|
},
|
|
1196
1603
|
/**
|
|
1197
1604
|
*
|
|
@@ -1210,7 +1617,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1210
1617
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4ChangesGet(xApiKey, authorization, workflowIds, startDate, endDate, skip, limit, options);
|
|
1211
1618
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1212
1619
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4ChangesGet"]?.[localVarOperationServerIndex]?.url;
|
|
1213
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1620
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1214
1621
|
},
|
|
1215
1622
|
/**
|
|
1216
1623
|
* Retrieves a list of workflows with pagination and search capabilities
|
|
@@ -1232,7 +1639,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1232
1639
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsGet(search, skip, limit, state, tags, monitoring, updateInterval, templateId, includeDeleted, format, options);
|
|
1233
1640
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1234
1641
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsGet"]?.[localVarOperationServerIndex]?.url;
|
|
1235
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1642
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1236
1643
|
},
|
|
1237
1644
|
/**
|
|
1238
1645
|
*
|
|
@@ -1245,7 +1652,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1245
1652
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsPost(v4WorkflowsPostRequest, options);
|
|
1246
1653
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1247
1654
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsPost"]?.[localVarOperationServerIndex]?.url;
|
|
1248
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1655
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1249
1656
|
},
|
|
1250
1657
|
/**
|
|
1251
1658
|
*
|
|
@@ -1258,7 +1665,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1258
1665
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsSetupEditPost(v4WorkflowsSetupEditPostRequest, options);
|
|
1259
1666
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1260
1667
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsSetupEditPost"]?.[localVarOperationServerIndex]?.url;
|
|
1261
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1668
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1262
1669
|
},
|
|
1263
1670
|
/**
|
|
1264
1671
|
*
|
|
@@ -1271,7 +1678,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1271
1678
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsSetupPost(v4WorkflowsSetupPostRequest, options);
|
|
1272
1679
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1273
1680
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsSetupPost"]?.[localVarOperationServerIndex]?.url;
|
|
1274
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1681
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1275
1682
|
},
|
|
1276
1683
|
/**
|
|
1277
1684
|
*
|
|
@@ -1288,7 +1695,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1288
1695
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdAuditlogGet(workflowId, xApiKey, authorization, page, limit, options);
|
|
1289
1696
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1290
1697
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdAuditlogGet"]?.[localVarOperationServerIndex]?.url;
|
|
1291
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1698
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1292
1699
|
},
|
|
1293
1700
|
/**
|
|
1294
1701
|
*
|
|
@@ -1303,7 +1710,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1303
1710
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdComplianceApprovePut(workflowId, xApiKey, authorization, options);
|
|
1304
1711
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1305
1712
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdComplianceApprovePut"]?.[localVarOperationServerIndex]?.url;
|
|
1306
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1713
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1307
1714
|
},
|
|
1308
1715
|
/**
|
|
1309
1716
|
*
|
|
@@ -1319,7 +1726,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1319
1726
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdComplianceRejectPut(workflowId, v4WorkflowsWorkflowIdComplianceRejectPutRequest, xApiKey, authorization, options);
|
|
1320
1727
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1321
1728
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdComplianceRejectPut"]?.[localVarOperationServerIndex]?.url;
|
|
1322
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1729
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1323
1730
|
},
|
|
1324
1731
|
/**
|
|
1325
1732
|
*
|
|
@@ -1344,7 +1751,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1344
1751
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdDataGet(workflowId, xApiKey, authorization, runId, format, sortBy, order, filters, page, limit, gzip, rowIds, includeAnomalies, options);
|
|
1345
1752
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1346
1753
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdDataGet"]?.[localVarOperationServerIndex]?.url;
|
|
1347
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1754
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1348
1755
|
},
|
|
1349
1756
|
/**
|
|
1350
1757
|
*
|
|
@@ -1357,7 +1764,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1357
1764
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdDelete(workflowId, options);
|
|
1358
1765
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1359
1766
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdDelete"]?.[localVarOperationServerIndex]?.url;
|
|
1360
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1767
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1361
1768
|
},
|
|
1362
1769
|
/**
|
|
1363
1770
|
* Retrieves detailed information about a specific workflow. This endpoint requires authentication and proper team access permissions.
|
|
@@ -1370,7 +1777,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1370
1777
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdGet(workflowId, options);
|
|
1371
1778
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1372
1779
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
1373
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1780
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1374
1781
|
},
|
|
1375
1782
|
/**
|
|
1376
1783
|
*
|
|
@@ -1383,7 +1790,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1383
1790
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdHistoryGet(workflowId, options);
|
|
1384
1791
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1385
1792
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdHistoryGet"]?.[localVarOperationServerIndex]?.url;
|
|
1386
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1793
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1387
1794
|
},
|
|
1388
1795
|
/**
|
|
1389
1796
|
*
|
|
@@ -1397,7 +1804,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1397
1804
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdMetadataPut(workflowId, v4WorkflowsWorkflowIdMetadataPutRequest, options);
|
|
1398
1805
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1399
1806
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdMetadataPut"]?.[localVarOperationServerIndex]?.url;
|
|
1400
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1807
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1401
1808
|
},
|
|
1402
1809
|
/**
|
|
1403
1810
|
*
|
|
@@ -1410,7 +1817,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1410
1817
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdPausePut(workflowId, options);
|
|
1411
1818
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1412
1819
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdPausePut"]?.[localVarOperationServerIndex]?.url;
|
|
1413
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1820
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1414
1821
|
},
|
|
1415
1822
|
/**
|
|
1416
1823
|
* 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.
|
|
@@ -1423,7 +1830,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1423
1830
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdResumePut(workflowId, options);
|
|
1424
1831
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1425
1832
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdResumePut"]?.[localVarOperationServerIndex]?.url;
|
|
1426
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1833
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1427
1834
|
},
|
|
1428
1835
|
/**
|
|
1429
1836
|
*
|
|
@@ -1436,7 +1843,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1436
1843
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdRunPut(workflowId, options);
|
|
1437
1844
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1438
1845
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdRunPut"]?.[localVarOperationServerIndex]?.url;
|
|
1439
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1846
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1440
1847
|
},
|
|
1441
1848
|
/**
|
|
1442
1849
|
*
|
|
@@ -1450,7 +1857,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1450
1857
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdSchedulePut(workflowId, v4WorkflowsWorkflowIdSchedulePutRequest, options);
|
|
1451
1858
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1452
1859
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdSchedulePut"]?.[localVarOperationServerIndex]?.url;
|
|
1453
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1860
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1454
1861
|
},
|
|
1455
1862
|
/**
|
|
1456
1863
|
*
|
|
@@ -1465,7 +1872,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1465
1872
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5ChangesChangeIdGet(changeId, xApiKey, authorization, options);
|
|
1466
1873
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1467
1874
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5ChangesChangeIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
1468
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1875
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1469
1876
|
},
|
|
1470
1877
|
/**
|
|
1471
1878
|
*
|
|
@@ -1484,7 +1891,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1484
1891
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5ChangesGet(xApiKey, authorization, workflowIds, startDate, endDate, skip, limit, options);
|
|
1485
1892
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1486
1893
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5ChangesGet"]?.[localVarOperationServerIndex]?.url;
|
|
1487
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1894
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1488
1895
|
},
|
|
1489
1896
|
/**
|
|
1490
1897
|
* Permanently deletes a workflow and its associated tags
|
|
@@ -1497,7 +1904,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1497
1904
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsIdDelete(id, options);
|
|
1498
1905
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1499
1906
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsIdDelete"]?.[localVarOperationServerIndex]?.url;
|
|
1500
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1907
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1501
1908
|
},
|
|
1502
1909
|
/**
|
|
1503
1910
|
* Retrieves a specific workflow and its associated tags by ID
|
|
@@ -1510,7 +1917,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1510
1917
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsIdGet(id, options);
|
|
1511
1918
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1512
1919
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
1513
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1920
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1514
1921
|
},
|
|
1515
1922
|
/**
|
|
1516
1923
|
* Updates an existing workflow\'s properties
|
|
@@ -1524,7 +1931,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1524
1931
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsIdPut(id, v5WorkflowsIdPutRequest, options);
|
|
1525
1932
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1526
1933
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsIdPut"]?.[localVarOperationServerIndex]?.url;
|
|
1527
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1934
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1528
1935
|
},
|
|
1529
1936
|
/**
|
|
1530
1937
|
* Creates a new workflow in pending state
|
|
@@ -1537,7 +1944,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1537
1944
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsPost(v5WorkflowsPostRequest, options);
|
|
1538
1945
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1539
1946
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsPost"]?.[localVarOperationServerIndex]?.url;
|
|
1540
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1947
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1541
1948
|
},
|
|
1542
1949
|
/**
|
|
1543
1950
|
*
|
|
@@ -1554,7 +1961,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1554
1961
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsWorkflowIdAuditlogGet(workflowId, xApiKey, authorization, page, limit, options);
|
|
1555
1962
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1556
1963
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsWorkflowIdAuditlogGet"]?.[localVarOperationServerIndex]?.url;
|
|
1557
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1964
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1558
1965
|
}
|
|
1559
1966
|
};
|
|
1560
1967
|
};
|
|
@@ -1869,411 +2276,695 @@ var Configuration = class {
|
|
|
1869
2276
|
}
|
|
1870
2277
|
};
|
|
1871
2278
|
|
|
1872
|
-
// src/
|
|
1873
|
-
var
|
|
1874
|
-
|
|
1875
|
-
let api = workflowsApiCache.get(sdk);
|
|
1876
|
-
if (!api) {
|
|
1877
|
-
api = new WorkflowsApi(sdk.configuration, sdk.baseUrl, sdk.axiosInstance);
|
|
1878
|
-
workflowsApiCache.set(sdk, api);
|
|
1879
|
-
}
|
|
1880
|
-
return api;
|
|
1881
|
-
}
|
|
1882
|
-
|
|
1883
|
-
// src/extraction/data-fetcher.ts
|
|
1884
|
-
async function fetchWorkflowData(sdkInstance, workflowId, limit = DEFAULT_OPTIONS.dataLimit) {
|
|
1885
|
-
const workflowsApi = getWorkflowsApi(sdkInstance);
|
|
1886
|
-
try {
|
|
1887
|
-
const response = await workflowsApi.v4WorkflowsWorkflowIdDataGet({
|
|
1888
|
-
workflowId,
|
|
1889
|
-
limit
|
|
1890
|
-
});
|
|
1891
|
-
return response.data.data ?? [];
|
|
1892
|
-
} catch (error) {
|
|
1893
|
-
throw wrapKadoaError(error, {
|
|
1894
|
-
message: ERROR_MESSAGES.DATA_FETCH_FAILED,
|
|
1895
|
-
details: { workflowId, limit }
|
|
1896
|
-
});
|
|
1897
|
-
}
|
|
1898
|
-
}
|
|
2279
|
+
// src/core/patterns/command.ts
|
|
2280
|
+
var Command = class {
|
|
2281
|
+
};
|
|
1899
2282
|
|
|
1900
|
-
// src/
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
code: "VALIDATION_ERROR",
|
|
1905
|
-
details: { options }
|
|
1906
|
-
});
|
|
2283
|
+
// src/core/pagination/paginator.ts
|
|
2284
|
+
var PagedIterator = class {
|
|
2285
|
+
constructor(fetchPage) {
|
|
2286
|
+
this.fetchPage = fetchPage;
|
|
1907
2287
|
}
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
}
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
2288
|
+
/**
|
|
2289
|
+
* Fetch all items across all pages
|
|
2290
|
+
* @param options Base options (page will be overridden)
|
|
2291
|
+
* @returns Array of all items
|
|
2292
|
+
*/
|
|
2293
|
+
async fetchAll(options = {}) {
|
|
2294
|
+
const allItems = [];
|
|
2295
|
+
let currentPage = 1;
|
|
2296
|
+
let hasMore = true;
|
|
2297
|
+
while (hasMore) {
|
|
2298
|
+
const result = await this.fetchPage({ ...options, page: currentPage });
|
|
2299
|
+
allItems.push(...result.data);
|
|
2300
|
+
const pagination = result.pagination;
|
|
2301
|
+
hasMore = pagination.page !== void 0 && pagination.totalPages !== void 0 && pagination.page < pagination.totalPages;
|
|
2302
|
+
currentPage++;
|
|
1922
2303
|
}
|
|
1923
|
-
|
|
1924
|
-
throw new KadoaSdkException(ERROR_MESSAGES.NO_API_KEY, {
|
|
1925
|
-
code: "AUTH_ERROR",
|
|
1926
|
-
details: { hasConfig: !!config, hasApiKey: !!config?.apiKey }
|
|
1927
|
-
});
|
|
2304
|
+
return allItems;
|
|
1928
2305
|
}
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
}
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
errorText = await response.text();
|
|
1944
|
-
errorData = JSON.parse(errorText);
|
|
1945
|
-
} catch {
|
|
1946
|
-
errorData = { message: errorText || response.statusText };
|
|
1947
|
-
}
|
|
1948
|
-
const baseErrorOptions = {
|
|
1949
|
-
httpStatus: response.status,
|
|
1950
|
-
endpoint: url.toString(),
|
|
1951
|
-
method: "POST",
|
|
1952
|
-
responseBody: errorData,
|
|
1953
|
-
details: {
|
|
1954
|
-
url: url.toString(),
|
|
1955
|
-
link
|
|
2306
|
+
/**
|
|
2307
|
+
* Create an async iterator for pages
|
|
2308
|
+
* @param options Base options (page will be overridden)
|
|
2309
|
+
* @returns Async generator that yields pages
|
|
2310
|
+
*/
|
|
2311
|
+
async *pages(options = {}) {
|
|
2312
|
+
let currentPage = 1;
|
|
2313
|
+
let hasMore = true;
|
|
2314
|
+
while (hasMore) {
|
|
2315
|
+
const result = await this.fetchPage({ ...options, page: currentPage });
|
|
2316
|
+
yield result;
|
|
2317
|
+
const pagination = result.pagination;
|
|
2318
|
+
hasMore = pagination.page !== void 0 && pagination.totalPages !== void 0 && pagination.page < pagination.totalPages;
|
|
2319
|
+
currentPage++;
|
|
1956
2320
|
}
|
|
1957
|
-
};
|
|
1958
|
-
if (response.status === 401) {
|
|
1959
|
-
throw new KadoaHttpException(ERROR_MESSAGES.AUTH_FAILED, {
|
|
1960
|
-
...baseErrorOptions,
|
|
1961
|
-
code: "AUTH_ERROR"
|
|
1962
|
-
});
|
|
1963
2321
|
}
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
2322
|
+
/**
|
|
2323
|
+
* Create an async iterator for individual items
|
|
2324
|
+
* @param options Base options (page will be overridden)
|
|
2325
|
+
* @returns Async generator that yields items
|
|
2326
|
+
*/
|
|
2327
|
+
async *items(options = {}) {
|
|
2328
|
+
for await (const page of this.pages(options)) {
|
|
2329
|
+
for (const item of page.data) {
|
|
2330
|
+
yield item;
|
|
2331
|
+
}
|
|
2332
|
+
}
|
|
1969
2333
|
}
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
2334
|
+
};
|
|
2335
|
+
|
|
2336
|
+
// src/modules/extraction/queries/fetch-data.query.ts
|
|
2337
|
+
var FetchDataQuery = class {
|
|
2338
|
+
constructor(client) {
|
|
2339
|
+
this.client = client;
|
|
2340
|
+
this.defaultLimit = 100;
|
|
1975
2341
|
}
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
2342
|
+
/**
|
|
2343
|
+
* Fetch a page of workflow data
|
|
2344
|
+
*
|
|
2345
|
+
* @param options Options for fetching data
|
|
2346
|
+
* @returns Paginated workflow data
|
|
2347
|
+
*/
|
|
2348
|
+
async execute(options) {
|
|
2349
|
+
try {
|
|
2350
|
+
const response = await this.client.workflows.v4WorkflowsWorkflowIdDataGet(
|
|
2351
|
+
{
|
|
2352
|
+
...options,
|
|
2353
|
+
page: options.page ?? 1,
|
|
2354
|
+
limit: options.limit ?? this.defaultLimit
|
|
2355
|
+
}
|
|
2356
|
+
);
|
|
2357
|
+
const result = response.data;
|
|
2358
|
+
return result;
|
|
2359
|
+
} catch (error) {
|
|
2360
|
+
throw KadoaHttpException.wrap(error, {
|
|
2361
|
+
message: ERROR_MESSAGES.DATA_FETCH_FAILED,
|
|
2362
|
+
details: { workflowId: options.workflowId, page: options.page }
|
|
2363
|
+
});
|
|
1981
2364
|
}
|
|
1982
|
-
);
|
|
1983
|
-
}
|
|
1984
|
-
async function fetchEntityFields(sdk, options) {
|
|
1985
|
-
validateEntityOptions(options);
|
|
1986
|
-
const url = new URL(ENTITY_API_ENDPOINT, sdk.baseUrl || DEFAULT_API_BASE_URL);
|
|
1987
|
-
const headers = await buildRequestHeaders(sdk.configuration);
|
|
1988
|
-
const requestBody = options;
|
|
1989
|
-
let response;
|
|
1990
|
-
try {
|
|
1991
|
-
response = await fetch(url.toString(), {
|
|
1992
|
-
method: "POST",
|
|
1993
|
-
headers,
|
|
1994
|
-
body: JSON.stringify(requestBody)
|
|
1995
|
-
});
|
|
1996
|
-
} catch (error) {
|
|
1997
|
-
throw new KadoaSdkException(ERROR_MESSAGES.NETWORK_ERROR, {
|
|
1998
|
-
code: "NETWORK_ERROR",
|
|
1999
|
-
details: {
|
|
2000
|
-
url: url.toString(),
|
|
2001
|
-
link: options.link
|
|
2002
|
-
},
|
|
2003
|
-
cause: error
|
|
2004
|
-
});
|
|
2005
2365
|
}
|
|
2006
|
-
|
|
2007
|
-
|
|
2366
|
+
/**
|
|
2367
|
+
* Internal method for iterator - executes a page fetch
|
|
2368
|
+
*/
|
|
2369
|
+
async executePage(options) {
|
|
2370
|
+
const result = await this.execute(options);
|
|
2371
|
+
return result;
|
|
2008
2372
|
}
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
});
|
|
2373
|
+
/**
|
|
2374
|
+
* Fetch all pages of workflow data
|
|
2375
|
+
*
|
|
2376
|
+
* @param options Options for fetching data (page will be ignored)
|
|
2377
|
+
* @returns All workflow data across all pages
|
|
2378
|
+
*/
|
|
2379
|
+
async fetchAll(options) {
|
|
2380
|
+
const iterator = new PagedIterator(
|
|
2381
|
+
(pageOptions) => this.executePage({ ...options, ...pageOptions })
|
|
2382
|
+
);
|
|
2383
|
+
return iterator.fetchAll({ limit: options.limit ?? this.defaultLimit });
|
|
2021
2384
|
}
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
}
|
|
2031
|
-
|
|
2385
|
+
/**
|
|
2386
|
+
* Create an async iterator for paginated data fetching
|
|
2387
|
+
*
|
|
2388
|
+
* @param options Options for fetching data
|
|
2389
|
+
* @returns Async iterator that yields pages of data
|
|
2390
|
+
*/
|
|
2391
|
+
async *pages(options) {
|
|
2392
|
+
const iterator = new PagedIterator(
|
|
2393
|
+
(pageOptions) => this.execute({ ...options, ...pageOptions })
|
|
2394
|
+
);
|
|
2395
|
+
for await (const page of iterator.pages({
|
|
2396
|
+
limit: options.limit ?? this.defaultLimit
|
|
2397
|
+
})) {
|
|
2398
|
+
yield page;
|
|
2399
|
+
}
|
|
2032
2400
|
}
|
|
2033
|
-
|
|
2034
|
-
}
|
|
2401
|
+
};
|
|
2035
2402
|
|
|
2036
|
-
// src/
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
const
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2403
|
+
// src/core/config/constants.ts
|
|
2404
|
+
var DEFAULT_API_BASE_URL = "https://api.kadoa.com";
|
|
2405
|
+
|
|
2406
|
+
// src/modules/extraction/services/entity-detector.service.ts
|
|
2407
|
+
var ENTITY_API_ENDPOINT = "/v4/entity";
|
|
2408
|
+
var EntityDetectorService = class {
|
|
2409
|
+
constructor(client) {
|
|
2410
|
+
this.client = client;
|
|
2411
|
+
}
|
|
2412
|
+
/**
|
|
2413
|
+
* Fetches entity fields dynamically from the /v4/entity endpoint.
|
|
2414
|
+
* This is a workaround implementation using native fetch since the endpoint
|
|
2415
|
+
* is not yet included in the OpenAPI specification.
|
|
2416
|
+
*
|
|
2417
|
+
* @param options Request options including the link to analyze
|
|
2418
|
+
* @returns EntityPrediction containing the detected entity type and fields
|
|
2419
|
+
*/
|
|
2420
|
+
async fetchEntityFields(options) {
|
|
2421
|
+
this.validateEntityOptions(options);
|
|
2422
|
+
const url = `${this.client.baseUrl || DEFAULT_API_BASE_URL}${ENTITY_API_ENDPOINT}`;
|
|
2423
|
+
const headers = await this.buildRequestHeaders();
|
|
2424
|
+
const requestBody = options;
|
|
2425
|
+
try {
|
|
2426
|
+
const response = await this.client.axiosInstance.post(url, requestBody, {
|
|
2427
|
+
headers
|
|
2428
|
+
});
|
|
2429
|
+
const data = response.data;
|
|
2430
|
+
if (!data.success || !data.entityPrediction || data.entityPrediction.length === 0) {
|
|
2431
|
+
throw new KadoaSdkException(ERROR_MESSAGES.NO_PREDICTIONS, {
|
|
2432
|
+
code: "NOT_FOUND",
|
|
2433
|
+
details: {
|
|
2434
|
+
success: data.success,
|
|
2435
|
+
hasPredictions: !!data.entityPrediction,
|
|
2436
|
+
predictionCount: data.entityPrediction?.length || 0,
|
|
2437
|
+
link: options.link
|
|
2438
|
+
}
|
|
2439
|
+
});
|
|
2440
|
+
}
|
|
2441
|
+
return data.entityPrediction[0];
|
|
2442
|
+
} catch (error) {
|
|
2443
|
+
throw KadoaHttpException.wrap(error, {
|
|
2444
|
+
details: {
|
|
2445
|
+
url,
|
|
2446
|
+
link: options.link
|
|
2447
|
+
}
|
|
2062
2448
|
});
|
|
2063
2449
|
}
|
|
2064
|
-
return workflowId;
|
|
2065
|
-
} catch (error) {
|
|
2066
|
-
throw wrapKadoaError(error, {
|
|
2067
|
-
message: "Failed to create workflow",
|
|
2068
|
-
details: config
|
|
2069
|
-
});
|
|
2070
2450
|
}
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
message: ERROR_MESSAGES.PROGRESS_CHECK_FAILED,
|
|
2082
|
-
details: { workflowId }
|
|
2083
|
-
});
|
|
2451
|
+
/**
|
|
2452
|
+
* Validates entity request options
|
|
2453
|
+
*/
|
|
2454
|
+
validateEntityOptions(options) {
|
|
2455
|
+
if (!options.link) {
|
|
2456
|
+
throw new KadoaSdkException(ERROR_MESSAGES.LINK_REQUIRED, {
|
|
2457
|
+
code: "VALIDATION_ERROR",
|
|
2458
|
+
details: { options }
|
|
2459
|
+
});
|
|
2460
|
+
}
|
|
2084
2461
|
}
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
const
|
|
2094
|
-
if (
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
sdkInstance.emit("extraction:status_changed", statusChange, "extraction");
|
|
2103
|
-
if (options?.onStatusChange) {
|
|
2104
|
-
options.onStatusChange(statusChange);
|
|
2462
|
+
/**
|
|
2463
|
+
* Builds request headers including API key authentication
|
|
2464
|
+
*/
|
|
2465
|
+
async buildRequestHeaders() {
|
|
2466
|
+
const headers = {
|
|
2467
|
+
"Content-Type": "application/json",
|
|
2468
|
+
Accept: "application/json"
|
|
2469
|
+
};
|
|
2470
|
+
const config = this.client.configuration;
|
|
2471
|
+
if (config?.apiKey) {
|
|
2472
|
+
if (typeof config.apiKey === "function") {
|
|
2473
|
+
const apiKeyValue = await config.apiKey("X-API-Key");
|
|
2474
|
+
if (apiKeyValue) {
|
|
2475
|
+
headers["X-API-Key"] = apiKeyValue;
|
|
2476
|
+
}
|
|
2477
|
+
} else if (typeof config.apiKey === "string") {
|
|
2478
|
+
headers["X-API-Key"] = config.apiKey;
|
|
2105
2479
|
}
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2480
|
+
} else {
|
|
2481
|
+
throw new KadoaSdkException(ERROR_MESSAGES.NO_API_KEY, {
|
|
2482
|
+
code: "AUTH_ERROR",
|
|
2483
|
+
details: { hasConfig: !!config, hasApiKey: !!config?.apiKey }
|
|
2484
|
+
});
|
|
2111
2485
|
}
|
|
2112
|
-
|
|
2486
|
+
return headers;
|
|
2113
2487
|
}
|
|
2114
|
-
|
|
2115
|
-
`Extraction did not complete within ${maxWaitTime / 1e3} seconds`,
|
|
2116
|
-
{ code: "TIMEOUT", details: { workflowId, maxWaitTime } }
|
|
2117
|
-
);
|
|
2118
|
-
}
|
|
2488
|
+
};
|
|
2119
2489
|
|
|
2120
|
-
// src/extraction/
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2490
|
+
// src/modules/extraction/services/workflow-manager.service.ts
|
|
2491
|
+
var TERMINAL_RUN_STATES = /* @__PURE__ */ new Set([
|
|
2492
|
+
"FINISHED",
|
|
2493
|
+
"SUCCESS",
|
|
2494
|
+
"FAILED",
|
|
2495
|
+
"ERROR",
|
|
2496
|
+
"STOPPED",
|
|
2497
|
+
"CANCELLED"
|
|
2498
|
+
]);
|
|
2499
|
+
var WorkflowManagerService = class {
|
|
2500
|
+
constructor(client) {
|
|
2501
|
+
this.client = client;
|
|
2126
2502
|
}
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
const
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2503
|
+
/**
|
|
2504
|
+
* Check if a workflow runState is terminal (finished processing)
|
|
2505
|
+
*/
|
|
2506
|
+
isTerminalRunState(runState) {
|
|
2507
|
+
if (!runState) return false;
|
|
2508
|
+
return TERMINAL_RUN_STATES.has(runState.toUpperCase());
|
|
2509
|
+
}
|
|
2510
|
+
/**
|
|
2511
|
+
* Creates a new workflow with the provided configuration
|
|
2512
|
+
*/
|
|
2513
|
+
async createWorkflow(config) {
|
|
2514
|
+
const request = {
|
|
2515
|
+
urls: config.urls,
|
|
2516
|
+
navigationMode: config.navigationMode,
|
|
2517
|
+
entity: config.entity,
|
|
2518
|
+
name: config.name,
|
|
2519
|
+
fields: config.fields,
|
|
2520
|
+
bypassPreview: true,
|
|
2521
|
+
tags: ["sdk"]
|
|
2522
|
+
};
|
|
2523
|
+
try {
|
|
2524
|
+
const response = await this.client.workflows.v4WorkflowsPost({
|
|
2525
|
+
v4WorkflowsPostRequest: request
|
|
2526
|
+
});
|
|
2527
|
+
const workflowId = response.data.workflowId;
|
|
2528
|
+
if (!workflowId) {
|
|
2529
|
+
throw new KadoaSdkException(ERROR_MESSAGES.NO_WORKFLOW_ID, {
|
|
2530
|
+
code: "INTERNAL_ERROR",
|
|
2531
|
+
details: { response: response.data }
|
|
2532
|
+
});
|
|
2533
|
+
}
|
|
2534
|
+
return workflowId;
|
|
2535
|
+
} catch (error) {
|
|
2536
|
+
throw KadoaHttpException.wrap(error, {
|
|
2537
|
+
message: ERROR_MESSAGES.WORKFLOW_CREATE_FAILED,
|
|
2538
|
+
details: config
|
|
2539
|
+
});
|
|
2540
|
+
}
|
|
2541
|
+
}
|
|
2542
|
+
/**
|
|
2543
|
+
* Gets the current status of a workflow
|
|
2544
|
+
*/
|
|
2545
|
+
async getWorkflowStatus(workflowId) {
|
|
2546
|
+
try {
|
|
2547
|
+
const response = await this.client.workflows.v4WorkflowsWorkflowIdGet({
|
|
2548
|
+
workflowId
|
|
2549
|
+
});
|
|
2550
|
+
return response.data;
|
|
2551
|
+
} catch (error) {
|
|
2552
|
+
throw KadoaHttpException.wrap(error, {
|
|
2553
|
+
message: ERROR_MESSAGES.PROGRESS_CHECK_FAILED,
|
|
2554
|
+
details: { workflowId }
|
|
2555
|
+
});
|
|
2556
|
+
}
|
|
2557
|
+
}
|
|
2558
|
+
/**
|
|
2559
|
+
* Waits for a workflow to complete processing
|
|
2560
|
+
*
|
|
2561
|
+
* @param workflowId The workflow ID to monitor
|
|
2562
|
+
* @param pollingInterval How often to check the status (in milliseconds)
|
|
2563
|
+
* @param maxWaitTime Maximum time to wait before timing out (in milliseconds)
|
|
2564
|
+
* @param onStatusChange Optional callback for status changes
|
|
2565
|
+
* @returns The final workflow status
|
|
2566
|
+
*/
|
|
2567
|
+
async waitForWorkflowCompletion(workflowId, pollingInterval, maxWaitTime, onStatusChange) {
|
|
2568
|
+
const startTime = Date.now();
|
|
2569
|
+
let lastStatus;
|
|
2570
|
+
while (Date.now() - startTime < maxWaitTime) {
|
|
2571
|
+
const currentStatus = await this.getWorkflowStatus(workflowId);
|
|
2572
|
+
if (lastStatus?.state !== currentStatus.state || lastStatus?.runState !== currentStatus.runState) {
|
|
2573
|
+
const eventPayload = {
|
|
2574
|
+
workflowId,
|
|
2575
|
+
previousState: lastStatus?.state,
|
|
2576
|
+
previousRunState: lastStatus?.runState,
|
|
2577
|
+
currentState: currentStatus.state,
|
|
2578
|
+
currentRunState: currentStatus.runState
|
|
2579
|
+
};
|
|
2580
|
+
this.client.emit(
|
|
2581
|
+
"extraction:status_changed",
|
|
2582
|
+
eventPayload,
|
|
2187
2583
|
"extraction"
|
|
2188
2584
|
);
|
|
2585
|
+
if (onStatusChange) {
|
|
2586
|
+
onStatusChange(lastStatus, currentStatus);
|
|
2587
|
+
}
|
|
2588
|
+
}
|
|
2589
|
+
if (this.isTerminalRunState(currentStatus.runState)) {
|
|
2590
|
+
return currentStatus;
|
|
2591
|
+
}
|
|
2592
|
+
lastStatus = currentStatus;
|
|
2593
|
+
await new Promise((resolve) => setTimeout(resolve, pollingInterval));
|
|
2594
|
+
}
|
|
2595
|
+
throw new KadoaSdkException(ERROR_MESSAGES.WORKFLOW_TIMEOUT, {
|
|
2596
|
+
code: "TIMEOUT",
|
|
2597
|
+
details: {
|
|
2598
|
+
workflowId,
|
|
2599
|
+
maxWaitTime,
|
|
2600
|
+
lastState: lastStatus?.state,
|
|
2601
|
+
lastRunState: lastStatus?.runState
|
|
2189
2602
|
}
|
|
2190
|
-
|
|
2191
|
-
|
|
2603
|
+
});
|
|
2604
|
+
}
|
|
2605
|
+
};
|
|
2606
|
+
|
|
2607
|
+
// src/modules/extraction/commands/run-extraction.command.ts
|
|
2608
|
+
var SUCCESSFUL_RUN_STATES = /* @__PURE__ */ new Set(["FINISHED", "SUCCESS"]);
|
|
2609
|
+
var DEFAULT_OPTIONS = {
|
|
2610
|
+
pollingInterval: 5e3,
|
|
2611
|
+
maxWaitTime: 3e5,
|
|
2612
|
+
navigationMode: "single-page",
|
|
2613
|
+
location: { type: "auto" },
|
|
2614
|
+
name: "Untitled Workflow"
|
|
2615
|
+
};
|
|
2616
|
+
var RunExtractionCommand = class extends Command {
|
|
2617
|
+
constructor(client) {
|
|
2618
|
+
super();
|
|
2619
|
+
this.client = client;
|
|
2620
|
+
this.fetchDataQuery = new FetchDataQuery(client);
|
|
2621
|
+
this.entityDetector = new EntityDetectorService(client);
|
|
2622
|
+
this.workflowManager = new WorkflowManagerService(client);
|
|
2623
|
+
}
|
|
2624
|
+
/**
|
|
2625
|
+
* Execute the extraction workflow
|
|
2626
|
+
*/
|
|
2627
|
+
async execute(options) {
|
|
2628
|
+
this.validateOptions(options);
|
|
2629
|
+
const config = {
|
|
2630
|
+
...DEFAULT_OPTIONS,
|
|
2631
|
+
...options
|
|
2632
|
+
};
|
|
2633
|
+
try {
|
|
2634
|
+
const entityPrediction = await this.entityDetector.fetchEntityFields({
|
|
2635
|
+
link: config.urls[0],
|
|
2636
|
+
location: config.location,
|
|
2637
|
+
navigationMode: config.navigationMode
|
|
2638
|
+
});
|
|
2639
|
+
this.client.emit(
|
|
2640
|
+
"entity:detected",
|
|
2192
2641
|
{
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
finalState: workflow.state,
|
|
2197
|
-
recordCount: data?.length
|
|
2642
|
+
entity: entityPrediction.entity,
|
|
2643
|
+
fields: entityPrediction.fields,
|
|
2644
|
+
url: config.urls[0]
|
|
2198
2645
|
},
|
|
2199
|
-
"extraction"
|
|
2646
|
+
"extraction",
|
|
2647
|
+
{
|
|
2648
|
+
navigationMode: config.navigationMode,
|
|
2649
|
+
location: config.location
|
|
2650
|
+
}
|
|
2200
2651
|
);
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2652
|
+
const workflowId = await this.workflowManager.createWorkflow({
|
|
2653
|
+
entity: entityPrediction.entity,
|
|
2654
|
+
fields: entityPrediction.fields,
|
|
2655
|
+
...config
|
|
2656
|
+
});
|
|
2657
|
+
this.client.emit(
|
|
2658
|
+
"extraction:started",
|
|
2204
2659
|
{
|
|
2205
2660
|
workflowId,
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
finalState: workflow.state,
|
|
2209
|
-
error: `Extraction completed with unexpected status: ${workflow.runState}`
|
|
2661
|
+
name: config.name,
|
|
2662
|
+
urls: config.urls
|
|
2210
2663
|
},
|
|
2211
2664
|
"extraction"
|
|
2212
2665
|
);
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2666
|
+
const workflow = await this.workflowManager.waitForWorkflowCompletion(
|
|
2667
|
+
workflowId,
|
|
2668
|
+
config.pollingInterval,
|
|
2669
|
+
config.maxWaitTime
|
|
2670
|
+
);
|
|
2671
|
+
let data;
|
|
2672
|
+
let pagination;
|
|
2673
|
+
const isSuccess = this.isExtractionSuccessful(workflow.runState);
|
|
2674
|
+
if (isSuccess) {
|
|
2675
|
+
const dataPage = await this.fetchDataQuery.execute({ workflowId });
|
|
2676
|
+
data = dataPage.data;
|
|
2677
|
+
pagination = dataPage.pagination;
|
|
2678
|
+
if (data) {
|
|
2679
|
+
const isPartial = pagination?.totalCount && data.length < pagination.totalCount;
|
|
2680
|
+
this.client.emit(
|
|
2681
|
+
"extraction:data_available",
|
|
2682
|
+
{
|
|
2683
|
+
workflowId,
|
|
2684
|
+
recordCount: data.length,
|
|
2685
|
+
isPartial: !!isPartial,
|
|
2686
|
+
totalCount: pagination?.totalCount
|
|
2687
|
+
},
|
|
2688
|
+
"extraction"
|
|
2689
|
+
);
|
|
2690
|
+
}
|
|
2691
|
+
this.client.emit(
|
|
2692
|
+
"extraction:completed",
|
|
2693
|
+
{
|
|
2218
2694
|
workflowId,
|
|
2219
|
-
|
|
2220
|
-
|
|
2695
|
+
success: true,
|
|
2696
|
+
finalRunState: workflow.runState,
|
|
2697
|
+
finalState: workflow.state,
|
|
2698
|
+
recordCount: data?.length
|
|
2699
|
+
},
|
|
2700
|
+
"extraction"
|
|
2701
|
+
);
|
|
2702
|
+
} else {
|
|
2703
|
+
this.client.emit(
|
|
2704
|
+
"extraction:completed",
|
|
2705
|
+
{
|
|
2706
|
+
workflowId,
|
|
2707
|
+
success: false,
|
|
2708
|
+
finalRunState: workflow.runState,
|
|
2709
|
+
finalState: workflow.state,
|
|
2710
|
+
error: `Extraction completed with unexpected status: ${workflow.runState}`
|
|
2711
|
+
},
|
|
2712
|
+
"extraction"
|
|
2713
|
+
);
|
|
2714
|
+
throw new KadoaSdkException(
|
|
2715
|
+
`${ERROR_MESSAGES.WORKFLOW_UNEXPECTED_STATUS}: ${workflow.runState}`,
|
|
2716
|
+
{
|
|
2717
|
+
code: "INTERNAL_ERROR",
|
|
2718
|
+
details: {
|
|
2719
|
+
workflowId,
|
|
2720
|
+
runState: workflow.runState,
|
|
2721
|
+
state: workflow.state
|
|
2722
|
+
}
|
|
2221
2723
|
}
|
|
2222
|
-
|
|
2223
|
-
|
|
2724
|
+
);
|
|
2725
|
+
}
|
|
2726
|
+
return {
|
|
2727
|
+
workflowId,
|
|
2728
|
+
workflow,
|
|
2729
|
+
data,
|
|
2730
|
+
pagination
|
|
2731
|
+
};
|
|
2732
|
+
} catch (error) {
|
|
2733
|
+
throw KadoaHttpException.wrap(error, {
|
|
2734
|
+
message: ERROR_MESSAGES.EXTRACTION_FAILED,
|
|
2735
|
+
details: { urls: options.urls }
|
|
2736
|
+
});
|
|
2224
2737
|
}
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2738
|
+
}
|
|
2739
|
+
/**
|
|
2740
|
+
* Validates extraction options
|
|
2741
|
+
* @private
|
|
2742
|
+
*/
|
|
2743
|
+
validateOptions(options) {
|
|
2744
|
+
if (!options.urls || options.urls.length === 0) {
|
|
2745
|
+
throw new KadoaSdkException(ERROR_MESSAGES.NO_URLS, {
|
|
2746
|
+
code: "VALIDATION_ERROR"
|
|
2747
|
+
});
|
|
2748
|
+
}
|
|
2749
|
+
}
|
|
2750
|
+
/**
|
|
2751
|
+
* Checks if extraction was successful
|
|
2752
|
+
* @private
|
|
2753
|
+
*/
|
|
2754
|
+
isExtractionSuccessful(runState) {
|
|
2755
|
+
return runState ? SUCCESSFUL_RUN_STATES.has(runState.toUpperCase()) : false;
|
|
2756
|
+
}
|
|
2757
|
+
};
|
|
2758
|
+
|
|
2759
|
+
// src/modules/extraction/extraction.module.ts
|
|
2760
|
+
var ExtractionModule = class {
|
|
2761
|
+
constructor(client) {
|
|
2762
|
+
this.runExtractionCommand = new RunExtractionCommand(client);
|
|
2763
|
+
this.fetchDataQuery = new FetchDataQuery(client);
|
|
2764
|
+
}
|
|
2765
|
+
/**
|
|
2766
|
+
* Run extraction workflow using dynamic entity detection
|
|
2767
|
+
*
|
|
2768
|
+
* @param options Extraction configuration options
|
|
2769
|
+
* @returns ExtractionResult containing workflow ID, workflow details, and first page of extracted data
|
|
2770
|
+
*
|
|
2771
|
+
* @example
|
|
2772
|
+
* ```typescript
|
|
2773
|
+
* const result = await client.extraction.run({
|
|
2774
|
+
* urls: ['https://example.com'],
|
|
2775
|
+
* name: 'My Extraction'
|
|
2776
|
+
* });
|
|
2777
|
+
* ```
|
|
2778
|
+
*/
|
|
2779
|
+
async run(options) {
|
|
2780
|
+
return this.runExtractionCommand.execute(options);
|
|
2781
|
+
}
|
|
2782
|
+
/**
|
|
2783
|
+
* Fetch paginated data from a workflow
|
|
2784
|
+
*
|
|
2785
|
+
* @param options Options for fetching data including workflowId and pagination parameters
|
|
2786
|
+
* @returns Paginated workflow data with metadata
|
|
2787
|
+
*
|
|
2788
|
+
* @example
|
|
2789
|
+
* ```typescript
|
|
2790
|
+
* // Fetch first page
|
|
2791
|
+
* const firstPage = await client.extraction.fetchData({
|
|
2792
|
+
* workflowId: 'workflow-id',
|
|
2793
|
+
* page: 1,
|
|
2794
|
+
* limit: 100
|
|
2795
|
+
* });
|
|
2796
|
+
*
|
|
2797
|
+
* // Iterate through all pages
|
|
2798
|
+
* for await (const page of client.extraction.fetchDataPages({ workflowId: 'workflow-id' })) {
|
|
2799
|
+
* console.log(`Processing ${page.data.length} records`);
|
|
2800
|
+
* }
|
|
2801
|
+
* ```
|
|
2802
|
+
*/
|
|
2803
|
+
async fetchData(options) {
|
|
2804
|
+
return this.fetchDataQuery.execute(options);
|
|
2805
|
+
}
|
|
2806
|
+
/**
|
|
2807
|
+
* Fetch all data from a workflow across all pages
|
|
2808
|
+
*
|
|
2809
|
+
* @param options Options for fetching data
|
|
2810
|
+
* @returns All workflow data combined from all pages
|
|
2811
|
+
*
|
|
2812
|
+
* @example
|
|
2813
|
+
* ```typescript
|
|
2814
|
+
* const allData = await client.extraction.fetchAllData({
|
|
2815
|
+
* workflowId: 'workflow-id'
|
|
2816
|
+
* });
|
|
2817
|
+
* ```
|
|
2818
|
+
*/
|
|
2819
|
+
async fetchAllData(options) {
|
|
2820
|
+
return this.fetchDataQuery.fetchAll(options);
|
|
2821
|
+
}
|
|
2822
|
+
/**
|
|
2823
|
+
* Create an async iterator for paginated data fetching
|
|
2824
|
+
*
|
|
2825
|
+
* @param options Options for fetching data
|
|
2826
|
+
* @returns Async iterator that yields pages of data
|
|
2827
|
+
*
|
|
2828
|
+
* @example
|
|
2829
|
+
* ```typescript
|
|
2830
|
+
* for await (const page of client.extraction.fetchDataPages({ workflowId: 'workflow-id' })) {
|
|
2831
|
+
* console.log(`Page ${page.pagination.page}: ${page.data.length} records`);
|
|
2832
|
+
* }
|
|
2833
|
+
* ```
|
|
2834
|
+
*/
|
|
2835
|
+
fetchDataPages(options) {
|
|
2836
|
+
return this.fetchDataQuery.pages(options);
|
|
2837
|
+
}
|
|
2838
|
+
};
|
|
2839
|
+
|
|
2840
|
+
// src/version.ts
|
|
2841
|
+
var SDK_VERSION = "0.5.0";
|
|
2842
|
+
var SDK_NAME = "kadoa-node-sdk";
|
|
2843
|
+
var SDK_LANGUAGE = "node";
|
|
2844
|
+
|
|
2845
|
+
// src/kadoa-client.ts
|
|
2846
|
+
var KadoaClient = class {
|
|
2847
|
+
constructor(config) {
|
|
2848
|
+
this._baseUrl = config.baseUrl || "https://api.kadoa.com";
|
|
2849
|
+
this._timeout = config.timeout || 3e4;
|
|
2850
|
+
const configParams = {
|
|
2851
|
+
apiKey: config.apiKey,
|
|
2852
|
+
basePath: this._baseUrl,
|
|
2853
|
+
baseOptions: {
|
|
2854
|
+
headers: {
|
|
2855
|
+
"User-Agent": `${SDK_NAME}/${SDK_VERSION}`,
|
|
2856
|
+
"X-SDK-Version": SDK_VERSION,
|
|
2857
|
+
"X-SDK-Language": SDK_LANGUAGE
|
|
2858
|
+
}
|
|
2859
|
+
}
|
|
2229
2860
|
};
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2861
|
+
this._configuration = new Configuration(configParams);
|
|
2862
|
+
this._axiosInstance = globalAxios3__default.default.create({
|
|
2863
|
+
timeout: this._timeout,
|
|
2864
|
+
headers: {
|
|
2865
|
+
"User-Agent": `${SDK_NAME}/${SDK_VERSION}`,
|
|
2866
|
+
"X-SDK-Version": SDK_VERSION,
|
|
2867
|
+
"X-SDK-Language": SDK_LANGUAGE
|
|
2868
|
+
}
|
|
2234
2869
|
});
|
|
2870
|
+
this._events = new KadoaEventEmitter();
|
|
2871
|
+
this._workflowsApi = config.apiOverrides?.workflows || new WorkflowsApi(this._configuration, this._baseUrl, this._axiosInstance);
|
|
2872
|
+
this._crawlApi = config.apiOverrides?.crawl || new CrawlApi(this._configuration, this._baseUrl, this._axiosInstance);
|
|
2873
|
+
this.extraction = new ExtractionModule(this);
|
|
2235
2874
|
}
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
const configuration = new Configuration(configParams);
|
|
2244
|
-
const axiosInstance = globalAxios2__default.default.create({
|
|
2245
|
-
timeout: config.timeout || 3e4
|
|
2246
|
-
});
|
|
2247
|
-
const events = new KadoaEventEmitter();
|
|
2248
|
-
return {
|
|
2249
|
-
configuration,
|
|
2250
|
-
axiosInstance,
|
|
2251
|
-
baseUrl,
|
|
2252
|
-
events,
|
|
2253
|
-
emit: (eventName, payload, source, metadata) => {
|
|
2254
|
-
events.emit(eventName, payload, source, metadata);
|
|
2255
|
-
},
|
|
2256
|
-
onEvent: (listener) => {
|
|
2257
|
-
events.onEvent(listener);
|
|
2258
|
-
},
|
|
2259
|
-
offEvent: (listener) => {
|
|
2260
|
-
events.offEvent(listener);
|
|
2261
|
-
}
|
|
2262
|
-
};
|
|
2263
|
-
}
|
|
2264
|
-
function dispose(sdkInstance) {
|
|
2265
|
-
if (sdkInstance?.events) {
|
|
2266
|
-
sdkInstance.events.removeAllListeners();
|
|
2875
|
+
/**
|
|
2876
|
+
* Register an event listener
|
|
2877
|
+
*
|
|
2878
|
+
* @param listener Function to handle events
|
|
2879
|
+
*/
|
|
2880
|
+
onEvent(listener) {
|
|
2881
|
+
this._events.onEvent(listener);
|
|
2267
2882
|
}
|
|
2268
|
-
|
|
2883
|
+
/**
|
|
2884
|
+
* Remove an event listener
|
|
2885
|
+
*
|
|
2886
|
+
* @param listener Function to remove from event handlers
|
|
2887
|
+
*/
|
|
2888
|
+
offEvent(listener) {
|
|
2889
|
+
this._events.offEvent(listener);
|
|
2890
|
+
}
|
|
2891
|
+
/**
|
|
2892
|
+
* Emit an event
|
|
2893
|
+
* @internal
|
|
2894
|
+
*
|
|
2895
|
+
* @param eventName The name of the event
|
|
2896
|
+
* @param payload The event payload
|
|
2897
|
+
* @param source Optional source identifier
|
|
2898
|
+
* @param metadata Optional metadata
|
|
2899
|
+
*/
|
|
2900
|
+
emit(eventName, payload, source, metadata) {
|
|
2901
|
+
this._events.emit(eventName, payload, source, metadata);
|
|
2902
|
+
}
|
|
2903
|
+
/**
|
|
2904
|
+
* Get the underlying configuration
|
|
2905
|
+
*
|
|
2906
|
+
* @returns The configuration object
|
|
2907
|
+
*/
|
|
2908
|
+
get configuration() {
|
|
2909
|
+
return this._configuration;
|
|
2910
|
+
}
|
|
2911
|
+
/**
|
|
2912
|
+
* Get the axios instance
|
|
2913
|
+
*
|
|
2914
|
+
* @returns The axios instance
|
|
2915
|
+
*/
|
|
2916
|
+
get axiosInstance() {
|
|
2917
|
+
return this._axiosInstance;
|
|
2918
|
+
}
|
|
2919
|
+
/**
|
|
2920
|
+
* Get the base URL
|
|
2921
|
+
*
|
|
2922
|
+
* @returns The base URL
|
|
2923
|
+
*/
|
|
2924
|
+
get baseUrl() {
|
|
2925
|
+
return this._baseUrl;
|
|
2926
|
+
}
|
|
2927
|
+
/**
|
|
2928
|
+
* Get the timeout value
|
|
2929
|
+
*
|
|
2930
|
+
* @returns The timeout in milliseconds
|
|
2931
|
+
*/
|
|
2932
|
+
get timeout() {
|
|
2933
|
+
return this._timeout;
|
|
2934
|
+
}
|
|
2935
|
+
/**
|
|
2936
|
+
* Get the event emitter
|
|
2937
|
+
* @internal
|
|
2938
|
+
*
|
|
2939
|
+
* @returns The event emitter
|
|
2940
|
+
*/
|
|
2941
|
+
get events() {
|
|
2942
|
+
return this._events;
|
|
2943
|
+
}
|
|
2944
|
+
/**
|
|
2945
|
+
* Get the workflows API
|
|
2946
|
+
*/
|
|
2947
|
+
get workflows() {
|
|
2948
|
+
return this._workflowsApi;
|
|
2949
|
+
}
|
|
2950
|
+
/**
|
|
2951
|
+
* Get the crawl API
|
|
2952
|
+
*/
|
|
2953
|
+
get crawl() {
|
|
2954
|
+
return this._crawlApi;
|
|
2955
|
+
}
|
|
2956
|
+
/**
|
|
2957
|
+
* Dispose of the client and clean up resources
|
|
2958
|
+
*/
|
|
2959
|
+
dispose() {
|
|
2960
|
+
this._events?.removeAllListeners();
|
|
2961
|
+
}
|
|
2962
|
+
};
|
|
2269
2963
|
|
|
2964
|
+
exports.ERROR_MESSAGES = ERROR_MESSAGES;
|
|
2965
|
+
exports.KadoaClient = KadoaClient;
|
|
2270
2966
|
exports.KadoaEventEmitter = KadoaEventEmitter;
|
|
2271
2967
|
exports.KadoaHttpException = KadoaHttpException;
|
|
2272
2968
|
exports.KadoaSdkException = KadoaSdkException;
|
|
2273
|
-
exports.dispose = dispose;
|
|
2274
|
-
exports.initializeSdk = initializeSdk;
|
|
2275
|
-
exports.isKadoaHttpException = isKadoaHttpException;
|
|
2276
|
-
exports.isKadoaSdkException = isKadoaSdkException;
|
|
2277
|
-
exports.runExtraction = runExtraction;
|
|
2278
2969
|
//# sourceMappingURL=index.js.map
|
|
2279
2970
|
//# sourceMappingURL=index.js.map
|