@algolia/ingestion 1.36.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 +53 -4
- 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 +53 -4
- package/dist/node.d.cts +53 -4
- package/dist/node.d.ts +53 -4
- package/dist/src/ingestionClient.cjs +34 -2
- package/dist/src/ingestionClient.cjs.map +1 -1
- package/dist/src/ingestionClient.js +39 -14
- package/dist/src/ingestionClient.js.map +1 -1
- package/dist/worker.d.ts +53 -4
- package/package.json +5 -5
|
@@ -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);
|
|
@@ -1400,7 +1400,7 @@ function createIngestionClient({
|
|
|
1400
1400
|
connect: 18e4,
|
|
1401
1401
|
read: 18e4,
|
|
1402
1402
|
write: 18e4,
|
|
1403
|
-
...requestOptions
|
|
1403
|
+
...requestOptions == null ? void 0 : requestOptions.timeouts
|
|
1404
1404
|
}
|
|
1405
1405
|
};
|
|
1406
1406
|
return transporter.request(request, requestOptions);
|
|
@@ -1449,11 +1449,43 @@ function createIngestionClient({
|
|
|
1449
1449
|
connect: 18e4,
|
|
1450
1450
|
read: 18e4,
|
|
1451
1451
|
write: 18e4,
|
|
1452
|
-
...requestOptions
|
|
1452
|
+
...requestOptions == null ? void 0 : requestOptions.timeouts
|
|
1453
1453
|
}
|
|
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
|
*
|
|
@@ -1749,7 +1781,7 @@ function createIngestionClient({
|
|
|
1749
1781
|
connect: 18e4,
|
|
1750
1782
|
read: 18e4,
|
|
1751
1783
|
write: 18e4,
|
|
1752
|
-
...requestOptions
|
|
1784
|
+
...requestOptions == null ? void 0 : requestOptions.timeouts
|
|
1753
1785
|
}
|
|
1754
1786
|
};
|
|
1755
1787
|
return transporter.request(request, requestOptions);
|
|
@@ -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.
|
|
@@ -2033,7 +2065,7 @@ function createIngestionClient({
|
|
|
2033
2065
|
connect: 18e4,
|
|
2034
2066
|
read: 18e4,
|
|
2035
2067
|
write: 18e4,
|
|
2036
|
-
...requestOptions
|
|
2068
|
+
...requestOptions == null ? void 0 : requestOptions.timeouts
|
|
2037
2069
|
}
|
|
2038
2070
|
};
|
|
2039
2071
|
return transporter.request(request, requestOptions);
|
|
@@ -2072,7 +2104,7 @@ function createIngestionClient({
|
|
|
2072
2104
|
connect: 18e4,
|
|
2073
2105
|
read: 18e4,
|
|
2074
2106
|
write: 18e4,
|
|
2075
|
-
...requestOptions
|
|
2107
|
+
...requestOptions == null ? void 0 : requestOptions.timeouts
|
|
2076
2108
|
}
|
|
2077
2109
|
};
|
|
2078
2110
|
return transporter.request(request, requestOptions);
|
|
@@ -2087,11 +2119,4 @@ export {
|
|
|
2087
2119
|
isScheduleTrigger,
|
|
2088
2120
|
isSubscriptionTrigger
|
|
2089
2121
|
};
|
|
2090
|
-
//# sourceMappingURL=ingestionClient.js.mapEGIONS,
|
|
2091
|
-
apiClientVersion,
|
|
2092
|
-
createIngestionClient,
|
|
2093
|
-
isOnDemandTrigger,
|
|
2094
|
-
isScheduleTrigger,
|
|
2095
|
-
isSubscriptionTrigger
|
|
2096
|
-
};
|
|
2097
2122
|
//# sourceMappingURL=ingestionClient.js.map
|