@algolia/client-search 5.1.0 → 5.2.1

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.
Files changed (48) hide show
  1. package/README.md +2 -2
  2. package/dist/builds/browser.d.ts +12 -12
  3. package/dist/builds/browser.d.ts.map +1 -1
  4. package/dist/builds/node.d.ts +14 -14
  5. package/dist/builds/node.d.ts.map +1 -1
  6. package/dist/client-search.cjs +20 -31
  7. package/dist/client-search.esm.browser.js +26 -36
  8. package/dist/client-search.esm.node.js +20 -31
  9. package/dist/client-search.umd.js +2 -2
  10. package/dist/model/alternativesAsExact.d.ts.map +1 -1
  11. package/dist/model/baseIndexSettings.d.ts +2 -2
  12. package/dist/model/baseIndexSettings.d.ts.map +1 -1
  13. package/dist/model/baseSearchResponse.d.ts +4 -4
  14. package/dist/model/baseSearchResponse.d.ts.map +1 -1
  15. package/dist/model/batchRequest.d.ts +1 -1
  16. package/dist/model/batchRequest.d.ts.map +1 -1
  17. package/dist/model/browseResponse.d.ts.map +1 -1
  18. package/dist/model/clientMethodProps.d.ts +5 -6
  19. package/dist/model/clientMethodProps.d.ts.map +1 -1
  20. package/dist/model/consequenceParams.d.ts.map +1 -1
  21. package/dist/model/{facetsStats.d.ts → facetStats.d.ts} +2 -2
  22. package/dist/model/facetStats.d.ts.map +1 -0
  23. package/dist/model/index.d.ts +1 -1
  24. package/dist/model/index.d.ts.map +1 -1
  25. package/dist/model/multipleBatchRequest.d.ts +1 -1
  26. package/dist/model/multipleBatchRequest.d.ts.map +1 -1
  27. package/dist/model/removeWordsIfNoResults.d.ts.map +1 -1
  28. package/dist/model/searchResponse.d.ts.map +1 -1
  29. package/dist/model/searchResult.d.ts.map +1 -1
  30. package/dist/model/synonymType.d.ts.map +1 -1
  31. package/dist/src/searchClient.d.ts +16 -16
  32. package/dist/src/searchClient.d.ts.map +1 -1
  33. package/model/alternativesAsExact.ts +1 -4
  34. package/model/baseIndexSettings.ts +2 -2
  35. package/model/baseSearchResponse.ts +4 -4
  36. package/model/batchRequest.ts +1 -1
  37. package/model/browseResponse.ts +1 -4
  38. package/model/clientMethodProps.ts +8 -17
  39. package/model/consequenceParams.ts +1 -3
  40. package/model/{facetsStats.ts → facetStats.ts} +1 -1
  41. package/model/index.ts +1 -1
  42. package/model/multipleBatchRequest.ts +1 -1
  43. package/model/removeWordsIfNoResults.ts +1 -5
  44. package/model/searchResponse.ts +1 -3
  45. package/model/searchResult.ts +1 -3
  46. package/model/synonymType.ts +1 -6
  47. package/package.json +10 -8
  48. package/dist/model/facetsStats.d.ts.map +0 -1
package/README.md CHANGED
@@ -14,7 +14,7 @@
14
14
  </p>
15
15
 
16
16
  <p align="center">
17
- <a href="https://www.algolia.com/doc/api-client/getting-started/install/javascript/" target="_blank">Documentation</a> •
17
+ <a href="https://www.algolia.com/doc/libraries/javascript/" target="_blank">Documentation</a> •
18
18
  <a href="https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/" target="_blank">InstantSearch</a> •
19
19
  <a href="https://discourse.algolia.com" target="_blank">Community Forum</a> •
20
20
  <a href="http://stackoverflow.com/questions/tagged/algolia" target="_blank">Stack Overflow</a> •
@@ -58,7 +58,7 @@ import { searchClient } from '@algolia/client-search';
58
58
  const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');
