@algolia/ingestion 1.35.0 → 1.37.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 +54 -5
- package/dist/builds/browser.js +34 -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 +2 -2
- package/dist/builds/fetch.js +34 -2
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +34 -2
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +34 -2
- package/dist/builds/node.js.map +1 -1
- package/dist/builds/worker.js +34 -2
- package/dist/builds/worker.js.map +1 -1
- package/dist/fetch.d.ts +54 -5
- package/dist/node.d.cts +54 -5
- package/dist/node.d.ts +54 -5
- package/dist/src/ingestionClient.cjs +34 -2
- package/dist/src/ingestionClient.cjs.map +1 -1
- package/dist/src/ingestionClient.js +34 -2
- package/dist/src/ingestionClient.js.map +1 -1
- package/dist/worker.d.ts +54 -5
- package/package.json +7 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/ingestionClient.ts
|
|
2
2
|
import { createAuth, createIterablePromise, createTransporter, getAlgoliaAgent } from "@algolia/client-common";
|
|
3
|
-
var apiClientVersion = "1.
|
|
3
|
+
var apiClientVersion = "1.37.0";
|
|
4
4
|
var REGIONS = ["eu", "us"];
|
|
5
5
|
function getDefaultHosts(region) {
|
|
6
6
|
const url = "data.{region}.algolia.com".replace("{region}", region);
|
|
@@ -1454,6 +1454,38 @@ function createIngestionClient({
|
|
|
1454
1454
|
};
|
|
1455
1455
|
return transporter.request(request, requestOptions);
|
|
1456
1456
|
},
|
|
1457
|
+
/**
|
|
1458
|
+
* Fully updates a task by its ID, use partialUpdateTask if you only want to update a subset of fields.
|
|
1459
|
+
* @param replaceTask - The replaceTask object.
|
|
1460
|
+
* @param replaceTask.taskID - Unique identifier of a task.
|
|
1461
|
+
* @param replaceTask.taskReplace - The taskReplace object.
|
|
1462
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1463
|
+
*/
|
|
1464
|
+
replaceTask({ taskID, taskReplace }, requestOptions) {
|
|
1465
|
+
if (!taskID) {
|
|
1466
|
+
throw new Error("Parameter `taskID` is required when calling `replaceTask`.");
|
|
1467
|
+
}
|
|
1468
|
+
if (!taskReplace) {
|
|
1469
|
+
throw new Error("Parameter `taskReplace` is required when calling `replaceTask`.");
|
|
1470
|
+
}
|
|
1471
|
+
if (!taskReplace.destinationID) {
|
|
1472
|
+
throw new Error("Parameter `taskReplace.destinationID` is required when calling `replaceTask`.");
|
|
1473
|
+
}
|
|
1474
|
+
if (!taskReplace.action) {
|
|
1475
|
+
throw new Error("Parameter `taskReplace.action` is required when calling `replaceTask`.");
|
|
1476
|
+
}
|
|
1477
|
+
const requestPath = "/2/tasks/{taskID}".replace("{taskID}", encodeURIComponent(taskID));
|
|
1478
|
+
const headers = {};
|
|
1479
|
+
const queryParameters = {};
|
|
1480
|
+
const request = {
|
|
1481
|
+
method: "PUT",
|
|
1482
|
+
path: requestPath,
|
|
1483
|
+
queryParameters,
|
|
1484
|
+
headers,
|
|
1485
|
+
data: taskReplace
|
|
1486
|
+
};
|
|
1487
|
+
return transporter.request(request, requestOptions);
|
|
1488
|
+
},
|
|
1457
1489
|
/**
|
|
1458
1490
|
* Runs all tasks linked to a source, only available for Shopify, BigCommerce and commercetools sources. Creates one run per task.
|
|
1459
1491
|
*
|
|
@@ -1922,7 +1954,7 @@ function createIngestionClient({
|
|
|
1922
1954
|
return transporter.request(request, requestOptions);
|
|
1923
1955
|
},
|
|
1924
1956
|
/**
|
|
1925
|
-
*
|
|
1957
|
+
* Partially updates a task by its ID.
|
|
1926
1958
|
* @param updateTask - The updateTask object.
|
|
1927
1959
|
* @param updateTask.taskID - Unique identifier of a task.
|
|
1928
1960
|
* @param updateTask.taskUpdate - The taskUpdate object.
|