@algolia/client-search 5.0.0-beta.9 → 5.0.2

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 (77) hide show
  1. package/README.md +69 -0
  2. package/dist/builds/browser.d.ts +3 -3
  3. package/dist/builds/node.d.ts +3 -3
  4. package/dist/client-search.cjs +10 -5
  5. package/dist/client-search.esm.browser.js +10 -5
  6. package/dist/client-search.esm.node.js +10 -5
  7. package/dist/client-search.umd.js +2 -2
  8. package/dist/model/aroundPrecision.d.ts +2 -2
  9. package/dist/model/aroundPrecision.d.ts.map +1 -1
  10. package/dist/model/baseIndexSettings.d.ts +1 -1
  11. package/dist/model/baseSearchResponse.d.ts +0 -16
  12. package/dist/model/baseSearchResponse.d.ts.map +1 -1
  13. package/dist/model/browsePagination.d.ts +19 -0
  14. package/dist/model/browsePagination.d.ts.map +1 -0
  15. package/dist/model/browseResponse.d.ts +2 -1
  16. package/dist/model/browseResponse.d.ts.map +1 -1
  17. package/dist/model/builtInOperation.d.ts +2 -4
  18. package/dist/model/builtInOperation.d.ts.map +1 -1
  19. package/dist/model/builtInOperationValue.d.ts +2 -0
  20. package/dist/model/builtInOperationValue.d.ts.map +1 -0
  21. package/dist/model/dictionaryEntry.d.ts +3 -1
  22. package/dist/model/dictionaryEntry.d.ts.map +1 -1
  23. package/dist/model/dictionaryEntryType.d.ts +5 -0
  24. package/dist/model/dictionaryEntryType.d.ts.map +1 -0
  25. package/dist/model/highlightResult.d.ts +3 -1
  26. package/dist/model/highlightResult.d.ts.map +1 -1
  27. package/dist/model/index.d.ts +8 -2
  28. package/dist/model/index.d.ts.map +1 -1
  29. package/dist/model/indexSettingsAsSearchParams.d.ts +1 -1
  30. package/dist/model/multipleBatchRequest.d.ts +1 -1
  31. package/dist/model/multipleBatchRequest.d.ts.map +1 -1
  32. package/dist/model/{aroundPrecisionFromValueInner.d.ts → range.d.ts} +2 -2
  33. package/dist/model/range.d.ts.map +1 -0
  34. package/dist/model/redirectRuleIndexData.d.ts +7 -0
  35. package/dist/model/redirectRuleIndexData.d.ts.map +1 -0
  36. package/dist/model/redirectRuleIndexMetadata.d.ts +2 -2
  37. package/dist/model/redirectRuleIndexMetadata.d.ts.map +1 -1
  38. package/dist/model/searchPagination.d.ts +19 -0
  39. package/dist/model/searchPagination.d.ts.map +1 -0
  40. package/dist/model/searchParamsString.d.ts +3 -0
  41. package/dist/model/searchParamsString.d.ts.map +1 -1
  42. package/dist/model/searchResponse.d.ts +2 -1
  43. package/dist/model/searchResponse.d.ts.map +1 -1
  44. package/dist/model/settingsResponse.d.ts +4 -0
  45. package/dist/model/settingsResponse.d.ts.map +1 -0
  46. package/dist/model/snippetResult.d.ts +3 -1
  47. package/dist/model/snippetResult.d.ts.map +1 -1
  48. package/dist/model/withPrimary.d.ts +7 -0
  49. package/dist/model/withPrimary.d.ts.map +1 -0
  50. package/dist/src/searchClient.d.ts +8 -8
  51. package/dist/src/searchClient.d.ts.map +1 -1
  52. package/model/aroundPrecision.ts +2 -2
  53. package/model/baseIndexSettings.ts +1 -1
  54. package/model/baseSearchResponse.ts +0 -20
  55. package/model/browsePagination.ts +23 -0
  56. package/model/browseResponse.ts +2 -0
  57. package/model/builtInOperation.ts +2 -4
  58. package/model/builtInOperationValue.ts +3 -0
  59. package/model/dictionaryEntry.ts +4 -1
  60. package/model/dictionaryEntryType.ts +6 -0
  61. package/model/highlightResult.ts +2 -1
  62. package/model/index.ts +8 -2
  63. package/model/indexSettingsAsSearchParams.ts +1 -1
  64. package/model/multipleBatchRequest.ts +1 -1
  65. package/model/{aroundPrecisionFromValueInner.ts → range.ts} +1 -1
  66. package/model/{redirectRuleIndexMetadataData.ts → redirectRuleIndexData.ts} +1 -1
  67. package/model/redirectRuleIndexMetadata.ts +2 -2
  68. package/model/searchPagination.ts +23 -0
  69. package/model/searchParamsString.ts +3 -0
  70. package/model/searchResponse.ts +3 -1
  71. package/model/settingsResponse.ts +6 -0
  72. package/model/snippetResult.ts +2 -1
  73. package/model/withPrimary.ts +8 -0
  74. package/package.json +7 -7
  75. package/dist/model/aroundPrecisionFromValueInner.d.ts.map +0 -1
  76. package/dist/model/redirectRuleIndexMetadataData.d.ts +0 -7
  77. package/dist/model/redirectRuleIndexMetadataData.d.ts.map +0 -1
