@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.js CHANGED
@@ -1,13 +1,12 @@
1
1
  'use strict';
2
2
 
3
3
  var events = require('events');
4
- var globalAxios2 = require('axios');
4
+ var globalAxios3 = require('axios');
5
5
  var url = require('url');
6
- var object = require('es-toolkit/object');
7
6
 
8
7
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
9
8
 
10
- var globalAxios2__default = /*#__PURE__*/_interopDefault(globalAxios2);
9
+ var globalAxios3__default = /*#__PURE__*/_interopDefault(globalAxios3);
11
10
 
12
11
  // src/core/events/event-emitter.ts
13
12
  var KadoaEventEmitter = class extends events.EventEmitter {
@@ -195,7 +194,7 @@ var KadoaHttpException = class _KadoaHttpException extends KadoaSdkException {
195
194
  static wrap(error, extra) {
196
195
  if (error instanceof _KadoaHttpException) return error;
197
196
  if (error instanceof KadoaSdkException) return error;
198
- if (globalAxios2.isAxiosError(error)) {
197
+ if (globalAxios3.isAxiosError(error)) {
199
198
  return _KadoaHttpException.fromAxiosError(error, extra);
200
199
  }
201
200
  return KadoaSdkException.wrap(error, extra);
@@ -217,7 +216,7 @@ var KadoaHttpException = class _KadoaHttpException extends KadoaSdkException {
217
216
  };
218
217
  var BASE_PATH = "https://api.kadoa.com".replace(/\/+$/, "");
219
218
  var BaseAPI = class {
220
- constructor(configuration, basePath = BASE_PATH, axios2 = globalAxios2__default.default) {
219
+ constructor(configuration, basePath = BASE_PATH, axios2 = globalAxios3__default.default) {
221
220
  this.basePath = basePath;
222
221
  this.axios = axios2;
223
222
  if (configuration) {
@@ -283,12 +282,389 @@ var serializeDataIfNeeded = function(value, requestOptions, configuration) {
283
282
  var toPathString = function(url) {
284
283
  return url.pathname + url.search + url.hash;
285
284
  };
286
- var createRequestFunction = function(axiosArgs, globalAxios3, BASE_PATH2, configuration) {
287
- return (axios2 = globalAxios3, basePath = BASE_PATH2) => {
285
+ var createRequestFunction = function(axiosArgs, globalAxios4, BASE_PATH2, configuration) {
286
+ return (axios2 = globalAxios4, basePath = BASE_PATH2) => {
288
287
  const axiosRequestArgs = { ...axiosArgs.options, url: (axios2.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url };
289
288
  return axios2.request(axiosRequestArgs);
290
289
  };
291
290
  };
291
+ var CrawlApiAxiosParamCreator = function(configuration) {
292
+ return {
293
+ /**
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
298
+ * @param {*} [options] Override http request option.
299
+ * @throws {RequiredError}
300
+ */
301
+ v4CrawlPausePost: async (xApiKey, v4CrawlPausePostRequest, options = {}) => {
302
+ assertParamExists("v4CrawlPausePost", "xApiKey", xApiKey);
303
+ assertParamExists("v4CrawlPausePost", "v4CrawlPausePostRequest", v4CrawlPausePostRequest);
304
+ const localVarPath = `/v4/crawl/pause`;
305
+ const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
306
+ let baseOptions;
307
+ if (configuration) {
308
+ baseOptions = configuration.baseOptions;
309
+ }
310
+ const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
311
+ const localVarHeaderParameter = {};
312
+ const localVarQueryParameter = {};
313
+ await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
314
+ localVarHeaderParameter["Content-Type"] = "application/json";
315
+ if (xApiKey != null) {
316
+ localVarHeaderParameter["x-api-key"] = String(xApiKey);
317
+ }
318
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
319
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
320
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
321
+ localVarRequestOptions.data = serializeDataIfNeeded(v4CrawlPausePostRequest, localVarRequestOptions, configuration);
322
+ return {
323
+ url: toPathString(localVarUrlObj),
324
+ options: localVarRequestOptions
325
+ };
326
+ },
327
+ /**
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
332
+ * @param {*} [options] Override http request option.
333
+ * @throws {RequiredError}
334
+ */
335
+ v4CrawlPost: async (xApiKey, v4CrawlPostRequest, options = {}) => {
336
+ assertParamExists("v4CrawlPost", "xApiKey", xApiKey);
337
+ assertParamExists("v4CrawlPost", "v4CrawlPostRequest", v4CrawlPostRequest);
338
+ const localVarPath = `/v4/crawl`;
339
+ const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
340
+ let baseOptions;
341
+ if (configuration) {
342
+ baseOptions = configuration.baseOptions;
343
+ }
344
+ const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
345
+ const localVarHeaderParameter = {};
346
+ const localVarQueryParameter = {};
347
+ await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
348
+ localVarHeaderParameter["Content-Type"] = "application/json";
349
+ if (xApiKey != null) {
350
+ localVarHeaderParameter["x-api-key"] = String(xApiKey);
351
+ }
352
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
353
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
354
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
355
+ localVarRequestOptions.data = serializeDataIfNeeded(v4CrawlPostRequest, localVarRequestOptions, configuration);
356
+ return {
357
+ url: toPathString(localVarUrlObj),
358
+ options: localVarRequestOptions
359
+ };
360
+ },
361
+ /**
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
366
+ * @param {*} [options] Override http request option.
367
+ * @throws {RequiredError}
368
+ */
369
+ v4CrawlResumePost: async (xApiKey, v4CrawlResumePostRequest, options = {}) => {
370
+ assertParamExists("v4CrawlResumePost", "xApiKey", xApiKey);
371
+ assertParamExists("v4CrawlResumePost", "v4CrawlResumePostRequest", v4CrawlResumePostRequest);
372
+ const localVarPath = `/v4/crawl/resume`;
373
+ const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
374
+ let baseOptions;
375
+ if (configuration) {
376
+ baseOptions = configuration.baseOptions;
377
+ }
378
+ const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
379
+ const localVarHeaderParameter = {};
380
+ const localVarQueryParameter = {};
381
+ await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
382
+ localVarHeaderParameter["Content-Type"] = "application/json";
383
+ if (xApiKey != null) {
384
+ localVarHeaderParameter["x-api-key"] = String(xApiKey);
385
+ }
386
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
387
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
388
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
389
+ localVarRequestOptions.data = serializeDataIfNeeded(v4CrawlResumePostRequest, localVarRequestOptions, configuration);
390
+ return {
391
+ url: toPathString(localVarUrlObj),
392
+ options: localVarRequestOptions
393
+ };
394
+ },
395
+ /**
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
402
+ * @param {*} [options] Override http request option.
403
+ * @throws {RequiredError}
404
+ */
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)));
409
+ const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
410
+ let baseOptions;
411
+ if (configuration) {
412
+ baseOptions = configuration.baseOptions;
413
+ }
414
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
415
+ const localVarHeaderParameter = {};
416
+ const localVarQueryParameter = {};
417
+ await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
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
+ }
427
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
428
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
429
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
430
+ return {
431
+ url: toPathString(localVarUrlObj),
432
+ options: localVarRequestOptions
433
+ };
434
+ },
435
+ /**
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
442
+ * @param {*} [options] Override http request option.
443
+ * @throws {RequiredError}
444
+ */
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)));
450
+ const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
451
+ let baseOptions;
452
+ if (configuration) {
453
+ baseOptions = configuration.baseOptions;
454
+ }
455
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
456
+ const localVarHeaderParameter = {};
457
+ const localVarQueryParameter = {};
458
+ await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
459
+ if (format !== void 0) {
460
+ localVarQueryParameter["format"] = format;
461
+ }
462
+ if (xApiKey != null) {
463
+ localVarHeaderParameter["x-api-key"] = String(xApiKey);
464
+ }
465
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
466
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
467
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
468
+ return {
469
+ url: toPathString(localVarUrlObj),
470
+ options: localVarRequestOptions
471
+ };
472
+ },
473
+ /**
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
478
+ * @param {*} [options] Override http request option.
479
+ * @throws {RequiredError}
480
+ */
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)));
485
+ const localVarUrlObj = new url.URL(localVarPath, DUMMY_BASE_URL);
486
+ let baseOptions;
487
+ if (configuration) {
488
+ baseOptions = configuration.baseOptions;
489
+ }
490
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
491
+ const localVarHeaderParameter = {};
492
+ const localVarQueryParameter = {};
493
+ await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration);
494
+ if (xApiKey != null) {
495
+ localVarHeaderParameter["x-api-key"] = String(xApiKey);
496
+ }
497
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
498
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
499
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
500
+ return {
501
+ url: toPathString(localVarUrlObj),
502
+ options: localVarRequestOptions
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);
523
+ },
524
+ /**
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
529
+ * @param {*} [options] Override http request option.
530
+ * @throws {RequiredError}
531
+ */
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
+ };
292
668
  var WorkflowsApiAxiosParamCreator = function(configuration) {
293
669
  return {
294
670
  /**
@@ -1222,7 +1598,7 @@ var WorkflowsApiFp = function(configuration) {
1222
1598
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4ChangesChangeIdGet(changeId, xApiKey, authorization, options);
1223
1599
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1224
1600
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4ChangesChangeIdGet"]?.[localVarOperationServerIndex]?.url;
1225
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1601
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1226
1602
  },
1227
1603
  /**
1228
1604
  *
@@ -1241,7 +1617,7 @@ var WorkflowsApiFp = function(configuration) {
1241
1617
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4ChangesGet(xApiKey, authorization, workflowIds, startDate, endDate, skip, limit, options);
1242
1618
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1243
1619
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4ChangesGet"]?.[localVarOperationServerIndex]?.url;
1244
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1620
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1245
1621
  },
1246
1622
  /**
1247
1623
  * Retrieves a list of workflows with pagination and search capabilities
@@ -1263,7 +1639,7 @@ var WorkflowsApiFp = function(configuration) {
1263
1639
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsGet(search, skip, limit, state, tags, monitoring, updateInterval, templateId, includeDeleted, format, options);
1264
1640
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1265
1641
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsGet"]?.[localVarOperationServerIndex]?.url;
1266
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1642
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1267
1643
  },
1268
1644
  /**
1269
1645
  *
@@ -1276,7 +1652,7 @@ var WorkflowsApiFp = function(configuration) {
1276
1652
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsPost(v4WorkflowsPostRequest, options);
1277
1653
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1278
1654
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsPost"]?.[localVarOperationServerIndex]?.url;
1279
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1655
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1280
1656
  },
1281
1657
  /**
1282
1658
  *
@@ -1289,7 +1665,7 @@ var WorkflowsApiFp = function(configuration) {
1289
1665
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsSetupEditPost(v4WorkflowsSetupEditPostRequest, options);
1290
1666
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1291
1667
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsSetupEditPost"]?.[localVarOperationServerIndex]?.url;
1292
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1668
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1293
1669
  },
1294
1670
  /**
1295
1671
  *
@@ -1302,7 +1678,7 @@ var WorkflowsApiFp = function(configuration) {
1302
1678
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsSetupPost(v4WorkflowsSetupPostRequest, options);
1303
1679
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1304
1680
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsSetupPost"]?.[localVarOperationServerIndex]?.url;
1305
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1681
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1306
1682
  },
1307
1683
  /**
1308
1684
  *
@@ -1319,7 +1695,7 @@ var WorkflowsApiFp = function(configuration) {
1319
1695
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdAuditlogGet(workflowId, xApiKey, authorization, page, limit, options);
1320
1696
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1321
1697
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdAuditlogGet"]?.[localVarOperationServerIndex]?.url;
1322
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1698
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1323
1699
  },
1324
1700
  /**
1325
1701
  *
@@ -1334,7 +1710,7 @@ var WorkflowsApiFp = function(configuration) {
1334
1710
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdComplianceApprovePut(workflowId, xApiKey, authorization, options);
1335
1711
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1336
1712
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdComplianceApprovePut"]?.[localVarOperationServerIndex]?.url;
1337
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1713
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1338
1714
  },
1339
1715
  /**
1340
1716
  *
@@ -1350,7 +1726,7 @@ var WorkflowsApiFp = function(configuration) {
1350
1726
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdComplianceRejectPut(workflowId, v4WorkflowsWorkflowIdComplianceRejectPutRequest, xApiKey, authorization, options);
1351
1727
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1352
1728
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdComplianceRejectPut"]?.[localVarOperationServerIndex]?.url;
1353
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1729
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1354
1730
  },
1355
1731
  /**
1356
1732
  *
@@ -1375,7 +1751,7 @@ var WorkflowsApiFp = function(configuration) {
1375
1751
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdDataGet(workflowId, xApiKey, authorization, runId, format, sortBy, order, filters, page, limit, gzip, rowIds, includeAnomalies, options);
1376
1752
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1377
1753
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdDataGet"]?.[localVarOperationServerIndex]?.url;
1378
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1754
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1379
1755
  },
1380
1756
  /**
1381
1757
  *
@@ -1388,7 +1764,7 @@ var WorkflowsApiFp = function(configuration) {
1388
1764
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdDelete(workflowId, options);
1389
1765
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1390
1766
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdDelete"]?.[localVarOperationServerIndex]?.url;
1391
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1767
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1392
1768
  },
1393
1769
  /**
1394
1770
  * Retrieves detailed information about a specific workflow. This endpoint requires authentication and proper team access permissions.
@@ -1401,7 +1777,7 @@ var WorkflowsApiFp = function(configuration) {
1401
1777
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdGet(workflowId, options);
1402
1778
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1403
1779
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdGet"]?.[localVarOperationServerIndex]?.url;
1404
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1780
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1405
1781
  },
1406
1782
  /**
1407
1783
  *
@@ -1414,7 +1790,7 @@ var WorkflowsApiFp = function(configuration) {
1414
1790
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdHistoryGet(workflowId, options);
1415
1791
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1416
1792
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdHistoryGet"]?.[localVarOperationServerIndex]?.url;
1417
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1793
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1418
1794
  },
1419
1795
  /**
1420
1796
  *
@@ -1428,7 +1804,7 @@ var WorkflowsApiFp = function(configuration) {
1428
1804
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdMetadataPut(workflowId, v4WorkflowsWorkflowIdMetadataPutRequest, options);
1429
1805
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1430
1806
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdMetadataPut"]?.[localVarOperationServerIndex]?.url;
1431
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1807
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1432
1808
  },
1433
1809
  /**
1434
1810
  *
@@ -1441,7 +1817,7 @@ var WorkflowsApiFp = function(configuration) {
1441
1817
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdPausePut(workflowId, options);
1442
1818
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1443
1819
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdPausePut"]?.[localVarOperationServerIndex]?.url;
1444
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1820
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1445
1821
  },
1446
1822
  /**
1447
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.
@@ -1454,7 +1830,7 @@ var WorkflowsApiFp = function(configuration) {
1454
1830
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdResumePut(workflowId, options);
1455
1831
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1456
1832
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdResumePut"]?.[localVarOperationServerIndex]?.url;
1457
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1833
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1458
1834
  },
1459
1835
  /**
1460
1836
  *
@@ -1467,7 +1843,7 @@ var WorkflowsApiFp = function(configuration) {
1467
1843
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdRunPut(workflowId, options);
1468
1844
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1469
1845
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdRunPut"]?.[localVarOperationServerIndex]?.url;
1470
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1846
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1471
1847
  },
1472
1848
  /**
1473
1849
  *
@@ -1481,7 +1857,7 @@ var WorkflowsApiFp = function(configuration) {
1481
1857
  const localVarAxiosArgs = await localVarAxiosParamCreator.v4WorkflowsWorkflowIdSchedulePut(workflowId, v4WorkflowsWorkflowIdSchedulePutRequest, options);
1482
1858
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1483
1859
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v4WorkflowsWorkflowIdSchedulePut"]?.[localVarOperationServerIndex]?.url;
1484
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1860
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1485
1861
  },
1486
1862
  /**
1487
1863
  *
@@ -1496,7 +1872,7 @@ var WorkflowsApiFp = function(configuration) {
1496
1872
  const localVarAxiosArgs = await localVarAxiosParamCreator.v5ChangesChangeIdGet(changeId, xApiKey, authorization, options);
1497
1873
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1498
1874
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5ChangesChangeIdGet"]?.[localVarOperationServerIndex]?.url;
1499
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1875
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1500
1876
  },
1501
1877
  /**
1502
1878
  *
@@ -1515,7 +1891,7 @@ var WorkflowsApiFp = function(configuration) {
1515
1891
  const localVarAxiosArgs = await localVarAxiosParamCreator.v5ChangesGet(xApiKey, authorization, workflowIds, startDate, endDate, skip, limit, options);
1516
1892
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1517
1893
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5ChangesGet"]?.[localVarOperationServerIndex]?.url;
1518
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1894
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1519
1895
  },
1520
1896
  /**
1521
1897
  * Permanently deletes a workflow and its associated tags
@@ -1528,7 +1904,7 @@ var WorkflowsApiFp = function(configuration) {
1528
1904
  const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsIdDelete(id, options);
1529
1905
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1530
1906
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsIdDelete"]?.[localVarOperationServerIndex]?.url;
1531
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1907
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1532
1908
  },
1533
1909
  /**
1534
1910
  * Retrieves a specific workflow and its associated tags by ID
@@ -1541,7 +1917,7 @@ var WorkflowsApiFp = function(configuration) {
1541
1917
  const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsIdGet(id, options);
1542
1918
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1543
1919
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsIdGet"]?.[localVarOperationServerIndex]?.url;
1544
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1920
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1545
1921
  },
1546
1922
  /**
1547
1923
  * Updates an existing workflow\'s properties
@@ -1555,7 +1931,7 @@ var WorkflowsApiFp = function(configuration) {
1555
1931
  const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsIdPut(id, v5WorkflowsIdPutRequest, options);
1556
1932
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1557
1933
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsIdPut"]?.[localVarOperationServerIndex]?.url;
1558
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1934
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1559
1935
  },
1560
1936
  /**
1561
1937
  * Creates a new workflow in pending state
@@ -1568,7 +1944,7 @@ var WorkflowsApiFp = function(configuration) {
1568
1944
  const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsPost(v5WorkflowsPostRequest, options);
1569
1945
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1570
1946
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsPost"]?.[localVarOperationServerIndex]?.url;
1571
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1947
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1572
1948
  },
1573
1949
  /**
1574
1950
  *
@@ -1585,7 +1961,7 @@ var WorkflowsApiFp = function(configuration) {
1585
1961
  const localVarAxiosArgs = await localVarAxiosParamCreator.v5WorkflowsWorkflowIdAuditlogGet(workflowId, xApiKey, authorization, page, limit, options);
1586
1962
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1587
1963
  const localVarOperationServerBasePath = operationServerMap["WorkflowsApi.v5WorkflowsWorkflowIdAuditlogGet"]?.[localVarOperationServerIndex]?.url;
1588
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1964
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios3__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1589
1965
  }
1590
1966
  };
1591
1967
  };
@@ -1904,48 +2280,124 @@ var Configuration = class {
1904
2280
  var Command = class {
1905
2281
  };
1906
2282
 
1907
- // src/core/http/client-factory.ts
1908
- var workflowsApiCache = /* @__PURE__ */ new WeakMap();
1909
- function getWorkflowsApi(client) {
1910
- let api = workflowsApiCache.get(client);
1911
- if (!api) {
1912
- api = new WorkflowsApi(
1913
- client.configuration,
1914
- client.baseUrl,
1915
- client.axiosInstance
1916
- );
1917
- workflowsApiCache.set(client, api);
2283
+ // src/core/pagination/paginator.ts
2284
+ var PagedIterator = class {
2285
+ constructor(fetchPage) {
2286
+ this.fetchPage = fetchPage;
1918
2287
  }
1919
- return api;
1920
- }
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++;
2303
+ }
2304
+ return allItems;
2305
+ }
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++;
2320
+ }
2321
+ }
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
+ }
2333
+ }
2334
+ };
1921
2335
 
