@algolia/client-search 5.0.0-alpha.1 → 5.0.0-alpha.4

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 (215) hide show
  1. package/dist/builds/browser.d.ts +2 -2
  2. package/dist/builds/browser.d.ts.map +1 -1
  3. package/dist/builds/node.d.ts +2 -2
  4. package/dist/builds/node.d.ts.map +1 -1
  5. package/dist/client-search.cjs.js +144 -25
  6. package/dist/client-search.esm.browser.js +172 -53
  7. package/dist/client-search.esm.node.js +145 -26
  8. package/dist/client-search.umd.js +2 -2
  9. package/dist/model/acl.d.ts +3 -0
  10. package/dist/model/acl.d.ts.map +1 -1
  11. package/dist/model/addApiKeyResponse.d.ts +1 -1
  12. package/dist/model/addApiKeyResponse.d.ts.map +1 -1
  13. package/dist/model/apiKey.d.ts.map +1 -1
  14. package/dist/model/attributeToUpdate.d.ts +3 -0
  15. package/dist/model/attributeToUpdate.d.ts.map +1 -0
  16. package/dist/model/automaticFacetFilter.d.ts.map +1 -1
  17. package/dist/model/baseGetApiKeyResponse.d.ts +11 -0
  18. package/dist/model/baseGetApiKeyResponse.d.ts.map +1 -0
  19. package/dist/model/baseIndexSettings.d.ts.map +1 -1
  20. package/dist/model/baseSearchParamsWithoutQuery.d.ts.map +1 -1
  21. package/dist/model/baseSearchResponse.d.ts +2 -2
  22. package/dist/model/baseSearchResponse.d.ts.map +1 -1
  23. package/dist/model/batchAssignUserIdsParams.d.ts.map +1 -1
  24. package/dist/model/batchDictionaryEntriesParams.d.ts.map +1 -1
  25. package/dist/model/batchDictionaryEntriesRequest.d.ts.map +1 -1
  26. package/dist/model/batchParams.d.ts +2 -2
  27. package/dist/model/batchParams.d.ts.map +1 -1
  28. package/dist/model/{batchOperation.d.ts → batchRequest.d.ts} +2 -2
  29. package/dist/model/batchRequest.d.ts.map +1 -0
  30. package/dist/model/batchResponse.d.ts.map +1 -1
  31. package/dist/model/batchWriteParams.d.ts +2 -2
  32. package/dist/model/batchWriteParams.d.ts.map +1 -1
  33. package/dist/model/browseRequest.d.ts.map +1 -1
  34. package/dist/model/browseResponse.d.ts +1 -1
  35. package/dist/model/browseResponse.d.ts.map +1 -1
  36. package/dist/model/builtInOperation.d.ts.map +1 -1
  37. package/dist/model/clientMethodProps.d.ts +21 -8
  38. package/dist/model/clientMethodProps.d.ts.map +1 -1
  39. package/dist/model/condition.d.ts.map +1 -1
  40. package/dist/model/consequence.d.ts.map +1 -1
  41. package/dist/model/consequenceQueryObject.d.ts.map +1 -1
  42. package/dist/model/deletedAtResponse.d.ts.map +1 -1
  43. package/dist/model/dictionaryEntry.d.ts.map +1 -1
  44. package/dist/model/distinct.d.ts +5 -0
  45. package/dist/model/distinct.d.ts.map +1 -0
  46. package/dist/model/edit.d.ts.map +1 -1
  47. package/dist/model/facetHits.d.ts.map +1 -1
  48. package/dist/model/facetOrdering.d.ts.map +1 -1
  49. package/dist/model/facetsStats.d.ts.map +1 -1
  50. package/dist/model/fetchedIndex.d.ts.map +1 -1
  51. package/dist/model/getApiKeyResponse.d.ts +4 -0
  52. package/dist/model/getApiKeyResponse.d.ts.map +1 -0
  53. package/dist/model/getObjectsParams.d.ts +2 -2
  54. package/dist/model/getObjectsParams.d.ts.map +1 -1
  55. package/dist/model/{multipleGetObjectsParams.d.ts → getObjectsRequest.d.ts} +2 -2
  56. package/dist/model/getObjectsRequest.d.ts.map +1 -0
  57. package/dist/model/getObjectsResponse.d.ts +2 -2
  58. package/dist/model/getObjectsResponse.d.ts.map +1 -1
  59. package/dist/model/hasPendingMappingsResponse.d.ts.map +1 -1
  60. package/dist/model/highlightResultOption.d.ts.map +1 -1
  61. package/dist/model/hit.d.ts +1 -1
  62. package/dist/model/hit.d.ts.map +1 -1
  63. package/dist/model/index.d.ts +7 -6
  64. package/dist/model/index.d.ts.map +1 -1
  65. package/dist/model/indexSettingsAsSearchParams.d.ts +2 -4
  66. package/dist/model/indexSettingsAsSearchParams.d.ts.map +1 -1
  67. package/dist/model/languages.d.ts.map +1 -1
  68. package/dist/model/listApiKeysResponse.d.ts +2 -2
  69. package/dist/model/listApiKeysResponse.d.ts.map +1 -1
  70. package/dist/model/listIndicesResponse.d.ts +1 -1
  71. package/dist/model/listIndicesResponse.d.ts.map +1 -1
  72. package/dist/model/log.d.ts.map +1 -1
  73. package/dist/model/logQuery.d.ts.map +1 -1
  74. package/dist/model/matchedGeoLocation.d.ts.map +1 -1
  75. package/dist/model/{multipleBatchOperation.d.ts → multipleBatchRequest.d.ts} +5 -5
  76. package/dist/model/multipleBatchRequest.d.ts.map +1 -0
  77. package/dist/model/multipleBatchResponse.d.ts +2 -2
  78. package/dist/model/multipleBatchResponse.d.ts.map +1 -1
  79. package/dist/model/operationIndexParams.d.ts.map +1 -1
  80. package/dist/model/params.d.ts.map +1 -1
  81. package/dist/model/personalization.d.ts.map +1 -1
  82. package/dist/model/promoteObjectID.d.ts.map +1 -1
  83. package/dist/model/promoteObjectIDs.d.ts.map +1 -1
  84. package/dist/model/rankingInfo.d.ts.map +1 -1
  85. package/dist/model/rule.d.ts.map +1 -1
  86. package/dist/model/saveObjectResponse.d.ts +2 -2
  87. package/dist/model/saveObjectResponse.d.ts.map +1 -1
  88. package/dist/model/saveSynonymResponse.d.ts.map +1 -1
  89. package/dist/model/searchDictionaryEntriesParams.d.ts.map +1 -1
  90. package/dist/model/searchForFacetValuesRequest.d.ts.map +1 -1
  91. package/dist/model/searchForFacetsOptions.d.ts.map +1 -1
  92. package/dist/model/searchForHitsOptions.d.ts.map +1 -1
  93. package/dist/model/searchHits.d.ts +2 -2
  94. package/dist/model/searchHits.d.ts.map +1 -1
  95. package/dist/model/searchMethodParams.d.ts.map +1 -1
  96. package/dist/model/searchResponse.d.ts +1 -1
  97. package/dist/model/searchResponse.d.ts.map +1 -1
  98. package/dist/model/searchResponses.d.ts +1 -1
  99. package/dist/model/searchResponses.d.ts.map +1 -1
  100. package/dist/model/searchRulesParams.d.ts.map +1 -1
  101. package/dist/model/searchRulesResponse.d.ts.map +1 -1
  102. package/dist/model/searchSynonymsResponse.d.ts.map +1 -1
  103. package/dist/model/searchUserIdsParams.d.ts.map +1 -1
  104. package/dist/model/searchUserIdsResponse.d.ts.map +1 -1
  105. package/dist/model/snippetResultOption.d.ts.map +1 -1
  106. package/dist/model/source.d.ts.map +1 -1
  107. package/dist/model/standardEntries.d.ts.map +1 -1
  108. package/dist/model/synonymHit.d.ts.map +1 -1
  109. package/dist/model/synonymHitHighlightResult.d.ts.map +1 -1
  110. package/dist/model/timeRange.d.ts.map +1 -1
  111. package/dist/model/updateApiKeyResponse.d.ts +1 -1
  112. package/dist/model/updateApiKeyResponse.d.ts.map +1 -1
  113. package/dist/model/updatedAtResponse.d.ts.map +1 -1
  114. package/dist/model/updatedAtWithObjectIdResponse.d.ts.map +1 -1
  115. package/dist/model/updatedRuleResponse.d.ts.map +1 -1
  116. package/dist/model/userHighlightResult.d.ts.map +1 -1
  117. package/dist/model/userHit.d.ts.map +1 -1
  118. package/dist/model/userId.d.ts.map +1 -1
  119. package/dist/model/value.d.ts.map +1 -1
  120. package/dist/src/searchClient.d.ts +65 -15
  121. package/dist/src/searchClient.d.ts.map +1 -1
  122. package/model/acl.ts +3 -0
  123. package/model/addApiKeyResponse.ts +2 -1
  124. package/model/apiKey.ts +7 -0
  125. package/model/{attributeOrBuiltInOperation.ts → attributeToUpdate.ts} +1 -1
  126. package/model/automaticFacetFilter.ts +2 -0
  127. package/model/baseGetApiKeyResponse.ts +13 -0
  128. package/model/baseIndexSettings.ts +13 -0
  129. package/model/baseSearchParamsWithoutQuery.ts +32 -0
  130. package/model/baseSearchResponse.ts +26 -2
  131. package/model/batchAssignUserIdsParams.ts +1 -0
  132. package/model/batchDictionaryEntriesParams.ts +1 -0
  133. package/model/batchDictionaryEntriesRequest.ts +1 -0
  134. package/model/batchParams.ts +2 -2
  135. package/model/{batchOperation.ts → batchRequest.ts} +2 -1
  136. package/model/batchResponse.ts +1 -0
  137. package/model/batchWriteParams.ts +2 -2
  138. package/model/browseRequest.ts +1 -0
  139. package/model/browseResponse.ts +1 -1
  140. package/model/builtInOperation.ts +1 -0
  141. package/model/clientMethodProps.ts +28 -12
  142. package/model/condition.ts +3 -0
  143. package/model/consequence.ts +4 -0
  144. package/model/consequenceQueryObject.ts +1 -0
  145. package/model/deletedAtResponse.ts +1 -0
  146. package/model/dictionaryEntry.ts +5 -0
  147. package/model/{createdAtObject.ts → distinct.ts} +4 -6
  148. package/model/edit.ts +2 -0
  149. package/model/facetHits.ts +2 -0
  150. package/model/facetOrdering.ts +1 -0
  151. package/model/facetsStats.ts +3 -0
  152. package/model/fetchedIndex.ts +10 -0
  153. package/model/{key.ts → getApiKeyResponse.ts} +2 -2
  154. package/model/getObjectsParams.ts +2 -2
  155. package/model/{multipleGetObjectsParams.ts → getObjectsRequest.ts} +3 -1
  156. package/model/getObjectsResponse.ts +2 -2
  157. package/model/hasPendingMappingsResponse.ts +1 -0
  158. package/model/highlightResultOption.ts +3 -0
  159. package/model/hit.ts +5 -1
  160. package/model/index.ts +7 -6
  161. package/model/indexSettingsAsSearchParams.ts +43 -4
  162. package/model/languages.ts +2 -0
  163. package/model/listApiKeysResponse.ts +2 -2
  164. package/model/listIndicesResponse.ts +2 -1
  165. package/model/log.ts +14 -0
  166. package/model/logQuery.ts +2 -0
  167. package/model/matchedGeoLocation.ts +2 -0
  168. package/model/{multipleBatchOperation.ts → multipleBatchRequest.ts} +6 -4
  169. package/model/multipleBatchResponse.ts +3 -2
  170. package/model/operationIndexParams.ts +2 -0
  171. package/model/params.ts +3 -0
  172. package/model/personalization.ts +2 -0
  173. package/model/promoteObjectID.ts +1 -0
  174. package/model/promoteObjectIDs.ts +1 -0
  175. package/model/rankingInfo.ts +12 -0
  176. package/model/rule.ts +5 -0
  177. package/model/saveObjectResponse.ts +4 -2
  178. package/model/saveSynonymResponse.ts +2 -0
  179. package/model/searchDictionaryEntriesParams.ts +3 -0
  180. package/model/searchForFacetValuesRequest.ts +2 -0
  181. package/model/searchForFacetsOptions.ts +4 -0
  182. package/model/searchForHitsOptions.ts +1 -0
  183. package/model/searchHits.ts +2 -2
  184. package/model/searchMethodParams.ts +1 -0
  185. package/model/searchResponse.ts +2 -1
  186. package/model/searchResponses.ts +1 -1
  187. package/model/searchRulesParams.ts +6 -0
  188. package/model/searchRulesResponse.ts +3 -0
  189. package/model/searchSynonymsResponse.ts +1 -0
  190. package/model/searchUserIdsParams.ts +3 -0
  191. package/model/searchUserIdsResponse.ts +4 -0
  192. package/model/snippetResultOption.ts +1 -0
  193. package/model/source.ts +1 -0
  194. package/model/standardEntries.ts +2 -0
  195. package/model/synonymHit.ts +8 -0
  196. package/model/synonymHitHighlightResult.ts +1 -0
  197. package/model/timeRange.ts +1 -0
  198. package/model/updateApiKeyResponse.ts +2 -1
  199. package/model/updatedAtResponse.ts +1 -0
  200. package/model/updatedAtWithObjectIdResponse.ts +2 -0
  201. package/model/updatedRuleResponse.ts +2 -0
  202. package/model/userHighlightResult.ts +1 -0
  203. package/model/userHit.ts +5 -0
  204. package/model/userId.ts +3 -0
  205. package/model/value.ts +1 -0
  206. package/package.json +5 -5
  207. package/dist/model/attributeOrBuiltInOperation.d.ts +0 -3
  208. package/dist/model/attributeOrBuiltInOperation.d.ts.map +0 -1
  209. package/dist/model/batchOperation.d.ts.map +0 -1
  210. package/dist/model/createdAtObject.d.ts +0 -7
  211. package/dist/model/createdAtObject.d.ts.map +0 -1
  212. package/dist/model/key.d.ts +0 -4
  213. package/dist/model/key.d.ts.map +0 -1
  214. package/dist/model/multipleBatchOperation.d.ts.map +0 -1
  215. package/dist/model/multipleGetObjectsParams.d.ts.map +0 -1
