algoliasearch 5.0.0-alpha.4 → 5.0.0-alpha.5
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/dist/algoliasearch/builds/browser.d.ts +4 -4
- package/dist/algoliasearch/builds/node.d.ts +4 -4
- package/dist/algoliasearch/lite/src/liteClient.d.ts +1 -1
- package/dist/algoliasearch.cjs.js +17 -17
- package/dist/algoliasearch.esm.browser.js +17 -17
- package/dist/algoliasearch.esm.node.js +17 -17
- package/dist/algoliasearch.umd.js +2 -2
- package/dist/builds/browser.d.ts +4 -4
- package/dist/builds/node.d.ts +4 -4
- package/dist/client-abtesting/src/abtestingClient.d.ts +1 -1
- package/dist/client-analytics/src/analyticsClient.d.ts +1 -1
- package/dist/client-personalization/src/personalizationClient.d.ts +1 -1
- package/dist/client-search/model/clientMethodProps.d.ts +7 -9
- package/dist/client-search/model/clientMethodProps.d.ts.map +1 -1
- package/dist/client-search/src/searchClient.d.ts +8 -8
- package/dist/client-search/src/searchClient.d.ts.map +1 -1
- package/dist/lite/builds/browser.d.ts +4 -4
- package/dist/lite/builds/node.d.ts +4 -4
- package/dist/lite/lite/src/liteClient.d.ts +1 -1
- package/dist/lite/lite.cjs.js +1 -1
- package/dist/lite/lite.esm.browser.js +1 -1
- package/dist/lite/lite.esm.node.js +1 -1
- package/dist/lite/lite.umd.js +2 -2
- package/lite/src/liteClient.ts +1 -1
- package/package.json +8 -8
|
@@ -4,7 +4,7 @@ import type { ClientOptions } from '@algolia/client-common';
|
|
|
4
4
|
import type { Region as PersonalizationRegion, PersonalizationClient } from '@algolia/client-personalization/src/personalizationClient';
|
|
5
5
|
import type { InitClientOptions, InitClientRegion } from './models';
|
|
6
6
|
export * from './models';
|
|
7
|
-
export declare const apiClientVersion = "5.0.0-alpha.
|
|
7
|
+
export declare const apiClientVersion = "5.0.0-alpha.5";
|
|
8
8
|
/**
|
|
9
9
|
* The client type.
|
|
10
10
|
*/
|
|
@@ -19,7 +19,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
19
19
|
clearCache(): Promise<void>;
|
|
20
20
|
addAlgoliaAgent(segment: string, version?: string | undefined): void;
|
|
21
21
|
waitForTask({ indexName, taskID, maxRetries, timeout, }: import("@algolia/client-search/model/clientMethodProps").WaitForTaskOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getTaskResponse").GetTaskResponse>;
|
|
22
|
-
waitForApiKey({ operation, key, apiKey, maxRetries, timeout, }: import("@algolia/client-search/model/clientMethodProps").WaitForApiKeyOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-
|
|
22
|
+
waitForApiKey({ operation, key, apiKey, maxRetries, timeout, }: import("@algolia/client-search/model/clientMethodProps").WaitForApiKeyOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-common").ApiError | import("@algolia/client-search/model/getApiKeyResponse").GetApiKeyResponse>;
|
|
23
23
|
browseObjects<T>({ indexName, browseRequest, ...browseObjectsOptions }: Partial<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>, "validate">> & Required<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>, "aggregator">> & import("@algolia/client-search/model/clientMethodProps").BrowseProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>;
|
|
24
24
|
browseRules({ indexName, searchRulesParams, ...browseRulesOptions }: Partial<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>, "validate">> & Required<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>, "aggregator">> & import("@algolia/client-search/model/clientMethodProps").SearchRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>;
|
|
25
25
|
browseSynonyms({ indexName, validate, aggregator, ...browseSynonymsOptions }: Partial<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>, "validate">> & Required<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>, "aggregator">> & import("@algolia/client-search/model/clientMethodProps").SearchSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>;
|
|
@@ -63,7 +63,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
63
63
|
listUserIds({ page, hitsPerPage }: import("@algolia/client-search/model/clientMethodProps").ListUserIdsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/listUserIdsResponse").ListUserIdsResponse>;
|
|
64
64
|
multipleBatch(batchParams: import("@algolia/client-search/model/batchParams").BatchParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/multipleBatchResponse").MultipleBatchResponse>;
|
|
65
65
|
operationIndex({ indexName, operationIndexParams }: import("@algolia/client-search/model/clientMethodProps").OperationIndexProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
66
|
-
partialUpdateObject({ indexName, objectID,
|
|
66
|
+
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists, }: import("@algolia/client-search/model/clientMethodProps").PartialUpdateObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtWithObjectIdResponse").UpdatedAtWithObjectIdResponse>;
|
|
67
67
|
post({ path, parameters, body }: import("@algolia/client-search/model/clientMethodProps").PostProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
|
|
68
68
|
put({ path, parameters, body }: import("@algolia/client-search/model/clientMethodProps").PutProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
|
|
69
69
|
removeUserId({ userID }: import("@algolia/client-search/model/clientMethodProps").RemoveUserIdProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/removeUserIdResponse").RemoveUserIdResponse>;
|
|
@@ -71,7 +71,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
71
71
|
restoreApiKey({ key }: import("@algolia/client-search/model/clientMethodProps").RestoreApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/addApiKeyResponse").AddApiKeyResponse>;
|
|
72
72
|
saveObject({ indexName, body }: import("@algolia/client-search/model/clientMethodProps").SaveObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/saveObjectResponse").SaveObjectResponse>;
|
|
73
73
|
saveRule({ indexName, objectID, rule, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").SaveRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedRuleResponse").UpdatedRuleResponse>;
|
|
74
|
-
saveRules({ indexName,
|
|
74
|
+
saveRules({ indexName, rules, forwardToReplicas, clearExistingRules, }: import("@algolia/client-search/model/clientMethodProps").SaveRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
75
75
|
saveSynonym({ indexName, objectID, synonymHit, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").SaveSynonymProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/saveSynonymResponse").SaveSynonymResponse>;
|
|
76
76
|
saveSynonyms({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms, }: import("@algolia/client-search/model/clientMethodProps").SaveSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
77
77
|
search<T_3>(searchMethodParams: import("@algolia/client-search/model/clientMethodProps").LegacySearchMethodProps | import("@algolia/client-search/model/searchMethodParams").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchResponses").SearchResponses<T_3>>;
|
|
@@ -4,7 +4,7 @@ import type { ClientOptions } from '@algolia/client-common';
|
|
|
4
4
|
import type { Region as PersonalizationRegion, PersonalizationClient } from '@algolia/client-personalization/src/personalizationClient';
|
|
5
5
|
import type { InitClientOptions, InitClientRegion } from './models';
|
|
6
6
|
export * from './models';
|
|
7
|
-
export declare const apiClientVersion = "5.0.0-alpha.
|
|
7
|
+
export declare const apiClientVersion = "5.0.0-alpha.5";
|
|
8
8
|
/**
|
|
9
9
|
* The client type.
|
|
10
10
|
*/
|
|
@@ -19,7 +19,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
19
19
|
clearCache(): Promise<void>;
|
|
20
20
|
addAlgoliaAgent(segment: string, version?: string | undefined): void;
|
|
21
21
|
waitForTask({ indexName, taskID, maxRetries, timeout, }: import("@algolia/client-search/model/clientMethodProps").WaitForTaskOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getTaskResponse").GetTaskResponse>;
|
|
22
|
-
waitForApiKey({ operation, key, apiKey, maxRetries, timeout, }: import("@algolia/client-search/model/clientMethodProps").WaitForApiKeyOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-
|
|
22
|
+
waitForApiKey({ operation, key, apiKey, maxRetries, timeout, }: import("@algolia/client-search/model/clientMethodProps").WaitForApiKeyOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-common").ApiError | import("@algolia/client-search/model/getApiKeyResponse").GetApiKeyResponse>;
|
|
23
23
|
browseObjects<T>({ indexName, browseRequest, ...browseObjectsOptions }: Partial<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>, "validate">> & Required<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>, "aggregator">> & import("@algolia/client-search/model/clientMethodProps").BrowseProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>;
|
|
24
24
|
browseRules({ indexName, searchRulesParams, ...browseRulesOptions }: Partial<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>, "validate">> & Required<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>, "aggregator">> & import("@algolia/client-search/model/clientMethodProps").SearchRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>;
|
|
25
25
|
browseSynonyms({ indexName, validate, aggregator, ...browseSynonymsOptions }: Partial<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>, "validate">> & Required<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>, "aggregator">> & import("@algolia/client-search/model/clientMethodProps").SearchSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>;
|
|
@@ -63,7 +63,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
63
63
|
listUserIds({ page, hitsPerPage }: import("@algolia/client-search/model/clientMethodProps").ListUserIdsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/listUserIdsResponse").ListUserIdsResponse>;
|
|
64
64
|
multipleBatch(batchParams: import("@algolia/client-search/model/batchParams").BatchParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/multipleBatchResponse").MultipleBatchResponse>;
|
|
65
65
|
operationIndex({ indexName, operationIndexParams }: import("@algolia/client-search/model/clientMethodProps").OperationIndexProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
66
|
-
partialUpdateObject({ indexName, objectID,
|
|
66
|
+
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists, }: import("@algolia/client-search/model/clientMethodProps").PartialUpdateObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtWithObjectIdResponse").UpdatedAtWithObjectIdResponse>;
|
|
67
67
|
post({ path, parameters, body }: import("@algolia/client-search/model/clientMethodProps").PostProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
|
|
68
68
|
put({ path, parameters, body }: import("@algolia/client-search/model/clientMethodProps").PutProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
|
|
69
69
|
removeUserId({ userID }: import("@algolia/client-search/model/clientMethodProps").RemoveUserIdProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/removeUserIdResponse").RemoveUserIdResponse>;
|
|
@@ -71,7 +71,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
71
71
|
restoreApiKey({ key }: import("@algolia/client-search/model/clientMethodProps").RestoreApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/addApiKeyResponse").AddApiKeyResponse>;
|
|
72
72
|
saveObject({ indexName, body }: import("@algolia/client-search/model/clientMethodProps").SaveObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/saveObjectResponse").SaveObjectResponse>;
|
|
73
73
|
saveRule({ indexName, objectID, rule, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").SaveRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedRuleResponse").UpdatedRuleResponse>;
|
|
74
|
-
saveRules({ indexName,
|
|
74
|
+
saveRules({ indexName, rules, forwardToReplicas, clearExistingRules, }: import("@algolia/client-search/model/clientMethodProps").SaveRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
75
75
|
saveSynonym({ indexName, objectID, synonymHit, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").SaveSynonymProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/saveSynonymResponse").SaveSynonymResponse>;
|
|
76
76
|
saveSynonyms({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms, }: import("@algolia/client-search/model/clientMethodProps").SaveSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
77
77
|
search<T_3>(searchMethodParams: import("@algolia/client-search/model/clientMethodProps").LegacySearchMethodProps | import("@algolia/client-search/model/searchMethodParams").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchResponses").SearchResponses<T_3>>;
|
|
@@ -2,7 +2,7 @@ import type { CreateClientOptions, RequestOptions } from '@algolia/client-common
|
|
|
2
2
|
import type { PostProps, LegacySearchMethodProps } from '../model/clientMethodProps';
|
|
3
3
|
import type { SearchMethodParams } from '../model/searchMethodParams';
|
|
4
4
|
import type { SearchResponses } from '../model/searchResponses';
|
|
5
|
-
export declare const apiClientVersion = "5.0.0-alpha.
|
|
5
|
+
export declare const apiClientVersion = "5.0.0-alpha.5";
|
|
6
6
|
export declare function createLiteClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
|
|
7
7
|
transporter: import("@algolia/client-common").Transporter;
|
|
8
8
|
/**
|
|
@@ -6,7 +6,7 @@ var clientCommon = require('@algolia/client-common');
|
|
|
6
6
|
var requesterNodeHttp = require('@algolia/requester-node-http');
|
|
7
7
|
|
|
8
8
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
9
|
-
const apiClientVersion$4 = '5.0.0-alpha.
|
|
9
|
+
const apiClientVersion$4 = '5.0.0-alpha.5';
|
|
10
10
|
const REGIONS$2 = ['de', 'us'];
|
|
11
11
|
function getDefaultHosts$3(region) {
|
|
12
12
|
const url = !region
|
|
@@ -297,7 +297,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
297
297
|
}
|
|
298
298
|
|
|
299
299
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
300
|
-
const apiClientVersion$3 = '5.0.0-alpha.
|
|
300
|
+
const apiClientVersion$3 = '5.0.0-alpha.5';
|
|
301
301
|
const REGIONS$1 = ['de', 'us'];
|
|
302
302
|
function getDefaultHosts$2(region) {
|
|
303
303
|
const url = !region
|
|
@@ -1194,7 +1194,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1194
1194
|
}
|
|
1195
1195
|
|
|
1196
1196
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
1197
|
-
const apiClientVersion$2 = '5.0.0-alpha.
|
|
1197
|
+
const apiClientVersion$2 = '5.0.0-alpha.5';
|
|
1198
1198
|
const REGIONS = ['eu', 'us'];
|
|
1199
1199
|
function getDefaultHosts$1(region) {
|
|
1200
1200
|
const url = 'personalization.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -1451,7 +1451,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1451
1451
|
}
|
|
1452
1452
|
|
|
1453
1453
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
1454
|
-
const apiClientVersion$1 = '5.0.0-alpha.
|
|
1454
|
+
const apiClientVersion$1 = '5.0.0-alpha.5';
|
|
1455
1455
|
function getDefaultHosts(appId) {
|
|
1456
1456
|
return [
|
|
1457
1457
|
{
|
|
@@ -1615,7 +1615,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1615
1615
|
* @param browseObjects - The browseObjects object.
|
|
1616
1616
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
1617
1617
|
* @param browseObjects.browseRequest - The `browse` method parameters.
|
|
1618
|
-
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
|
|
1618
|
+
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is no `cursor` in the response.
|
|
1619
1619
|
* @param browseObjects.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.
|
|
1620
1620
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `browse` method and merged with the transporter requestOptions.
|
|
1621
1621
|
*/
|
|
@@ -1641,7 +1641,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1641
1641
|
* @param browseObjects - The browseObjects object.
|
|
1642
1642
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
1643
1643
|
* @param browseObjects.searchRulesParams - The `searchRules` method parameters.
|
|
1644
|
-
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
|
|
1644
|
+
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is less hits returned than the number of maximum hits (1000).
|
|
1645
1645
|
* @param browseObjects.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.
|
|
1646
1646
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchRules` method and merged with the transporter requestOptions.
|
|
1647
1647
|
*/
|
|
@@ -1672,7 +1672,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1672
1672
|
* @summary Helper method that iterates on the `searchSynonyms` method.
|
|
1673
1673
|
* @param browseObjects - The browseObjects object.
|
|
1674
1674
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
1675
|
-
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
|
|
1675
|
+
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is less hits returned than the number of maximum hits (1000).
|
|
1676
1676
|
* @param browseObjects.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.
|
|
1677
1677
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchSynonyms` method and merged with the transporter requestOptions.
|
|
1678
1678
|
*/
|
|
@@ -2750,19 +2750,19 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2750
2750
|
* @param partialUpdateObject - The partialUpdateObject object.
|
|
2751
2751
|
* @param partialUpdateObject.indexName - The index in which to perform the request.
|
|
2752
2752
|
* @param partialUpdateObject.objectID - Unique identifier of an object.
|
|
2753
|
-
* @param partialUpdateObject.
|
|
2753
|
+
* @param partialUpdateObject.attributesToUpdate - Map of attribute(s) to update.
|
|
2754
2754
|
* @param partialUpdateObject.createIfNotExists - Creates the record if it does not exist yet.
|
|
2755
2755
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2756
2756
|
*/
|
|
2757
|
-
partialUpdateObject({ indexName, objectID,
|
|
2757
|
+
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists, }, requestOptions) {
|
|
2758
2758
|
if (!indexName) {
|
|
2759
2759
|
throw new Error('Parameter `indexName` is required when calling `partialUpdateObject`.');
|
|
2760
2760
|
}
|
|
2761
2761
|
if (!objectID) {
|
|
2762
2762
|
throw new Error('Parameter `objectID` is required when calling `partialUpdateObject`.');
|
|
2763
2763
|
}
|
|
2764
|
-
if (!
|
|
2765
|
-
throw new Error('Parameter `
|
|
2764
|
+
if (!attributesToUpdate) {
|
|
2765
|
+
throw new Error('Parameter `attributesToUpdate` is required when calling `partialUpdateObject`.');
|
|
2766
2766
|
}
|
|
2767
2767
|
const requestPath = '/1/indexes/{indexName}/{objectID}/partial'
|
|
2768
2768
|
.replace('{indexName}', encodeURIComponent(indexName))
|
|
@@ -2777,7 +2777,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2777
2777
|
path: requestPath,
|
|
2778
2778
|
queryParameters,
|
|
2779
2779
|
headers,
|
|
2780
|
-
data:
|
|
2780
|
+
data: attributesToUpdate,
|
|
2781
2781
|
};
|
|
2782
2782
|
return transporter.request(request, requestOptions);
|
|
2783
2783
|
},
|
|
@@ -2978,17 +2978,17 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2978
2978
|
* @summary Save a batch of rules.
|
|
2979
2979
|
* @param saveRules - The saveRules object.
|
|
2980
2980
|
* @param saveRules.indexName - The index in which to perform the request.
|
|
2981
|
-
* @param saveRules.
|
|
2981
|
+
* @param saveRules.rules - The rules object.
|
|
2982
2982
|
* @param saveRules.forwardToReplicas - When true, changes are also propagated to replicas of the given indexName.
|
|
2983
2983
|
* @param saveRules.clearExistingRules - When true, existing Rules are cleared before adding this batch. When false, existing Rules are kept.
|
|
2984
2984
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2985
2985
|
*/
|
|
2986
|
-
saveRules({ indexName,
|
|
2986
|
+
saveRules({ indexName, rules, forwardToReplicas, clearExistingRules, }, requestOptions) {
|
|
2987
2987
|
if (!indexName) {
|
|
2988
2988
|
throw new Error('Parameter `indexName` is required when calling `saveRules`.');
|
|
2989
2989
|
}
|
|
2990
|
-
if (!
|
|
2991
|
-
throw new Error('Parameter `
|
|
2990
|
+
if (!rules) {
|
|
2991
|
+
throw new Error('Parameter `rules` is required when calling `saveRules`.');
|
|
2992
2992
|
}
|
|
2993
2993
|
const requestPath = '/1/indexes/{indexName}/rules/batch'.replace('{indexName}', encodeURIComponent(indexName));
|
|
2994
2994
|
const headers = {};
|
|
@@ -3004,7 +3004,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3004
3004
|
path: requestPath,
|
|
3005
3005
|
queryParameters,
|
|
3006
3006
|
headers,
|
|
3007
|
-
data:
|
|
3007
|
+
data: rules,
|
|
3008
3008
|
};
|
|
3009
3009
|
return transporter.request(request, requestOptions);
|
|
3010
3010
|
},
|
|
@@ -715,7 +715,7 @@ const DEFAULT_READ_TIMEOUT_BROWSER = 2000;
|
|
|
715
715
|
const DEFAULT_WRITE_TIMEOUT_BROWSER = 30000;
|
|
716
716
|
|
|
717
717
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
718
|
-
const apiClientVersion$4 = '5.0.0-alpha.
|
|
718
|
+
const apiClientVersion$4 = '5.0.0-alpha.5';
|
|
719
719
|
const REGIONS$2 = ['de', 'us'];
|
|
720
720
|
function getDefaultHosts$3(region) {
|
|
721
721
|
const url = !region
|
|
@@ -1006,7 +1006,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1006
1006
|
}
|
|
1007
1007
|
|
|
1008
1008
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
1009
|
-
const apiClientVersion$3 = '5.0.0-alpha.
|
|
1009
|
+
const apiClientVersion$3 = '5.0.0-alpha.5';
|
|
1010
1010
|
const REGIONS$1 = ['de', 'us'];
|
|
1011
1011
|
function getDefaultHosts$2(region) {
|
|
1012
1012
|
const url = !region
|
|
@@ -1903,7 +1903,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1903
1903
|
}
|
|
1904
1904
|
|
|
1905
1905
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
1906
|
-
const apiClientVersion$2 = '5.0.0-alpha.
|
|
1906
|
+
const apiClientVersion$2 = '5.0.0-alpha.5';
|
|
1907
1907
|
const REGIONS = ['eu', 'us'];
|
|
1908
1908
|
function getDefaultHosts$1(region) {
|
|
1909
1909
|
const url = 'personalization.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -2160,7 +2160,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
2160
2160
|
}
|
|
2161
2161
|
|
|
2162
2162
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2163
|
-
const apiClientVersion$1 = '5.0.0-alpha.
|
|
2163
|
+
const apiClientVersion$1 = '5.0.0-alpha.5';
|
|
2164
2164
|
function getDefaultHosts(appId) {
|
|
2165
2165
|
return [
|
|
2166
2166
|
{
|
|
@@ -2324,7 +2324,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2324
2324
|
* @param browseObjects - The browseObjects object.
|
|
2325
2325
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
2326
2326
|
* @param browseObjects.browseRequest - The `browse` method parameters.
|
|
2327
|
-
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
|
|
2327
|
+
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is no `cursor` in the response.
|
|
2328
2328
|
* @param browseObjects.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.
|
|
2329
2329
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `browse` method and merged with the transporter requestOptions.
|
|
2330
2330
|
*/
|
|
@@ -2350,7 +2350,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2350
2350
|
* @param browseObjects - The browseObjects object.
|
|
2351
2351
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
2352
2352
|
* @param browseObjects.searchRulesParams - The `searchRules` method parameters.
|
|
2353
|
-
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
|
|
2353
|
+
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is less hits returned than the number of maximum hits (1000).
|
|
2354
2354
|
* @param browseObjects.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.
|
|
2355
2355
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchRules` method and merged with the transporter requestOptions.
|
|
2356
2356
|
*/
|
|
@@ -2381,7 +2381,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2381
2381
|
* @summary Helper method that iterates on the `searchSynonyms` method.
|
|
2382
2382
|
* @param browseObjects - The browseObjects object.
|
|
2383
2383
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
2384
|
-
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
|
|
2384
|
+
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is less hits returned than the number of maximum hits (1000).
|
|
2385
2385
|
* @param browseObjects.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.
|
|
2386
2386
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchSynonyms` method and merged with the transporter requestOptions.
|
|
2387
2387
|
*/
|
|
@@ -3459,19 +3459,19 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3459
3459
|
* @param partialUpdateObject - The partialUpdateObject object.
|
|
3460
3460
|
* @param partialUpdateObject.indexName - The index in which to perform the request.
|
|
3461
3461
|
* @param partialUpdateObject.objectID - Unique identifier of an object.
|
|
3462
|
-
* @param partialUpdateObject.
|
|
3462
|
+
* @param partialUpdateObject.attributesToUpdate - Map of attribute(s) to update.
|
|
3463
3463
|
* @param partialUpdateObject.createIfNotExists - Creates the record if it does not exist yet.
|
|
3464
3464
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3465
3465
|
*/
|
|
3466
|
-
partialUpdateObject({ indexName, objectID,
|
|
3466
|
+
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists, }, requestOptions) {
|
|
3467
3467
|
if (!indexName) {
|
|
3468
3468
|
throw new Error('Parameter `indexName` is required when calling `partialUpdateObject`.');
|
|
3469
3469
|
}
|
|
3470
3470
|
if (!objectID) {
|
|
3471
3471
|
throw new Error('Parameter `objectID` is required when calling `partialUpdateObject`.');
|
|
3472
3472
|
}
|
|
3473
|
-
if (!
|
|
3474
|
-
throw new Error('Parameter `
|
|
3473
|
+
if (!attributesToUpdate) {
|
|
3474
|
+
throw new Error('Parameter `attributesToUpdate` is required when calling `partialUpdateObject`.');
|
|
3475
3475
|
}
|
|
3476
3476
|
const requestPath = '/1/indexes/{indexName}/{objectID}/partial'
|
|
3477
3477
|
.replace('{indexName}', encodeURIComponent(indexName))
|
|
@@ -3486,7 +3486,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3486
3486
|
path: requestPath,
|
|
3487
3487
|
queryParameters,
|
|
3488
3488
|
headers,
|
|
3489
|
-
data:
|
|
3489
|
+
data: attributesToUpdate,
|
|
3490
3490
|
};
|
|
3491
3491
|
return transporter.request(request, requestOptions);
|
|
3492
3492
|
},
|
|
@@ -3687,17 +3687,17 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3687
3687
|
* @summary Save a batch of rules.
|
|
3688
3688
|
* @param saveRules - The saveRules object.
|
|
3689
3689
|
* @param saveRules.indexName - The index in which to perform the request.
|
|
3690
|
-
* @param saveRules.
|
|
3690
|
+
* @param saveRules.rules - The rules object.
|
|
3691
3691
|
* @param saveRules.forwardToReplicas - When true, changes are also propagated to replicas of the given indexName.
|
|
3692
3692
|
* @param saveRules.clearExistingRules - When true, existing Rules are cleared before adding this batch. When false, existing Rules are kept.
|
|
3693
3693
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3694
3694
|
*/
|
|
3695
|
-
saveRules({ indexName,
|
|
3695
|
+
saveRules({ indexName, rules, forwardToReplicas, clearExistingRules, }, requestOptions) {
|
|
3696
3696
|
if (!indexName) {
|
|
3697
3697
|
throw new Error('Parameter `indexName` is required when calling `saveRules`.');
|
|
3698
3698
|
}
|
|
3699
|
-
if (!
|
|
3700
|
-
throw new Error('Parameter `
|
|
3699
|
+
if (!rules) {
|
|
3700
|
+
throw new Error('Parameter `rules` is required when calling `saveRules`.');
|
|
3701
3701
|
}
|
|
3702
3702
|
const requestPath = '/1/indexes/{indexName}/rules/batch'.replace('{indexName}', encodeURIComponent(indexName));
|
|
3703
3703
|
const headers = {};
|
|
@@ -3713,7 +3713,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3713
3713
|
path: requestPath,
|
|
3714
3714
|
queryParameters,
|
|
3715
3715
|
headers,
|
|
3716
|
-
data:
|
|
3716
|
+
data: rules,
|
|
3717
3717
|
};
|
|
3718
3718
|
return transporter.request(request, requestOptions);
|
|
3719
3719
|
},
|
|
@@ -2,7 +2,7 @@ import { createAuth, createTransporter, getAlgoliaAgent, createIterablePromise,
|
|
|
2
2
|
import { createHttpRequester } from '@algolia/requester-node-http';
|
|
3
3
|
|
|
4
4
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
5
|
-
const apiClientVersion$4 = '5.0.0-alpha.
|
|
5
|
+
const apiClientVersion$4 = '5.0.0-alpha.5';
|
|
6
6
|
const REGIONS$2 = ['de', 'us'];
|
|
7
7
|
function getDefaultHosts$3(region) {
|
|
8
8
|
const url = !region
|
|
@@ -293,7 +293,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
293
293
|
}
|
|
294
294
|
|
|
295
295
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
296
|
-
const apiClientVersion$3 = '5.0.0-alpha.
|
|
296
|
+
const apiClientVersion$3 = '5.0.0-alpha.5';
|
|
297
297
|
const REGIONS$1 = ['de', 'us'];
|
|
298
298
|
function getDefaultHosts$2(region) {
|
|
299
299
|
const url = !region
|
|
@@ -1190,7 +1190,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1190
1190
|
}
|
|
1191
1191
|
|
|
1192
1192
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
1193
|
-
const apiClientVersion$2 = '5.0.0-alpha.
|
|
1193
|
+
const apiClientVersion$2 = '5.0.0-alpha.5';
|
|
1194
1194
|
const REGIONS = ['eu', 'us'];
|
|
1195
1195
|
function getDefaultHosts$1(region) {
|
|
1196
1196
|
const url = 'personalization.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -1447,7 +1447,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1447
1447
|
}
|
|
1448
1448
|
|
|
1449
1449
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
1450
|
-
const apiClientVersion$1 = '5.0.0-alpha.
|
|
1450
|
+
const apiClientVersion$1 = '5.0.0-alpha.5';
|
|
1451
1451
|
function getDefaultHosts(appId) {
|
|
1452
1452
|
return [
|
|
1453
1453
|
{
|
|
@@ -1611,7 +1611,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1611
1611
|
* @param browseObjects - The browseObjects object.
|
|
1612
1612
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
1613
1613
|
* @param browseObjects.browseRequest - The `browse` method parameters.
|
|
1614
|
-
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
|
|
1614
|
+
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is no `cursor` in the response.
|
|
1615
1615
|
* @param browseObjects.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.
|
|
1616
1616
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `browse` method and merged with the transporter requestOptions.
|
|
1617
1617
|
*/
|
|
@@ -1637,7 +1637,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1637
1637
|
* @param browseObjects - The browseObjects object.
|
|
1638
1638
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
1639
1639
|
* @param browseObjects.searchRulesParams - The `searchRules` method parameters.
|
|
1640
|
-
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
|
|
1640
|
+
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is less hits returned than the number of maximum hits (1000).
|
|
1641
1641
|
* @param browseObjects.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.
|
|
1642
1642
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchRules` method and merged with the transporter requestOptions.
|
|
1643
1643
|
*/
|
|
@@ -1668,7 +1668,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1668
1668
|
* @summary Helper method that iterates on the `searchSynonyms` method.
|
|
1669
1669
|
* @param browseObjects - The browseObjects object.
|
|
1670
1670
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
1671
|
-
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
|
|
1671
|
+
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is less hits returned than the number of maximum hits (1000).
|
|
1672
1672
|
* @param browseObjects.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.
|
|
1673
1673
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchSynonyms` method and merged with the transporter requestOptions.
|
|
1674
1674
|
*/
|
|
@@ -2746,19 +2746,19 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2746
2746
|
* @param partialUpdateObject - The partialUpdateObject object.
|
|
2747
2747
|
* @param partialUpdateObject.indexName - The index in which to perform the request.
|
|
2748
2748
|
* @param partialUpdateObject.objectID - Unique identifier of an object.
|
|
2749
|
-
* @param partialUpdateObject.
|
|
2749
|
+
* @param partialUpdateObject.attributesToUpdate - Map of attribute(s) to update.
|
|
2750
2750
|
* @param partialUpdateObject.createIfNotExists - Creates the record if it does not exist yet.
|
|
2751
2751
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2752
2752
|
*/
|
|
2753
|
-
partialUpdateObject({ indexName, objectID,
|
|
2753
|
+
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists, }, requestOptions) {
|
|
2754
2754
|
if (!indexName) {
|
|
2755
2755
|
throw new Error('Parameter `indexName` is required when calling `partialUpdateObject`.');
|
|
2756
2756
|
}
|
|
2757
2757
|
if (!objectID) {
|
|
2758
2758
|
throw new Error('Parameter `objectID` is required when calling `partialUpdateObject`.');
|
|
2759
2759
|
}
|
|
2760
|
-
if (!
|
|
2761
|
-
throw new Error('Parameter `
|
|
2760
|
+
if (!attributesToUpdate) {
|
|
2761
|
+
throw new Error('Parameter `attributesToUpdate` is required when calling `partialUpdateObject`.');
|
|
2762
2762
|
}
|
|
2763
2763
|
const requestPath = '/1/indexes/{indexName}/{objectID}/partial'
|
|
2764
2764
|
.replace('{indexName}', encodeURIComponent(indexName))
|
|
@@ -2773,7 +2773,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2773
2773
|
path: requestPath,
|
|
2774
2774
|
queryParameters,
|
|
2775
2775
|
headers,
|
|
2776
|
-
data:
|
|
2776
|
+
data: attributesToUpdate,
|
|
2777
2777
|
};
|
|
2778
2778
|
return transporter.request(request, requestOptions);
|
|
2779
2779
|
},
|
|
@@ -2974,17 +2974,17 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2974
2974
|
* @summary Save a batch of rules.
|
|
2975
2975
|
* @param saveRules - The saveRules object.
|
|
2976
2976
|
* @param saveRules.indexName - The index in which to perform the request.
|
|
2977
|
-
* @param saveRules.
|
|
2977
|
+
* @param saveRules.rules - The rules object.
|
|
2978
2978
|
* @param saveRules.forwardToReplicas - When true, changes are also propagated to replicas of the given indexName.
|
|
2979
2979
|
* @param saveRules.clearExistingRules - When true, existing Rules are cleared before adding this batch. When false, existing Rules are kept.
|
|
2980
2980
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2981
2981
|
*/
|
|
2982
|
-
saveRules({ indexName,
|
|
2982
|
+
saveRules({ indexName, rules, forwardToReplicas, clearExistingRules, }, requestOptions) {
|
|
2983
2983
|
if (!indexName) {
|
|
2984
2984
|
throw new Error('Parameter `indexName` is required when calling `saveRules`.');
|
|
2985
2985
|
}
|
|
2986
|
-
if (!
|
|
2987
|
-
throw new Error('Parameter `
|
|
2986
|
+
if (!rules) {
|
|
2987
|
+
throw new Error('Parameter `rules` is required when calling `saveRules`.');
|
|
2988
2988
|
}
|
|
2989
2989
|
const requestPath = '/1/indexes/{indexName}/rules/batch'.replace('{indexName}', encodeURIComponent(indexName));
|
|
2990
2990
|
const headers = {};
|
|
@@ -3000,7 +3000,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3000
3000
|
path: requestPath,
|
|
3001
3001
|
queryParameters,
|
|
3002
3002
|
headers,
|
|
3003
|
-
data:
|
|
3003
|
+
data: rules,
|
|
3004
3004
|
};
|
|
3005
3005
|
return transporter.request(request, requestOptions);
|
|
3006
3006
|
},
|