algoliasearch 5.0.0-alpha.97 → 5.0.0-alpha.99
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.cjs +41 -49
- package/dist/algoliasearch.esm.browser.js +41 -49
- package/dist/algoliasearch.esm.node.js +41 -49
- package/dist/algoliasearch.umd.js +2 -2
- package/dist/client-abtesting/model/variant.d.ts +4 -0
- package/dist/client-abtesting/model/variant.d.ts.map +1 -1
- 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 +10 -23
- package/dist/client-search/model/clientMethodProps.d.ts.map +1 -1
- package/dist/client-search/model/searchSynonymsParams.d.ts +10 -0
- package/dist/client-search/model/searchSynonymsParams.d.ts.map +1 -1
- package/dist/client-search/src/searchClient.d.ts +15 -17
- package/dist/client-search/src/searchClient.d.ts.map +1 -1
- package/dist/lite/lite.cjs +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/dist/lite/src/liteClient.d.ts +1 -1
- package/lite/src/liteClient.ts +1 -1
- package/package.json +11 -11
|
@@ -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.99";
|
|
8
8
|
/**
|
|
9
9
|
* The client type.
|
|
10
10
|
*/
|
|
@@ -22,7 +22,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
22
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, browseParams, ...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
|
-
browseSynonyms({ indexName,
|
|
25
|
+
browseSynonyms({ indexName, searchSynonymsParams, ...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>;
|
|
26
26
|
searchForHits<T_1>(searchMethodParams: import("@algolia/client-search/model/clientMethodProps").LegacySearchMethodProps | import("@algolia/client-search/model/searchMethodParams").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<{
|
|
27
27
|
results: import("@algolia/client-search/model/searchResponse").SearchResponse<T_1>[];
|
|
28
28
|
}>;
|
|
@@ -37,9 +37,9 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
37
37
|
batchAssignUserIds({ xAlgoliaUserID, batchAssignUserIdsParams }: import("@algolia/client-search/model/clientMethodProps").BatchAssignUserIdsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/createdAtResponse").CreatedAtResponse>;
|
|
38
38
|
batchDictionaryEntries({ dictionaryName, batchDictionaryEntriesParams, }: import("@algolia/client-search/model/clientMethodProps").BatchDictionaryEntriesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
39
39
|
browse<T_2>({ indexName, browseParams }: import("@algolia/client-search/model/clientMethodProps").BrowseProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T_2>>;
|
|
40
|
-
clearAllSynonyms({ indexName, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").ClearAllSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
41
40
|
clearObjects({ indexName }: import("@algolia/client-search/model/clientMethodProps").ClearObjectsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
42
41
|
clearRules({ indexName, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").ClearRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
42
|
+
clearSynonyms({ indexName, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").ClearSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
43
43
|
customDelete({ path, parameters }: import("@algolia/client-search/model/clientMethodProps").CustomDeleteProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
|
|
44
44
|
customGet({ path, parameters }: import("@algolia/client-search/model/clientMethodProps").CustomGetProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
|
|
45
45
|
customPost({ path, parameters, body }: import("@algolia/client-search/model/clientMethodProps").CustomPostProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
|
|
@@ -85,7 +85,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
85
85
|
searchForFacetValues({ indexName, facetName, searchForFacetValuesRequest, }: import("@algolia/client-search/model/clientMethodProps").SearchForFacetValuesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchForFacetValuesResponse").SearchForFacetValuesResponse>;
|
|
86
86
|
searchRules({ indexName, searchRulesParams }: import("@algolia/client-search/model/clientMethodProps").SearchRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>;
|
|
87
87
|
searchSingleIndex<T_5>({ indexName, searchParams }: import("@algolia/client-search/model/clientMethodProps").SearchSingleIndexProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchResponse").SearchResponse<T_5>>;
|
|
88
|
-
searchSynonyms({ indexName,
|
|
88
|
+
searchSynonyms({ indexName, searchSynonymsParams }: import("@algolia/client-search/model/clientMethodProps").SearchSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>;
|
|
89
89
|
searchUserIds(searchUserIdsParams: import("@algolia/client-search/model/searchUserIdsParams").SearchUserIdsParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchUserIdsResponse").SearchUserIdsResponse>;
|
|
90
90
|
setDictionarySettings(dictionarySettingsParams: import("@algolia/client-search/model/dictionarySettingsParams").DictionarySettingsParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
91
91
|
setSettings({ indexName, indexSettings, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").SetSettingsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
@@ -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.99";
|
|
8
8
|
/**
|
|
9
9
|
* The client type.
|
|
10
10
|
*/
|
|
@@ -22,7 +22,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
22
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, browseParams, ...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
|
-
browseSynonyms({ indexName,
|
|
25
|
+
browseSynonyms({ indexName, searchSynonymsParams, ...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>;
|
|
26
26
|
searchForHits<T_1>(searchMethodParams: import("@algolia/client-search/model/clientMethodProps").LegacySearchMethodProps | import("@algolia/client-search/model/searchMethodParams").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<{
|
|
27
27
|
results: import("@algolia/client-search/model/searchResponse").SearchResponse<T_1>[];
|
|
28
28
|
}>;
|
|
@@ -37,9 +37,9 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
37
37
|
batchAssignUserIds({ xAlgoliaUserID, batchAssignUserIdsParams }: import("@algolia/client-search/model/clientMethodProps").BatchAssignUserIdsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/createdAtResponse").CreatedAtResponse>;
|
|
38
38
|
batchDictionaryEntries({ dictionaryName, batchDictionaryEntriesParams, }: import("@algolia/client-search/model/clientMethodProps").BatchDictionaryEntriesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
39
39
|
browse<T_2>({ indexName, browseParams }: import("@algolia/client-search/model/clientMethodProps").BrowseProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T_2>>;
|
|
40
|
-
clearAllSynonyms({ indexName, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").ClearAllSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
41
40
|
clearObjects({ indexName }: import("@algolia/client-search/model/clientMethodProps").ClearObjectsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
42
41
|
clearRules({ indexName, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").ClearRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
42
|
+
clearSynonyms({ indexName, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").ClearSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
43
43
|
customDelete({ path, parameters }: import("@algolia/client-search/model/clientMethodProps").CustomDeleteProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
|
|
44
44
|
customGet({ path, parameters }: import("@algolia/client-search/model/clientMethodProps").CustomGetProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
|
|
45
45
|
customPost({ path, parameters, body }: import("@algolia/client-search/model/clientMethodProps").CustomPostProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
|
|
@@ -85,7 +85,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
85
85
|
searchForFacetValues({ indexName, facetName, searchForFacetValuesRequest, }: import("@algolia/client-search/model/clientMethodProps").SearchForFacetValuesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchForFacetValuesResponse").SearchForFacetValuesResponse>;
|
|
86
86
|
searchRules({ indexName, searchRulesParams }: import("@algolia/client-search/model/clientMethodProps").SearchRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>;
|
|
87
87
|
searchSingleIndex<T_5>({ indexName, searchParams }: import("@algolia/client-search/model/clientMethodProps").SearchSingleIndexProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchResponse").SearchResponse<T_5>>;
|
|
88
|
-
searchSynonyms({ indexName,
|
|
88
|
+
searchSynonyms({ indexName, searchSynonymsParams }: import("@algolia/client-search/model/clientMethodProps").SearchSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>;
|
|
89
89
|
searchUserIds(searchUserIdsParams: import("@algolia/client-search/model/searchUserIdsParams").SearchUserIdsParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchUserIdsResponse").SearchUserIdsResponse>;
|
|
90
90
|
setDictionarySettings(dictionarySettingsParams: import("@algolia/client-search/model/dictionarySettingsParams").DictionarySettingsParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
91
91
|
setSettings({ indexName, indexSettings, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").SetSettingsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
package/dist/algoliasearch.cjs
CHANGED
|
@@ -4,7 +4,7 @@ var clientCommon = require('@algolia/client-common');
|
|
|
4
4
|
var requesterNodeHttp = require('@algolia/requester-node-http');
|
|
5
5
|
|
|
6
6
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
7
|
-
const apiClientVersion$4 = '5.0.0-alpha.
|
|
7
|
+
const apiClientVersion$4 = '5.0.0-alpha.99';
|
|
8
8
|
const REGIONS$2 = ['de', 'us'];
|
|
9
9
|
function getDefaultHosts$3(region) {
|
|
10
10
|
const url = !region
|
|
@@ -303,7 +303,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
303
303
|
}
|
|
304
304
|
|
|
305
305
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
306
|
-
const apiClientVersion$3 = '5.0.0-alpha.
|
|
306
|
+
const apiClientVersion$3 = '5.0.0-alpha.99';
|
|
307
307
|
const REGIONS$1 = ['de', 'us'];
|
|
308
308
|
function getDefaultHosts$2(region) {
|
|
309
309
|
const url = !region
|
|
@@ -1200,7 +1200,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1200
1200
|
}
|
|
1201
1201
|
|
|
1202
1202
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
1203
|
-
const apiClientVersion$2 = '5.0.0-alpha.
|
|
1203
|
+
const apiClientVersion$2 = '5.0.0-alpha.99';
|
|
1204
1204
|
const REGIONS = ['eu', 'us'];
|
|
1205
1205
|
function getDefaultHosts$1(region) {
|
|
1206
1206
|
const url = 'personalization.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -1457,7 +1457,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1457
1457
|
}
|
|
1458
1458
|
|
|
1459
1459
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
1460
|
-
const apiClientVersion$1 = '5.0.0-alpha.
|
|
1460
|
+
const apiClientVersion$1 = '5.0.0-alpha.99';
|
|
1461
1461
|
function getDefaultHosts(appId) {
|
|
1462
1462
|
return [
|
|
1463
1463
|
{
|
|
@@ -1682,21 +1682,25 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1682
1682
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
1683
1683
|
* @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).
|
|
1684
1684
|
* @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`.
|
|
1685
|
+
* @param browseObjects.searchSynonymsParams - The `searchSynonyms` method parameters.
|
|
1685
1686
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchSynonyms` method and merged with the transporter requestOptions.
|
|
1686
1687
|
*/
|
|
1687
|
-
browseSynonyms({ indexName,
|
|
1688
|
+
browseSynonyms({ indexName, searchSynonymsParams, ...browseSynonymsOptions }, requestOptions) {
|
|
1688
1689
|
const params = {
|
|
1690
|
+
page: 0,
|
|
1691
|
+
...searchSynonymsParams,
|
|
1689
1692
|
hitsPerPage: 1000,
|
|
1690
|
-
...browseSynonymsOptions,
|
|
1691
1693
|
};
|
|
1692
1694
|
return clientCommon.createIterablePromise({
|
|
1693
1695
|
func: (previousResponse) => {
|
|
1694
1696
|
return this.searchSynonyms({
|
|
1695
|
-
...params,
|
|
1696
1697
|
indexName,
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
:
|
|
1698
|
+
searchSynonymsParams: {
|
|
1699
|
+
...params,
|
|
1700
|
+
page: previousResponse
|
|
1701
|
+
? previousResponse.page + 1
|
|
1702
|
+
: params.page,
|
|
1703
|
+
},
|
|
1700
1704
|
}, requestOptions);
|
|
1701
1705
|
},
|
|
1702
1706
|
validate: (response) => response.nbHits < params.hitsPerPage,
|
|
@@ -1970,24 +1974,20 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1970
1974
|
return transporter.request(request, requestOptions);
|
|
1971
1975
|
},
|
|
1972
1976
|
/**
|
|
1973
|
-
* Delete
|
|
1977
|
+
* Delete the records but leave settings and index-specific API keys untouched.
|
|
1974
1978
|
*
|
|
1975
|
-
* @summary Delete all
|
|
1976
|
-
* @param
|
|
1977
|
-
* @param
|
|
1978
|
-
* @param clearAllSynonyms.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices.
|
|
1979
|
+
* @summary Delete all records from an index.
|
|
1980
|
+
* @param clearObjects - The clearObjects object.
|
|
1981
|
+
* @param clearObjects.indexName - Index on which to perform the request.
|
|
1979
1982
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1980
1983
|
*/
|
|
1981
|
-
|
|
1984
|
+
clearObjects({ indexName }, requestOptions) {
|
|
1982
1985
|
if (!indexName) {
|
|
1983
|
-
throw new Error('Parameter `indexName` is required when calling `
|
|
1986
|
+
throw new Error('Parameter `indexName` is required when calling `clearObjects`.');
|
|
1984
1987
|
}
|
|
1985
|
-
const requestPath = '/1/indexes/{indexName}/
|
|
1988
|
+
const requestPath = '/1/indexes/{indexName}/clear'.replace('{indexName}', encodeURIComponent(indexName));
|
|
1986
1989
|
const headers = {};
|
|
1987
1990
|
const queryParameters = {};
|
|
1988
|
-
if (forwardToReplicas !== undefined) {
|
|
1989
|
-
queryParameters.forwardToReplicas = forwardToReplicas.toString();
|
|
1990
|
-
}
|
|
1991
1991
|
const request = {
|
|
1992
1992
|
method: 'POST',
|
|
1993
1993
|
path: requestPath,
|
|
@@ -1997,20 +1997,24 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1997
1997
|
return transporter.request(request, requestOptions);
|
|
1998
1998
|
},
|
|
1999
1999
|
/**
|
|
2000
|
-
* Delete
|
|
2000
|
+
* Delete all rules in the index.
|
|
2001
2001
|
*
|
|
2002
|
-
* @summary Delete all
|
|
2003
|
-
* @param
|
|
2004
|
-
* @param
|
|
2002
|
+
* @summary Delete all rules.
|
|
2003
|
+
* @param clearRules - The clearRules object.
|
|
2004
|
+
* @param clearRules.indexName - Index on which to perform the request.
|
|
2005
|
+
* @param clearRules.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices.
|
|
2005
2006
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2006
2007
|
*/
|
|
2007
|
-
|
|
2008
|
+
clearRules({ indexName, forwardToReplicas }, requestOptions) {
|
|
2008
2009
|
if (!indexName) {
|
|
2009
|
-
throw new Error('Parameter `indexName` is required when calling `
|
|
2010
|
+
throw new Error('Parameter `indexName` is required when calling `clearRules`.');
|
|
2010
2011
|
}
|
|
2011
|
-
const requestPath = '/1/indexes/{indexName}/clear'.replace('{indexName}', encodeURIComponent(indexName));
|
|
2012
|
+
const requestPath = '/1/indexes/{indexName}/rules/clear'.replace('{indexName}', encodeURIComponent(indexName));
|
|
2012
2013
|
const headers = {};
|
|
2013
2014
|
const queryParameters = {};
|
|
2015
|
+
if (forwardToReplicas !== undefined) {
|
|
2016
|
+
queryParameters.forwardToReplicas = forwardToReplicas.toString();
|
|
2017
|
+
}
|
|
2014
2018
|
const request = {
|
|
2015
2019
|
method: 'POST',
|
|
2016
2020
|
path: requestPath,
|
|
@@ -2020,19 +2024,19 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2020
2024
|
return transporter.request(request, requestOptions);
|
|
2021
2025
|
},
|
|
2022
2026
|
/**
|
|
2023
|
-
* Delete all
|
|
2027
|
+
* Delete all synonyms in the index.
|
|
2024
2028
|
*
|
|
2025
|
-
* @summary Delete all
|
|
2026
|
-
* @param
|
|
2027
|
-
* @param
|
|
2028
|
-
* @param
|
|
2029
|
+
* @summary Delete all synonyms.
|
|
2030
|
+
* @param clearSynonyms - The clearSynonyms object.
|
|
2031
|
+
* @param clearSynonyms.indexName - Index on which to perform the request.
|
|
2032
|
+
* @param clearSynonyms.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices.
|
|
2029
2033
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2030
2034
|
*/
|
|
2031
|
-
|
|
2035
|
+
clearSynonyms({ indexName, forwardToReplicas }, requestOptions) {
|
|
2032
2036
|
if (!indexName) {
|
|
2033
|
-
throw new Error('Parameter `indexName` is required when calling `
|
|
2037
|
+
throw new Error('Parameter `indexName` is required when calling `clearSynonyms`.');
|
|
2034
2038
|
}
|
|
2035
|
-
const requestPath = '/1/indexes/{indexName}/
|
|
2039
|
+
const requestPath = '/1/indexes/{indexName}/synonyms/clear'.replace('{indexName}', encodeURIComponent(indexName));
|
|
2036
2040
|
const headers = {};
|
|
2037
2041
|
const queryParameters = {};
|
|
2038
2042
|
if (forwardToReplicas !== undefined) {
|
|
@@ -3305,28 +3309,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3305
3309
|
* @summary Search for synonyms.
|
|
3306
3310
|
* @param searchSynonyms - The searchSynonyms object.
|
|
3307
3311
|
* @param searchSynonyms.indexName - Index on which to perform the request.
|
|
3308
|
-
* @param searchSynonyms.type - Search for specific [types of synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms).
|
|
3309
|
-
* @param searchSynonyms.page - Returns the requested page number (the first page is 0). Page size is set by `hitsPerPage`. When null, there\'s no pagination.
|
|
3310
|
-
* @param searchSynonyms.hitsPerPage - Maximum number of hits per page.
|
|
3311
3312
|
* @param searchSynonyms.searchSynonymsParams - Body of the `searchSynonyms` operation.
|
|
3312
3313
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3313
3314
|
*/
|
|
3314
|
-
searchSynonyms({ indexName,
|
|
3315
|
+
searchSynonyms({ indexName, searchSynonymsParams }, requestOptions) {
|
|
3315
3316
|
if (!indexName) {
|
|
3316
3317
|
throw new Error('Parameter `indexName` is required when calling `searchSynonyms`.');
|
|
3317
3318
|
}
|
|
3318
3319
|
const requestPath = '/1/indexes/{indexName}/synonyms/search'.replace('{indexName}', encodeURIComponent(indexName));
|
|
3319
3320
|
const headers = {};
|
|
3320
3321
|
const queryParameters = {};
|
|
3321
|
-
if (type !== undefined) {
|
|
3322
|
-
queryParameters.type = type.toString();
|
|
3323
|
-
}
|
|
3324
|
-
if (page !== undefined) {
|
|
3325
|
-
queryParameters.page = page.toString();
|
|
3326
|
-
}
|
|
3327
|
-
if (hitsPerPage !== undefined) {
|
|
3328
|
-
queryParameters.hitsPerPage = hitsPerPage.toString();
|
|
3329
|
-
}
|
|
3330
3322
|
const request = {
|
|
3331
3323
|
method: 'POST',
|
|
3332
3324
|
path: requestPath,
|
|
@@ -685,7 +685,7 @@ const DEFAULT_READ_TIMEOUT_BROWSER = 2000;
|
|
|
685
685
|
const DEFAULT_WRITE_TIMEOUT_BROWSER = 30000;
|
|
686
686
|
|
|
687
687
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
688
|
-
const apiClientVersion$4 = '5.0.0-alpha.
|
|
688
|
+
const apiClientVersion$4 = '5.0.0-alpha.99';
|
|
689
689
|
const REGIONS$2 = ['de', 'us'];
|
|
690
690
|
function getDefaultHosts$3(region) {
|
|
691
691
|
const url = !region
|
|
@@ -984,7 +984,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
984
984
|
}
|
|
985
985
|
|
|
986
986
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
987
|
-
const apiClientVersion$3 = '5.0.0-alpha.
|
|
987
|
+
const apiClientVersion$3 = '5.0.0-alpha.99';
|
|
988
988
|
const REGIONS$1 = ['de', 'us'];
|
|
989
989
|
function getDefaultHosts$2(region) {
|
|
990
990
|
const url = !region
|
|
@@ -1881,7 +1881,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1881
1881
|
}
|
|
1882
1882
|
|
|
1883
1883
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
1884
|
-
const apiClientVersion$2 = '5.0.0-alpha.
|
|
1884
|
+
const apiClientVersion$2 = '5.0.0-alpha.99';
|
|
1885
1885
|
const REGIONS = ['eu', 'us'];
|
|
1886
1886
|
function getDefaultHosts$1(region) {
|
|
1887
1887
|
const url = 'personalization.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -2138,7 +2138,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
2138
2138
|
}
|
|
2139
2139
|
|
|
2140
2140
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2141
|
-
const apiClientVersion$1 = '5.0.0-alpha.
|
|
2141
|
+
const apiClientVersion$1 = '5.0.0-alpha.99';
|
|
2142
2142
|
function getDefaultHosts(appId) {
|
|
2143
2143
|
return [
|
|
2144
2144
|
{
|
|
@@ -2363,21 +2363,25 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2363
2363
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
2364
2364
|
* @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).
|
|
2365
2365
|
* @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`.
|
|
2366
|
+
* @param browseObjects.searchSynonymsParams - The `searchSynonyms` method parameters.
|
|
2366
2367
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchSynonyms` method and merged with the transporter requestOptions.
|
|
2367
2368
|
*/
|
|
2368
|
-
browseSynonyms({ indexName,
|
|
2369
|
+
browseSynonyms({ indexName, searchSynonymsParams, ...browseSynonymsOptions }, requestOptions) {
|
|
2369
2370
|
const params = {
|
|
2371
|
+
page: 0,
|
|
2372
|
+
...searchSynonymsParams,
|
|
2370
2373
|
hitsPerPage: 1000,
|
|
2371
|
-
...browseSynonymsOptions,
|
|
2372
2374
|
};
|
|
2373
2375
|
return createIterablePromise({
|
|
2374
2376
|
func: (previousResponse) => {
|
|
2375
2377
|
return this.searchSynonyms({
|
|
2376
|
-
...params,
|
|
2377
2378
|
indexName,
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
:
|
|
2379
|
+
searchSynonymsParams: {
|
|
2380
|
+
...params,
|
|
2381
|
+
page: previousResponse
|
|
2382
|
+
? previousResponse.page + 1
|
|
2383
|
+
: params.page,
|
|
2384
|
+
},
|
|
2381
2385
|
}, requestOptions);
|
|
2382
2386
|
},
|
|
2383
2387
|
validate: (response) => response.nbHits < params.hitsPerPage,
|
|
@@ -2651,24 +2655,20 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2651
2655
|
return transporter.request(request, requestOptions);
|
|
2652
2656
|
},
|
|
2653
2657
|
/**
|
|
2654
|
-
* Delete
|
|
2658
|
+
* Delete the records but leave settings and index-specific API keys untouched.
|
|
2655
2659
|
*
|
|
2656
|
-
* @summary Delete all
|
|
2657
|
-
* @param
|
|
2658
|
-
* @param
|
|
2659
|
-
* @param clearAllSynonyms.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices.
|
|
2660
|
+
* @summary Delete all records from an index.
|
|
2661
|
+
* @param clearObjects - The clearObjects object.
|
|
2662
|
+
* @param clearObjects.indexName - Index on which to perform the request.
|
|
2660
2663
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2661
2664
|
*/
|
|
2662
|
-
|
|
2665
|
+
clearObjects({ indexName }, requestOptions) {
|
|
2663
2666
|
if (!indexName) {
|
|
2664
|
-
throw new Error('Parameter `indexName` is required when calling `
|
|
2667
|
+
throw new Error('Parameter `indexName` is required when calling `clearObjects`.');
|
|
2665
2668
|
}
|
|
2666
|
-
const requestPath = '/1/indexes/{indexName}/
|
|
2669
|
+
const requestPath = '/1/indexes/{indexName}/clear'.replace('{indexName}', encodeURIComponent(indexName));
|
|
2667
2670
|
const headers = {};
|
|
2668
2671
|
const queryParameters = {};
|
|
2669
|
-
if (forwardToReplicas !== undefined) {
|
|
2670
|
-
queryParameters.forwardToReplicas = forwardToReplicas.toString();
|
|
2671
|
-
}
|
|
2672
2672
|
const request = {
|
|
2673
2673
|
method: 'POST',
|
|
2674
2674
|
path: requestPath,
|
|
@@ -2678,20 +2678,24 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2678
2678
|
return transporter.request(request, requestOptions);
|
|
2679
2679
|
},
|
|
2680
2680
|
/**
|
|
2681
|
-
* Delete
|
|
2681
|
+
* Delete all rules in the index.
|
|
2682
2682
|
*
|
|
2683
|
-
* @summary Delete all
|
|
2684
|
-
* @param
|
|
2685
|
-
* @param
|
|
2683
|
+
* @summary Delete all rules.
|
|
2684
|
+
* @param clearRules - The clearRules object.
|
|
2685
|
+
* @param clearRules.indexName - Index on which to perform the request.
|
|
2686
|
+
* @param clearRules.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices.
|
|
2686
2687
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2687
2688
|
*/
|
|
2688
|
-
|
|
2689
|
+
clearRules({ indexName, forwardToReplicas }, requestOptions) {
|
|
2689
2690
|
if (!indexName) {
|
|
2690
|
-
throw new Error('Parameter `indexName` is required when calling `
|
|
2691
|
+
throw new Error('Parameter `indexName` is required when calling `clearRules`.');
|
|
2691
2692
|
}
|
|
2692
|
-
const requestPath = '/1/indexes/{indexName}/clear'.replace('{indexName}', encodeURIComponent(indexName));
|
|
2693
|
+
const requestPath = '/1/indexes/{indexName}/rules/clear'.replace('{indexName}', encodeURIComponent(indexName));
|
|
2693
2694
|
const headers = {};
|
|
2694
2695
|
const queryParameters = {};
|
|
2696
|
+
if (forwardToReplicas !== undefined) {
|
|
2697
|
+
queryParameters.forwardToReplicas = forwardToReplicas.toString();
|
|
2698
|
+
}
|
|
2695
2699
|
const request = {
|
|
2696
2700
|
method: 'POST',
|
|
2697
2701
|
path: requestPath,
|
|
@@ -2701,19 +2705,19 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2701
2705
|
return transporter.request(request, requestOptions);
|
|
2702
2706
|
},
|
|
2703
2707
|
/**
|
|
2704
|
-
* Delete all
|
|
2708
|
+
* Delete all synonyms in the index.
|
|
2705
2709
|
*
|
|
2706
|
-
* @summary Delete all
|
|
2707
|
-
* @param
|
|
2708
|
-
* @param
|
|
2709
|
-
* @param
|
|
2710
|
+
* @summary Delete all synonyms.
|
|
2711
|
+
* @param clearSynonyms - The clearSynonyms object.
|
|
2712
|
+
* @param clearSynonyms.indexName - Index on which to perform the request.
|
|
2713
|
+
* @param clearSynonyms.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices.
|
|
2710
2714
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2711
2715
|
*/
|
|
2712
|
-
|
|
2716
|
+
clearSynonyms({ indexName, forwardToReplicas }, requestOptions) {
|
|
2713
2717
|
if (!indexName) {
|
|
2714
|
-
throw new Error('Parameter `indexName` is required when calling `
|
|
2718
|
+
throw new Error('Parameter `indexName` is required when calling `clearSynonyms`.');
|
|
2715
2719
|
}
|
|
2716
|
-
const requestPath = '/1/indexes/{indexName}/
|
|
2720
|
+
const requestPath = '/1/indexes/{indexName}/synonyms/clear'.replace('{indexName}', encodeURIComponent(indexName));
|
|
2717
2721
|
const headers = {};
|
|
2718
2722
|
const queryParameters = {};
|
|
2719
2723
|
if (forwardToReplicas !== undefined) {
|
|
@@ -3986,28 +3990,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3986
3990
|
* @summary Search for synonyms.
|
|
3987
3991
|
* @param searchSynonyms - The searchSynonyms object.
|
|
3988
3992
|
* @param searchSynonyms.indexName - Index on which to perform the request.
|
|
3989
|
-
* @param searchSynonyms.type - Search for specific [types of synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms).
|
|
3990
|
-
* @param searchSynonyms.page - Returns the requested page number (the first page is 0). Page size is set by `hitsPerPage`. When null, there\'s no pagination.
|
|
3991
|
-
* @param searchSynonyms.hitsPerPage - Maximum number of hits per page.
|
|
3992
3993
|
* @param searchSynonyms.searchSynonymsParams - Body of the `searchSynonyms` operation.
|
|
3993
3994
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3994
3995
|
*/
|
|
3995
|
-
searchSynonyms({ indexName,
|
|
3996
|
+
searchSynonyms({ indexName, searchSynonymsParams }, requestOptions) {
|
|
3996
3997
|
if (!indexName) {
|
|
3997
3998
|
throw new Error('Parameter `indexName` is required when calling `searchSynonyms`.');
|
|
3998
3999
|
}
|
|
3999
4000
|
const requestPath = '/1/indexes/{indexName}/synonyms/search'.replace('{indexName}', encodeURIComponent(indexName));
|
|
4000
4001
|
const headers = {};
|
|
4001
4002
|
const queryParameters = {};
|
|
4002
|
-
if (type !== undefined) {
|
|
4003
|
-
queryParameters.type = type.toString();
|
|
4004
|
-
}
|
|
4005
|
-
if (page !== undefined) {
|
|
4006
|
-
queryParameters.page = page.toString();
|
|
4007
|
-
}
|
|
4008
|
-
if (hitsPerPage !== undefined) {
|
|
4009
|
-
queryParameters.hitsPerPage = hitsPerPage.toString();
|
|
4010
|
-
}
|
|
4011
4003
|
const request = {
|
|
4012
4004
|
method: 'POST',
|
|
4013
4005
|
path: requestPath,
|