apify-client 2.20.1-beta.6 → 2.20.1-beta.8

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.
Files changed (118) hide show
  1. package/dist/apify_client.d.ts +237 -25
  2. package/dist/apify_client.d.ts.map +1 -1
  3. package/dist/apify_client.js +234 -25
  4. package/dist/apify_client.js.map +1 -1
  5. package/dist/bundle.js +2042 -253
  6. package/dist/bundle.js.map +1 -1
  7. package/dist/resource_clients/actor.d.ts +322 -31
  8. package/dist/resource_clients/actor.d.ts.map +1 -1
  9. package/dist/resource_clients/actor.js +167 -19
  10. package/dist/resource_clients/actor.js.map +1 -1
  11. package/dist/resource_clients/actor_collection.d.ts +34 -3
  12. package/dist/resource_clients/actor_collection.d.ts.map +1 -1
  13. package/dist/resource_clients/actor_collection.js +34 -3
  14. package/dist/resource_clients/actor_collection.js.map +1 -1
  15. package/dist/resource_clients/actor_env_var.d.ts +34 -3
  16. package/dist/resource_clients/actor_env_var.d.ts.map +1 -1
  17. package/dist/resource_clients/actor_env_var.js +34 -3
  18. package/dist/resource_clients/actor_env_var.js.map +1 -1
  19. package/dist/resource_clients/actor_env_var_collection.d.ts +37 -3
  20. package/dist/resource_clients/actor_env_var_collection.d.ts.map +1 -1
  21. package/dist/resource_clients/actor_env_var_collection.js +37 -3
  22. package/dist/resource_clients/actor_env_var_collection.js.map +1 -1
  23. package/dist/resource_clients/actor_version.d.ts +42 -6
  24. package/dist/resource_clients/actor_version.d.ts.map +1 -1
  25. package/dist/resource_clients/actor_version.js +42 -6
  26. package/dist/resource_clients/actor_version.js.map +1 -1
  27. package/dist/resource_clients/actor_version_collection.d.ts +35 -3
  28. package/dist/resource_clients/actor_version_collection.d.ts.map +1 -1
  29. package/dist/resource_clients/actor_version_collection.js +35 -3
  30. package/dist/resource_clients/actor_version_collection.js.map +1 -1
  31. package/dist/resource_clients/build.d.ts +123 -11
  32. package/dist/resource_clients/build.d.ts.map +1 -1
  33. package/dist/resource_clients/build.js +93 -11
  34. package/dist/resource_clients/build.js.map +1 -1
  35. package/dist/resource_clients/build_collection.d.ts +27 -2
  36. package/dist/resource_clients/build_collection.d.ts.map +1 -1
  37. package/dist/resource_clients/build_collection.js +27 -2
  38. package/dist/resource_clients/build_collection.js.map +1 -1
  39. package/dist/resource_clients/dataset.d.ts +221 -15
  40. package/dist/resource_clients/dataset.d.ts.map +1 -1
  41. package/dist/resource_clients/dataset.js +185 -15
  42. package/dist/resource_clients/dataset.js.map +1 -1
  43. package/dist/resource_clients/dataset_collection.d.ts +32 -3
  44. package/dist/resource_clients/dataset_collection.d.ts.map +1 -1
  45. package/dist/resource_clients/dataset_collection.js +32 -3
  46. package/dist/resource_clients/dataset_collection.js.map +1 -1
  47. package/dist/resource_clients/key_value_store.d.ts +219 -26
  48. package/dist/resource_clients/key_value_store.d.ts.map +1 -1
  49. package/dist/resource_clients/key_value_store.js +172 -25
  50. package/dist/resource_clients/key_value_store.js.map +1 -1
  51. package/dist/resource_clients/key_value_store_collection.d.ts +32 -3
  52. package/dist/resource_clients/key_value_store_collection.d.ts.map +1 -1
  53. package/dist/resource_clients/key_value_store_collection.js +32 -3
  54. package/dist/resource_clients/key_value_store_collection.js.map +1 -1
  55. package/dist/resource_clients/log.d.ts +34 -3
  56. package/dist/resource_clients/log.d.ts.map +1 -1
  57. package/dist/resource_clients/log.js +34 -3
  58. package/dist/resource_clients/log.js.map +1 -1
  59. package/dist/resource_clients/request_queue.d.ts +290 -19
  60. package/dist/resource_clients/request_queue.d.ts.map +1 -1
  61. package/dist/resource_clients/request_queue.js +233 -19
  62. package/dist/resource_clients/request_queue.js.map +1 -1
  63. package/dist/resource_clients/request_queue_collection.d.ts +31 -3
  64. package/dist/resource_clients/request_queue_collection.d.ts.map +1 -1
  65. package/dist/resource_clients/request_queue_collection.js +31 -3
  66. package/dist/resource_clients/request_queue_collection.js.map +1 -1
  67. package/dist/resource_clients/run.d.ts +224 -27
  68. package/dist/resource_clients/run.d.ts.map +1 -1
  69. package/dist/resource_clients/run.js +200 -27
  70. package/dist/resource_clients/run.js.map +1 -1
  71. package/dist/resource_clients/run_collection.d.ts +27 -2
  72. package/dist/resource_clients/run_collection.d.ts.map +1 -1
  73. package/dist/resource_clients/run_collection.js +27 -2
  74. package/dist/resource_clients/run_collection.js.map +1 -1
  75. package/dist/resource_clients/schedule.d.ts +65 -4
  76. package/dist/resource_clients/schedule.d.ts.map +1 -1
  77. package/dist/resource_clients/schedule.js +42 -4
  78. package/dist/resource_clients/schedule.js.map +1 -1
  79. package/dist/resource_clients/schedule_collection.d.ts +35 -3
  80. package/dist/resource_clients/schedule_collection.d.ts.map +1 -1
  81. package/dist/resource_clients/schedule_collection.js +35 -3
  82. package/dist/resource_clients/schedule_collection.js.map +1 -1
  83. package/dist/resource_clients/store_collection.d.ts +26 -2
  84. package/dist/resource_clients/store_collection.d.ts.map +1 -1
  85. package/dist/resource_clients/store_collection.js +26 -2
  86. package/dist/resource_clients/store_collection.js.map +1 -1
  87. package/dist/resource_clients/task.d.ts +110 -11
  88. package/dist/resource_clients/task.d.ts.map +1 -1
  89. package/dist/resource_clients/task.js +83 -11
  90. package/dist/resource_clients/task.js.map +1 -1
  91. package/dist/resource_clients/task_collection.d.ts +35 -8
  92. package/dist/resource_clients/task_collection.d.ts.map +1 -1
  93. package/dist/resource_clients/task_collection.js +35 -8
  94. package/dist/resource_clients/task_collection.js.map +1 -1
  95. package/dist/resource_clients/user.d.ts +41 -4
  96. package/dist/resource_clients/user.d.ts.map +1 -1
  97. package/dist/resource_clients/user.js +41 -4
  98. package/dist/resource_clients/user.js.map +1 -1
  99. package/dist/resource_clients/webhook.d.ts +66 -5
  100. package/dist/resource_clients/webhook.d.ts.map +1 -1
  101. package/dist/resource_clients/webhook.js +48 -5
  102. package/dist/resource_clients/webhook.js.map +1 -1
  103. package/dist/resource_clients/webhook_collection.d.ts +34 -3
  104. package/dist/resource_clients/webhook_collection.d.ts.map +1 -1
  105. package/dist/resource_clients/webhook_collection.js +34 -3
  106. package/dist/resource_clients/webhook_collection.js.map +1 -1
  107. package/dist/resource_clients/webhook_dispatch.d.ts +22 -1
  108. package/dist/resource_clients/webhook_dispatch.d.ts.map +1 -1
  109. package/dist/resource_clients/webhook_dispatch.js +22 -1
  110. package/dist/resource_clients/webhook_dispatch.js.map +1 -1
  111. package/dist/resource_clients/webhook_dispatch_collection.d.ts +24 -2
  112. package/dist/resource_clients/webhook_dispatch_collection.d.ts.map +1 -1
  113. package/dist/resource_clients/webhook_dispatch_collection.js +24 -2
  114. package/dist/resource_clients/webhook_dispatch_collection.js.map +1 -1
  115. package/dist/utils.d.ts +42 -0
  116. package/dist/utils.d.ts.map +1 -1
  117. package/dist/utils.js.map +1 -1
  118. package/package.json +1 -1
