@algolia/client-search 5.0.0-alpha.4 → 5.0.0-alpha.40
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/builds/browser.d.ts.map +1 -1
- package/dist/builds/node.d.ts.map +1 -1
- package/dist/client-search.cjs.js +33 -30
- package/dist/client-search.esm.browser.js +92 -143
- package/dist/client-search.esm.node.js +33 -30
- package/dist/client-search.umd.js +2 -2
- package/dist/model/acl.d.ts.map +1 -1
- package/dist/model/action.d.ts.map +1 -1
- package/dist/model/addApiKeyResponse.d.ts.map +1 -1
- package/dist/model/advancedSyntaxFeatures.d.ts.map +1 -1
- package/dist/model/alternativesAsExact.d.ts.map +1 -1
- package/dist/model/anchoring.d.ts.map +1 -1
- package/dist/model/apiKey.d.ts.map +1 -1
- package/dist/model/aroundRadius.d.ts.map +1 -1
- package/dist/model/aroundRadiusAll.d.ts.map +1 -1
- package/dist/model/assignUserIdParams.d.ts.map +1 -1
- package/dist/model/attributeToUpdate.d.ts.map +1 -1
- package/dist/model/automaticFacetFilter.d.ts.map +1 -1
- package/dist/model/automaticFacetFilters.d.ts.map +1 -1
- package/dist/model/baseGetApiKeyResponse.d.ts.map +1 -1
- package/dist/model/baseIndexSettings.d.ts +4 -0
- package/dist/model/baseIndexSettings.d.ts.map +1 -1
- package/dist/model/baseSearchParams.d.ts.map +1 -1
- package/dist/model/baseSearchParamsWithoutQuery.d.ts.map +1 -1
- package/dist/model/baseSearchResponse.d.ts +1 -1
- package/dist/model/baseSearchResponse.d.ts.map +1 -1
- package/dist/model/batchAssignUserIdsParams.d.ts.map +1 -1
- package/dist/model/batchDictionaryEntriesParams.d.ts.map +1 -1
- package/dist/model/batchDictionaryEntriesRequest.d.ts.map +1 -1
- package/dist/model/batchParams.d.ts.map +1 -1
- package/dist/model/batchRequest.d.ts +2 -2
- package/dist/model/batchRequest.d.ts.map +1 -1
- package/dist/model/batchResponse.d.ts.map +1 -1
- package/dist/model/batchWriteParams.d.ts +1 -1
- package/dist/model/batchWriteParams.d.ts.map +1 -1
- package/dist/model/browseParams.d.ts +4 -0
- package/dist/model/browseParams.d.ts.map +1 -0
- package/dist/model/browseParamsObject.d.ts +4 -0
- package/dist/model/browseParamsObject.d.ts.map +1 -0
- package/dist/model/browseResponse.d.ts +2 -2
- package/dist/model/browseResponse.d.ts.map +1 -1
- package/dist/model/builtInOperation.d.ts.map +1 -1
- package/dist/model/builtInOperationType.d.ts.map +1 -1
- package/dist/model/clientMethodProps.d.ts +11 -12
- package/dist/model/clientMethodProps.d.ts.map +1 -1
- package/dist/model/condition.d.ts.map +1 -1
- package/dist/model/consequence.d.ts.map +1 -1
- package/dist/model/consequenceHide.d.ts.map +1 -1
- package/dist/model/consequenceParams.d.ts.map +1 -1
- package/dist/model/consequenceQuery.d.ts.map +1 -1
- package/dist/model/consequenceQueryObject.d.ts.map +1 -1
- package/dist/model/createdAtResponse.d.ts.map +1 -1
- package/dist/model/{baseBrowseResponse.d.ts → cursor.d.ts} +3 -3
- package/dist/model/cursor.d.ts.map +1 -0
- package/dist/model/deleteApiKeyResponse.d.ts.map +1 -1
- package/dist/model/deleteByParams.d.ts +27 -0
- package/dist/model/deleteByParams.d.ts.map +1 -0
- package/dist/model/deleteSourceResponse.d.ts.map +1 -1
- package/dist/model/deletedAtResponse.d.ts.map +1 -1
- package/dist/model/dictionaryAction.d.ts.map +1 -1
- package/dist/model/dictionaryEntry.d.ts.map +1 -1
- package/dist/model/dictionaryEntryState.d.ts.map +1 -1
- package/dist/model/dictionaryLanguage.d.ts.map +1 -1
- package/dist/model/dictionarySettingsParams.d.ts.map +1 -1
- package/dist/model/dictionaryType.d.ts.map +1 -1
- package/dist/model/distinct.d.ts.map +1 -1
- package/dist/model/edit.d.ts.map +1 -1
- package/dist/model/editType.d.ts.map +1 -1
- package/dist/model/errorBase.d.ts.map +1 -1
- package/dist/model/exactOnSingleWordQuery.d.ts.map +1 -1
- package/dist/model/facetFilters.d.ts.map +1 -1
- package/dist/model/facetHits.d.ts.map +1 -1
- package/dist/model/facetOrdering.d.ts.map +1 -1
- package/dist/model/facets.d.ts.map +1 -1
- package/dist/model/facetsStats.d.ts.map +1 -1
- package/dist/model/fetchedIndex.d.ts +1 -1
- package/dist/model/fetchedIndex.d.ts.map +1 -1
- package/dist/model/getApiKeyResponse.d.ts.map +1 -1
- package/dist/model/getDictionarySettingsResponse.d.ts.map +1 -1
- package/dist/model/getLogsResponse.d.ts.map +1 -1
- package/dist/model/getObjectsParams.d.ts.map +1 -1
- package/dist/model/getObjectsRequest.d.ts.map +1 -1
- package/dist/model/getObjectsResponse.d.ts.map +1 -1
- package/dist/model/getTaskResponse.d.ts.map +1 -1
- package/dist/model/getTopUserIdsResponse.d.ts.map +1 -1
- package/dist/model/hasPendingMappingsResponse.d.ts.map +1 -1
- package/dist/model/highlightResult.d.ts.map +1 -1
- package/dist/model/highlightResultOption.d.ts.map +1 -1
- package/dist/model/hit.d.ts.map +1 -1
- package/dist/model/ignorePlurals.d.ts.map +1 -1
- package/dist/model/index.d.ts +4 -3
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/indexSettings.d.ts.map +1 -1
- package/dist/model/indexSettingsAsSearchParams.d.ts +4 -4
- package/dist/model/indexSettingsAsSearchParams.d.ts.map +1 -1
- package/dist/model/languages.d.ts.map +1 -1
- package/dist/model/listApiKeysResponse.d.ts.map +1 -1
- package/dist/model/listClustersResponse.d.ts.map +1 -1
- package/dist/model/listIndicesResponse.d.ts.map +1 -1
- package/dist/model/listUserIdsResponse.d.ts.map +1 -1
- package/dist/model/log.d.ts.map +1 -1
- package/dist/model/logQuery.d.ts.map +1 -1
- package/dist/model/logType.d.ts.map +1 -1
- package/dist/model/matchLevel.d.ts.map +1 -1
- package/dist/model/matchedGeoLocation.d.ts.map +1 -1
- package/dist/model/mixedSearchFilters.d.ts.map +1 -1
- package/dist/model/multipleBatchRequest.d.ts.map +1 -1
- package/dist/model/multipleBatchResponse.d.ts.map +1 -1
- package/dist/model/numericFilters.d.ts.map +1 -1
- package/dist/model/operationIndexParams.d.ts.map +1 -1
- package/dist/model/operationType.d.ts.map +1 -1
- package/dist/model/optionalFilters.d.ts.map +1 -1
- package/dist/model/params.d.ts.map +1 -1
- package/dist/model/personalization.d.ts.map +1 -1
- package/dist/model/promote.d.ts.map +1 -1
- package/dist/model/promoteObjectID.d.ts.map +1 -1
- package/dist/model/promoteObjectIDs.d.ts.map +1 -1
- package/dist/model/queryType.d.ts.map +1 -1
- package/dist/model/rankingInfo.d.ts.map +1 -1
- package/dist/model/reRankingApplyFilter.d.ts.map +1 -1
- package/dist/model/removeStopWords.d.ts.map +1 -1
- package/dist/model/removeUserIdResponse.d.ts.map +1 -1
- package/dist/model/removeWordsIfNoResults.d.ts.map +1 -1
- package/dist/model/renderingContent.d.ts.map +1 -1
- package/dist/model/replaceSourceResponse.d.ts.map +1 -1
- package/dist/model/rule.d.ts.map +1 -1
- package/dist/model/saveObjectResponse.d.ts.map +1 -1
- package/dist/model/saveSynonymResponse.d.ts.map +1 -1
- package/dist/model/scopeType.d.ts.map +1 -1
- package/dist/model/searchDictionaryEntriesParams.d.ts.map +1 -1
- package/dist/model/searchForFacetValuesRequest.d.ts.map +1 -1
- package/dist/model/searchForFacetValuesResponse.d.ts.map +1 -1
- package/dist/model/searchForFacets.d.ts.map +1 -1
- package/dist/model/searchForFacetsOptions.d.ts.map +1 -1
- package/dist/model/searchForHits.d.ts.map +1 -1
- package/dist/model/searchForHitsOptions.d.ts.map +1 -1
- package/dist/model/searchHits.d.ts.map +1 -1
- package/dist/model/searchMethodParams.d.ts.map +1 -1
- package/dist/model/searchParams.d.ts.map +1 -1
- package/dist/model/searchParamsObject.d.ts.map +1 -1
- package/dist/model/searchParamsQuery.d.ts.map +1 -1
- package/dist/model/searchParamsString.d.ts.map +1 -1
- package/dist/model/searchQuery.d.ts.map +1 -1
- package/dist/model/searchResponse.d.ts.map +1 -1
- package/dist/model/searchResponses.d.ts.map +1 -1
- package/dist/model/searchRulesParams.d.ts +1 -1
- package/dist/model/searchRulesParams.d.ts.map +1 -1
- package/dist/model/searchRulesResponse.d.ts.map +1 -1
- package/dist/model/searchStrategy.d.ts.map +1 -1
- package/dist/model/searchSynonymsParams.d.ts.map +1 -1
- package/dist/model/searchSynonymsResponse.d.ts.map +1 -1
- package/dist/model/searchTypeDefault.d.ts.map +1 -1
- package/dist/model/searchTypeFacet.d.ts.map +1 -1
- package/dist/model/searchUserIdsParams.d.ts.map +1 -1
- package/dist/model/searchUserIdsResponse.d.ts.map +1 -1
- package/dist/model/snippetResult.d.ts.map +1 -1
- package/dist/model/snippetResultOption.d.ts.map +1 -1
- package/dist/model/sortRemainingBy.d.ts.map +1 -1
- package/dist/model/source.d.ts.map +1 -1
- package/dist/model/standardEntries.d.ts.map +1 -1
- package/dist/model/synonymHit.d.ts +0 -2
- package/dist/model/synonymHit.d.ts.map +1 -1
- package/dist/model/synonymType.d.ts.map +1 -1
- package/dist/model/tagFilters.d.ts.map +1 -1
- package/dist/model/taskStatus.d.ts.map +1 -1
- package/dist/model/timeRange.d.ts.map +1 -1
- package/dist/model/typoTolerance.d.ts.map +1 -1
- package/dist/model/typoToleranceEnum.d.ts.map +1 -1
- package/dist/model/updateApiKeyResponse.d.ts.map +1 -1
- package/dist/model/updatedAtResponse.d.ts.map +1 -1
- package/dist/model/updatedAtWithObjectIdResponse.d.ts.map +1 -1
- package/dist/model/updatedRuleResponse.d.ts.map +1 -1
- package/dist/model/userHighlightResult.d.ts.map +1 -1
- package/dist/model/userHit.d.ts.map +1 -1
- package/dist/model/userId.d.ts.map +1 -1
- package/dist/model/value.d.ts.map +1 -1
- package/dist/src/searchClient.d.ts +18 -18
- package/dist/src/searchClient.d.ts.map +1 -1
- package/model/baseIndexSettings.ts +5 -0
- package/model/baseSearchResponse.ts +1 -1
- package/model/batchRequest.ts +2 -2
- package/model/batchWriteParams.ts +1 -1
- package/model/browseParams.ts +6 -0
- package/model/browseParamsObject.ts +6 -0
- package/model/browseResponse.ts +3 -3
- package/model/clientMethodProps.ts +11 -15
- package/model/{baseBrowseResponse.ts → cursor.ts} +2 -2
- package/model/deleteByParams.ts +36 -0
- package/model/fetchedIndex.ts +1 -1
- package/model/index.ts +4 -3
- package/model/indexSettingsAsSearchParams.ts +5 -5
- package/model/searchRulesParams.ts +1 -1
- package/model/synonymHit.ts +0 -3
- package/package.json +31 -13
- package/dist/model/baseBrowseResponse.d.ts.map +0 -1
- package/dist/model/browseRequest.d.ts +0 -11
- package/dist/model/browseRequest.d.ts.map +0 -1
- package/dist/model/synonymHitHighlightResult.d.ts +0 -12
- package/dist/model/synonymHitHighlightResult.d.ts.map +0 -1
- package/model/browseRequest.ts +0 -13
- package/model/synonymHitHighlightResult.ts +0 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../builds/browser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAY5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACrE,cAAc,UAAU,CAAC;AAEzB,wBAAgB,YAAY,CAC1B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,aAAa,GACtB,YAAY,CA8Bd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../builds/node.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAW5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACrE,cAAc,UAAU,CAAC;AAEzB,wBAAgB,YAAY,CAC1B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,aAAa,GACtB,YAAY,CAwBd"}
|
|
@@ -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 = '5.0.0-alpha.
|
|
9
|
+
const apiClientVersion = '5.0.0-alpha.40';
|
|
10
10
|
function getDefaultHosts(appId) {
|
|
11
11
|
return [
|
|
12
12
|
{
|
|
@@ -169,19 +169,19 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
169
169
|
* @summary Helper method that iterates on the `browse` method.
|
|
170
170
|
* @param browseObjects - The browseObjects object.
|
|
171
171
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
172
|
-
* @param browseObjects.
|
|
173
|
-
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
|
|
172
|
+
* @param browseObjects.browseParams - The `browse` parameters.
|
|
173
|
+
* @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.
|
|
174
174
|
* @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`.
|
|
175
175
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `browse` method and merged with the transporter requestOptions.
|
|
176
176
|
*/
|
|
177
|
-
browseObjects({ indexName,
|
|
177
|
+
browseObjects({ indexName, browseParams, ...browseObjectsOptions }, requestOptions) {
|
|
178
178
|
return clientCommon.createIterablePromise({
|
|
179
179
|
func: (previousResponse) => {
|
|
180
180
|
return this.browse({
|
|
181
181
|
indexName,
|
|
182
|
-
|
|
182
|
+
browseParams: {
|
|
183
183
|
cursor: previousResponse ? previousResponse.cursor : undefined,
|
|
184
|
-
...
|
|
184
|
+
...browseParams,
|
|
185
185
|
},
|
|
186
186
|
}, requestOptions);
|
|
187
187
|
},
|
|
@@ -196,7 +196,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
196
196
|
* @param browseObjects - The browseObjects object.
|
|
197
197
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
198
198
|
* @param browseObjects.searchRulesParams - The `searchRules` method parameters.
|
|
199
|
-
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
|
|
199
|
+
* @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).
|
|
200
200
|
* @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`.
|
|
201
201
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchRules` method and merged with the transporter requestOptions.
|
|
202
202
|
*/
|
|
@@ -227,7 +227,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
227
227
|
* @summary Helper method that iterates on the `searchSynonyms` method.
|
|
228
228
|
* @param browseObjects - The browseObjects object.
|
|
229
229
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
230
|
-
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
|
|
230
|
+
* @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).
|
|
231
231
|
* @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`.
|
|
232
232
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchSynonyms` method and merged with the transporter requestOptions.
|
|
233
233
|
*/
|
|
@@ -383,6 +383,9 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
383
383
|
if (!batchWriteParams) {
|
|
384
384
|
throw new Error('Parameter `batchWriteParams` is required when calling `batch`.');
|
|
385
385
|
}
|
|
386
|
+
if (!batchWriteParams.requests) {
|
|
387
|
+
throw new Error('Parameter `batchWriteParams.requests` is required when calling `batch`.');
|
|
388
|
+
}
|
|
386
389
|
const requestPath = '/1/indexes/{indexName}/batch'.replace('{indexName}', encodeURIComponent(indexName));
|
|
387
390
|
const headers = {};
|
|
388
391
|
const queryParameters = {};
|
|
@@ -469,10 +472,10 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
469
472
|
* @summary Retrieve all index content.
|
|
470
473
|
* @param browse - The browse object.
|
|
471
474
|
* @param browse.indexName - The index in which to perform the request.
|
|
472
|
-
* @param browse.
|
|
475
|
+
* @param browse.browseParams - The browseParams object.
|
|
473
476
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
474
477
|
*/
|
|
475
|
-
browse({ indexName,
|
|
478
|
+
browse({ indexName, browseParams }, requestOptions) {
|
|
476
479
|
if (!indexName) {
|
|
477
480
|
throw new Error('Parameter `indexName` is required when calling `browse`.');
|
|
478
481
|
}
|
|
@@ -484,7 +487,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
484
487
|
path: requestPath,
|
|
485
488
|
queryParameters,
|
|
486
489
|
headers,
|
|
487
|
-
data:
|
|
490
|
+
data: browseParams ? browseParams : {},
|
|
488
491
|
};
|
|
489
492
|
return transporter.request(request, requestOptions);
|
|
490
493
|
},
|
|
@@ -618,15 +621,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
618
621
|
* @summary Delete all records matching the query.
|
|
619
622
|
* @param deleteBy - The deleteBy object.
|
|
620
623
|
* @param deleteBy.indexName - The index in which to perform the request.
|
|
621
|
-
* @param deleteBy.
|
|
624
|
+
* @param deleteBy.deleteByParams - The deleteByParams object.
|
|
622
625
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
623
626
|
*/
|
|
624
|
-
deleteBy({ indexName,
|
|
627
|
+
deleteBy({ indexName, deleteByParams }, requestOptions) {
|
|
625
628
|
if (!indexName) {
|
|
626
629
|
throw new Error('Parameter `indexName` is required when calling `deleteBy`.');
|
|
627
630
|
}
|
|
628
|
-
if (!
|
|
629
|
-
throw new Error('Parameter `
|
|
631
|
+
if (!deleteByParams) {
|
|
632
|
+
throw new Error('Parameter `deleteByParams` is required when calling `deleteBy`.');
|
|
630
633
|
}
|
|
631
634
|
const requestPath = '/1/indexes/{indexName}/deleteByQuery'.replace('{indexName}', encodeURIComponent(indexName));
|
|
632
635
|
const headers = {};
|
|
@@ -636,7 +639,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
636
639
|
path: requestPath,
|
|
637
640
|
queryParameters,
|
|
638
641
|
headers,
|
|
639
|
-
data:
|
|
642
|
+
data: deleteByParams,
|
|
640
643
|
};
|
|
641
644
|
return transporter.request(request, requestOptions);
|
|
642
645
|
},
|
|
@@ -875,7 +878,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
875
878
|
* @param getLogs.type - Type of log entries to retrieve. When omitted, all log entries are retrieved.
|
|
876
879
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
877
880
|
*/
|
|
878
|
-
getLogs({ offset, length, indexName, type }, requestOptions) {
|
|
881
|
+
getLogs({ offset, length, indexName, type } = {}, requestOptions = undefined) {
|
|
879
882
|
const requestPath = '/1/logs';
|
|
880
883
|
const headers = {};
|
|
881
884
|
const queryParameters = {};
|
|
@@ -1137,7 +1140,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1137
1140
|
* @param hasPendingMappings.getClusters - If the clusters pending mapping state should be on the response.
|
|
1138
1141
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1139
1142
|
*/
|
|
1140
|
-
hasPendingMappings({ getClusters }, requestOptions) {
|
|
1143
|
+
hasPendingMappings({ getClusters } = {}, requestOptions = undefined) {
|
|
1141
1144
|
const requestPath = '/1/clusters/mapping/pending';
|
|
1142
1145
|
const headers = {};
|
|
1143
1146
|
const queryParameters = {};
|
|
@@ -1196,7 +1199,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1196
1199
|
* @param listIndices.page - Requested page (zero-based). When specified, will retrieve a specific page; the page size is implicitly set to 100. When null, will retrieve all indices (no pagination).
|
|
1197
1200
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1198
1201
|
*/
|
|
1199
|
-
listIndices({ page }, requestOptions) {
|
|
1202
|
+
listIndices({ page } = {}, requestOptions = undefined) {
|
|
1200
1203
|
const requestPath = '/1/indexes';
|
|
1201
1204
|
const headers = {};
|
|
1202
1205
|
const queryParameters = {};
|
|
@@ -1220,7 +1223,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1220
1223
|
* @param listUserIds.hitsPerPage - Maximum number of objects to retrieve.
|
|
1221
1224
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1222
1225
|
*/
|
|
1223
|
-
listUserIds({ page, hitsPerPage }, requestOptions) {
|
|
1226
|
+
listUserIds({ page, hitsPerPage } = {}, requestOptions = undefined) {
|
|
1224
1227
|
const requestPath = '/1/clusters/mapping';
|
|
1225
1228
|
const headers = {};
|
|
1226
1229
|
const queryParameters = {};
|
|
@@ -1305,19 +1308,19 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1305
1308
|
* @param partialUpdateObject - The partialUpdateObject object.
|
|
1306
1309
|
* @param partialUpdateObject.indexName - The index in which to perform the request.
|
|
1307
1310
|
* @param partialUpdateObject.objectID - Unique identifier of an object.
|
|
1308
|
-
* @param partialUpdateObject.
|
|
1311
|
+
* @param partialUpdateObject.attributesToUpdate - Map of attribute(s) to update.
|
|
1309
1312
|
* @param partialUpdateObject.createIfNotExists - Creates the record if it does not exist yet.
|
|
1310
1313
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1311
1314
|
*/
|
|
1312
|
-
partialUpdateObject({ indexName, objectID,
|
|
1315
|
+
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists, }, requestOptions) {
|
|
1313
1316
|
if (!indexName) {
|
|
1314
1317
|
throw new Error('Parameter `indexName` is required when calling `partialUpdateObject`.');
|
|
1315
1318
|
}
|
|
1316
1319
|
if (!objectID) {
|
|
1317
1320
|
throw new Error('Parameter `objectID` is required when calling `partialUpdateObject`.');
|
|
1318
1321
|
}
|
|
1319
|
-
if (!
|
|
1320
|
-
throw new Error('Parameter `
|
|
1322
|
+
if (!attributesToUpdate) {
|
|
1323
|
+
throw new Error('Parameter `attributesToUpdate` is required when calling `partialUpdateObject`.');
|
|
1321
1324
|
}
|
|
1322
1325
|
const requestPath = '/1/indexes/{indexName}/{objectID}/partial'
|
|
1323
1326
|
.replace('{indexName}', encodeURIComponent(indexName))
|
|
@@ -1332,7 +1335,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1332
1335
|
path: requestPath,
|
|
1333
1336
|
queryParameters,
|
|
1334
1337
|
headers,
|
|
1335
|
-
data:
|
|
1338
|
+
data: attributesToUpdate,
|
|
1336
1339
|
};
|
|
1337
1340
|
return transporter.request(request, requestOptions);
|
|
1338
1341
|
},
|
|
@@ -1533,17 +1536,17 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1533
1536
|
* @summary Save a batch of rules.
|
|
1534
1537
|
* @param saveRules - The saveRules object.
|
|
1535
1538
|
* @param saveRules.indexName - The index in which to perform the request.
|
|
1536
|
-
* @param saveRules.
|
|
1539
|
+
* @param saveRules.rules - The rules object.
|
|
1537
1540
|
* @param saveRules.forwardToReplicas - When true, changes are also propagated to replicas of the given indexName.
|
|
1538
1541
|
* @param saveRules.clearExistingRules - When true, existing Rules are cleared before adding this batch. When false, existing Rules are kept.
|
|
1539
1542
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1540
1543
|
*/
|
|
1541
|
-
saveRules({ indexName,
|
|
1544
|
+
saveRules({ indexName, rules, forwardToReplicas, clearExistingRules, }, requestOptions) {
|
|
1542
1545
|
if (!indexName) {
|
|
1543
1546
|
throw new Error('Parameter `indexName` is required when calling `saveRules`.');
|
|
1544
1547
|
}
|
|
1545
|
-
if (!
|
|
1546
|
-
throw new Error('Parameter `
|
|
1548
|
+
if (!rules) {
|
|
1549
|
+
throw new Error('Parameter `rules` is required when calling `saveRules`.');
|
|
1547
1550
|
}
|
|
1548
1551
|
const requestPath = '/1/indexes/{indexName}/rules/batch'.replace('{indexName}', encodeURIComponent(indexName));
|
|
1549
1552
|
const headers = {};
|
|
@@ -1559,7 +1562,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1559
1562
|
path: requestPath,
|
|
1560
1563
|
queryParameters,
|
|
1561
1564
|
headers,
|
|
1562
|
-
data:
|
|
1565
|
+
data: rules,
|
|
1563
1566
|
};
|
|
1564
1567
|
return transporter.request(request, requestOptions);
|
|
1565
1568
|
},
|