@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/ingestionClient.ts
|
|
2
2
|
import { createAuth, createTransporter, getAlgoliaAgent } from "@algolia/client-common";
|
|
3
|
-
var apiClientVersion = "1.
|
|
3
|
+
var apiClientVersion = "1.17.0";
|
|
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,
|