@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.
- package/README.md +4 -4
- package/dist/browser.d.ts +30 -25
- package/dist/builds/browser.js +6 -2
- package/dist/builds/browser.js.map +1 -1
- package/dist/builds/browser.min.js +1 -1
- package/dist/builds/browser.min.js.map +1 -1
- package/dist/builds/browser.umd.js +1 -1
- package/dist/builds/fetch.js +6 -2
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +6 -2
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +6 -2
- package/dist/builds/node.js.map +1 -1
- package/dist/fetch.d.ts +30 -25
- package/dist/node.d.cts +30 -25
- package/dist/node.d.ts +30 -25
- package/dist/src/ingestionClient.cjs +6 -2
- package/dist/src/ingestionClient.cjs.map +1 -1
- package/dist/src/ingestionClient.js +6 -2
- package/dist/src/ingestionClient.js.map +1 -1
- package/package.json +5 -5
package/dist/builds/node.js
CHANGED
|
@@ -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.
|
|
7
|
+
var apiClientVersion = "1.17.1";
|
|
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,
|