package/model/index.ts CHANGED
@@ -10,10 +10,11 @@ export * from './apiKey';
10
10
  export * from './aroundRadius';
11
11
  export * from './aroundRadiusAll';
12
12
  export * from './assignUserIdParams';
13
- export * from './attributeOrBuiltInOperation';
13
+ export * from './attributeToUpdate';
14
14
  export * from './automaticFacetFilter';
15
15
  export * from './automaticFacetFilters';
16
16
  export * from './baseBrowseResponse';
17
+ export * from './baseGetApiKeyResponse';
17
18
  export * from './baseIndexSettings';
18
19
  export * from './baseSearchParams';
19
20
  export * from './baseSearchParamsWithoutQuery';
@@ -21,8 +22,8 @@ export * from './baseSearchResponse';
21
22
  export * from './batchAssignUserIdsParams';
22
23
  export * from './batchDictionaryEntriesParams';
23
24
  export * from './batchDictionaryEntriesRequest';
24
- export * from './batchOperation';
25
25
  export * from './batchParams';
26
+ export * from './batchRequest';
26
27
  export * from './batchResponse';
27
28
  export * from './batchWriteParams';
28
29
  export * from './browseRequest';
@@ -35,7 +36,6 @@ export * from './consequenceHide';
35
36
  export * from './consequenceParams';