1922
- // src/modules/extraction/services/data-fetcher.service.ts
1923
- var DataFetcherService = class {
2336
+ // src/modules/extraction/queries/fetch-data.query.ts
2337
+ var FetchDataQuery = class {
1924
2338
  constructor(client) {
1925
2339
  this.client = client;
2340
+ this.defaultLimit = 100;
1926
2341
  }
1927
2342
  /**
1928
- * Fetch extracted data from a workflow
2343
+ * Fetch a page of workflow data
1929
2344
  *
1930
- * @param workflowId The workflow ID to fetch data from
1931
- * @param limit Maximum number of records to retrieve
1932
- * @returns Array of extracted data objects
2345
+ * @param options Options for fetching data
2346
+ * @returns Paginated workflow data
1933
2347
  */
1934
- async fetchWorkflowData(workflowId, limit) {
1935
- const workflowsApi = getWorkflowsApi(this.client);
2348
+ async execute(options) {
1936
2349
  try {
1937
- const response = await workflowsApi.v4WorkflowsWorkflowIdDataGet({
1938
- workflowId,
1939
- limit
1940
- });
1941
- return response.data.data ?? [];
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;
1942
2359
  } catch (error) {
1943
2360
  throw KadoaHttpException.wrap(error, {
1944
2361
  message: ERROR_MESSAGES.DATA_FETCH_FAILED,
1945
- details: { workflowId, limit }
2362
+ details: { workflowId: options.workflowId, page: options.page }
1946
2363
  });
1947
2364
  }
1948
2365
  }
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;
2372
+ }
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 });
2384
+ }
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
+ }
2400
+ }
1949
2401
  };
