@algolia/client-search 5.52.1 → 5.53.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 +88 -14
- package/dist/builds/browser.js +31 -14
- 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 +3 -3
- package/dist/builds/fetch.js +35 -16
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +35 -16
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +35 -16
- package/dist/builds/node.js.map +1 -1
- package/dist/builds/worker.js +31 -14
- package/dist/builds/worker.js.map +1 -1
- package/dist/fetch.d.ts +88 -14
- package/dist/node.d.cts +88 -14
- package/dist/node.d.ts +88 -14
- package/dist/src/searchClient.cjs +31 -14
- package/dist/src/searchClient.cjs.map +1 -1
- package/dist/src/searchClient.js +33 -19
- package/dist/src/searchClient.js.map +1 -1
- package/dist/worker.d.ts +88 -14
- package/package.json +9 -9
package/dist/fetch.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _algolia_client_common from '@algolia/client-common';
|
|
2
|
-
import { CreateIterablePromise, CreateClientOptions, RequestOptions, ClientOptions } from '@algolia/client-common';
|
|
2
|
+
import { ChunkedHelperOptions, CreateIterablePromise, CreateClientOptions, RequestOptions, ClientOptions } from '@algolia/client-common';
|
|
3
3
|
|
|
4
4
|
type AddApiKeyResponse = {
|
|
5
5
|
/**
|
|
@@ -942,6 +942,63 @@ type ListClustersResponse = {
|
|
|
942
942
|
topUsers: Array<string>;
|
|
943
943
|
};
|
|
944
944
|
|
|
945
|
+
/**
|
|
946
|
+
* A/B test target criteria. Only present for v2 and later tests.
|
|
947
|
+
*/
|
|
948
|
+
type FetchedIndexAbTestTarget = {
|
|
949
|
+
/**
|
|
950
|
+
* Index name to match. Use `*` to target the entire application.
|
|
951
|
+
*/
|
|
952
|
+
indexName: string;
|
|
953
|
+
};
|
|
954
|
+
|
|
955
|
+
/**
|
|
956
|
+
* A/B test variant for an index.
|
|
957
|
+
*/
|
|
958
|
+
type FetchedIndexAbTestVariant = {
|
|
959
|
+
/**
|
|
960
|
+
* Index name of the variant. Only present for v0/v1 tests; in v2 this moves into `payload`.
|
|
961
|
+
*/
|
|
962
|
+
indexName?: string | undefined;
|
|
963
|
+
/**
|
|
964
|
+
* Percentage of search traffic routed to this variant.
|
|
965
|
+
*/
|
|
966
|
+
percentage: number;
|
|
967
|
+
/**
|
|
968
|
+
* URL-encoded custom search parameters applied to this variant. Only present for v0/v1 tests; in v2 this moves into `payload`.
|
|
969
|
+
*/
|
|
970
|
+
customSearchParameters?: string | undefined;
|
|
971
|
+
/**
|
|
972
|
+
* Type-specific configuration. Only present for v2 and later tests. Shape depends on the parent A/B test\'s `type`.
|
|
973
|
+
*/
|
|
974
|
+
payload?: {
|
|
975
|
+
[key: string]: any;
|
|
976
|
+
} | undefined;
|
|
977
|
+
};
|
|
978
|
+
|
|
979
|
+
/**
|
|
980
|
+
* A/B test metadata. Only present if the index is part of an active A/B test.
|
|
981
|
+
*/
|
|
982
|
+
type FetchedIndexAbTest = {
|
|
983
|
+
/**
|
|
984
|
+
* A/B test ID.
|
|
985
|
+
*/
|
|
986
|
+
id: number;
|
|
987
|
+
/**
|
|
988
|
+
* A/B test schema version. Only present for v2 and later tests.
|
|
989
|
+
*/
|
|
990
|
+
version?: number | undefined;
|
|
991
|
+
/**
|
|
992
|
+
* A/B test type. Only present for v2 and later tests. Currently always `index-configuration`.
|
|
993
|
+
*/
|
|
994
|
+
type?: string | undefined;
|
|
995
|
+
target?: FetchedIndexAbTestTarget | undefined;
|
|
996
|
+
/**
|
|
997
|
+
* A/B test variants.
|
|
998
|
+
*/
|
|
999
|
+
variants: Array<FetchedIndexAbTestVariant>;
|
|
1000
|
+
};
|
|
1001
|
+
|
|
945
1002
|
type FetchedIndex = {
|
|
946
1003
|
/**
|
|
947
1004
|
* Index name.
|
|
@@ -991,6 +1048,11 @@ type FetchedIndex = {
|
|
|
991
1048
|
* Only present if the index is a [virtual replica](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-an-index-alphabetically/#virtual-replicas).
|
|
992
1049
|
*/
|
|
993
1050
|
virtual?: boolean | undefined;
|
|
1051
|
+
abTest?: FetchedIndexAbTest | undefined;
|
|
1052
|
+
/**
|
|
1053
|
+
* Name of the index that owns the A/B test configuration. Only present when this index participates in an A/B test configured on another index.
|
|
1054
|
+
*/
|
|
1055
|
+
sourceABTest?: string | undefined;
|
|
994
1056
|
};
|
|
995
1057
|
|
|
996
1058
|
type ListIndicesResponse = {
|
|
@@ -1877,7 +1939,14 @@ type SearchPagination = {
|
|
|
1877
1939
|
|
|
1878
1940
|
type SearchResponse<T = Record<string, unknown>> = BaseSearchResponse & SearchPagination & SearchHits<T>;
|
|
1879
1941
|
|
|
1880
|
-
|
|
1942
|
+
/**
|
|
1943
|
+
* Partial search response returned when the `responseFields` parameter excludes fields like `hits`. Contains all possible search response properties but none are required, so it acts as an unconditional fallback during oneOf deserialization.
|
|
1944
|
+
*/
|
|
1945
|
+
type SearchResponsePartial<T = Record<string, unknown>> = BaseSearchResponse & SearchPagination & {
|
|
1946
|
+
[key: string]: any;
|
|
1947
|
+
};
|
|
1948
|
+
|
|
1949
|
+
type SearchResult<T = Record<string, unknown>> = SearchResponse<T> | SearchForFacetValuesResponse | SearchResponsePartial<T>;
|
|
1881
1950
|
|
|
1882
1951
|
type SearchResponses<T = Record<string, unknown>> = {
|
|
1883
1952
|
results: SearchResult<T>[];
|
|
@@ -3109,19 +3178,19 @@ type SearchClientNodeHelpers = {
|
|
|
3109
3178
|
generateSecuredApiKey: (opts: GenerateSecuredApiKeyOptions) => string;
|
|
3110
3179
|
getSecuredApiKeyRemainingValidity: (opts: GetSecuredApiKeyRemainingValidityOptions) => number;
|
|
3111
3180
|
};
|
|
3112
|
-
type DeleteObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'waitForTasks' | 'batchSize'> & {
|
|
3181
|
+
type DeleteObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'waitForTasks' | 'batchSize'> & ChunkedHelperOptions & {
|
|
3113
3182
|
/**
|
|
3114
3183
|
* The objectIDs to delete.
|
|
3115
3184
|
*/
|
|
3116
3185
|
objectIDs: string[];
|
|
3117
3186
|
};
|
|
3118
|
-
type PartialUpdateObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'objects' | 'waitForTasks' | 'batchSize'> & {
|
|
3187
|
+
type PartialUpdateObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'objects' | 'waitForTasks' | 'batchSize'> & ChunkedHelperOptions & {
|
|
3119
3188
|
/**
|
|
3120
3189
|
*To be provided if non-existing objects are passed, otherwise, the call will fail.
|
|
3121
3190
|
*/
|
|
3122
3191
|
createIfNotExists?: boolean | undefined;
|
|
3123
3192
|
};
|
|
3124
|
-
type SaveObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'objects' | 'waitForTasks' | 'batchSize'
|
|
3193
|
+
type SaveObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'objects' | 'waitForTasks' | 'batchSize'> & ChunkedHelperOptions;
|
|
3125
3194
|
type ChunkedBatchOptions = ReplaceAllObjectsOptions & {
|
|
3126
3195
|
/**
|
|
3127
3196
|
* The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`.
|
|
@@ -3132,7 +3201,7 @@ type ChunkedBatchOptions = ReplaceAllObjectsOptions & {
|
|
|
3132
3201
|
*/
|
|
3133
3202
|
waitForTasks?: boolean | undefined;
|
|
3134
3203
|
};
|
|
3135
|
-
type ReplaceAllObjectsOptions = {
|
|
3204
|
+
type ReplaceAllObjectsOptions = ChunkedHelperOptions & {
|
|
3136
3205
|
/**
|
|
3137
3206
|
* The `indexName` to replace `objects` in.
|
|
3138
3207
|
*/
|
|
@@ -3150,7 +3219,7 @@ type ReplaceAllObjectsOptions = {
|
|
|
3150
3219
|
*/
|
|
3151
3220
|
scopes?: Array<ScopeType> | undefined;
|
|
3152
3221
|
};
|
|
3153
|
-
type AccountCopyIndexOptions = {
|
|
3222
|
+
type AccountCopyIndexOptions = ChunkedHelperOptions & {
|
|
3154
3223
|
/**
|
|
3155
3224
|
* The name of the index to copy to the `destinationClient`.
|
|
3156
3225
|
*/
|
|
@@ -3173,7 +3242,7 @@ type AccountCopyIndexOptions = {
|
|
|
3173
3242
|
batchSize?: number | undefined;
|
|
3174
3243
|
};
|
|
3175
3244
|
|
|
3176
|
-
declare const apiClientVersion = "5.
|
|
3245
|
+
declare const apiClientVersion = "5.53.0";
|
|
3177
3246
|
declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
|
|
3178
3247
|
transporter: _algolia_client_common.Transporter;
|
|
3179
3248
|
/**
|
|
@@ -3290,9 +3359,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3290
3359
|
* @param chunkedBatch.action - The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`.
|
|
3291
3360
|
* @param chunkedBatch.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.
|
|
3292
3361
|
* @param chunkedBatch.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
|
|
3362
|
+
* @param chunkedBatch.maxRetries - The maximum number of retries when polling for task completion. 100 by default.
|
|
3293
3363
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
3294
3364
|
*/
|
|
3295
|
-
chunkedBatch({ indexName, objects, action, waitForTasks, batchSize }: ChunkedBatchOptions, requestOptions?: RequestOptions): Promise<Array<BatchResponse>>;
|
|
3365
|
+
chunkedBatch({ indexName, objects, action, waitForTasks, batchSize, maxRetries, }: ChunkedBatchOptions, requestOptions?: RequestOptions): Promise<Array<BatchResponse>>;
|
|
3296
3366
|
/**
|
|
3297
3367
|
* Helper: Saves the given array of objects in the given index. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.
|
|
3298
3368
|
*
|
|
@@ -3302,9 +3372,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3302
3372
|
* @param saveObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
3303
3373
|
* @param saveObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
|
|
3304
3374
|
* @param saveObjects.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.
|
|
3375
|
+
* @param saveObjects.maxRetries - The maximum number of retries when polling for task completion. 100 by default.
|
|
3305
3376
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions.
|
|
3306
3377
|
*/
|
|
3307
|
-
saveObjects({ indexName, objects, waitForTasks, batchSize }: SaveObjectsOptions, requestOptions?: RequestOptions | undefined): Promise<BatchResponse[]>;
|
|
3378
|
+
saveObjects({ indexName, objects, waitForTasks, batchSize, maxRetries }: SaveObjectsOptions, requestOptions?: RequestOptions | undefined): Promise<BatchResponse[]>;
|
|
3308
3379
|
/**
|
|
3309
3380
|
* Helper: Deletes every records for the given objectIDs. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objectIDs in it.
|
|
3310
3381
|
*
|
|
@@ -3314,9 +3385,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3314
3385
|
* @param deleteObjects.objectIDs - The objectIDs to delete.
|
|
3315
3386
|
* @param deleteObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
|
|
3316
3387
|
* @param deleteObjects.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.
|
|
3388
|
+
* @param deleteObjects.maxRetries - The maximum number of retries when polling for task completion. 100 by default.
|
|
3317
3389
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions.
|
|
3318
3390
|
*/
|
|
3319
|
-
deleteObjects({ indexName, objectIDs, waitForTasks, batchSize }: DeleteObjectsOptions, requestOptions?: RequestOptions | undefined): Promise<BatchResponse[]>;
|
|
3391
|
+
deleteObjects({ indexName, objectIDs, waitForTasks, batchSize, maxRetries }: DeleteObjectsOptions, requestOptions?: RequestOptions | undefined): Promise<BatchResponse[]>;
|
|
3320
3392
|
/**
|
|
3321
3393
|
* Helper: Replaces object content of all the given objects according to their respective `objectID` field. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.
|
|
3322
3394
|
*
|
|
@@ -3327,9 +3399,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3327
3399
|
* @param partialUpdateObjects.createIfNotExists - To be provided if non-existing objects are passed, otherwise, the call will fail.
|
|
3328
3400
|
* @param partialUpdateObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
|
|
3329
3401
|
* @param partialUpdateObjects.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.
|
|
3402
|
+
* @param partialUpdateObjects.maxRetries - The maximum number of retries when polling for task completion. 100 by default.
|
|
3330
3403
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
3331
3404
|
*/
|
|
3332
|
-
partialUpdateObjects({ indexName, objects, createIfNotExists, waitForTasks, batchSize }: PartialUpdateObjectsOptions, requestOptions?: RequestOptions | undefined): Promise<BatchResponse[]>;
|
|
3405
|
+
partialUpdateObjects({ indexName, objects, createIfNotExists, waitForTasks, batchSize, maxRetries }: PartialUpdateObjectsOptions, requestOptions?: RequestOptions | undefined): Promise<BatchResponse[]>;
|
|
3333
3406
|
/**
|
|
3334
3407
|
* Helper: Replaces all objects (records) in the given `index_name` with the given `objects`. A temporary index is created during this process in order to backup your data.
|
|
3335
3408
|
* See https://api-clients-automation.netlify.app/docs/custom-helpers/#replaceallobjects for implementation details.
|
|
@@ -3340,9 +3413,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3340
3413
|
* @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
3341
3414
|
* @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.
|
|
3342
3415
|
* @param replaceAllObjects.scopes - The `scopes` to keep from the index. Defaults to ['settings', 'rules', 'synonyms'].
|
|
3416
|
+
* @param replaceAllObjects.maxRetries - The maximum number of retries when polling for task completion. 100 by default.
|
|
3343
3417
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch`, `operationIndex` and `getTask` method and merged with the transporter requestOptions.
|
|
3344
3418
|
*/
|
|
3345
|
-
replaceAllObjects({ indexName, objects, batchSize, scopes }: ReplaceAllObjectsOptions, requestOptions?: RequestOptions | undefined): Promise<ReplaceAllObjectsResponse>;
|
|
3419
|
+
replaceAllObjects({ indexName, objects, batchSize, scopes, maxRetries }: ReplaceAllObjectsOptions, requestOptions?: RequestOptions | undefined): Promise<ReplaceAllObjectsResponse>;
|
|
3346
3420
|
indexExists({ indexName }: GetSettingsProps): Promise<boolean>;
|
|
3347
3421
|
/**
|
|
3348
3422
|
* Helper: calls the `search` method but with certainty that we will only request Algolia records (hits) and not facets.
|
|
@@ -4130,4 +4204,4 @@ type SearchClient = ReturnType<typeof createSearchClient> & SearchClientNodeHelp
|
|
|
4130
4204
|
|
|
4131
4205
|
declare function searchClient(appId: string, apiKey: string, options?: ClientOptions | undefined): SearchClient;
|
|
4132
4206
|
|
|
4133
|
-
export { type AccountCopyIndexOptions, type Acl, type Action, type AddApiKeyResponse, type AddOrUpdateObjectProps, type AdvancedSyntaxFeatures, type AlternativesAsExact, type Anchoring, type ApiKey, type ApiKeyOperation, type AroundPrecision, type AroundRadius, type AroundRadiusAll, type AssignUserIdParams, type AssignUserIdProps, type AttributeToUpdate, type AutoFilteringFilterEntry, type AutoFilteringResult, type AutomaticFacetFilter, type AutomaticFacetFilters, type Banner, type BannerImage, type BannerImageUrl, type BannerLink, type BaseGetApiKeyResponse, type BaseIndexSettings, type BaseSearchParams, type BaseSearchParamsWithoutQuery, type BaseSearchResponse, type BatchAssignUserIdsParams, type BatchAssignUserIdsProps, type BatchDictionaryEntriesParams, type BatchDictionaryEntriesProps, type BatchDictionaryEntriesRequest, type BatchParams, type BatchProps, type BatchRequest, type BatchResponse, type BatchWriteParams, type BooleanString, type BrowseOptions, type BrowsePagination, type BrowseParams, type BrowseParamsObject, type BrowseProps, type BrowseResponse, type BuiltInOperation, type BuiltInOperationType, type BuiltInOperationValue, type CategoryPrediction, type CategoryPredictionBin, type ChunkedBatchOptions, type ClearObjectsProps, type ClearRulesProps, type ClearSynonymsProps, type Condition, type Consequence, type ConsequenceHide, type ConsequenceParams, type ConsequenceQuery, type ConsequenceQueryObject, type ConsequenceRedirect, type CreatedAtResponse, type Cursor, type CustomDeleteProps, type CustomGetProps, type CustomPostProps, type CustomPutProps, type DeleteApiKeyProps, type DeleteApiKeyResponse, type DeleteByParams, type DeleteByProps, type DeleteIndexProps, type DeleteObjectProps, type DeleteObjectsOptions, type DeleteRuleProps, type DeleteSourceProps, type DeleteSourceResponse, type DeleteSynonymProps, type DeletedAtResponse, type DictionaryAction, type DictionaryEntry, type DictionaryEntryState, type DictionaryEntryType, type DictionaryLanguage, type DictionarySettingsParams, type DictionaryType, type Distinct, type Edit, type EditType, type ErrorBase, type Event, type EventStatus, type EventType, type ExactOnSingleWordQuery, type Exhaustive, type FacetFilters, type FacetHits, type FacetOrdering, type FacetStats, type Facets, type FetchedIndex, type GenerateSecuredApiKeyOptions, type GetApiKeyProps, type GetApiKeyResponse, type GetAppTaskProps, type GetDictionarySettingsResponse, type GetLogsProps, type GetLogsResponse, type GetObjectProps, type GetObjectsParams, type GetObjectsRequest, type GetObjectsResponse, type GetRuleProps, type GetSecuredApiKeyRemainingValidityOptions, type GetSettingsProps, type GetSynonymProps, type GetTaskProps, type GetTaskResponse, type GetTopUserIdsResponse, type GetUserIdProps, type HasPendingMappingsProps, type HasPendingMappingsResponse, type HierarchyPathEntry, type HighlightResult, type HighlightResultOption, type Hit, type IgnorePlurals, type IndexSettings, type IndexSettingsAsSearchParams, type InsideBoundingBox, type Languages, type LegacySearchMethodProps, type ListApiKeysResponse, type ListClustersResponse, type ListIndicesProps, type ListIndicesResponse, type ListUserIdsProps, type ListUserIdsResponse, type Log, type LogQuery, type LogType, type MatchLevel, type MatchedGeoLocation, type Mode, type MultipleBatchRequest, type MultipleBatchResponse, type NumericFilters, type OperationIndexParams, type OperationIndexProps, type OperationType, type OptionalFilters, type OptionalWords, type Params, type PartialUpdateObjectProps, type PartialUpdateObjectsOptions, type Personalization, type Promote, type PromoteObjectID, type PromoteObjectIDs, type QueryCategorization, type QueryCategorizationType, type QueryType, type Range, type RankingInfo, type ReRankingApplyFilter, type Redirect, type RedirectRuleIndexData, type RedirectRuleIndexMetadata, type RedirectURL, type RemoveStopWords, type RemoveUserIdProps, type RemoveUserIdResponse, type RemoveWordsIfNoResults, type RenderingContent, type ReplaceAllObjectsOptions, type ReplaceAllObjectsResponse, type ReplaceAllObjectsWithTransformationResponse, type ReplaceSourceResponse, type ReplaceSourcesProps, type ResponseExtensions, type RestoreApiKeyProps, type Rule, type SaveObjectProps, type SaveObjectResponse, type SaveObjectsOptions, type SaveRuleProps, type SaveRulesProps, type SaveSynonymProps, type SaveSynonymResponse, type SaveSynonymsProps, type ScopeType, type SearchClient, type SearchClientNodeHelpers, type SearchDictionaryEntriesParams, type SearchDictionaryEntriesProps, type SearchDictionaryEntriesResponse, type SearchExtensions, type SearchExtensionsQueryCategorization, type SearchForFacetValuesProps, type SearchForFacetValuesRequest, type SearchForFacetValuesResponse, type SearchForFacets, type SearchForFacetsOptions, type SearchForHits, type SearchForHitsOptions, type SearchHits, type SearchMethodParams, type SearchPagination, type SearchParams, type SearchParamsObject, type SearchParamsQuery, type SearchParamsString, type SearchQuery, type SearchResponse, type SearchResponses, type SearchResult, type SearchRulesParams, type SearchRulesProps, type SearchRulesResponse, type SearchSingleIndexProps, type SearchStrategy, type SearchSynonymsParams, type SearchSynonymsProps, type SearchSynonymsResponse, type SearchTypeDefault, type SearchTypeFacet, type SearchUserIdsParams, type SearchUserIdsResponse, type SecuredApiKeyRestrictions, type SemanticSearch, type SetSettingsProps, type SettingsResponse, type SnippetResult, type SnippetResultOption, type SortRemainingBy, type Source, type StandardEntries, type SupportedLanguage, type SynonymHit, type SynonymType, type TagFilters, type TaskStatus, type TimeRange, type TypoTolerance, type TypoToleranceEnum, type UpdateApiKeyProps, type UpdateApiKeyResponse, type UpdatedAtResponse, type UpdatedAtWithObjectIdResponse, type UserHighlightResult, type UserHit, type UserId, type Value, type WaitForApiKeyOptions, type WaitForAppTaskOptions, type WaitForTaskOptions, type WatchResponse, type Widgets, type WithPrimary, apiClientVersion, searchClient };
|
|
4207
|
+
export { type AccountCopyIndexOptions, type Acl, type Action, type AddApiKeyResponse, type AddOrUpdateObjectProps, type AdvancedSyntaxFeatures, type AlternativesAsExact, type Anchoring, type ApiKey, type ApiKeyOperation, type AroundPrecision, type AroundRadius, type AroundRadiusAll, type AssignUserIdParams, type AssignUserIdProps, type AttributeToUpdate, type AutoFilteringFilterEntry, type AutoFilteringResult, type AutomaticFacetFilter, type AutomaticFacetFilters, type Banner, type BannerImage, type BannerImageUrl, type BannerLink, type BaseGetApiKeyResponse, type BaseIndexSettings, type BaseSearchParams, type BaseSearchParamsWithoutQuery, type BaseSearchResponse, type BatchAssignUserIdsParams, type BatchAssignUserIdsProps, type BatchDictionaryEntriesParams, type BatchDictionaryEntriesProps, type BatchDictionaryEntriesRequest, type BatchParams, type BatchProps, type BatchRequest, type BatchResponse, type BatchWriteParams, type BooleanString, type BrowseOptions, type BrowsePagination, type BrowseParams, type BrowseParamsObject, type BrowseProps, type BrowseResponse, type BuiltInOperation, type BuiltInOperationType, type BuiltInOperationValue, type CategoryPrediction, type CategoryPredictionBin, type ChunkedBatchOptions, type ClearObjectsProps, type ClearRulesProps, type ClearSynonymsProps, type Condition, type Consequence, type ConsequenceHide, type ConsequenceParams, type ConsequenceQuery, type ConsequenceQueryObject, type ConsequenceRedirect, type CreatedAtResponse, type Cursor, type CustomDeleteProps, type CustomGetProps, type CustomPostProps, type CustomPutProps, type DeleteApiKeyProps, type DeleteApiKeyResponse, type DeleteByParams, type DeleteByProps, type DeleteIndexProps, type DeleteObjectProps, type DeleteObjectsOptions, type DeleteRuleProps, type DeleteSourceProps, type DeleteSourceResponse, type DeleteSynonymProps, type DeletedAtResponse, type DictionaryAction, type DictionaryEntry, type DictionaryEntryState, type DictionaryEntryType, type DictionaryLanguage, type DictionarySettingsParams, type DictionaryType, type Distinct, type Edit, type EditType, type ErrorBase, type Event, type EventStatus, type EventType, type ExactOnSingleWordQuery, type Exhaustive, type FacetFilters, type FacetHits, type FacetOrdering, type FacetStats, type Facets, type FetchedIndex, type FetchedIndexAbTest, type FetchedIndexAbTestTarget, type FetchedIndexAbTestVariant, type GenerateSecuredApiKeyOptions, type GetApiKeyProps, type GetApiKeyResponse, type GetAppTaskProps, type GetDictionarySettingsResponse, type GetLogsProps, type GetLogsResponse, type GetObjectProps, type GetObjectsParams, type GetObjectsRequest, type GetObjectsResponse, type GetRuleProps, type GetSecuredApiKeyRemainingValidityOptions, type GetSettingsProps, type GetSynonymProps, type GetTaskProps, type GetTaskResponse, type GetTopUserIdsResponse, type GetUserIdProps, type HasPendingMappingsProps, type HasPendingMappingsResponse, type HierarchyPathEntry, type HighlightResult, type HighlightResultOption, type Hit, type IgnorePlurals, type IndexSettings, type IndexSettingsAsSearchParams, type InsideBoundingBox, type Languages, type LegacySearchMethodProps, type ListApiKeysResponse, type ListClustersResponse, type ListIndicesProps, type ListIndicesResponse, type ListUserIdsProps, type ListUserIdsResponse, type Log, type LogQuery, type LogType, type MatchLevel, type MatchedGeoLocation, type Mode, type MultipleBatchRequest, type MultipleBatchResponse, type NumericFilters, type OperationIndexParams, type OperationIndexProps, type OperationType, type OptionalFilters, type OptionalWords, type Params, type PartialUpdateObjectProps, type PartialUpdateObjectsOptions, type Personalization, type Promote, type PromoteObjectID, type PromoteObjectIDs, type QueryCategorization, type QueryCategorizationType, type QueryType, type Range, type RankingInfo, type ReRankingApplyFilter, type Redirect, type RedirectRuleIndexData, type RedirectRuleIndexMetadata, type RedirectURL, type RemoveStopWords, type RemoveUserIdProps, type RemoveUserIdResponse, type RemoveWordsIfNoResults, type RenderingContent, type ReplaceAllObjectsOptions, type ReplaceAllObjectsResponse, type ReplaceAllObjectsWithTransformationResponse, type ReplaceSourceResponse, type ReplaceSourcesProps, type ResponseExtensions, type RestoreApiKeyProps, type Rule, type SaveObjectProps, type SaveObjectResponse, type SaveObjectsOptions, type SaveRuleProps, type SaveRulesProps, type SaveSynonymProps, type SaveSynonymResponse, type SaveSynonymsProps, type ScopeType, type SearchClient, type SearchClientNodeHelpers, type SearchDictionaryEntriesParams, type SearchDictionaryEntriesProps, type SearchDictionaryEntriesResponse, type SearchExtensions, type SearchExtensionsQueryCategorization, type SearchForFacetValuesProps, type SearchForFacetValuesRequest, type SearchForFacetValuesResponse, type SearchForFacets, type SearchForFacetsOptions, type SearchForHits, type SearchForHitsOptions, type SearchHits, type SearchMethodParams, type SearchPagination, type SearchParams, type SearchParamsObject, type SearchParamsQuery, type SearchParamsString, type SearchQuery, type SearchResponse, type SearchResponsePartial, type SearchResponses, type SearchResult, type SearchRulesParams, type SearchRulesProps, type SearchRulesResponse, type SearchSingleIndexProps, type SearchStrategy, type SearchSynonymsParams, type SearchSynonymsProps, type SearchSynonymsResponse, type SearchTypeDefault, type SearchTypeFacet, type SearchUserIdsParams, type SearchUserIdsResponse, type SecuredApiKeyRestrictions, type SemanticSearch, type SetSettingsProps, type SettingsResponse, type SnippetResult, type SnippetResultOption, type SortRemainingBy, type Source, type StandardEntries, type SupportedLanguage, type SynonymHit, type SynonymType, type TagFilters, type TaskStatus, type TimeRange, type TypoTolerance, type TypoToleranceEnum, type UpdateApiKeyProps, type UpdateApiKeyResponse, type UpdatedAtResponse, type UpdatedAtWithObjectIdResponse, type UserHighlightResult, type UserHit, type UserId, type Value, type WaitForApiKeyOptions, type WaitForAppTaskOptions, type WaitForTaskOptions, type WatchResponse, type Widgets, type WithPrimary, apiClientVersion, searchClient };
|
package/dist/node.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _algolia_client_common from '@algolia/client-common';
|
|
2
|
-
import { CreateIterablePromise, CreateClientOptions, RequestOptions, ClientOptions } from '@algolia/client-common';
|
|
2
|
+
import { ChunkedHelperOptions, CreateIterablePromise, CreateClientOptions, RequestOptions, ClientOptions } from '@algolia/client-common';
|
|
3
3
|
|
|
4
4
|
type AddApiKeyResponse = {
|
|
5
5
|
/**
|
|
@@ -942,6 +942,63 @@ type ListClustersResponse = {
|
|
|
942
942
|
topUsers: Array<string>;
|
|
943
943
|
};
|
|
944
944
|
|
|
945
|
+
/**
|
|
946
|
+
* A/B test target criteria. Only present for v2 and later tests.
|
|
947
|
+
*/
|
|
948
|
+
type FetchedIndexAbTestTarget = {
|
|
949
|
+
/**
|
|
950
|
+
* Index name to match. Use `*` to target the entire application.
|
|
951
|
+
*/
|
|
952
|
+
indexName: string;
|
|
953
|
+
};
|
|
954
|
+
|
|
955
|
+
/**
|
|
956
|
+
* A/B test variant for an index.
|
|
957
|
+
*/
|
|
958
|
+
type FetchedIndexAbTestVariant = {
|
|
959
|
+
/**
|
|
960
|
+
* Index name of the variant. Only present for v0/v1 tests; in v2 this moves into `payload`.
|
|
961
|
+
*/
|
|
962
|
+
indexName?: string | undefined;
|
|
963
|
+
/**
|
|
964
|
+
* Percentage of search traffic routed to this variant.
|
|
965
|
+
*/
|
|
966
|
+
percentage: number;
|
|
967
|
+
/**
|
|
968
|
+
* URL-encoded custom search parameters applied to this variant. Only present for v0/v1 tests; in v2 this moves into `payload`.
|
|
969
|
+
*/
|
|
970
|
+
customSearchParameters?: string | undefined;
|
|
971
|
+
/**
|
|
972
|
+
* Type-specific configuration. Only present for v2 and later tests. Shape depends on the parent A/B test\'s `type`.
|
|
973
|
+
*/
|
|
974
|
+
payload?: {
|
|
975
|
+
[key: string]: any;
|
|
976
|
+
} | undefined;
|
|
977
|
+
};
|
|
978
|
+
|
|
979
|
+
/**
|
|
980
|
+
* A/B test metadata. Only present if the index is part of an active A/B test.
|
|
981
|
+
*/
|
|
982
|
+
type FetchedIndexAbTest = {
|
|
983
|
+
/**
|
|
984
|
+
* A/B test ID.
|
|
985
|
+
*/
|
|
986
|
+
id: number;
|
|
987
|
+
/**
|
|
988
|
+
* A/B test schema version. Only present for v2 and later tests.
|
|
989
|
+
*/
|
|
990
|
+
version?: number | undefined;
|
|
991
|
+
/**
|
|
992
|
+
* A/B test type. Only present for v2 and later tests. Currently always `index-configuration`.
|
|
993
|
+
*/
|
|
994
|
+
type?: string | undefined;
|
|
995
|
+
target?: FetchedIndexAbTestTarget | undefined;
|
|
996
|
+
/**
|
|
997
|
+
* A/B test variants.
|
|
998
|
+
*/
|
|
999
|
+
variants: Array<FetchedIndexAbTestVariant>;
|
|
1000
|
+
};
|
|
1001
|
+
|
|
945
1002
|
type FetchedIndex = {
|
|
946
1003
|
/**
|
|
947
1004
|
* Index name.
|
|
@@ -991,6 +1048,11 @@ type FetchedIndex = {
|
|
|
991
1048
|
* Only present if the index is a [virtual replica](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-an-index-alphabetically/#virtual-replicas).
|
|
992
1049
|
*/
|
|
993
1050
|
virtual?: boolean | undefined;
|
|
1051
|
+
abTest?: FetchedIndexAbTest | undefined;
|
|
1052
|
+
/**
|
|
1053
|
+
* Name of the index that owns the A/B test configuration. Only present when this index participates in an A/B test configured on another index.
|
|
1054
|
+
*/
|
|
1055
|
+
sourceABTest?: string | undefined;
|
|
994
1056
|
};
|
|
995
1057
|
|
|
996
1058
|
type ListIndicesResponse = {
|
|
@@ -1877,7 +1939,14 @@ type SearchPagination = {
|
|
|
1877
1939
|
|
|
1878
1940
|
type SearchResponse<T = Record<string, unknown>> = BaseSearchResponse & SearchPagination & SearchHits<T>;
|
|
1879
1941
|
|
|
1880
|
-
|
|
1942
|
+
/**
|
|
1943
|
+
* Partial search response returned when the `responseFields` parameter excludes fields like `hits`. Contains all possible search response properties but none are required, so it acts as an unconditional fallback during oneOf deserialization.
|
|
1944
|
+
*/
|
|
1945
|
+
type SearchResponsePartial<T = Record<string, unknown>> = BaseSearchResponse & SearchPagination & {
|
|
1946
|
+
[key: string]: any;
|
|
1947
|
+
};
|
|
1948
|
+
|
|
1949
|
+
type SearchResult<T = Record<string, unknown>> = SearchResponse<T> | SearchForFacetValuesResponse | SearchResponsePartial<T>;
|
|
1881
1950
|
|
|
1882
1951
|
type SearchResponses<T = Record<string, unknown>> = {
|
|
1883
1952
|
results: SearchResult<T>[];
|
|
@@ -3109,19 +3178,19 @@ type SearchClientNodeHelpers = {
|
|
|
3109
3178
|
generateSecuredApiKey: (opts: GenerateSecuredApiKeyOptions) => string;
|
|
3110
3179
|
getSecuredApiKeyRemainingValidity: (opts: GetSecuredApiKeyRemainingValidityOptions) => number;
|
|
3111
3180
|
};
|
|
3112
|
-
type DeleteObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'waitForTasks' | 'batchSize'> & {
|
|
3181
|
+
type DeleteObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'waitForTasks' | 'batchSize'> & ChunkedHelperOptions & {
|
|
3113
3182
|
/**
|
|
3114
3183
|
* The objectIDs to delete.
|
|
3115
3184
|
*/
|
|
3116
3185
|
objectIDs: string[];
|
|
3117
3186
|
};
|
|
3118
|
-
type PartialUpdateObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'objects' | 'waitForTasks' | 'batchSize'> & {
|
|
3187
|
+
type PartialUpdateObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'objects' | 'waitForTasks' | 'batchSize'> & ChunkedHelperOptions & {
|
|
3119
3188
|
/**
|
|
3120
3189
|
*To be provided if non-existing objects are passed, otherwise, the call will fail.
|
|
3121
3190
|
*/
|
|
3122
3191
|
createIfNotExists?: boolean | undefined;
|
|
3123
3192
|
};
|
|
3124
|
-
type SaveObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'objects' | 'waitForTasks' | 'batchSize'
|
|
3193
|
+
type SaveObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'objects' | 'waitForTasks' | 'batchSize'> & ChunkedHelperOptions;
|
|
3125
3194
|
type ChunkedBatchOptions = ReplaceAllObjectsOptions & {
|
|
3126
3195
|
/**
|
|
3127
3196
|
* The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`.
|
|
@@ -3132,7 +3201,7 @@ type ChunkedBatchOptions = ReplaceAllObjectsOptions & {
|
|
|
3132
3201
|
*/
|
|
3133
3202
|
waitForTasks?: boolean | undefined;
|
|
3134
3203
|
};
|
|
3135
|
-
type ReplaceAllObjectsOptions = {
|
|
3204
|
+
type ReplaceAllObjectsOptions = ChunkedHelperOptions & {
|
|
3136
3205
|
/**
|
|
3137
3206
|
* The `indexName` to replace `objects` in.
|
|
3138
3207
|
*/
|
|
@@ -3150,7 +3219,7 @@ type ReplaceAllObjectsOptions = {
|
|
|
3150
3219
|
*/
|
|
3151
3220
|
scopes?: Array<ScopeType> | undefined;
|
|
3152
3221
|
};
|
|
3153
|
-
type AccountCopyIndexOptions = {
|
|
3222
|
+
type AccountCopyIndexOptions = ChunkedHelperOptions & {
|
|
3154
3223
|
/**
|
|
3155
3224
|
* The name of the index to copy to the `destinationClient`.
|
|
3156
3225
|
*/
|
|
@@ -3173,7 +3242,7 @@ type AccountCopyIndexOptions = {
|
|
|
3173
3242
|
batchSize?: number | undefined;
|
|
3174
3243
|
};
|
|
3175
3244
|
|
|
3176
|
-
declare const apiClientVersion = "5.
|
|
3245
|
+
declare const apiClientVersion = "5.53.0";
|
|
3177
3246
|
declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
|
|
3178
3247
|
transporter: _algolia_client_common.Transporter;
|
|
3179
3248
|
/**
|
|
@@ -3290,9 +3359,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3290
3359
|
* @param chunkedBatch.action - The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`.
|
|
3291
3360
|
* @param chunkedBatch.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.
|
|
3292
3361
|
* @param chunkedBatch.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
|
|
3362
|
+
* @param chunkedBatch.maxRetries - The maximum number of retries when polling for task completion. 100 by default.
|
|
3293
3363
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
3294
3364
|
*/
|
|
3295
|
-
chunkedBatch({ indexName, objects, action, waitForTasks, batchSize }: ChunkedBatchOptions, requestOptions?: RequestOptions): Promise<Array<BatchResponse>>;
|
|
3365
|
+
chunkedBatch({ indexName, objects, action, waitForTasks, batchSize, maxRetries, }: ChunkedBatchOptions, requestOptions?: RequestOptions): Promise<Array<BatchResponse>>;
|
|
3296
3366
|
/**
|
|
3297
3367
|
* Helper: Saves the given array of objects in the given index. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.
|
|
3298
3368
|
*
|
|
@@ -3302,9 +3372,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3302
3372
|
* @param saveObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
3303
3373
|
* @param saveObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
|
|
3304
3374
|
* @param saveObjects.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.
|
|
3375
|
+
* @param saveObjects.maxRetries - The maximum number of retries when polling for task completion. 100 by default.
|
|
3305
3376
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions.
|
|
3306
3377
|
*/
|
|
3307
|
-
saveObjects({ indexName, objects, waitForTasks, batchSize }: SaveObjectsOptions, requestOptions?: RequestOptions | undefined): Promise<BatchResponse[]>;
|
|
3378
|
+
saveObjects({ indexName, objects, waitForTasks, batchSize, maxRetries }: SaveObjectsOptions, requestOptions?: RequestOptions | undefined): Promise<BatchResponse[]>;
|
|
3308
3379
|
/**
|
|
3309
3380
|
* Helper: Deletes every records for the given objectIDs. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objectIDs in it.
|
|
3310
3381
|
*
|
|
@@ -3314,9 +3385,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3314
3385
|
* @param deleteObjects.objectIDs - The objectIDs to delete.
|
|
3315
3386
|
* @param deleteObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
|
|
3316
3387
|
* @param deleteObjects.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.
|
|
3388
|
+
* @param deleteObjects.maxRetries - The maximum number of retries when polling for task completion. 100 by default.
|
|
3317
3389
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions.
|
|
3318
3390
|
*/
|
|
3319
|
-
deleteObjects({ indexName, objectIDs, waitForTasks, batchSize }: DeleteObjectsOptions, requestOptions?: RequestOptions | undefined): Promise<BatchResponse[]>;
|
|
3391
|
+
deleteObjects({ indexName, objectIDs, waitForTasks, batchSize, maxRetries }: DeleteObjectsOptions, requestOptions?: RequestOptions | undefined): Promise<BatchResponse[]>;
|
|
3320
3392
|
/**
|
|
3321
3393
|
* Helper: Replaces object content of all the given objects according to their respective `objectID` field. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.
|
|
3322
3394
|
*
|
|
@@ -3327,9 +3399,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3327
3399
|
* @param partialUpdateObjects.createIfNotExists - To be provided if non-existing objects are passed, otherwise, the call will fail.
|
|
3328
3400
|
* @param partialUpdateObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
|
|
3329
3401
|
* @param partialUpdateObjects.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.
|
|
3402
|
+
* @param partialUpdateObjects.maxRetries - The maximum number of retries when polling for task completion. 100 by default.
|
|
3330
3403
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
3331
3404
|
*/
|
|
3332
|
-
partialUpdateObjects({ indexName, objects, createIfNotExists, waitForTasks, batchSize }: PartialUpdateObjectsOptions, requestOptions?: RequestOptions | undefined): Promise<BatchResponse[]>;
|
|
3405
|
+
partialUpdateObjects({ indexName, objects, createIfNotExists, waitForTasks, batchSize, maxRetries }: PartialUpdateObjectsOptions, requestOptions?: RequestOptions | undefined): Promise<BatchResponse[]>;
|
|
3333
3406
|
/**
|
|
3334
3407
|
* Helper: Replaces all objects (records) in the given `index_name` with the given `objects`. A temporary index is created during this process in order to backup your data.
|
|
3335
3408
|
* See https://api-clients-automation.netlify.app/docs/custom-helpers/#replaceallobjects for implementation details.
|
|
@@ -3340,9 +3413,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3340
3413
|
* @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
3341
3414
|
* @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.
|
|
3342
3415
|
* @param replaceAllObjects.scopes - The `scopes` to keep from the index. Defaults to ['settings', 'rules', 'synonyms'].
|
|
3416
|
+
* @param replaceAllObjects.maxRetries - The maximum number of retries when polling for task completion. 100 by default.
|
|
3343
3417
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch`, `operationIndex` and `getTask` method and merged with the transporter requestOptions.
|
|
3344
3418
|
*/
|
|
3345
|
-
replaceAllObjects({ indexName, objects, batchSize, scopes }: ReplaceAllObjectsOptions, requestOptions?: RequestOptions | undefined): Promise<ReplaceAllObjectsResponse>;
|
|
3419
|
+
replaceAllObjects({ indexName, objects, batchSize, scopes, maxRetries }: ReplaceAllObjectsOptions, requestOptions?: RequestOptions | undefined): Promise<ReplaceAllObjectsResponse>;
|
|
3346
3420
|
indexExists({ indexName }: GetSettingsProps): Promise<boolean>;
|
|
3347
3421
|
/**
|
|
3348
3422
|
* Helper: calls the `search` method but with certainty that we will only request Algolia records (hits) and not facets.
|
|
@@ -4130,4 +4204,4 @@ type SearchClient = ReturnType<typeof createSearchClient> & SearchClientNodeHelp
|
|
|
4130
4204
|
|
|
4131
4205
|
declare function searchClient(appId: string, apiKey: string, options?: ClientOptions | undefined): SearchClient;
|
|
4132
4206
|
|
|
4133
|
-
export { type AccountCopyIndexOptions, type Acl, type Action, type AddApiKeyResponse, type AddOrUpdateObjectProps, type AdvancedSyntaxFeatures, type AlternativesAsExact, type Anchoring, type ApiKey, type ApiKeyOperation, type AroundPrecision, type AroundRadius, type AroundRadiusAll, type AssignUserIdParams, type AssignUserIdProps, type AttributeToUpdate, type AutoFilteringFilterEntry, type AutoFilteringResult, type AutomaticFacetFilter, type AutomaticFacetFilters, type Banner, type BannerImage, type BannerImageUrl, type BannerLink, type BaseGetApiKeyResponse, type BaseIndexSettings, type BaseSearchParams, type BaseSearchParamsWithoutQuery, type BaseSearchResponse, type BatchAssignUserIdsParams, type BatchAssignUserIdsProps, type BatchDictionaryEntriesParams, type BatchDictionaryEntriesProps, type BatchDictionaryEntriesRequest, type BatchParams, type BatchProps, type BatchRequest, type BatchResponse, type BatchWriteParams, type BooleanString, type BrowseOptions, type BrowsePagination, type BrowseParams, type BrowseParamsObject, type BrowseProps, type BrowseResponse, type BuiltInOperation, type BuiltInOperationType, type BuiltInOperationValue, type CategoryPrediction, type CategoryPredictionBin, type ChunkedBatchOptions, type ClearObjectsProps, type ClearRulesProps, type ClearSynonymsProps, type Condition, type Consequence, type ConsequenceHide, type ConsequenceParams, type ConsequenceQuery, type ConsequenceQueryObject, type ConsequenceRedirect, type CreatedAtResponse, type Cursor, type CustomDeleteProps, type CustomGetProps, type CustomPostProps, type CustomPutProps, type DeleteApiKeyProps, type DeleteApiKeyResponse, type DeleteByParams, type DeleteByProps, type DeleteIndexProps, type DeleteObjectProps, type DeleteObjectsOptions, type DeleteRuleProps, type DeleteSourceProps, type DeleteSourceResponse, type DeleteSynonymProps, type DeletedAtResponse, type DictionaryAction, type DictionaryEntry, type DictionaryEntryState, type DictionaryEntryType, type DictionaryLanguage, type DictionarySettingsParams, type DictionaryType, type Distinct, type Edit, type EditType, type ErrorBase, type Event, type EventStatus, type EventType, type ExactOnSingleWordQuery, type Exhaustive, type FacetFilters, type FacetHits, type FacetOrdering, type FacetStats, type Facets, type FetchedIndex, type GenerateSecuredApiKeyOptions, type GetApiKeyProps, type GetApiKeyResponse, type GetAppTaskProps, type GetDictionarySettingsResponse, type GetLogsProps, type GetLogsResponse, type GetObjectProps, type GetObjectsParams, type GetObjectsRequest, type GetObjectsResponse, type GetRuleProps, type GetSecuredApiKeyRemainingValidityOptions, type GetSettingsProps, type GetSynonymProps, type GetTaskProps, type GetTaskResponse, type GetTopUserIdsResponse, type GetUserIdProps, type HasPendingMappingsProps, type HasPendingMappingsResponse, type HierarchyPathEntry, type HighlightResult, type HighlightResultOption, type Hit, type IgnorePlurals, type IndexSettings, type IndexSettingsAsSearchParams, type InsideBoundingBox, type Languages, type LegacySearchMethodProps, type ListApiKeysResponse, type ListClustersResponse, type ListIndicesProps, type ListIndicesResponse, type ListUserIdsProps, type ListUserIdsResponse, type Log, type LogQuery, type LogType, type MatchLevel, type MatchedGeoLocation, type Mode, type MultipleBatchRequest, type MultipleBatchResponse, type NumericFilters, type OperationIndexParams, type OperationIndexProps, type OperationType, type OptionalFilters, type OptionalWords, type Params, type PartialUpdateObjectProps, type PartialUpdateObjectsOptions, type Personalization, type Promote, type PromoteObjectID, type PromoteObjectIDs, type QueryCategorization, type QueryCategorizationType, type QueryType, type Range, type RankingInfo, type ReRankingApplyFilter, type Redirect, type RedirectRuleIndexData, type RedirectRuleIndexMetadata, type RedirectURL, type RemoveStopWords, type RemoveUserIdProps, type RemoveUserIdResponse, type RemoveWordsIfNoResults, type RenderingContent, type ReplaceAllObjectsOptions, type ReplaceAllObjectsResponse, type ReplaceAllObjectsWithTransformationResponse, type ReplaceSourceResponse, type ReplaceSourcesProps, type ResponseExtensions, type RestoreApiKeyProps, type Rule, type SaveObjectProps, type SaveObjectResponse, type SaveObjectsOptions, type SaveRuleProps, type SaveRulesProps, type SaveSynonymProps, type SaveSynonymResponse, type SaveSynonymsProps, type ScopeType, type SearchClient, type SearchClientNodeHelpers, type SearchDictionaryEntriesParams, type SearchDictionaryEntriesProps, type SearchDictionaryEntriesResponse, type SearchExtensions, type SearchExtensionsQueryCategorization, type SearchForFacetValuesProps, type SearchForFacetValuesRequest, type SearchForFacetValuesResponse, type SearchForFacets, type SearchForFacetsOptions, type SearchForHits, type SearchForHitsOptions, type SearchHits, type SearchMethodParams, type SearchPagination, type SearchParams, type SearchParamsObject, type SearchParamsQuery, type SearchParamsString, type SearchQuery, type SearchResponse, type SearchResponses, type SearchResult, type SearchRulesParams, type SearchRulesProps, type SearchRulesResponse, type SearchSingleIndexProps, type SearchStrategy, type SearchSynonymsParams, type SearchSynonymsProps, type SearchSynonymsResponse, type SearchTypeDefault, type SearchTypeFacet, type SearchUserIdsParams, type SearchUserIdsResponse, type SecuredApiKeyRestrictions, type SemanticSearch, type SetSettingsProps, type SettingsResponse, type SnippetResult, type SnippetResultOption, type SortRemainingBy, type Source, type StandardEntries, type SupportedLanguage, type SynonymHit, type SynonymType, type TagFilters, type TaskStatus, type TimeRange, type TypoTolerance, type TypoToleranceEnum, type UpdateApiKeyProps, type UpdateApiKeyResponse, type UpdatedAtResponse, type UpdatedAtWithObjectIdResponse, type UserHighlightResult, type UserHit, type UserId, type Value, type WaitForApiKeyOptions, type WaitForAppTaskOptions, type WaitForTaskOptions, type WatchResponse, type Widgets, type WithPrimary, apiClientVersion, searchClient };
|
|
4207
|
+
export { type AccountCopyIndexOptions, type Acl, type Action, type AddApiKeyResponse, type AddOrUpdateObjectProps, type AdvancedSyntaxFeatures, type AlternativesAsExact, type Anchoring, type ApiKey, type ApiKeyOperation, type AroundPrecision, type AroundRadius, type AroundRadiusAll, type AssignUserIdParams, type AssignUserIdProps, type AttributeToUpdate, type AutoFilteringFilterEntry, type AutoFilteringResult, type AutomaticFacetFilter, type AutomaticFacetFilters, type Banner, type BannerImage, type BannerImageUrl, type BannerLink, type BaseGetApiKeyResponse, type BaseIndexSettings, type BaseSearchParams, type BaseSearchParamsWithoutQuery, type BaseSearchResponse, type BatchAssignUserIdsParams, type BatchAssignUserIdsProps, type BatchDictionaryEntriesParams, type BatchDictionaryEntriesProps, type BatchDictionaryEntriesRequest, type BatchParams, type BatchProps, type BatchRequest, type BatchResponse, type BatchWriteParams, type BooleanString, type BrowseOptions, type BrowsePagination, type BrowseParams, type BrowseParamsObject, type BrowseProps, type BrowseResponse, type BuiltInOperation, type BuiltInOperationType, type BuiltInOperationValue, type CategoryPrediction, type CategoryPredictionBin, type ChunkedBatchOptions, type ClearObjectsProps, type ClearRulesProps, type ClearSynonymsProps, type Condition, type Consequence, type ConsequenceHide, type ConsequenceParams, type ConsequenceQuery, type ConsequenceQueryObject, type ConsequenceRedirect, type CreatedAtResponse, type Cursor, type CustomDeleteProps, type CustomGetProps, type CustomPostProps, type CustomPutProps, type DeleteApiKeyProps, type DeleteApiKeyResponse, type DeleteByParams, type DeleteByProps, type DeleteIndexProps, type DeleteObjectProps, type DeleteObjectsOptions, type DeleteRuleProps, type DeleteSourceProps, type DeleteSourceResponse, type DeleteSynonymProps, type DeletedAtResponse, type DictionaryAction, type DictionaryEntry, type DictionaryEntryState, type DictionaryEntryType, type DictionaryLanguage, type DictionarySettingsParams, type DictionaryType, type Distinct, type Edit, type EditType, type ErrorBase, type Event, type EventStatus, type EventType, type ExactOnSingleWordQuery, type Exhaustive, type FacetFilters, type FacetHits, type FacetOrdering, type FacetStats, type Facets, type FetchedIndex, type FetchedIndexAbTest, type FetchedIndexAbTestTarget, type FetchedIndexAbTestVariant, type GenerateSecuredApiKeyOptions, type GetApiKeyProps, type GetApiKeyResponse, type GetAppTaskProps, type GetDictionarySettingsResponse, type GetLogsProps, type GetLogsResponse, type GetObjectProps, type GetObjectsParams, type GetObjectsRequest, type GetObjectsResponse, type GetRuleProps, type GetSecuredApiKeyRemainingValidityOptions, type GetSettingsProps, type GetSynonymProps, type GetTaskProps, type GetTaskResponse, type GetTopUserIdsResponse, type GetUserIdProps, type HasPendingMappingsProps, type HasPendingMappingsResponse, type HierarchyPathEntry, type HighlightResult, type HighlightResultOption, type Hit, type IgnorePlurals, type IndexSettings, type IndexSettingsAsSearchParams, type InsideBoundingBox, type Languages, type LegacySearchMethodProps, type ListApiKeysResponse, type ListClustersResponse, type ListIndicesProps, type ListIndicesResponse, type ListUserIdsProps, type ListUserIdsResponse, type Log, type LogQuery, type LogType, type MatchLevel, type MatchedGeoLocation, type Mode, type MultipleBatchRequest, type MultipleBatchResponse, type NumericFilters, type OperationIndexParams, type OperationIndexProps, type OperationType, type OptionalFilters, type OptionalWords, type Params, type PartialUpdateObjectProps, type PartialUpdateObjectsOptions, type Personalization, type Promote, type PromoteObjectID, type PromoteObjectIDs, type QueryCategorization, type QueryCategorizationType, type QueryType, type Range, type RankingInfo, type ReRankingApplyFilter, type Redirect, type RedirectRuleIndexData, type RedirectRuleIndexMetadata, type RedirectURL, type RemoveStopWords, type RemoveUserIdProps, type RemoveUserIdResponse, type RemoveWordsIfNoResults, type RenderingContent, type ReplaceAllObjectsOptions, type ReplaceAllObjectsResponse, type ReplaceAllObjectsWithTransformationResponse, type ReplaceSourceResponse, type ReplaceSourcesProps, type ResponseExtensions, type RestoreApiKeyProps, type Rule, type SaveObjectProps, type SaveObjectResponse, type SaveObjectsOptions, type SaveRuleProps, type SaveRulesProps, type SaveSynonymProps, type SaveSynonymResponse, type SaveSynonymsProps, type ScopeType, type SearchClient, type SearchClientNodeHelpers, type SearchDictionaryEntriesParams, type SearchDictionaryEntriesProps, type SearchDictionaryEntriesResponse, type SearchExtensions, type SearchExtensionsQueryCategorization, type SearchForFacetValuesProps, type SearchForFacetValuesRequest, type SearchForFacetValuesResponse, type SearchForFacets, type SearchForFacetsOptions, type SearchForHits, type SearchForHitsOptions, type SearchHits, type SearchMethodParams, type SearchPagination, type SearchParams, type SearchParamsObject, type SearchParamsQuery, type SearchParamsString, type SearchQuery, type SearchResponse, type SearchResponsePartial, type SearchResponses, type SearchResult, type SearchRulesParams, type SearchRulesProps, type SearchRulesResponse, type SearchSingleIndexProps, type SearchStrategy, type SearchSynonymsParams, type SearchSynonymsProps, type SearchSynonymsResponse, type SearchTypeDefault, type SearchTypeFacet, type SearchUserIdsParams, type SearchUserIdsResponse, type SecuredApiKeyRestrictions, type SemanticSearch, type SetSettingsProps, type SettingsResponse, type SnippetResult, type SnippetResultOption, type SortRemainingBy, type Source, type StandardEntries, type SupportedLanguage, type SynonymHit, type SynonymType, type TagFilters, type TaskStatus, type TimeRange, type TypoTolerance, type TypoToleranceEnum, type UpdateApiKeyProps, type UpdateApiKeyResponse, type UpdatedAtResponse, type UpdatedAtWithObjectIdResponse, type UserHighlightResult, type UserHit, type UserId, type Value, type WaitForApiKeyOptions, type WaitForAppTaskOptions, type WaitForTaskOptions, type WatchResponse, type Widgets, type WithPrimary, apiClientVersion, searchClient };
|