@algolia/ingestion 1.16.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 +7 -2
- package/dist/builds/browser.js +6 -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 +1 -1
- package/dist/builds/fetch.js +6 -2
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +6 -2
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +6 -2
- package/dist/builds/node.js.map +1 -1
- package/dist/fetch.d.ts +7 -2
- package/dist/node.d.cts +7 -2
- package/dist/node.d.ts +7 -2
- package/dist/src/ingestionClient.cjs +6 -2
- package/dist/src/ingestionClient.cjs.map +1 -1
- package/dist/src/ingestionClient.js +6 -2
- package/dist/src/ingestionClient.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -41,11 +41,11 @@ All of our clients comes with type definition, and are available for both browse
|
|
|
41
41
|
### With a package manager
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
|
-
yarn add @algolia/ingestion@1.
|
|
44
|
+
yarn add @algolia/ingestion@1.17.0
|
|
45
45
|
# or
|
|
46
|
-
npm install @algolia/ingestion@1.
|
|
46
|
+
npm install @algolia/ingestion@1.17.0
|
|
47
47
|
# or
|
|
48
|
-
pnpm add @algolia/ingestion@1.
|
|
48
|
+
pnpm add @algolia/ingestion@1.17.0
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
### Without a package manager
|
|
@@ -53,7 +53,7 @@ pnpm add @algolia/ingestion@1.16.0
|
|
|
53
53
|
Add the following JavaScript snippet to the <head> of your website:
|
|
54
54
|
|
|
55
55
|
```html
|
|
56
|
-
<script src="https://cdn.jsdelivr.net/npm/@algolia/ingestion@1.
|
|
56
|
+
<script src="https://cdn.jsdelivr.net/npm/@algolia/ingestion@1.17.0/dist/builds/browser.umd.js"></script>
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
### Usage
|
package/dist/browser.d.ts
CHANGED
|
@@ -2141,6 +2141,10 @@ type PushTaskProps = {
|
|
|
2141
2141
|
* Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.
|
|
2142
2142
|
*/
|
|
2143
2143
|
pushTaskPayload: PushTaskPayload;
|
|
2144
|
+
/**
|
|
2145
|
+
* When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
|
|
2146
|
+
*/
|
|
2147
|
+
watch?: boolean;
|
|
2144
2148
|
};
|
|
2145
2149
|
/**
|
|
2146
2150
|
* Properties for the `runSource` method.
|
|
@@ -2263,7 +2267,7 @@ type ValidateSourceBeforeUpdateProps = {
|
|
|
2263
2267
|
sourceUpdate: SourceUpdate;
|
|
2264
2268
|
};
|
|
2265
2269
|
|
|
2266
|
-
declare const apiClientVersion = "1.
|
|
2270
|
+
declare const apiClientVersion = "1.17.0";
|
|
2267
2271
|
declare const REGIONS: readonly ["eu", "us"];
|
|
2268
2272
|
type Region = (typeof REGIONS)[number];
|
|
2269
2273
|
type RegionOptions = {
|
|
@@ -2765,9 +2769,10 @@ declare function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
2765
2769
|
* @param pushTask - The pushTask object.
|
|
2766
2770
|
* @param pushTask.taskID - Unique identifier of a task.
|
|
2767
2771
|
* @param pushTask.pushTaskPayload - Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.
|
|
2772
|
+
* @param pushTask.watch - When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
|
|
2768
2773
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2769
2774
|
*/
|
|
2770
|
-
pushTask({ taskID, pushTaskPayload }: PushTaskProps, requestOptions?: RequestOptions): Promise<RunResponse>;
|
|
2775
|
+
pushTask({ taskID, pushTaskPayload, watch }: PushTaskProps, requestOptions?: RequestOptions): Promise<RunResponse>;
|
|
2771
2776
|
/**
|
|
2772
2777
|
* Runs all tasks linked to a source, only available for Shopify sources. It will create 1 run per task.
|
|
2773
2778
|
*
|
package/dist/builds/browser.js
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
|
|
10
10
|
// src/ingestionClient.ts
|
|
11
11
|
import { createAuth, createTransporter, getAlgoliaAgent } from "@algolia/client-common";
|
|
12
|
-
var apiClientVersion = "1.
|
|
12
|
+
var apiClientVersion = "1.17.0";
|
|
13
13
|
var REGIONS = ["eu", "us"];
|
|
14
14
|
function getDefaultHosts(region) {
|
|
15
15
|
const url = "data.{region}.algolia.com".replace("{region}", region);
|
|
@@ -1287,9 +1287,10 @@ function createIngestionClient({
|
|
|
1287
1287
|
* @param pushTask - The pushTask object.
|
|
1288
1288
|
* @param pushTask.taskID - Unique identifier of a task.
|
|
1289
1289
|
* @param pushTask.pushTaskPayload - Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.
|
|
1290
|
+
* @param pushTask.watch - When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
|
|
1290
1291
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1291
1292
|
*/
|
|
1292
|
-
pushTask({ taskID, pushTaskPayload }, requestOptions) {
|
|
1293
|
+
pushTask({ taskID, pushTaskPayload, watch }, requestOptions) {
|
|
1293
1294
|
if (!taskID) {
|
|
1294
1295
|
throw new Error("Parameter `taskID` is required when calling `pushTask`.");
|
|
1295
1296
|
}
|
|
@@ -1305,6 +1306,9 @@ function createIngestionClient({
|
|
|
1305
1306
|
const requestPath = "/2/tasks/{taskID}/push".replace("{taskID}", encodeURIComponent(taskID));
|
|
1306
1307
|
const headers = {};
|
|
1307
1308
|
const queryParameters = {};
|
|
1309
|
+
if (watch !== void 0) {
|
|
1310
|
+
queryParameters["watch"] = watch.toString();
|
|
1311
|
+
}
|
|
1308
1312
|
const request = {
|
|
1309
1313
|
method: "POST",
|
|
1310
1314
|
path: requestPath,
|