@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/README.md +4 -4
- package/dist/browser.d.ts +7 -2
- 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 +7 -2
- package/dist/node.d.cts +7 -2
- package/dist/node.d.ts +7 -2
- 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.cjs
CHANGED
|
@@ -32,7 +32,7 @@ var import_client_common2 = require("@algolia/client-common");
|
|
|
32
32
|
|
|
33
33
|
// src/ingestionClient.ts
|
|
34
34
|
var import_client_common = require("@algolia/client-common");
|
|
35
|
-
var apiClientVersion = "1.
|
|
35
|
+
var apiClientVersion = "1.17.0";
|
|
36
36
|
var REGIONS = ["eu", "us"];
|
|
37
37
|
function getDefaultHosts(region) {
|
|
38
38
|
const url = "data.{region}.algolia.com".replace("{region}", region);
|
|
@@ -1310,9 +1310,10 @@ function createIngestionClient({
|
|
|
1310
1310
|
* @param pushTask - The pushTask object.
|
|
1311
1311
|
* @param pushTask.taskID - Unique identifier of a task.
|
|
1312
1312
|
* @param pushTask.pushTaskPayload - Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.
|
|
1313
|
+
* @param pushTask.watch - When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
|
|
1313
1314
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1314
1315
|
*/
|
|
1315
|
-
pushTask({ taskID, pushTaskPayload }, requestOptions) {
|
|
1316
|
+
pushTask({ taskID, pushTaskPayload, watch }, requestOptions) {
|
|
1316
1317
|
if (!taskID) {
|
|
1317
1318
|
throw new Error("Parameter `taskID` is required when calling `pushTask`.");
|
|
1318
1319
|
}
|
|
@@ -1328,6 +1329,9 @@ function createIngestionClient({
|
|
|
1328
1329
|
const requestPath = "/2/tasks/{taskID}/push".replace("{taskID}", encodeURIComponent(taskID));
|
|
1329
1330
|
const headers = {};
|
|
1330
1331
|
const queryParameters = {};
|
|
1332
|
+
if (watch !== void 0) {
|
|
1333
|
+
queryParameters["watch"] = watch.toString();
|
|
1334
|
+
}
|
|
1331
1335
|
const request = {
|
|
1332
1336
|
method: "POST",
|
|
1333
1337
|
path: requestPath,
|