You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/algoliasearch/builds/browser.ts
+184-2Lines changed: 184 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
3
-
import type { ClientOptions, RequestOptions } from '@algolia/client-common';
3
+
import type { ApiError, ClientOptions, RequestOptions } from '@algolia/client-common';
4
+
import { createIterablePromise } from '@algolia/client-common';
4
5
5
6
import type { AbtestingClient } from '@algolia/client-abtesting';
6
7
import { abtestingClient } from '@algolia/client-abtesting';
@@ -21,7 +22,13 @@ import { monitoringClient } from '@algolia/monitoring';
21
22
import type { RecommendClient } from '@algolia/recommend';
22
23
import { recommendClient } from '@algolia/recommend';
23
24
24
-
import type { PartialUpdateObjectsOptions, SaveObjectsOptions } from '@algolia/client-search';
25
+
import type {
26
+
ChunkedBatchOptions,
27
+
PartialUpdateObjectsOptions,
28
+
ReplaceAllObjectsOptions,
29
+
ReplaceAllObjectsWithTransformationResponse,
30
+
SaveObjectsOptions,
31
+
} from '@algolia/client-search';
25
32
import type { PushTaskRecords, WatchResponse } from '@algolia/ingestion';
* Helper: Similar to the `replaceAllObjects` method but requires a Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) to be created first, in order to transform records before indexing them to Algolia. The `region` must have been passed to the client instantiation method.
94
+
*
95
+
* @summary Helper: Replaces all objects (records) in the given `index_name` by leveraging the Transformation pipeline setup in the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) with the given `objects`. A temporary index is created during this process in order to backup your data.
96
+
* @param replaceAllObjects - The `replaceAllObjects` object.
97
+
* @param replaceAllObjects.indexName - The `indexName` to replace `objects` in.
98
+
* @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
99
+
* @param replaceAllObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `objects.length / batchSize`. Defaults to 1000.
100
+
* @param replaceAllObjects.scopes - The `scopes` to keep from the index. Defaults to ['settings', 'rules', 'synonyms'].
101
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push`, `operationIndex` and `getEvent` method and merged with the transporter requestOptions.
* Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `push` requests by leveraging the Transformation pipeline setup in the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/).
110
+
*
111
+
* @summary Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests.
112
+
* @param chunkedPush - The `chunkedPush` object.
113
+
* @param chunkedPush.indexName - The `indexName` to replace `objects` in.
114
+
* @param chunkedPush.objects - The array of `objects` to store in the given Algolia `indexName`.
115
+
* @param chunkedPush.action - The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`.
116
+
* @param chunkedPush.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.
117
+
* @param chunkedPush.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
118
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getEvent` method and merged with the transporter requestOptions.
0 commit comments