@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
package/dist/builds/node.js
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
// builds/node.ts
|
|
2
2
|
import { createHttpRequester } from "@algolia/requester-node-http";
|
|
3
|
-
import {
|
|
4
|
-
createMemoryCache,
|
|
5
|
-
createNullCache,
|
|
6
|
-
createNullLogger,
|
|
7
|
-
DEFAULT_CONNECT_TIMEOUT_NODE,
|
|
8
|
-
DEFAULT_READ_TIMEOUT_NODE,
|
|
9
|
-
DEFAULT_WRITE_TIMEOUT_NODE
|
|
10
|
-
} from "@algolia/client-common";
|
|
3
|
+
import { createMemoryCache, createNullCache, createNullLogger } from "@algolia/client-common";
|
|
11
4
|
|
|
12
5
|
// src/ingestionClient.ts
|
|
13
6
|
import { createAuth, createTransporter, getAlgoliaAgent } from "@algolia/client-common";
|
|
14
|
-
var apiClientVersion = "1.
|
|
7
|
+
var apiClientVersion = "1.17.0";
|
|
15
8
|
var REGIONS = ["eu", "us"];
|
|
16
9
|
function getDefaultHosts(region) {
|
|
17
10
|
const url = "data.{region}.algolia.com".replace("{region}", region);
|
|
@@ -1123,13 +1116,25 @@ function createIngestionClient({
|
|
|
1123
1116
|
* @param listTasks.action - Actions for filtering the list of tasks.
|
|
1124
1117
|
* @param listTasks.enabled - Whether to filter the list of tasks by the `enabled` status.
|
|
1125
1118
|
* @param listTasks.sourceID - Source IDs for filtering the list of tasks.
|
|
1119
|
+
* @param listTasks.sourceType - Filters the tasks with the specified source type.
|
|
1126
1120
|
* @param listTasks.destinationID - Destination IDs for filtering the list of tasks.
|
|
1127
1121
|
* @param listTasks.triggerType - Type of task trigger for filtering the list of tasks.
|
|
1128
1122
|
* @param listTasks.sort - Property by which to sort the list of tasks.
|
|
1129
1123
|
* @param listTasks.order - Sort order of the response, ascending or descending.
|
|
1130
1124
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1131
1125
|
*/
|
|
1132
|
-
listTasks({
|
|
1126
|
+
listTasks({
|
|
1127
|
+
itemsPerPage,
|
|
1128
|
+
page,
|
|
1129
|
+
action,
|
|
1130
|
+
enabled,
|
|
1131
|
+
sourceID,
|
|
1132
|
+
sourceType,
|
|
1133
|
+
destinationID,
|
|
1134
|
+
triggerType,
|
|
1135
|
+
sort,
|
|
1136
|
+
order
|
|
1137
|
+
} = {}, requestOptions = void 0) {
|
|
1133
1138
|
const requestPath = "/2/tasks";
|
|
1134
1139
|
const headers = {};
|
|
1135
1140
|
const queryParameters = {};
|
|
@@ -1148,6 +1153,9 @@ function createIngestionClient({
|
|
|
1148
1153
|
if (sourceID !== void 0) {
|
|
1149
1154
|
queryParameters["sourceID"] = sourceID.toString();
|
|
1150
1155
|
}
|
|
1156
|
+
if (sourceType !== void 0) {
|
|
1157
|
+
queryParameters["sourceType"] = sourceType.toString();
|
|
1158
|
+
}
|
|
1151
1159
|
if (destinationID !== void 0) {
|
|
1152
1160
|
queryParameters["destinationID"] = destinationID.toString();
|
|
1153
1161
|
}
|
|
@@ -1274,9 +1282,10 @@ function createIngestionClient({
|
|
|
1274
1282
|
* @param pushTask - The pushTask object.
|
|
1275
1283
|
* @param pushTask.taskID - Unique identifier of a task.
|
|
1276
1284
|
* @param pushTask.pushTaskPayload - Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.
|
|
1285
|
+
* @param pushTask.watch - When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
|
|
1277
1286
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1278
1287
|
*/
|
|
1279
|
-
pushTask({ taskID, pushTaskPayload }, requestOptions) {
|
|
1288
|
+
pushTask({ taskID, pushTaskPayload, watch }, requestOptions) {
|
|
1280
1289
|
if (!taskID) {
|
|
1281
1290
|
throw new Error("Parameter `taskID` is required when calling `pushTask`.");
|
|
1282
1291
|
}
|
|
@@ -1292,6 +1301,9 @@ function createIngestionClient({
|
|
|
1292
1301
|
const requestPath = "/2/tasks/{taskID}/push".replace("{taskID}", encodeURIComponent(taskID));
|
|
1293
1302
|
const headers = {};
|
|
1294
1303
|
const queryParameters = {};
|
|
1304
|
+
if (watch !== void 0) {
|
|
1305
|
+
queryParameters["watch"] = watch.toString();
|
|
1306
|
+
}
|
|
1295
1307
|
const request = {
|
|
1296
1308
|
method: "POST",
|
|
1297
1309
|
path: requestPath,
|
|
@@ -1919,9 +1931,9 @@ function ingestionClient(appId, apiKey, region, options) {
|
|
|
1919
1931
|
apiKey,
|
|
1920
1932
|
region,
|
|
1921
1933
|
timeouts: {
|
|
1922
|
-
connect:
|
|
1923
|
-
read:
|
|
1924
|
-
write:
|
|
1934
|
+
connect: 25e3,
|
|
1935
|
+
read: 25e3,
|
|
1936
|
+
write: 25e3
|
|
1925
1937
|
},
|
|
1926
1938
|
logger: createNullLogger(),
|
|
1927
1939
|
requester: createHttpRequester(),
|