package/model/index.ts CHANGED
@@ -9,7 +9,6 @@ export * from './anchoring';
9
9
  export * from './apiKey';
10
10
  export * from './apiKeyOperation';
11
11
  export * from './aroundPrecision';
12
- export * from './aroundPrecisionFromValueInner';
13
12
  export * from './aroundRadius';
14
13
  export * from './aroundRadiusAll';
15
14
  export * from './assignUserIdParams';
@@ -28,11 +27,13 @@ export * from './batchParams';
28
27
  export * from './batchRequest';
29
28
  export * from './batchResponse';
30
29
  export * from './batchWriteParams';
30
+ export * from './browsePagination';
31
31
  export * from './browseParams';
32
32
  export * from './browseParamsObject';
33
33
  export * from './browseResponse';
34
34
  export * from './builtInOperation';
35
35
  export * from './builtInOperationType';
36
+ export * from './builtInOperationValue';
36
37
  export * from './condition';
37
38
  export * from './consequence';
38
39
  export * from './consequenceHide';
@@ -48,6 +49,7 @@ export * from './deletedAtResponse';
48
49
  export * from './dictionaryAction';
49
50
  export * from './dictionaryEntry';
50
51
  export * from './dictionaryEntryState';
52
+ export * from './dictionaryEntryType';
51
53
  export * from './dictionaryLanguage';
52
54
  export * from './dictionarySettingsParams';
53
55
  export * from './dictionaryType';
@@ -101,11 +103,12 @@ export * from './promote';
101
103
  export * from './promoteObjectID';
102
104
  export * from './promoteObjectIDs';
103
105
  export * from './queryType';
106
+ export * from './range';
104
107
  export * from './rankingInfo';
105
108
  export * from './reRankingApplyFilter';
106
109
  export * from './redirect';
110
+ export * from './redirectRuleIndexData';
107
111
  export * from './redirectRuleIndexMetadata';
108
- export * from './redirectRuleIndexMetadataData';
109
112
  export * from './redirectURL';
110
113
  export * from './removeStopWords';
111
114
  export * from './removeUserIdResponse';
@@ -127,6 +130,7 @@ export * from './searchForHits';
127
130
  export * from './searchForHitsOptions';
128
131
  export * from './searchHits';
129
132
  export * from './searchMethodParams';
133
+ export * from './searchPagination';
130
134
  export * from './searchParams';
131
135
  export * from './searchParamsObject';
132
136
  export * from './searchParamsQuery';
@@ -146,6 +150,7 @@ export * from './searchUserIdsParams';
146
150
  export * from './searchUserIdsResponse';
147
151
  export * from './securedApiKeyRestrictions';
148
152
  export * from './semanticSearch';
153
+ export * from './settingsResponse';
149
154
  export * from './snippetResult';
150
155
  export * from './snippetResultOption';
151
156
  export * from './sortRemainingBy';
@@ -167,4 +172,5 @@ export * from './userHighlightResult';
167
172
  export * from './userHit';
168
173
  export * from './userId';
169
174
  export * from './value';
175
+ export * from './withPrimary';
170
176
  export * from './clientMethodProps';
