@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.
package/dist/fetch.d.ts CHANGED
@@ -2141,6 +2141,10 @@ type PushTaskProps = {
2141
2141
  * Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.
2142
2142
  */
2143
2143
  pushTaskPayload: PushTaskPayload;
2144
+ /**
2145
+ * When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
2146
+ */
2147
+ watch?: boolean;
2144
2148
  };
2145
2149
  /**
2146
2150
  * Properties for the `runSource` method.
@@ -2263,7 +2267,7 @@ type ValidateSourceBeforeUpdateProps = {
2263
2267
  sourceUpdate: SourceUpdate;
2264
2268
  };
2265
2269
 
2266
- declare const apiClientVersion = "1.16.0";
2270
+ declare const apiClientVersion = "1.17.0";
2267
2271
  declare const REGIONS: readonly ["eu", "us"];
2268
2272
  type Region = (typeof REGIONS)[number];
2269
2273
  type RegionOptions = {
@@ -2765,9 +2769,10 @@ declare function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOptio
2765
2769
  * @param pushTask - The pushTask object.
2766
2770
  * @param pushTask.taskID - Unique identifier of a task.
2767
2771
  * @param pushTask.pushTaskPayload - Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.
2772
+ * @param pushTask.watch - When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
2768
2773
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2769
2774
  */
2770
- pushTask({ taskID, pushTaskPayload }: PushTaskProps, requestOptions?: RequestOptions): Promise<RunResponse>;
2775
+ pushTask({ taskID, pushTaskPayload, watch }: PushTaskProps, requestOptions?: RequestOptions): Promise<RunResponse>;
2771
2776
  /**
2772
2777
  * Runs all tasks linked to a source, only available for Shopify sources. It will create 1 run per task.
2773
2778
  *
package/dist/node.d.cts CHANGED
@@ -2141,6 +2141,10 @@ type PushTaskProps = {
2141
2141
  * Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.
2142
2142
  */
2143
2143
  pushTaskPayload: PushTaskPayload;
2144
+ /**
2145
+ * When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
2146
+ */
2147
+ watch?: boolean;
2144
2148
  };
2145
2149
  /**
2146
2150
  * Properties for the `runSource` method.
@@ -2263,7 +2267,7 @@ type ValidateSourceBeforeUpdateProps = {
2263
2267
  sourceUpdate: SourceUpdate;
2264
2268
  };
2265
2269
 
2266
- declare const apiClientVersion = "1.16.0";
2270
+ declare const apiClientVersion = "1.17.0";
2267
2271
  declare const REGIONS: readonly ["eu", "us"];
2268
2272
  type Region = (typeof REGIONS)[number];
2269
2273
  type RegionOptions = {
@@ -2765,9 +2769,10 @@ declare function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOptio
2765
2769
  * @param pushTask - The pushTask object.
2766
2770
  * @param pushTask.taskID - Unique identifier of a task.
2767
2771
  * @param pushTask.pushTaskPayload - Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.
2772
+ * @param pushTask.watch - When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
2768
2773
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2769
2774
  */
2770
- pushTask({ taskID, pushTaskPayload }: PushTaskProps, requestOptions?: RequestOptions): Promise<RunResponse>;
2775
+ pushTask({ taskID, pushTaskPayload, watch }: PushTaskProps, requestOptions?: RequestOptions): Promise<RunResponse>;
2771
2776
  /**
2772
2777
  * Runs all tasks linked to a source, only available for Shopify sources. It will create 1 run per task.
2773
2778
  *
package/dist/node.d.ts CHANGED
@@ -2141,6 +2141,10 @@ type PushTaskProps = {
2141
2141
  * Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.
2142
2142
  */
2143
2143
  pushTaskPayload: PushTaskPayload;
2144
+ /**
2145
+ * When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
2146
+ */
2147
+ watch?: boolean;
2144
2148
  };
2145
2149
  /**
2146
2150
  * Properties for the `runSource` method.
@@ -2263,7 +2267,7 @@ type ValidateSourceBeforeUpdateProps = {
2263
2267
  sourceUpdate: SourceUpdate;
2264
2268
  };
2265
2269
 
2266
- declare const apiClientVersion = "1.16.0";
2270
+ declare const apiClientVersion = "1.17.0";
2267
2271
  declare const REGIONS: readonly ["eu", "us"];
2268
2272
  type Region = (typeof REGIONS)[number];
2269
2273
  type RegionOptions = {
@@ -2765,9 +2769,10 @@ declare function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOptio
2765
2769
  * @param pushTask - The pushTask object.
2766
2770
  * @param pushTask.taskID - Unique identifier of a task.
2767
2771
  * @param pushTask.pushTaskPayload - Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.
2772
+ * @param pushTask.watch - When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
2768
2773
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2769
2774
  */
2770
- pushTask({ taskID, pushTaskPayload }: PushTaskProps, requestOptions?: RequestOptions): Promise<RunResponse>;
2775
+ pushTask({ taskID, pushTaskPayload, watch }: PushTaskProps, requestOptions?: RequestOptions): Promise<RunResponse>;
2771
2776
  /**
2772
2777
  * Runs all tasks linked to a source, only available for Shopify sources. It will create 1 run per task.
2773
2778
  *
@@ -29,7 +29,7 @@ __export(ingestionClient_exports, {
29
29
  });
30
30
  module.exports = __toCommonJS(ingestionClient_exports);
31
31
  var import_client_common = require("@algolia/client-common");
32
- var apiClientVersion = "1.16.0";
32
+ var apiClientVersion = "1.17.0";
33
33
  var REGIONS = ["eu", "us"];
34
34
  function getDefaultHosts(region) {
35
35
  const url = "data.{region}.algolia.com".replace("{region}", region);
@@ -1307,9 +1307,10 @@ function createIngestionClient({
1307
1307
  * @param pushTask - The pushTask object.
1308
1308
  * @param pushTask.taskID - Unique identifier of a task.
1309
1309
  * @param pushTask.pushTaskPayload - Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.
1310
+ * @param pushTask.watch - When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
1310
1311
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1311
1312
  */
1312
- pushTask({ taskID, pushTaskPayload }, requestOptions) {
1313
+ pushTask({ taskID, pushTaskPayload, watch }, requestOptions) {
1313
1314
  if (!taskID) {
1314
1315
  throw new Error("Parameter `taskID` is required when calling `pushTask`.");
1315
1316
  }
@@ -1325,6 +1326,9 @@ function createIngestionClient({
1325
1326
  const requestPath = "/2/tasks/{taskID}/push".replace("{taskID}", encodeURIComponent(taskID));
1326
1327
  const headers = {};
1327
1328
  const queryParameters = {};
1329
+ if (watch !== void 0) {
1330
+ queryParameters["watch"] = watch.toString();
1331
+ }
1328
1332
  const request = {
1329
1333
  method: "POST",
1330
1334
  path: requestPath,