36
37
  export * from './consequenceQuery';
37
38
  export * from './consequenceQueryObject';
38
- export * from './createdAtObject';
39
39
  export * from './createdAtResponse';
40
40
  export * from './deleteApiKeyResponse';
41
41
  export * from './deleteSourceResponse';
@@ -46,6 +46,7 @@ export * from './dictionaryEntryState';
46
46
  export * from './dictionaryLanguage';
47
47
  export * from './dictionarySettingsParams';
48
48
  export * from './dictionaryType';
49
+ export * from './distinct';
49
50
  export * from './edit';
50
51
  export * from './editType';
51
52
  export * from './errorBase';
@@ -56,9 +57,11 @@ export * from './facetOrdering';
56
57
  export * from './facets';
57
58
  export * from './facetsStats';
58
59
  export * from './fetchedIndex';
60
+ export * from './getApiKeyResponse';
59
61
  export * from './getDictionarySettingsResponse';
60
62
  export * from './getLogsResponse';
61
63
  export * from './getObjectsParams';
64
+ export * from './getObjectsRequest';
62
65
  export * from './getObjectsResponse';
63
66
  export * from './getTaskResponse';
64
67
  export * from './getTopUserIdsResponse';
@@ -69,7 +72,6 @@ export * from './hit';
69
72
  export * from './ignorePlurals';
