@algolia/ingestion 1.15.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 +14 -4
- package/dist/builds/browser.js +26 -10
- 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 +6 -6
- package/dist/builds/fetch.js +26 -14
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +25 -6
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +26 -14
- package/dist/builds/node.js.map +1 -1
- package/dist/fetch.d.ts +14 -4
- package/dist/node.d.cts +14 -4
- package/dist/node.d.ts +14 -4
- package/dist/src/ingestionClient.cjs +22 -3
- package/dist/src/ingestionClient.cjs.map +1 -1
- package/dist/src/ingestionClient.js +22 -3
- package/dist/src/ingestionClient.js.map +1 -1
- package/package.json +10 -9
|
@@ -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);
|
|
@@ -1112,13 +1112,25 @@ function createIngestionClient({
|
|
|
1112
1112
|
* @param listTasks.action - Actions for filtering the list of tasks.
|
|
1113
1113
|
* @param listTasks.enabled - Whether to filter the list of tasks by the `enabled` status.
|
|
1114
1114
|
* @param listTasks.sourceID - Source IDs for filtering the list of tasks.
|
|
1115
|
+
* @param listTasks.sourceType - Filters the tasks with the specified source type.
|
|
1115
1116
|
* @param listTasks.destinationID - Destination IDs for filtering the list of tasks.
|
|
1116
1117
|
* @param listTasks.triggerType - Type of task trigger for filtering the list of tasks.
|
|
1117
1118
|
* @param listTasks.sort - Property by which to sort the list of tasks.
|
|
1118
1119
|
* @param listTasks.order - Sort order of the response, ascending or descending.
|
|
1119
1120
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1120
1121
|
*/
|
|
1121
|
-
listTasks({
|
|
1122
|
+
listTasks({
|
|
1123
|
+
itemsPerPage,
|
|
1124
|
+
page,
|
|
1125
|
+
action,
|
|
1126
|
+
enabled,
|
|
1127
|
+
sourceID,
|
|
1128
|
+
sourceType,
|
|
1129
|
+
destinationID,
|
|
1130
|
+
triggerType,
|
|
1131
|
+
sort,
|
|
1132
|
+
order
|
|
1133
|
+
} = {}, requestOptions = void 0) {
|
|
1122
1134
|
const requestPath = "/2/tasks";
|
|
1123
1135
|
const headers = {};
|
|
1124
1136
|
const queryParameters = {};
|
|
@@ -1137,6 +1149,9 @@ function createIngestionClient({
|
|
|
1137
1149
|
if (sourceID !== void 0) {
|
|
1138
1150
|
queryParameters["sourceID"] = sourceID.toString();
|
|
1139
1151
|
}
|
|
1152
|
+
if (sourceType !== void 0) {
|
|
1153
|
+
queryParameters["sourceType"] = sourceType.toString();
|
|
1154
|
+
}
|
|
1140
1155
|
if (destinationID !== void 0) {
|
|
1141
1156
|
queryParameters["destinationID"] = destinationID.toString();
|
|
1142
1157
|
}
|
|
@@ -1263,9 +1278,10 @@ function createIngestionClient({
|
|
|
1263
1278
|
* @param pushTask - The pushTask object.
|
|
1264
1279
|
* @param pushTask.taskID - Unique identifier of a task.
|
|
1265
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.
|
|
1266
1282
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1267
1283
|
*/
|
|
1268
|
-
pushTask({ taskID, pushTaskPayload }, requestOptions) {
|
|
1284
|
+
pushTask({ taskID, pushTaskPayload, watch }, requestOptions) {
|
|
1269
1285
|
if (!taskID) {
|
|
1270
1286
|
throw new Error("Parameter `taskID` is required when calling `pushTask`.");
|
|
1271
1287
|
}
|
|
@@ -1281,6 +1297,9 @@ function createIngestionClient({
|
|
|
1281
1297
|
const requestPath = "/2/tasks/{taskID}/push".replace("{taskID}", encodeURIComponent(taskID));
|
|
1282
1298
|
const headers = {};
|
|
1283
1299
|
const queryParameters = {};
|
|
1300
|
+
if (watch !== void 0) {
|
|
1301
|
+
queryParameters["watch"] = watch.toString();
|
|
1302
|
+
}
|
|
1284
1303
|
const request = {
|
|
1285
1304
|
method: "POST",
|
|
1286
1305
|
path: requestPath,
|