@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
@@ -0,0 +1,13 @@
1
+ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
2
+
3
+ export type BaseGetApiKeyResponse = {
4
+ /**
5
+ * The API key.
6
+ */
7
+ value?: string;
8
+
9
+ /**
10
+ * Time of the event expressed in milliseconds since the Unix epoch.
11
+ */
12
+ createdAt: number;
13
+ };
@@ -5,54 +5,67 @@ export type BaseIndexSettings = {
5
5
  * Creates replicas, exact copies of an index.
6
6
  */
7
7
  replicas?: string[];
8
+
8
9
  /**
9
10
  * Set the maximum number of hits accessible via pagination.
10
11
  */
11
12
  paginationLimitedTo?: number;
13
+
12
14
  /**
13
15
  * A list of words for which you want to turn off typo tolerance.
14
16
  */
15
17
  disableTypoToleranceOnWords?: string[];
18
+
16
19
  /**
17
20
  * Specify on which attributes in your index Algolia should apply Japanese transliteration to make words indexed in Katakana or Kanji searchable in Hiragana.
18
21
  */
19
22
  attributesToTransliterate?: string[];
23
+
20
24
  /**
21
25
  * List of attributes on which to do a decomposition of camel case words.
22
26
  */
23
27
  camelCaseAttributes?: string[];
28
+
24
29
  /**
25
30
  * Specify on which attributes in your index Algolia should apply word segmentation, also known as decompounding.
26
31
  */
27
32
  decompoundedAttributes?: Record<string, any>;
33
+
28
34
  /**
29
35
  * Sets the languages at the index level for language-specific processing such as tokenization and normalization.
30
36
  */
31
37
  indexLanguages?: string[];
38
+
32
39
  /**
33
40
  * List of attributes on which you want to disable prefix matching.
34
41
  */
35
42
  disablePrefixOnAttributes?: string[];
43
+
36
44
  /**
37
45
  * Enables compression of large integer arrays.
38
46
  */
39
47
  allowCompressionOfIntegerArray?: boolean;
48
+
40
49
  /**
41
50
  * List of numeric attributes that can be used as numerical filters.
42
51
  */
43
52
  numericAttributesForFiltering?: string[];
53
+
44
54
  /**
45
55
  * Control which separators are indexed.
46
56
  */
47
57
  separatorsToIndex?: string;
58
+
48
59
  /**
49
60
  * The complete list of attributes used for searching.
50
61
  */
51
62
  searchableAttributes?: string[];
63
+
52
64
  /**
53
65
  * Lets you store custom data in your indices.
54
66
  */
55
67
  userData?: Record<string, any>;
68
+
56
69
  /**
57
70
  * Overrides Algolia\'s default normalization.
58
71
  */
@@ -12,114 +12,146 @@ export type BaseSearchParamsWithoutQuery = {
12
12
  * Overrides the query parameter and performs a more generic search that can be used to find \"similar\" results.
13
13
  */
14
14
  similarQuery?: string;
15
+
15
16
  /**
16
17
  * Filter the query with numeric, facet and/or tag filters.
17
18
  */
18
19
  filters?: string;
20
+
19
21
  facetFilters?: FacetFilters;
22
+
20
23
  optionalFilters?: OptionalFilters;
24
+
21
25
  numericFilters?: NumericFilters;
26
+
22
27
  tagFilters?: TagFilters;
28
+
23
29
  /**
24
30
  * Determines how to calculate the total score for filtering.
25
31
  */
26
32
  sumOrFiltersScores?: boolean;
33
+
27
34
  /**
28
35
  * Retrieve facets and their facet values.
29
36
  */
30
37
  facets?: string[];
38
+
31
39
  /**
32
40
  * Maximum number of facet values to return for each facet during a regular search.
33
41
  */
34
42
  maxValuesPerFacet?: number;
43
+
35
44
  /**
36
45
  * Force faceting to be applied after de-duplication (via the Distinct setting).
37
46
  */
38
47
  facetingAfterDistinct?: boolean;
48
+
39
49
  /**
40
50
  * Controls how facet values are fetched.
41
51
  */
42
52
  sortFacetValuesBy?: string;
53
+
43
54
  /**
44
55
  * Specify the page to retrieve.
45
56
  */
46
57
  page?: number;
58
+
47
59
  /**
48
60
  * Specify the offset of the first hit to return.
49
61
  */
50
62
  offset?: number;
63
+
51
64
  /**
52
65
  * Set the number of hits to retrieve (used only with offset).
53
66
  */
54
67
  length?: number;
68
+
55
69
  /**
56
70
  * Search for entries around a central geolocation, enabling a geo search within a circular area.
57
71
  */
58
72
  aroundLatLng?: string;
73
+
59
74
  /**
60
75
  * Search for entries around a given location automatically computed from the requester\'s IP address.
61
76
  */
62
77
  aroundLatLngViaIP?: boolean;
78
+
63
79
  aroundRadius?: AroundRadius;
80
+
64
81
  /**
65
82
  * Precision of geo search (in meters), to add grouping by geo location to the ranking formula.
66
83
  */
67
84
  aroundPrecision?: number;
85
+
68
86
  /**
69
87
  * Minimum radius (in meters) used for a geo search when aroundRadius is not set.
70
88
  */
71
89
  minimumAroundRadius?: number;
90
+
72
91
  /**
73
92
  * Search inside a rectangular area (in geo coordinates).
74
93
  */
75
94
  insideBoundingBox?: number[];
95
+
76
96
  /**
77
97
  * Search inside a polygon (in geo coordinates).
78
98
  */
79
99
  insidePolygon?: number[];
100
+
80
101
  /**
81
102
  * This parameter changes the default values of certain parameters and settings that work best for a natural language query, such as ignorePlurals, removeStopWords, removeWordsIfNoResults, analyticsTags and ruleContexts. These parameters and settings work well together when the query is formatted in natural language instead of keywords, for example when your user performs a voice search.
82
103
  */
83
104
  naturalLanguages?: string[];
105
+
84
106
  /**
85
107
  * Enables contextual rules.
86
108
  */
87
109
  ruleContexts?: string[];
110
+
88
111
  /**
89
112
  * Define the impact of the Personalization feature.
90
113
  */
91
114
  personalizationImpact?: number;
115
+
92
116
  /**
93
117
  * Associates a certain user token with the current search.
94
118
  */
95
119
  userToken?: string;
120
+
96
121
  /**
97
122
  * Retrieve detailed ranking information.
98
123
  */
99
124
  getRankingInfo?: boolean;
125
+
100
126
  /**
101
127
  * Enable the Click Analytics feature.
102
128
  */
103
129
  clickAnalytics?: boolean;
130
+
104
131
  /**
105
132
  * Whether the current query will be taken into account in the Analytics.
106
133
  */
107
134
  analytics?: boolean;
135
+
108
136
  /**
109
137
  * List of tags to apply to the query for analytics purposes.
110
138
  */
111
139
  analyticsTags?: string[];
140
+
112
141
  /**
113
142
  * Whether to include or exclude a query from the processing-time percentile computation.
114
143
  */
115
144
  percentileComputation?: boolean;
145
+
116
146
  /**
117
147
  * Whether this search should participate in running AB tests.
118
148
  */
119
149
  enableABTest?: boolean;
150
+
120
151
  /**
121
152
  * Whether this search should use AI Re-Ranking.
122
153
  */
123
154
  enableReRanking?: boolean;
155
+
124
156
  reRankingApplyFilter?: ReRankingApplyFilter | null;
125
157
  };
@@ -8,97 +8,121 @@ export type BaseSearchResponse = {
8
8
  * If a search encounters an index that is being A/B tested, abTestID reports the ongoing A/B test ID.
9
9
  */
10
10
  abTestID?: number;
11
+
11
12
  /**
12
13
  * If a search encounters an index that is being A/B tested, abTestVariantID reports the variant ID of the index used (starting at 1).
13
14
  */
14
15
  abTestVariantID?: number;
16
+
15
17
  /**
16
18
  * The computed geo location.
17
19
  */
18
20
  aroundLatLng?: string;
21
+
19
22
  /**
20
23
  * The automatically computed radius. For legacy reasons, this parameter is a string and not an integer.
21
24
  */
22
25
  automaticRadius?: string;
26
+
23
27
  /**
24
28
  * Whether the facet count is exhaustive or approximate.
25
29
  */
26
30
  exhaustiveFacetsCount?: boolean;
31
+
27
32
  /**
28
33
  * Indicate if the nbHits count was exhaustive or approximate.
29
34
  */
30
35
  exhaustiveNbHits: boolean;
36
+
31
37
  /**
32
38
  * Indicate if the typo-tolerance search was exhaustive or approximate (only included when typo-tolerance is enabled).
33
39
  */
34
40
  exhaustiveTypo: boolean;
41
+
35
42
  /**
36
43
  * A mapping of each facet name to the corresponding facet counts.
37
44
  */
38
45
  facets?: Record<string, Record<string, number>>;
46
+
39
47
  /**
40
48
  * Statistics for numerical facets.
41
49
  */
42
50
  facets_stats?: Record<string, FacetsStats>;
51
+
43
52
  /**
44
53
  * Set the number of hits per page.
45
54
  */
46
55
  hitsPerPage: number;
56
+
47
57
  /**
48
58
  * Index name used for the query.
49
59
  */
50
60
  index?: string;
61
+
51
62
  /**
52
63
  * Index name used for the query. In the case of an A/B test, the targeted index isn\'t always the index used by the query.
53
64
  */
54
65
  indexUsed?: string;
66
+
55
67
  /**
56
68
  * Used to return warnings about the query.
57
69
  */
58
70
  message?: string;
71
+
59
72
  /**
60
73
  * Number of hits that the search query matched.
61
74
  */
62
75
  nbHits: number;
76
+
63
77
  /**
64
78
  * Number of pages available for the current query.
65
79
  */
66
80
  nbPages: number;
81
+
67
82
  /**
68
83
  * The number of hits selected and sorted by the relevant sort algorithm.
69
84
  */
70
85
  nbSortedHits?: number;
86
+
71
87
  /**
72
88
  * Specify the page to retrieve.
73
89
  */
74
90
  page: number;
91
+
75
92
  /**
76
93
  * A url-encoded string of all search parameters.
77
94
  */
78
95
  params: string;
96
+
79
97
  /**
80
98
  * The query string that will be searched, after normalization.
81
99
  */
82
100
  parsedQuery?: string;
101
+
83
102
  /**
84
103
  * Time the server took to process the request, in milliseconds.
85
104
  */
86
105
  processingTimeMS: number;
106
+
87
107
  /**
88
108
  * The text to search in the index.
89
109
  */
90
110
  query: string;
111
+
91
112
  /**
92
113
  * A markup text indicating which parts of the original query have been removed in order to retrieve a non-empty result set.
93
114
  */
94
115
  queryAfterRemoval?: string;
116
+
95
117
  /**
96
118
  * Actual host name of the server that processed the request.
97
119
  */
98
120
  serverUsed?: string;
121
+
99
122
  /**
100
123
  * Lets you store custom data in your indices.
101
124
  */
102
125
  userData?: Record<string, any>;
126
+
103
127
  renderingContent?: RenderingContent;
104
128
  };
@@ -8,6 +8,7 @@ export type BatchAssignUserIdsParams = {
8
8
  * Name of the cluster.
9
9
  */
10
10
  cluster: string;
11
+
11
12
  /**
12
13
  * UserIDs to assign. Note you cannot move users with this method.
13
14
  */
@@ -10,6 +10,7 @@ export type BatchDictionaryEntriesParams = {
10
10
  * When `true`, start the batch by removing all the custom entries from the dictionary.
11
11
  */
12
12
  clearExistingDictionaryEntries?: boolean;
13
+
13
14
  /**
14
15
  * List of operations to batch. Each operation is described by an `action` and a `body`.
15
16
  */
@@ -5,5 +5,6 @@ import type { DictionaryEntry } from './dictionaryEntry';
5
5
 
6
6
  export type BatchDictionaryEntriesRequest = {
7
7
  action: DictionaryAction;
8
+
8
9
  body: DictionaryEntry;
9
10
  };
@@ -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 { MultipleBatchOperation } from './multipleBatchOperation';
3
+ import type { MultipleBatchRequest } from './multipleBatchRequest';
4
4
 
5
5
  /**
6
6
  * The `multipleBatch` parameters.
7
7
  */
8
8
  export type BatchParams = {
9
- requests?: MultipleBatchOperation[];
9
+ requests: MultipleBatchRequest[];
10
10
  };
@@ -2,8 +2,9 @@
2
2
 
3
3
  import type { Action } from './action';
4
4
 
5
- export type BatchOperation = {
5
+ export type BatchRequest = {
6
6
  action?: Action;
7
+
7
8
  /**
8
9
  * Arguments to the operation (depends on the type of the operation).
9
10
  */
@@ -5,6 +5,7 @@ export type BatchResponse = {
5
5
  * TaskID of the task to wait for.
6
6
  */
7
7
  taskID: number;
8
+
8
9
  /**
9
10
  * List of objectID.
10
11
  */
@@ -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 { BatchOperation } from './batchOperation';
3
+ import type { BatchRequest } from './batchRequest';
4
4
 
5
5
  /**
6
6
  * The `batch` parameters.
7
7
  */
8
8
  export type BatchWriteParams = {
9
- requests?: BatchOperation[];
9
+ requests?: BatchRequest[];
10
10
  };
@@ -5,6 +5,7 @@ export type BrowseRequest = {
5
5
  * Search parameters as URL-encoded query string.
6
6
  */
7
7
  params?: string;
8
+
8
9
  /**
9
10
  * Cursor indicating the location to resume browsing from. Must match the value returned by the previous call.
10
11
  */
@@ -4,6 +4,6 @@ import type { BaseBrowseResponse } from './baseBrowseResponse';
4
4
  import type { BaseSearchResponse } from './baseSearchResponse';
5
5
  import type { SearchHits } from './searchHits';
6
6
 
7
- export type BrowseResponse<T> = BaseBrowseResponse &
7
+ export type BrowseResponse<T = Record<string, any>> = BaseBrowseResponse &
8
8
  BaseSearchResponse &
9
9
  SearchHits<T>;
@@ -7,6 +7,7 @@ import type { BuiltInOperationType } from './builtInOperationType';
7
7
  */
8
8
  export type BuiltInOperation = {
9
9
  _operation: BuiltInOperationType;
10
+
10
11
  /**
11
12
  * The right-hand side argument to the operation, for example, increment or decrement step, value to add or remove.
12
13
  */
@@ -1,18 +1,16 @@
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 { CreateRetryablePromiseOptions } from '@algolia/client-common';
3
+ import type { CreateIterablePromise } from '@algolia/client-common';
4
4
 
5
5
  import type { ApiKey } from './apiKey';
6
6
  import type { AssignUserIdParams } from './assignUserIdParams';
7
- import type { AttributeOrBuiltInOperation } from './attributeOrBuiltInOperation';
7
+ import type { AttributeToUpdate } from './attributeToUpdate';
8
8
  import type { BatchAssignUserIdsParams } from './batchAssignUserIdsParams';
9
9
  import type { BatchDictionaryEntriesParams } from './batchDictionaryEntriesParams';
10
10
  import type { BatchWriteParams } from './batchWriteParams';
11
11
  import type { BrowseRequest } from './browseRequest';
12
12
  import type { DictionaryType } from './dictionaryType';
13
- import type { GetTaskResponse } from './getTaskResponse';
14
13
  import type { IndexSettings } from './indexSettings';
15
- import type { Key } from './key';
16
14
  import type { LogType } from './logType';
17
15
  import type { OperationIndexParams } from './operationIndexParams';
18
16
  import type { Rule } from './rule';
@@ -428,11 +426,9 @@ export type PartialUpdateObjectProps = {
428
426
  */
429
427
  objectID: string;
430
428
  /**
431
- * List of attributes to update.
429
+ * Map of attribute(s) to update.
432
430
  */
433
- attributeOrBuiltInOperation: Array<
434
- Record<string, AttributeOrBuiltInOperation>
435
- >;
431
+ attributesToUpdate: Record<string, AttributeToUpdate>;
436
432
  /**
437
433
  * Creates the record if it does not exist yet.
438
434
  */
@@ -546,7 +542,7 @@ export type SaveRulesProps = {
546
542
  * The index in which to perform the request.
547
543
  */
548
544
  indexName: string;
549
- rule: Rule[];
545
+ rules: Rule[];
550
546
  /**
551
547
  * When true, changes are also propagated to replicas of the given indexName.
552
548
  */
@@ -661,7 +657,7 @@ export type SearchRulesProps = {
661
657
  * The index in which to perform the request.
662
658
  */
663
659
  indexName: string;
664
- searchRulesParams: SearchRulesParams;
660
+ searchRulesParams?: SearchRulesParams;
665
661
  };
666
662
 
667
663
  /**
@@ -727,12 +723,27 @@ export type UpdateApiKeyProps = {
727
723
  apiKey: ApiKey;
728
724
  };
729
725
 
730
- type WaitForOptions<T> = Omit<
731
- CreateRetryablePromiseOptions<T>,
732
- 'func' | 'validate'
733
- >;
726
+ /**
727
+ * The `browseObjects`, `browseRules`, `browseSynonyms` options.
728
+ */
729
+ export type BrowseOptions<T> = Partial<
730
+ Pick<CreateIterablePromise<T>, 'validate'>
731
+ > &
732
+ Required<Pick<CreateIterablePromise<T>, 'aggregator'>>;
733
+
734
+ type WaitForOptions = Partial<{
735
+ /**
736
+ * The maximum number of retries. 50 by default.
737
+ */
738
+ maxRetries: number;
739
+
740
+ /**
741
+ * The function to decide how long to wait between retries.
742
+ */
743
+ timeout: (retryCount: number) => number;
744
+ }>;
734
745
 
735
- export type WaitForTaskOptions = WaitForOptions<GetTaskResponse> & {
746
+ export type WaitForTaskOptions = WaitForOptions & {
736
747
  /**
737
748
  * The `indexName` where the operation was performed.
738
749
  */
@@ -743,7 +754,7 @@ export type WaitForTaskOptions = WaitForOptions<GetTaskResponse> & {
743
754
  taskID: number;
744
755
  };
745
756
 
746
- export type WaitForApiKeyOptions = WaitForOptions<Key> & {
757
+ export type WaitForApiKeyOptions = WaitForOptions & {
747
758
  /**
748
759
  * The API Key.
749
760
  */
@@ -7,11 +7,14 @@ export type Condition = {
7
7
  * Query pattern syntax.
8
8
  */
9
9
  pattern?: string;
10
+
10
11
  anchoring?: Anchoring;
12
+
11
13
  /**
12
14
  * Whether the pattern matches on plurals, synonyms, and typos.
13
15
  */
14
16
  alternatives?: boolean;
17
+
15
18
  /**
16
19
  * Rule context format: [A-Za-z0-9_-]+).
17
20
  */
@@ -9,18 +9,22 @@ import type { Promote } from './promote';
9
9
  */
10
10
  export type Consequence = {
11
11
  params?: ConsequenceParams;
12
+
12
13
  /**
13
14
  * Objects to promote as hits.
14
15
  */
15
16
  promote?: Promote[];
17
+
16
18
  /**
17
19
  * Only use in combination with the promote consequence. When true, promoted results will be restricted to match the filters of the current search. When false, the promoted results will show up regardless of the filters.
18
20
  */
19
21
  filterPromotes?: boolean;
22
+
20
23
  /**
21
24
  * Objects to hide from hits. Each object must contain an objectID field. By default, you can hide up to 50 items per rule.
22
25
  */
23
26
  hide?: ConsequenceHide[];
27
+
24
28
  /**
25
29
  * Custom JSON object that will be appended to the userData array in the response. This object isn\'t interpreted by the API. It\'s limited to 1kB of minified JSON.
26
30
  */
@@ -7,6 +7,7 @@ export type ConsequenceQueryObject = {
7
7
  * Words to remove.
8
8
  */
9
9
  remove?: string[];
10
+
10
11
  /**
11
12
  * Edits to apply.
12
13
  */
@@ -8,6 +8,7 @@ export type DeletedAtResponse = {
8
8
  * TaskID of the task to wait for.
9
9
  */
10
10
  taskID: number;
11
+
11
12
  /**
12
13
  * Date of deletion (ISO-8601 format).
13
14
  */
@@ -10,21 +10,26 @@ export type DictionaryEntry = Record<string, any> & {
10
10
  * Unique identifier of the object.
11
11
  */
12
12
  objectID: string;
13
+
13
14
  /**
14
15
  * Language ISO code supported by the dictionary (e.g., \"en\" for English).
15
16
  */
16
17
  language: string;
18
+
17
19
  /**
18
20
  * The word of the dictionary entry.
19
21
  */
20
22
  word?: string;
23
+
21
24
  /**
22
25
  * The words of the dictionary entry.
23
26
  */
24
27
  words?: string[];
28
+
25
29
  /**
26
30
  * A decomposition of the word of the dictionary entry.
27
31
  */
28
32
  decomposition?: string[];
33
+
29
34
  state?: DictionaryEntryState;
30
35
  };
@@ -1,8 +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
- export type CreatedAtObject = {
4
- /**
5
- * Date of creation (ISO-8601 format).
6
- */
7
- createdAt: string;
8
- };
3
+ /**
4
+ * Enables de-duplication or grouping of results.
5
+ */
6
+ export type Distinct = boolean | number;
package/model/edit.ts CHANGED
@@ -4,10 +4,12 @@ import type { EditType } from './editType';
4
4
 
5
5
  export type Edit = {
6
6
  type?: EditType;
7
+
7
8
  /**
8
9
  * Text or patterns to remove from the query string.
9
10
  */
10
11
  delete?: string;
12
+
11
13
  /**
12
14
  * Text that should be inserted in place of the removed text inside the query string.
13
15
  */
@@ -5,10 +5,12 @@ export type FacetHits = {
5
5
  * Raw value of the facet.
6
6
  */
7
7
  value: string;
8
+
8
9
  /**
9
10
  * Markup text with occurrences highlighted.
10
11
  */
11
12
  highlighted: string;
13
+
12
14
  /**
13
15
  * How many objects contain this facet value. This takes into account the extra search parameters specified in the query. Like for a regular search query, the counts may not be exhaustive.
14
16
  */
@@ -8,6 +8,7 @@ import type { Value } from './value';
8
8
  */
9
9
  export type FacetOrdering = {
10
10
  facets?: Facets;
11
+
11
12
  /**
12
13
  * The ordering of facet values, within an individual list.
13
14
  */