@kadoa/node-sdk 0.4.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/dist/index.d.mts +4612 -294
- package/dist/index.d.ts +4612 -294
- package/dist/index.js +602 -80
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +600 -78
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -2
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
|
-
import
|
|
2
|
+
import globalAxios3, { isAxiosError } from 'axios';
|
|
3
3
|
import { URL, URLSearchParams } from 'url';
|
|
4
|
-
import { merge } from 'es-toolkit/object';
|
|
5
4
|
|
|
6
5
|
// src/core/events/event-emitter.ts
|
|
7
6
|
var KadoaEventEmitter = class extends EventEmitter {
|
|
@@ -211,7 +210,7 @@ var KadoaHttpException = class _KadoaHttpException extends KadoaSdkException {
|
|
|
211
210
|
};
|
|
212
211
|
var BASE_PATH = "https://api.kadoa.com".replace(/\/+$/, "");
|
|
213
212
|
var BaseAPI = class {
|
|
214
|
-
constructor(configuration, basePath = BASE_PATH, axios2 =
|
|
213
|
+
constructor(configuration, basePath = BASE_PATH, axios2 = globalAxios3) {
|
|
215
214
|
this.basePath = basePath;
|
|
216
215
|
this.axios = axios2;
|
|
217
216
|
if (configuration) {
|
|
@@ -277,12 +276,389 @@ var serializeDataIfNeeded = function(value, requestOptions, configuration) {
|
|
|
277
276
|
var toPathString = function(url) {
|
|
278
277
|
return url.pathname + url.search + url.hash;
|
|
279
278
|
};
|
|
280
|
-
var createRequestFunction = function(axiosArgs,
|
|
281
|
-
return (axios2 =
|
|
279
|
+
var createRequestFunction = function(axiosArgs, globalAxios4, BASE_PATH2, configuration) {
|
|
280
|
+
return (axios2 = globalAxios4, basePath = BASE_PATH2) => {
|
|
282
281
|
const axiosRequestArgs = { ...axiosArgs.options, url: (axios2.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url };
|
|
283
282
|
return axios2.request(axiosRequestArgs);
|
|
284
283
|
};
|
|
285
284
|
};
|
|
285
|
+
var CrawlApiAxiosParamCreator = function(configuration) {
|
|
286
|
+
return {
|
|
287
|
+
/**
|
|
288
|
+
* Pauses a currently active crawling session identified by the provided session ID.
|
|
289
|
+
* @summary Pause an active crawling session
|
|
290
|
+
* @param {string} xApiKey API key for authentication
|
|
291
|
+
* @param {V4CrawlPausePostRequest} v4CrawlPausePostRequest
|
|
292
|
+
* @param {*} [options] Override http request option.
|
|
293
|
+
* @throws {RequiredError}
|
|
294
|
+
*/
|
|
295
|
+
v4CrawlPausePost: async (xApiKey, v4CrawlPausePostRequest, options = {}) => {
|
|
296
|
+
assertParamExists("v4CrawlPausePost", "xApiKey", xApiKey);
|
|
297
|
+
assertParamExists("v4CrawlPausePost", "v4CrawlPausePostRequest", v4CrawlPausePostRequest);
|
|
298
|
+
const localVarPath = `/v4/crawl/pause`;
|
|
299
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
300
|
+
let baseOptions;
|
|
301
|
+
if (configuration) {
|
|
302
|
+
baseOptions = configuration.baseOptions;
|
|
303
|
+
}
|
|
304
|
+
const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
|
|
305
|
+
const localVarHeaderParameter = {};
|
|
306
|
+
const localVarQueryParameter = {};
|
|
307
|
+
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
308
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
309
|
+
if (xApiKey != null) {
|
|
310
|
+
localVarHeaderParameter["x-api-key"] = String(xApiKey);
|
|
311
|
+
}
|
|
312
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
313
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
314
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
315
|
+
localVarRequestOptions.data = serializeDataIfNeeded(v4CrawlPausePostRequest, localVarRequestOptions, configuration);
|
|
316
|
+
return {
|
|
317
|
+
url: toPathString(localVarUrlObj),
|
|
318
|
+
options: localVarRequestOptions
|
|
319
|
+
};
|
|
320
|
+
},
|
|
321
|
+
/**
|
|
322
|
+
* Initiates a crawling session with the specified URL and optional filters for paths.
|
|
323
|
+
* @summary Start a new crawling session
|
|
324
|
+
* @param {string} xApiKey API key for authentication
|
|
325
|
+
* @param {V4CrawlPostRequest} v4CrawlPostRequest
|
|
326
|
+
* @param {*} [options] Override http request option.
|
|
327
|
+
* @throws {RequiredError}
|
|
328
|
+
*/
|
|
329
|
+
v4CrawlPost: async (xApiKey, v4CrawlPostRequest, options = {}) => {
|
|
330
|
+
assertParamExists("v4CrawlPost", "xApiKey", xApiKey);
|
|
331
|
+
assertParamExists("v4CrawlPost", "v4CrawlPostRequest", v4CrawlPostRequest);
|
|
332
|
+
const localVarPath = `/v4/crawl`;
|
|
333
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
334
|
+
let baseOptions;
|
|
335
|
+
if (configuration) {
|
|
336
|
+
baseOptions = configuration.baseOptions;
|
|
337
|
+
}
|
|
338
|
+
const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
|
|
339
|
+
const localVarHeaderParameter = {};
|
|
340
|
+
const localVarQueryParameter = {};
|
|
341
|
+
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
342
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
343
|
+
if (xApiKey != null) {
|
|
344
|
+
localVarHeaderParameter["x-api-key"] = String(xApiKey);
|
|
345
|
+
}
|
|
346
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
347
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
348
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
349
|
+
localVarRequestOptions.data = serializeDataIfNeeded(v4CrawlPostRequest, localVarRequestOptions, configuration);
|
|
350
|
+
return {
|
|
351
|
+
url: toPathString(localVarUrlObj),
|
|
352
|
+
options: localVarRequestOptions
|
|
353
|
+
};
|
|
354
|
+
},
|
|
355
|
+
/**
|
|
356
|
+
* Resumes a previously paused crawling session identified by the provided session ID.
|
|
357
|
+
* @summary Resume a paused crawling session
|
|
358
|
+
* @param {string} xApiKey API key for authentication
|
|
359
|
+
* @param {V4CrawlResumePostRequest} v4CrawlResumePostRequest
|
|
360
|
+
* @param {*} [options] Override http request option.
|
|
361
|
+
* @throws {RequiredError}
|
|
362
|
+
*/
|
|
363
|
+
v4CrawlResumePost: async (xApiKey, v4CrawlResumePostRequest, options = {}) => {
|
|
364
|
+
assertParamExists("v4CrawlResumePost", "xApiKey", xApiKey);
|
|
365
|
+
assertParamExists("v4CrawlResumePost", "v4CrawlResumePostRequest", v4CrawlResumePostRequest);
|
|
366
|
+
const localVarPath = `/v4/crawl/resume`;
|
|
367
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
368
|
+
let baseOptions;
|
|
369
|
+
if (configuration) {
|
|
370
|
+
baseOptions = configuration.baseOptions;
|
|
371
|
+
}
|
|
372
|
+
const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
|
|
373
|
+
const localVarHeaderParameter = {};
|
|
374
|
+
const localVarQueryParameter = {};
|
|
375
|
+
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
376
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
377
|
+
if (xApiKey != null) {
|
|
378
|
+
localVarHeaderParameter["x-api-key"] = String(xApiKey);
|
|
379
|
+
}
|
|
380
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
381
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
382
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
383
|
+
localVarRequestOptions.data = serializeDataIfNeeded(v4CrawlResumePostRequest, localVarRequestOptions, configuration);
|
|
384
|
+
return {
|
|
385
|
+
url: toPathString(localVarUrlObj),
|
|
386
|
+
options: localVarRequestOptions
|
|
387
|
+
};
|
|
388
|
+
},
|
|
389
|
+
/**
|
|
390
|
+
* Fetches paginated data of crawled pages for a specific crawling session.
|
|
391
|
+
* @summary Retrieve crawled pages from a crawling session
|
|
392
|
+
* @param {string} xApiKey API key for authentication
|
|
393
|
+
* @param {string} sessionId Unique ID of the crawling session
|
|
394
|
+
* @param {number} [currentPage] Current page number for pagination
|
|
395
|
+
* @param {number} [pageSize] Number of items per page for pagination
|
|
396
|
+
* @param {*} [options] Override http request option.
|
|
397
|
+
* @throws {RequiredError}
|
|
398
|
+
*/
|
|
399
|
+
v4CrawlSessionIdPagesGet: async (xApiKey, sessionId, currentPage, pageSize, options = {}) => {
|
|
400
|
+
assertParamExists("v4CrawlSessionIdPagesGet", "xApiKey", xApiKey);
|
|
401
|
+
assertParamExists("v4CrawlSessionIdPagesGet", "sessionId", sessionId);
|
|
402
|
+
const localVarPath = `/v4/crawl/{sessionId}/pages`.replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId)));
|
|
403
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
404
|
+
let baseOptions;
|
|
405
|
+
if (configuration) {
|
|
406
|
+
baseOptions = configuration.baseOptions;
|
|
407
|
+
}
|
|
408
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
409
|
+
const localVarHeaderParameter = {};
|
|
410
|
+
const localVarQueryParameter = {};
|
|
411
|
+
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
412
|
+
if (currentPage !== void 0) {
|
|
413
|
+
localVarQueryParameter["currentPage"] = currentPage;
|
|
414
|
+
}
|
|
415
|
+
if (pageSize !== void 0) {
|
|
416
|
+
localVarQueryParameter["pageSize"] = pageSize;
|
|
417
|
+
}
|
|
418
|
+
if (xApiKey != null) {
|
|
419
|
+
localVarHeaderParameter["x-api-key"] = String(xApiKey);
|
|
420
|
+
}
|
|
421
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
422
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
423
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
424
|
+
return {
|
|
425
|
+
url: toPathString(localVarUrlObj),
|
|
426
|
+
options: localVarRequestOptions
|
|
427
|
+
};
|
|
428
|
+
},
|
|
429
|
+
/**
|
|
430
|
+
* Fetches data for a specific page from a crawling session by page ID, optionally allowing format specification.
|
|
431
|
+
* @summary Retrieve detailed data for a specific crawled page
|
|
432
|
+
* @param {string} xApiKey API key for authentication
|
|
433
|
+
* @param {string} sessionId Unique ID of the crawling session
|
|
434
|
+
* @param {string} pageId Unique ID of the crawled page
|
|
435
|
+
* @param {string} [format] Desired format for the page data
|
|
436
|
+
* @param {*} [options] Override http request option.
|
|
437
|
+
* @throws {RequiredError}
|
|
438
|
+
*/
|
|
439
|
+
v4CrawlSessionIdPagesPageIdGet: async (xApiKey, sessionId, pageId, format, options = {}) => {
|
|
440
|
+
assertParamExists("v4CrawlSessionIdPagesPageIdGet", "xApiKey", xApiKey);
|
|
441
|
+
assertParamExists("v4CrawlSessionIdPagesPageIdGet", "sessionId", sessionId);
|
|
442
|
+
assertParamExists("v4CrawlSessionIdPagesPageIdGet", "pageId", pageId);
|
|
443
|
+
const localVarPath = `/v4/crawl/{sessionId}/pages/{pageId}`.replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId))).replace(`{${"pageId"}}`, encodeURIComponent(String(pageId)));
|
|
444
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
445
|
+
let baseOptions;
|
|
446
|
+
if (configuration) {
|
|
447
|
+
baseOptions = configuration.baseOptions;
|
|
448
|
+
}
|
|
449
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
450
|
+
const localVarHeaderParameter = {};
|
|
451
|
+
const localVarQueryParameter = {};
|
|
452
|
+
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
453
|
+
if (format !== void 0) {
|
|
454
|
+
localVarQueryParameter["format"] = format;
|
|
455
|
+
}
|
|
456
|
+
if (xApiKey != null) {
|
|
457
|
+
localVarHeaderParameter["x-api-key"] = String(xApiKey);
|
|
458
|
+
}
|
|
459
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
460
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
461
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
462
|
+
return {
|
|
463
|
+
url: toPathString(localVarUrlObj),
|
|
464
|
+
options: localVarRequestOptions
|
|
465
|
+
};
|
|
466
|
+
},
|
|
467
|
+
/**
|
|
468
|
+
* Fetches the current status of a specified crawling session using the session ID.
|
|
469
|
+
* @summary Retrieve the status of a crawling session
|
|
470
|
+
* @param {string} xApiKey API key for authentication
|
|
471
|
+
* @param {string} sessionId Unique ID of the crawling session
|
|
472
|
+
* @param {*} [options] Override http request option.
|
|
473
|
+
* @throws {RequiredError}
|
|
474
|
+
*/
|
|
475
|
+
v4CrawlSessionIdStatusGet: async (xApiKey, sessionId, options = {}) => {
|
|
476
|
+
assertParamExists("v4CrawlSessionIdStatusGet", "xApiKey", xApiKey);
|
|
477
|
+
assertParamExists("v4CrawlSessionIdStatusGet", "sessionId", sessionId);
|
|
478
|
+
const localVarPath = `/v4/crawl/{sessionId}/status`.replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId)));
|
|
479
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
480
|
+
let baseOptions;
|
|
481
|
+
if (configuration) {
|
|
482
|
+
baseOptions = configuration.baseOptions;
|
|
483
|
+
}
|
|
484
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
485
|
+
const localVarHeaderParameter = {};
|
|
486
|
+
const localVarQueryParameter = {};
|
|
487
|
+
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
|
|
488
|
+
if (xApiKey != null) {
|
|
489
|
+
localVarHeaderParameter["x-api-key"] = String(xApiKey);
|
|
490
|
+
}
|
|
491
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
492
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
493
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
494
|
+
return {
|
|
495
|
+
url: toPathString(localVarUrlObj),
|
|
496
|
+
options: localVarRequestOptions
|
|
497
|
+
};
|
|
498
|
+
}
|
|
499
|
+
};
|
|
500
|
+
};
|
|
501
|
+
var CrawlApiFp = function(configuration) {
|
|
502
|
+
const localVarAxiosParamCreator = CrawlApiAxiosParamCreator(configuration);
|
|
503
|
+
return {
|
|
504
|
+
/**
|
|
505
|
+
* Pauses a currently active crawling session identified by the provided session ID.
|
|
506
|
+
* @summary Pause an active crawling session
|
|
507
|
+
* @param {string} xApiKey API key for authentication
|
|
508
|
+
* @param {V4CrawlPausePostRequest} v4CrawlPausePostRequest
|
|
509
|
+
* @param {*} [options] Override http request option.
|
|
510
|
+
* @throws {RequiredError}
|
|
511
|
+
*/
|
|
512
|
+
async v4CrawlPausePost(xApiKey, v4CrawlPausePostRequest, options) {
|
|
513
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.v4CrawlPausePost(xApiKey, v4CrawlPausePostRequest, options);
|
|
514
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
515
|
+
const localVarOperationServerBasePath = operationServerMap["CrawlApi.v4CrawlPausePost"]?.[localVarOperationServerIndex]?.url;
|
|
516
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
517
|
+
},
|
|
518
|
+
/**
|
|
519
|
+
* Initiates a crawling session with the specified URL and optional filters for paths.
|
|
520
|
+
* @summary Start a new crawling session
|
|
521
|
+
* @param {string} xApiKey API key for authentication
|
|
522
|
+
* @param {V4CrawlPostRequest} v4CrawlPostRequest
|
|
523
|
+
* @param {*} [options] Override http request option.
|
|
524
|
+
* @throws {RequiredError}
|
|
525
|
+
*/
|
|
526
|
+
async v4CrawlPost(xApiKey, v4CrawlPostRequest, options) {
|
|
527
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.v4CrawlPost(xApiKey, v4CrawlPostRequest, options);
|
|
528
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
529
|
+
const localVarOperationServerBasePath = operationServerMap["CrawlApi.v4CrawlPost"]?.[localVarOperationServerIndex]?.url;
|
|
530
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
531
|
+
},
|
|
532
|
+
/**
|
|
533
|
+
* Resumes a previously paused crawling session identified by the provided session ID.
|
|
534
|
+
* @summary Resume a paused crawling session
|
|
535
|
+
* @param {string} xApiKey API key for authentication
|
|
536
|
+
* @param {V4CrawlResumePostRequest} v4CrawlResumePostRequest
|
|
537
|
+
* @param {*} [options] Override http request option.
|
|
538
|
+
* @throws {RequiredError}
|
|
539
|
+
*/
|
|
540
|
+
async v4CrawlResumePost(xApiKey, v4CrawlResumePostRequest, options) {
|
|
541
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.v4CrawlResumePost(xApiKey, v4CrawlResumePostRequest, options);
|
|
542
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
543
|
+
const localVarOperationServerBasePath = operationServerMap["CrawlApi.v4CrawlResumePost"]?.[localVarOperationServerIndex]?.url;
|
|
544
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
545
|
+
},
|
|
546
|
+
/**
|
|
547
|
+
* Fetches paginated data of crawled pages for a specific crawling session.
|
|
548
|
+
* @summary Retrieve crawled pages from a crawling session
|
|
549
|
+
* @param {string} xApiKey API key for authentication
|
|
550
|
+
* @param {string} sessionId Unique ID of the crawling session
|
|
551
|
+
* @param {number} [currentPage] Current page number for pagination
|
|
552
|
+
* @param {number} [pageSize] Number of items per page for pagination
|
|
553
|
+
* @param {*} [options] Override http request option.
|
|
554
|
+
* @throws {RequiredError}
|
|
555
|
+
*/
|
|
556
|
+
async v4CrawlSessionIdPagesGet(xApiKey, sessionId, currentPage, pageSize, options) {
|
|
557
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.v4CrawlSessionIdPagesGet(xApiKey, sessionId, currentPage, pageSize, options);
|
|
558
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
559
|
+
const localVarOperationServerBasePath = operationServerMap["CrawlApi.v4CrawlSessionIdPagesGet"]?.[localVarOperationServerIndex]?.url;
|
|
560
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
561
|
+
},
|
|
562
|
+
/**
|
|
563
|
+
* Fetches data for a specific page from a crawling session by page ID, optionally allowing format specification.
|
|
564
|
+
* @summary Retrieve detailed data for a specific crawled page
|
|
565
|
+
* @param {string} xApiKey API key for authentication
|
|
566
|
+
* @param {string} sessionId Unique ID of the crawling session
|
|
567
|
+
* @param {string} pageId Unique ID of the crawled page
|
|
568
|
+
* @param {string} [format] Desired format for the page data
|
|
569
|
+
* @param {*} [options] Override http request option.
|
|
570
|
+
* @throws {RequiredError}
|
|
571
|
+
*/
|
|
572
|
+
async v4CrawlSessionIdPagesPageIdGet(xApiKey, sessionId, pageId, format, options) {
|
|
573
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.v4CrawlSessionIdPagesPageIdGet(xApiKey, sessionId, pageId, format, options);
|
|
574
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
575
|
+
const localVarOperationServerBasePath = operationServerMap["CrawlApi.v4CrawlSessionIdPagesPageIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
576
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
577
|
+
},
|
|
578
|
+
/**
|
|
579
|
+
* Fetches the current status of a specified crawling session using the session ID.
|
|
580
|
+
* @summary Retrieve the status of a crawling session
|
|
581
|
+
* @param {string} xApiKey API key for authentication
|
|
582
|
+
* @param {string} sessionId Unique ID of the crawling session
|
|
583
|
+
* @param {*} [options] Override http request option.
|
|
584
|
+
* @throws {RequiredError}
|
|
585
|
+
*/
|
|
586
|
+
async v4CrawlSessionIdStatusGet(xApiKey, sessionId, options) {
|
|
587
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.v4CrawlSessionIdStatusGet(xApiKey, sessionId, options);
|
|
588
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
589
|
+
const localVarOperationServerBasePath = operationServerMap["CrawlApi.v4CrawlSessionIdStatusGet"]?.[localVarOperationServerIndex]?.url;
|
|
590
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
591
|
+
}
|
|
592
|
+
};
|
|
593
|
+
};
|
|
594
|
+
var CrawlApi = class extends BaseAPI {
|
|
595
|
+
/**
|
|
596
|
+
* Pauses a currently active crawling session identified by the provided session ID.
|
|
597
|
+
* @summary Pause an active crawling session
|
|
598
|
+
* @param {CrawlApiV4CrawlPausePostRequest} requestParameters Request parameters.
|
|
599
|
+
* @param {*} [options] Override http request option.
|
|
600
|
+
* @throws {RequiredError}
|
|
601
|
+
* @memberof CrawlApi
|
|
602
|
+
*/
|
|
603
|
+
v4CrawlPausePost(requestParameters, options) {
|
|
604
|
+
return CrawlApiFp(this.configuration).v4CrawlPausePost(requestParameters.xApiKey, requestParameters.v4CrawlPausePostRequest, options).then((request) => request(this.axios, this.basePath));
|
|
605
|
+
}
|
|
606
|
+
/**
|
|
607
|
+
* Initiates a crawling session with the specified URL and optional filters for paths.
|
|
608
|
+
* @summary Start a new crawling session
|
|
609
|
+
* @param {CrawlApiV4CrawlPostRequest} requestParameters Request parameters.
|
|
610
|
+
* @param {*} [options] Override http request option.
|
|
611
|
+
* @throws {RequiredError}
|
|
612
|
+
* @memberof CrawlApi
|
|
613
|
+
*/
|
|
614
|
+
v4CrawlPost(requestParameters, options) {
|
|
615
|
+
return CrawlApiFp(this.configuration).v4CrawlPost(requestParameters.xApiKey, requestParameters.v4CrawlPostRequest, options).then((request) => request(this.axios, this.basePath));
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* Resumes a previously paused crawling session identified by the provided session ID.
|
|
619
|
+
* @summary Resume a paused crawling session
|
|
620
|
+
* @param {CrawlApiV4CrawlResumePostRequest} requestParameters Request parameters.
|
|
621
|
+
* @param {*} [options] Override http request option.
|
|
622
|
+
* @throws {RequiredError}
|
|
623
|
+
* @memberof CrawlApi
|
|
624
|
+
*/
|
|
625
|
+
v4CrawlResumePost(requestParameters, options) {
|
|
626
|
+
return CrawlApiFp(this.configuration).v4CrawlResumePost(requestParameters.xApiKey, requestParameters.v4CrawlResumePostRequest, options).then((request) => request(this.axios, this.basePath));
|
|
627
|
+
}
|
|
628
|
+
/**
|
|
629
|
+
* Fetches paginated data of crawled pages for a specific crawling session.
|
|
630
|
+
* @summary Retrieve crawled pages from a crawling session
|
|
631
|
+
* @param {CrawlApiV4CrawlSessionIdPagesGetRequest} requestParameters Request parameters.
|
|
632
|
+
* @param {*} [options] Override http request option.
|
|
633
|
+
* @throws {RequiredError}
|
|
634
|
+
* @memberof CrawlApi
|
|
635
|
+
*/
|
|
636
|
+
v4CrawlSessionIdPagesGet(requestParameters, options) {
|
|
637
|
+
return CrawlApiFp(this.configuration).v4CrawlSessionIdPagesGet(requestParameters.xApiKey, requestParameters.sessionId, requestParameters.currentPage, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
|
|
638
|
+
}
|
|
639
|
+
/**
|
|
640
|
+
* Fetches data for a specific page from a crawling session by page ID, optionally allowing format specification.
|
|
641
|
+
* @summary Retrieve detailed data for a specific crawled page
|
|
642
|
+
* @param {CrawlApiV4CrawlSessionIdPagesPageIdGetRequest} requestParameters Request parameters.
|
|
643
|
+
* @param {*} [options] Override http request option.
|
|
644
|
+
* @throws {RequiredError}
|
|
645
|
+
* @memberof CrawlApi
|
|
646
|
+
*/
|
|
647
|
+
v4CrawlSessionIdPagesPageIdGet(requestParameters, options) {
|
|
648
|
+
return CrawlApiFp(this.configuration).v4CrawlSessionIdPagesPageIdGet(requestParameters.xApiKey, requestParameters.sessionId, requestParameters.pageId, requestParameters.format, options).then((request) => request(this.axios, this.basePath));
|
|
649
|
+
}
|
|
650
|
+
/**
|
|
651
|
+
* Fetches the current status of a specified crawling session using the session ID.
|
|
652
|
+
* @summary Retrieve the status of a crawling session
|
|
653
|
+
* @param {CrawlApiV4CrawlSessionIdStatusGetRequest} requestParameters Request parameters.
|
|
654
|
+
* @param {*} [options] Override http request option.
|
|
655
|
+
* @throws {RequiredError}
|
|
656
|
+
* @memberof CrawlApi
|
|
657
|
+
*/
|
|
658
|
+
v4CrawlSessionIdStatusGet(requestParameters, options) {
|
|
659
|
+
return CrawlApiFp(this.configuration).v4CrawlSessionIdStatusGet(requestParameters.xApiKey, requestParameters.sessionId, options).then((request) => request(this.axios, this.basePath));
|
|
660
|
+
}
|
|
661
|
+
};
|
|
286
662
|
var WorkflowsApiAxiosParamCreator = function(configuration) {
|
|
287
663
|
return {
|
|
288
664
|
/**
|
|
@@ -1216,7 +1592,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1216
1592
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4ChangesChangeIdGet(changeId, xApiKey, authorization, options);
|
|
1217
1593
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1218
1594
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4ChangesChangeIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
1219
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1595
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1220
1596
|
},
|
|
1221
1597
|
/**
|
|
1222
1598
|
*
|
|
@@ -1235,7 +1611,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1235
1611
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4ChangesGet(xApiKey, authorization, workflowIds, startDate, endDate, skip, limit, options);
|
|
1236
1612
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1237
1613
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4ChangesGet"]?.[localVarOperationServerIndex]?.url;
|
|
1238
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1614
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1239
1615
|
},
|
|
1240
1616
|
/**
|
|
1241
1617
|
* Retrieves a list of workflows with pagination and search capabilities
|
|
@@ -1257,7 +1633,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1257
1633
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsGet(search, skip, limit, state, tags, monitoring, updateInterval, templateId, includeDeleted, format, options);
|
|
1258
1634
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1259
1635
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsGet"]?.[localVarOperationServerIndex]?.url;
|
|
1260
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1636
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1261
1637
|
},
|
|
1262
1638
|
/**
|
|
1263
1639
|
*
|
|
@@ -1270,7 +1646,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1270
1646
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsPost(v4WorkflowsPostRequest, options);
|
|
1271
1647
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1272
1648
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsPost"]?.[localVarOperationServerIndex]?.url;
|
|
1273
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1649
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1274
1650
|
},
|
|
1275
1651
|
/**
|
|
1276
1652
|
*
|
|
@@ -1283,7 +1659,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1283
1659
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsSetupEditPost(v4WorkflowsSetupEditPostRequest, options);
|
|
1284
1660
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1285
1661
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsSetupEditPost"]?.[localVarOperationServerIndex]?.url;
|
|
1286
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1662
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1287
1663
|
},
|
|
1288
1664
|
/**
|
|
1289
1665
|
*
|
|
@@ -1296,7 +1672,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1296
1672
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsSetupPost(v4WorkflowsSetupPostRequest, options);
|
|
1297
1673
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1298
1674
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsSetupPost"]?.[localVarOperationServerIndex]?.url;
|
|
1299
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1675
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1300
1676
|
},
|
|
1301
1677
|
/**
|
|
1302
1678
|
*
|
|
@@ -1313,7 +1689,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1313
1689
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdAuditlogGet(workflowId, xApiKey, authorization, page, limit, options);
|
|
1314
1690
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1315
1691
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdAuditlogGet"]?.[localVarOperationServerIndex]?.url;
|
|
1316
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1692
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1317
1693
|
},
|
|
1318
1694
|
/**
|
|
1319
1695
|
*
|
|
@@ -1328,7 +1704,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1328
1704
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdComplianceApprovePut(workflowId, xApiKey, authorization, options);
|
|
1329
1705
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1330
1706
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdComplianceApprovePut"]?.[localVarOperationServerIndex]?.url;
|
|
1331
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1707
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1332
1708
|
},
|
|
1333
1709
|
/**
|
|
1334
1710
|
*
|
|
@@ -1344,7 +1720,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1344
1720
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdComplianceRejectPut(workflowId, v4WorkflowsWorkflowIdComplianceRejectPutRequest, xApiKey, authorization, options);
|
|
1345
1721
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1346
1722
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdComplianceRejectPut"]?.[localVarOperationServerIndex]?.url;
|
|
1347
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1723
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1348
1724
|
},
|
|
1349
1725
|
/**
|
|
1350
1726
|
*
|
|
@@ -1369,7 +1745,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1369
1745
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdDataGet(workflowId, xApiKey, authorization, runId, format, sortBy, order, filters, page, limit, gzip, rowIds, includeAnomalies, options);
|
|
1370
1746
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1371
1747
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdDataGet"]?.[localVarOperationServerIndex]?.url;
|
|
1372
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1748
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1373
1749
|
},
|
|
1374
1750
|
/**
|
|
1375
1751
|
*
|
|
@@ -1382,7 +1758,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1382
1758
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdDelete(workflowId, options);
|
|
1383
1759
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1384
1760
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdDelete"]?.[localVarOperationServerIndex]?.url;
|
|
1385
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1761
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1386
1762
|
},
|
|
1387
1763
|
/**
|
|
1388
1764
|
* Retrieves detailed information about a specific workflow. This endpoint requires authentication and proper team access permissions.
|
|
@@ -1395,7 +1771,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1395
1771
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdGet(workflowId, options);
|
|
1396
1772
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1397
1773
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
1398
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1774
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1399
1775
|
},
|
|
1400
1776
|
/**
|
|
1401
1777
|
*
|
|
@@ -1408,7 +1784,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1408
1784
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdHistoryGet(workflowId, options);
|
|
1409
1785
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1410
1786
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdHistoryGet"]?.[localVarOperationServerIndex]?.url;
|
|
1411
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1787
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1412
1788
|
},
|
|
1413
1789
|
/**
|
|
1414
1790
|
*
|
|
@@ -1422,7 +1798,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1422
1798
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdMetadataPut(workflowId, v4WorkflowsWorkflowIdMetadataPutRequest, options);
|
|
1423
1799
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1424
1800
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdMetadataPut"]?.[localVarOperationServerIndex]?.url;
|
|
1425
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1801
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1426
1802
|
},
|
|
1427
1803
|
/**
|
|
1428
1804
|
*
|
|
@@ -1435,7 +1811,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1435
1811
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdPausePut(workflowId, options);
|
|
1436
1812
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1437
1813
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdPausePut"]?.[localVarOperationServerIndex]?.url;
|
|
1438
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1814
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1439
1815
|
},
|
|
1440
1816
|
/**
|
|
1441
1817
|
* 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.
|
|
@@ -1448,7 +1824,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1448
1824
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdResumePut(workflowId, options);
|
|
1449
1825
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1450
1826
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdResumePut"]?.[localVarOperationServerIndex]?.url;
|
|
1451
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1827
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1452
1828
|
},
|
|
1453
1829
|
/**
|
|
1454
1830
|
*
|
|
@@ -1461,7 +1837,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1461
1837
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdRunPut(workflowId, options);
|
|
1462
1838
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1463
1839
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdRunPut"]?.[localVarOperationServerIndex]?.url;
|
|
1464
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1840
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1465
1841
|
},
|
|
1466
1842
|
/**
|
|
1467
1843
|
*
|
|
@@ -1475,7 +1851,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1475
1851
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdSchedulePut(workflowId, v4WorkflowsWorkflowIdSchedulePutRequest, options);
|
|
1476
1852
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1477
1853
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdSchedulePut"]?.[localVarOperationServerIndex]?.url;
|
|
1478
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1854
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1479
1855
|
},
|
|
1480
1856
|
/**
|
|
1481
1857
|
*
|
|
@@ -1490,7 +1866,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1490
1866
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5ChangesChangeIdGet(changeId, xApiKey, authorization, options);
|
|
1491
1867
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1492
1868
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5ChangesChangeIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
1493
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1869
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1494
1870
|
},
|
|
1495
1871
|
/**
|
|
1496
1872
|
*
|
|
@@ -1509,7 +1885,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1509
1885
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5ChangesGet(xApiKey, authorization, workflowIds, startDate, endDate, skip, limit, options);
|
|
1510
1886
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1511
1887
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5ChangesGet"]?.[localVarOperationServerIndex]?.url;
|
|
1512
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1888
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1513
1889
|
},
|
|
1514
1890
|
/**
|
|
1515
1891
|
* Permanently deletes a workflow and its associated tags
|
|
@@ -1522,7 +1898,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1522
1898
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsIdDelete(id, options);
|
|
1523
1899
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1524
1900
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsIdDelete"]?.[localVarOperationServerIndex]?.url;
|
|
1525
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1901
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1526
1902
|
},
|
|
1527
1903
|
/**
|
|
1528
1904
|
* Retrieves a specific workflow and its associated tags by ID
|
|
@@ -1535,7 +1911,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1535
1911
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsIdGet(id, options);
|
|
1536
1912
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1537
1913
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
1538
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1914
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1539
1915
|
},
|
|
1540
1916
|
/**
|
|
1541
1917
|
* Updates an existing workflow\'s properties
|
|
@@ -1549,7 +1925,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1549
1925
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsIdPut(id, v5WorkflowsIdPutRequest, options);
|
|
1550
1926
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1551
1927
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsIdPut"]?.[localVarOperationServerIndex]?.url;
|
|
1552
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1928
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1553
1929
|
},
|
|
1554
1930
|
/**
|
|
1555
1931
|
* Creates a new workflow in pending state
|
|
@@ -1562,7 +1938,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1562
1938
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsPost(v5WorkflowsPostRequest, options);
|
|
1563
1939
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1564
1940
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsPost"]?.[localVarOperationServerIndex]?.url;
|
|
1565
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1941
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1566
1942
|
},
|
|
1567
1943
|
/**
|
|
1568
1944
|
*
|
|
@@ -1579,7 +1955,7 @@ var WorkflowsApiFp = function(configuration) {
|
|
|
1579
1955
|
const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsWorkflowIdAuditlogGet(workflowId, xApiKey, authorization, page, limit, options);
|
|
1580
1956
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1581
1957
|
const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsWorkflowIdAuditlogGet"]?.[localVarOperationServerIndex]?.url;
|
|
1582
|
-
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs,
|
|
1958
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1583
1959
|
}
|
|
1584
1960
|
};
|
|
1585
1961
|
};
|
|
@@ -1898,48 +2274,124 @@ var Configuration = class {
|
|
|
1898
2274
|
var Command = class {
|
|
1899
2275
|
};
|
|
1900
2276
|
|
|
1901
|
-
// src/core/
|
|
1902
|
-
var
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
if (!api) {
|
|
1906
|
-
api = new WorkflowsApi(
|
|
1907
|
-
client.configuration,
|
|
1908
|
-
client.baseUrl,
|
|
1909
|
-
client.axiosInstance
|
|
1910
|
-
);
|
|
1911
|
-
workflowsApiCache.set(client, api);
|
|
2277
|
+
// src/core/pagination/paginator.ts
|
|
2278
|
+
var PagedIterator = class {
|
|
2279
|
+
constructor(fetchPage) {
|
|
2280
|
+
this.fetchPage = fetchPage;
|
|
1912
2281
|
}
|
|
1913
|
-
|
|
1914
|
-
|
|
2282
|
+
/**
|
|
2283
|
+
* Fetch all items across all pages
|
|
2284
|
+
* @param options Base options (page will be overridden)
|
|
2285
|
+
* @returns Array of all items
|
|
2286
|
+
*/
|
|
2287
|
+
async fetchAll(options = {}) {
|
|
2288
|
+
const allItems = [];
|
|
2289
|
+
let currentPage = 1;
|
|
2290
|
+
let hasMore = true;
|
|
2291
|
+
while (hasMore) {
|
|
2292
|
+
const result = await this.fetchPage({ ...options, page: currentPage });
|
|
2293
|
+
allItems.push(...result.data);
|
|
2294
|
+
const pagination = result.pagination;
|
|
2295
|
+
hasMore = pagination.page !== void 0 && pagination.totalPages !== void 0 && pagination.page < pagination.totalPages;
|
|
2296
|
+
currentPage++;
|
|
2297
|
+
}
|
|
2298
|
+
return allItems;
|
|
2299
|
+
}
|
|
2300
|
+
/**
|
|
2301
|
+
* Create an async iterator for pages
|
|
2302
|
+
* @param options Base options (page will be overridden)
|
|
2303
|
+
* @returns Async generator that yields pages
|
|
2304
|
+
*/
|
|
2305
|
+
async *pages(options = {}) {
|
|
2306
|
+
let currentPage = 1;
|
|
2307
|
+
let hasMore = true;
|
|
2308
|
+
while (hasMore) {
|
|
2309
|
+
const result = await this.fetchPage({ ...options, page: currentPage });
|
|
2310
|
+
yield result;
|
|
2311
|
+
const pagination = result.pagination;
|
|
2312
|
+
hasMore = pagination.page !== void 0 && pagination.totalPages !== void 0 && pagination.page < pagination.totalPages;
|
|
2313
|
+
currentPage++;
|
|
2314
|
+
}
|
|
2315
|
+
}
|
|
2316
|
+
/**
|
|
2317
|
+
* Create an async iterator for individual items
|
|
2318
|
+
* @param options Base options (page will be overridden)
|
|
2319
|
+
* @returns Async generator that yields items
|
|
2320
|
+
*/
|
|
2321
|
+
async *items(options = {}) {
|
|
2322
|
+
for await (const page of this.pages(options)) {
|
|
2323
|
+
for (const item of page.data) {
|
|
2324
|
+
yield item;
|
|
2325
|
+
}
|
|
2326
|
+
}
|
|
2327
|
+
}
|
|
2328
|
+
};
|
|
1915
2329
|
|
|
1916
|
-
// src/modules/extraction/
|
|
1917
|
-
var
|
|
2330
|
+
// src/modules/extraction/queries/fetch-data.query.ts
|
|
2331
|
+
var FetchDataQuery = class {
|
|
1918
2332
|
constructor(client) {
|
|
1919
2333
|
this.client = client;
|
|
2334
|
+
this.defaultLimit = 100;
|
|
1920
2335
|
}
|
|
1921
2336
|
/**
|
|
1922
|
-
* Fetch
|
|
2337
|
+
* Fetch a page of workflow data
|
|
1923
2338
|
*
|
|
1924
|
-
* @param
|
|
1925
|
-
* @
|
|
1926
|
-
* @returns Array of extracted data objects
|
|
2339
|
+
* @param options Options for fetching data
|
|
2340
|
+
* @returns Paginated workflow data
|
|
1927
2341
|
*/
|
|
1928
|
-
async
|
|
1929
|
-
const workflowsApi = getWorkflowsApi(this.client);
|
|
2342
|
+
async execute(options) {
|
|
1930
2343
|
try {
|
|
1931
|
-
const response = await
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
2344
|
+
const response = await this.client.workflows.v4WorkflowsWorkflowIdDataGet(
|
|
2345
|
+
{
|
|
2346
|
+
...options,
|
|
2347
|
+
page: options.page ?? 1,
|
|
2348
|
+
limit: options.limit ?? this.defaultLimit
|
|
2349
|
+
}
|
|
2350
|
+
);
|
|
2351
|
+
const result = response.data;
|
|
2352
|
+
return result;
|
|
1936
2353
|
} catch (error) {
|
|
1937
2354
|
throw KadoaHttpException.wrap(error, {
|
|
1938
2355
|
message: ERROR_MESSAGES.DATA_FETCH_FAILED,
|
|
1939
|
-
details: { workflowId,
|
|
2356
|
+
details: { workflowId: options.workflowId, page: options.page }
|
|
1940
2357
|
});
|
|
1941
2358
|
}
|
|
1942
2359
|
}
|
|
2360
|
+
/**
|
|
2361
|
+
* Internal method for iterator - executes a page fetch
|
|
2362
|
+
*/
|
|
2363
|
+
async executePage(options) {
|
|
2364
|
+
const result = await this.execute(options);
|
|
2365
|
+
return result;
|
|
2366
|
+
}
|
|
2367
|
+
/**
|
|
2368
|
+
* Fetch all pages of workflow data
|
|
2369
|
+
*
|
|
2370
|
+
* @param options Options for fetching data (page will be ignored)
|
|
2371
|
+
* @returns All workflow data across all pages
|
|
2372
|
+
*/
|
|
2373
|
+
async fetchAll(options) {
|
|
2374
|
+
const iterator = new PagedIterator(
|
|
2375
|
+
(pageOptions) => this.executePage({ ...options, ...pageOptions })
|
|
2376
|
+
);
|
|
2377
|
+
return iterator.fetchAll({ limit: options.limit ?? this.defaultLimit });
|
|
2378
|
+
}
|
|
2379
|
+
/**
|
|
2380
|
+
* Create an async iterator for paginated data fetching
|
|
2381
|
+
*
|
|
2382
|
+
* @param options Options for fetching data
|
|
2383
|
+
* @returns Async iterator that yields pages of data
|
|
2384
|
+
*/
|
|
2385
|
+
async *pages(options) {
|
|
2386
|
+
const iterator = new PagedIterator(
|
|
2387
|
+
(pageOptions) => this.execute({ ...options, ...pageOptions })
|
|
2388
|
+
);
|
|
2389
|
+
for await (const page of iterator.pages({
|
|
2390
|
+
limit: options.limit ?? this.defaultLimit
|
|
2391
|
+
})) {
|
|
2392
|
+
yield page;
|
|
2393
|
+
}
|
|
2394
|
+
}
|
|
1943
2395
|
};
|
|
1944
2396
|
|
|
1945
2397
|
// src/core/config/constants.ts
|
|
@@ -2053,7 +2505,6 @@ var WorkflowManagerService = class {
|
|
|
2053
2505
|
* Creates a new workflow with the provided configuration
|
|
2054
2506
|
*/
|
|
2055
2507
|
async createWorkflow(config) {
|
|
2056
|
-
const workflowsApi = getWorkflowsApi(this.client);
|
|
2057
2508
|
const request = {
|
|
2058
2509
|
urls: config.urls,
|
|
2059
2510
|
navigationMode: config.navigationMode,
|
|
@@ -2061,11 +2512,10 @@ var WorkflowManagerService = class {
|
|
|
2061
2512
|
name: config.name,
|
|
2062
2513
|
fields: config.fields,
|
|
2063
2514
|
bypassPreview: true,
|
|
2064
|
-
limit: config.maxRecords,
|
|
2065
2515
|
tags: ["sdk"]
|
|
2066
2516
|
};
|
|
2067
2517
|
try {
|
|
2068
|
-
const response = await
|
|
2518
|
+
const response = await this.client.workflows.v4WorkflowsPost({
|
|
2069
2519
|
v4WorkflowsPostRequest: request
|
|
2070
2520
|
});
|
|
2071
2521
|
const workflowId = response.data.workflowId;
|
|
@@ -2087,9 +2537,8 @@ var WorkflowManagerService = class {
|
|
|
2087
2537
|
* Gets the current status of a workflow
|
|
2088
2538
|
*/
|
|
2089
2539
|
async getWorkflowStatus(workflowId) {
|
|
2090
|
-
const workflowsApi = getWorkflowsApi(this.client);
|
|
2091
2540
|
try {
|
|
2092
|
-
const response = await
|
|
2541
|
+
const response = await this.client.workflows.v4WorkflowsWorkflowIdGet({
|
|
2093
2542
|
workflowId
|
|
2094
2543
|
});
|
|
2095
2544
|
return response.data;
|
|
@@ -2156,14 +2605,13 @@ var DEFAULT_OPTIONS = {
|
|
|
2156
2605
|
maxWaitTime: 3e5,
|
|
2157
2606
|
navigationMode: "single-page",
|
|
2158
2607
|
location: { type: "auto" },
|
|
2159
|
-
name: "Untitled Workflow"
|
|
2160
|
-
maxRecords: 1e3
|
|
2608
|
+
name: "Untitled Workflow"
|
|
2161
2609
|
};
|
|
2162
2610
|
var RunExtractionCommand = class extends Command {
|
|
2163
2611
|
constructor(client) {
|
|
2164
2612
|
super();
|
|
2165
2613
|
this.client = client;
|
|
2166
|
-
this.
|
|
2614
|
+
this.fetchDataQuery = new FetchDataQuery(client);
|
|
2167
2615
|
this.entityDetector = new EntityDetectorService(client);
|
|
2168
2616
|
this.workflowManager = new WorkflowManagerService(client);
|
|
2169
2617
|
}
|
|
@@ -2172,10 +2620,10 @@ var RunExtractionCommand = class extends Command {
|
|
|
2172
2620
|
*/
|
|
2173
2621
|
async execute(options) {
|
|
2174
2622
|
this.validateOptions(options);
|
|
2175
|
-
const config =
|
|
2176
|
-
DEFAULT_OPTIONS,
|
|
2177
|
-
options
|
|
2178
|
-
|
|
2623
|
+
const config = {
|
|
2624
|
+
...DEFAULT_OPTIONS,
|
|
2625
|
+
...options
|
|
2626
|
+
};
|
|
2179
2627
|
try {
|
|
2180
2628
|
const entityPrediction = await this.entityDetector.fetchEntityFields({
|
|
2181
2629
|
link: config.urls[0],
|
|
@@ -2215,19 +2663,21 @@ var RunExtractionCommand = class extends Command {
|
|
|
2215
2663
|
config.maxWaitTime
|
|
2216
2664
|
);
|
|
2217
2665
|
let data;
|
|
2666
|
+
let pagination;
|
|
2218
2667
|
const isSuccess = this.isExtractionSuccessful(workflow.runState);
|
|
2219
2668
|
if (isSuccess) {
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
);
|
|
2669
|
+
const dataPage = await this.fetchDataQuery.execute({ workflowId });
|
|
2670
|
+
data = dataPage.data;
|
|
2671
|
+
pagination = dataPage.pagination;
|
|
2224
2672
|
if (data) {
|
|
2673
|
+
const isPartial = pagination?.totalCount && data.length < pagination.totalCount;
|
|
2225
2674
|
this.client.emit(
|
|
2226
2675
|
"extraction:data_available",
|
|
2227
2676
|
{
|
|
2228
2677
|
workflowId,
|
|
2229
2678
|
recordCount: data.length,
|
|
2230
|
-
isPartial:
|
|
2679
|
+
isPartial: !!isPartial,
|
|
2680
|
+
totalCount: pagination?.totalCount
|
|
2231
2681
|
},
|
|
2232
2682
|
"extraction"
|
|
2233
2683
|
);
|
|
@@ -2270,7 +2720,8 @@ var RunExtractionCommand = class extends Command {
|
|
|
2270
2720
|
return {
|
|
2271
2721
|
workflowId,
|
|
2272
2722
|
workflow,
|
|
2273
|
-
data
|
|
2723
|
+
data,
|
|
2724
|
+
pagination
|
|
2274
2725
|
};
|
|
2275
2726
|
} catch (error) {
|
|
2276
2727
|
throw KadoaHttpException.wrap(error, {
|
|
@@ -2303,12 +2754,13 @@ var RunExtractionCommand = class extends Command {
|
|
|
2303
2754
|
var ExtractionModule = class {
|
|
2304
2755
|
constructor(client) {
|
|
2305
2756
|
this.runExtractionCommand = new RunExtractionCommand(client);
|
|
2757
|
+
this.fetchDataQuery = new FetchDataQuery(client);
|
|
2306
2758
|
}
|
|
2307
2759
|
/**
|
|
2308
2760
|
* Run extraction workflow using dynamic entity detection
|
|
2309
2761
|
*
|
|
2310
2762
|
* @param options Extraction configuration options
|
|
2311
|
-
* @returns ExtractionResult containing workflow ID, workflow details, and extracted data
|
|
2763
|
+
* @returns ExtractionResult containing workflow ID, workflow details, and first page of extracted data
|
|
2312
2764
|
*
|
|
2313
2765
|
* @example
|
|
2314
2766
|
* ```typescript
|
|
@@ -2321,10 +2773,66 @@ var ExtractionModule = class {
|
|
|
2321
2773
|
async run(options) {
|
|
2322
2774
|
return this.runExtractionCommand.execute(options);
|
|
2323
2775
|
}
|
|
2776
|
+
/**
|
|
2777
|
+
* Fetch paginated data from a workflow
|
|
2778
|
+
*
|
|
2779
|
+
* @param options Options for fetching data including workflowId and pagination parameters
|
|
2780
|
+
* @returns Paginated workflow data with metadata
|
|
2781
|
+
*
|
|
2782
|
+
* @example
|
|
2783
|
+
* ```typescript
|
|
2784
|
+
* // Fetch first page
|
|
2785
|
+
* const firstPage = await client.extraction.fetchData({
|
|
2786
|
+
* workflowId: 'workflow-id',
|
|
2787
|
+
* page: 1,
|
|
2788
|
+
* limit: 100
|
|
2789
|
+
* });
|
|
2790
|
+
*
|
|
2791
|
+
* // Iterate through all pages
|
|
2792
|
+
* for await (const page of client.extraction.fetchDataPages({ workflowId: 'workflow-id' })) {
|
|
2793
|
+
* console.log(`Processing ${page.data.length} records`);
|
|
2794
|
+
* }
|
|
2795
|
+
* ```
|
|
2796
|
+
*/
|
|
2797
|
+
async fetchData(options) {
|
|
2798
|
+
return this.fetchDataQuery.execute(options);
|
|
2799
|
+
}
|
|
2800
|
+
/**
|
|
2801
|
+
* Fetch all data from a workflow across all pages
|
|
2802
|
+
*
|
|
2803
|
+
* @param options Options for fetching data
|
|
2804
|
+
* @returns All workflow data combined from all pages
|
|
2805
|
+
*
|
|
2806
|
+
* @example
|
|
2807
|
+
* ```typescript
|
|
2808
|
+
* const allData = await client.extraction.fetchAllData({
|
|
2809
|
+
* workflowId: 'workflow-id'
|
|
2810
|
+
* });
|
|
2811
|
+
* ```
|
|
2812
|
+
*/
|
|
2813
|
+
async fetchAllData(options) {
|
|
2814
|
+
return this.fetchDataQuery.fetchAll(options);
|
|
2815
|
+
}
|
|
2816
|
+
/**
|
|
2817
|
+
* Create an async iterator for paginated data fetching
|
|
2818
|
+
*
|
|
2819
|
+
* @param options Options for fetching data
|
|
2820
|
+
* @returns Async iterator that yields pages of data
|
|
2821
|
+
*
|
|
2822
|
+
* @example
|
|
2823
|
+
* ```typescript
|
|
2824
|
+
* for await (const page of client.extraction.fetchDataPages({ workflowId: 'workflow-id' })) {
|
|
2825
|
+
* console.log(`Page ${page.pagination.page}: ${page.data.length} records`);
|
|
2826
|
+
* }
|
|
2827
|
+
* ```
|
|
2828
|
+
*/
|
|
2829
|
+
fetchDataPages(options) {
|
|
2830
|
+
return this.fetchDataQuery.pages(options);
|
|
2831
|
+
}
|
|
2324
2832
|
};
|
|
2325
2833
|
|
|
2326
2834
|
// src/version.ts
|
|
2327
|
-
var SDK_VERSION = "0.
|
|
2835
|
+
var SDK_VERSION = "0.5.0";
|
|
2328
2836
|
var SDK_NAME = "kadoa-node-sdk";
|
|
2329
2837
|
var SDK_LANGUAGE = "node";
|
|
2330
2838
|
|
|
@@ -2345,7 +2853,7 @@ var KadoaClient = class {
|
|
|
2345
2853
|
}
|
|
2346
2854
|
};
|
|
2347
2855
|
this._configuration = new Configuration(configParams);
|
|
2348
|
-
this._axiosInstance =
|
|
2856
|
+
this._axiosInstance = globalAxios3.create({
|
|
2349
2857
|
timeout: this._timeout,
|
|
2350
2858
|
headers: {
|
|
2351
2859
|
"User-Agent": `${SDK_NAME}/${SDK_VERSION}`,
|
|
@@ -2354,6 +2862,8 @@ var KadoaClient = class {
|
|
|
2354
2862
|
}
|
|
2355
2863
|
});
|
|
2356
2864
|
this._events = new KadoaEventEmitter();
|
|
2865
|
+
this._workflowsApi = config.apiOverrides?.workflows || new WorkflowsApi(this._configuration, this._baseUrl, this._axiosInstance);
|
|
2866
|
+
this._crawlApi = config.apiOverrides?.crawl || new CrawlApi(this._configuration, this._baseUrl, this._axiosInstance);
|
|
2357
2867
|
this.extraction = new ExtractionModule(this);
|
|
2358
2868
|
}
|
|
2359
2869
|
/**
|
|
@@ -2425,6 +2935,18 @@ var KadoaClient = class {
|
|
|
2425
2935
|
get events() {
|
|
2426
2936
|
return this._events;
|
|
2427
2937
|
}
|
|
2938
|
+
/**
|
|
2939
|
+
* Get the workflows API
|
|
2940
|
+
*/
|
|
2941
|
+
get workflows() {
|
|
2942
|
+
return this._workflowsApi;
|
|
2943
|
+
}
|
|
2944
|
+
/**
|
|
2945
|
+
* Get the crawl API
|
|
2946
|
+
*/
|
|
2947
|
+
get crawl() {
|
|
2948
|
+
return this._crawlApi;
|
|
2949
|
+
}
|
|
2428
2950
|
/**
|
|
2429
2951
|
* Dispose of the client and clean up resources
|
|
2430
2952
|
*/
|