@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
@@ -6,7 +6,6 @@ import type { Action } from './action';
6
6
  import type { ApiKey } from './apiKey';
7
7
  import type { ApiKeyOperation } from './apiKeyOperation';
8
8
  import type { AssignUserIdParams } from './assignUserIdParams';
9
- import type { AttributeToUpdate } from './attributeToUpdate';
10
9
  import type { BatchAssignUserIdsParams } from './batchAssignUserIdsParams';
11
10
  import type { BatchDictionaryEntriesParams } from './batchDictionaryEntriesParams';
12
11
  import type { BatchWriteParams } from './batchWriteParams';
@@ -44,7 +43,7 @@ export type AddOrUpdateObjectProps = {
44
43
  /**
45
44
  * The record, a schemaless object with attributes that are useful in the context of search and discovery.
46
45
  */
47
- body: Record<string, any>;
46
+ body: Record<string, unknown>;
48
47
  };
49
48
 
50
49
  /**
@@ -183,7 +182,7 @@ export type CustomPostProps = {
183
182
  /**
184
183
  * Parameters to send with the custom request.
185
184
  */
186
- body?: Record<string, any>;
185
+ body?: Record<string, unknown>;
187
186
  };
188
187
 
189
188
  /**
@@ -201,7 +200,7 @@ export type CustomPutProps = {
201
200
  /**
202
201
  * Parameters to send with the custom request.
203
202
  */
204
- body?: Record<string, any>;
203
+ body?: Record<string, unknown>;
205
204
  };
206
205
 
207
206
  /**
@@ -481,7 +480,7 @@ export type PartialUpdateObjectProps = {
481
480
  /**
482
481
  * Attributes with their values.
483
482
  */
484
- attributesToUpdate: Record<string, AttributeToUpdate>;
483
+ attributesToUpdate: Record<string, unknown>;
485
484
  /**
486
485
  * Whether to create a new record if it doesn\'t exist.
487
486
  */
@@ -529,7 +528,7 @@ export type SaveObjectProps = {
529
528
  /**
530
529
  * The record, a schemaless object with attributes that are useful in the context of search and discovery.
531
530
  */
532
- body: Record<string, any>;
531
+ body: Record<string, unknown>;
533
532
  };
534
533
 
535
534
  /**
@@ -731,9 +730,7 @@ export type UpdateApiKeyProps = {
731
730
  /**
732
731
  * The `browseObjects`, `browseRules`, `browseSynonyms` options.
733
732
  */
734
- export type BrowseOptions<T> = Partial<
735
- Pick<CreateIterablePromise<T>, 'validate'>
736
- > &
733
+ export type BrowseOptions<T> = Partial<Pick<CreateIterablePromise<T>, 'validate'>> &
737
734
  Required<Pick<CreateIterablePromise<T>, 'aggregator'>>;
738
735
 