1950
2402
 
1951
2403
  // src/core/config/constants.ts
@@ -2059,7 +2511,6 @@ var WorkflowManagerService = class {
2059
2511
  * Creates a new workflow with the provided configuration
2060
2512
  */
2061
2513
  async createWorkflow(config) {
2062
- const workflowsApi = getWorkflowsApi(this.client);
2063
2514
  const request = {
2064
2515
  urls: config.urls,
2065
2516
  navigationMode: config.navigationMode,
@@ -2067,11 +2518,10 @@ var WorkflowManagerService = class {
2067
2518
  name: config.name,
2068
2519
  fields: config.fields,
2069
2520
  bypassPreview: true,
2070
- limit: config.maxRecords,
2071
2521
  tags: ["sdk"]
2072
2522
  };
2073
2523
  try {
2074
- const response = await workflowsApi.v4WorkflowsPost({
2524
+ const response = await this.client.workflows.v4WorkflowsPost({
2075
2525
  v4WorkflowsPostRequest: request
2076
2526
  });
2077
2527
  const workflowId = response.data.workflowId;
@@ -2093,9 +2543,8 @@ var WorkflowManagerService = class {
2093
2543
  * Gets the current status of a workflow
2094
2544
  */
2095
2545
  async getWorkflowStatus(workflowId) {
2096
- const workflowsApi = getWorkflowsApi(this.client);
2097
2546
  try {
2098
- const response = await workflowsApi.v4WorkflowsWorkflowIdGet({
2547
+ const response = await this.client.workflows.v4WorkflowsWorkflowIdGet({
2099
2548
  workflowId
2100
2549
  });
2101
2550
  return response.data;
@@ -2162,14 +2611,13 @@ var DEFAULT_OPTIONS = {
2162
2611
  maxWaitTime: 3e5,
2163
2612
  navigationMode: "single-page",
2164
2613
  location: { type: "auto" },
2165
- name: "Untitled Workflow",
2166
- maxRecords: 1e3
2614
+ name: "Untitled Workflow"
2167
2615
  };
2168
2616
  var RunExtractionCommand = class extends Command {
2169
2617
  constructor(client) {
2170
2618
  super();
2171
2619
  this.client = client;
2172
- this.dataFetcher = new DataFetcherService(client);
2620
+ this.fetchDataQuery = new FetchDataQuery(client);
2173
2621
  this.entityDetector = new EntityDetectorService(client);
2174
2622
  this.workflowManager = new WorkflowManagerService(client);
2175
2623
  }
@@ -2178,10 +2626,10 @@ var RunExtractionCommand = class extends Command {
2178
2626
  */
2179
2627
  async execute(options) {
2180
2628
  this.validateOptions(options);
2181
- const config = object.merge(
2182
- DEFAULT_OPTIONS,
2183
- options
2184
- );
2629
+ const config = {
2630
+ ...DEFAULT_OPTIONS,
2631
+ ...options
2632
+ };
2185
2633
  try {
2186
2634
  const entityPrediction = await this.entityDetector.fetchEntityFields({
2187
2635
  link: config.urls[0],
@@ -2221,19 +2669,21 @@ var RunExtractionCommand = class extends Command {
2221
2669
  config.maxWaitTime
2222
2670
  );
2223
2671
  let data;
2672
+ let pagination;
2224
2673
  const isSuccess = this.isExtractionSuccessful(workflow.runState);
2225
2674
  if (isSuccess) {
2226
- data = await this.dataFetcher.fetchWorkflowData(
2227
- workflowId,
2228
- config.maxRecords
2229
- );
2675
+ const dataPage = await this.fetchDataQuery.execute({ workflowId });
2676
+ data = dataPage.data;
2677
+ pagination = dataPage.pagination;
2230
2678
  if (data) {
2679
+ const isPartial = pagination?.totalCount && data.length < pagination.totalCount;
2231
2680
  this.client.emit(
2232
2681
  "extraction:data_available",
2233
2682
  {
2234
2683
  workflowId,
2235
2684
  recordCount: data.length,
2236
- isPartial: false
2685
+ isPartial: !!isPartial,
2686
+ totalCount: pagination?.totalCount
2237
2687
  },
2238
2688
  "extraction"
2239
2689
  );
@@ -2276,7 +2726,8 @@ var RunExtractionCommand = class extends Command {
2276
2726
  return {
2277
2727
  workflowId,
2278
2728
  workflow,
2279
- data
2729
+ data,
2730
+ pagination
2280
2731
  };
2281
2732
  } catch (error) {
2282
2733
  throw KadoaHttpException.wrap(error, {
@@ -2309,12 +2760,13 @@ var RunExtractionCommand = class extends Command {
2309
2760
  var ExtractionModule = class {
2310
2761
  constructor(client) {
2311
2762
  this.runExtractionCommand = new RunExtractionCommand(client);
2763
+ this.fetchDataQuery = new FetchDataQuery(client);
2312
2764
  }
2313
2765
  /**
2314
2766
  * Run extraction workflow using dynamic entity detection
2315
2767
  *
2316
2768
  * @param options Extraction configuration options
2317
- * @returns ExtractionResult containing workflow ID, workflow details, and extracted data
2769
+ * @returns ExtractionResult containing workflow ID, workflow details, and first page of extracted data
2318
2770
  *
2319
2771
  * @example
2320
2772
  * ```typescript
@@ -2327,10 +2779,66 @@ var ExtractionModule = class {
2327
2779
  async run(options) {
2328
2780
  return this.runExtractionCommand.execute(options);
2329
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
+ }
2330
2838
  };
2331
2839
 
2332
2840
  // src/version.ts
2333
- var SDK_VERSION = "0.4.0";
2841
+ var SDK_VERSION = "0.5.0";
2334
2842
  var SDK_NAME = "kadoa-node-sdk";
2335
2843
  var SDK_LANGUAGE = "node";
2336
2844
 
@@ -2351,7 +2859,7 @@ var KadoaClient = class {
2351
2859
  }
2352
2860
  };
2353
2861
  this._configuration = new Configuration(configParams);
2354
- this._axiosInstance = globalAxios2__default.default.create({
2862
+ this._axiosInstance = globalAxios3__default.default.create({
2355
2863
  timeout: this._timeout,
2356
2864
  headers: {
2357
2865
  "User-Agent": `${SDK_NAME}/${SDK_VERSION}`,
@@ -2360,6 +2868,8 @@ var KadoaClient = class {
2360
2868
  }
2361
2869
  });
2362
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);
2363
2873
  this.extraction = new ExtractionModule(this);
2364
2874
  }
2365
2875
  /**
@@ -2431,6 +2941,18 @@ var KadoaClient = class {
2431
2941
  get events() {
2432
2942
  return this._events;
2433
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
+ }
2434
2956
  /**
2435
2957
  * Dispose of the client and clean up resources
2436
2958
  */