@algolia/client-search 5.0.0-alpha.2 → 5.0.0-alpha.5

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 (214) 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 +148 -26
  6. package/dist/client-search.esm.browser.js +176 -54
  7. package/dist/client-search.esm.node.js +149 -27
  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.map +1 -1
  22. package/dist/model/batchAssignUserIdsParams.d.ts.map +1 -1
  23. package/dist/model/batchDictionaryEntriesParams.d.ts.map +1 -1
  24. package/dist/model/batchDictionaryEntriesRequest.d.ts.map +1 -1
  25. package/dist/model/batchParams.d.ts +2 -2
  26. package/dist/model/batchParams.d.ts.map +1 -1
  27. package/dist/model/{batchOperation.d.ts → batchRequest.d.ts} +2 -2
  28. package/dist/model/batchRequest.d.ts.map +1 -0
  29. package/dist/model/batchResponse.d.ts.map +1 -1
  30. package/dist/model/batchWriteParams.d.ts +2 -2
  31. package/dist/model/batchWriteParams.d.ts.map +1 -1
  32. package/dist/model/browseRequest.d.ts.map +1 -1
  33. package/dist/model/browseResponse.d.ts +1 -1
  34. package/dist/model/browseResponse.d.ts.map +1 -1
  35. package/dist/model/builtInOperation.d.ts.map +1 -1
  36. package/dist/model/clientMethodProps.d.ts +22 -11
  37. package/dist/model/clientMethodProps.d.ts.map +1 -1
  38. package/dist/model/condition.d.ts.map +1 -1
  39. package/dist/model/consequence.d.ts.map +1 -1
  40. package/dist/model/consequenceQueryObject.d.ts.map +1 -1
  41. package/dist/model/deletedAtResponse.d.ts.map +1 -1
  42. package/dist/model/dictionaryEntry.d.ts.map +1 -1
  43. package/dist/model/distinct.d.ts +5 -0
  44. package/dist/model/distinct.d.ts.map +1 -0
  45. package/dist/model/edit.d.ts.map +1 -1
  46. package/dist/model/facetHits.d.ts.map +1 -1
  47. package/dist/model/facetOrdering.d.ts.map +1 -1
  48. package/dist/model/facetsStats.d.ts.map +1 -1
  49. package/dist/model/fetchedIndex.d.ts.map +1 -1
  50. package/dist/model/getApiKeyResponse.d.ts +4 -0
  51. package/dist/model/getApiKeyResponse.d.ts.map +1 -0
  52. package/dist/model/getObjectsParams.d.ts +2 -2
  53. package/dist/model/getObjectsParams.d.ts.map +1 -1
  54. package/dist/model/{multipleGetObjectsParams.d.ts → getObjectsRequest.d.ts} +2 -2
  55. package/dist/model/getObjectsRequest.d.ts.map +1 -0
  56. package/dist/model/getObjectsResponse.d.ts +2 -2
  57. package/dist/model/getObjectsResponse.d.ts.map +1 -1
  58. package/dist/model/hasPendingMappingsResponse.d.ts.map +1 -1
  59. package/dist/model/highlightResultOption.d.ts.map +1 -1
  60. package/dist/model/hit.d.ts +1 -1
  61. package/dist/model/hit.d.ts.map +1 -1
  62. package/dist/model/index.d.ts +7 -6
  63. package/dist/model/index.d.ts.map +1 -1
  64. package/dist/model/indexSettingsAsSearchParams.d.ts +2 -4
  65. package/dist/model/indexSettingsAsSearchParams.d.ts.map +1 -1
  66. package/dist/model/languages.d.ts.map +1 -1
  67. package/dist/model/listApiKeysResponse.d.ts +2 -2
  68. package/dist/model/listApiKeysResponse.d.ts.map +1 -1
  69. package/dist/model/listIndicesResponse.d.ts +1 -1
  70. package/dist/model/listIndicesResponse.d.ts.map +1 -1
  71. package/dist/model/log.d.ts.map +1 -1
  72. package/dist/model/logQuery.d.ts.map +1 -1
  73. package/dist/model/matchedGeoLocation.d.ts.map +1 -1
  74. package/dist/model/{multipleBatchOperation.d.ts → multipleBatchRequest.d.ts} +5 -5
  75. package/dist/model/multipleBatchRequest.d.ts.map +1 -0
  76. package/dist/model/multipleBatchResponse.d.ts +2 -2
  77. package/dist/model/multipleBatchResponse.d.ts.map +1 -1
  78. package/dist/model/operationIndexParams.d.ts.map +1 -1
  79. package/dist/model/params.d.ts.map +1 -1
  80. package/dist/model/personalization.d.ts.map +1 -1
  81. package/dist/model/promoteObjectID.d.ts.map +1 -1
  82. package/dist/model/promoteObjectIDs.d.ts.map +1 -1
  83. package/dist/model/rankingInfo.d.ts.map +1 -1
  84. package/dist/model/rule.d.ts.map +1 -1
  85. package/dist/model/saveObjectResponse.d.ts +2 -2
  86. package/dist/model/saveObjectResponse.d.ts.map +1 -1
  87. package/dist/model/saveSynonymResponse.d.ts.map +1 -1
  88. package/dist/model/searchDictionaryEntriesParams.d.ts.map +1 -1
  89. package/dist/model/searchForFacetValuesRequest.d.ts.map +1 -1
  90. package/dist/model/searchForFacetsOptions.d.ts.map +1 -1
  91. package/dist/model/searchForHitsOptions.d.ts.map +1 -1
  92. package/dist/model/searchHits.d.ts +1 -1
  93. package/dist/model/searchHits.d.ts.map +1 -1
  94. package/dist/model/searchMethodParams.d.ts.map +1 -1
  95. package/dist/model/searchResponse.d.ts +1 -1
  96. package/dist/model/searchResponse.d.ts.map +1 -1
  97. package/dist/model/searchResponses.d.ts +1 -1
  98. package/dist/model/searchResponses.d.ts.map +1 -1
  99. package/dist/model/searchRulesParams.d.ts.map +1 -1
  100. package/dist/model/searchRulesResponse.d.ts.map +1 -1
  101. package/dist/model/searchSynonymsResponse.d.ts.map +1 -1
  102. package/dist/model/searchUserIdsParams.d.ts.map +1 -1
  103. package/dist/model/searchUserIdsResponse.d.ts.map +1 -1
  104. package/dist/model/snippetResultOption.d.ts.map +1 -1
  105. package/dist/model/source.d.ts.map +1 -1
  106. package/dist/model/standardEntries.d.ts.map +1 -1
  107. package/dist/model/synonymHit.d.ts.map +1 -1
  108. package/dist/model/synonymHitHighlightResult.d.ts.map +1 -1
  109. package/dist/model/timeRange.d.ts.map +1 -1
  110. package/dist/model/updateApiKeyResponse.d.ts +1 -1
  111. package/dist/model/updateApiKeyResponse.d.ts.map +1 -1
  112. package/dist/model/updatedAtResponse.d.ts.map +1 -1
  113. package/dist/model/updatedAtWithObjectIdResponse.d.ts.map +1 -1
  114. package/dist/model/updatedRuleResponse.d.ts.map +1 -1
  115. package/dist/model/userHighlightResult.d.ts.map +1 -1
  116. package/dist/model/userHit.d.ts.map +1 -1
  117. package/dist/model/userId.d.ts.map +1 -1
  118. package/dist/model/value.d.ts.map +1 -1
  119. package/dist/src/searchClient.d.ts +64 -17
  120. package/dist/src/searchClient.d.ts.map +1 -1
  121. package/model/acl.ts +3 -0
  122. package/model/addApiKeyResponse.ts +2 -1
  123. package/model/apiKey.ts +7 -0
  124. package/model/{attributeOrBuiltInOperation.ts → attributeToUpdate.ts} +1 -1
  125. package/model/automaticFacetFilter.ts +2 -0
  126. package/model/baseGetApiKeyResponse.ts +13 -0
  127. package/model/baseIndexSettings.ts +13 -0
  128. package/model/baseSearchParamsWithoutQuery.ts +32 -0
  129. package/model/baseSearchResponse.ts +24 -0
  130. package/model/batchAssignUserIdsParams.ts +1 -0
  131. package/model/batchDictionaryEntriesParams.ts +1 -0
  132. package/model/batchDictionaryEntriesRequest.ts +1 -0
  133. package/model/batchParams.ts +2 -2
  134. package/model/{batchOperation.ts → batchRequest.ts} +2 -1
  135. package/model/batchResponse.ts +1 -0
  136. package/model/batchWriteParams.ts +2 -2
  137. package/model/browseRequest.ts +1 -0
  138. package/model/browseResponse.ts +1 -1
  139. package/model/builtInOperation.ts +1 -0
  140. package/model/clientMethodProps.ts +27 -16
  141. package/model/condition.ts +3 -0
  142. package/model/consequence.ts +4 -0
  143. package/model/consequenceQueryObject.ts +1 -0
  144. package/model/deletedAtResponse.ts +1 -0
  145. package/model/dictionaryEntry.ts +5 -0
  146. package/model/{createdAtObject.ts → distinct.ts} +4 -6
  147. package/model/edit.ts +2 -0
  148. package/model/facetHits.ts +2 -0
  149. package/model/facetOrdering.ts +1 -0
  150. package/model/facetsStats.ts +3 -0
  151. package/model/fetchedIndex.ts +10 -0
  152. package/model/{key.ts → getApiKeyResponse.ts} +2 -2
  153. package/model/getObjectsParams.ts +2 -2
  154. package/model/{multipleGetObjectsParams.ts → getObjectsRequest.ts} +3 -1
  155. package/model/getObjectsResponse.ts +2 -2
  156. package/model/hasPendingMappingsResponse.ts +1 -0
  157. package/model/highlightResultOption.ts +3 -0
  158. package/model/hit.ts +5 -1
  159. package/model/index.ts +7 -6
  160. package/model/indexSettingsAsSearchParams.ts +43 -4
  161. package/model/languages.ts +2 -0
  162. package/model/listApiKeysResponse.ts +2 -2
  163. package/model/listIndicesResponse.ts +2 -1
  164. package/model/log.ts +14 -0
  165. package/model/logQuery.ts +2 -0
  166. package/model/matchedGeoLocation.ts +2 -0
  167. package/model/{multipleBatchOperation.ts → multipleBatchRequest.ts} +6 -4
  168. package/model/multipleBatchResponse.ts +3 -2
  169. package/model/operationIndexParams.ts +2 -0
  170. package/model/params.ts +3 -0
  171. package/model/personalization.ts +2 -0
  172. package/model/promoteObjectID.ts +1 -0
  173. package/model/promoteObjectIDs.ts +1 -0
  174. package/model/rankingInfo.ts +12 -0
  175. package/model/rule.ts +5 -0
  176. package/model/saveObjectResponse.ts +4 -2
  177. package/model/saveSynonymResponse.ts +2 -0
  178. package/model/searchDictionaryEntriesParams.ts +3 -0
  179. package/model/searchForFacetValuesRequest.ts +2 -0
  180. package/model/searchForFacetsOptions.ts +4 -0
  181. package/model/searchForHitsOptions.ts +1 -0
  182. package/model/searchHits.ts +1 -1
  183. package/model/searchMethodParams.ts +1 -0
  184. package/model/searchResponse.ts +2 -1
  185. package/model/searchResponses.ts +1 -1
  186. package/model/searchRulesParams.ts +6 -0
  187. package/model/searchRulesResponse.ts +3 -0
  188. package/model/searchSynonymsResponse.ts +1 -0
  189. package/model/searchUserIdsParams.ts +3 -0
  190. package/model/searchUserIdsResponse.ts +4 -0
  191. package/model/snippetResultOption.ts +1 -0
  192. package/model/source.ts +1 -0
  193. package/model/standardEntries.ts +2 -0
  194. package/model/synonymHit.ts +8 -0
  195. package/model/synonymHitHighlightResult.ts +1 -0
  196. package/model/timeRange.ts +1 -0
  197. package/model/updateApiKeyResponse.ts +2 -1
  198. package/model/updatedAtResponse.ts +1 -0
  199. package/model/updatedAtWithObjectIdResponse.ts +2 -0
  200. package/model/updatedRuleResponse.ts +2 -0
  201. package/model/userHighlightResult.ts +1 -0
  202. package/model/userHit.ts +5 -0
  203. package/model/userId.ts +3 -0
  204. package/model/value.ts +1 -0
  205. package/package.json +5 -5
  206. package/dist/model/attributeOrBuiltInOperation.d.ts +0 -3
  207. package/dist/model/attributeOrBuiltInOperation.d.ts.map +0 -1
  208. package/dist/model/batchOperation.d.ts.map +0 -1
  209. package/dist/model/createdAtObject.d.ts +0 -7
  210. package/dist/model/createdAtObject.d.ts.map +0 -1
  211. package/dist/model/key.d.ts +0 -4
  212. package/dist/model/key.d.ts.map +0 -1
  213. package/dist/model/multipleBatchOperation.d.ts.map +0 -1
  214. package/dist/model/multipleGetObjectsParams.d.ts.map +0 -1
