@algolia/ingestion 1.16.0 → 1.17.1

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, createTransporter, getAlgoliaAgent } from "@algolia/client-common";
3
- var apiClientVersion = "1.16.0";
3
+ var apiClientVersion = "1.17.1";
4
4
  var REGIONS = ["eu", "us"];
5
5
  function getDefaultHosts(region) {
6
6
  const url = "data.{region}.algolia.com".replace("{region}", region);
@@ -1278,9 +1278,10 @@ function createIngestionClient({
1278
1278
  * @param pushTask - The pushTask object.
1279
1279
  * @param pushTask.taskID - Unique identifier of a task.
1280
1280
  * @param pushTask.pushTaskPayload - Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.
1281
+ * @param pushTask.watch - When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
1281
1282
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1282
1283
  */
1283
- pushTask({ taskID, pushTaskPayload }, requestOptions) {
1284
+ pushTask({ taskID, pushTaskPayload, watch }, requestOptions) {
1284
1285
  if (!taskID) {
1285
1286
  throw new Error("Parameter `taskID` is required when calling `pushTask`.");
1286
1287
  }
@@ -1296,6 +1297,9 @@ function createIngestionClient({
1296
1297
  const requestPath = "/2/tasks/{taskID}/push".replace("{taskID}", encodeURIComponent(taskID));
1297
1298
  const headers = {};
1298
1299
  const queryParameters = {};
1300
+ if (watch !== void 0) {
1301
+ queryParameters["watch"] = watch.toString();
1302
+ }
1299
1303
  const request = {
1300
1304
  method: "POST",
1301
1305
  path: requestPath,