@@ -108,7 +108,7 @@ export type IndexSettingsAsSearchParams = {
108
108
  queryLanguages?: SupportedLanguage[];
109
109
 
110
110
  /**
111
- * Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian.
111
+ * Whether to split compound words in the query into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. Decompounding doesn\'t work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark). For example, `Gartenstühle` won\'t be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308).
112
112
  */
113
113
  decompoundQuery?: boolean;
114
114
 
@@ -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, any>;
12
12
 
13
13
  /**
14
14
  * Index name (case-sensitive).
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Range object with lower and upper values in meters to define custom ranges.
5
5
  */
6
- export type AroundPrecisionFromValueInner = {
6
+ export type Range = {
7
7
  /**
8
8
  * Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.
9
9
  */
@@ -3,6 +3,6 @@
3
3
  /**
4
4
  * Redirect rule data.
5
5
  */
6
- export type RedirectRuleIndexMetadataData = {
6
+ export type RedirectRuleIndexData = {
7
7
  ruleObjectID: string;
8
8
  };
@@ -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
- import type { RedirectRuleIndexMetadataData } from './redirectRuleIndexMetadataData';
3
+ import type { RedirectRuleIndexData } from './redirectRuleIndexData';
4
4
 
5
5
  export type RedirectRuleIndexMetadata = {
6
6
  /**
@@ -23,5 +23,5 @@ export type RedirectRuleIndexMetadata = {
23
23
  */
24
24
  succeed: boolean;
25
25
 
26
- data: RedirectRuleIndexMetadataData;
26
+ data: RedirectRuleIndexData;
27
27
  };
@@ -0,0 +1,23 @@
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
+
3
+ export type SearchPagination = {
4
+ /**
5
+ * Page of search results to retrieve.
6
+ */
7
+ page: number;
8
+
9
+ /**
10
+ * Number of results (hits).
11
+ */
12
+ nbHits: number;
13
+
14
+ /**
15
+ * Number of pages of results.
16
+ */
17
+ nbPages: number;
18
+
19
+ /**
20
+ * Number of hits per page.
21
+ */
22
+ hitsPerPage: number;
23
+ };
@@ -1,5 +1,8 @@
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
+ /**
4
+ * Search parameters as query string.
5
+ */
3
6
  export type SearchParamsString = {
4
7
  /**
5
8
  * Search parameters as a URL-encoded query string.
@@ -2,6 +2,8 @@
2
2
 
3
3
  import type { BaseSearchResponse } from './baseSearchResponse';
4
4
  import type { SearchHits } from './searchHits';
5
+ import type { SearchPagination } from './searchPagination';
5
6
 
6
7
  export type SearchResponse<T = Record<string, any>> = BaseSearchResponse &
7
- SearchHits<T>;
8
+ SearchHits<T> &
9
+ SearchPagination;
@@ -0,0 +1,6 @@
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
+
3
+ import type { IndexSettings } from './indexSettings';
4
+ import type { WithPrimary } from './withPrimary';
5
+
6
+ export type SettingsResponse = IndexSettings & WithPrimary;
@@ -5,4 +5,5 @@ import type { SnippetResultOption } from './snippetResultOption';
5
5
  export type SnippetResult =
6
6
  | Record<string, SnippetResultOption>
7
7
  | SnippetResultOption
8
- | SnippetResultOption[];
8
+ | SnippetResultOption[]
9
+ | { [key: string]: SnippetResult };
@@ -0,0 +1,8 @@
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
+
3
+ export type WithPrimary = {
4
+ /**
5
+ * Replica indices only: the name of the primary index for this replica.
6
+ */
7
+ primary?: string;
8
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@algolia/client-search",
3
- "version": "5.0.0-beta.9",
3
+ "version": "5.0.2",
4
4
  "description": "JavaScript client for client-search",
5
5
  "repository": {
6
6
  "type": "git",
@@ -42,14 +42,14 @@
42
42
  "clean": "rm -rf ./dist || true"
43
43
  },
44
44
  "dependencies": {
45
- "@algolia/client-common": "5.0.0-beta.10",
46
- "@algolia/requester-browser-xhr": "5.0.0-beta.10",
47
- "@algolia/requester-node-http": "5.0.0-beta.10"
45
+ "@algolia/client-common": "5.0.2",
46
+ "@algolia/requester-browser-xhr": "5.0.2",
47
+ "@algolia/requester-node-http": "5.0.2"
48
48
  },
49
49
  "devDependencies": {
50
- "@types/node": "20.14.10",
51
- "rollup": "4.18.0",
52
- "typescript": "5.5.3"
50
+ "@types/node": "22.2.0",
51
+ "rollup": "4.20.0",
52
+ "typescript": "5.5.4"
53
53
  },
54
54
  "engines": {
55
55
  "node": ">= 14.0.0"
@@ -1 +0,0 @@
1
- {"version":3,"file":"aroundPrecisionFromValueInner.d.ts","sourceRoot":"","sources":["../../model/aroundPrecisionFromValueInner.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC"}
@@ -1,7 +0,0 @@
1
- /**
2
- * Redirect rule data.
3
- */
4
- export type RedirectRuleIndexMetadataData = {
5
- ruleObjectID: string;
6
- };
7
- //# sourceMappingURL=redirectRuleIndexMetadataData.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"redirectRuleIndexMetadataData.d.ts","sourceRoot":"","sources":["../../model/redirectRuleIndexMetadataData.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC"}