@algolia/ingestion 1.31.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.
@@ -1,6 +1,6 @@
1
1
  // src/ingestionClient.ts
2
2
  import { createAuth, createIterablePromise, createTransporter, getAlgoliaAgent } from "@algolia/client-common";
3
- var apiClientVersion = "1.31.0";
3
+ var apiClientVersion = "1.33.0";
4
4
  var REGIONS = ["eu", "us"];
5
5
  function getDefaultHosts(region) {
6
6
  const url = "data.{region}.algolia.com".replace("{region}", region);
@@ -1488,9 +1488,10 @@ function createIngestionClient({
1488
1488
  * - editSettings
1489
1489
  * @param runTask - The runTask object.
1490
1490
  * @param runTask.taskID - Unique identifier of a task.
1491
+ * @param runTask.runTaskPayload -
1491
1492
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1492
1493
  */
1493
- runTask({ taskID }, requestOptions) {
1494
+ runTask({ taskID, runTaskPayload }, requestOptions) {
1494
1495
  if (!taskID) {
1495
1496
  throw new Error("Parameter `taskID` is required when calling `runTask`.");
1496
1497
  }
@@ -1501,7 +1502,8 @@ function createIngestionClient({
1501
1502
  method: "POST",
1502
1503
  path: requestPath,
1503
1504
  queryParameters,
1504
- headers
1505
+ headers,
1506
+ data: runTaskPayload ? runTaskPayload : {}
1505
1507
  };
1506
1508
  return transporter.request(request, requestOptions);
1507
1509
  },
@@ -1516,9 +1518,10 @@ function createIngestionClient({
1516
1518
  * @deprecated
1517
1519
  * @param runTaskV1 - The runTaskV1 object.
1518
1520
  * @param runTaskV1.taskID - Unique identifier of a task.
1521
+ * @param runTaskV1.runTaskPayload -
1519
1522
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1520
1523
  */
1521
- runTaskV1({ taskID }, requestOptions) {
1524
+ runTaskV1({ taskID, runTaskPayload }, requestOptions) {
1522
1525
  if (!taskID) {
1523
1526
  throw new Error("Parameter `taskID` is required when calling `runTaskV1`.");
1524
1527
  }
@@ -1529,7 +1532,8 @@ function createIngestionClient({
1529
1532
  method: "POST",
1530
1533
  path: requestPath,
1531
1534
  queryParameters,
1532
- headers
1535
+ headers,
1536
+ data: runTaskPayload ? runTaskPayload : {}
1533
1537
  };
1534
1538
  return transporter.request(request, requestOptions);
1535
1539
  },