739
736
  type WaitForOptions = Partial<{
@@ -813,20 +810,14 @@ export type DeleteObjectsOptions = Pick<ChunkedBatchOptions, 'indexName'> & {
813
810
  objectIDs: string[];
814
811
  };
815
812
 
816
- export type PartialUpdateObjectsOptions = Pick<
817
- ChunkedBatchOptions,
818
- 'indexName' | 'objects'
819
- > & {
813
+ export type PartialUpdateObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'objects'> & {
820
814
  /**
821
815
  *To be provided if non-existing objects are passed, otherwise, the call will fail.
822
816
  */
823
817
  createIfNotExists?: boolean;
824
818
  };
825
819
 
826
- export type SaveObjectsOptions = Pick<
827
- ChunkedBatchOptions,
828
- 'indexName' | 'objects'
829
- >;
820
+ export type SaveObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'objects'>;
830
821
 
831
822
  export type ChunkedBatchOptions = ReplaceAllObjectsOptions & {
832
823
  /**
@@ -4,6 +4,4 @@ import type { BaseSearchParamsWithoutQuery } from './baseSearchParamsWithoutQuer
4
4
  import type { IndexSettingsAsSearchParams } from './indexSettingsAsSearchParams';
5
5
  import type { Params } from './params';
6
6
 
7
- export type ConsequenceParams = BaseSearchParamsWithoutQuery &
8
- IndexSettingsAsSearchParams &
9
- Params;
7
+ export type ConsequenceParams = BaseSearchParamsWithoutQuery & IndexSettingsAsSearchParams & Params;
@@ -1,6 +1,6 @@
1
1
  // 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.
2
2
 
3
- export type FacetsStats = {
3
+ export type FacetStats = {
4
4
  /**
5
5
  * Minimum value in the results.
6
6
  */
package/model/index.ts CHANGED
@@ -62,8 +62,8 @@ export * from './exhaustive';
62
62
  export * from './facetFilters';
63
63
  export * from './facetHits';
64
64
  export * from './facetOrdering';
65
+ export * from './facetStats';
65
66
  export * from './facets';
66
- export * from './facetsStats';
67
67
  export * from './fetchedIndex';
68
68
  export * from './getApiKeyResponse';
69
69
  export * from './getDictionarySettingsResponse';
@@ -8,7 +8,7 @@ export type MultipleBatchRequest = {
8
8
  /**
9
9
  * Operation arguments (varies with specified `action`).
10
10
  */
11
- body?: Record<string, any>;
11
+ body?: Record<string, unknown>;
12
12
 
13
13
  /**
14
14
  * Index name (case-sensitive).
@@ -3,8 +3,4 @@
3
3
  /**
4
4
  * Strategy for removing words from the query when it doesn\'t return any results. This helps to avoid returning empty search results. - `none`. No words are removed when a query doesn\'t return results. - `lastWords`. Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed. - `firstWords`. Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed. - `allOptional`. Treat all words as optional. For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/).
5
5
  */
6
- export type RemoveWordsIfNoResults =
7
- | 'allOptional'
8
- | 'firstWords'
9
- | 'lastWords'
10
- | 'none';
6
+ export type RemoveWordsIfNoResults = 'allOptional' | 'firstWords' | 'lastWords' | 'none';
@@ -4,6 +4,4 @@ import type { BaseSearchResponse } from './baseSearchResponse';
4
4
  import type { SearchHits } from './searchHits';
5
5
  import type { SearchPagination } from './searchPagination';
6
6
 
7
- export type SearchResponse<T = Record<string, any>> = BaseSearchResponse &
8
- SearchHits<T> &
9
- SearchPagination;
7
+ export type SearchResponse<T = Record<string, any>> = BaseSearchResponse & SearchHits<T> & SearchPagination;
@@ -3,6 +3,4 @@
3
3
  import type { SearchForFacetValuesResponse } from './searchForFacetValuesResponse';
4
4
  import type { SearchResponse } from './searchResponse';
5
5
 
6
- export type SearchResult<T = Record<string, any>> =
7
- | SearchForFacetValuesResponse
8
- | SearchResponse<T>;
6
+ export type SearchResult<T = Record<string, any>> = SearchForFacetValuesResponse | SearchResponse<T>;
@@ -3,9 +3,4 @@
3
3
  /**
4
4
  * Synonym type.
5
5
  */
6
- export type SynonymType =
7
- | 'altcorrection1'
8
- | 'altcorrection2'
9
- | 'onewaysynonym'
10
- | 'placeholder'
11
- | 'synonym';
6
+ export type SynonymType = 'altcorrection1' | 'altcorrection2' | 'onewaysynonym' | 'placeholder' | 'synonym';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@algolia/client-search",
3
- "version": "5.1.0",
3
+ "version": "5.2.1",
4
4
  "description": "JavaScript client for client-search",
5
5
  "repository": {
6
6
  "type": "git",
@@ -15,13 +15,15 @@
15
15
  "import": "./dist/client-search.esm.node.js",
16
16
  "module": "./dist/client-search.esm.node.js",
17
17
  "require": "./dist/client-search.cjs",
18
- "default": "./dist/client-search.cjs"
18
+ "default": "./dist/client-search.cjs",
19
+ "types": "./dist/builds/node.d.ts"
19
20
  },
20
21
  "default": {
21
22
  "umd": "./dist/client-search.umd.js",
22
23
  "module": "./dist/client-search.esm.browser.js",
23
24
  "import": "./dist/client-search.esm.browser.js",
24
- "default": "./dist/client-search.umd.js"
25
+ "default": "./dist/client-search.umd.js",
26
+ "types": "./dist/builds/browser.d.ts"
25
27
  }
26
28
  },
27
29
  "./src/*": "./src/*.ts",
@@ -42,13 +44,13 @@
42
44
  "clean": "rm -rf ./dist || true"
43
45
  },
44
46
  "dependencies": {
45
- "@algolia/client-common": "5.1.0",
46
- "@algolia/requester-browser-xhr": "5.1.0",
47
- "@algolia/requester-node-http": "5.1.0"
47
+ "@algolia/client-common": "5.2.1",
48
+ "@algolia/requester-browser-xhr": "5.2.1",
49
+ "@algolia/requester-node-http": "5.2.1"
48
50
  },
49
51
  "devDependencies": {
50
- "@types/node": "22.2.0",
51
- "rollup": "4.20.0",
52
+ "@types/node": "22.5.0",
53
+ "rollup": "4.21.0",
52
54
  "typescript": "5.5.4"
53
55
  },
54
56
  "engines": {
@@ -1 +0,0 @@
1
- {"version":3,"file":"facetsStats.d.ts","sourceRoot":"","sources":["../../model/facetsStats.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC"}