@algolia/ingestion 1.32.0 → 1.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@ import { createFetchRequester } from "@algolia/requester-fetch";
4
4
 
5
5
  // src/ingestionClient.ts
6
6
  import { createAuth, createIterablePromise, createTransporter, getAlgoliaAgent } from "@algolia/client-common";
7
- var apiClientVersion = "1.32.0";
7
+ var apiClientVersion = "1.33.0";
8
8
  var REGIONS = ["eu", "us"];
9
9
  function getDefaultHosts(region) {
10
10
  const url = "data.{region}.algolia.com".replace("{region}", region);
@@ -1492,9 +1492,10 @@ function createIngestionClient({
1492
1492
  * - editSettings
1493
1493
  * @param runTask - The runTask object.
1494
1494
  * @param runTask.taskID - Unique identifier of a task.
1495
+ * @param runTask.runTaskPayload -
1495
1496
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1496
1497
  */
1497
- runTask({ taskID }, requestOptions) {
1498
+ runTask({ taskID, runTaskPayload }, requestOptions) {
1498
1499
  if (!taskID) {
1499
1500
  throw new Error("Parameter `taskID` is required when calling `runTask`.");
1500
1501
  }
@@ -1505,7 +1506,8 @@ function createIngestionClient({
1505
1506
  method: "POST",
1506
1507
  path: requestPath,
1507
1508
  queryParameters,
1508
- headers
1509
+ headers,
1510
+ data: runTaskPayload ? runTaskPayload : {}
1509
1511
  };
1510
1512
  return transporter.request(request, requestOptions);
1511
1513
  },
@@ -1520,9 +1522,10 @@ function createIngestionClient({
1520
1522
  * @deprecated
1521
1523
  * @param runTaskV1 - The runTaskV1 object.
1522
1524
  * @param runTaskV1.taskID - Unique identifier of a task.
1525
+ * @param runTaskV1.runTaskPayload -
1523
1526
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1524
1527
  */
1525
- runTaskV1({ taskID }, requestOptions) {
1528
+ runTaskV1({ taskID, runTaskPayload }, requestOptions) {
1526
1529
  if (!taskID) {
1527
1530
  throw new Error("Parameter `taskID` is required when calling `runTaskV1`.");
1528
1531
  }
@@ -1533,7 +1536,8 @@ function createIngestionClient({
1533
1536
  method: "POST",
1534
1537
  path: requestPath,
1535
1538
  queryParameters,
1536
- headers
1539
+ headers,
1540
+ data: runTaskPayload ? runTaskPayload : {}
1537
1541
  };
1538
1542
  return transporter.request(request, requestOptions);
1539
1543
  },