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