package/dist/bundle.js CHANGED
@@ -56411,8 +56411,25 @@ __webpack_require__.d(__webpack_exports__, {
56411
56411
 
56412
56412
  const DEFAULT_TIMEOUT_SECS = 360;
56413
56413
  /**
56414
- * ApifyClient is the official library to access [Apify API](https://docs.apify.com/api/v2) from your
56415
- * JavaScript applications. It runs both in Node.js and browser.
56414
+ * The official JavaScript client for the Apify API.
56415
+ *
56416
+ * Provides programmatic access to all Apify platform resources including Actors, runs, datasets,
56417
+ * key-value stores, request queues, and more. Works in both Node.js and browser environments.
56418
+ *
56419
+ * @example
56420
+ * ```javascript
56421
+ * import { ApifyClient } from 'apify-client';
56422
+ *
56423
+ * const client = new ApifyClient({ token: 'my-token' });
56424
+ *
56425
+ * // Start an Actor and wait for it to finish
56426
+ * const run = await client.actor('my-actor-id').call();
56427
+ *
56428
+ * // Fetch dataset items
56429
+ * const { items } = await client.dataset(run.defaultDatasetId).listItems();
56430
+ * ```
56431
+ *
56432
+ * @see https://docs.apify.com/api/v2
56416
56433
  */ class ApifyClient {
56417
56434
  _options() {
56418
56435
  return {
@@ -56423,12 +56440,30 @@ const DEFAULT_TIMEOUT_SECS = 360;
56423
56440
  };
56424
56441
  }
56425
56442
  /**
56426
- * https://docs.apify.com/api/v2#/reference/actors/actor-collection
56443
+ * Returns a client for managing Actors in your account.
56444
+ *
56445
+ * Provides access to the Actor collection, allowing you to list, create, and search for Actors.
56446
+ *
56447
+ * @returns A client for the Actors collection
56448
+ * @see https://docs.apify.com/api/v2/acts-get
56427
56449
  */ actors() {
56428
56450
  return new _resource_clients_actor_collection__rspack_import_4.ActorCollectionClient(this._options());
56429
56451
  }
56430
56452
  /**
56431
- * https://docs.apify.com/api/v2#/reference/actors/actor-object
56453
+ * Returns a client for a specific Actor.
56454
+ *
56455
+ * Use this to get, update, delete, start, or call an Actor, as well as manage its builds,
56456
+ * runs, versions, and webhooks.
56457
+ *
56458
+ * @param id - Actor ID or username/name
56459
+ * @returns A client for the specific Actor
56460
+ * @see https://docs.apify.com/api/v2/act-get
56461
+ *
56462
+ * @example
56463
+ * ```javascript
56464
+ * // Call an Actor and wait for it to finish
56465
+ * const run = await client.actor('apify/web-scraper').call({ url: 'https://example.com' });
56466
+ * ```
56432
56467
  */ actor(id) {
56433
56468
  ow__rspack_import_27_default()(id, (ow__rspack_import_27_default().string.nonEmpty));
56434
56469
  return new _resource_clients_actor__rspack_import_3.ActorClient({
@@ -56437,12 +56472,23 @@ const DEFAULT_TIMEOUT_SECS = 360;
56437
56472
  });
56438
56473
  }
56439
56474
  /**
56440
- * https://docs.apify.com/api/v2#/reference/actor-builds/build-collection
56475
+ * Returns a client for managing Actor builds in your account.
56476
+ *
56477
+ * Lists all builds across all of your Actors.
56478
+ *
56479
+ * @returns A client for Actor builds collection
56480
+ * @see https://docs.apify.com/api/v2/actor-builds-get
56441
56481
  */ builds() {
56442
56482
  return new _resource_clients_build_collection__rspack_import_6.BuildCollectionClient(this._options());
56443
56483
  }
56444
56484
  /**
56445
- * https://docs.apify.com/api/v2#/reference/actor-builds/build-object
56485
+ * Returns a client for a specific Actor build.
56486
+ *
56487
+ * Use this to get details about a build, wait for it to finish, or access its logs.
56488
+ *
56489
+ * @param id - Build ID
56490
+ * @returns A client for the specified build
56491
+ * @see https://docs.apify.com/api/v2/actor-build-get
56446
56492
  */ build(id) {
56447
56493
  ow__rspack_import_27_default()(id, (ow__rspack_import_27_default().string.nonEmpty));
56448
56494
  return new _resource_clients_build__rspack_import_5.BuildClient({
@@ -56451,12 +56497,37 @@ const DEFAULT_TIMEOUT_SECS = 360;
56451
56497
  });
56452
56498
  }
56453
56499
  /**
56454
- * https://docs.apify.com/api/v2#/reference/datasets/dataset-collection
56500
+ * Returns a client for managing datasets in your account.
56501
+ *
56502
+ * Datasets store structured data results from Actor runs. Use this to list or create datasets.
56503
+ *
56504
+ * @returns A client for the Datasets collection
56505
+ * @see https://docs.apify.com/api/v2/datasets-get
56455
56506
  */ datasets() {
56456
56507
  return new _resource_clients_dataset_collection__rspack_import_8.DatasetCollectionClient(this._options());
56457
56508
  }
56458
56509
  /**
56459
- * https://docs.apify.com/api/v2#/reference/datasets/dataset
56510
+ * Returns a client for a specific dataset.
56511
+ *
56512
+ * Use this to read, write, and manage items in the dataset. Datasets contain structured
56513
+ * data stored as individual items (records).
56514
+ *
56515
+ * @template Data - Type of items stored in the dataset
56516
+ * @param id - Dataset ID or name
56517
+ * @returns A client for the specific Dataset
56518
+ * @see https://docs.apify.com/api/v2/dataset-get
56519
+ *
56520
+ * @example
56521
+ * ```javascript
56522
+ * // Push items to a dataset
56523
+ * await client.dataset('my-dataset').pushItems([
56524
+ * { url: 'https://example.com', title: 'Example' },
56525
+ * { url: 'https://test.com', title: 'Test' }
56526
+ * ]);
56527
+ *
56528
+ * // Retrieve items
56529
+ * const { items } = await client.dataset('my-dataset').listItems();
56530
+ * ```
56460
56531
  */ dataset(id) {
56461
56532
  ow__rspack_import_27_default()(id, (ow__rspack_import_27_default().string.nonEmpty));
56462
56533
  return new _resource_clients_dataset__rspack_import_7.DatasetClient({
@@ -56465,12 +56536,33 @@ const DEFAULT_TIMEOUT_SECS = 360;
56465
56536
  });
56466
56537
  }
56467
56538
  /**
56468
- * https://docs.apify.com/api/v2#/reference/key-value-stores/store-collection
56539
+ * Returns a client for managing key-value stores in your account.
56540
+ *
56541
+ * Key-value stores are used to store arbitrary data records or files.
56542
+ *
56543
+ * @returns A client for the Key-value stores collection
56544
+ * @see https://docs.apify.com/api/v2/key-value-stores-get
56469
56545
  */ keyValueStores() {
56470
56546
  return new _resource_clients_key_value_store_collection__rspack_import_10.KeyValueStoreCollectionClient(this._options());
56471
56547
  }
56472
56548
  /**
56473
- * https://docs.apify.com/api/v2#/reference/key-value-stores/store-object
56549
+ * Returns a client for a specific key-value store.
56550
+ *
56551
+ * Use this to read, write, and delete records in the store. Key-value stores can hold
56552
+ * any type of data including text, JSON, images, and other files.
56553
+ *
56554
+ * @param id - Key-value store ID or name
56555
+ * @returns A client for the specific key-value store
56556
+ * @see https://docs.apify.com/api/v2/key-value-store-get
56557
+ *
56558
+ * @example
56559
+ * ```javascript
56560
+ * // Save a record
56561
+ * await client.keyValueStore('my-store').setRecord({ key: 'OUTPUT', value: { foo: 'bar' } });
56562
+ *
56563
+ * // Get a record
56564
+ * const record = await client.keyValueStore('my-store').getRecord('OUTPUT');
56565
+ * ```
56474
56566
  */ keyValueStore(id) {
56475
56567
  ow__rspack_import_27_default()(id, (ow__rspack_import_27_default().string.nonEmpty));
56476
56568
  return new _resource_clients_key_value_store__rspack_import_9.KeyValueStoreClient({
@@ -56479,7 +56571,11 @@ const DEFAULT_TIMEOUT_SECS = 360;
56479
56571
  });
56480
56572
  }
56481
56573
  /**
56482
- * https://docs.apify.com/api/v2#/reference/logs
56574
+ * Returns a client for accessing logs of an Actor build or run.
56575
+ *
56576
+ * @param buildOrRunId - Build ID or run ID
56577
+ * @returns A client for accessing logs
56578
+ * @see https://docs.apify.com/api/v2/log-get
56483
56579
  */ log(buildOrRunId) {
56484
56580
  ow__rspack_import_27_default()(buildOrRunId, (ow__rspack_import_27_default().string.nonEmpty));
56485
56581
  return new _resource_clients_log__rspack_import_11.LogClient({
@@ -56488,12 +56584,35 @@ const DEFAULT_TIMEOUT_SECS = 360;
56488
56584
  });
56489
56585
  }
56490
56586
  /**
56491
- * https://docs.apify.com/api/v2#/reference/request-queues/queue-collection
56587
+ * Returns a client for managing request queues in your account.
56588
+ *
56589
+ * Request queues store URLs to be crawled, along with their metadata.
56590
+ *
56591
+ * @returns A client for the Request queues collection
56592
+ * @see https://docs.apify.com/api/v2/request-queues-get
56492
56593
  */ requestQueues() {
56493
56594
  return new _resource_clients_request_queue_collection__rspack_import_13.RequestQueueCollectionClient(this._options());
56494
56595
  }
56495
56596
  /**
56496
- * https://docs.apify.com/api/v2#/reference/request-queues/queue
56597
+ * Returns a client for a specific request queue.
56598
+ *
56599
+ * Use this to add, retrieve, and manage requests in the queue. Request queues are used
56600
+ * by web crawlers to manage URLs that need to be visited.
56601
+ *
56602
+ * @param id - Request queue ID or name
56603
+ * @param options - Configuration options for the request queue client
56604
+ * @returns A client for the specific Request queue
56605
+ * @see https://docs.apify.com/api/v2/request-queue-get
56606
+ *
56607
+ * @example
56608
+ * ```javascript
56609
+ * // Add requests to a queue
56610
+ * const queue = client.requestQueue('my-queue');
56611
+ * await queue.addRequest({ url: 'https://example.com', uniqueKey: 'example' });
56612
+ *
56613
+ * // Get and lock the next request
56614
+ * const { items } = await queue.listAndLockHead({ lockSecs: 60 });
56615
+ * ```
56497
56616
  */ requestQueue(id) {
56498
56617
  let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
56499
56618
  ow__rspack_import_27_default()(id, (ow__rspack_import_27_default().string.nonEmpty));
@@ -56508,7 +56627,12 @@ const DEFAULT_TIMEOUT_SECS = 360;
56508
56627
  return new _resource_clients_request_queue__rspack_import_12.RequestQueueClient(apiClientOptions, options);
56509
56628
  }
56510
56629
  /**
56511
- * https://docs.apify.com/api/v2#/reference/actor-runs/run-collection
56630
+ * Returns a client for managing Actor runs in your account.
56631
+ *
56632
+ * Lists all runs across all of your Actors.
56633
+ *
56634
+ * @returns A client for the run collection
56635
+ * @see https://docs.apify.com/api/v2/actor-runs-get
56512
56636
  */ runs() {
56513
56637
  return new _resource_clients_run_collection__rspack_import_15.RunCollectionClient({
56514
56638
  ...this._options(),
@@ -56516,7 +56640,23 @@ const DEFAULT_TIMEOUT_SECS = 360;
56516
56640
  });
56517
56641
  }
56518
56642
  /**
56519
- * https://docs.apify.com/api/v2#/reference/actor-runs/run-object-and-its-storages
56643
+ * Returns a client for a specific Actor run.
56644
+ *
56645
+ * Use this to get details about a run, wait for it to finish, abort it, or access its
56646
+ * dataset, key-value store, and request queue.
56647
+ *
56648
+ * @param id - Run ID
56649
+ * @returns A client for the specified run
56650
+ * @see https://docs.apify.com/api/v2/actor-run-get
56651
+ *
56652
+ * @example
56653
+ * ```javascript
56654
+ * // Wait for a run to finish
56655
+ * const run = await client.run('run-id').waitForFinish();
56656
+ *
56657
+ * // Access run's dataset
56658
+ * const { items } = await client.run('run-id').dataset().listItems();
56659
+ * ```
56520
56660
  */ run(id) {
56521
56661
  ow__rspack_import_27_default()(id, (ow__rspack_import_27_default().string.nonEmpty));
56522
56662
  return new _resource_clients_run__rspack_import_14.RunClient({
@@ -56525,12 +56665,29 @@ const DEFAULT_TIMEOUT_SECS = 360;
56525
56665
  });
56526
56666
  }
56527
56667
  /**
56528
- * https://docs.apify.com/api/v2#/reference/actor-tasks/task-collection
56668
+ * Returns a client for managing Actor tasks in your account.
56669
+ *
56670
+ * Tasks are pre-configured Actor runs with stored input that can be executed repeatedly.
56671
+ *
56672
+ * @returns A client for the task collection
56673
+ * @see https://docs.apify.com/api/v2/actor-tasks-get
56529
56674
  */ tasks() {
56530
56675
  return new _resource_clients_task_collection__rspack_import_20.TaskCollectionClient(this._options());
56531
56676
  }
56532
56677
  /**
56533
- * https://docs.apify.com/api/v2#/reference/actor-tasks/task-object
56678
+ * Returns a client for a specific Actor task.
56679
+ *
56680
+ * Use this to get, update, delete, or run a task with pre-configured input.
56681
+ *
56682
+ * @param id - Task ID or username/task-name
56683
+ * @returns A client for the specified task
56684
+ * @see https://docs.apify.com/api/v2/actor-task-get
56685
+ *
56686
+ * @example
56687
+ * ```javascript
56688
+ * // Run a task and wait for it to finish
56689
+ * const run = await client.task('my-task').call();
56690
+ * ```
56534
56691
  */ task(id) {
56535
56692
  ow__rspack_import_27_default()(id, (ow__rspack_import_27_default().string.nonEmpty));
56536
56693
  return new _resource_clients_task__rspack_import_19.TaskClient({
@@ -56539,12 +56696,23 @@ const DEFAULT_TIMEOUT_SECS = 360;
56539
56696
  });
56540
56697
  }
56541
56698
  /**
56542
- * https://docs.apify.com/api/v2#/reference/schedules/schedules-collection
56699
+ * Returns a client for managing schedules in your account.
56700
+ *
56701
+ * Schedules automatically start Actor or task runs at specified times.
56702
+ *
56703
+ * @returns A client for the Schedules collection
56704
+ * @see https://docs.apify.com/api/v2/schedules-get
56543
56705
  */ schedules() {
56544
56706
  return new _resource_clients_schedule_collection__rspack_import_17.ScheduleCollectionClient(this._options());
56545
56707
  }
56546
56708
  /**
56547
- * https://docs.apify.com/api/v2#/reference/schedules/schedule-object
56709
+ * Returns a client for a specific schedule.
56710
+ *
56711
+ * Use this to get, update, or delete a schedule.
56712
+ *
56713
+ * @param id - Schedule ID
56714
+ * @returns A client for the specific Schedule
56715
+ * @see https://docs.apify.com/api/v2/schedule-get
56548
56716
  */ schedule(id) {
56549
56717
  ow__rspack_import_27_default()(id, (ow__rspack_import_27_default().string.nonEmpty));
56550
56718
  return new _resource_clients_schedule__rspack_import_16.ScheduleClient({
@@ -56553,7 +56721,13 @@ const DEFAULT_TIMEOUT_SECS = 360;
56553
56721
  });
56554
56722
  }
56555
56723
  /**
56556
- * https://docs.apify.com/api/v2#/reference/users
56724
+ * Returns a client for accessing user data.
56725
+ *
56726
+ * By default, returns information about the current user (determined by the API token).
56727
+ *
56728
+ * @param id - User ID or username. Defaults to 'me' (current user)
56729
+ * @returns A client for the user
56730
+ * @see https://docs.apify.com/api/v2/user-get
56557
56731
  */ user() {
56558
56732
  let id = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : _apify_consts__rspack_import_0.ME_USER_NAME_PLACEHOLDER;
56559
56733
  ow__rspack_import_27_default()(id, (ow__rspack_import_27_default().string.nonEmpty));
@@ -56563,12 +56737,23 @@ const DEFAULT_TIMEOUT_SECS = 360;
56563
56737
  });
56564
56738
  }
56565
56739
  /**
56566
- * https://docs.apify.com/api/v2#/reference/webhooks/webhook-collection
56740
+ * Returns a client for managing webhooks in your account.
56741
+ *
56742
+ * Webhooks notify external services when specific events occur (e.g., Actor run finishes).
56743
+ *
56744
+ * @returns A client for the Webhooks collection
56745
+ * @see https://docs.apify.com/api/v2/webhooks-get
56567
56746
  */ webhooks() {
56568
56747
  return new _resource_clients_webhook_collection__rspack_import_23.WebhookCollectionClient(this._options());
56569
56748
  }
56570
56749
  /**
56571
- * https://docs.apify.com/api/v2#/reference/webhooks/webhook-object
56750
+ * Returns a client for a specific webhook.
56751
+ *
56752
+ * Use this to get, update, delete, or test a webhook.
56753
+ *
56754
+ * @param id - Webhook ID
56755
+ * @returns A client for the specific webhook
56756
+ * @see https://docs.apify.com/api/v2/webhook-get
56572
56757
  */ webhook(id) {
56573
56758
  ow__rspack_import_27_default()(id, (ow__rspack_import_27_default().string.nonEmpty));
56574
56759
  return new _resource_clients_webhook__rspack_import_22.WebhookClient({
@@ -56577,12 +56762,21 @@ const DEFAULT_TIMEOUT_SECS = 360;
56577
56762
  });
56578
56763
  }
56579
56764
  /**
56580
- * https://docs.apify.com/api/v2#/reference/webhook-dispatches
56765
+ * Returns a client for viewing webhook dispatches in your account.
56766
+ *
56767
+ * Webhook dispatches represent individual invocations of webhooks.
56768
+ *
56769
+ * @returns A client for the webhook dispatches collection
56770
+ * @see https://docs.apify.com/api/v2/webhook-dispatches-get
56581
56771
  */ webhookDispatches() {
56582
56772
  return new _resource_clients_webhook_dispatch_collection__rspack_import_25.WebhookDispatchCollectionClient(this._options());
56583
56773
  }
56584
56774
  /**
56585
- * https://docs.apify.com/api/v2#/reference/webhook-dispatches/webhook-dispatch-object
56775
+ * Returns a client for a specific webhook dispatch.
56776
+ *
56777
+ * @param id - Webhook dispatch ID
56778
+ * @returns A client for the specific webhook dispatch
56779
+ * @see https://docs.apify.com/api/v2/webhook-dispatch-get
56586
56780
  */ webhookDispatch(id) {
56587
56781
  ow__rspack_import_27_default()(id, (ow__rspack_import_27_default().string.nonEmpty));
56588
56782
  return new _resource_clients_webhook_dispatch__rspack_import_24.WebhookDispatchClient({
@@ -56591,11 +56785,25 @@ const DEFAULT_TIMEOUT_SECS = 360;
56591
56785
  });
56592
56786
  }
56593
56787
  /**
56594
- * https://docs.apify.com/api/v2/#/reference/store
56788
+ * Returns a client for browsing Actors in Apify Store.
56789
+ *
56790
+ * Use this to search and retrieve information about public Actors.
56791
+ *
56792
+ * @returns A client for the Apify Store
56793
+ * @see https://docs.apify.com/api/v2/store-actors-get
56595
56794
  */ store() {
56596
56795
  return new _resource_clients_store_collection__rspack_import_18.StoreCollectionClient(this._options());
56597
56796
  }
56598
- async setStatusMessage(message, options) {
56797
+ /**
56798
+ * Sets a status message for the current Actor run.
56799
+ *
56800
+ * This is a convenience method that updates the status message of the run specified by
56801
+ * the `ACTOR_RUN_ID` environment variable. Only works when called from within an Actor run.
56802
+ *
56803
+ * @param message - The status message to set
56804
+ * @param options - Additional options for the status message
56805
+ * @throws {Error} If `ACTOR_RUN_ID` environment variable is not set
56806
+ */ async setStatusMessage(message, options) {
56599
56807
  const runId = process.env[_apify_consts__rspack_import_0.ACTOR_ENV_VARS.RUN_ID];
56600
56808
  if (!runId) {
56601
56809
  throw new Error(`Environment variable ${_apify_consts__rspack_import_0.ACTOR_ENV_VARS.RUN_ID} is not set!`);
@@ -57576,26 +57784,84 @@ __webpack_require__.d(__webpack_exports__, {
57576
57784
 
57577
57785
 
57578
57786
 
57579
- class ActorClient extends _base_resource_client__rspack_import_2.ResourceClient {
57787
+ /**
57788
+ * Client for managing a specific Actor.
57789
+ *
57790
+ * Provides methods to start, call, build, update, and delete an Actor, as well as manage its
57791
+ * versions, builds, runs, and webhooks.
57792
+ *
57793
+ * @example
57794
+ * ```javascript
57795
+ * const client = new ApifyClient({ token: 'my-token' });
57796
+ * const actorClient = client.actor('my-actor-id');
57797
+ *
57798
+ * // Start an Actor
57799
+ * const run = await actorClient.start(input, { memory: 256 });
57800
+ *
57801
+ * // Call an Actor and wait for it to finish
57802
+ * const finishedRun = await actorClient.call({ url: 'https://example.com' });
57803
+ * ```
57804
+ *
57805
+ * @see https://docs.apify.com/platform/actors
57806
+ */ class ActorClient extends _base_resource_client__rspack_import_2.ResourceClient {
57580
57807
  /**
57581
- * https://docs.apify.com/api/v2#/reference/actors/actor-object/get-actor
57808
+ * Gets the Actor object from the Apify API.
57809
+ *
57810
+ * @returns The Actor object, or `undefined` if it does not exist
57811
+ * @see https://docs.apify.com/api/v2/act-get
57582
57812
  */ async get() {
57583
57813
  return this._get();
57584
57814
  }
57585
57815
  /**
57586
- * https://docs.apify.com/api/v2#/reference/actors/actor-object/update-actor
57816
+ * Updates the Actor with specified fields.
57817
+ *
57818
+ * @param newFields - Fields to update in the Actor
57819
+ * @returns The updated Actor object
57820
+ * @see https://docs.apify.com/api/v2/act-put
57587
57821
  */ async update(newFields) {
57588
57822
  ow__rspack_import_11_default()(newFields, (ow__rspack_import_11_default().object));
57589
57823
  return this._update(newFields);
57590
57824
  }
57591
57825
  /**
57592
- * https://docs.apify.com/api/v2#/reference/actors/actor-object/delete-actor
57826
+ * Deletes the Actor.
57827
+ *
57828
+ * @see https://docs.apify.com/api/v2/act-delete
57593
57829
  */ async delete() {
57594
57830
  return this._delete();
57595
57831
  }
57596
57832
  /**
57597
- * Starts an actor and immediately returns the Run object.
57598
- * https://docs.apify.com/api/v2#/reference/actors/run-collection/run-actor
57833
+ * Starts the Actor and immediately returns the Run object.
57834
+ *
57835
+ * The Actor run can be configured with optional input and various options. The run starts
57836
+ * asynchronously and this method returns immediately without waiting for completion.
57837
+ * Use the {@link call} method if you want to wait for the Actor to finish.
57838
+ *
57839
+ * @param input - Input for the Actor. Can be any JSON-serializable value (object, array, string, number).
57840
+ * If `contentType` is specified in options, input should be a string or Buffer.
57841
+ * @param options - Run configuration options
57842
+ * @param options.build - Tag or number of the build to run (e.g., `'beta'` or `'1.2.345'`). If not provided, uses the default build.
57843
+ * @param options.memory - Memory in megabytes allocated for the run. If not provided, uses the Actor's default memory setting.
57844
+ * @param options.timeout - Timeout for the run in seconds. Zero means no timeout. If not provided, uses the Actor's default timeout.
57845
+ * @param options.waitForFinish - Maximum time to wait (in seconds, max 60s) for the run to finish on the API side before returning. Default is 0 (returns immediately).
57846
+ * @param options.webhooks - Webhooks to trigger when the Actor run reaches a specific state (e.g., `SUCCEEDED`, `FAILED`).
57847
+ * @param options.maxItems - Maximum number of dataset items that will be charged (only for pay-per-result Actors).
57848
+ * @param options.maxTotalChargeUsd - Maximum cost in USD (only for pay-per-event Actors).
57849
+ * @param options.contentType - Content type of the input. If specified, input must be a string or Buffer.
57850
+ * @returns The Actor run object with status, usage, and storage IDs
57851
+ * @see https://docs.apify.com/api/v2/act-runs-post
57852
+ *
57853
+ * @example
57854
+ * ```javascript
57855
+ * // Start Actor with simple input
57856
+ * const run = await client.actor('my-actor').start({ url: 'https://example.com' });
57857
+ * console.log(`Run started with ID: ${run.id}, status: ${run.status}`);
57858
+ *
57859
+ * // Start Actor with specific build and memory
57860
+ * const run = await client.actor('my-actor').start(
57861
+ * { url: 'https://example.com' },
57862
+ * { build: '0.1.2', memory: 512, timeout: 300 }
57863
+ * );
57864
+ * ```
57599
57865
  */ async start(input) {
57600
57866
  let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
57601
57867
  // input can be anything, so no point in validating it. E.g. if you set content-type to application/pdf
@@ -57645,9 +57911,41 @@ class ActorClient extends _base_resource_client__rspack_import_2.ResourceClient
57645
57911
  return (0,_utils__rspack_import_3.cast)((0,_utils__rspack_import_3.parseDateFields)((0,_utils__rspack_import_3.pluckData)(response.data)));
57646
57912
  }
57647
57913
  /**
57648
- * Starts an actor and waits for it to finish before returning the Run object.
57649
- * It waits indefinitely, unless the `waitSecs` option is provided.
57650
- * https://docs.apify.com/api/v2#/reference/actors/run-collection/run-actor
57914
+ * Starts the Actor and waits for it to finish before returning the Run object.
57915
+ *
57916
+ * This is a convenience method that starts the Actor run and waits for its completion
57917
+ * by polling the run status. It optionally streams logs to the console or a custom Log instance.
57918
+ * By default, it waits indefinitely unless the `waitSecs` option is provided.
57919
+ *
57920
+ * @param input - Input for the Actor. Can be any JSON-serializable value (object, array, string, number).
57921
+ * If `contentType` is specified in options, input should be a string or Buffer.
57922
+ * @param options - Run configuration options (extends all options from {@link start})
57923
+ * @param options.waitSecs - Maximum time to wait for the run to finish, in seconds. If omitted, waits indefinitely.
57924
+ * @param options.log - Log instance for streaming run logs. Use `'default'` for console output, `null` to disable logging, or provide a custom Log instance.
57925
+ * @param options.build - Tag or number of the build to run (e.g., `'beta'` or `'1.2.345'`).
57926
+ * @param options.memory - Memory in megabytes allocated for the run.
57927
+ * @param options.timeout - Maximum run duration in seconds.
57928
+ * @returns The finished Actor run object with final status (`SUCCEEDED`, `FAILED`, `ABORTED`, or `TIMED-OUT`)
57929
+ * @see https://docs.apify.com/api/v2/act-runs-post
57930
+ *
57931
+ * @example
57932
+ * ```javascript
57933
+ * // Run an Actor and wait for it to finish
57934
+ * const run = await client.actor('my-actor').call({ url: 'https://example.com' });
57935
+ * console.log(`Run finished with status: ${run.status}`);
57936
+ * console.log(`Dataset ID: ${run.defaultDatasetId}`);
57937
+ *
57938
+ * // Run with a timeout and log streaming to console
57939
+ * const run = await client.actor('my-actor').call(
57940
+ * { url: 'https://example.com' },
57941
+ * { waitSecs: 300, log: 'default' }
57942
+ * );
57943
+ *
57944
+ * // Run with custom log instance
57945
+ * import { Log } from '@apify/log';
57946
+ * const log = new Log({ prefix: 'My Actor' });
57947
+ * const run = await client.actor('my-actor').call({ url: 'https://example.com' }, { log });
57948
+ * ```
57651
57949
  */ async call(input) {
57652
57950
  let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
57653
57951
  // input can be anything, so no point in validating it. E.g. if you set content-type to application/pdf
@@ -57682,8 +57980,33 @@ class ActorClient extends _base_resource_client__rspack_import_2.ResourceClient
57682
57980
  });
57683
57981
  }
57684
57982
  /**
57685
- * https://docs.apify.com/api/v2#/reference/actors/build-collection/build-actor
57686
- * @return {Promise<Build>}
57983
+ * Builds the Actor.
57984
+ *
57985
+ * Creates a new build of the specified Actor version. The build compiles the Actor's
57986
+ * source code, installs dependencies, and prepares it for execution.
57987
+ *
57988
+ * @param versionNumber - Version number or tag to build (e.g., `'0.1'`, `'0.2'`, `'latest'`)
57989
+ * @param options - Build configuration options
57990
+ * @param options.betaPackages - If `true`, the build uses beta versions of Apify NPM packages.
57991
+ * @param options.tag - Tag to be applied to the build (e.g., `'latest'`, `'beta'`). Existing tag with the same name will be replaced.
57992
+ * @param options.useCache - If `false`, Docker build cache will be ignored. Default is `true`.
57993
+ * @param options.waitForFinish - Maximum time to wait (in seconds, max 60s) for the build to finish on the API side before returning. Default is 0 (returns immediately).
57994
+ * @returns The Build object with status and build details
57995
+ * @see https://docs.apify.com/api/v2/act-builds-post
57996
+ *
57997
+ * @example
57998
+ * ```javascript
57999
+ * // Start a build and return immediately
58000
+ * const build = await client.actor('my-actor').build('0.1');
58001
+ * console.log(`Build ${build.id} started with status: ${build.status}`);
58002
+ *
58003
+ * // Build and wait up to 120 seconds for it to finish
58004
+ * const build = await client.actor('my-actor').build('0.1', {
58005
+ * waitForFinish: 120,
58006
+ * tag: 'latest',
58007
+ * useCache: true
58008
+ * });
58009
+ * ```
57687
58010
  */ async build(versionNumber) {
57688
58011
  let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
57689
58012
  ow__rspack_import_11_default()(versionNumber, (ow__rspack_import_11_default().string));
@@ -57704,7 +58027,11 @@ class ActorClient extends _base_resource_client__rspack_import_2.ResourceClient
57704
58027
  return (0,_utils__rspack_import_3.cast)((0,_utils__rspack_import_3.parseDateFields)((0,_utils__rspack_import_3.pluckData)(response.data)));
57705
58028
  }
57706
58029
  /**
57707
- * https://docs.apify.com/api/v2/act-build-default-get
58030
+ * Retrieves the default build of the Actor.
58031
+ *
58032
+ * @param options - Options for getting the build.
58033
+ * @returns A client for the default build.
58034
+ * @see https://docs.apify.com/api/v2/act-build-default-get
57708
58035
  */ async defaultBuild() {
57709
58036
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
57710
58037
  const response = await this.httpClient.call({
@@ -57722,7 +58049,21 @@ class ActorClient extends _base_resource_client__rspack_import_2.ResourceClient
57722
58049
  });
57723
58050
  }
57724
58051
  /**
57725
- * https://docs.apify.com/api/v2#/reference/actors/last-run-object-and-its-storages
58052
+ * Returns a client for the last run of this Actor.
58053
+ *
58054
+ * Provides access to the most recent Actor run, optionally filtered by status or origin.
58055
+ *
58056
+ * @param options - Options to filter the last run
58057
+ * @param options.status - Filter by run status (e.g., `'SUCCEEDED'`, `'FAILED'`, `'RUNNING'`, `'ABORTED'`, `'TIMED-OUT'`).
58058
+ * @param options.origin - Filter by run origin (e.g., `'DEVELOPMENT'`, `'WEB'`, `'API'`, `'SCHEDULER'`).
58059
+ * @returns A client for the last run
58060
+ * @see https://docs.apify.com/api/v2/act-runs-last-get
58061
+ *
58062
+ * @example
58063
+ * ```javascript
58064
+ * // Get the last successful run
58065
+ * const lastRun = await client.actor('my-actor').lastRun({ status: 'SUCCEEDED' }).get();
58066
+ * ```
57726
58067
  */ lastRun() {
57727
58068
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
57728
58069
  ow__rspack_import_11_default()(options, ow__rspack_import_11_default().object.exactShape({
@@ -57736,21 +58077,31 @@ class ActorClient extends _base_resource_client__rspack_import_2.ResourceClient
57736
58077
  }));
57737
58078
  }
57738
58079
  /**
57739
- * https://docs.apify.com/api/v2#/reference/actors/build-collection
58080
+ * Returns a client for managing builds of this Actor.
58081
+ *
58082
+ * @returns A client for the Actor's build collection
58083
+ * @see https://docs.apify.com/api/v2/act-builds-get
57740
58084
  */ builds() {
57741
58085
  return new _build_collection__rspack_import_7.BuildCollectionClient(this._subResourceOptions({
57742
58086
  resourcePath: 'builds'
57743
58087
  }));
57744
58088
  }
57745
58089
  /**
57746
- * https://docs.apify.com/api/v2#/reference/actors/run-collection
58090
+ * Returns a client for managing runs of this Actor.
58091
+ *
58092
+ * @returns A client for the Actor's run collection
58093
+ * @see https://docs.apify.com/api/v2/act-runs-get
57747
58094
  */ runs() {
57748
58095
  return new _run_collection__rspack_import_9.RunCollectionClient(this._subResourceOptions({
57749
58096
  resourcePath: 'runs'
57750
58097
  }));
57751
58098
  }
57752
58099
  /**
57753
- * https://docs.apify.com/api/v2#/reference/actors/version-object
58100
+ * Returns a client for a specific version of this Actor.
58101
+ *
58102
+ * @param versionNumber - Version number (e.g., '0.1', '1.2.3')
58103
+ * @returns A client for the specified Actor version
58104
+ * @see https://docs.apify.com/api/v2/act-version-get
57754
58105
  */ version(versionNumber) {
57755
58106
  ow__rspack_import_11_default()(versionNumber, (ow__rspack_import_11_default().string));
57756
58107
  return new _actor_version__rspack_import_4.ActorVersionClient(this._subResourceOptions({
@@ -57758,14 +58109,18 @@ class ActorClient extends _base_resource_client__rspack_import_2.ResourceClient
57758
58109
  }));
57759
58110
  }
57760
58111
  /**
57761
- * https://docs.apify.com/api/v2#/reference/actors/version-collection
57762
- * @return {ActorVersionCollectionClient}
58112
+ * Returns a client for managing versions of this Actor.
58113
+ *
58114
+ * @returns A client for the Actor's version collection
58115
+ * @see https://docs.apify.com/api/v2/act-versions-get
57763
58116
  */ versions() {
57764
58117
  return new _actor_version_collection__rspack_import_5.ActorVersionCollectionClient(this._subResourceOptions());
57765
58118
  }
57766
58119
  /**
57767
- * https://docs.apify.com/api/v2#/reference/actors/webhook-collection
57768
- * @return {WebhookCollectionClient}
58120
+ * Returns a client for managing webhooks associated with this Actor.
58121
+ *
58122
+ * @returns A client for the Actor's webhook collection
58123
+ * @see https://docs.apify.com/api/v2/act-webhooks-get
57769
58124
  */ webhooks() {
57770
58125
  return new _webhook_collection__rspack_import_10.WebhookCollectionClient(this._subResourceOptions());
57771
58126
  }
@@ -57793,15 +58148,37 @@ __webpack_require__.d(__webpack_exports__, {
57793
58148
  /* import */ var _base_resource_collection_client__rspack_import_0 = __webpack_require__("./src/base/resource_collection_client.ts");
57794
58149
 
57795
58150
 
57796
- class ActorCollectionClient extends _base_resource_collection_client__rspack_import_0.ResourceCollectionClient {
58151
+ /**
58152
+ * Client for managing the collection of Actors in your account.
58153
+ *
58154
+ * Provides methods to list and create Actors. To access an individual Actor,
58155
+ * use the `actor()` method on the main ApifyClient.
58156
+ *
58157
+ * @example
58158
+ * ```javascript
58159
+ * const client = new ApifyClient({ token: 'my-token' });
58160
+ * const actorsClient = client.actors();
58161
+ *
58162
+ * // List all Actors
58163
+ * const { items } = await actorsClient.list();
58164
+ *
58165
+ * // Create a new Actor
58166
+ * const newActor = await actorsClient.create({
58167
+ * name: 'my-actor',
58168
+ * title: 'My Actor'
58169
+ * });
58170
+ * ```
58171
+ *
58172
+ * @see https://docs.apify.com/platform/actors
58173
+ */ class ActorCollectionClient extends _base_resource_collection_client__rspack_import_0.ResourceCollectionClient {
57797
58174
  /**
57798
- * https://docs.apify.com/api/v2#/reference/actors/actor-collection/get-list-of-actors
58175
+ * Lists all Actors.
57799
58176
  *
57800
58177
  * Awaiting the return value (as you would with a Promise) will result in a single API call. The amount of fetched
57801
58178
  * items in a single API call is limited.
57802
58179
  * ```javascript
57803
58180
  * const paginatedList = await client.list(options);
57804
- *```
58181
+ * ```
57805
58182
  *
57806
58183
  * Asynchronous iteration is also supported. This will fetch additional pages if needed until all items are
57807
58184
  * retrieved.
@@ -57809,6 +58186,10 @@ class ActorCollectionClient extends _base_resource_collection_client__rspack_imp
57809
58186
  * ```javascript
57810
58187
  * for await (const singleItem of client.list(options)) {...}
57811
58188
  * ```
58189
+ *
58190
+ * @param options - Pagination options.
58191
+ * @returns A paginated iterator of Actors.
58192
+ * @see https://docs.apify.com/api/v2/acts-get
57812
58193
  */ list() {
57813
58194
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
57814
58195
  ow__rspack_import_1_default()(options, ow__rspack_import_1_default().object.exactShape({
@@ -57821,7 +58202,11 @@ class ActorCollectionClient extends _base_resource_collection_client__rspack_imp
57821
58202
  return this._listPaginated(options);
57822
58203
  }
57823
58204
  /**
57824
- * https://docs.apify.com/api/v2#/reference/actors/actor-collection/create-actor
58205
+ * Creates a new Actor.
58206
+ *
58207
+ * @param actor - The Actor data.
58208
+ * @returns The created Actor object.
58209
+ * @see https://docs.apify.com/api/v2/acts-post
57825
58210
  */ async create(actor) {
57826
58211
  ow__rspack_import_1_default()(actor, (ow__rspack_import_1_default().optional.object));
57827
58212
  return this._create(actor);
@@ -57854,20 +58239,50 @@ __webpack_require__.d(__webpack_exports__, {
57854
58239
  /* import */ var _base_resource_client__rspack_import_0 = __webpack_require__("./src/base/resource_client.ts");
57855
58240
 
57856
58241
 
57857
- class ActorEnvVarClient extends _base_resource_client__rspack_import_0.ResourceClient {
58242
+ /**
58243
+ * Client for managing a specific Actor environment variable.
58244
+ *
58245
+ * Environment variables are key-value pairs that are available to the Actor during execution.
58246
+ * This client provides methods to get, update, and delete environment variables.
58247
+ *
58248
+ * @example
58249
+ * ```javascript
58250
+ * const client = new ApifyClient({ token: 'my-token' });
58251
+ * const actorClient = client.actor('my-actor-id');
58252
+ * const versionClient = actorClient.version('0.1');
58253
+ *
58254
+ * // Get an environment variable
58255
+ * const envVarClient = versionClient.envVar('MY_VAR');
58256
+ * const envVar = await envVarClient.get();
58257
+ *
58258
+ * // Update environment variable
58259
+ * await envVarClient.update({ value: 'new-value' });
58260
+ * ```
58261
+ *
58262
+ * @see https://docs.apify.com/platform/actors/development/actor-definition/environment-variables
58263
+ */ class ActorEnvVarClient extends _base_resource_client__rspack_import_0.ResourceClient {
57858
58264
  /**
57859
- * https://docs.apify.com/api/v2#/reference/actors/environment-variable-object/get-environment-variable
58265
+ * Retrieves the environment variable.
58266
+ *
58267
+ * @returns The environment variable object, or `undefined` if it does not exist.
58268
+ * @see https://docs.apify.com/api/v2/act-version-env-var-get
57860
58269
  */ async get() {
57861
58270
  return this._get();
57862
58271
  }
57863
58272
  /**
57864
- * https://docs.apify.com/api/v2#/reference/actors/environment-variable-object/update-environment-variable
58273
+ * Updates the environment variable.
58274
+ *
58275
+ * @param actorEnvVar - The updated environment variable data.
58276
+ * @returns The updated environment variable object.
58277
+ * @see https://docs.apify.com/api/v2/act-version-env-var-put
57865
58278
  */ async update(actorEnvVar) {
57866
58279
  ow__rspack_import_1_default()(actorEnvVar, (ow__rspack_import_1_default().object));
57867
58280
  return this._update(actorEnvVar);
57868
58281
  }
57869
58282
  /**
57870
- * https://docs.apify.com/api/v2#/reference/actors/environment-variable-object/delete-environment-variable
58283
+ * Deletes the environment variable.
58284
+ *
58285
+ * @see https://docs.apify.com/api/v2/act-version-env-var-delete
57871
58286
  */ async delete() {
57872
58287
  return this._delete();
57873
58288
  }
@@ -57894,15 +58309,40 @@ __webpack_require__.d(__webpack_exports__, {
57894
58309
  /* import */ var _base_resource_collection_client__rspack_import_0 = __webpack_require__("./src/base/resource_collection_client.ts");
57895
58310
 
57896
58311
 
57897
- class ActorEnvVarCollectionClient extends _base_resource_collection_client__rspack_import_0.ResourceCollectionClient {
58312
+ /**
58313
+ * Client for managing the collection of environment variables for an Actor version.
58314
+ *
58315
+ * Environment variables are key-value pairs that are available to the Actor during execution.
58316
+ * This client provides methods to list and create environment variables.
58317
+ *
58318
+ * @example
58319
+ * ```javascript
58320
+ * const client = new ApifyClient({ token: 'my-token' });
58321
+ * const actorClient = client.actor('my-actor-id');
58322
+ * const versionClient = actorClient.version('0.1');
58323
+ *
58324
+ * // List all environment variables
58325
+ * const envVarsClient = versionClient.envVars();
58326
+ * const { items } = await envVarsClient.list();
58327
+ *
58328
+ * // Create a new environment variable
58329
+ * const newEnvVar = await envVarsClient.create({
58330
+ * name: 'MY_VAR',
58331
+ * value: 'my-value',
58332
+ * isSecret: false
58333
+ * });
58334
+ * ```
58335
+ *
58336
+ * @see https://docs.apify.com/platform/actors/development/actor-definition/environment-variables
58337
+ */ class ActorEnvVarCollectionClient extends _base_resource_collection_client__rspack_import_0.ResourceCollectionClient {
57898
58338
  /**
57899
- * https://docs.apify.com/api/v2#/reference/actors/environment-variable-collection/get-list-of-environment-variables
58339
+ * Lists all environment variables of this Actor version.
57900
58340
  *
57901
58341
  * Awaiting the return value (as you would with a Promise) will result in a single API call. The amount of fetched
57902
58342
  * items in a single API call is limited.
57903
58343
  * ```javascript
57904
58344
  * const paginatedList = await client.list(options);
57905
- *```
58345
+ * ```
57906
58346
  *
57907
58347
  * Asynchronous iteration is also supported. This will fetch additional pages if needed until all items are
57908
58348
  * retrieved.
@@ -57910,6 +58350,10 @@ class ActorEnvVarCollectionClient extends _base_resource_collection_client__rspa
57910
58350
  * ```javascript
57911
58351
  * for await (const singleItem of client.list(options)) {...}
57912
58352
  * ```
58353
+ *
58354
+ * @param options - Pagination options.
58355
+ * @returns A paginated iterator of environment variables.
58356
+ * @see https://docs.apify.com/api/v2/act-version-env-vars-get
57913
58357
  */ list() {
57914
58358
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
57915
58359
  ow__rspack_import_1_default()(options, ow__rspack_import_1_default().object.exactShape({
@@ -57920,7 +58364,11 @@ class ActorEnvVarCollectionClient extends _base_resource_collection_client__rspa
57920
58364
  return this._listPaginated(options);
57921
58365
  }
57922
58366
  /**
57923
- * https://docs.apify.com/api/v2#/reference/actors/environment-variable-collection/create-environment-variable
58367
+ * Creates a new environment variable for this Actor version.
58368
+ *
58369
+ * @param actorEnvVar - The environment variable data.
58370
+ * @returns The created environment variable object.
58371
+ * @see https://docs.apify.com/api/v2/act-version-env-vars-post
57924
58372
  */ async create(actorEnvVar) {
57925
58373
  ow__rspack_import_1_default()(actorEnvVar, (ow__rspack_import_1_default().optional.object));
57926
58374
  return this._create(actorEnvVar);
@@ -57953,25 +58401,58 @@ __webpack_require__.d(__webpack_exports__, {
57953
58401
 
57954
58402
 
57955
58403
 
57956
- class ActorVersionClient extends _base_resource_client__rspack_import_0.ResourceClient {
58404
+ /**
58405
+ * Client for managing a specific Actor version.
58406
+ *
58407
+ * Actor versions represent specific builds or snapshots of an Actor's code. This client provides
58408
+ * methods to get, update, and delete versions, as well as manage their environment variables.
58409
+ *
58410
+ * @example
58411
+ * ```javascript
58412
+ * const client = new ApifyClient({ token: 'my-token' });
58413
+ * const actorClient = client.actor('my-actor-id');
58414
+ *
58415
+ * // Get a specific version
58416
+ * const versionClient = actorClient.version('0.1');
58417
+ * const version = await versionClient.get();
58418
+ *
58419
+ * // Update version
58420
+ * await versionClient.update({ buildTag: 'latest' });
58421
+ * ```
58422
+ *
58423
+ * @see https://docs.apify.com/platform/actors/development/actor-definition/versions
58424
+ */ class ActorVersionClient extends _base_resource_client__rspack_import_0.ResourceClient {
57957
58425
  /**
57958
- * https://docs.apify.com/api/v2#/reference/actors/version-object/get-version
58426
+ * Retrieves the Actor version.
58427
+ *
58428
+ * @returns The Actor version object, or `undefined` if it does not exist.
58429
+ * @see https://docs.apify.com/api/v2/act-version-get
57959
58430
  */ async get() {
57960
58431
  return this._get();
57961
58432
  }
57962
58433
  /**
57963
- * https://docs.apify.com/api/v2#/reference/actors/version-object/update-version
58434
+ * Updates the Actor version with the specified fields.
58435
+ *
58436
+ * @param newFields - Fields to update.
58437
+ * @returns The updated Actor version object.
58438
+ * @see https://docs.apify.com/api/v2/act-version-put
57964
58439
  */ async update(newFields) {
57965
58440
  ow__rspack_import_3_default()(newFields, (ow__rspack_import_3_default().object));
57966
58441
  return this._update(newFields);
57967
58442
  }
57968
58443
  /**
57969
- * https://docs.apify.com/api/v2#/reference/actors/version-object/delete-version
58444
+ * Deletes the Actor version.
58445
+ *
58446
+ * @see https://docs.apify.com/api/v2/act-version-delete
57970
58447
  */ async delete() {
57971
58448
  return this._delete();
57972
58449
  }
57973
58450
  /**
57974
- * TODO: https://docs.apify.com/api/v2#/reference/actors/env-var-object
58451
+ * Returns a client for the specified environment variable of this Actor version.
58452
+ *
58453
+ * @param envVarName - Name of the environment variable.
58454
+ * @returns A client for the environment variable.
58455
+ * @see https://docs.apify.com/api/v2/act-version-env-var-get
57975
58456
  */ envVar(envVarName) {
57976
58457
  ow__rspack_import_3_default()(envVarName, (ow__rspack_import_3_default().string));
57977
58458
  return new _actor_env_var__rspack_import_1.ActorEnvVarClient(this._subResourceOptions({
@@ -57979,8 +58460,10 @@ class ActorVersionClient extends _base_resource_client__rspack_import_0.Resource
57979
58460
  }));
57980
58461
  }
57981
58462
  /**
57982
- * TODO: https://docs.apify.com/api/v2#/reference/actors/env-var-collection
57983
- * @return {ActorVersionCollectionClient}
58463
+ * Returns a client for the environment variables of this Actor version.
58464
+ *
58465
+ * @returns A client for the Actor version's environment variables.
58466
+ * @see https://docs.apify.com/api/v2/act-version-env-vars-get
57984
58467
  */ envVars() {
57985
58468
  return new _actor_env_var_collection__rspack_import_2.ActorEnvVarCollectionClient(this._subResourceOptions());
57986
58469
  }
@@ -58014,15 +58497,38 @@ __webpack_require__.d(__webpack_exports__, {
58014
58497
  /* import */ var _base_resource_collection_client__rspack_import_0 = __webpack_require__("./src/base/resource_collection_client.ts");
58015
58498
 
58016
58499
 
58017
- class ActorVersionCollectionClient extends _base_resource_collection_client__rspack_import_0.ResourceCollectionClient {
58500
+ /**
58501
+ * Client for managing the collection of Actor versions.
58502
+ *
58503
+ * Actor versions represent specific builds or snapshots of an Actor's code. This client provides
58504
+ * methods to list and create versions for a specific Actor.
58505
+ *
58506
+ * @example
58507
+ * ```javascript
58508
+ * const client = new ApifyClient({ token: 'my-token' });
58509
+ * const actorClient = client.actor('my-actor-id');
58510
+ *
58511
+ * // List all versions
58512
+ * const versionsClient = actorClient.versions();
58513
+ * const { items } = await versionsClient.list();
58514
+ *
58515
+ * // Create a new version
58516
+ * const newVersion = await versionsClient.create({
58517
+ * versionNumber: '0.2',
58518
+ * buildTag: 'latest'
58519
+ * });
58520
+ * ```
58521
+ *
58522
+ * @see https://docs.apify.com/platform/actors/development/actor-definition/versions
58523
+ */ class ActorVersionCollectionClient extends _base_resource_collection_client__rspack_import_0.ResourceCollectionClient {
58018
58524
  /**
58019
- * https://docs.apify.com/api/v2#/reference/actors/version-collection/get-list-of-versions
58525
+ * Lists all Actor versions.
58020
58526
  *
58021
58527
  * Awaiting the return value (as you would with a Promise) will result in a single API call. The amount of fetched
58022
58528
  * items in a single API call is limited.
58023
58529
  * ```javascript
58024
58530
  * const paginatedList = await client.list(options);
58025
- *```
58531
+ * ```
58026
58532
  *
58027
58533
  * Asynchronous iteration is also supported. This will fetch additional pages if needed until all items are
58028
58534
  * retrieved.
@@ -58030,6 +58536,10 @@ class ActorVersionCollectionClient extends _base_resource_collection_client__rsp
58030
58536
  * ```javascript
58031
58537
  * for await (const singleItem of client.list(options)) {...}
58032
58538
  * ```
58539
+ *
58540
+ * @param options - Pagination options.
58541
+ * @returns A paginated iterator of Actor versions.
58542
+ * @see https://docs.apify.com/api/v2/act-versions-get
58033
58543
  */ list() {
58034
58544
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
58035
58545
  ow__rspack_import_1_default()(options, ow__rspack_import_1_default().object.exactShape({
@@ -58040,7 +58550,11 @@ class ActorVersionCollectionClient extends _base_resource_collection_client__rsp
58040
58550
  return this._listPaginated(options);
58041
58551
  }
58042
58552
  /**
58043
- * https://docs.apify.com/api/v2#/reference/actors/version-collection/create-version
58553
+ * Creates a new Actor version.
58554
+ *
58555
+ * @param actorVersion - The Actor version data.
58556
+ * @returns The created Actor version object.
58557
+ * @see https://docs.apify.com/api/v2/act-versions-post
58044
58558
  */ async create(actorVersion) {
58045
58559
  ow__rspack_import_1_default()(actorVersion, (ow__rspack_import_1_default().optional.object));
58046
58560
  return this._create(actorVersion);
@@ -58072,9 +58586,46 @@ __webpack_require__.d(__webpack_exports__, {
58072
58586
 
58073
58587
 
58074
58588
 
58075
- class BuildClient extends _base_resource_client__rspack_import_0.ResourceClient {
58589
+ /**
58590
+ * Client for managing a specific Actor build.
58591
+ *
58592
+ * Builds are created when an Actor is built from source code. This client provides methods
58593
+ * to get build details, wait for the build to finish, abort it, and access its logs.
58594
+ *
58595
+ * @example
58596
+ * ```javascript
58597
+ * const client = new ApifyClient({ token: 'my-token' });
58598
+ * const buildClient = client.build('my-build-id');
58599
+ *
58600
+ * // Get build details
58601
+ * const build = await buildClient.get();
58602
+ *
58603
+ * // Wait for the build to finish
58604
+ * const finishedBuild = await buildClient.waitForFinish();
58605
+ *
58606
+ * // Access build logs
58607
+ * const log = await buildClient.log().get();
58608
+ * ```
58609
+ *
58610
+ * @see https://docs.apify.com/platform/actors/running/runs-and-builds#builds
58611
+ */ class BuildClient extends _base_resource_client__rspack_import_0.ResourceClient {
58076
58612
  /**
58077
- * https://docs.apify.com/api/v2#/reference/actor-builds/build-object/get-build
58613
+ * Gets the Actor build object from the Apify API.
58614
+ *
58615
+ * @param options - Get options
58616
+ * @param options.waitForFinish - Maximum time to wait (in seconds, max 60s) for the build to finish on the API side before returning. Default is 0 (returns immediately).
58617
+ * @returns The Build object, or `undefined` if it does not exist
58618
+ * @see https://docs.apify.com/api/v2/actor-build-get
58619
+ *
58620
+ * @example
58621
+ * ```javascript
58622
+ * // Get build status immediately
58623
+ * const build = await client.build('build-id').get();
58624
+ * console.log(`Status: ${build.status}`);
58625
+ *
58626
+ * // Wait up to 60 seconds for build to finish
58627
+ * const build = await client.build('build-id').get({ waitForFinish: 60 });
58628
+ * ```
58078
58629
  */ async get() {
58079
58630
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
58080
58631
  ow__rspack_import_3_default()(options, ow__rspack_import_3_default().object.exactShape({
@@ -58083,7 +58634,17 @@ class BuildClient extends _base_resource_client__rspack_import_0.ResourceClient
58083
58634
  return this._get(options);
58084
58635
  }
58085
58636
  /**
58086
- * https://docs.apify.com/api/v2#/reference/actor-builds/abort-build/abort-build
58637
+ * Aborts the Actor build.
58638
+ *
58639
+ * Stops the build process immediately. The build will have an `ABORTED` status.
58640
+ *
58641
+ * @returns The updated Build object with `ABORTED` status
58642
+ * @see https://docs.apify.com/api/v2/actor-build-abort-post
58643
+ *
58644
+ * @example
58645
+ * ```javascript
58646
+ * await client.build('build-id').abort();
58647
+ * ```
58087
58648
  */ async abort() {
58088
58649
  const response = await this.httpClient.call({
58089
58650
  url: this._url('abort'),
@@ -58093,12 +58654,17 @@ class BuildClient extends _base_resource_client__rspack_import_0.ResourceClient
58093
58654
  return (0,_utils__rspack_import_1.cast)((0,_utils__rspack_import_1.parseDateFields)((0,_utils__rspack_import_1.pluckData)(response.data)));
58094
58655
  }
58095
58656
  /**
58096
- * https://docs.apify.com/api/v2#/reference/actor-builds/delete-build/delete-build
58657
+ * Deletes the Actor build.
58658
+ *
58659
+ * @see https://docs.apify.com/api/v2/actor-build-delete
58097
58660
  */ async delete() {
58098
58661
  return this._delete();
58099
58662
  }
58100
58663
  /**
58101
- * https://docs.apify.com/api/v2/actor-build-openapi-json-get
58664
+ * Retrieves the OpenAPI definition for the Actor build.
58665
+ *
58666
+ * @returns The OpenAPI definition object.
58667
+ * @see https://docs.apify.com/api/v2/actor-build-openapi-json-get
58102
58668
  */ async getOpenApiDefinition() {
58103
58669
  const response = await this.httpClient.call({
58104
58670
  url: this._url('openapi.json'),
@@ -58108,15 +58674,34 @@ class BuildClient extends _base_resource_client__rspack_import_0.ResourceClient
58108
58674
  return response.data;
58109
58675
  }
58110
58676
  /**
58111
- * Returns a promise that resolves with the finished Build object when the provided actor build finishes
58112
- * or with the unfinished Build object when the `waitSecs` timeout lapses. The promise is NOT rejected
58113
- * based on run status. You can inspect the `status` property of the Build object to find out its status.
58677
+ * Waits for the Actor build to finish and returns the finished Build object.
58678
+ *
58679
+ * The promise resolves when the build reaches a terminal state (`SUCCEEDED`, `FAILED`, `ABORTED`, or `TIMED-OUT`).
58680
+ * If `waitSecs` is provided and the timeout is reached, the promise resolves with the unfinished
58681
+ * Build object (status will be `RUNNING` or `READY`). The promise is NOT rejected based on build status.
58114
58682
  *
58115
- * The difference between this function and the `waitForFinish` parameter of the `get` method
58116
- * is the fact that this function can wait indefinitely. Its use is preferable to the
58117
- * `waitForFinish` parameter alone, which it uses internally.
58683
+ * Unlike the `waitForFinish` parameter in {@link get}, this method can wait indefinitely
58684
+ * by polling the build status. It uses the `waitForFinish` parameter internally (max 60s per call)
58685
+ * and continuously polls until the build finishes or the timeout is reached.
58118
58686
  *
58119
58687
  * This is useful when you need to immediately start a run after a build finishes.
58688
+ *
58689
+ * @param options - Wait options
58690
+ * @param options.waitSecs - Maximum time to wait for the build to finish, in seconds. If omitted, waits indefinitely.
58691
+ * @returns The Build object (finished or still building if timeout was reached)
58692
+ *
58693
+ * @example
58694
+ * ```javascript
58695
+ * // Wait indefinitely for build to finish
58696
+ * const build = await client.build('build-id').waitForFinish();
58697
+ * console.log(`Build finished with status: ${build.status}`);
58698
+ *
58699
+ * // Start a run immediately after build succeeds
58700
+ * const build = await client.build('build-id').waitForFinish();
58701
+ * if (build.status === 'SUCCEEDED') {
58702
+ * const run = await client.actor('my-actor').start();
58703
+ * }
58704
+ * ```
58120
58705
  */ async waitForFinish() {
58121
58706
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
58122
58707
  ow__rspack_import_3_default()(options, ow__rspack_import_3_default().object.exactShape({
@@ -58125,7 +58710,17 @@ class BuildClient extends _base_resource_client__rspack_import_0.ResourceClient
58125
58710
  return this._waitForFinish(options);
58126
58711
  }
58127
58712
  /**
58128
- * https://docs.apify.com/api/v2#/reference/actor-builds/build-log
58713
+ * Returns a client for accessing the log of this Actor build.
58714
+ *
58715
+ * @returns A client for accessing the build's log
58716
+ * @see https://docs.apify.com/api/v2/actor-build-log-get
58717
+ *
58718
+ * @example
58719
+ * ```javascript
58720
+ * // Get build log
58721
+ * const log = await client.build('build-id').log().get();
58722
+ * console.log(log);
58723
+ * ```
58129
58724
  */ log() {
58130
58725
  return new _log__rspack_import_2.LogClient(this._subResourceOptions({
58131
58726
  resourcePath: 'log'
@@ -58154,15 +58749,35 @@ __webpack_require__.d(__webpack_exports__, {
58154
58749
  /* import */ var _base_resource_collection_client__rspack_import_0 = __webpack_require__("./src/base/resource_collection_client.ts");
58155
58750
 
58156
58751
 
58157
- class BuildCollectionClient extends _base_resource_collection_client__rspack_import_0.ResourceCollectionClient {
58752
+ /**
58753
+ * Client for managing the collection of Actor builds.
58754
+ *
58755
+ * Provides methods to list Actor builds across all Actors or for a specific Actor.
58756
+ * To access an individual build, use the `build()` method on the main ApifyClient.
58757
+ *
58758
+ * @example
58759
+ * ```javascript
58760
+ * const client = new ApifyClient({ token: 'my-token' });
58761
+ *
58762
+ * // List all builds
58763
+ * const buildsClient = client.builds();
58764
+ * const { items } = await buildsClient.list();
58765
+ *
58766
+ * // List builds for a specific Actor
58767
+ * const actorBuildsClient = client.actor('my-actor-id').builds();
58768
+ * const { items: actorBuilds } = await actorBuildsClient.list();
58769
+ * ```
58770
+ *
58771
+ * @see https://docs.apify.com/platform/actors/running/runs-and-builds#builds
58772
+ */ class BuildCollectionClient extends _base_resource_collection_client__rspack_import_0.ResourceCollectionClient {
58158
58773
  /**
58159
- * https://docs.apify.com/api/v2#/reference/actors/build-collection/get-list-of-builds
58774
+ * Lists all Actor builds.
58160
58775
  *
58161
58776
  * Awaiting the return value (as you would with a Promise) will result in a single API call. The amount of fetched
58162
58777
  * items in a single API call is limited.
58163
58778
  * ```javascript
58164
58779
  * const paginatedList = await client.list(options);
58165
- *```
58780
+ * ```
58166
58781
  *
58167
58782
  * Asynchronous iteration is also supported. This will fetch additional pages if needed until all items are
58168
58783
  * retrieved.
@@ -58170,6 +58785,10 @@ class BuildCollectionClient extends _base_resource_collection_client__rspack_imp
58170
58785
  * ```javascript
58171
58786
  * for await (const singleItem of client.list(options)) {...}
58172
58787
  * ```
58788
+ *
58789
+ * @param options - Pagination and sorting options.
58790
+ * @returns A paginated iterator of Actor builds.
58791
+ * @see https://docs.apify.com/api/v2/actor-builds-get
58173
58792
  */ list() {
58174
58793
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
58175
58794
  ow__rspack_import_1_default()(options, ow__rspack_import_1_default().object.exactShape({
@@ -58207,25 +58826,102 @@ __webpack_require__.d(__webpack_exports__, {
58207
58826
 
58208
58827
 
58209
58828
 
58210
- class DatasetClient extends _base_resource_client__rspack_import_1.ResourceClient {
58829
+ /**
58830
+ * Client for managing a specific Dataset.
58831
+ *
58832
+ * Datasets store structured data results from Actor runs. This client provides methods to push items,
58833
+ * list and retrieve items, download items in various formats (JSON, CSV, Excel, etc.), and manage
58834
+ * the dataset.
58835
+ *
58836
+ * @template Data - Type of items stored in the dataset
58837
+ *
58838
+ * @example
58839
+ * ```javascript
58840
+ * const client = new ApifyClient({ token: 'my-token' });
58841
+ * const datasetClient = client.dataset('my-dataset-id');
58842
+ *
58843
+ * // Push items to the dataset
58844
+ * await datasetClient.pushItems([
58845
+ * { url: 'https://example.com', title: 'Example' },
58846
+ * { url: 'https://test.com', title: 'Test' }
58847
+ * ]);
58848
+ *
58849
+ * // List all items
58850
+ * const { items } = await datasetClient.listItems();
58851
+ *
58852
+ * // Download items as CSV
58853
+ * const buffer = await datasetClient.downloadItems('csv');
58854
+ * ```
58855
+ *
58856
+ * @see https://docs.apify.com/platform/storage/dataset
58857
+ */ class DatasetClient extends _base_resource_client__rspack_import_1.ResourceClient {
58211
58858
  /**
58212
- * https://docs.apify.com/api/v2#/reference/datasets/dataset/get-dataset
58859
+ * Gets the dataset object from the Apify API.
58860
+ *
58861
+ * @returns The Dataset object, or `undefined` if it does not exist
58862
+ * @see https://docs.apify.com/api/v2/dataset-get
58213
58863
  */ async get() {
58214
58864
  return this._get({}, _base_resource_client__rspack_import_1.SMALL_TIMEOUT_MILLIS);
58215
58865
  }
58216
58866
  /**
58217
- * https://docs.apify.com/api/v2#/reference/datasets/dataset/update-dataset
58867
+ * Updates the dataset with specified fields.
58868
+ *
58869
+ * @param newFields - Fields to update in the dataset
58870
+ * @returns The updated Dataset object
58871
+ * @see https://docs.apify.com/api/v2/dataset-put
58218
58872
  */ async update(newFields) {
58219
58873
  ow__rspack_import_3_default()(newFields, (ow__rspack_import_3_default().object));
58220
58874
  return this._update(newFields, _base_resource_client__rspack_import_1.SMALL_TIMEOUT_MILLIS);
58221
58875
  }
58222
58876
  /**
58223
- * https://docs.apify.com/api/v2#/reference/datasets/dataset/delete-dataset
58877
+ * Deletes the dataset.
58878
+ *
58879
+ * @see https://docs.apify.com/api/v2/dataset-delete
58224
58880
  */ async delete() {
58225
58881
  return this._delete(_base_resource_client__rspack_import_1.SMALL_TIMEOUT_MILLIS);
58226
58882
  }
58227
58883
  /**
58228
- * https://docs.apify.com/api/v2#/reference/datasets/item-collection/get-items
58884
+ * Lists items in the dataset.
58885
+ *
58886
+ * Returns a paginated list of dataset items. You can use pagination parameters to retrieve
58887
+ * specific subsets of items, and various filtering and formatting options to customize
58888
+ * the output.
58889
+ *
58890
+ * @param options - Options for listing items
58891
+ * @param options.limit - Maximum number of items to return. Default is all items.
58892
+ * @param options.offset - Number of items to skip from the beginning. Default is 0.
58893
+ * @param options.desc - If `true`, items are returned in descending order (newest first). Default is `false`.
58894
+ * @param options.fields - Array of field names to include in the results. Omits all other fields.
58895
+ * @param options.omit - Array of field names to exclude from the results.
58896
+ * @param options.clean - If `true`, returns only non-empty items and skips hidden fields. Default is `false`.
58897
+ * @param options.skipEmpty - If `true`, skips empty items. Default is `false`.
58898
+ * @param options.skipHidden - If `true`, skips hidden fields (fields starting with `#`). Default is `false`.
58899
+ * @param options.flatten - Array of field names to flatten. Nested objects are converted to dot notation (e.g., `obj.field`).
58900
+ * @param options.unwind - Field name or array of field names to unwind. Each array value creates a separate item.
58901
+ * @param options.view - Name of a predefined view to use for field selection.
58902
+ * @returns A paginated list with `items`, `total` count, `offset`, `count`, and `limit`
58903
+ * @see https://docs.apify.com/api/v2/dataset-items-get
58904
+ *
58905
+ * @example
58906
+ * ```javascript
58907
+ * // Get first 100 items
58908
+ * const { items, total } = await client.dataset('my-dataset').listItems({ limit: 100 });
58909
+ * console.log(`Retrieved ${items.length} of ${total} total items`);
58910
+ *
58911
+ * // Get items with specific fields only
58912
+ * const { items } = await client.dataset('my-dataset').listItems({
58913
+ * fields: ['url', 'title'],
58914
+ * skipEmpty: true,
58915
+ * limit: 50
58916
+ * });
58917
+ *
58918
+ * // Get items in descending order with pagination
58919
+ * const { items } = await client.dataset('my-dataset').listItems({
58920
+ * desc: true,
58921
+ * offset: 100,
58922
+ * limit: 50
58923
+ * });
58924
+ * ```
58229
58925
  */ async listItems() {
58230
58926
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
58231
58927
  ow__rspack_import_3_default()(options, ow__rspack_import_3_default().object.exactShape({
@@ -58251,9 +58947,44 @@ class DatasetClient extends _base_resource_client__rspack_import_1.ResourceClien
58251
58947
  return this._createPaginationList(response, options.desc ?? false);
58252
58948
  }
58253
58949
  /**
58254
- * Unlike `listItems` which returns a {@link PaginationList} with an array of individual
58255
- * dataset items, `downloadItems` returns the items serialized to the provided format.
58256
- * https://docs.apify.com/api/v2#/reference/datasets/item-collection/get-items
58950
+ * Downloads dataset items in a specific format.
58951
+ *
58952
+ * Unlike {@link listItems} which returns a {@link PaginatedList} with an array of individual
58953
+ * dataset items, this method returns the items serialized to the provided format
58954
+ * (JSON, CSV, Excel, etc.) as a Buffer. Useful for exporting data for further processing.
58955
+ *
58956
+ * @param format - Output format: `'json'`, `'jsonl'`, `'csv'`, `'xlsx'`, `'xml'`, `'rss'`, or `'html'`
58957
+ * @param options - Download and formatting options (extends all options from {@link listItems})
58958
+ * @param options.attachment - If `true`, the response will have `Content-Disposition: attachment` header.
58959
+ * @param options.bom - If `true`, adds UTF-8 BOM to the beginning of the file (useful for Excel compatibility).
58960
+ * @param options.delimiter - CSV delimiter character. Default is `,` (comma).
58961
+ * @param options.skipHeaderRow - If `true`, CSV export will not include the header row with field names.
58962
+ * @param options.xmlRoot - Name of the root XML element. Default is `'items'`.
58963
+ * @param options.xmlRow - Name of the XML element for each item. Default is `'item'`.
58964
+ * @param options.fields - Array of field names to include in the export.
58965
+ * @param options.omit - Array of field names to exclude from the export.
58966
+ * @returns Buffer containing the serialized data in the specified format
58967
+ * @see https://docs.apify.com/api/v2/dataset-items-get
58968
+ *
58969
+ * @example
58970
+ * ```javascript
58971
+ * // Download as CSV with BOM for Excel compatibility
58972
+ * const csvBuffer = await client.dataset('my-dataset').downloadItems('csv', { bom: true });
58973
+ * require('fs').writeFileSync('output.csv', csvBuffer);
58974
+ *
58975
+ * // Download as Excel with custom options
58976
+ * const xlsxBuffer = await client.dataset('my-dataset').downloadItems('xlsx', {
58977
+ * fields: ['url', 'title', 'price'],
58978
+ * skipEmpty: true,
58979
+ * limit: 1000
58980
+ * });
58981
+ *
58982
+ * // Download as XML with custom element names
58983
+ * const xmlBuffer = await client.dataset('my-dataset').downloadItems('xml', {
58984
+ * xmlRoot: 'products',
58985
+ * xmlRow: 'product'
58986
+ * });
58987
+ * ```
58257
58988
  */ async downloadItems(format) {
58258
58989
  let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
58259
58990
  ow__rspack_import_3_default()(format, ow__rspack_import_3_default().string.oneOf(validItemFormats));
@@ -58290,8 +59021,37 @@ class DatasetClient extends _base_resource_client__rspack_import_1.ResourceClien
58290
59021
  return (0,_utils__rspack_import_2.cast)(data);
58291
59022
  }
58292
59023
  /**
58293
- * https://docs.apify.com/api/v2#/reference/datasets/item-collection/put-items
58294
- */ async pushItems(items) {
59024
+ * Stores one or more items into the dataset.
59025
+ *
59026
+ * Items can be objects, strings, or arrays thereof. Each item will be stored as a separate
59027
+ * record in the dataset. Objects are automatically serialized to JSON. If you provide an array,
59028
+ * all items will be stored in order. This method is idempotent - calling it multiple times
59029
+ * with the same data will not create duplicates, but will append items each time.
59030
+ *
59031
+ * @param items - A single item (object or string) or an array of items to store.
59032
+ * Objects are automatically stringified to JSON. Strings are stored as-is.
59033
+ * @see https://docs.apify.com/api/v2/dataset-items-post
59034
+ *
59035
+ * @example
59036
+ * ```javascript
59037
+ * // Store a single object
59038
+ * await client.dataset('my-dataset').pushItems({
59039
+ * url: 'https://example.com',
59040
+ * title: 'Example Page',
59041
+ * extractedAt: new Date()
59042
+ * });
59043
+ *
59044
+ * // Store multiple items at once
59045
+ * await client.dataset('my-dataset').pushItems([
59046
+ * { url: 'https://example.com', title: 'Example' },
59047
+ * { url: 'https://test.com', title: 'Test' },
59048
+ * { url: 'https://demo.com', title: 'Demo' }
59049
+ * ]);
59050
+ *
59051
+ * // Store string items
59052
+ * await client.dataset('my-dataset').pushItems(['item1', 'item2', 'item3']);
59053
+ * ```
59054
+ */ async pushItems(items) {
58295
59055
  ow__rspack_import_3_default()(items, ow__rspack_import_3_default().any((ow__rspack_import_3_default().object), (ow__rspack_import_3_default().string), ow__rspack_import_3_default().array.ofType(ow__rspack_import_3_default().any((ow__rspack_import_3_default().object), (ow__rspack_import_3_default().string)))));
58296
59056
  await this.httpClient.call({
58297
59057
  url: this._url('items'),
@@ -58306,7 +59066,13 @@ class DatasetClient extends _base_resource_client__rspack_import_1.ResourceClien
58306
59066
  });
58307
59067
  }
58308
59068
  /**
58309
- * https://docs.apify.com/api/v2#tag/DatasetsStatistics/operation/dataset_statistics_get
59069
+ * Gets statistical information about the dataset.
59070
+ *
59071
+ * Returns statistics for each field in the dataset, including information about
59072
+ * data types, null counts, and value ranges.
59073
+ *
59074
+ * @returns Dataset statistics, or `undefined` if not available
59075
+ * @see https://docs.apify.com/api/v2/dataset-statistics-get
58310
59076
  */ async getStatistics() {
58311
59077
  const requestOpts = {
58312
59078
  url: this._url('statistics'),
@@ -58323,16 +59089,35 @@ class DatasetClient extends _base_resource_client__rspack_import_1.ResourceClien
58323
59089
  return undefined;
58324
59090
  }
58325
59091
  /**
58326
- * Generates a URL that can be used to access dataset items.
59092
+ * Generates a public URL for accessing dataset items.
58327
59093
  *
58328
59094
  * If the client has permission to access the dataset's URL signing key,
58329
- * the URL will include a signature which will allow the link to work even without authentication.
59095
+ * the URL will include a cryptographic signature allowing access without authentication.
59096
+ * This is useful for sharing dataset results with external services or users.
58330
59097
  *
58331
- * You can optionally control how long the signed URL should be valid using the `expiresInSecs` option.
58332
- * This value sets the expiration duration in seconds from the time the URL is generated.
58333
- * If not provided, the URL will not expire.
59098
+ * @param options - URL generation options (extends all options from {@link listItems})
59099
+ * @param options.expiresInSecs - Number of seconds until the signed URL expires. If omitted, the URL never expires.
59100
+ * @param options.fields - Array of field names to include in the response.
59101
+ * @param options.limit - Maximum number of items to return.
59102
+ * @param options.offset - Number of items to skip.
59103
+ * @returns A public URL string for accessing the dataset items
58334
59104
  *
58335
- * Any other options (like `limit` or `prefix`) will be included as query parameters in the URL.
59105
+ * @example
59106
+ * ```javascript
59107
+ * // Create a URL that expires in 1 hour with specific fields
59108
+ * const url = await client.dataset('my-dataset').createItemsPublicUrl({
59109
+ * expiresInSecs: 3600,
59110
+ * fields: ['url', 'title'],
59111
+ * limit: 100
59112
+ * });
59113
+ * console.log(`Share this URL: ${url}`);
59114
+ *
59115
+ * // Create a permanent public URL for clean items only
59116
+ * const url = await client.dataset('my-dataset').createItemsPublicUrl({
59117
+ * clean: true,
59118
+ * skipEmpty: true
59119
+ * });
59120
+ * ```
58336
59121
  */ async createItemsPublicUrl() {
58337
59122
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
58338
59123
  ow__rspack_import_3_default()(options, ow__rspack_import_3_default().object.exactShape({
@@ -58383,7 +59168,9 @@ class DatasetClient extends _base_resource_client__rspack_import_1.ResourceClien
58383
59168
  });
58384
59169
  }
58385
59170
  }
58386
- var DownloadItemsFormat = /*#__PURE__*/ function(DownloadItemsFormat) {
59171
+ /**
59172
+ * Supported formats for downloading dataset items.
59173
+ */ var DownloadItemsFormat = /*#__PURE__*/ function(DownloadItemsFormat) {
58387
59174
  DownloadItemsFormat["JSON"] = "json";
58388
59175
  DownloadItemsFormat["JSONL"] = "jsonl";
58389
59176
  DownloadItemsFormat["XML"] = "xml";
@@ -58410,15 +59197,34 @@ __webpack_require__.d(__webpack_exports__, {
58410
59197
  /* import */ var _base_resource_collection_client__rspack_import_0 = __webpack_require__("./src/base/resource_collection_client.ts");
58411
59198
 
58412
59199
 
58413
- class DatasetCollectionClient extends _base_resource_collection_client__rspack_import_0.ResourceCollectionClient {
59200
+ /**
59201
+ * Client for managing the collection of datasets in your account.
59202
+ *
59203
+ * Datasets store structured data results from Actor runs. This client provides methods
59204
+ * to list, create, or get datasets by name.
59205
+ *
59206
+ * @example
59207
+ * ```javascript
59208
+ * const client = new ApifyClient({ token: 'my-token' });
59209
+ * const datasetsClient = client.datasets();
59210
+ *
59211
+ * // List all datasets
59212
+ * const { items } = await datasetsClient.list();
59213
+ *
59214
+ * // Get or create a dataset by name
59215
+ * const dataset = await datasetsClient.getOrCreate('my-dataset');
59216
+ * ```
59217
+ *
59218
+ * @see https://docs.apify.com/platform/storage/dataset
59219
+ */ class DatasetCollectionClient extends _base_resource_collection_client__rspack_import_0.ResourceCollectionClient {
58414
59220
  /**
58415
- * https://docs.apify.com/api/v2#/reference/datasets/dataset-collection/get-list-of-datasets
59221
+ * Lists all Datasets.
58416
59222
  *
58417
59223
  * Awaiting the return value (as you would with a Promise) will result in a single API call. The amount of fetched
58418
59224
  * items in a single API call is limited.
58419
59225
  * ```javascript
58420
59226
  * const paginatedList = await client.list(options);
58421
- *```
59227
+ * ```
58422
59228
  *
58423
59229
  * Asynchronous iteration is also supported. This will fetch additional pages if needed until all items are
58424
59230
  * retrieved.
@@ -58426,6 +59232,10 @@ class DatasetCollectionClient extends _base_resource_collection_client__rspack_i
58426
59232
  * ```javascript
58427
59233
  * for await (const singleItem of client.list(options)) {...}
58428
59234
  * ```
59235
+ *
59236
+ * @param options - Pagination options.
59237
+ * @returns A paginated iterator of Datasets.
59238
+ * @see https://docs.apify.com/api/v2/datasets-get
58429
59239
  */ list() {
58430
59240
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
58431
59241
  ow__rspack_import_1_default()(options, ow__rspack_import_1_default().object.exactShape({
@@ -58437,7 +59247,12 @@ class DatasetCollectionClient extends _base_resource_collection_client__rspack_i
58437
59247
  return this._listPaginated(options);
58438
59248
  }
58439
59249
  /**
58440
- * https://docs.apify.com/api/v2#/reference/datasets/dataset-collection/create-dataset
59250
+ * Gets or creates a dataset with the specified name.
59251
+ *
59252
+ * @param name - Name of the dataset. If not provided, a default dataset is used.
59253
+ * @param options - Additional options like schema.
59254
+ * @returns The dataset object.
59255
+ * @see https://docs.apify.com/api/v2/datasets-post
58441
59256
  */ async getOrCreate(name, options) {
58442
59257
  ow__rspack_import_1_default()(name, (ow__rspack_import_1_default().optional.string));
58443
59258
  ow__rspack_import_1_default()(options === null || options === void 0 ? void 0 : options.schema, (ow__rspack_import_1_default().optional.object)); // TODO: Add schema validatioon
@@ -58472,25 +59287,96 @@ __webpack_require__.d(__webpack_exports__, {
58472
59287
 
58473
59288
 
58474
59289
 
58475
- class KeyValueStoreClient extends _base_resource_client__rspack_import_2.ResourceClient {
59290
+ /**
59291
+ * Client for managing a specific key-value store.
59292
+ *
59293
+ * Key-value stores are used to store arbitrary data records or files. Each record is identified by
59294
+ * a unique key and can contain any type of data. This client provides methods to get, set, and delete
59295
+ * records, list keys, and manage the store.
59296
+ *
59297
+ * @example
59298
+ * ```javascript
59299
+ * const client = new ApifyClient({ token: 'my-token' });
59300
+ * const storeClient = client.keyValueStore('my-store-id');
59301
+ *
59302
+ * // Set a record
59303
+ * await storeClient.setRecord({
59304
+ * key: 'OUTPUT',
59305
+ * value: { foo: 'bar' },
59306
+ * contentType: 'application/json'
59307
+ * });
59308
+ *
59309
+ * // Get a record
59310
+ * const record = await storeClient.getRecord('OUTPUT');
59311
+ *
59312
+ * // List all keys
59313
+ * const { items } = await storeClient.listKeys();
59314
+ * ```
59315
+ *
59316
+ * @see https://docs.apify.com/platform/storage/key-value-store
59317
+ */ class KeyValueStoreClient extends _base_resource_client__rspack_import_2.ResourceClient {
58476
59318
  /**
58477
- * https://docs.apify.com/api/v2#/reference/key-value-stores/store-object/get-store
59319
+ * Gets the key-value store object from the Apify API.
59320
+ *
59321
+ * @returns The KeyValueStore object, or `undefined` if it does not exist
59322
+ * @see https://docs.apify.com/api/v2/key-value-store-get
58478
59323
  */ async get() {
58479
59324
  return this._get({}, _base_resource_client__rspack_import_2.SMALL_TIMEOUT_MILLIS);
58480
59325
  }
58481
59326
  /**
58482
- * https://docs.apify.com/api/v2#/reference/key-value-stores/store-object/update-store
59327
+ * Updates the key-value store with specified fields.
59328
+ *
59329
+ * @param newFields - Fields to update in the key-value store
59330
+ * @param newFields.name - New name for the store
59331
+ * @param newFields.title - New title for the store
59332
+ * @param newFields.generalAccess - General resource access level ('FOLLOW_USER_SETTING', 'ANYONE_WITH_ID_CAN_READ' or 'RESTRICTED')
59333
+ * @returns The updated KeyValueStore object
59334
+ * @see https://docs.apify.com/api/v2/key-value-store-put
58483
59335
  */ async update(newFields) {
58484
59336
  ow__rspack_import_4_default()(newFields, (ow__rspack_import_4_default().object));
58485
59337
  return this._update(newFields, _base_resource_client__rspack_import_2.DEFAULT_TIMEOUT_MILLIS);
58486
59338
  }
58487
59339
  /**
58488
- * https://docs.apify.com/api/v2#/reference/key-value-stores/store-object/delete-store
59340
+ * Deletes the key-value store.
59341
+ *
59342
+ * @see https://docs.apify.com/api/v2/key-value-store-delete
58489
59343
  */ async delete() {
58490
59344
  return this._delete(_base_resource_client__rspack_import_2.SMALL_TIMEOUT_MILLIS);
58491
59345
  }
58492
59346
  /**
58493
- * https://docs.apify.com/api/v2#/reference/key-value-stores/key-collection/get-list-of-keys
59347
+ * Lists all keys in the key-value store.
59348
+ *
59349
+ * Returns a paginated list of all record keys in the store. Use pagination parameters
59350
+ * to retrieve large lists efficiently.
59351
+ *
59352
+ * @param options - Listing options
59353
+ * @param options.limit - Maximum number of keys to return. Default is 1000.
59354
+ * @param options.exclusiveStartKey - Key to start listing from (for pagination). The listing starts with the next key after this one.
59355
+ * @param options.collection - Filter keys by collection name.
59356
+ * @param options.prefix - Filter keys that start with this prefix.
59357
+ * @returns Object containing `items` array of key metadata, pagination info (`count`, `limit`, `isTruncated`, `nextExclusiveStartKey`)
59358
+ * @see https://docs.apify.com/api/v2/key-value-store-keys-get
59359
+ *
59360
+ * @example
59361
+ * ```javascript
59362
+ * // List all keys
59363
+ * const { items, isTruncated } = await client.keyValueStore('my-store').listKeys();
59364
+ * items.forEach(item => console.log(`${item.key}: ${item.size} bytes`));
59365
+ *
59366
+ * // List keys with prefix
59367
+ * const { items } = await client.keyValueStore('my-store').listKeys({ prefix: 'user-' });
59368
+ *
59369
+ * // Paginate through all keys
59370
+ * let exclusiveStartKey;
59371
+ * do {
59372
+ * const result = await client.keyValueStore('my-store').listKeys({
59373
+ * limit: 100,
59374
+ * exclusiveStartKey
59375
+ * });
59376
+ * // Process result.items...
59377
+ * exclusiveStartKey = result.nextExclusiveStartKey;
59378
+ * } while (result.isTruncated);
59379
+ * ```
58494
59380
  */ async listKeys() {
58495
59381
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
58496
59382
  ow__rspack_import_4_default()(options, ow__rspack_import_4_default().object.exactShape({
@@ -58509,10 +59395,21 @@ class KeyValueStoreClient extends _base_resource_client__rspack_import_2.Resourc
58509
59395
  return (0,_utils__rspack_import_3.cast)((0,_utils__rspack_import_3.parseDateFields)((0,_utils__rspack_import_3.pluckData)(response.data)));
58510
59396
  }
58511
59397
  /**
58512
- * Generates a URL that can be used to access key-value store record.
59398
+ * Generates a public URL for accessing a specific record in the key-value store.
58513
59399
  *
58514
59400
  * If the client has permission to access the key-value store's URL signing key,
58515
- * the URL will include a signature to verify its authenticity.
59401
+ * the URL will include a cryptographic signature for authenticated access without
59402
+ * requiring an API token.
59403
+ *
59404
+ * @param key - The record key
59405
+ * @returns A public URL string for accessing the record
59406
+ *
59407
+ * @example
59408
+ * ```javascript
59409
+ * const url = await client.keyValueStore('my-store').getRecordPublicUrl('OUTPUT');
59410
+ * console.log(`Public URL: ${url}`);
59411
+ * // You can now share this URL or use it in a browser
59412
+ * ```
58516
59413
  */ async getRecordPublicUrl(key) {
58517
59414
  ow__rspack_import_4_default()(key, (ow__rspack_import_4_default().string.nonEmpty));
58518
59415
  const store = await this.get();
@@ -58524,16 +59421,26 @@ class KeyValueStoreClient extends _base_resource_client__rspack_import_2.Resourc
58524
59421
  return recordPublicUrl.toString();
58525
59422
  }
58526
59423
  /**
58527
- * Generates a URL that can be used to access key-value store keys.
59424
+ * Generates a public URL for accessing the list of keys in the key-value store.
58528
59425
  *
58529
59426
  * If the client has permission to access the key-value store's URL signing key,
58530
- * the URL will include a signature which will allow the link to work even without authentication.
59427
+ * the URL will include a cryptographic signature which allows access without authentication.
58531
59428
  *
58532
- * You can optionally control how long the signed URL should be valid using the `expiresInSecs` option.
58533
- * This value sets the expiration duration in seconds from the time the URL is generated.
58534
- * If not provided, the URL will not expire.
59429
+ * @param options - URL generation options (extends all options from {@link listKeys})
59430
+ * @param options.expiresInSecs - Number of seconds until the signed URL expires. If omitted, the URL never expires.
59431
+ * @param options.limit - Maximum number of keys to return.
59432
+ * @param options.prefix - Filter keys by prefix.
59433
+ * @returns A public URL string for accessing the keys list
58535
59434
  *
58536
- * Any other options (like `limit` or `prefix`) will be included as query parameters in the URL.
59435
+ * @example
59436
+ * ```javascript
59437
+ * // Create a URL that expires in 1 hour
59438
+ * const url = await client.keyValueStore('my-store').createKeysPublicUrl({
59439
+ * expiresInSecs: 3600,
59440
+ * prefix: 'image-'
59441
+ * });
59442
+ * console.log(`Share this URL: ${url}`);
59443
+ * ```
58537
59444
  */ async createKeysPublicUrl() {
58538
59445
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
58539
59446
  ow__rspack_import_4_default()(options, ow__rspack_import_4_default().object.exactShape({
@@ -58560,9 +59467,19 @@ class KeyValueStoreClient extends _base_resource_client__rspack_import_2.Resourc
58560
59467
  /**
58561
59468
  * Tests whether a record with the given key exists in the key-value store without retrieving its value.
58562
59469
  *
58563
- * https://docs.apify.com/api/v2#/reference/key-value-stores/record/get-record
58564
- * @param key The queried record key.
58565
- * @returns `true` if the record exists, `false` if it does not.
59470
+ * This is more efficient than {@link getRecord} when you only need to check for existence.
59471
+ *
59472
+ * @param key - The record key to check
59473
+ * @returns `true` if the record exists, `false` if it does not
59474
+ * @see https://docs.apify.com/api/v2/key-value-store-record-get
59475
+ *
59476
+ * @example
59477
+ * ```javascript
59478
+ * const exists = await client.keyValueStore('my-store').recordExists('OUTPUT');
59479
+ * if (exists) {
59480
+ * console.log('OUTPUT record exists');
59481
+ * }
59482
+ * ```
58566
59483
  */ async recordExists(key) {
58567
59484
  const requestOpts = {
58568
59485
  url: this._url(`records/${key}`),
@@ -58615,15 +59532,51 @@ class KeyValueStoreClient extends _base_resource_client__rspack_import_2.Resourc
58615
59532
  return undefined;
58616
59533
  }
58617
59534
  /**
58618
- * The value in the record can be a stream object (detected by having the `.pipe`
58619
- * and `.on` methods). However, note that in that case following redirects or
58620
- * retrying the request if it fails (for example due to rate limiting) isn't
58621
- * possible. If you want to keep that behavior, you need to collect the whole
58622
- * stream contents into a Buffer and then send the full buffer. See [this
58623
- * StackOverflow answer](https://stackoverflow.com/a/14269536/7292139) for
58624
- * an example how to do that.
59535
+ * Stores a record in the key-value store.
59536
+ *
59537
+ * The record value can be any JSON-serializable object, a string, or a Buffer/Stream.
59538
+ * The content type is automatically determined based on the value type, but can be
59539
+ * overridden using the `contentType` property.
59540
+ *
59541
+ * **Note about streams:** If the value is a stream object (has `.pipe` and `.on` methods),
59542
+ * the upload cannot be retried on failure or follow redirects. For reliable uploads,
59543
+ * buffer the entire stream into memory first.
59544
+ *
59545
+ * @param record - The record to store
59546
+ * @param record.key - Record key (unique identifier)
59547
+ * @param record.value - Record value (object, string, Buffer, or Stream)
59548
+ * @param record.contentType - Optional MIME type. Auto-detected if not provided:
59549
+ * - Objects: `'application/json; charset=utf-8'`
59550
+ * - Strings: `'text/plain; charset=utf-8'`
59551
+ * - Buffers/Streams: `'application/octet-stream'`
59552
+ * @param options - Storage options
59553
+ * @param options.timeoutSecs - Timeout for the upload in seconds. Default varies by value size.
59554
+ * @param options.doNotRetryTimeouts - If `true`, don't retry on timeout errors. Default is `false`.
59555
+ * @see https://docs.apify.com/api/v2/key-value-store-record-put
58625
59556
  *
58626
- * https://docs.apify.com/api/v2#/reference/key-value-stores/record/put-record
59557
+ * @example
59558
+ * ```javascript
59559
+ * // Store JSON object
59560
+ * await client.keyValueStore('my-store').setRecord({
59561
+ * key: 'OUTPUT',
59562
+ * value: { crawledUrls: 100, items: [...] }
59563
+ * });
59564
+ *
59565
+ * // Store text
59566
+ * await client.keyValueStore('my-store').setRecord({
59567
+ * key: 'README',
59568
+ * value: 'This is my readme text',
59569
+ * contentType: 'text/plain'
59570
+ * });
59571
+ *
59572
+ * // Store binary data
59573
+ * const imageBuffer = await fetchImageBuffer();
59574
+ * await client.keyValueStore('my-store').setRecord({
59575
+ * key: 'screenshot.png',
59576
+ * value: imageBuffer,
59577
+ * contentType: 'image/png'
59578
+ * });
59579
+ * ```
58627
59580
  */ async setRecord(record) {
58628
59581
  let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
58629
59582
  ow__rspack_import_4_default()(record, ow__rspack_import_4_default().object.exactShape({
@@ -58668,7 +59621,15 @@ class KeyValueStoreClient extends _base_resource_client__rspack_import_2.Resourc
58668
59621
  await this.httpClient.call(uploadOpts);
58669
59622
  }
58670
59623
  /**
58671
- * https://docs.apify.com/api/v2#/reference/key-value-stores/record/delete-record
59624
+ * Deletes a record from the key-value store.
59625
+ *
59626
+ * @param key - The record key to delete
59627
+ * @see https://docs.apify.com/api/v2/key-value-store-record-delete
59628
+ *
59629
+ * @example
59630
+ * ```javascript
59631
+ * await client.keyValueStore('my-store').deleteRecord('temp-data');
59632
+ * ```
58672
59633
  */ async deleteRecord(key) {
58673
59634
  ow__rspack_import_4_default()(key, (ow__rspack_import_4_default().string));
58674
59635
  await this.httpClient.call({
@@ -58701,15 +59662,34 @@ __webpack_require__.d(__webpack_exports__, {
58701
59662
  /* import */ var _base_resource_collection_client__rspack_import_0 = __webpack_require__("./src/base/resource_collection_client.ts");
58702
59663
 
58703
59664
 
58704
- class KeyValueStoreCollectionClient extends _base_resource_collection_client__rspack_import_0.ResourceCollectionClient {
59665
+ /**
59666
+ * Client for managing the collection of Key-value stores in your account.
59667
+ *
59668
+ * Key-value stores are used to store arbitrary data records or files. This client provides
59669
+ * methods to list, create, or get key-value stores by name.
59670
+ *
59671
+ * @example
59672
+ * ```javascript
59673
+ * const client = new ApifyClient({ token: 'my-token' });
59674
+ * const storesClient = client.keyValueStores();
59675
+ *
59676
+ * // List all key-value stores
59677
+ * const { items } = await storesClient.list();
59678
+ *
59679
+ * // Get or create a key-value store by name
59680
+ * const store = await storesClient.getOrCreate('my-store');
59681
+ * ```
59682
+ *
59683
+ * @see https://docs.apify.com/platform/storage/key-value-store
59684
+ */ class KeyValueStoreCollectionClient extends _base_resource_collection_client__rspack_import_0.ResourceCollectionClient {
58705
59685
  /**
58706
- * https://docs.apify.com/api/v2#/reference/key-value-stores/store-collection/get-list-of-key-value-stores
59686
+ * Lists all Key-value stores.
58707
59687
  *
58708
59688
  * Awaiting the return value (as you would with a Promise) will result in a single API call. The amount of fetched
58709
59689
  * items in a single API call is limited.
58710
59690
  * ```javascript
58711
59691
  * const paginatedList = await client.list(options);
58712
- *```
59692
+ * ```
58713
59693
  *
58714
59694
  * Asynchronous iteration is also supported. This will fetch additional pages if needed until all items are
58715
59695
  * retrieved.
@@ -58717,6 +59697,10 @@ class KeyValueStoreCollectionClient extends _base_resource_collection_client__rs
58717
59697
  * ```javascript
58718
59698
  * for await (const singleItem of client.list(options)) {...}
58719
59699
  * ```
59700
+ *
59701
+ * @param options - Pagination options.
59702
+ * @returns A paginated iterator of Key-value stores.
59703
+ * @see https://docs.apify.com/api/v2/key-value-stores-get
58720
59704
  */ list() {
58721
59705
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
58722
59706
  ow__rspack_import_1_default()(options, ow__rspack_import_1_default().object.exactShape({
@@ -58728,7 +59712,12 @@ class KeyValueStoreCollectionClient extends _base_resource_collection_client__rs
58728
59712
  return this._listPaginated(options);
58729
59713
  }
58730
59714
  /**
58731
- * https://docs.apify.com/api/v2#/reference/key-value-stores/store-collection/create-key-value-store
59715
+ * Gets or creates a key-value store with the specified name.
59716
+ *
59717
+ * @param name - Name of the key-value store. If not provided, a default store is used.
59718
+ * @param options - Additional options like schema.
59719
+ * @returns The key-value store object.
59720
+ * @see https://docs.apify.com/api/v2/key-value-stores-post
58732
59721
  */ async getOrCreate(name, options) {
58733
59722
  ow__rspack_import_1_default()(name, (ow__rspack_import_1_default().optional.string));
58734
59723
  ow__rspack_import_1_default()(options === null || options === void 0 ? void 0 : options.schema, (ow__rspack_import_1_default().optional.object)); // TODO: Add schema validatioon
@@ -58767,9 +59756,35 @@ __webpack_require__.d(__webpack_exports__, {
58767
59756
 
58768
59757
 
58769
59758
 
58770
- class LogClient extends _base_resource_client__rspack_import_2.ResourceClient {
59759
+ /**
59760
+ * Client for accessing Actor run or build logs.
59761
+ *
59762
+ * Provides methods to retrieve logs as text or stream them in real-time. Logs can be accessed
59763
+ * for both running and finished Actor runs and builds.
59764
+ *
59765
+ * @example
59766
+ * ```javascript
59767
+ * const client = new ApifyClient({ token: 'my-token' });
59768
+ * const runClient = client.run('my-run-id');
59769
+ *
59770
+ * // Get the log content
59771
+ * const log = await runClient.log().get();
59772
+ * console.log(log);
59773
+ *
59774
+ * // Stream the log in real-time
59775
+ * const stream = await runClient.log().stream();
59776
+ * stream.on('line', (line) => console.log(line));
59777
+ * ```
59778
+ *
59779
+ * @see https://docs.apify.com/platform/actors/running/runs-and-builds#logging
59780
+ */ class LogClient extends _base_resource_client__rspack_import_2.ResourceClient {
58771
59781
  /**
58772
- * https://docs.apify.com/api/v2#/reference/logs/log/get-log
59782
+ * Retrieves the log as a string.
59783
+ *
59784
+ * @param options - Log retrieval options.
59785
+ * @param options.raw - If `true`, returns raw log content without any processing. Default is `false`.
59786
+ * @returns The log content as a string, or `undefined` if it does not exist.
59787
+ * @see https://docs.apify.com/api/v2/log-get
58773
59788
  */ async get() {
58774
59789
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
58775
59790
  const requestOpts = {
@@ -58786,8 +59801,12 @@ class LogClient extends _base_resource_client__rspack_import_2.ResourceClient {
58786
59801
  return undefined;
58787
59802
  }
58788
59803
  /**
58789
- * Gets the log in a Readable stream format. Only works in Node.js.
58790
- * https://docs.apify.com/api/v2#/reference/logs/log/get-log
59804
+ * Retrieves the log as a Readable stream. Only works in Node.js.
59805
+ *
59806
+ * @param options - Log retrieval options.
59807
+ * @param options.raw - If `true`, returns raw log content without any processing. Default is `false`.
59808
+ * @returns The log content as a Readable stream, or `undefined` if it does not exist.
59809
+ * @see https://docs.apify.com/api/v2/log-get
58791
59810
  */ async stream() {
58792
59811
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
58793
59812
  const params = {
@@ -58979,25 +59998,70 @@ const DEFAULT_UNPROCESSED_RETRIES_BATCH_ADD_REQUESTS = 3;
58979
59998
  const DEFAULT_MIN_DELAY_BETWEEN_UNPROCESSED_REQUESTS_RETRIES_MILLIS = 500;
58980
59999
  const DEFAULT_REQUEST_QUEUE_REQUEST_PAGE_LIMIT = 1000;
58981
60000
  const SAFETY_BUFFER_PERCENT = 0.01 / 100; // 0.01%
58982
- class RequestQueueClient extends _base_resource_client__rspack_import_2.ResourceClient {
60001
+ /**
60002
+ * Client for managing a specific Request queue.
60003
+ *
60004
+ * Request queues store URLs to be crawled and their metadata. Each request in the queue has a unique ID
60005
+ * and can be in various states (pending, handled). This client provides methods to add, get, update,
60006
+ * and delete requests, as well as manage the queue itself.
60007
+ *
60008
+ * @example
60009
+ * ```javascript
60010
+ * const client = new ApifyClient({ token: 'my-token' });
60011
+ * const queueClient = client.requestQueue('my-queue-id');
60012
+ *
60013
+ * // Add a request to the queue
60014
+ * await queueClient.addRequest({
60015
+ * url: 'https://example.com',
60016
+ * uniqueKey: 'example-com'
60017
+ * });
60018
+ *
60019
+ * // Get the next request from the queue
60020
+ * const request = await queueClient.listHead();
60021
+ *
60022
+ * // Mark request as handled
60023
+ * await queueClient.updateRequest({
60024
+ * id: request.id,
60025
+ * handledAt: new Date().toISOString()
60026
+ * });
60027
+ * ```
60028
+ *
60029
+ * @see https://docs.apify.com/platform/storage/request-queue
60030
+ */ class RequestQueueClient extends _base_resource_client__rspack_import_2.ResourceClient {
58983
60031
  /**
58984
- * https://docs.apify.com/api/v2#/reference/request-queues/queue/get-request-queue
60032
+ * Gets the Request queue object from the Apify API.
60033
+ *
60034
+ * @returns The RequestQueue object, or `undefined` if it does not exist
60035
+ * @see https://docs.apify.com/api/v2/request-queue-get
58985
60036
  */ async get() {
58986
60037
  return this._get({}, _base_resource_client__rspack_import_2.SMALL_TIMEOUT_MILLIS);
58987
60038
  }
58988
60039
  /**
58989
- * https://docs.apify.com/api/v2#/reference/request-queues/queue/update-request-queue
60040
+ * Updates the Request queue with specified fields.
60041
+ *
60042
+ * @param newFields - Fields to update in the Request queue
60043
+ * @returns The updated RequestQueue object
60044
+ * @see https://docs.apify.com/api/v2/request-queue-put
58990
60045
  */ async update(newFields) {
58991
60046
  ow__rspack_import_4_default()(newFields, (ow__rspack_import_4_default().object));
58992
60047
  return this._update(newFields, _base_resource_client__rspack_import_2.SMALL_TIMEOUT_MILLIS);
58993
60048
  }
58994
60049
  /**
58995
- * https://docs.apify.com/api/v2#/reference/request-queues/queue/delete-request-queue
60050
+ * Deletes the Request queue.
60051
+ *
60052
+ * @see https://docs.apify.com/api/v2/request-queue-delete
58996
60053
  */ async delete() {
58997
60054
  return this._delete(_base_resource_client__rspack_import_2.SMALL_TIMEOUT_MILLIS);
58998
60055
  }
58999
60056
  /**
59000
- * https://docs.apify.com/api/v2#/reference/request-queues/queue-head/get-head
60057
+ * Lists requests from the beginning of the queue (head).
60058
+ *
60059
+ * Returns the first N requests from the queue without locking them. This is useful for
60060
+ * inspecting what requests are waiting to be processed.
60061
+ *
60062
+ * @param options - Options for listing (e.g., limit)
60063
+ * @returns List of requests from the queue head
60064
+ * @see https://docs.apify.com/api/v2/request-queue-head-get
59001
60065
  */ async listHead() {
59002
60066
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
59003
60067
  ow__rspack_import_4_default()(options, ow__rspack_import_4_default().object.exactShape({
@@ -59015,7 +60079,36 @@ class RequestQueueClient extends _base_resource_client__rspack_import_2.Resource
59015
60079
  return (0,_utils__rspack_import_3.cast)((0,_utils__rspack_import_3.parseDateFields)((0,_utils__rspack_import_3.pluckData)(response.data)));
59016
60080
  }
59017
60081
  /**
59018
- * https://docs.apify.com/api/v2#/reference/request-queues/queue-head-with-locks/get-head-and-lock
60082
+ * Gets and locks the next requests from the queue head for processing.
60083
+ *
60084
+ * This method retrieves requests from the beginning of the queue and locks them for
60085
+ * the specified duration to prevent other clients from processing them simultaneously.
60086
+ * This is the primary method used by distributed web crawlers to coordinate work across
60087
+ * multiple workers. Locked requests won't be returned to other clients until the lock expires
60088
+ * or is explicitly released using {@link deleteRequestLock}.
60089
+ *
60090
+ * @param options - Lock configuration
60091
+ * @param options.lockSecs - **Required.** Duration in seconds to lock the requests. After this time, the locks expire and requests can be retrieved by other clients.
60092
+ * @param options.limit - Maximum number of requests to return. Default is 25.
60093
+ * @returns Object containing `items` (locked requests), `queueModifiedAt`, `hadMultipleClients`, and lock information
60094
+ * @see https://docs.apify.com/api/v2/request-queue-head-lock-post
60095
+ *
60096
+ * @example
60097
+ * ```javascript
60098
+ * // Get and lock up to 10 requests for 60 seconds
60099
+ * const { items, lockSecs } = await client.requestQueue('my-queue').listAndLockHead({
60100
+ * lockSecs: 60,
60101
+ * limit: 10
60102
+ * });
60103
+ *
60104
+ * // Process each locked request
60105
+ * for (const request of items) {
60106
+ * console.log(`Processing: ${request.url}`);
60107
+ * // ... process request ...
60108
+ * // Delete lock after successful processing
60109
+ * await client.requestQueue('my-queue').deleteRequestLock(request.id);
60110
+ * }
60111
+ * ```
59019
60112
  */ async listAndLockHead(options) {
59020
60113
  ow__rspack_import_4_default()(options, ow__rspack_import_4_default().object.exactShape({
59021
60114
  lockSecs: (ow__rspack_import_4_default().number),
@@ -59034,7 +60127,42 @@ class RequestQueueClient extends _base_resource_client__rspack_import_2.Resource
59034
60127
  return (0,_utils__rspack_import_3.cast)((0,_utils__rspack_import_3.parseDateFields)((0,_utils__rspack_import_3.pluckData)(response.data)));
59035
60128
  }
59036
60129
  /**
59037
- * https://docs.apify.com/api/v2#/reference/request-queues/request-collection/add-request
60130
+ * Adds a single request to the queue.
60131
+ *
60132
+ * If a request with the same `uniqueKey` already exists, the method will return information
60133
+ * about the existing request without adding a duplicate. The `uniqueKey` is used for
60134
+ * deduplication - typically it's the URL, but you can use any string to identify the request.
60135
+ *
60136
+ * @param request - The request object to add (excluding `id`, which is assigned by the API)
60137
+ * @param request.url - URL to be crawled
60138
+ * @param request.uniqueKey - Unique identifier for request deduplication. If not provided, defaults to `url`.
60139
+ * @param request.method - HTTP method. Default is `'GET'`.
60140
+ * @param request.userData - Custom user data (arbitrary JSON object) associated with the request.
60141
+ * @param request.headers - HTTP headers to use for the request.
60142
+ * @param request.payload - HTTP payload for POST/PUT requests (string).
60143
+ * @param options - Additional options
60144
+ * @param options.forefront - If `true`, adds the request to the beginning of the queue. Default is `false` (adds to the end).
60145
+ * @returns Object with `requestId`, `wasAlreadyPresent`, and `wasAlreadyHandled` flags
60146
+ * @see https://docs.apify.com/api/v2/request-queue-requests-post
60147
+ *
60148
+ * @example
60149
+ * ```javascript
60150
+ * const result = await client.requestQueue('my-queue').addRequest({
60151
+ * url: 'https://example.com',
60152
+ * uniqueKey: 'example-page',
60153
+ * method: 'GET',
60154
+ * userData: { label: 'START', depth: 0 }
60155
+ * });
60156
+ * console.log(`Request ID: ${result.requestId}`);
60157
+ * console.log(`Already present: ${result.wasAlreadyPresent}`);
60158
+ * console.log(`Already handled: ${result.wasAlreadyHandled}`);
60159
+ *
60160
+ * // Add urgent request to the front of the queue
60161
+ * await client.requestQueue('my-queue').addRequest(
60162
+ * { url: 'https://priority.com', uniqueKey: 'priority-page' },
60163
+ * { forefront: true }
60164
+ * );
60165
+ * ```
59038
60166
  */ async addRequest(request) {
59039
60167
  let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
59040
60168
  ow__rspack_import_4_default()(request, ow__rspack_import_4_default().object.partialShape({
@@ -59056,7 +60184,7 @@ class RequestQueueClient extends _base_resource_client__rspack_import_2.Resource
59056
60184
  return (0,_utils__rspack_import_3.cast)((0,_utils__rspack_import_3.parseDateFields)((0,_utils__rspack_import_3.pluckData)(response.data)));
59057
60185
  }
59058
60186
  /**
59059
- * Writes requests to request queue in batch.
60187
+ * Writes requests to Request queue in batch.
59060
60188
  *
59061
60189
  * @private
59062
60190
  */ async _batchAddRequests(requests) {
@@ -59149,7 +60277,41 @@ class RequestQueueClient extends _base_resource_client__rspack_import_2.Resource
59149
60277
  return (0,_utils__rspack_import_3.cast)((0,_utils__rspack_import_3.parseDateFields)(result));
59150
60278
  }
59151
60279
  /**
59152
- * https://docs.apify.com/api/v2#/reference/request-queues/batch-request-operations/add-requests
60280
+ * Adds multiple requests to the queue in a single operation.
60281
+ *
60282
+ * This is significantly more efficient than calling {@link addRequest} multiple times, especially
60283
+ * for large batches. The method automatically handles batching (max 25 requests per API call),
60284
+ * retries on rate limiting, and parallel processing. Requests are sent in chunks respecting the
60285
+ * API payload size limit, and any unprocessed requests due to rate limits are automatically
60286
+ * retried with exponential backoff.
60287
+ *
60288
+ * @param requests - Array of request objects to add (excluding `id` fields)
60289
+ * @param options - Batch operation configuration
60290
+ * @param options.forefront - If `true`, adds all requests to the beginning of the queue. Default is `false`.
60291
+ * @param options.maxUnprocessedRequestsRetries - Maximum number of retry attempts for rate-limited requests. Default is 3.
60292
+ * @param options.maxParallel - Maximum number of parallel batch API calls. Default is 5.
60293
+ * @param options.minDelayBetweenUnprocessedRequestsRetriesMillis - Minimum delay before retrying rate-limited requests. Default is 500ms.
60294
+ * @returns Object with `processedRequests` (successfully added) and `unprocessedRequests` (failed after all retries)
60295
+ * @see https://docs.apify.com/api/v2/request-queue-requests-batch-post
60296
+ *
60297
+ * @example
60298
+ * ```javascript
60299
+ * // Add a batch of URLs to crawl
60300
+ * const requests = [
60301
+ * { url: 'https://example.com', uniqueKey: 'page1', userData: { depth: 1 } },
60302
+ * { url: 'https://example.com/2', uniqueKey: 'page2', userData: { depth: 1 } },
60303
+ * { url: 'https://example.com/3', uniqueKey: 'page3', userData: { depth: 1 } }
60304
+ * ];
60305
+ * const result = await client.requestQueue('my-queue').batchAddRequests(requests);
60306
+ * console.log(`Successfully added: ${result.processedRequests.length}`);
60307
+ * console.log(`Failed: ${result.unprocessedRequests.length}`);
60308
+ *
60309
+ * // Batch add with custom retry settings
60310
+ * const result = await client.requestQueue('my-queue').batchAddRequests(
60311
+ * requests,
60312
+ * { maxUnprocessedRequestsRetries: 5, maxParallel: 10 }
60313
+ * );
60314
+ * ```
59153
60315
  */ async batchAddRequests(requests) {
59154
60316
  let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
59155
60317
  const { forefront, maxUnprocessedRequestsRetries = DEFAULT_UNPROCESSED_RETRIES_BATCH_ADD_REQUESTS, maxParallel = DEFAULT_PARALLEL_BATCH_ADD_REQUESTS, minDelayBetweenUnprocessedRequestsRetriesMillis = DEFAULT_MIN_DELAY_BETWEEN_UNPROCESSED_REQUESTS_RETRIES_MILLIS } = options;
@@ -59194,7 +60356,13 @@ class RequestQueueClient extends _base_resource_client__rspack_import_2.Resource
59194
60356
  return result;
59195
60357
  }
59196
60358
  /**
59197
- * https://docs.apify.com/api/v2#/reference/request-queues/batch-request-operations/delete-requests
60359
+ * Deletes multiple requests from the queue in a single operation.
60360
+ *
60361
+ * Requests can be identified by either their ID or unique key.
60362
+ *
60363
+ * @param requests - Array of requests to delete (by id or uniqueKey)
60364
+ * @returns Result containing processed and unprocessed requests
60365
+ * @see https://docs.apify.com/api/v2/request-queue-requests-batch-delete
59198
60366
  */ async batchDeleteRequests(requests) {
59199
60367
  ow__rspack_import_4_default()(requests, ow__rspack_import_4_default().array.ofType(ow__rspack_import_4_default().any(ow__rspack_import_4_default().object.partialShape({
59200
60368
  id: (ow__rspack_import_4_default().string)
@@ -59213,7 +60381,11 @@ class RequestQueueClient extends _base_resource_client__rspack_import_2.Resource
59213
60381
  return (0,_utils__rspack_import_3.cast)((0,_utils__rspack_import_3.parseDateFields)((0,_utils__rspack_import_3.pluckData)(data)));
59214
60382
  }
59215
60383
  /**
59216
- * https://docs.apify.com/api/v2#/reference/request-queues/request/get-request
60384
+ * Gets a specific request from the queue by its ID.
60385
+ *
60386
+ * @param id - Request ID
60387
+ * @returns The request object, or `undefined` if not found
60388
+ * @see https://docs.apify.com/api/v2/request-queue-request-get
59217
60389
  */ async getRequest(id) {
59218
60390
  ow__rspack_import_4_default()(id, (ow__rspack_import_4_default().string));
59219
60391
  const requestOpts = {
@@ -59231,7 +60403,12 @@ class RequestQueueClient extends _base_resource_client__rspack_import_2.Resource
59231
60403
  return undefined;
59232
60404
  }
59233
60405
  /**
59234
- * https://docs.apify.com/api/v2#/reference/request-queues/request/update-request
60406
+ * Updates a request in the queue.
60407
+ *
60408
+ * @param request - The updated request object (must include id)
60409
+ * @param options - Update options such as whether to move to front
60410
+ * @returns Information about the updated request
60411
+ * @see https://docs.apify.com/api/v2/request-queue-request-put
59235
60412
  */ async updateRequest(request) {
59236
60413
  let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
59237
60414
  ow__rspack_import_4_default()(request, ow__rspack_import_4_default().object.partialShape({
@@ -59252,7 +60429,11 @@ class RequestQueueClient extends _base_resource_client__rspack_import_2.Resource
59252
60429
  });
59253
60430
  return (0,_utils__rspack_import_3.cast)((0,_utils__rspack_import_3.parseDateFields)((0,_utils__rspack_import_3.pluckData)(response.data)));
59254
60431
  }
59255
- async deleteRequest(id) {
60432
+ /**
60433
+ * Deletes a specific request from the queue.
60434
+ *
60435
+ * @param id - Request ID
60436
+ */ async deleteRequest(id) {
59256
60437
  ow__rspack_import_4_default()(id, (ow__rspack_import_4_default().string));
59257
60438
  await this.httpClient.call({
59258
60439
  url: this._url(`requests/${id}`),
@@ -59264,7 +60445,28 @@ class RequestQueueClient extends _base_resource_client__rspack_import_2.Resource
59264
60445
  });
59265
60446
  }
59266
60447
  /**
59267
- * https://docs.apify.com/api/v2#/reference/request-queues/request-lock/prolong-request-lock
60448
+ * Prolongs the lock on a request to prevent it from being returned to other clients.
60449
+ *
60450
+ * This is useful when processing a request takes longer than expected and you need
60451
+ * to extend the lock duration to prevent other workers from picking it up. The lock
60452
+ * expiration time is reset to the current time plus the specified duration.
60453
+ *
60454
+ * @param id - Request ID (obtained from {@link listAndLockHead} or {@link getRequest})
60455
+ * @param options - Lock extension options
60456
+ * @param options.lockSecs - **Required.** New lock duration in seconds from now.
60457
+ * @param options.forefront - If `true`, moves the request to the beginning of the queue when the lock expires. Default is `false`.
60458
+ * @returns Object with new `lockExpiresAt` timestamp
60459
+ * @see https://docs.apify.com/api/v2/request-queue-request-lock-put
60460
+ *
60461
+ * @example
60462
+ * ```javascript
60463
+ * // Lock request for initial processing
60464
+ * const { items } = await client.requestQueue('my-queue').listAndLockHead({ lockSecs: 60, limit: 1 });
60465
+ * const request = items[0];
60466
+ *
60467
+ * // Processing takes longer than expected, extend the lock
60468
+ * await client.requestQueue('my-queue').prolongRequestLock(request.id, { lockSecs: 120 });
60469
+ * ```
59268
60470
  */ async prolongRequestLock(id, options) {
59269
60471
  ow__rspack_import_4_default()(id, (ow__rspack_import_4_default().string));
59270
60472
  ow__rspack_import_4_default()(options, ow__rspack_import_4_default().object.exactShape({
@@ -59284,7 +60486,14 @@ class RequestQueueClient extends _base_resource_client__rspack_import_2.Resource
59284
60486
  return (0,_utils__rspack_import_3.cast)((0,_utils__rspack_import_3.parseDateFields)((0,_utils__rspack_import_3.pluckData)(response.data)));
59285
60487
  }
59286
60488
  /**
59287
- * https://docs.apify.com/api/v2#/reference/request-queues/request-lock/delete-request-lock
60489
+ * Releases the lock on a request, allowing other clients to process it.
60490
+ *
60491
+ * This should be called after successfully processing a request or when you decide
60492
+ * not to process it.
60493
+ *
60494
+ * @param id - Request ID
60495
+ * @param options - Options such as whether to move to front
60496
+ * @see https://docs.apify.com/api/v2/request-queue-request-lock-delete
59288
60497
  */ async deleteRequestLock(id) {
59289
60498
  let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
59290
60499
  ow__rspack_import_4_default()(id, (ow__rspack_import_4_default().string));
@@ -59302,7 +60511,14 @@ class RequestQueueClient extends _base_resource_client__rspack_import_2.Resource
59302
60511
  });
59303
60512
  }
59304
60513
  /**
59305
- * https://docs.apify.com/api/v2#/reference/request-queues/request-collection/list-requests
60514
+ * Lists all requests in the queue.
60515
+ *
60516
+ * Returns a paginated list of all requests, allowing you to iterate through the entire
60517
+ * queue contents.
60518
+ *
60519
+ * @param options - Pagination options
60520
+ * @returns List of requests with pagination information
60521
+ * @see https://docs.apify.com/api/v2/request-queue-requests-get
59306
60522
  */ async listRequests() {
59307
60523
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
59308
60524
  ow__rspack_import_4_default()(options, ow__rspack_import_4_default().object.exactShape({
@@ -59322,7 +60538,13 @@ class RequestQueueClient extends _base_resource_client__rspack_import_2.Resource
59322
60538
  return (0,_utils__rspack_import_3.cast)((0,_utils__rspack_import_3.parseDateFields)((0,_utils__rspack_import_3.pluckData)(response.data)));
59323
60539
  }
59324
60540
  /**
59325
- * https://docs.apify.com/api/v2/request-queue-requests-unlock-post
60541
+ * Unlocks all requests locked by this client.
60542
+ *
60543
+ * This is useful for releasing all locks at once, for example when shutting down
60544
+ * a crawler gracefully.
60545
+ *
60546
+ * @returns Number of requests that were unlocked
60547
+ * @see https://docs.apify.com/api/v2/request-queue-requests-unlock-post
59326
60548
  */ async unlockRequests() {
59327
60549
  const response = await this.httpClient.call({
59328
60550
  url: this._url('requests/unlock'),
@@ -59335,12 +60557,21 @@ class RequestQueueClient extends _base_resource_client__rspack_import_2.Resource
59335
60557
  return (0,_utils__rspack_import_3.cast)((0,_utils__rspack_import_3.parseDateFields)((0,_utils__rspack_import_3.pluckData)(response.data)));
59336
60558
  }
59337
60559
  /**
59338
- * https://docs.apify.com/api/v2#/reference/request-queues/request-collection/list-requests
60560
+ * Returns an async iterable for paginating through all requests in the queue.
60561
+ *
60562
+ * This allows you to efficiently process all requests using a for-await-of loop,
60563
+ * automatically handling pagination behind the scenes.
60564
+ *
60565
+ * @param options - Pagination options
60566
+ * @returns An async iterable of request pages
60567
+ * @see https://docs.apify.com/api/v2/request-queue-requests-get
59339
60568
  *
59340
- * Usage:
59341
- * for await (const { items } of client.paginateRequests({ limit: 10 })) {
59342
- * items.forEach((request) => console.log(request));
60569
+ * @example
60570
+ * ```javascript
60571
+ * for await (const { items } of client.requestQueue('my-queue').paginateRequests({ limit: 100 })) {
60572
+ * items.forEach((request) => console.log(request.url));
59343
60573
  * }
60574
+ * ```
59344
60575
  */ paginateRequests() {
59345
60576
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
59346
60577
  ow__rspack_import_4_default()(options, ow__rspack_import_4_default().object.exactShape({
@@ -59381,15 +60612,34 @@ __webpack_require__.d(__webpack_exports__, {
59381
60612
  /* import */ var _base_resource_collection_client__rspack_import_0 = __webpack_require__("./src/base/resource_collection_client.ts");
59382
60613
 
59383
60614
 
59384
- class RequestQueueCollectionClient extends _base_resource_collection_client__rspack_import_0.ResourceCollectionClient {
60615
+ /**
60616
+ * Client for managing the collection of Request queues in your account.
60617
+ *
60618
+ * Request queues store URLs to be crawled and their metadata. This client provides methods
60619
+ * to list, create, or get request queues by name.
60620
+ *
60621
+ * @example
60622
+ * ```javascript
60623
+ * const client = new ApifyClient({ token: 'my-token' });
60624
+ * const queuesClient = client.requestQueues();
60625
+ *
60626
+ * // List all request queues
60627
+ * const { items } = await queuesClient.list();
60628
+ *
60629
+ * // Get or create a request queue by name
60630
+ * const queue = await queuesClient.getOrCreate('my-queue');
60631
+ * ```
60632
+ *
60633
+ * @see https://docs.apify.com/platform/storage/request-queue
60634
+ */ class RequestQueueCollectionClient extends _base_resource_collection_client__rspack_import_0.ResourceCollectionClient {
59385
60635
  /**
59386
- * https://docs.apify.com/api/v2#/reference/request-queues/queue-collection/get-list-of-request-queues
60636
+ * Lists all Request queues.
59387
60637
  *
59388
60638
  * Awaiting the return value (as you would with a Promise) will result in a single API call. The amount of fetched
59389
60639
  * items in a single API call is limited.
59390
60640
  * ```javascript
59391
60641
  * const paginatedList = await client.list(options);
59392
- *```
60642
+ * ```
59393
60643
  *
59394
60644
  * Asynchronous iteration is also supported. This will fetch additional pages if needed until all items are
59395
60645
  * retrieved.
@@ -59397,6 +60647,10 @@ class RequestQueueCollectionClient extends _base_resource_collection_client__rsp
59397
60647
  * ```javascript
59398
60648
  * for await (const singleItem of client.list(options)) {...}
59399
60649
  * ```
60650
+ *
60651
+ * @param options - Pagination options.
60652
+ * @returns A paginated iterator of Request queues.
60653
+ * @see https://docs.apify.com/api/v2/request-queues-get
59400
60654
  */ list() {
59401
60655
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
59402
60656
  ow__rspack_import_1_default()(options, ow__rspack_import_1_default().object.exactShape({
@@ -59408,7 +60662,11 @@ class RequestQueueCollectionClient extends _base_resource_collection_client__rsp
59408
60662
  return this._listPaginated(options);
59409
60663
  }
59410
60664
  /**
59411
- * https://docs.apify.com/api/v2#/reference/request-queues/queue-collection/create-request-queue
60665
+ * Gets or creates a Request queue with the specified name.
60666
+ *
60667
+ * @param name - Name of the Request queue. If not provided, a default queue is used.
60668
+ * @returns The Request queue object.
60669
+ * @see https://docs.apify.com/api/v2/request-queues-post
59412
60670
  */ async getOrCreate(name) {
59413
60671
  ow__rspack_import_1_default()(name, (ow__rspack_import_1_default().optional.string));
59414
60672
  return this._getOrCreate(name);
@@ -59449,9 +60707,46 @@ __webpack_require__.d(__webpack_exports__, {
59449
60707
 
59450
60708
 
59451
60709
  const RUN_CHARGE_IDEMPOTENCY_HEADER = 'idempotency-key';
59452
- class RunClient extends _base_resource_client__rspack_import_1.ResourceClient {
60710
+ /**
60711
+ * Client for managing a specific Actor run.
60712
+ *
60713
+ * Provides methods to get run details, abort, metamorph, resurrect, wait for completion,
60714
+ * and access the run's dataset, key-value store, request queue, and logs.
60715
+ *
60716
+ * @example
60717
+ * ```javascript
60718
+ * const client = new ApifyClient({ token: 'my-token' });
60719
+ * const runClient = client.run('my-run-id');
60720
+ *
60721
+ * // Get run details
60722
+ * const run = await runClient.get();
60723
+ *
60724
+ * // Wait for the run to finish
60725
+ * const finishedRun = await runClient.waitForFinish();
60726
+ *
60727
+ * // Access the run's dataset
60728
+ * const { items } = await runClient.dataset().listItems();
60729
+ * ```
60730
+ *
60731
+ * @see https://docs.apify.com/platform/actors/running/runs-and-builds
60732
+ */ class RunClient extends _base_resource_client__rspack_import_1.ResourceClient {
59453
60733
  /**
59454
- * https://docs.apify.com/api/v2#/reference/actor-runs/run-object/get-run
60734
+ * Gets the Actor run object from the Apify API.
60735
+ *
60736
+ * @param options - Get options
60737
+ * @param options.waitForFinish - Maximum time to wait (in seconds, max 60s) for the run to finish on the API side before returning. Default is 0 (returns immediately).
60738
+ * @returns The ActorRun object, or `undefined` if it does not exist
60739
+ * @see https://docs.apify.com/api/v2/actor-run-get
60740
+ *
60741
+ * @example
60742
+ * ```javascript
60743
+ * // Get run status immediately
60744
+ * const run = await client.run('run-id').get();
60745
+ * console.log(`Status: ${run.status}`);
60746
+ *
60747
+ * // Wait up to 60 seconds for run to finish
60748
+ * const run = await client.run('run-id').get({ waitForFinish: 60 });
60749
+ * ```
59455
60750
  */ async get() {
59456
60751
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
59457
60752
  ow__rspack_import_7_default()(options, ow__rspack_import_7_default().object.exactShape({
@@ -59460,7 +60755,21 @@ class RunClient extends _base_resource_client__rspack_import_1.ResourceClient {
59460
60755
  return this._get(options);
59461
60756
  }
59462
60757
  /**
59463
- * https://docs.apify.com/api/v2#/reference/actor-runs/abort-run/abort-run
60758
+ * Aborts the Actor run.
60759
+ *
60760
+ * @param options - Abort options
60761
+ * @param options.gracefully - If `true`, the Actor run will abort gracefully - it can send status messages and perform cleanup. Default is `false` (immediate abort).
60762
+ * @returns The updated ActorRun object with `ABORTING` or `ABORTED` status
60763
+ * @see https://docs.apify.com/api/v2/actor-run-abort-post
60764
+ *
60765
+ * @example
60766
+ * ```javascript
60767
+ * // Abort immediately
60768
+ * await client.run('run-id').abort();
60769
+ *
60770
+ * // Abort gracefully (allows cleanup)
60771
+ * await client.run('run-id').abort({ gracefully: true });
60772
+ * ```
59464
60773
  */ async abort() {
59465
60774
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
59466
60775
  ow__rspack_import_7_default()(options, ow__rspack_import_7_default().object.exactShape({
@@ -59474,12 +60783,36 @@ class RunClient extends _base_resource_client__rspack_import_1.ResourceClient {
59474
60783
  return (0,_utils__rspack_import_2.cast)((0,_utils__rspack_import_2.parseDateFields)((0,_utils__rspack_import_2.pluckData)(response.data)));
59475
60784
  }
59476
60785
  /**
59477
- * https://docs.apify.com/api/v2#/reference/actor-runs/delete-run/delete-run
60786
+ * Deletes the Actor run.
60787
+ *
60788
+ * @see https://docs.apify.com/api/v2/actor-run-delete
59478
60789
  */ async delete() {
59479
60790
  return this._delete();
59480
60791
  }
59481
60792
  /**
59482
- * https://docs.apify.com/api/v2#/reference/actor-runs/metamorph-run/metamorph-run
60793
+ * Transforms the Actor run into a run of another Actor (metamorph).
60794
+ *
60795
+ * This operation preserves the run ID, storages (dataset, key-value store, request queue),
60796
+ * and resource allocation. The run effectively becomes a run of the target Actor with new input.
60797
+ * This is useful for chaining Actor executions or implementing complex workflows.
60798
+ *
60799
+ * @param targetActorId - ID or username/name of the target Actor
60800
+ * @param input - Input for the target Actor. Can be any JSON-serializable value.
60801
+ * @param options - Metamorph options
60802
+ * @param options.build - Tag or number of the target Actor's build to run. Default is the target Actor's default build.
60803
+ * @param options.contentType - Content type of the input. If specified, input must be a string or Buffer.
60804
+ * @returns The metamorphed ActorRun object (same ID, but now running the target Actor)
60805
+ * @see https://docs.apify.com/api/v2/actor-run-metamorph-post
60806
+ *
60807
+ * @example
60808
+ * ```javascript
60809
+ * // Transform current run into another Actor
60810
+ * const metamorphedRun = await client.run('original-run-id').metamorph(
60811
+ * 'target-actor-id',
60812
+ * { url: 'https://example.com' }
60813
+ * );
60814
+ * console.log(`Run ${metamorphedRun.id} is now running ${metamorphedRun.actId}`);
60815
+ * ```
59483
60816
  */ async metamorph(targetActorId, input) {
59484
60817
  let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
59485
60818
  ow__rspack_import_7_default()(targetActorId, (ow__rspack_import_7_default().string));
@@ -59513,7 +60846,19 @@ class RunClient extends _base_resource_client__rspack_import_1.ResourceClient {
59513
60846
  return (0,_utils__rspack_import_2.cast)((0,_utils__rspack_import_2.parseDateFields)((0,_utils__rspack_import_2.pluckData)(response.data)));
59514
60847
  }
59515
60848
  /**
59516
- * https://docs.apify.com/api/v2#/reference/actor-runs/reboot-run/reboot-run
60849
+ * Reboots the Actor run.
60850
+ *
60851
+ * Rebooting restarts the Actor's Docker container while preserving the run ID and storages.
60852
+ * This can be useful to recover from certain errors or to force the Actor to restart
60853
+ * with a fresh environment.
60854
+ *
60855
+ * @returns The updated ActorRun object
60856
+ * @see https://docs.apify.com/api/v2/actor-run-reboot-post
60857
+ *
60858
+ * @example
60859
+ * ```javascript
60860
+ * const run = await client.run('run-id').reboot();
60861
+ * ```
59517
60862
  */ async reboot() {
59518
60863
  const request = {
59519
60864
  url: this._url('reboot'),
@@ -59522,12 +60867,48 @@ class RunClient extends _base_resource_client__rspack_import_1.ResourceClient {
59522
60867
  const response = await this.httpClient.call(request);
59523
60868
  return (0,_utils__rspack_import_2.cast)((0,_utils__rspack_import_2.parseDateFields)((0,_utils__rspack_import_2.pluckData)(response.data)));
59524
60869
  }
59525
- async update(newFields) {
60870
+ /**
60871
+ * Updates the Actor run with specified fields.
60872
+ *
60873
+ * @param newFields - Fields to update
60874
+ * @param newFields.statusMessage - Custom status message to display (e.g., "Processing page 10/100")
60875
+ * @param newFields.isStatusMessageTerminal - If `true`, the status message is final and won't be overwritten. Default is `false`.
60876
+ * @param newFields.generalAccess - General resource access level ('FOLLOW_USER_SETTING', 'ANYONE_WITH_ID_CAN_READ' or 'RESTRICTED')
60877
+ * @returns The updated ActorRun object
60878
+ *
60879
+ * @example
60880
+ * ```javascript
60881
+ * // Set a status message
60882
+ * await client.run('run-id').update({
60883
+ * statusMessage: 'Processing items: 50/100'
60884
+ * });
60885
+ * ```
60886
+ */ async update(newFields) {
59526
60887
  ow__rspack_import_7_default()(newFields, (ow__rspack_import_7_default().object));
59527
60888
  return this._update(newFields);
59528
60889
  }
59529
60890
  /**
59530
- * https://docs.apify.com/api/v2#/reference/actor-runs/resurrect-run/resurrect-run
60891
+ * Resurrects a finished Actor run, starting it again with the same settings.
60892
+ *
60893
+ * This creates a new run with the same configuration as the original run. The original
60894
+ * run's storages (dataset, key-value store, request queue) are preserved and reused.
60895
+ *
60896
+ * @param options - Resurrection options (override original run settings)
60897
+ * @param options.build - Tag or number of the build to use. If not provided, uses the original run's build.
60898
+ * @param options.memory - Memory in megabytes. If not provided, uses the original run's memory.
60899
+ * @param options.timeout - Timeout in seconds. If not provided, uses the original run's timeout.
60900
+ * @param options.maxItems - Maximum number of dataset items (pay-per-result Actors).
60901
+ * @param options.maxTotalChargeUsd - Maximum cost in USD (pay-per-event Actors).
60902
+ * @param options.restartOnError - Whether to restart on error.
60903
+ * @returns The new (resurrected) ActorRun object
60904
+ * @see https://docs.apify.com/api/v2/post-resurrect-run
60905
+ *
60906
+ * @example
60907
+ * ```javascript
60908
+ * // Resurrect a failed run with more memory
60909
+ * const newRun = await client.run('failed-run-id').resurrect({ memory: 2048 });
60910
+ * console.log(`New run started: ${newRun.id}`);
60911
+ * ```
59531
60912
  */ async resurrect() {
59532
60913
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
59533
60914
  ow__rspack_import_7_default()(options, ow__rspack_import_7_default().object.exactShape({
@@ -59546,7 +60927,14 @@ class RunClient extends _base_resource_client__rspack_import_1.ResourceClient {
59546
60927
  return (0,_utils__rspack_import_2.cast)((0,_utils__rspack_import_2.parseDateFields)((0,_utils__rspack_import_2.pluckData)(response.data)));
59547
60928
  }
59548
60929
  /**
59549
- * https://docs.apify.com/api/v2#/reference/actor-runs/charge-events-in-run
60930
+ * Charges the Actor run for a specific event.
60931
+ *
60932
+ * @param options - Charge options including event name and count.
60933
+ * @param options.eventName - **Required.** Name of the event to charge for.
60934
+ * @param options.count - Number of times to charge the event. Default is 1.
60935
+ * @param options.idempotencyKey - Optional key to ensure the charge is not duplicated. If not provided, one is auto-generated.
60936
+ * @returns Empty response object.
60937
+ * @see https://docs.apify.com/api/v2/post-charge-run
59550
60938
  */ async charge(options) {
59551
60939
  ow__rspack_import_7_default()(options, ow__rspack_import_7_default().object.exactShape({
59552
60940
  eventName: (ow__rspack_import_7_default().string),
@@ -59571,16 +60959,32 @@ class RunClient extends _base_resource_client__rspack_import_1.ResourceClient {
59571
60959
  return response;
59572
60960
  }
59573
60961
  /**
59574
- * Returns a promise that resolves with the finished Run object when the provided actor run finishes
59575
- * or with the unfinished Run object when the `waitSecs` timeout lapses. The promise is NOT rejected
59576
- * based on run status. You can inspect the `status` property of the Run object to find out its status.
60962
+ * Waits for the Actor run to finish and returns the finished Run object.
59577
60963
  *
59578
- * The difference between this function and the `waitForFinish` parameter of the `get` method
59579
- * is the fact that this function can wait indefinitely. Its use is preferable to the
59580
- * `waitForFinish` parameter alone, which it uses internally.
60964
+ * The promise resolves when the run reaches a terminal state (`SUCCEEDED`, `FAILED`, `ABORTED`, or `TIMED-OUT`).
60965
+ * If `waitSecs` is provided and the timeout is reached, the promise resolves with the unfinished
60966
+ * Run object (status will be `RUNNING` or `READY`). The promise is NOT rejected based on run status.
59581
60967
  *
59582
- * This is useful when you need to chain actor executions. Similar effect can be achieved
59583
- * by using webhooks, so be sure to review which technique fits your use-case better.
60968
+ * Unlike the `waitForFinish` parameter in {@link get}, this method can wait indefinitely
60969
+ * by polling the run status. It uses the `waitForFinish` parameter internally (max 60s per call)
60970
+ * and continuously polls until the run finishes or the timeout is reached.
60971
+ *
60972
+ * @param options - Wait options
60973
+ * @param options.waitSecs - Maximum time to wait for the run to finish, in seconds. If the limit is reached, the returned promise resolves to a run object that will have status `READY` or `RUNNING`. If omitted, waits indefinitely.
60974
+ * @returns The ActorRun object (finished or still running if timeout was reached)
60975
+ *
60976
+ * @example
60977
+ * ```javascript
60978
+ * // Wait indefinitely for run to finish
60979
+ * const run = await client.run('run-id').waitForFinish();
60980
+ * console.log(`Run finished with status: ${run.status}`);
60981
+ *
60982
+ * // Wait up to 5 minutes
60983
+ * const run = await client.run('run-id').waitForFinish({ waitSecs: 300 });
60984
+ * if (run.status === 'SUCCEEDED') {
60985
+ * console.log('Run succeeded!');
60986
+ * }
60987
+ * ```
59584
60988
  */ async waitForFinish() {
59585
60989
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
59586
60990
  ow__rspack_import_7_default()(options, ow__rspack_import_7_default().object.exactShape({
@@ -59589,40 +60993,65 @@ class RunClient extends _base_resource_client__rspack_import_1.ResourceClient {
59589
60993
  return this._waitForFinish(options);
59590
60994
  }
59591
60995
  /**
59592
- * https://docs.apify.com/api/v2#/reference/actor-runs/run-object-and-its-storages
60996
+ * Returns a client for the default dataset of this Actor run.
60997
+ *
60998
+ * @returns A client for accessing the run's default dataset
60999
+ * @see https://docs.apify.com/api/v2/actor-run-get
59593
61000
  *
59594
- * This also works through `actorClient.lastRun().dataset()`.
59595
- * https://docs.apify.com/api/v2#/reference/actors/last-run-object-and-its-storages
61001
+ * @example
61002
+ * ```javascript
61003
+ * // Access run's dataset
61004
+ * const { items } = await client.run('run-id').dataset().listItems();
61005
+ * ```
59596
61006
  */ dataset() {
59597
61007
  return new _dataset__rspack_import_3.DatasetClient(this._subResourceOptions({
59598
61008
  resourcePath: 'dataset'
59599
61009
  }));
59600
61010
  }
59601
61011
  /**
59602
- * https://docs.apify.com/api/v2#/reference/actor-runs/run-object-and-its-storages
61012
+ * Returns a client for the default key-value store of this Actor run.
59603
61013
  *
59604
- * This also works through `actorClient.lastRun().keyValueStore()`.
59605
- * https://docs.apify.com/api/v2#/reference/actors/last-run-object-and-its-storages
61014
+ * @returns A client for accessing the run's default key-value store
61015
+ * @see https://docs.apify.com/api/v2/actor-run-get
61016
+ *
61017
+ * @example
61018
+ * ```javascript
61019
+ * // Access run's key-value store
61020
+ * const output = await client.run('run-id').keyValueStore().getRecord('OUTPUT');
61021
+ * ```
59606
61022
  */ keyValueStore() {
59607
61023
  return new _key_value_store__rspack_import_4.KeyValueStoreClient(this._subResourceOptions({
59608
61024
  resourcePath: 'key-value-store'
59609
61025
  }));
59610
61026
  }
59611
61027
  /**
59612
- * https://docs.apify.com/api/v2#/reference/actor-runs/run-object-and-its-storages
61028
+ * Returns a client for the default Request queue of this Actor run.
61029
+ *
61030
+ * @returns A client for accessing the run's default Request queue
61031
+ * @see https://docs.apify.com/api/v2/actor-run-get
59613
61032
  *
59614
- * This also works through `actorClient.lastRun().requestQueue()`.
59615
- * https://docs.apify.com/api/v2#/reference/actors/last-run-object-and-its-storages
61033
+ * @example
61034
+ * ```javascript
61035
+ * // Access run's Request queue
61036
+ * const { items } = await client.run('run-id').requestQueue().listHead();
61037
+ * ```
59616
61038
  */ requestQueue() {
59617
61039
  return new _request_queue__rspack_import_6.RequestQueueClient(this._subResourceOptions({
59618
61040
  resourcePath: 'request-queue'
59619
61041
  }));
59620
61042
  }
59621
61043
  /**
59622
- * https://docs.apify.com/api/v2#/reference/actor-runs/run-object-and-its-storages
61044
+ * Returns a client for accessing the log of this Actor run.
61045
+ *
61046
+ * @returns A client for accessing the run's log
61047
+ * @see https://docs.apify.com/api/v2/actor-run-get
59623
61048
  *
59624
- * This also works through `actorClient.lastRun().log()`.
59625
- * https://docs.apify.com/api/v2#/reference/actors/last-run-object-and-its-storages
61049
+ * @example
61050
+ * ```javascript
61051
+ * // Get run log
61052
+ * const log = await client.run('run-id').log().get();
61053
+ * console.log(log);
61054
+ * ```
59626
61055
  */ log() {
59627
61056
  return new _log__rspack_import_5.LogClient(this._subResourceOptions({
59628
61057
  resourcePath: 'log'
@@ -59689,15 +61118,35 @@ __webpack_require__.d(__webpack_exports__, {
59689
61118
 
59690
61119
 
59691
61120
 
59692
- class RunCollectionClient extends _base_resource_collection_client__rspack_import_1.ResourceCollectionClient {
61121
+ /**
61122
+ * Client for managing the collection of Actor runs.
61123
+ *
61124
+ * Provides methods to list Actor runs across all Actors or for a specific Actor.
61125
+ * To access an individual run, use the `run()` method on the main ApifyClient.
61126
+ *
61127
+ * @example
61128
+ * ```javascript
61129
+ * const client = new ApifyClient({ token: 'my-token' });
61130
+ *
61131
+ * // List all runs
61132
+ * const runsClient = client.runs();
61133
+ * const { items } = await runsClient.list();
61134
+ *
61135
+ * // List runs for a specific Actor
61136
+ * const actorRunsClient = client.actor('my-actor-id').runs();
61137
+ * const { items: actorRuns } = await actorRunsClient.list();
61138
+ * ```
61139
+ *
61140
+ * @see https://docs.apify.com/platform/actors/running/runs-and-builds
61141
+ */ class RunCollectionClient extends _base_resource_collection_client__rspack_import_1.ResourceCollectionClient {
59693
61142
  /**
59694
- * https://docs.apify.com/api/v2#/reference/actors/run-collection/get-list-of-runs
61143
+ * Lists all Actor runs.
59695
61144
  *
59696
61145
  * Awaiting the return value (as you would with a Promise) will result in a single API call. The amount of fetched
59697
61146
  * items in a single API call is limited.
59698
61147
  * ```javascript
59699
61148
  * const paginatedList = await client.list(options);
59700
- *```
61149
+ * ```
59701
61150
  *
59702
61151
  * Asynchronous iteration is also supported. This will fetch additional pages if needed until all items are
59703
61152
  * retrieved.
@@ -59705,6 +61154,10 @@ class RunCollectionClient extends _base_resource_collection_client__rspack_impor
59705
61154
  * ```javascript
59706
61155
  * for await (const singleItem of client.list(options)) {...}
59707
61156
  * ```
61157
+ *
61158
+ * @param options - Pagination and filtering options.
61159
+ * @returns A paginated iterator of Actor runs.
61160
+ * @see https://docs.apify.com/api/v2/actor-runs-get
59708
61161
  */ list() {
59709
61162
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
59710
61163
  ow__rspack_import_2_default()(options, ow__rspack_import_2_default().object.exactShape({
@@ -59743,25 +61196,59 @@ __webpack_require__.d(__webpack_exports__, {
59743
61196
 
59744
61197
 
59745
61198
 
59746
- class ScheduleClient extends _base_resource_client__rspack_import_0.ResourceClient {
61199
+ /**
61200
+ * Client for managing a specific Schedule.
61201
+ *
61202
+ * Schedules are used to automatically start Actors or tasks at specified times. This client provides
61203
+ * methods to get, update, and delete schedules, as well as retrieve schedule logs.
61204
+ *
61205
+ * @example
61206
+ * ```javascript
61207
+ * const client = new ApifyClient({ token: 'my-token' });
61208
+ * const scheduleClient = client.schedule('my-schedule-id');
61209
+ *
61210
+ * // Get schedule details
61211
+ * const schedule = await scheduleClient.get();
61212
+ *
61213
+ * // Update schedule
61214
+ * await scheduleClient.update({
61215
+ * cronExpression: '0 12 * * *',
61216
+ * isEnabled: true
61217
+ * });
61218
+ * ```
61219
+ *
61220
+ * @see https://docs.apify.com/platform/schedules
61221
+ */ class ScheduleClient extends _base_resource_client__rspack_import_0.ResourceClient {
59747
61222
  /**
59748
- * https://docs.apify.com/api/v2#/reference/schedules/schedule-object/get-schedule
61223
+ * Retrieves the schedule.
61224
+ *
61225
+ * @returns The schedule object, or `undefined` if it does not exist.
61226
+ * @see https://docs.apify.com/api/v2/schedule-get
59749
61227
  */ async get() {
59750
61228
  return this._get();
59751
61229
  }
59752
61230
  /**
59753
- * https://docs.apify.com/api/v2#/reference/schedules/schedule-object/update-schedule
61231
+ * Updates the schedule with the specified fields.
61232
+ *
61233
+ * @param newFields - Fields to update.
61234
+ * @returns The updated schedule object.
61235
+ * @see https://docs.apify.com/api/v2/schedule-put
59754
61236
  */ async update(newFields) {
59755
61237
  ow__rspack_import_2_default()(newFields, (ow__rspack_import_2_default().object));
59756
61238
  return this._update(newFields);
59757
61239
  }
59758
61240
  /**
59759
- * https://docs.apify.com/api/v2#/reference/schedules/schedule-object/delete-schedule
61241
+ * Deletes the schedule.
61242
+ *
61243
+ * @see https://docs.apify.com/api/v2/schedule-delete
59760
61244
  */ async delete() {
59761
61245
  return this._delete();
59762
61246
  }
59763
61247
  /**
59764
- * https://docs.apify.com/api/v2#/reference/schedules/schedule-log/get-schedule-log
61248
+ * Retrieves the schedule's log.
61249
+ *
61250
+ * @returns The schedule log as a string, or `undefined` if it does not exist.
61251
+ * @see https://docs.apify.com/api/v2/schedule-log-get
59765
61252
  */ async getLog() {
59766
61253
  const requestOpts = {
59767
61254
  url: this._url('log'),
@@ -59785,7 +61272,9 @@ class ScheduleClient extends _base_resource_client__rspack_import_0.ResourceClie
59785
61272
  });
59786
61273
  }
59787
61274
  }
59788
- var ScheduleActions = /*#__PURE__*/ function(ScheduleActions) {
61275
+ /**
61276
+ * Types of actions that can be scheduled.
61277
+ */ var ScheduleActions = /*#__PURE__*/ function(ScheduleActions) {
59789
61278
  ScheduleActions["RunActor"] = "RUN_ACTOR";
59790
61279
  ScheduleActions["RunActorTask"] = "RUN_ACTOR_TASK";
59791
61280
  return ScheduleActions;
@@ -59804,15 +61293,38 @@ __webpack_require__.d(__webpack_exports__, {
59804
61293
  /* import */ var _base_resource_collection_client__rspack_import_0 = __webpack_require__("./src/base/resource_collection_client.ts");
59805
61294
 
59806
61295
 
59807
- class ScheduleCollectionClient extends _base_resource_collection_client__rspack_import_0.ResourceCollectionClient {
61296
+ /**
61297
+ * Client for managing the collection of Schedules in your account.
61298
+ *
61299
+ * Schedules are used to automatically start Actors or tasks at specified times.
61300
+ * This client provides methods to list and create schedules.
61301
+ *
61302
+ * @example
61303
+ * ```javascript
61304
+ * const client = new ApifyClient({ token: 'my-token' });
61305
+ * const schedulesClient = client.schedules();
61306
+ *
61307
+ * // List all schedules
61308
+ * const { items } = await schedulesClient.list();
61309
+ *
61310
+ * // Create a new schedule
61311
+ * const newSchedule = await schedulesClient.create({
61312
+ * actorId: 'my-actor-id',
61313
+ * cronExpression: '0 9 * * *',
61314
+ * isEnabled: true
61315
+ * });
61316
+ * ```
61317
+ *
61318
+ * @see https://docs.apify.com/platform/schedules
61319
+ */ class ScheduleCollectionClient extends _base_resource_collection_client__rspack_import_0.ResourceCollectionClient {
59808
61320
  /**
59809
- * https://docs.apify.com/api/v2#/reference/schedules/schedules-collection/get-list-of-schedules
61321
+ * Lists all schedules.
59810
61322
  *
59811
61323
  * Awaiting the return value (as you would with a Promise) will result in a single API call. The amount of fetched
59812
61324
  * items in a single API call is limited.
59813
61325
  * ```javascript
59814
61326
  * const paginatedList = await client.list(options);
59815
- *```
61327
+ * ```
59816
61328
  *
59817
61329
  * Asynchronous iteration is also supported. This will fetch additional pages if needed until all items are
59818
61330
  * retrieved.
@@ -59820,6 +61332,10 @@ class ScheduleCollectionClient extends _base_resource_collection_client__rspack_
59820
61332
  * ```javascript
59821
61333
  * for await (const singleItem of client.list(options)) {...}
59822
61334
  * ```
61335
+ *
61336
+ * @param options - Pagination and sorting options.
61337
+ * @returns A paginated iterator of schedules.
61338
+ * @see https://docs.apify.com/api/v2/schedules-get
59823
61339
  */ list() {
59824
61340
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
59825
61341
  ow__rspack_import_1_default()(options, ow__rspack_import_1_default().object.exactShape({
@@ -59830,7 +61346,11 @@ class ScheduleCollectionClient extends _base_resource_collection_client__rspack_
59830
61346
  return this._listPaginated(options);
59831
61347
  }
59832
61348
  /**
59833
- * https://docs.apify.com/api/v2#/reference/schedules/schedules-collection/create-schedule
61349
+ * Creates a new schedule.
61350
+ *
61351
+ * @param schedule - The schedule data.
61352
+ * @returns The created schedule object.
61353
+ * @see https://docs.apify.com/api/v2/schedules-post
59834
61354
  */ async create(schedule) {
59835
61355
  ow__rspack_import_1_default()(schedule, (ow__rspack_import_1_default().optional.object));
59836
61356
  return this._create(schedule);
@@ -59858,15 +61378,34 @@ __webpack_require__.d(__webpack_exports__, {
59858
61378
  /* import */ var _base_resource_collection_client__rspack_import_0 = __webpack_require__("./src/base/resource_collection_client.ts");
59859
61379
 
59860
61380
 
59861
- class StoreCollectionClient extends _base_resource_collection_client__rspack_import_0.ResourceCollectionClient {
61381
+ /**
61382
+ * Client for browsing Actors in the Apify Store.
61383
+ *
61384
+ * The Apify Store contains publicly available Actors that can be used by anyone.
61385
+ * This client provides methods to search and list Actors from the Store.
61386
+ *
61387
+ * @example
61388
+ * ```javascript
61389
+ * const client = new ApifyClient();
61390
+ * const storeClient = client.store();
61391
+ *
61392
+ * // Search for Actors in the Store
61393
+ * const { items } = await storeClient.list({ search: 'web scraper' });
61394
+ *
61395
+ * // Get details about a specific Store Actor
61396
+ * const actor = await storeClient.list({ username: 'apify', actorName: 'web-scraper' });
61397
+ * ```
61398
+ *
61399
+ * @see https://docs.apify.com/platform/actors/publishing
61400
+ */ class StoreCollectionClient extends _base_resource_collection_client__rspack_import_0.ResourceCollectionClient {
59862
61401
  /**
59863
- * https://docs.apify.com/api/v2/#/reference/store/store-actors-collection/get-list-of-actors-in-store
61402
+ * Lists Actors from the Apify Store.
59864
61403
  *
59865
61404
  * Awaiting the return value (as you would with a Promise) will result in a single API call. The amount of fetched
59866
61405
  * items in a single API call is limited.
59867
61406
  * ```javascript
59868
61407
  * const paginatedList = await client.list(options);
59869
- *```
61408
+ * ```
59870
61409
  *
59871
61410
  * Asynchronous iteration is also supported. This will fetch additional pages if needed until all items are
59872
61411
  * retrieved.
@@ -59874,6 +61413,10 @@ class StoreCollectionClient extends _base_resource_collection_client__rspack_imp
59874
61413
  * ```javascript
59875
61414
  * for await (const singleItem of client.list(options)) {...}
59876
61415
  * ```
61416
+ *
61417
+ * @param options - Search and pagination options.
61418
+ * @returns A paginated iterator of store Actors.
61419
+ * @see https://docs.apify.com/api/v2/store-actors-get
59877
61420
  */ list() {
59878
61421
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
59879
61422
  ow__rspack_import_1_default()(options, ow__rspack_import_1_default().object.exactShape({
@@ -59920,26 +61463,66 @@ __webpack_require__.d(__webpack_exports__, {
59920
61463
 
59921
61464
 
59922
61465
 
59923
- class TaskClient extends _base_resource_client__rspack_import_1.ResourceClient {
61466
+ /**
61467
+ * Client for managing a specific Actor task.
61468
+ *
61469
+ * Tasks are pre-configured Actor runs with saved input and options. This client provides methods
61470
+ * to start, call, update, and delete tasks, as well as manage their runs and webhooks.
61471
+ *
61472
+ * @example
61473
+ * ```javascript
61474
+ * const client = new ApifyClient({ token: 'my-token' });
61475
+ * const taskClient = client.task('my-task-id');
61476
+ *
61477
+ * // Start a task
61478
+ * const run = await taskClient.start();
61479
+ *
61480
+ * // Call a task and wait for it to finish
61481
+ * const finishedRun = await taskClient.call();
61482
+ * ```
61483
+ *
61484
+ * @see https://docs.apify.com/platform/actors/running/tasks
61485
+ */ class TaskClient extends _base_resource_client__rspack_import_1.ResourceClient {
59924
61486
  /**
59925
- * https://docs.apify.com/api/v2#/reference/actor-tasks/task-object/get-task
61487
+ * Retrieves the Actor task.
61488
+ *
61489
+ * @returns The task object, or `undefined` if it does not exist.
61490
+ * @see https://docs.apify.com/api/v2/actor-task-get
59926
61491
  */ async get() {
59927
61492
  return this._get();
59928
61493
  }
59929
61494
  /**
59930
- * https://docs.apify.com/api/v2#/reference/actor-tasks/task-object/update-task
61495
+ * Updates the task with the specified fields.
61496
+ *
61497
+ * @param newFields - Fields to update.
61498
+ * @returns The updated task object.
61499
+ * @see https://docs.apify.com/api/v2/actor-task-put
59931
61500
  */ async update(newFields) {
59932
61501
  ow__rspack_import_6_default()(newFields, (ow__rspack_import_6_default().object));
59933
61502
  return this._update(newFields);
59934
61503
  }
59935
61504
  /**
59936
- * https://docs.apify.com/api/v2#/reference/actor-tasks/task-object/delete-task
61505
+ * Deletes the Task.
61506
+ *
61507
+ * @see https://docs.apify.com/api/v2/actor-task-delete
59937
61508
  */ async delete() {
59938
61509
  return this._delete();
59939
61510
  }
59940
61511
  /**
59941
- * Starts a task and immediately returns the Run object.
59942
- * https://docs.apify.com/api/v2#/reference/actor-tasks/run-collection/run-task
61512
+ * Starts an Actor task and immediately returns the Run object.
61513
+ *
61514
+ * @param input - Input overrides for the task. If not provided, the task's saved input is used.
61515
+ * @param options - Run options.
61516
+ * @param options.build - Tag or number of the Actor build to run (e.g., `'beta'` or `'1.2.345'`).
61517
+ * @param options.memory - Memory in megabytes allocated for the run.
61518
+ * @param options.timeout - Timeout for the run in seconds. Zero means no timeout.
61519
+ * @param options.waitForFinish - Maximum time to wait (in seconds, max 60s) for the run to finish before returning.
61520
+ * @param options.webhooks - Webhooks to trigger for specific Actor run events.
61521
+ * @param options.maxItems - Maximum number of dataset items (for pay-per-result Actors).
61522
+ * @param options.maxTotalChargeUsd - Maximum cost in USD (for pay-per-event Actors).
61523
+ * @param options.restartOnError - Whether to restart the run on error.
61524
+ * @returns The Actor Run object.
61525
+ * @see https://docs.apify.com/api/v2/actor-task-runs-post
59943
61526
  */ async start(input) {
59944
61527
  let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
59945
61528
  ow__rspack_import_6_default()(input, (ow__rspack_import_6_default().optional.object));
@@ -59982,7 +61565,19 @@ class TaskClient extends _base_resource_client__rspack_import_1.ResourceClient {
59982
61565
  /**
59983
61566
  * Starts a task and waits for it to finish before returning the Run object.
59984
61567
  * It waits indefinitely, unless the `waitSecs` option is provided.
59985
- * https://docs.apify.com/api/v2#/reference/actor-tasks/run-collection/run-task
61568
+ *
61569
+ * @param input - Input overrides for the task. If not provided, the task's saved input is used.
61570
+ * @param options - Run and wait options.
61571
+ * @param options.build - Tag or number of the Actor build to run.
61572
+ * @param options.memory - Memory in megabytes allocated for the run.
61573
+ * @param options.timeout - Timeout for the run in seconds.
61574
+ * @param options.waitSecs - Maximum time to wait for the run to finish, in seconds. If omitted, waits indefinitely.
61575
+ * @param options.webhooks - Webhooks to trigger for specific Actor run events.
61576
+ * @param options.maxItems - Maximum number of dataset items (for pay-per-result Actors).
61577
+ * @param options.maxTotalChargeUsd - Maximum cost in USD (for pay-per-event Actors).
61578
+ * @param options.restartOnError - Whether to restart the run on error.
61579
+ * @returns The Actor run object.
61580
+ * @see https://docs.apify.com/api/v2/actor-task-runs-post
59986
61581
  */ async call(input) {
59987
61582
  let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
59988
61583
  ow__rspack_import_6_default()(input, (ow__rspack_import_6_default().optional.object));
@@ -60006,7 +61601,10 @@ class TaskClient extends _base_resource_client__rspack_import_1.ResourceClient {
60006
61601
  });
60007
61602
  }
60008
61603
  /**
60009
- * https://docs.apify.com/api/v2#/reference/actor-tasks/task-input-object/get-task-input
61604
+ * Retrieves the Actor task's input object.
61605
+ *
61606
+ * @returns The Task's input, or `undefined` if it does not exist.
61607
+ * @see https://docs.apify.com/api/v2/actor-task-input-get
60010
61608
  */ async getInput() {
60011
61609
  const requestOpts = {
60012
61610
  url: this._url('input'),
@@ -60022,7 +61620,11 @@ class TaskClient extends _base_resource_client__rspack_import_1.ResourceClient {
60022
61620
  return undefined;
60023
61621
  }
60024
61622
  /**
60025
- * https://docs.apify.com/api/v2#/reference/actor-tasks/task-input-object/update-task-input
61623
+ * Updates the Actor task's input object.
61624
+ *
61625
+ * @param newFields - New input data for the task.
61626
+ * @returns The updated task input.
61627
+ * @see https://docs.apify.com/api/v2/actor-task-input-put
60026
61628
  */ async updateInput(newFields) {
60027
61629
  const response = await this.httpClient.call({
60028
61630
  url: this._url('input'),
@@ -60033,7 +61635,13 @@ class TaskClient extends _base_resource_client__rspack_import_1.ResourceClient {
60033
61635
  return (0,_utils__rspack_import_2.cast)(response.data);
60034
61636
  }
60035
61637
  /**
60036
- * https://docs.apify.com/api/v2#/reference/actor-tasks/last-run-object-and-its-storages
61638
+ * Returns a client for the last run of this task.
61639
+ *
61640
+ * @param options - Filter options for the last run.
61641
+ * @param options.status - Filter by run status (e.g., `'SUCCEEDED'`, `'FAILED'`, `'RUNNING'`).
61642
+ * @param options.origin - Filter by run origin (e.g., `'WEB'`, `'API'`, `'SCHEDULE'`).
61643
+ * @returns A client for the last run.
61644
+ * @see https://docs.apify.com/api/v2/actor-task-runs-last-get
60037
61645
  */ lastRun() {
60038
61646
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
60039
61647
  ow__rspack_import_6_default()(options, ow__rspack_import_6_default().object.exactShape({
@@ -60047,14 +61655,20 @@ class TaskClient extends _base_resource_client__rspack_import_1.ResourceClient {
60047
61655
  }));
60048
61656
  }
60049
61657
  /**
60050
- * https://docs.apify.com/api/v2#/reference/actor-tasks/run-collection
61658
+ * Returns a client for the Runs of this Task.
61659
+ *
61660
+ * @returns A client for the task's runs.
61661
+ * @see https://docs.apify.com/api/v2/actor-task-runs-get
60051
61662
  */ runs() {
60052
61663
  return new _run_collection__rspack_import_4.RunCollectionClient(this._subResourceOptions({
60053
61664
  resourcePath: 'runs'
60054
61665
  }));
60055
61666
  }
60056
61667
  /**
60057
- * https://docs.apify.com/api/v2#/reference/actor-tasks/webhook-collection
61668
+ * Returns a client for the Webhooks of this Task.
61669
+ *
61670
+ * @returns A client for the task's webhooks.
61671
+ * @see https://docs.apify.com/api/v2/actor-task-webhooks-get
60058
61672
  */ webhooks() {
60059
61673
  return new _webhook_collection__rspack_import_5.WebhookCollectionClient(this._subResourceOptions());
60060
61674
  }
@@ -60081,20 +61695,38 @@ __webpack_require__.d(__webpack_exports__, {
60081
61695
  /* import */ var _base_resource_collection_client__rspack_import_0 = __webpack_require__("./src/base/resource_collection_client.ts");
60082
61696
 
60083
61697
 
60084
- class TaskCollectionClient extends _base_resource_collection_client__rspack_import_0.ResourceCollectionClient {
61698
+ /**
61699
+ * Client for managing the collection of Actor tasks in your account.
61700
+ *
61701
+ * Tasks are pre-configured Actor runs with saved input and options. This client provides
61702
+ * methods to list and create tasks.
61703
+ *
61704
+ * @example
61705
+ * ```javascript
61706
+ * const client = new ApifyClient({ token: 'my-token' });
61707
+ * const tasksClient = client.tasks();
61708
+ *
61709
+ * // List all tasks
61710
+ * const { items } = await tasksClient.list();
61711
+ *
61712
+ * // Create a new task
61713
+ * const newTask = await tasksClient.create({
61714
+ * actId: 'my-actor-id',
61715
+ * name: 'my-task',
61716
+ * input: { url: 'https://example.com' }
61717
+ * });
61718
+ * ```
61719
+ *
61720
+ * @see https://docs.apify.com/platform/actors/running/tasks
61721
+ */ class TaskCollectionClient extends _base_resource_collection_client__rspack_import_0.ResourceCollectionClient {
60085
61722
  /**
60086
- * https://docs.apify.com/api/v2#/reference/actor-tasks/task-collection/get-list-of-tasks
60087
- * @param {object} [options]
60088
- * @param {number} [options.limit]
60089
- * @param {number} [options.offset]
60090
- * @param {boolean} [options.desc]
60091
- * @return {PaginatedIterator<TaskList>}
61723
+ * Lists all Tasks.
60092
61724
  *
60093
61725
  * Awaiting the return value (as you would with a Promise) will result in a single API call. The amount of fetched
60094
61726
  * items in a single API call is limited.
60095
61727
  * ```javascript
60096
61728
  * const paginatedList = await client.list(options);
60097
- *```
61729
+ * ```
60098
61730
  *
60099
61731
  * Asynchronous iteration is also supported. This will fetch additional pages if needed until all items are
60100
61732
  * retrieved.
@@ -60102,6 +61734,10 @@ class TaskCollectionClient extends _base_resource_collection_client__rspack_impo
60102
61734
  * ```javascript
60103
61735
  * for await (const singleItem of client.list(options)) {...}
60104
61736
  * ```
61737
+ *
61738
+ * @param options - Pagination and sorting options.
61739
+ * @returns A paginated iterator of tasks.
61740
+ * @see https://docs.apify.com/api/v2/actor-tasks-get
60105
61741
  */ list() {
60106
61742
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
60107
61743
  ow__rspack_import_1_default()(options, ow__rspack_import_1_default().object.exactShape({
@@ -60112,7 +61748,11 @@ class TaskCollectionClient extends _base_resource_collection_client__rspack_impo
60112
61748
  return this._listPaginated(options);
60113
61749
  }
60114
61750
  /**
60115
- * https://docs.apify.com/api/v2#/reference/actor-tasks/task-collection/create-task
61751
+ * Creates a new task.
61752
+ *
61753
+ * @param task - The task data.
61754
+ * @returns The created task object.
61755
+ * @see https://docs.apify.com/api/v2/actor-tasks-post
60116
61756
  */ async create(task) {
60117
61757
  ow__rspack_import_1_default()(task, (ow__rspack_import_1_default().object));
60118
61758
  return this._create(task);
@@ -60140,16 +61780,46 @@ __webpack_require__.d(__webpack_exports__, {
60140
61780
  /* import */ var _utils__rspack_import_1 = __webpack_require__("./src/utils.ts");
60141
61781
 
60142
61782
 
60143
- class UserClient extends _base_resource_client__rspack_import_0.ResourceClient {
61783
+ /**
61784
+ * Client for managing user account information.
61785
+ *
61786
+ * Provides methods to retrieve user details, monthly usage statistics, and account limits.
61787
+ * When using an API token, you can access your own user information or public information
61788
+ * about other users.
61789
+ *
61790
+ * @example
61791
+ * ```javascript
61792
+ * const client = new ApifyClient({ token: 'my-token' });
61793
+ * const userClient = client.user('my-user-id');
61794
+ *
61795
+ * // Get user information
61796
+ * const user = await userClient.get();
61797
+ *
61798
+ * // Get monthly usage
61799
+ * const usage = await userClient.monthlyUsage();
61800
+ *
61801
+ * // Get account limits
61802
+ * const limits = await userClient.limits();
61803
+ * ```
61804
+ *
61805
+ * @see https://docs.apify.com/platform/actors/running
61806
+ */ class UserClient extends _base_resource_client__rspack_import_0.ResourceClient {
60144
61807
  /**
61808
+ * Retrieves the user data.
61809
+ *
60145
61810
  * Depending on whether ApifyClient was created with a token,
60146
61811
  * the method will either return public or private user data.
60147
- * https://docs.apify.com/api/v2#/reference/users
61812
+ *
61813
+ * @returns The user object.
61814
+ * @see https://docs.apify.com/api/v2/user-get
60148
61815
  */ async get() {
60149
61816
  return this._get();
60150
61817
  }
60151
61818
  /**
60152
- * https://docs.apify.com/api/v2/#/reference/users/monthly-usage
61819
+ * Retrieves the user's monthly usage data.
61820
+ *
61821
+ * @returns The monthly usage object, or `undefined` if it does not exist.
61822
+ * @see https://docs.apify.com/api/v2/user-usage-monthly-get
60153
61823
  */ async monthlyUsage() {
60154
61824
  const requestOpts = {
60155
61825
  url: this._url('usage/monthly'),
@@ -60166,7 +61836,10 @@ class UserClient extends _base_resource_client__rspack_import_0.ResourceClient {
60166
61836
  return undefined;
60167
61837
  }
60168
61838
  /**
60169
- * https://docs.apify.com/api/v2/#/reference/users/account-and-usage-limits
61839
+ * Retrieves the user's account and usage limits.
61840
+ *
61841
+ * @returns The account and usage limits object, or `undefined` if it does not exist.
61842
+ * @see https://docs.apify.com/api/v2/user-limits-get
60170
61843
  */ async limits() {
60171
61844
  const requestOpts = {
60172
61845
  url: this._url('limits'),
@@ -60182,7 +61855,10 @@ class UserClient extends _base_resource_client__rspack_import_0.ResourceClient {
60182
61855
  return undefined;
60183
61856
  }
60184
61857
  /**
60185
- * https://docs.apify.com/api/v2/#/reference/users/account-and-usage-limits
61858
+ * Updates the user's account and usage limits.
61859
+ *
61860
+ * @param options - The new limits to set.
61861
+ * @see https://docs.apify.com/api/v2/user-limits-put
60186
61862
  */ async updateLimits(options) {
60187
61863
  const requestOpts = {
60188
61864
  url: this._url('limits'),
@@ -60229,25 +61905,64 @@ __webpack_require__.d(__webpack_exports__, {
60229
61905
 
60230
61906
 
60231
61907
 
60232
- class WebhookClient extends _base_resource_client__rspack_import_0.ResourceClient {
61908
+ /**
61909
+ * Client for managing a specific webhook.
61910
+ *
61911
+ * Webhooks allow you to receive notifications when specific events occur in your Actors or tasks.
61912
+ * This client provides methods to get, update, delete, and test webhooks, as well as retrieve
61913
+ * webhook dispatches.
61914
+ *
61915
+ * @example
61916
+ * ```javascript
61917
+ * const client = new ApifyClient({ token: 'my-token' });
61918
+ * const webhookClient = client.webhook('my-webhook-id');
61919
+ *
61920
+ * // Get webhook details
61921
+ * const webhook = await webhookClient.get();
61922
+ *
61923
+ * // Update webhook
61924
+ * await webhookClient.update({
61925
+ * isEnabled: true,
61926
+ * eventTypes: ['ACTOR.RUN.SUCCEEDED'],
61927
+ * requestUrl: 'https://example.com/webhook'
61928
+ * });
61929
+ *
61930
+ * // Test webhook
61931
+ * await webhookClient.test();
61932
+ * ```
61933
+ *
61934
+ * @see https://docs.apify.com/platform/integrations/webhooks
61935
+ */ class WebhookClient extends _base_resource_client__rspack_import_0.ResourceClient {
60233
61936
  /**
60234
- * https://docs.apify.com/api/v2#/reference/webhooks/webhook-object/get-webhook
61937
+ * Retrieves the webhook.
61938
+ *
61939
+ * @returns The webhook object, or `undefined` if it does not exist.
61940
+ * @see https://docs.apify.com/api/v2/webhook-get
60235
61941
  */ async get() {
60236
61942
  return this._get();
60237
61943
  }
60238
61944
  /**
60239
- * https://docs.apify.com/api/v2#/reference/webhooks/webhook-object/update-webhook
61945
+ * Updates the webhook with the specified fields.
61946
+ *
61947
+ * @param newFields - Fields to update.
61948
+ * @returns The updated webhook object.
61949
+ * @see https://docs.apify.com/api/v2/webhook-put
60240
61950
  */ async update(newFields) {
60241
61951
  ow__rspack_import_3_default()(newFields, (ow__rspack_import_3_default().object));
60242
61952
  return this._update(newFields);
60243
61953
  }
60244
61954
  /**
60245
- * https://docs.apify.com/api/v2#/reference/webhooks/webhook-object/delete-webhook
61955
+ * Deletes the webhook.
61956
+ *
61957
+ * @see https://docs.apify.com/api/v2/webhook-delete
60246
61958
  */ async delete() {
60247
61959
  return this._delete();
60248
61960
  }
60249
61961
  /**
60250
- * https://docs.apify.com/api/v2#/reference/webhooks/webhook-test/test-webhook
61962
+ * Tests the webhook by dispatching a test event.
61963
+ *
61964
+ * @returns The webhook dispatch object, or `undefined` if the test fails.
61965
+ * @see https://docs.apify.com/api/v2/webhook-test-post
60251
61966
  */ async test() {
60252
61967
  const request = {
60253
61968
  url: this._url('test'),
@@ -60263,7 +61978,10 @@ class WebhookClient extends _base_resource_client__rspack_import_0.ResourceClien
60263
61978
  return undefined;
60264
61979
  }
60265
61980
  /**
60266
- * https://docs.apify.com/api/v2#/reference/webhooks/dispatches-collection
61981
+ * Returns a client for the dispatches of this webhook.
61982
+ *
61983
+ * @returns A client for the webhook's dispatches.
61984
+ * @see https://docs.apify.com/api/v2/webhook-webhook-dispatches-get
60267
61985
  */ dispatches() {
60268
61986
  return new _webhook_dispatch_collection__rspack_import_2.WebhookDispatchCollectionClient(this._subResourceOptions({
60269
61987
  resourcePath: 'dispatches'
@@ -60292,15 +62010,37 @@ __webpack_require__.d(__webpack_exports__, {
60292
62010
  /* import */ var _base_resource_collection_client__rspack_import_0 = __webpack_require__("./src/base/resource_collection_client.ts");
60293
62011
 
60294
62012
 
60295
- class WebhookCollectionClient extends _base_resource_collection_client__rspack_import_0.ResourceCollectionClient {
62013
+ /**
62014
+ * Client for managing the collection of Webhooks.
62015
+ *
62016
+ * Webhooks allow you to receive notifications when specific events occur in your Actors or tasks.
62017
+ * This client provides methods to list and create webhooks for specific Actors or tasks.
62018
+ *
62019
+ * @example
62020
+ * ```javascript
62021
+ * const client = new ApifyClient({ token: 'my-token' });
62022
+ *
62023
+ * // List webhooks for an Actor
62024
+ * const actorWebhooksClient = client.actor('my-actor-id').webhooks();
62025
+ * const { items } = await actorWebhooksClient.list();
62026
+ *
62027
+ * // Create a webhook
62028
+ * const newWebhook = await actorWebhooksClient.create({
62029
+ * eventTypes: ['ACTOR.RUN.SUCCEEDED'],
62030
+ * requestUrl: 'https://example.com/webhook'
62031
+ * });
62032
+ * ```
62033
+ *
62034
+ * @see https://docs.apify.com/platform/integrations/webhooks
62035
+ */ class WebhookCollectionClient extends _base_resource_collection_client__rspack_import_0.ResourceCollectionClient {
60296
62036
  /**
60297
- * https://docs.apify.com/api/v2#/reference/webhooks/webhook-collection/get-list-of-webhooks
62037
+ * Lists all Webhooks.
60298
62038
  *
60299
62039
  * Awaiting the return value (as you would with a Promise) will result in a single API call. The amount of fetched
60300
62040
  * items in a single API call is limited.
60301
62041
  * ```javascript
60302
62042
  * const paginatedList = await client.list(options);
60303
- *```
62043
+ * ```
60304
62044
  *
60305
62045
  * Asynchronous iteration is also supported. This will fetch additional pages if needed until all items are
60306
62046
  * retrieved.
@@ -60308,6 +62048,10 @@ class WebhookCollectionClient extends _base_resource_collection_client__rspack_i
60308
62048
  * ```javascript
60309
62049
  * for await (const singleItem of client.list(options)) {...}
60310
62050
  * ```
62051
+ *
62052
+ * @param options - Pagination and sorting options.
62053
+ * @returns A paginated iterator of webhooks.
62054
+ * @see https://docs.apify.com/api/v2/webhooks-get
60311
62055
  */ list() {
60312
62056
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
60313
62057
  ow__rspack_import_1_default()(options, ow__rspack_import_1_default().object.exactShape({
@@ -60318,7 +62062,11 @@ class WebhookCollectionClient extends _base_resource_collection_client__rspack_i
60318
62062
  return this._listPaginated(options);
60319
62063
  }
60320
62064
  /**
60321
- * https://docs.apify.com/api/v2#/reference/webhooks/webhook-collection/create-webhook
62065
+ * Creates a new webhook.
62066
+ *
62067
+ * @param webhook - The webhook data.
62068
+ * @returns The created webhook object.
62069
+ * @see https://docs.apify.com/api/v2/webhooks-post
60322
62070
  */ async create(webhook) {
60323
62071
  ow__rspack_import_1_default()(webhook, (ow__rspack_import_1_default().optional.object));
60324
62072
  return this._create(webhook);
@@ -60344,9 +62092,29 @@ __webpack_require__.d(__webpack_exports__, {
60344
62092
  });
60345
62093
  /* import */ var _base_resource_client__rspack_import_0 = __webpack_require__("./src/base/resource_client.ts");
60346
62094
 
60347
- class WebhookDispatchClient extends _base_resource_client__rspack_import_0.ResourceClient {
62095
+ /**
62096
+ * Client for managing a specific webhook dispatch.
62097
+ *
62098
+ * Webhook dispatches represent individual notifications sent by webhooks. This client provides
62099
+ * methods to retrieve details about a specific dispatch.
62100
+ *
62101
+ * @example
62102
+ * ```javascript
62103
+ * const client = new ApifyClient({ token: 'my-token' });
62104
+ * const webhookClient = client.webhook('my-webhook-id');
62105
+ *
62106
+ * // Get a specific dispatch
62107
+ * const dispatchClient = webhookClient.dispatches().get('dispatch-id');
62108
+ * const dispatch = await dispatchClient.get();
62109
+ * ```
62110
+ *
62111
+ * @see https://docs.apify.com/platform/integrations/webhooks
62112
+ */ class WebhookDispatchClient extends _base_resource_client__rspack_import_0.ResourceClient {
60348
62113
  /**
60349
- * https://docs.apify.com/api/v2#/reference/webhook-dispatches/webhook-dispatch-object/get-webhook-dispatch
62114
+ * Retrieves the webhook dispatch.
62115
+ *
62116
+ * @returns The webhook dispatch object, or `undefined` if it does not exist.
62117
+ * @see https://docs.apify.com/api/v2/webhook-dispatch-get
60350
62118
  */ async get() {
60351
62119
  return this._get();
60352
62120
  }
@@ -60379,15 +62147,32 @@ __webpack_require__.d(__webpack_exports__, {
60379
62147
  /* import */ var _base_resource_collection_client__rspack_import_0 = __webpack_require__("./src/base/resource_collection_client.ts");
60380
62148
 
60381
62149
 
60382
- class WebhookDispatchCollectionClient extends _base_resource_collection_client__rspack_import_0.ResourceCollectionClient {
62150
+ /**
62151
+ * Client for managing the collection of webhook dispatches.
62152
+ *
62153
+ * Webhook dispatches represent individual notifications sent by a webhook. This client provides
62154
+ * methods to list all dispatches for a specific webhook.
62155
+ *
62156
+ * @example
62157
+ * ```javascript
62158
+ * const client = new ApifyClient({ token: 'my-token' });
62159
+ * const webhookClient = client.webhook('my-webhook-id');
62160
+ *
62161
+ * // List all dispatches for this webhook
62162
+ * const dispatchesClient = webhookClient.dispatches();
62163
+ * const { items } = await dispatchesClient.list();
62164
+ * ```
62165
+ *
62166
+ * @see https://docs.apify.com/platform/integrations/webhooks
62167
+ */ class WebhookDispatchCollectionClient extends _base_resource_collection_client__rspack_import_0.ResourceCollectionClient {
60383
62168
  /**
60384
- * https://docs.apify.com/api/v2#/reference/webhook-dispatches/webhook-dispatches-collection/get-list-of-webhook-dispatches
62169
+ * Lists all webhook dispatches.
60385
62170
  *
60386
62171
  * Awaiting the return value (as you would with a Promise) will result in a single API call. The amount of fetched
60387
62172
  * items in a single API call is limited.
60388
62173
  * ```javascript
60389
62174
  * const paginatedList = await client.list(options);
60390
- *```
62175
+ * ```
60391
62176
  *
60392
62177
  * Asynchronous iteration is also supported. This will fetch additional pages if needed until all items are
60393
62178
  * retrieved.
@@ -60395,6 +62180,10 @@ class WebhookDispatchCollectionClient extends _base_resource_collection_client__
60395
62180
  * ```javascript
60396
62181
  * for await (const singleItem of client.list(options)) {...}
60397
62182
  * ```
62183
+ *
62184
+ * @param options - Pagination and sorting options.
62185
+ * @returns A paginated iterator of webhook dispatches.
62186
+ * @see https://docs.apify.com/api/v2/webhook-dispatches-get
60398
62187
  */ list() {
60399
62188
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
60400
62189
  ow__rspack_import_1_default()(options, ow__rspack_import_1_default().object.exactShape({
@@ -60616,7 +62405,7 @@ function isStream(value) {
60616
62405
  function getVersionData() {
60617
62406
  if (true) {
60618
62407
  return {
60619
- version: "2.20.1-beta.6"
62408
+ version: "2.20.1-beta.8"
60620
62409
  };
60621
62410
  }
60622
62411
  // eslint-disable-next-line
@@ -70527,7 +72316,7 @@ module.exports = JSON.parse('{"name":"escodegen","description":"ECMAScript code
70527
72316
  }),
70528
72317
  "./package.json": (function (module) {
70529
72318
  "use strict";
70530
- module.exports = JSON.parse('{"name":"apify-client","version":"2.20.1-beta.6","description":"Apify API client for JavaScript","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/bundle.js","unpkg":"dist/bundle.js","exports":{"./package.json":"./package.json",".":{"import":"./dist/index.mjs","require":"./dist/index.js","types":"./dist/index.d.ts","browser":"./dist/bundle.js"}},"keywords":["apify","api","apifier","crawler","scraper"],"author":{"name":"Apify","email":"support@apify.com","url":"https://apify.com"},"contributors":["Jan Curn <jan@apify.com>","Marek Trunkát <marek@apify.com>","Ondra Urban <ondra@apify.com>","Jakub Drobník <jakub.drobnik@apify.com>"],"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/apify/apify-client-js"},"bugs":{"url":"https://github.com/apify/apify-client-js/issues"},"homepage":"https://docs.apify.com/api/client/js/","files":["dist","!dist/*.tsbuildinfo"],"scripts":{"build":"npm run clean && npm run build:node && npm run build:browser","postbuild":"gen-esm-wrapper dist/index.js dist/index.mjs","prepublishOnly":"(test $CI || (echo \\"Publishing is reserved to CI!\\"; exit 1))","clean":"rimraf dist","test":"npm run build && jest","lint":"eslint","lint:fix":"eslint --fix","tsc-check-tests":"tsc --noEmit --project test/tsconfig.json","format":"prettier --write .","format:check":"prettier --check .","build:node":"tsc","build:browser":"rsbuild build"},"dependencies":{"@apify/consts":"^2.42.0","@apify/log":"^2.2.6","@apify/utilities":"^2.23.2","@crawlee/types":"^3.3.0","ansi-colors":"^4.1.1","async-retry":"^1.3.3","axios":"^1.6.7","content-type":"^1.0.5","ow":"^0.28.2","proxy-agent":"^6.5.0","tslib":"^2.5.0","type-fest":"^4.0.0"},"devDependencies":{"@apify/eslint-config":"^1.0.0","@apify/tsconfig":"^0.1.1","@babel/cli":"^7.21.0","@babel/core":"^7.21.0","@babel/preset-env":"^7.20.2","@babel/register":"^7.21.0","@crawlee/puppeteer":"^3.2.2","@rsbuild/core":"^1.3.6","@rsbuild/plugin-node-polyfill":"^1.3.0","@stylistic/eslint-plugin-ts":"^4.2.0","@types/async-retry":"^1.4.5","@types/content-type":"^1.1.5","@types/express":"^5.0.0","@types/fs-extra":"^11.0.1","@types/jest":"^29.4.0","@types/node":"^24.0.0","ajv":"^8.17.1","babel-loader":"^10.0.0","body-parser":"^1.20.3","compression":"^1.7.4","eslint":"^9.24.0","eslint-config-prettier":"^10.1.2","express":"^5.0.0","fs-extra":"^11.1.0","gen-esm-wrapper":"^1.1.2","globals":"^16.0.0","jest":"^29.4.3","prettier":"^3.5.3","process":"^0.11.10","puppeteer":"^24.0.0","rimraf":"^6.0.0","source-map-support":"^0.5.21","ts-jest":"^29.0.5","ts-loader":"^9.4.2","ts-node":"^10.9.1","typescript":"^5.8.3","typescript-eslint":"^8.29.1"},"packageManager":"npm@10.9.2"}')
72319
+ module.exports = JSON.parse('{"name":"apify-client","version":"2.20.1-beta.8","description":"Apify API client for JavaScript","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/bundle.js","unpkg":"dist/bundle.js","exports":{"./package.json":"./package.json",".":{"import":"./dist/index.mjs","require":"./dist/index.js","types":"./dist/index.d.ts","browser":"./dist/bundle.js"}},"keywords":["apify","api","apifier","crawler","scraper"],"author":{"name":"Apify","email":"support@apify.com","url":"https://apify.com"},"contributors":["Jan Curn <jan@apify.com>","Marek Trunkát <marek@apify.com>","Ondra Urban <ondra@apify.com>","Jakub Drobník <jakub.drobnik@apify.com>"],"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/apify/apify-client-js"},"bugs":{"url":"https://github.com/apify/apify-client-js/issues"},"homepage":"https://docs.apify.com/api/client/js/","files":["dist","!dist/*.tsbuildinfo"],"scripts":{"build":"npm run clean && npm run build:node && npm run build:browser","postbuild":"gen-esm-wrapper dist/index.js dist/index.mjs","prepublishOnly":"(test $CI || (echo \\"Publishing is reserved to CI!\\"; exit 1))","clean":"rimraf dist","test":"npm run build && jest","lint":"eslint","lint:fix":"eslint --fix","tsc-check-tests":"tsc --noEmit --project test/tsconfig.json","format":"prettier --write .","format:check":"prettier --check .","build:node":"tsc","build:browser":"rsbuild build"},"dependencies":{"@apify/consts":"^2.42.0","@apify/log":"^2.2.6","@apify/utilities":"^2.23.2","@crawlee/types":"^3.3.0","ansi-colors":"^4.1.1","async-retry":"^1.3.3","axios":"^1.6.7","content-type":"^1.0.5","ow":"^0.28.2","proxy-agent":"^6.5.0","tslib":"^2.5.0","type-fest":"^4.0.0"},"devDependencies":{"@apify/eslint-config":"^1.0.0","@apify/tsconfig":"^0.1.1","@babel/cli":"^7.21.0","@babel/core":"^7.21.0","@babel/preset-env":"^7.20.2","@babel/register":"^7.21.0","@crawlee/puppeteer":"^3.2.2","@rsbuild/core":"^1.3.6","@rsbuild/plugin-node-polyfill":"^1.3.0","@stylistic/eslint-plugin-ts":"^4.2.0","@types/async-retry":"^1.4.5","@types/content-type":"^1.1.5","@types/express":"^5.0.0","@types/fs-extra":"^11.0.1","@types/jest":"^29.4.0","@types/node":"^24.0.0","ajv":"^8.17.1","babel-loader":"^10.0.0","body-parser":"^1.20.3","compression":"^1.7.4","eslint":"^9.24.0","eslint-config-prettier":"^10.1.2","express":"^5.0.0","fs-extra":"^11.1.0","gen-esm-wrapper":"^1.1.2","globals":"^16.0.0","jest":"^29.4.3","prettier":"^3.5.3","process":"^0.11.10","puppeteer":"^24.0.0","rimraf":"^6.0.0","source-map-support":"^0.5.21","ts-jest":"^29.0.5","ts-loader":"^9.4.2","ts-node":"^10.9.1","typescript":"^5.8.3","typescript-eslint":"^8.29.1"},"packageManager":"npm@10.9.2"}')
70531
72320
 
70532
72321
  }),
70533
72322
 
@@ -70649,7 +72438,7 @@ __webpack_require__.hu = (chunkId) => ('' + chunkId + '.' + __webpack_require__.
70649
72438
  })();
70650
72439
  // webpack/runtime/get_full_hash
70651
72440
  (() => {
70652
- __webpack_require__.h = () => ("de3c748514a18bb9")
72441
+ __webpack_require__.h = () => ("bbfadc107d9db9cb")
70653
72442
  })();
70654
72443
  // webpack/runtime/get_main_filename/update manifest
70655
72444
  (() => {