@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
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, createIterablePromise, createTransporter, getAlgoliaAgent } from "@algolia/client-common";
|
|
7
|
-
var apiClientVersion = "1.
|
|
7
|
+
var apiClientVersion = "1.37.0";
|
|
8
8
|
var REGIONS = ["eu", "us"];
|
|
9
9
|
function getDefaultHosts(region) {
|
|
10
10
|
const url = "data.{region}.algolia.com".replace("{region}", region);
|
|
@@ -1458,6 +1458,38 @@ function createIngestionClient({
|
|
|
1458
1458
|
};
|
|
1459
1459
|
return transporter.request(request, requestOptions);
|
|
1460
1460
|
},
|
|
1461
|
+
/**
|
|
1462
|
+
* Fully updates a task by its ID, use partialUpdateTask if you only want to update a subset of fields.
|
|
1463
|
+
* @param replaceTask - The replaceTask object.
|
|
1464
|
+
* @param replaceTask.taskID - Unique identifier of a task.
|
|
1465
|
+
* @param replaceTask.taskReplace - The taskReplace object.
|
|
1466
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1467
|
+
*/
|
|
1468
|
+
replaceTask({ taskID, taskReplace }, requestOptions) {
|
|
1469
|
+
if (!taskID) {
|
|
1470
|
+
throw new Error("Parameter `taskID` is required when calling `replaceTask`.");
|
|
1471
|
+
}
|
|
1472
|
+
if (!taskReplace) {
|
|
1473
|
+
throw new Error("Parameter `taskReplace` is required when calling `replaceTask`.");
|
|
1474
|
+
}
|
|
1475
|
+
if (!taskReplace.destinationID) {
|
|
1476
|
+
throw new Error("Parameter `taskReplace.destinationID` is required when calling `replaceTask`.");
|
|
1477
|
+
}
|
|
1478
|
+
if (!taskReplace.action) {
|
|
1479
|
+
throw new Error("Parameter `taskReplace.action` is required when calling `replaceTask`.");
|
|
1480
|
+
}
|
|
1481
|
+
const requestPath = "/2/tasks/{taskID}".replace("{taskID}", encodeURIComponent(taskID));
|
|
1482
|
+
const headers = {};
|
|
1483
|
+
const queryParameters = {};
|
|
1484
|
+
const request = {
|
|
1485
|
+
method: "PUT",
|
|
1486
|
+
path: requestPath,
|
|
1487
|
+
queryParameters,
|
|
1488
|
+
headers,
|
|
1489
|
+
data: taskReplace
|
|
1490
|
+
};
|
|
1491
|
+
return transporter.request(request, requestOptions);
|
|
1492
|
+
},
|
|
1461
1493
|
/**
|
|
1462
1494
|
* Runs all tasks linked to a source, only available for Shopify, BigCommerce and commercetools sources. Creates one run per task.
|
|
1463
1495
|
*
|
|
@@ -1926,7 +1958,7 @@ function createIngestionClient({
|
|
|
1926
1958
|
return transporter.request(request, requestOptions);
|
|
1927
1959
|
},
|
|
1928
1960
|
/**
|
|
1929
|
-
*
|
|
1961
|
+
* Partially updates a task by its ID.
|
|
1930
1962
|
* @param updateTask - The updateTask object.
|
|
1931
1963
|
* @param updateTask.taskID - Unique identifier of a task.
|
|
1932
1964
|
* @param updateTask.taskUpdate - The taskUpdate object.
|