59
59
  ```
60
60
 
61
- For full documentation, visit the **[Algolia JavaScript API Client](https://www.algolia.com/doc/api-client/getting-started/install/javascript/)**.
61
+ For full documentation, visit the **[Algolia JavaScript API Client](https://www.algolia.com/doc/libraries/javascript/)**.
62
62
 
63
63
  ## ❓ Troubleshooting
64
64
 
@@ -17,7 +17,7 @@ export declare function searchClient(appId: string, apiKey: string, options?: Cl
17
17
  browseObjects<T>({ indexName, browseParams, ...browseObjectsOptions }: import("../model").BrowseOptions<import("../model").BrowseResponse<T>> & import("../model").BrowseProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").BrowseResponse<T>>;
18
18
  browseRules({ indexName, searchRulesParams, ...browseRulesOptions }: import("../model").BrowseOptions<import("../model").SearchRulesResponse> & import("../model").SearchRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SearchRulesResponse>;
19
19
  browseSynonyms({ indexName, searchSynonymsParams, ...browseSynonymsOptions }: import("../model").BrowseOptions<import("../model").SearchSynonymsResponse> & import("../model").SearchSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SearchSynonymsResponse>;
20
- chunkedBatch({ indexName, objects, action, waitForTasks, batchSize, }: import("../model").ChunkedBatchOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").BatchResponse[]>;
20
+ chunkedBatch({ indexName, objects, action, waitForTasks, batchSize }: import("../model").ChunkedBatchOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").BatchResponse[]>;
21
21
  saveObjects({ indexName, objects }: import("../model").SaveObjectsOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").BatchResponse[]>;
22
22
  deleteObjects({ indexName, objectIDs }: import("../model").DeleteObjectsOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").BatchResponse[]>;
23
23
  partialUpdateObjects({ indexName, objects, createIfNotExists }: import("../model").PartialUpdateObjectsOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").BatchResponse[]>;
@@ -34,15 +34,15 @@ export declare function searchClient(appId: string, apiKey: string, options?: Cl
34
34
  assignUserId({ xAlgoliaUserID, assignUserIdParams }: import("../model").AssignUserIdProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").CreatedAtResponse>;
35
35
  batch({ indexName, batchWriteParams }: import("../model").BatchProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").BatchResponse>;
36
36
  batchAssignUserIds({ xAlgoliaUserID, batchAssignUserIdsParams }: import("../model").BatchAssignUserIdsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").CreatedAtResponse>;
37
- batchDictionaryEntries({ dictionaryName, batchDictionaryEntriesParams, }: import("../model").BatchDictionaryEntriesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").UpdatedAtResponse>;
37
+ batchDictionaryEntries({ dictionaryName, batchDictionaryEntriesParams }: import("../model").BatchDictionaryEntriesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").UpdatedAtResponse>;
38
38
  browse<T>({ indexName, browseParams }: import("../model").BrowseProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").BrowseResponse<T>>;
39
39
  clearObjects({ indexName }: import("../model").ClearObjectsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").UpdatedAtResponse>;
40
40
  clearRules({ indexName, forwardToReplicas }: import("../model").ClearRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").UpdatedAtResponse>;
41
41
  clearSynonyms({ indexName, forwardToReplicas }: import("../model").ClearSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").UpdatedAtResponse>;
42
- customDelete({ path, parameters }: import("../model").CustomDeleteProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
43
- customGet({ path, parameters }: import("../model").CustomGetProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
44
- customPost({ path, parameters, body }: import("../model").CustomPostProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
45
- customPut({ path, parameters, body }: import("../model").CustomPutProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
42
+ customDelete({ path, parameters }: import("../model").CustomDeleteProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, unknown>>;
43
+ customGet({ path, parameters }: import("../model").CustomGetProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, unknown>>;
44
+ customPost({ path, parameters, body }: import("../model").CustomPostProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, unknown>>;
45
+ customPut({ path, parameters, body }: import("../model").CustomPutProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, unknown>>;
46
46
  deleteApiKey({ key }: import("../model").DeleteApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").DeleteApiKeyResponse>;
47
47
  deleteBy({ indexName, deleteByParams }: import("../model").DeleteByProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").DeletedAtResponse>;
48
48
  deleteIndex({ indexName }: import("../model").DeleteIndexProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").DeletedAtResponse>;
@@ -55,7 +55,7 @@ export declare function searchClient(appId: string, apiKey: string, options?: Cl
55
55
  getDictionaryLanguages(requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, import("../model").Languages>>;
56
56
  getDictionarySettings(requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetDictionarySettingsResponse>;
57
57
  getLogs({ offset, length, indexName, type }?: import("../model").GetLogsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").GetLogsResponse>;
58
- getObject({ indexName, objectID, attributesToRetrieve }: import("../model").GetObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
58
+ getObject({ indexName, objectID, attributesToRetrieve }: import("../model").GetObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, unknown>>;
59
59
  getObjects<T>(getObjectsParams: import("../model").GetObjectsParams, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetObjectsResponse<T>>;
60
60
  getRule({ indexName, objectID }: import("../model").GetRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").Rule>;
61
61
  getSettings({ indexName }: import("../model").GetSettingsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SettingsResponse>;
@@ -71,18 +71,18 @@ export declare function searchClient(appId: string, apiKey: string, options?: Cl
71
71
  listUserIds({ page, hitsPerPage }?: import("../model").ListUserIdsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").ListUserIdsResponse>;
72
72
  multipleBatch(batchParams: import("../model").BatchParams, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").MultipleBatchResponse>;
73
73
  operationIndex({ indexName, operationIndexParams }: import("../model").OperationIndexProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").UpdatedAtResponse>;
74
- partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists, }: import("../model").PartialUpdateObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").UpdatedAtWithObjectIdResponse>;
74
+ partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists }: import("../model").PartialUpdateObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").UpdatedAtWithObjectIdResponse>;
75
75
  removeUserId({ userID }: import("../model").RemoveUserIdProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").RemoveUserIdResponse>;
76
76
  replaceSources({ source }: import("../model").ReplaceSourcesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").ReplaceSourceResponse>;
77
77
  restoreApiKey({ key }: import("../model").RestoreApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").AddApiKeyResponse>;
78
78
  saveObject({ indexName, body }: import("../model").SaveObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SaveObjectResponse>;
79
79
  saveRule({ indexName, objectID, rule, forwardToReplicas }: import("../model").SaveRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").UpdatedRuleResponse>;
80
- saveRules({ indexName, rules, forwardToReplicas, clearExistingRules, }: import("../model").SaveRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").UpdatedAtResponse>;
80
+ saveRules({ indexName, rules, forwardToReplicas, clearExistingRules }: import("../model").SaveRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").UpdatedAtResponse>;
81
81
  saveSynonym({ indexName, objectID, synonymHit, forwardToReplicas }: import("../model").SaveSynonymProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SaveSynonymResponse>;
82
- saveSynonyms({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms, }: import("../model").SaveSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").UpdatedAtResponse>;
82
+ saveSynonyms({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms }: import("../model").SaveSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").UpdatedAtResponse>;
83
83
  search<T>(searchMethodParams: import("../model").LegacySearchMethodProps | import("../model").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SearchResponses<T>>;
84
- searchDictionaryEntries({ dictionaryName, searchDictionaryEntriesParams, }: import("../model").SearchDictionaryEntriesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SearchDictionaryEntriesResponse>;
85
- searchForFacetValues({ indexName, facetName, searchForFacetValuesRequest, }: import("../model").SearchForFacetValuesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SearchForFacetValuesResponse>;
84
+ searchDictionaryEntries({ dictionaryName, searchDictionaryEntriesParams }: import("../model").SearchDictionaryEntriesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SearchDictionaryEntriesResponse>;
85
+ searchForFacetValues({ indexName, facetName, searchForFacetValuesRequest }: import("../model").SearchForFacetValuesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SearchForFacetValuesResponse>;
86
86
  searchRules({ indexName, searchRulesParams }: import("../model").SearchRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SearchRulesResponse>;
87
87
  searchSingleIndex<T>({ indexName, searchParams }: import("../model").SearchSingleIndexProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SearchResponse<T>>;
88
88
  searchSynonyms({ indexName, searchSynonymsParams }: import("../model").SearchSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SearchSynonymsResponse>;
@@ -1 +1 @@
1
- {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../builds/browser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAa5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,cAAc,UAAU,CAAC;AAEzB;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AAG3D,wBAAgB,YAAY,CAC1B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BxB"}
1
+ {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../builds/browser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAa5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,cAAc,UAAU,CAAC;AAEzB;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AAG3D,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BlF"}
@@ -15,7 +15,7 @@ export declare function searchClient(appId: string, apiKey: string, options?: Cl
15
15
  * @param generateSecuredApiKey.parentApiKey - The base API key from which to generate the new secured one.
16
16
  * @param generateSecuredApiKey.restrictions - A set of properties defining the restrictions of the secured API key.
17
17
  */
18
- generateSecuredApiKey({ parentApiKey, restrictions, }: GenerateSecuredApiKeyOptions): string;
18
+ generateSecuredApiKey({ parentApiKey, restrictions }: GenerateSecuredApiKeyOptions): string;
19
19
  /**
20
20
  * Helper: Retrieves the remaining validity of the previous generated `securedApiKey`, the `ValidUntil` parameter must have been provided.
21
21
  *
@@ -23,7 +23,7 @@ export declare function searchClient(appId: string, apiKey: string, options?: Cl
23
23
  * @param getSecuredApiKeyRemainingValidity - The `getSecuredApiKeyRemainingValidity` object.
24
24
  * @param getSecuredApiKeyRemainingValidity.securedApiKey - The secured API key generated with the `generateSecuredApiKey` method.
25
25
  */
26
- getSecuredApiKeyRemainingValidity({ securedApiKey, }: GetSecuredApiKeyRemainingValidityOptions): number;
26
+ getSecuredApiKeyRemainingValidity({ securedApiKey }: GetSecuredApiKeyRemainingValidityOptions): number;
27
27
  transporter: import("@algolia/client-common").Transporter;
28
28
  appId: string;
29
29
  clearCache(): Promise<void>;
@@ -35,7 +35,7 @@ export declare function searchClient(appId: string, apiKey: string, options?: Cl
35
35
  browseObjects<T>({ indexName, browseParams, ...browseObjectsOptions }: import("../model").BrowseOptions<import("../model").BrowseResponse<T>> & import("../model").BrowseProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").BrowseResponse<T>>;
36
36
  browseRules({ indexName, searchRulesParams, ...browseRulesOptions }: import("../model").BrowseOptions<import("../model").SearchRulesResponse> & import("../model").SearchRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SearchRulesResponse>;
37
37
  browseSynonyms({ indexName, searchSynonymsParams, ...browseSynonymsOptions }: import("../model").BrowseOptions<import("../model").SearchSynonymsResponse> & import("../model").SearchSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SearchSynonymsResponse>;
38
- chunkedBatch({ indexName, objects, action, waitForTasks, batchSize, }: import("../model").ChunkedBatchOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").BatchResponse[]>;
38
+ chunkedBatch({ indexName, objects, action, waitForTasks, batchSize }: import("../model").ChunkedBatchOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").BatchResponse[]>;
39
39
  saveObjects({ indexName, objects }: import("../model").SaveObjectsOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").BatchResponse[]>;
40
40
  deleteObjects({ indexName, objectIDs }: import("../model").DeleteObjectsOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").BatchResponse[]>;
41
41
  partialUpdateObjects({ indexName, objects, createIfNotExists }: import("../model").PartialUpdateObjectsOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").BatchResponse[]>;
@@ -52,15 +52,15 @@ export declare function searchClient(appId: string, apiKey: string, options?: Cl
52
52
  assignUserId({ xAlgoliaUserID, assignUserIdParams }: import("../model").AssignUserIdProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").CreatedAtResponse>;
53
53
  batch({ indexName, batchWriteParams }: import("../model").BatchProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").BatchResponse>;
54
54
  batchAssignUserIds({ xAlgoliaUserID, batchAssignUserIdsParams }: import("../model").BatchAssignUserIdsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").CreatedAtResponse>;
55
- batchDictionaryEntries({ dictionaryName, batchDictionaryEntriesParams, }: import("../model").BatchDictionaryEntriesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").UpdatedAtResponse>;
55
+ batchDictionaryEntries({ dictionaryName, batchDictionaryEntriesParams }: import("../model").BatchDictionaryEntriesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").UpdatedAtResponse>;
56
56
  browse<T>({ indexName, browseParams }: import("../model").BrowseProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").BrowseResponse<T>>;
57
57
  clearObjects({ indexName }: import("../model").ClearObjectsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").UpdatedAtResponse>;
58
58
  clearRules({ indexName, forwardToReplicas }: import("../model").ClearRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").UpdatedAtResponse>;
59
59
  clearSynonyms({ indexName, forwardToReplicas }: import("../model").ClearSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").UpdatedAtResponse>;
60
- customDelete({ path, parameters }: import("../model").CustomDeleteProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
61
- customGet({ path, parameters }: import("../model").CustomGetProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
62
- customPost({ path, parameters, body }: import("../model").CustomPostProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
63
- customPut({ path, parameters, body }: import("../model").CustomPutProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
60
+ customDelete({ path, parameters }: import("../model").CustomDeleteProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, unknown>>;
61
+ customGet({ path, parameters }: import("../model").CustomGetProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, unknown>>;
62
+ customPost({ path, parameters, body }: import("../model").CustomPostProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, unknown>>;
63
+ customPut({ path, parameters, body }: import("../model").CustomPutProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, unknown>>;
64
64
  deleteApiKey({ key }: import("../model").DeleteApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").DeleteApiKeyResponse>;
65
65
  deleteBy({ indexName, deleteByParams }: import("../model").DeleteByProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").DeletedAtResponse>;
66
66
  deleteIndex({ indexName }: import("../model").DeleteIndexProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").DeletedAtResponse>;
@@ -73,7 +73,7 @@ export declare function searchClient(appId: string, apiKey: string, options?: Cl
73
73
  getDictionaryLanguages(requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, import("../model").Languages>>;
74
74
  getDictionarySettings(requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetDictionarySettingsResponse>;
75
75
  getLogs({ offset, length, indexName, type }?: import("../model").GetLogsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").GetLogsResponse>;
76
- getObject({ indexName, objectID, attributesToRetrieve }: import("../model").GetObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
76
+ getObject({ indexName, objectID, attributesToRetrieve }: import("../model").GetObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, unknown>>;
77
77
  getObjects<T>(getObjectsParams: import("../model").GetObjectsParams, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetObjectsResponse<T>>;
78
78
  getRule({ indexName, objectID }: import("../model").GetRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").Rule>;
79
79
  getSettings({ indexName }: import("../model").GetSettingsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SettingsResponse>;
@@ -89,18 +89,18 @@ export declare function searchClient(appId: string, apiKey: string, options?: Cl
89
89
  listUserIds({ page, hitsPerPage }?: import("../model").ListUserIdsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").ListUserIdsResponse>;
90
90
  multipleBatch(batchParams: import("../model").BatchParams, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").MultipleBatchResponse>;
91
91
  operationIndex({ indexName, operationIndexParams }: import("../model").OperationIndexProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").UpdatedAtResponse>;
92
- partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists, }: import("../model").PartialUpdateObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").UpdatedAtWithObjectIdResponse>;
92
+ partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists }: import("../model").PartialUpdateObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").UpdatedAtWithObjectIdResponse>;
93
93
  removeUserId({ userID }: import("../model").RemoveUserIdProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").RemoveUserIdResponse>;
94
94
  replaceSources({ source }: import("../model").ReplaceSourcesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").ReplaceSourceResponse>;
95
95
  restoreApiKey({ key }: import("../model").RestoreApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").AddApiKeyResponse>;
96
96
  saveObject({ indexName, body }: import("../model").SaveObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SaveObjectResponse>;
97
97
  saveRule({ indexName, objectID, rule, forwardToReplicas }: import("../model").SaveRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").UpdatedRuleResponse>;
98
- saveRules({ indexName, rules, forwardToReplicas, clearExistingRules, }: import("../model").SaveRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").UpdatedAtResponse>;
98
+ saveRules({ indexName, rules, forwardToReplicas, clearExistingRules }: import("../model").SaveRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").UpdatedAtResponse>;
99
99
  saveSynonym({ indexName, objectID, synonymHit, forwardToReplicas }: import("../model").SaveSynonymProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SaveSynonymResponse>;
100
- saveSynonyms({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms, }: import("../model").SaveSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").UpdatedAtResponse>;
100
+ saveSynonyms({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms }: import("../model").SaveSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").UpdatedAtResponse>;
101
101
  search<T>(searchMethodParams: import("../model").LegacySearchMethodProps | import("../model").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SearchResponses<T>>;
102
- searchDictionaryEntries({ dictionaryName, searchDictionaryEntriesParams, }: import("../model").SearchDictionaryEntriesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SearchDictionaryEntriesResponse>;
103
- searchForFacetValues({ indexName, facetName, searchForFacetValuesRequest, }: import("../model").SearchForFacetValuesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SearchForFacetValuesResponse>;
102
+ searchDictionaryEntries({ dictionaryName, searchDictionaryEntriesParams }: import("../model").SearchDictionaryEntriesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SearchDictionaryEntriesResponse>;
103
+ searchForFacetValues({ indexName, facetName, searchForFacetValuesRequest }: import("../model").SearchForFacetValuesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SearchForFacetValuesResponse>;
104
104
  searchRules({ indexName, searchRulesParams }: import("../model").SearchRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SearchRulesResponse>;
105
105
  searchSingleIndex<T>({ indexName, searchParams }: import("../model").SearchSingleIndexProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SearchResponse<T>>;
106
106
  searchSynonyms({ indexName, searchSynonymsParams }: import("../model").SearchSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SearchSynonymsResponse>;
@@ -1 +1 @@
1
- {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../builds/node.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAW5D,OAAO,KAAK,EACV,4BAA4B,EAC5B,wCAAwC,EACzC,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,cAAc,UAAU,CAAC;AAEzB;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AAG3D,wBAAgB,YAAY,CAC1B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,aAAa;IA2BrB;;;;;;;OAOG;2DAIA,4BAA4B,GAAG,MAAM;IA+BxC;;;;;;OAMG;0DAGA,wCAAwC,GAAG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcvD"}
1
+ {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../builds/node.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAW5D,OAAO,KAAK,EAAE,4BAA4B,EAAE,wCAAwC,EAAE,MAAM,UAAU,CAAC;AAGvG,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,cAAc,UAAU,CAAC;AAEzB;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AAG3D,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa;IA0B/E;;;;;;;OAOG;0DACwD,4BAA4B,GAAG,MAAM;IA6BhG;;;;;;OAMG;yDACkD,wCAAwC,GAAG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYzG"}
@@ -5,7 +5,7 @@ var clientCommon = require('@algolia/client-common');
5
5
  var requesterNodeHttp = require('@algolia/requester-node-http');
6
6
 
7
7
  // 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.
8
- const apiClientVersion = '5.1.0';
8
+ const apiClientVersion = '5.2.1';
9
9
  function getDefaultHosts(appId) {
10
10
  return [
11
11
  {
@@ -67,10 +67,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
67
67
  * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
68
68
  */
69
69
  clearCache() {
70
- return Promise.all([
71
- transporter.requestsCache.clear(),
72
- transporter.responsesCache.clear(),
73
- ]).then(() => undefined);
70
+ return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => undefined);
74
71
  },
75
72
  /**
76
73
  * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
@@ -168,8 +165,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
168
165
  const value = apiKey[field];
169
166
  const resValue = response[field];
170
167
  if (Array.isArray(value) && Array.isArray(resValue)) {
171
- if (value.length !== resValue.length ||
172
- value.some((v, index) => v !== resValue[index])) {
168
+ if (value.length !== resValue.length || value.some((v, index) => v !== resValue[index])) {
173
169
  return false;
174
170
  }
175
171
  }
@@ -189,7 +185,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
189
185
  }
190
186
  throw error;
191
187
  }),
192
- validate: (response) => operation === 'add' ? response !== undefined : response === undefined,
188
+ validate: (response) => (operation === 'add' ? response !== undefined : response === undefined),
193
189
  });
194
190
  },
195
191
  /**
@@ -240,9 +236,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
240
236
  indexName,
241
237
  searchRulesParams: {
242
238
  ...params,
243
- page: previousResponse
244
- ? previousResponse.page + 1
245
- : params.page || 0,
239
+ page: previousResponse ? previousResponse.page + 1 : params.page || 0,
246
240
  },
247
241
  }, requestOptions);
248
242
  },
@@ -295,7 +289,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
295
289
  * @param chunkedBatch.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
296
290
  * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
297
291
  */
298
- async chunkedBatch({ indexName, objects, action = 'addObject', waitForTasks, batchSize = 1000, }, requestOptions) {
292
+ async chunkedBatch({ indexName, objects, action = 'addObject', waitForTasks, batchSize = 1000 }, requestOptions) {
299
293
  let requests = [];
300
294
  const responses = [];
301
295
  const objectEntries = objects.entries();
@@ -355,9 +349,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
355
349
  return await this.chunkedBatch({
356
350
  indexName,
357
351
  objects,
358
- action: createIfNotExists
359
- ? 'partialUpdateObject'
360
- : 'partialUpdateObjectNoCreate',
352
+ action: createIfNotExists ? 'partialUpdateObject' : 'partialUpdateObjectNoCreate',
361
353
  }, requestOptions);
362
354
  },
363
355
  /**
@@ -639,7 +631,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
639
631
  * @param batchDictionaryEntries.batchDictionaryEntriesParams - The batchDictionaryEntriesParams object.
640
632
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
641
633
  */
642
- batchDictionaryEntries({ dictionaryName, batchDictionaryEntriesParams, }, requestOptions) {
634
+ batchDictionaryEntries({ dictionaryName, batchDictionaryEntriesParams }, requestOptions) {
643
635
  if (!dictionaryName) {
644
636
  throw new Error('Parameter `dictionaryName` is required when calling `batchDictionaryEntries`.');
645
637
  }
@@ -893,7 +885,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
893
885
  return transporter.request(request, requestOptions);
894
886
  },
895
887
  /**
896
- * This operation doesn\'t accept empty queries or filters. It\'s more efficient to get a list of object IDs with the [`browse` operation](#tag/Search/operation/browse), and then delete the records using the [`batch` operation](tag/Records/operation/batch).
888
+ * This operation doesn\'t accept empty queries or filters. It\'s more efficient to get a list of object IDs with the [`browse` operation](#tag/Search/operation/browse), and then delete the records using the [`batch` operation](#tag/Records/operation/batch).
897
889
  *
898
890
  * Required API Key ACLs:
899
891
  * - deleteIndex.
@@ -1630,7 +1622,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1630
1622
  return transporter.request(request, requestOptions);
1631
1623
  },
1632
1624
  /**
1633
- * Adds new attributes to a record, or update existing ones. - If a record with the specified object ID doesn\'t exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn\'t exist yet, this method creates a new index. - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor.
1625
+ * Adds new attributes to a record, or update existing ones. - If a record with the specified object ID doesn\'t exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn\'t exist yet, this method creates a new index. - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor. To update an attribute without pushing the entire record, you can use these built-in operations. These operations can be helpful if you don\'t have access to your initial data. - Increment: increment a numeric attribute - Decrement: decrement a numeric attribute - Add: append a number or string element to an array attribute - Remove: remove all matching number or string elements from an array attribute made of numbers or strings - AddUnique: add a number or string element to an array attribute made of numbers or strings only if it\'s not already present - IncrementFrom: increment a numeric integer attribute only if the provided value matches the current value, and otherwise ignore the whole object update. For example, if you pass an IncrementFrom value of 2 for the version attribute, but the current value of the attribute is 1, the engine ignores the update. If the object doesn\'t exist, the engine only creates it if you pass an IncrementFrom value of 0. - IncrementSet: increment a numeric integer attribute only if the provided value is greater than the current value, and otherwise ignore the whole object update. For example, if you pass an IncrementSet value of 2 for the version attribute, and the current value of the attribute is 1, the engine updates the object. If the object doesn\'t exist yet, the engine only creates it if you pass an IncrementSet value that\'s greater than 0. You can specify an operation by providing an object with the attribute to update as the key and its value being an object with the following properties: - _operation: the operation to apply on the attribute - value: the right-hand side argument to the operation, for example, increment or decrement step, value to add or remove.
1634
1626
  *
1635
1627
  * Required API Key ACLs:
1636
1628
  * - addObject.
@@ -1642,7 +1634,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1642
1634
  * @param partialUpdateObject.createIfNotExists - Whether to create a new record if it doesn\'t exist.
1643
1635
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1644
1636
  */
1645
- partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists, }, requestOptions) {
1637
+ partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists }, requestOptions) {
1646
1638
  if (!indexName) {
1647
1639
  throw new Error('Parameter `indexName` is required when calling `partialUpdateObject`.');
1648
1640
  }
@@ -1746,7 +1738,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1746
1738
  return transporter.request(request, requestOptions);
1747
1739
  },
1748
1740
  /**
1749
- * Adds a record to an index or replace it. - If the record doesn\'t have an object ID, a new record with an auto-generated object ID is added to your index. - If a record with the specified object ID exists, the existing record is replaced. - If a record with the specified object ID doesn\'t exist, a new record is added to your index. - If you add a record to an index that doesn\'t exist yet, a new index is created. To update _some_ attributes of a record, use the [`partial` operation](#tag/Records/operation/partial). To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch).
1741
+ * Adds a record to an index or replace it. - If the record doesn\'t have an object ID, a new record with an auto-generated object ID is added to your index. - If a record with the specified object ID exists, the existing record is replaced. - If a record with the specified object ID doesn\'t exist, a new record is added to your index. - If you add a record to an index that doesn\'t exist yet, a new index is created. To update _some_ attributes of a record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject). To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch).
1750
1742
  *
1751
1743
  * Required API Key ACLs:
1752
1744
  * - addObject.
@@ -1831,7 +1823,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1831
1823
  * @param saveRules.clearExistingRules - Whether existing rules should be deleted before adding this batch.
1832
1824
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1833
1825
  */
1834
- saveRules({ indexName, rules, forwardToReplicas, clearExistingRules, }, requestOptions) {
1826
+ saveRules({ indexName, rules, forwardToReplicas, clearExistingRules }, requestOptions) {
1835
1827
  if (!indexName) {
1836
1828
  throw new Error('Parameter `indexName` is required when calling `saveRules`.');
1837
1829
  }
@@ -1915,7 +1907,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1915
1907
  * @param saveSynonyms.replaceExistingSynonyms - Whether to replace all synonyms in the index with the ones sent with this request.
1916
1908
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1917
1909
  */
1918
- saveSynonyms({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms, }, requestOptions) {
1910
+ saveSynonyms({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms }, requestOptions) {
1919
1911
  if (!indexName) {
1920
1912
  throw new Error('Parameter `indexName` is required when calling `saveSynonyms`.');
1921
1913
  }
@@ -1929,8 +1921,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1929
1921
  queryParameters.forwardToReplicas = forwardToReplicas.toString();
1930
1922
  }
1931
1923
  if (replaceExistingSynonyms !== undefined) {
1932
- queryParameters.replaceExistingSynonyms =
1933
- replaceExistingSynonyms.toString();
1924
+ queryParameters.replaceExistingSynonyms = replaceExistingSynonyms.toString();
1934
1925
  }
1935
1926
  const request = {
1936
1927
  method: 'POST',
@@ -2004,7 +1995,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2004
1995
  * @param searchDictionaryEntries.searchDictionaryEntriesParams - The searchDictionaryEntriesParams object.
2005
1996
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2006
1997
  */
2007
- searchDictionaryEntries({ dictionaryName, searchDictionaryEntriesParams, }, requestOptions) {
1998
+ searchDictionaryEntries({ dictionaryName, searchDictionaryEntriesParams }, requestOptions) {
2008
1999
  if (!dictionaryName) {
2009
2000
  throw new Error('Parameter `dictionaryName` is required when calling `searchDictionaryEntries`.');
2010
2001
  }
@@ -2040,7 +2031,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2040
2031
  * @param searchForFacetValues.searchForFacetValuesRequest - The searchForFacetValuesRequest object.
2041
2032
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2042
2033
  */
2043
- searchForFacetValues({ indexName, facetName, searchForFacetValuesRequest, }, requestOptions) {
2034
+ searchForFacetValues({ indexName, facetName, searchForFacetValuesRequest }, requestOptions) {
2044
2035
  if (!indexName) {
2045
2036
  throw new Error('Parameter `indexName` is required when calling `searchForFacetValues`.');
2046
2037
  }
@@ -2311,7 +2302,7 @@ function searchClient(appId, apiKey, options) {
2311
2302
  * @param generateSecuredApiKey.parentApiKey - The base API key from which to generate the new secured one.
2312
2303
  * @param generateSecuredApiKey.restrictions - A set of properties defining the restrictions of the secured API key.
2313
2304
  */
2314
- generateSecuredApiKey({ parentApiKey, restrictions = {}, }) {
2305
+ generateSecuredApiKey({ parentApiKey, restrictions = {} }) {
2315
2306
  let mergedRestrictions = restrictions;
2316
2307
  if (restrictions.searchParams) {
2317
2308
  // merge searchParams with the root restrictions
@@ -2329,9 +2320,7 @@ function searchClient(appId, apiKey, options) {
2329
2320
  return acc;
2330
2321
  }, {});
2331
2322
  const queryParameters = clientCommon.serializeQueryParameters(mergedRestrictions);
2332
- return Buffer.from(crypto.createHmac('sha256', parentApiKey)
2333
- .update(queryParameters)
2334
- .digest('hex') + queryParameters).toString('base64');
2323
+ return Buffer.from(crypto.createHmac('sha256', parentApiKey).update(queryParameters).digest('hex') + queryParameters).toString('base64');
2335
2324
  },
2336
2325
  /**
2337
2326
  * Helper: Retrieves the remaining validity of the previous generated `securedApiKey`, the `ValidUntil` parameter must have been provided.
@@ -2340,7 +2329,7 @@ function searchClient(appId, apiKey, options) {
2340
2329
  * @param getSecuredApiKeyRemainingValidity - The `getSecuredApiKeyRemainingValidity` object.
2341
2330
  * @param getSecuredApiKeyRemainingValidity.securedApiKey - The secured API key generated with the `generateSecuredApiKey` method.
2342
2331
  */
2343
- getSecuredApiKeyRemainingValidity({ securedApiKey, }) {
2332
+ getSecuredApiKeyRemainingValidity({ securedApiKey }) {
2344
2333
  const decodedString = Buffer.from(securedApiKey, 'base64').toString('ascii');
2345
2334
  const regex = /validUntil=(\d+)/;
2346
2335
  const match = decodedString.match(regex);