70
73
  export * from './indexSettings';
71
74
  export * from './indexSettingsAsSearchParams';
72
- export * from './key';
73
75
  export * from './languages';
74
76
  export * from './listApiKeysResponse';
75
77
  export * from './listClustersResponse';
@@ -81,9 +83,8 @@ export * from './logType';
81
83
  export * from './matchLevel';
82
84
  export * from './matchedGeoLocation';
83
85
  export * from './mixedSearchFilters';
84
- export * from './multipleBatchOperation';
86
+ export * from './multipleBatchRequest';
85
87
  export * from './multipleBatchResponse';
86
- export * from './multipleGetObjectsParams';
87
88
  export * from './numericFilters';
88
89
  export * from './operationIndexParams';
89
90
  export * from './operationType';
@@ -2,6 +2,7 @@
2
2
 
3
3
  import type { AdvancedSyntaxFeatures } from './advancedSyntaxFeatures';
4
4
  import type { AlternativesAsExact } from './alternativesAsExact';
5
+ import type { Distinct } from './distinct';
5
6
  import type { ExactOnSingleWordQuery } from './exactOnSingleWordQuery';
6
7
  import type { IgnorePlurals } from './ignorePlurals';
7
8
  import type { QueryType } from './queryType';
@@ -15,147 +16,185 @@ export type IndexSettingsAsSearchParams = {
15
16
  * The complete list of attributes that will be used for faceting.
16
17
  */
17
18
  attributesForFaceting?: string[];
19
+
18
20
  /**
19
21
  * List of attributes that can\'t be retrieved at query time.
20
22
  */
21
23
  unretrievableAttributes?: string[];
24
+
22
25
  /**
23
26
  * This parameter controls which attributes to retrieve and which not to retrieve.
24
27
  */
25
28
  attributesToRetrieve?: string[];
29
+
26
30
  /**
27
31
  * Restricts a given query to look in only a subset of your searchable attributes.
28
32
  */
29
33
  restrictSearchableAttributes?: string[];
34
+
30
35
  /**
31
36
  * Controls how Algolia should sort your results.
32
37
  */
33
38
  ranking?: string[];
39
+
34
40
  /**
35
41
  * Specifies the custom ranking criterion.
36
42
  */
37
43
  customRanking?: string[];
44
+
38
45
  /**
39
46
  * Controls the relevancy threshold below which less relevant results aren\'t included in the results.
40
47
  */
41
48
  relevancyStrictness?: number;
49
+
42
50
  /**
43
51
  * List of attributes to highlight.
44
52
  */
45
53
  attributesToHighlight?: string[];
54
+
46
55
  /**
47
56
  * List of attributes to snippet, with an optional maximum number of words to snippet.
48
57
  */
49
58
  attributesToSnippet?: string[];
59
+
50
60
  /**
51
61
  * The HTML string to insert before the highlighted parts in all highlight and snippet results.
52
62
  */
53
63
  highlightPreTag?: string;
64
+
54
65
  /**
55
66
  * The HTML string to insert after the highlighted parts in all highlight and snippet results.
56
67
  */
57
68
  highlightPostTag?: string;
69
+
58
70
  /**
59
71
  * String used as an ellipsis indicator when a snippet is truncated.
60
72
  */
61
73
  snippetEllipsisText?: string;
74
+
62
75
  /**
63
76
  * Restrict highlighting and snippeting to items that matched the query.
64
77
  */
65
78
  restrictHighlightAndSnippetArrays?: boolean;
79
+
66
80
  /**
67
81
  * Set the number of hits per page.
68
82
  */
69
83
  hitsPerPage?: number;
84
+
70
85
  /**
71
86
  * Minimum number of characters a word in the query string must contain to accept matches with 1 typo.
72
87
  */
73
88
  minWordSizefor1Typo?: number;
89
+
74
90
  /**
75
91
  * Minimum number of characters a word in the query string must contain to accept matches with 2 typos.
76
92
  */
77
93
  minWordSizefor2Typos?: number;
94
+
78
95
  typoTolerance?: TypoTolerance;
96
+
79
97
  /**
80
98
  * Whether to allow typos on numbers (\"numeric tokens\") in the query string.
81
99
  */
82
100
  allowTyposOnNumericTokens?: boolean;
101
+
83
102
  /**
84
103
  * List of attributes on which you want to disable typo tolerance.
85
104
  */
86
105
  disableTypoToleranceOnAttributes?: string[];
106
+
87
107
  ignorePlurals?: IgnorePlurals;
108
+
88
109
  removeStopWords?: RemoveStopWords;
110
+
89
111
  /**
90
112
  * List of characters that the engine shouldn\'t automatically normalize.
91
113
  */
92
114
  keepDiacriticsOnCharacters?: string;
115
+
93
116
  /**
94
117
  * Sets the languages to be used by language-specific settings and functionalities such as ignorePlurals, removeStopWords, and CJK word-detection.
95
118
  */
96
119
  queryLanguages?: string[];
120
+
97
121
  /**
98
122
  * Splits compound words into their composing atoms in the query.
99
123
  */
100
124
  decompoundQuery?: boolean;
125
+
101
126
  /**
102
127
  * Whether Rules should be globally enabled.
103
128
  */
104
129
  enableRules?: boolean;
130
+
105
131
  /**
106
132
  * Enable the Personalization feature.
107
133
  */
108
134
  enablePersonalization?: boolean;
135
+
109
136
  queryType?: QueryType;
137
+
110
138
  removeWordsIfNoResults?: RemoveWordsIfNoResults;
139
+
111
140
  /**
112
141
  * Enables the advanced query syntax.
113
142
  */
114
143
  advancedSyntax?: boolean;
144
+
115
145
  /**
116
146
  * A list of words that should be considered as optional when found in the query.
117
147
  */
118
148
  optionalWords?: string[];
149
+
119
150
  /**
120
151
  * List of attributes on which you want to disable the exact ranking criterion.
121
152
  */
122
153
  disableExactOnAttributes?: string[];
154
+
123
155
  exactOnSingleWordQuery?: ExactOnSingleWordQuery;
156
+
124
157
  /**
125
158
  * List of alternatives that should be considered an exact match by the exact ranking criterion.
126
159
  */
127
160
  alternativesAsExact?: AlternativesAsExact[];
161
+
128
162
  /**
129
163
  * Allows you to specify which advanced syntax features are active when ‘advancedSyntax\' is enabled.
130
164
  */
131
165
  advancedSyntaxFeatures?: AdvancedSyntaxFeatures[];
132
- /**
133
- * Enables de-duplication or grouping of results.
134
- */
135
- distinct?: number;
166
+
167
+ distinct?: Distinct;
168
+
136
169
  /**
137
170
  * Whether to take into account an index\'s synonyms for a particular search.
138
171
  */
139
172
  synonyms?: boolean;
173
+
140
174
  /**
141
175
  * Whether to highlight and snippet the original word that matches the synonym or the synonym itself.
142
176
  */
143
177
  replaceSynonymsInHighlight?: boolean;
178
+
144
179
  /**
145
180
  * Precision of the proximity ranking criterion.
146
181
  */
147
182
  minProximity?: number;
183
+
148
184
  /**
149
185
  * Choose which fields to return in the API response. This parameters applies to search and browse queries.
150
186
  */
151
187
  responseFields?: string[];
188
+
152
189
  /**
153
190
  * Maximum number of facet hits to return during a search for facet values. For performance reasons, the maximum allowed number of returned values is 100.
154
191
  */
155
192
  maxFacetHits?: number;
193
+
156
194
  /**
157
195
  * When attribute is ranked above proximity in your ranking formula, proximity is used to select which searchable attribute is matched in the attribute ranking stage.
158
196
  */
159
197
  attributeCriteriaComputedByMinProximity?: boolean;
198
+
160
199
  renderingContent?: RenderingContent;
161
200
  };
