@algolia/ingestion 1.27.0 → 1.28.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 +233 -226
- package/dist/builds/browser.js +6 -20
- 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 -20
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +6 -20
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +6 -20
- package/dist/builds/node.js.map +1 -1
- package/dist/builds/worker.js +6 -20
- package/dist/builds/worker.js.map +1 -1
- package/dist/fetch.d.ts +233 -226
- package/dist/node.d.cts +233 -226
- package/dist/node.d.ts +233 -226
- package/dist/src/ingestionClient.cjs +6 -20
- package/dist/src/ingestionClient.cjs.map +1 -1
- package/dist/src/ingestionClient.js +11 -25
- package/dist/src/ingestionClient.js.map +1 -1
- package/dist/worker.d.ts +233 -226
- package/package.json +7 -7
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.28.0";
|
|
13
13
|
var REGIONS = ["eu", "us"];
|
|
14
14
|
function getDefaultHosts(region) {
|
|
15
15
|
const url = "data.{region}.algolia.com".replace("{region}", region);
|
|
@@ -274,12 +274,6 @@ function createIngestionClient({
|
|
|
274
274
|
if (!transformationCreate.name) {
|
|
275
275
|
throw new Error("Parameter `transformationCreate.name` is required when calling `createTransformation`.");
|
|
276
276
|
}
|
|
277
|
-
if (!transformationCreate.type) {
|
|
278
|
-
throw new Error("Parameter `transformationCreate.type` is required when calling `createTransformation`.");
|
|
279
|
-
}
|
|
280
|
-
if (!transformationCreate.input) {
|
|
281
|
-
throw new Error("Parameter `transformationCreate.input` is required when calling `createTransformation`.");
|
|
282
|
-
}
|
|
283
277
|
const requestPath = "/1/transformations";
|
|
284
278
|
const headers = {};
|
|
285
279
|
const queryParameters = {};
|
|
@@ -1312,9 +1306,10 @@ function createIngestionClient({
|
|
|
1312
1306
|
* @param push.indexName - Name of the index on which to perform the operation.
|
|
1313
1307
|
* @param push.pushTaskPayload - The pushTaskPayload object.
|
|
1314
1308
|
* @param push.watch - When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
|
|
1309
|
+
* @param push.referenceIndexName - This is required when targeting an index that does not have a push connector setup (e.g. a tmp index), but you wish to attach another index\'s transformation to it (e.g. the source index name).
|
|
1315
1310
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1316
1311
|
*/
|
|
1317
|
-
push({ indexName, pushTaskPayload, watch }, requestOptions) {
|
|
1312
|
+
push({ indexName, pushTaskPayload, watch, referenceIndexName }, requestOptions) {
|
|
1318
1313
|
if (!indexName) {
|
|
1319
1314
|
throw new Error("Parameter `indexName` is required when calling `push`.");
|
|
1320
1315
|
}
|
|
@@ -1333,6 +1328,9 @@ function createIngestionClient({
|
|
|
1333
1328
|
if (watch !== void 0) {
|
|
1334
1329
|
queryParameters["watch"] = watch.toString();
|
|
1335
1330
|
}
|
|
1331
|
+
if (referenceIndexName !== void 0) {
|
|
1332
|
+
queryParameters["referenceIndexName"] = referenceIndexName.toString();
|
|
1333
|
+
}
|
|
1336
1334
|
const request = {
|
|
1337
1335
|
method: "POST",
|
|
1338
1336
|
path: requestPath,
|
|
@@ -1709,9 +1707,6 @@ function createIngestionClient({
|
|
|
1709
1707
|
if (!transformationTry) {
|
|
1710
1708
|
throw new Error("Parameter `transformationTry` is required when calling `tryTransformation`.");
|
|
1711
1709
|
}
|
|
1712
|
-
if (!transformationTry.code) {
|
|
1713
|
-
throw new Error("Parameter `transformationTry.code` is required when calling `tryTransformation`.");
|
|
1714
|
-
}
|
|
1715
1710
|
if (!transformationTry.sampleRecord) {
|
|
1716
1711
|
throw new Error("Parameter `transformationTry.sampleRecord` is required when calling `tryTransformation`.");
|
|
1717
1712
|
}
|
|
@@ -1746,9 +1741,6 @@ function createIngestionClient({
|
|
|
1746
1741
|
if (!transformationTry) {
|
|
1747
1742
|
throw new Error("Parameter `transformationTry` is required when calling `tryTransformationBeforeUpdate`.");
|
|
1748
1743
|
}
|
|
1749
|
-
if (!transformationTry.code) {
|
|
1750
|
-
throw new Error("Parameter `transformationTry.code` is required when calling `tryTransformationBeforeUpdate`.");
|
|
1751
|
-
}
|
|
1752
1744
|
if (!transformationTry.sampleRecord) {
|
|
1753
1745
|
throw new Error(
|
|
1754
1746
|
"Parameter `transformationTry.sampleRecord` is required when calling `tryTransformationBeforeUpdate`."
|
|
@@ -1939,12 +1931,6 @@ function createIngestionClient({
|
|
|
1939
1931
|
if (!transformationCreate.name) {
|
|
1940
1932
|
throw new Error("Parameter `transformationCreate.name` is required when calling `updateTransformation`.");
|
|
1941
1933
|
}
|
|
1942
|
-
if (!transformationCreate.type) {
|
|
1943
|
-
throw new Error("Parameter `transformationCreate.type` is required when calling `updateTransformation`.");
|
|
1944
|
-
}
|
|
1945
|
-
if (!transformationCreate.input) {
|
|
1946
|
-
throw new Error("Parameter `transformationCreate.input` is required when calling `updateTransformation`.");
|
|
1947
|
-
}
|
|
1948
1934
|
const requestPath = "/1/transformations/{transformationID}".replace(
|
|
1949
1935
|
"{transformationID}",
|
|
1950
1936
|
encodeURIComponent(transformationID)
|