@algolia/ingestion 1.37.0 → 1.38.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 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.37.0
44
+ yarn add @algolia/ingestion@1.38.0
45
45
  # or
46
- npm install @algolia/ingestion@1.37.0
46
+ npm install @algolia/ingestion@1.38.0
47
47
  # or
48
- pnpm add @algolia/ingestion@1.37.0
48
+ pnpm add @algolia/ingestion@1.38.0
49
49
  ```
50
50
 
51
51
  ### Without a package manager
@@ -53,7 +53,7 @@ pnpm add @algolia/ingestion@1.37.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.37.0/dist/builds/browser.umd.js"></script>
56
+ <script src="https://cdn.jsdelivr.net/npm/@algolia/ingestion@1.38.0/dist/builds/browser.umd.js"></script>
57
57
  ```
58
58
 
59
59
  ### Usage
package/dist/browser.d.ts CHANGED
@@ -2255,6 +2255,10 @@ type ListTransformationsProps = {
2255
2255
  * Sort order of the response, ascending or descending.
2256
2256
  */
2257
2257
  order?: OrderKeys | undefined;
2258
+ /**
2259
+ * Whether to filter the list of transformations by the type of transformation.
2260
+ */
2261
+ type?: TransformationType | undefined;
2258
2262
  };
2259
2263
  /**
2260
2264
  * Properties for the `push` method.
@@ -2453,7 +2457,7 @@ type ChunkedPushOptions = {
2453
2457
  objects: Array<Record<string, unknown>>;
2454
2458
  };
2455
2459
 
2456
- declare const apiClientVersion = "1.37.0";
2460
+ declare const apiClientVersion = "1.38.0";
2457
2461
  declare const REGIONS: readonly ["eu", "us"];
2458
2462
  type Region = (typeof REGIONS)[number];
2459
2463
  type RegionOptions = {
@@ -2973,9 +2977,10 @@ declare function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOptio
2973
2977
  * @param listTransformations.page - Page number of the paginated API response.
2974
2978
  * @param listTransformations.sort - Property by which to sort the list of transformations.
2975
2979
  * @param listTransformations.order - Sort order of the response, ascending or descending.
2980
+ * @param listTransformations.type - Whether to filter the list of transformations by the type of transformation.
2976
2981
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2977
2982
  */
2978
- listTransformations({ itemsPerPage, page, sort, order }?: ListTransformationsProps, requestOptions?: RequestOptions | undefined): Promise<ListTransformationsResponse>;
2983
+ listTransformations({ itemsPerPage, page, sort, order, type }?: ListTransformationsProps, requestOptions?: RequestOptions | undefined): Promise<ListTransformationsResponse>;
2979
2984
  /**
2980
2985
  * Pushes records through the Pipeline, directly to an index. You can make the call synchronous by providing the `watch` parameter, for asynchronous calls, you can use the observability endpoints and/or debugger dashboard to see the status of your task. If you want to leverage the [pre-indexing data transformation](https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/how-to/transform-your-data/), this is the recommended way of ingesting your records. This method is similar to `pushTask`, but requires an `indexName` instead of a `taskID`. If zero or many tasks are found, an error will be returned.
2981
2986
  *
@@ -2992,7 +2997,7 @@ declare function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOptio
2992
2997
  */
2993
2998
  push({ indexName, pushTaskPayload, watch, referenceIndexName }: PushProps, requestOptions?: RequestOptions): Promise<WatchResponse>;
2994
2999
  /**
2995
- * Pushes records through the Pipeline, directly to an index. You can make the call synchronous by providing the `watch` parameter, for asynchronous calls, you can use the observability endpoints and/or debugger dashboard to see the status of your task. If you want to leverage the [pre-indexing data transformation](https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/how-to/transform-your-data/), this is the recommended way of ingesting your records. This method is similar to `push`, but requires a `taskID` instead of a `indexName`, which is useful when many `destinations` target the same `indexName`.
3000
+ * Pushes records through the pipeline, directly to an index. You can make the call synchronous by providing the `watch` parameter, for asynchronous calls, you can use the observability endpoints or the debugger dashboard to see the status of your task. If you want to transform your data before indexing, this is the recommended way of ingesting your records. This method is similar to `push`, but requires a `taskID` instead of a `indexName`, which is useful when many `destinations` target the same `indexName`.
2996
3001
  *
2997
3002
  * Required API Key ACLs:
2998
3003
  * - addObject
@@ -9,7 +9,7 @@ import {
9
9
 
10
10
  // src/ingestionClient.ts
11
11
  import { createAuth, createIterablePromise, createTransporter, getAlgoliaAgent } from "@algolia/client-common";
12
- var apiClientVersion = "1.37.0";
12
+ var apiClientVersion = "1.38.0";
13
13
  var REGIONS = ["eu", "us"];
14
14
  function getDefaultHosts(region) {
15
15
  const url = "data.{region}.algolia.com".replace("{region}", region);
@@ -1335,9 +1335,10 @@ function createIngestionClient({
1335
1335
  * @param listTransformations.page - Page number of the paginated API response.
1336
1336
  * @param listTransformations.sort - Property by which to sort the list of transformations.
1337
1337
  * @param listTransformations.order - Sort order of the response, ascending or descending.
1338
+ * @param listTransformations.type - Whether to filter the list of transformations by the type of transformation.
1338
1339
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1339
1340
  */
1340
- listTransformations({ itemsPerPage, page, sort, order } = {}, requestOptions = void 0) {
1341
+ listTransformations({ itemsPerPage, page, sort, order, type } = {}, requestOptions = void 0) {
1341
1342
  const requestPath = "/1/transformations";
1342
1343
  const headers = {};
1343
1344
  const queryParameters = {};
@@ -1353,6 +1354,9 @@ function createIngestionClient({
1353
1354
  if (order !== void 0) {
1354
1355
  queryParameters["order"] = order.toString();
1355
1356
  }
1357
+ if (type !== void 0) {
1358
+ queryParameters["type"] = type.toString();
1359
+ }
1356
1360
  const request = {
1357
1361
  method: "GET",
1358
1362
  path: requestPath,
@@ -1415,7 +1419,7 @@ function createIngestionClient({
1415
1419
  return transporter.request(request, requestOptions);
1416
1420
  },
1417
1421
  /**
1418
- * Pushes records through the Pipeline, directly to an index. You can make the call synchronous by providing the `watch` parameter, for asynchronous calls, you can use the observability endpoints and/or debugger dashboard to see the status of your task. If you want to leverage the [pre-indexing data transformation](https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/how-to/transform-your-data/), this is the recommended way of ingesting your records. This method is similar to `push`, but requires a `taskID` instead of a `indexName`, which is useful when many `destinations` target the same `indexName`.
1422
+ * Pushes records through the pipeline, directly to an index. You can make the call synchronous by providing the `watch` parameter, for asynchronous calls, you can use the observability endpoints or the debugger dashboard to see the status of your task. If you want to transform your data before indexing, this is the recommended way of ingesting your records. This method is similar to `push`, but requires a `taskID` instead of a `indexName`, which is useful when many `destinations` target the same `indexName`.
1419
1423
  *
1420
1424
  * Required API Key ACLs:
1421
1425
  * - addObject