@@ -7,6 +7,8 @@ import type { DictionaryLanguage } from './dictionaryLanguage';
7
7
  */
8
8
  export type Languages = {
9
9
  plurals: DictionaryLanguage | null;
10
+
10
11
  stopwords: DictionaryLanguage | null;
12
+
11
13
  compounds: DictionaryLanguage | null;
12
14
  };
@@ -1,10 +1,10 @@
1
1
  // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
2
2
 
3
- import type { Key } from './key';
3
+ import type { GetApiKeyResponse } from './getApiKeyResponse';
4
4
 
5
5
  export type ListApiKeysResponse = {
6
6
  /**
7
7
  * List of api keys.
8
8
  */
9
- keys: Key[];
9
+ keys: GetApiKeyResponse[];
10
10
  };
@@ -6,7 +6,8 @@ export type ListIndicesResponse = {
6
6
  /**
7
7
  * List of the fetched indices.
8
8
  */
9
- items?: FetchedIndex[];
9
+ items: FetchedIndex[];
10
+
10
11
  /**
11
12
  * Number of pages.
12
13
  */
package/model/log.ts CHANGED
@@ -7,58 +7,72 @@ export type Log = {
7
7
  * Timestamp in ISO-8601 format.
8
8
  */
9
9
  timestamp: string;
10
+
10
11
  /**
11
12
  * HTTP method of the performed request.
12
13
  */
13
14
  method: string;
15
+
14
16
  /**
15
17
  * HTTP response code.
16
18
  */
17
19
  answer_code: string;
20
+
18
21
  /**
19
22
  * Request body. Truncated after 1000 characters.
20
23
  */
21
24
  query_body: string;
25
+
22
26
  /**
23
27
  * Answer body. Truncated after 1000 characters.
24
28
  */
25
29
  answer: string;
30
+
26
31
  /**
27
32
  * Request URL.
28
33
  */
29
34
  url: string;
35
+
30
36
  /**
31
37
  * IP of the client which performed the request.
32
38
  */
33
39
  ip: string;
40
+
34
41
  /**
35
42
  * Request Headers (API Key is obfuscated).
36
43
  */
37
44
  query_headers: string;
45
+
38
46
  /**
39
47
  * SHA1 signature of the log entry.
40
48
  */
41
49
  sha1: string;
50
+
42
51
  /**
43
52
  * Number of API calls.
44
53
  */
45
54
  nb_api_calls: string;
55
+
46
56
  /**
47
57
  * Processing time for the query. It doesn\'t include network time.
48
58
  */
49
59
  processing_time_ms: string;
60
+
50
61
  /**
51
62
  * Index targeted by the query.
52
63
  */
53
64
  index?: string;
65
+
54
66
  /**
55
67
  * Query parameters sent with the request.
56
68
  */
57
69
  query_params?: string;
70
+
58
71
  /**
59
72
  * Number of hits returned for the query.
60
73
  */
61
74
  query_nb_hits?: string;
75
+
62
76
  /**
63
77
  * Array of all performed queries for the given request.
64
78
  */
package/model/logQuery.ts CHANGED
@@ -5,10 +5,12 @@ export type LogQuery = {
5
5
  * Index targeted by the query.
6
6
  */
7
7
  index_name?: string;
8
+
8
9
  /**
9
10
  * User identifier.
10
11
  */
11
12
  user_token?: string;
13
+
12
14
  /**
13
15
  * QueryID for the given query.
14
16
  */
@@ -5,10 +5,12 @@ export type MatchedGeoLocation = {
5
5
  * Latitude of the matched location.
6
6
  */
7
7
  lat?: number;
8
+
8
9
  /**
9
10
  * Longitude of the matched location.
10
11
  */
11
12
  lng?: number;
13
+
12
14
  /**
13
15
  * Distance between the matched location and the search location (in meters).
14
16
  */
@@ -2,14 +2,16 @@
2
2
 
3
3
  import type { Action } from './action';
4
4
 
5
- export type MultipleBatchOperation = {
6
- action?: Action;
5
+ export type MultipleBatchRequest = {
6
+ action: Action;
7
+
7
8
  /**
8
9
  * Arguments to the operation (depends on the type of the operation).
9
10
  */
10
- body?: Record<string, any>;
11
+ body: Record<string, any>;
12
+
11
13
  /**
12
14
  * Index to target for this operation.
13
15
  */
14
- indexName?: string;
16
+ indexName: string;
15
17
  };
@@ -4,9 +4,10 @@ export type MultipleBatchResponse = {
4
4
  /**
5
5
  * List of tasksIDs per index.
6
6
  */
7
- taskID?: Record<string, any>;
7
+ taskID: Record<string, number>;
8
+
8
9
  /**
9
10
  * List of objectID.
10
11
  */
11
- objectIDs?: string[];
12
+ objectIDs: string[];
12
13
  };
@@ -5,10 +5,12 @@ import type { ScopeType } from './scopeType';
5
5
 
6
6
  export type OperationIndexParams = {
7
7
  operation: OperationType;
8
+
8
9
  /**
9
10
  * The Algolia index name.
10
11
  */
11
12
  destination: string;
13
+
12
14
  /**
13
15
  * Scope of the data to copy. When absent, a full copy is performed. When present, only the selected scopes are copied.
14
16
  */
package/model/params.ts CHANGED
@@ -9,7 +9,10 @@ import type { RenderingContent } from './renderingContent';
9
9
  */
10
10
  export type Params = {
11
11
  query?: ConsequenceQuery;
12
+
12
13
  automaticFacetFilters?: AutomaticFacetFilters;
14
+
13
15
  automaticOptionalFacetFilters?: AutomaticFacetFilters;
16
+
14
17
  renderingContent?: RenderingContent;
15
18
  };
@@ -5,10 +5,12 @@ export type Personalization = {
5
5
  * The score of the filters.
6
6
  */
7
7
  filtersScore?: number;
8
+
8
9
  /**
9
10
  * The score of the ranking.
10
11
  */
11
12
  rankingScore?: number;
13
+
12
14
  /**
13
15
  * The score of the event.
14
16
  */
@@ -8,6 +8,7 @@ export type PromoteObjectID = {
8
8
  * Unique identifier of the object to promote.
9
9
  */
10
10
  objectID: string;
11
+
11
12
  /**
12
13
  * The position to promote the objects to (zero-based). If you pass objectIDs, the objects are placed at this position as a group. For example, if you pass four objectIDs to position 0, the objects take the first four positions.
13
14
  */
@@ -8,6 +8,7 @@ export type PromoteObjectIDs = {
8
8
  * Array of unique identifiers of the objects to promote.
9
9
  */
10
10
  objectIDs: string[];
11
+
11
12
  /**
12
13
  * The position to promote the objects to (zero-based). If you pass objectIDs, the objects are placed at this position as a group. For example, if you pass four objectIDs to position 0, the objects take the first four positions.
13
14
  */
@@ -8,44 +8,56 @@ export type RankingInfo = {
8
8
  * This field is reserved for advanced usage.
9
9
  */
10
10
  filters: number;
11
+
11
12
  /**
12
13
  * Position of the most important matched attribute in the attributes to index list.
13
14
  */
14
15
  firstMatchedWord: number;
16
+
15
17
  /**
16
18
  * Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters).
17
19
  */
18
20
  geoDistance: number;
21
+
19
22
  /**
20
23
  * Precision used when computing the geo distance, in meters.
21
24
  */
22
25
  geoPrecision?: number;
26
+
23
27
  matchedGeoLocation?: MatchedGeoLocation;
28
+
24
29
  personalization?: Personalization;
30
+
25
31
  /**
26
32
  * Number of exactly matched words.
27
33
  */
28
34
  nbExactWords: number;
35
+
29
36
  /**
30
37
  * Number of typos encountered when matching the record.
31
38
  */
32
39
  nbTypos: number;
40
+
33
41
  /**
34
42
  * Present and set to true if a Rule promoted the hit.
35
43
  */
36
44
  promoted: boolean;
45
+
37
46
  /**
38
47
  * When the query contains more than one word, the sum of the distances between matched words (in meters).
39
48
  */
40
49
  proximityDistance?: number;
50
+
41
51
  /**
42
52
  * Custom ranking for the object, expressed as a single integer value.
43
53
  */
44
54
  userScore: number;
55
+
45
56
  /**
46
57
  * Number of matched words, including prefixes and typos.
47
58
  */
48
59
  words: number;
60
+
49
61
  /**
50
62
  * Wether the record are promoted by the re-ranking strategy.
51
63
  */
package/model/rule.ts CHANGED
@@ -12,19 +12,24 @@ export type Rule = {
12
12
  * Unique identifier of the object.
13
13
  */
14
14
  objectID: string;
15
+
15
16
  /**
16
17
  * A list of conditions that should apply to activate a Rule. You can use up to 25 conditions per Rule.
17
18
  */
18
19
  conditions?: Condition[];
20
+
19
21
  consequence?: Consequence;
22
+
20
23
  /**
21
24
  * This field is intended for Rule management purposes, in particular to ease searching for Rules and presenting them to human readers. It\'s not interpreted by the API.
22
25
  */
23
26
  description?: string;
27
+
24
28
  /**
25
29
  * Whether the Rule is enabled. Disabled Rules remain in the index, but aren\'t applied at query time.
26
30
  */
27
31
  enabled?: boolean;
32
+
28
33
  /**
29
34
  * By default, Rules are permanently valid. When validity periods are specified, the Rule applies only during those periods; it\'s ignored the rest of the time. The list must not be empty.
30
35
  */
@@ -1,11 +1,13 @@
1
1
  // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
2
2
 
3
3
  export type SaveObjectResponse = {
4
- createdAt?: string;
4
+ createdAt: string;
5
+
5
6
  /**
6
7
  * TaskID of the task to wait for.
7
8
  */
8
- taskID?: number;
9
+ taskID: number;
10
+
9
11
  /**
10
12
  * Unique identifier of the object.
11
13
  */
@@ -5,10 +5,12 @@ export type SaveSynonymResponse = {
5
5
  * TaskID of the task to wait for.
6
6
  */
7
7
  taskID: number;
8
+
8
9
  /**
9
10
  * Date of last update (ISO-8601 format).
10
11
  */
11
12
  updatedAt: string;
13
+
12
14
  /**
13
15
  * ObjectID of the inserted object.
14
16
  */
@@ -8,14 +8,17 @@ export type SearchDictionaryEntriesParams = {
8
8
  * The text to search in the index.
9
9
  */
10
10
  query: string;
11
+
11
12
  /**
12
13
  * Specify the page to retrieve.
13
14
  */
14
15
  page?: number;
16
+
15
17
  /**
16
18
  * Set the number of hits per page.
17
19
  */
18
20
  hitsPerPage?: number;
21
+
19
22
  /**
20
23
  * Language ISO code supported by the dictionary (e.g., \"en\" for English).
21
24
  */
@@ -5,10 +5,12 @@ export type SearchForFacetValuesRequest = {
5
5
  * Search parameters as URL-encoded query string.
6
6
  */
7
7
  params?: string;
8
+
8
9
  /**
9
10
  * Text to search inside the facet\'s values.
10
11
  */
11
12
  facetQuery?: string;
13
+
12
14
  /**
13
15
  * Maximum number of facet hits to return during a search for facet values. For performance reasons, the maximum allowed number of returned values is 100.
14
16
  */
@@ -7,17 +7,21 @@ export type SearchForFacetsOptions = {
7
7
  * The `facet` name.
8
8
  */
9
9
  facet: string;
10
+
10
11
  /**
11
12
  * The Algolia index name.
12
13
  */
13
14
  indexName: string;
15
+
14
16
  /**
15
17
  * Text to search inside the facet\'s values.
16
18
  */
17
19
  facetQuery?: string;
20
+
18
21
  /**
19
22
  * Maximum number of facet hits to return during a search for facet values. For performance reasons, the maximum allowed number of returned values is 100.
20
23
  */
21
24
  maxFacetHits?: number;
25
+
22
26
  type: SearchTypeFacet;
23
27
  };
@@ -7,5 +7,6 @@ export type SearchForHitsOptions = {
7
7
  * The Algolia index name.
8
8
  */
9
9
  indexName: string;
10
+
10
11
  type?: SearchTypeDefault;
11
12
  } & { facet?: never; maxFacetHits?: never; facetQuery?: never };
@@ -2,6 +2,6 @@
2
2
 
3
3
  import type { Hit } from './hit';
4
4
 
5
- export type SearchHits<T> = {
6
- hits?: Array<Hit<T>>;
5
+ export type SearchHits<T = Record<string, any>> = {
6
+ hits: Array<Hit<T>>;
7
7
  };