@@ -5,14 +5,17 @@ export type FacetsStats = {
5
5
  * The minimum value in the result set.
6
6
  */
7
7
  min?: number;
8
+
8
9
  /**
9
10
  * The maximum value in the result set.
10
11
  */
11
12
  max?: number;
13
+
12
14
  /**
13
15
  * The average facet value in the result set.
14
16
  */
15
17
  avg?: number;
18
+
16
19
  /**
17
20
  * The sum of all values in the result set.
18
21
  */
@@ -5,42 +5,52 @@ export type FetchedIndex = {
5
5
  * Index name.
6
6
  */
7
7
  name: string;
8
+
8
9
  /**
9
10
  * Index creation date. An empty string means that the index has no records.
10
11
  */
11
12
  createdAt: string;
13
+
12
14
  /**
13
15
  * Date of last update (ISO-8601 format).
14
16
  */
15
17
  updatedAt: string;
18
+
16
19
  /**
17
20
  * Number of records contained in the index.
18
21
  */
19
22
  entries: number;
23
+
20
24
  /**
21
25
  * Number of bytes of the index in minified format.
22
26
  */
23
27
  dataSize: number;
28
+
24
29
  /**
25
30
  * Number of bytes of the index binary file.
26
31
  */
27
32
  fileSize: number;
33
+
28
34
  /**
29
35
  * Last build time.
30
36
  */
31
37
  lastBuildTimeS: number;
38
+
32
39
  /**
33
40
  * Number of pending indexing operations. This value is deprecated and should not be used.
34
41
  */
35
42
  numberOfPendingTask?: number;
43
+
36
44
  /**
37
45
  * A boolean which says whether the index has pending tasks. This value is deprecated and should not be used.
38
46
  */
39
47
  pendingTask: boolean;
48
+
40
49
  /**
41
50
  * Only present if the index is a replica. Contains the name of the related primary index.
42
51
  */
43
52
  primary?: string;
53
+
44
54
  /**
45
55
  * Only present if the index is a primary index with replicas. Contains the names of all linked replicas.
46
56
  */
@@ -1,6 +1,6 @@
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
  import type { ApiKey } from './apiKey';
4
- import type { CreatedAtObject } from './createdAtObject';
4
+ import type { BaseGetApiKeyResponse } from './baseGetApiKeyResponse';
5
5
 
6
- export type Key = ApiKey & CreatedAtObject;
6
+ export type GetApiKeyResponse = ApiKey & BaseGetApiKeyResponse;
@@ -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 { MultipleGetObjectsParams } from './multipleGetObjectsParams';
3
+ import type { GetObjectsRequest } from './getObjectsRequest';
4
4
 
5
5
  /**
6
6
  * The `getObjects` parameters.
7
7
  */
8
8
  export type GetObjectsParams = {
9
- requests?: MultipleGetObjectsParams[];
9
+ requests: GetObjectsRequest[];
10
10
  };
@@ -3,15 +3,17 @@
3
3
  /**
4
4
  * GetObjects operation on an index.
5
5
  */
6
- export type MultipleGetObjectsParams = {
6
+ export type GetObjectsRequest = {
7
7
  /**
8
8
  * List of attributes to retrieve. By default, all retrievable attributes are returned.
9
9
  */
10
10
  attributesToRetrieve?: string[];
11
+
11
12
  /**
12
13
  * ID of the object within that index.
13
14
  */
14
15
  objectID: string;
16
+
15
17
  /**
16
18
  * Name of the index containing the object.
17
19
  */
@@ -1,8 +1,8 @@
1
1
  // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
2
2
 
3
- export type GetObjectsResponse = {
3
+ export type GetObjectsResponse<T = Record<string, any>> = {
4
4
  /**
5
5
  * List of results fetched.
6
6
  */
7
- results?: Array<Record<string, any>>;
7
+ results: T[];
8
8
  };
@@ -5,6 +5,7 @@ export type HasPendingMappingsResponse = {
5
5
  * If there is any clusters with pending mapping state.
6
6
  */
7
7
  pending: boolean;
8
+
8
9
  /**
9
10
  * Describe cluster pending (migrating, creating, deleting) mapping state.
10
11
  */
@@ -10,11 +10,14 @@ export type HighlightResultOption = {
10
10
  * Markup text with occurrences highlighted.
11
11
  */
12
12
  value: string;
13
+
13
14
  matchLevel: MatchLevel;
15
+
14
16
  /**
15
17
  * List of words from the query that matched the object.
16
18
  */
17
19
  matchedWords: string[];
20
+
18
21
  /**
19
22
  * Whether the entire attribute value is highlighted.
20
23
  */
package/model/hit.ts CHANGED
@@ -7,19 +7,23 @@ import type { SnippetResult } from './snippetResult';
7
7
  /**
8
8
  * A single hit.
9
9
  */
10
- export type Hit<T> = T & {
10
+ export type Hit<T = Record<string, any>> = T & {
11
11
  /**
12
12
  * Unique identifier of the object.
13
13
  */
14
14
  objectID: string;
15
+
15
16
  /**
16
17
  * Show highlighted section and words matched on a query.
17
18
  */
18
19
  _highlightResult?: Record<string, HighlightResult>;
20
+
19
21
  /**
20
22
  * Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty.
21
23
  */
22
24
  _snippetResult?: Record<string, SnippetResult>;
25
+
23
26
  _rankingInfo?: RankingInfo;
27
+
24
28
  _distinctSeqID?: number;
25
29
  };
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
  */