algoliasearch 5.1.1 → 5.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/README.md +1 -1
  2. package/builds/browser.ts +48 -113
  3. package/builds/models.ts +2 -2
  4. package/builds/node.ts +51 -122
  5. package/dist/algoliasearch/builds/browser.d.ts +83 -84
  6. package/dist/algoliasearch/builds/browser.d.ts.map +1 -1
  7. package/dist/algoliasearch/builds/models.d.ts +2 -2
  8. package/dist/algoliasearch/builds/models.d.ts.map +1 -1
  9. package/dist/algoliasearch/builds/node.d.ts +83 -86
  10. package/dist/algoliasearch/builds/node.d.ts.map +1 -1
  11. package/dist/algoliasearch.cjs +27 -4353
  12. package/dist/algoliasearch.esm.browser.js +4477 -1437
  13. package/dist/algoliasearch.esm.node.js +28 -4354
  14. package/dist/algoliasearch.umd.js +2 -2
  15. package/dist/client-abtesting/model/clientMethodProps.d.ts +2 -2
  16. package/dist/client-abtesting/model/clientMethodProps.d.ts.map +1 -1
  17. package/dist/client-abtesting/model/customSearchParams.d.ts +1 -1
  18. package/dist/client-abtesting/model/customSearchParams.d.ts.map +1 -1
  19. package/dist/client-abtesting/model/effect.d.ts.map +1 -1
  20. package/dist/client-analytics/model/clientMethodProps.d.ts +2 -2
  21. package/dist/client-analytics/model/clientMethodProps.d.ts.map +1 -1
  22. package/dist/client-analytics/model/{currenciesValue.d.ts → currencyCode.d.ts} +2 -2
  23. package/dist/client-analytics/model/currencyCode.d.ts.map +1 -0
  24. package/dist/client-analytics/model/dailyRevenue.d.ts +2 -2
  25. package/dist/client-analytics/model/dailyRevenue.d.ts.map +1 -1
  26. package/dist/client-analytics/model/getRevenue.d.ts +2 -2
  27. package/dist/client-analytics/model/getRevenue.d.ts.map +1 -1
  28. package/dist/client-analytics/model/getTopHitsResponse.d.ts.map +1 -1
  29. package/dist/client-analytics/model/index.d.ts +1 -1
  30. package/dist/client-analytics/model/index.d.ts.map +1 -1
  31. package/dist/client-analytics/model/orderBy.d.ts.map +1 -1
  32. package/dist/client-analytics/model/topHitWithRevenueAnalytics.d.ts +2 -2
  33. package/dist/client-analytics/model/topHitWithRevenueAnalytics.d.ts.map +1 -1
  34. package/dist/client-analytics/model/topSearchWithRevenueAnalytics.d.ts +2 -2
  35. package/dist/client-analytics/model/topSearchWithRevenueAnalytics.d.ts.map +1 -1
  36. package/dist/client-personalization/model/clientMethodProps.d.ts +2 -2
  37. package/dist/client-personalization/model/clientMethodProps.d.ts.map +1 -1
  38. package/dist/client-personalization/model/getUserTokenResponse.d.ts +1 -1
  39. package/dist/client-personalization/model/getUserTokenResponse.d.ts.map +1 -1
  40. package/dist/client-search/model/alternativesAsExact.d.ts.map +1 -1
  41. package/dist/client-search/model/baseIndexSettings.d.ts +2 -2
  42. package/dist/client-search/model/baseIndexSettings.d.ts.map +1 -1
  43. package/dist/client-search/model/baseSearchResponse.d.ts +4 -4
  44. package/dist/client-search/model/baseSearchResponse.d.ts.map +1 -1
  45. package/dist/client-search/model/batchRequest.d.ts +1 -1
  46. package/dist/client-search/model/batchRequest.d.ts.map +1 -1
  47. package/dist/client-search/model/browseResponse.d.ts.map +1 -1
  48. package/dist/client-search/model/clientMethodProps.d.ts +5 -6
  49. package/dist/client-search/model/clientMethodProps.d.ts.map +1 -1
  50. package/dist/client-search/model/consequenceParams.d.ts.map +1 -1
  51. package/dist/client-search/model/{facetsStats.d.ts → facetStats.d.ts} +2 -2
  52. package/dist/client-search/model/facetStats.d.ts.map +1 -0
  53. package/dist/client-search/model/index.d.ts +1 -1
  54. package/dist/client-search/model/index.d.ts.map +1 -1
  55. package/dist/client-search/model/multipleBatchRequest.d.ts +1 -1
  56. package/dist/client-search/model/multipleBatchRequest.d.ts.map +1 -1
  57. package/dist/client-search/model/removeWordsIfNoResults.d.ts.map +1 -1
  58. package/dist/client-search/model/searchResponse.d.ts.map +1 -1
  59. package/dist/client-search/model/searchResult.d.ts.map +1 -1
  60. package/dist/client-search/model/synonymType.d.ts.map +1 -1
  61. package/dist/lite/builds/browser.d.ts +1 -1
  62. package/dist/lite/builds/browser.d.ts.map +1 -1
  63. package/dist/lite/builds/node.d.ts +1 -1
  64. package/dist/lite/builds/node.d.ts.map +1 -1
  65. package/dist/lite/lite.cjs +2 -5
  66. package/dist/lite/lite.esm.browser.js +11 -15
  67. package/dist/lite/lite.esm.node.js +2 -5
  68. package/dist/lite/lite.umd.js +2 -2
  69. package/dist/lite/model/alternativesAsExact.d.ts.map +1 -1
  70. package/dist/lite/model/baseIndexSettings.d.ts +2 -2
  71. package/dist/lite/model/baseIndexSettings.d.ts.map +1 -1
  72. package/dist/lite/model/baseSearchResponse.d.ts +4 -4
  73. package/dist/lite/model/baseSearchResponse.d.ts.map +1 -1
  74. package/dist/lite/model/boughtTogetherQuery.d.ts.map +1 -1
  75. package/dist/lite/model/browseResponse.d.ts.map +1 -1
  76. package/dist/lite/model/clientMethodProps.d.ts +1 -1
  77. package/dist/lite/model/clientMethodProps.d.ts.map +1 -1
  78. package/dist/lite/model/consequenceParams.d.ts.map +1 -1
  79. package/dist/lite/model/{facetsStats.d.ts → facetStats.d.ts} +2 -2
  80. package/dist/lite/model/facetStats.d.ts.map +1 -0
  81. package/dist/lite/model/fallbackParams.d.ts +1 -1
  82. package/dist/lite/model/fallbackParams.d.ts.map +1 -1
  83. package/dist/lite/model/index.d.ts +1 -1
  84. package/dist/lite/model/index.d.ts.map +1 -1
  85. package/dist/lite/model/recommendationsResults.d.ts.map +1 -1
  86. package/dist/lite/model/removeWordsIfNoResults.d.ts.map +1 -1
  87. package/dist/lite/model/searchParams.d.ts +1 -1
  88. package/dist/lite/model/searchParams.d.ts.map +1 -1
  89. package/dist/lite/model/searchResponse.d.ts.map +1 -1
  90. package/dist/lite/model/searchResult.d.ts.map +1 -1
  91. package/dist/lite/src/liteClient.d.ts +2 -2
  92. package/dist/lite/src/liteClient.d.ts.map +1 -1
  93. package/dist/recommend/model/alternativesAsExact.d.ts.map +1 -1
  94. package/dist/recommend/model/baseSearchResponse.d.ts +4 -4
  95. package/dist/recommend/model/baseSearchResponse.d.ts.map +1 -1
  96. package/dist/recommend/model/boughtTogetherQuery.d.ts.map +1 -1
  97. package/dist/recommend/model/clientMethodProps.d.ts +2 -2
  98. package/dist/recommend/model/clientMethodProps.d.ts.map +1 -1
  99. package/dist/recommend/model/{facetsStats.d.ts → facetStats.d.ts} +2 -2
  100. package/dist/recommend/model/facetStats.d.ts.map +1 -0
  101. package/dist/recommend/model/fallbackParams.d.ts +1 -1
  102. package/dist/recommend/model/fallbackParams.d.ts.map +1 -1
  103. package/dist/recommend/model/index.d.ts +1 -1
  104. package/dist/recommend/model/index.d.ts.map +1 -1
  105. package/dist/recommend/model/recommendModels.d.ts.map +1 -1
  106. package/dist/recommend/model/recommendationsResults.d.ts.map +1 -1
  107. package/dist/recommend/model/removeWordsIfNoResults.d.ts.map +1 -1
  108. package/dist/recommend/model/searchParams.d.ts +1 -1
  109. package/dist/recommend/model/searchParams.d.ts.map +1 -1
  110. package/lite/builds/browser.ts +2 -9
  111. package/lite/builds/node.ts +1 -5
  112. package/lite/model/alternativesAsExact.ts +1 -4
  113. package/lite/model/baseIndexSettings.ts +2 -2
  114. package/lite/model/baseSearchResponse.ts +4 -4
  115. package/lite/model/boughtTogetherQuery.ts +1 -2
  116. package/lite/model/browseResponse.ts +1 -4
  117. package/lite/model/clientMethodProps.ts +1 -1
  118. package/lite/model/consequenceParams.ts +1 -3
  119. package/lite/model/{facetsStats.ts → facetStats.ts} +1 -1
  120. package/lite/model/fallbackParams.ts +1 -1
  121. package/lite/model/index.ts +1 -1
  122. package/lite/model/recommendationsResults.ts +1 -3
  123. package/lite/model/removeWordsIfNoResults.ts +1 -5
  124. package/lite/model/searchParams.ts +1 -1
  125. package/lite/model/searchResponse.ts +1 -3
  126. package/lite/model/searchResult.ts +1 -3
  127. package/lite/src/liteClient.ts +17 -40
  128. package/package.json +14 -16
  129. package/dist/client-abtesting/src/abtestingClient.d.ts +0 -141
  130. package/dist/client-abtesting/src/abtestingClient.d.ts.map +0 -1
  131. package/dist/client-analytics/model/currenciesValue.d.ts.map +0 -1
  132. package/dist/client-analytics/src/analyticsClient.d.ts +0 -392
  133. package/dist/client-analytics/src/analyticsClient.d.ts.map +0 -1
  134. package/dist/client-personalization/src/personalizationClient.d.ts +0 -113
  135. package/dist/client-personalization/src/personalizationClient.d.ts.map +0 -1
  136. package/dist/client-search/model/facetsStats.d.ts.map +0 -1
  137. package/dist/client-search/src/searchClient.d.ts +0 -922
  138. package/dist/client-search/src/searchClient.d.ts.map +0 -1
  139. package/dist/lite/model/facetsStats.d.ts.map +0 -1
  140. package/dist/recommend/model/facetsStats.d.ts.map +0 -1
  141. package/dist/recommend/src/recommendClient.d.ts +0 -132
  142. package/dist/recommend/src/recommendClient.d.ts.map +0 -1
@@ -20,7 +20,7 @@ export type CustomPostProps = {
20
20
  /**
21
21
  * Parameters to send with the custom request.
22
22
  */
23
- body?: Record<string, any>;
23
+ body?: Record<string, unknown>;
24
24
  };
25
25
 
26
26
  /**
@@ -4,6 +4,4 @@ import type { BaseSearchParamsWithoutQuery } from './baseSearchParamsWithoutQuer
4
4
  import type { IndexSettingsAsSearchParams } from './indexSettingsAsSearchParams';
5
5
  import type { Params } from './params';
6
6
 
7
- export type ConsequenceParams = BaseSearchParamsWithoutQuery &
8
- IndexSettingsAsSearchParams &
9
- Params;
7
+ export type ConsequenceParams = BaseSearchParamsWithoutQuery & IndexSettingsAsSearchParams & Params;
@@ -1,6 +1,6 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
- export type FacetsStats = {
3
+ export type FacetStats = {
4
4
  /**
5
5
  * Minimum value in the results.
6
6
  */
@@ -2,4 +2,4 @@
2
2
 
3
3
  import type { SearchParamsObject } from './searchParamsObject';
4
4
 
5
- export type FallbackParams = Record<string, any> & SearchParamsObject;
5
+ export type FallbackParams = Record<string, unknown> & SearchParamsObject;
@@ -32,8 +32,8 @@ export * from './exhaustive';
32
32
  export * from './facetFilters';
33
33
  export * from './facetHits';
34
34
  export * from './facetOrdering';
35
+ export * from './facetStats';
35
36
  export * from './facets';
36
- export * from './facetsStats';
37
37
  export * from './fallbackParams';
38
38
  export * from './fbtModel';
39
39
  export * from './frequentlyBoughtTogether';
@@ -4,6 +4,4 @@ import type { BaseSearchResponse } from './baseSearchResponse';
4
4
  import type { RecommendationsHits } from './recommendationsHits';
5
5
  import type { SearchPagination } from './searchPagination';
6
6
 
7
- export type RecommendationsResults = BaseSearchResponse &
8
- RecommendationsHits &
9
- SearchPagination;
7
+ export type RecommendationsResults = BaseSearchResponse & RecommendationsHits & SearchPagination;
@@ -3,8 +3,4 @@
3
3
  /**
4
4
  * Strategy for removing words from the query when it doesn\'t return any results. This helps to avoid returning empty search results. - `none`. No words are removed when a query doesn\'t return results. - `lastWords`. Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed. - `firstWords`. Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed. - `allOptional`. Treat all words as optional. For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/).
5
5
  */
6
- export type RemoveWordsIfNoResults =
7
- | 'allOptional'
8
- | 'firstWords'
9
- | 'lastWords'
10
- | 'none';
6
+ export type RemoveWordsIfNoResults = 'allOptional' | 'firstWords' | 'lastWords' | 'none';
@@ -2,4 +2,4 @@
2
2
 
3
3
  import type { SearchParamsObject } from './searchParamsObject';
4
4
 
5
- export type SearchParams = Record<string, any> & SearchParamsObject;
5
+ export type SearchParams = Record<string, unknown> & SearchParamsObject;
@@ -4,6 +4,4 @@ import type { BaseSearchResponse } from './baseSearchResponse';
4
4
  import type { SearchHits } from './searchHits';
5
5
  import type { SearchPagination } from './searchPagination';
6
6
 
7
- export type SearchResponse<T = Record<string, any>> = BaseSearchResponse &
8
- SearchHits<T> &
9
- SearchPagination;
7
+ export type SearchResponse<T = Record<string, any>> = BaseSearchResponse & SearchHits<T> & SearchPagination;
@@ -3,6 +3,4 @@
3
3
  import type { SearchForFacetValuesResponse } from './searchForFacetValuesResponse';
4
4
  import type { SearchResponse } from './searchResponse';
5
5
 
6
- export type SearchResult<T = Record<string, any>> =
7
- | SearchForFacetValuesResponse
8
- | SearchResponse<T>;
6
+ export type SearchResult<T = Record<string, any>> = SearchForFacetValuesResponse | SearchResponse<T>;
@@ -1,11 +1,6 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
- import {
4
- createAuth,
5
- createTransporter,
6
- getAlgoliaAgent,
7
- shuffle,
8
- } from '@algolia/client-common';
3
+ import { createAuth, createTransporter, getAlgoliaAgent, shuffle } from '@algolia/client-common';
9
4
  import type {
10
5
  CreateClientOptions,
11
6
  Headers,
@@ -27,7 +22,7 @@ import type { SearchMethodParams } from '../model/searchMethodParams';
27
22
  import type { SearchResponse } from '../model/searchResponse';
28
23
  import type { SearchResponses } from '../model/searchResponses';
29
24
 
30
- export const apiClientVersion = '5.1.1';
25
+ export const apiClientVersion = '5.2.2';
31
26
 
32
27
  function getDefaultHosts(appId: string): Host[] {
33
28
  return (
@@ -60,7 +55,7 @@ function getDefaultHosts(appId: string): Host[] {
60
55
  accept: 'readWrite',
61
56
  protocol: 'https',
62
57
  },
63
- ])
58
+ ]),
64
59
  );
65
60
  }
66
61
 
@@ -104,10 +99,7 @@ export function createLiteClient({
104
99
  * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
105
100
  */
106
101
  clearCache(): Promise<void> {
107
- return Promise.all([
108
- transporter.requestsCache.clear(),
109
- transporter.responsesCache.clear(),
110
- ]).then(() => undefined);
102
+ return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => undefined);
111
103
  },
112
104
 
113
105
  /**
@@ -126,7 +118,6 @@ export function createLiteClient({
126
118
  addAlgoliaAgent(segment: string, version?: string): void {
127
119
  transporter.algoliaAgent.add({ segment, version });
128
120
  },
129
-
130
121
  /**
131
122
  * Helper: calls the `search` method but with certainty that we will only request Algolia records (hits) and not facets.
132
123
  * Disclaimer: We don't assert that the parameters you pass to this method only contains `hits` requests to prevent impacting search performances, this helper is purely for typing purposes.
@@ -137,11 +128,9 @@ export function createLiteClient({
137
128
  */
138
129
  searchForHits<T>(
139
130
  searchMethodParams: LegacySearchMethodProps | SearchMethodParams,
140
- requestOptions?: RequestOptions
131
+ requestOptions?: RequestOptions,
141
132
  ): Promise<{ results: Array<SearchResponse<T>> }> {
142
- return this.search(searchMethodParams, requestOptions) as Promise<{
143
- results: Array<SearchResponse<T>>;
144
- }>;
133
+ return this.search(searchMethodParams, requestOptions) as Promise<{ results: Array<SearchResponse<T>> }>;
145
134
  },
146
135
 
147
136
  /**
@@ -154,7 +143,7 @@ export function createLiteClient({
154
143
  */
155
144
  searchForFacets(
156
145
  searchMethodParams: LegacySearchMethodProps | SearchMethodParams,
157
- requestOptions?: RequestOptions
146
+ requestOptions?: RequestOptions,
158
147
  ): Promise<{ results: SearchForFacetValuesResponse[] }> {
159
148
  return this.search(searchMethodParams, requestOptions) as Promise<{
160
149
  results: SearchForFacetValuesResponse[];
@@ -171,12 +160,10 @@ export function createLiteClient({
171
160
  */
172
161
  customPost(
173
162
  { path, parameters, body }: CustomPostProps,
174
- requestOptions?: RequestOptions
175
- ): Promise<Record<string, any>> {
163
+ requestOptions?: RequestOptions,
164
+ ): Promise<Record<string, unknown>> {
176
165
  if (!path) {
177
- throw new Error(
178
- 'Parameter `path` is required when calling `customPost`.'
179
- );
166
+ throw new Error('Parameter `path` is required when calling `customPost`.');
180
167
  }
181
168
 
182
169
  const requestPath = '/{path}'.replace('{path}', path);
@@ -204,10 +191,8 @@ export function createLiteClient({
204
191
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
205
192
  */
206
193
  getRecommendations(
207
- getRecommendationsParams:
208
- | GetRecommendationsParams
209
- | LegacyGetRecommendationsParams,
210
- requestOptions?: RequestOptions
194
+ getRecommendationsParams: GetRecommendationsParams | LegacyGetRecommendationsParams,
195
+ requestOptions?: RequestOptions,
211
196
  ): Promise<GetRecommendationsResponse> {
212
197
  if (getRecommendationsParams && Array.isArray(getRecommendationsParams)) {
213
198
  const newSignatureRequest: GetRecommendationsParams = {
@@ -219,15 +204,11 @@ export function createLiteClient({
219
204
  }
220
205
 
221
206
  if (!getRecommendationsParams) {
222
- throw new Error(
223
- 'Parameter `getRecommendationsParams` is required when calling `getRecommendations`.'
224
- );
207
+ throw new Error('Parameter `getRecommendationsParams` is required when calling `getRecommendations`.');
225
208
  }
226
209
 
227
210
  if (!getRecommendationsParams.requests) {
228
- throw new Error(
229
- 'Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.'
230
- );
211
+ throw new Error('Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.');
231
212
  }
232
213
 
233
214
  const requestPath = '/1/indexes/*/recommendations';
@@ -258,7 +239,7 @@ export function createLiteClient({
258
239
  */
259
240
  search<T>(
260
241
  searchMethodParams: LegacySearchMethodProps | SearchMethodParams,
261
- requestOptions?: RequestOptions
242
+ requestOptions?: RequestOptions,
262
243
  ): Promise<SearchResponses<T>> {
263
244
  if (searchMethodParams && Array.isArray(searchMethodParams)) {
264
245
  const newSignatureRequest: SearchMethodParams = {
@@ -286,15 +267,11 @@ export function createLiteClient({
286
267
  }
287
268
 
288
269
  if (!searchMethodParams) {
289
- throw new Error(
290
- 'Parameter `searchMethodParams` is required when calling `search`.'
291
- );
270
+ throw new Error('Parameter `searchMethodParams` is required when calling `search`.');
292
271
  }
293
272
 
294
273
  if (!searchMethodParams.requests) {
295
- throw new Error(
296
- 'Parameter `searchMethodParams.requests` is required when calling `search`.'
297
- );
274
+ throw new Error('Parameter `searchMethodParams.requests` is required when calling `search`.');
298
275
  }
299
276
 
300
277
  const requestPath = '/1/indexes/*/queries';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "algoliasearch",
3
- "version": "5.1.1",
3
+ "version": "5.2.2",
4
4
  "description": "A fully-featured and blazing-fast JavaScript API client to interact with Algolia API.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,7 +11,6 @@
11
11
  "type": "module",
12
12
  "exports": {
13
13
  ".": {
14
- "types": "./index.d.ts",
15
14
  "node": {
16
15
  "import": "./dist/algoliasearch.esm.node.js",
17
16
  "module": "./dist/algoliasearch.esm.node.js",
@@ -19,7 +18,7 @@
19
18
  "default": "./dist/algoliasearch.cjs",
20
19
  "types": "./dist/algoliasearch/builds/node.d.ts"
21
20
  },
22
- "default": {
21
+ "browser": {
23
22
  "umd": "./dist/algoliasearch.umd.js",
24
23
  "module": "./dist/algoliasearch.esm.browser.js",
25
24
  "import": "./dist/algoliasearch.esm.browser.js",
@@ -28,7 +27,6 @@
28
27
  }
29
28
  },
30
29
  "./lite": {
31
- "types": "./lite.d.ts",
32
30
  "node": {
33
31
  "import": "./dist/lite/lite.esm.node.js",
34
32
  "module": "./dist/lite/lite.esm.node.js",
@@ -36,7 +34,7 @@
36
34
  "default": "./dist/lite/lite.cjs",
37
35
  "types": "./dist/lite/builds/node.d.ts"
38
36
  },
39
- "default": {
37
+ "browser": {
40
38
  "umd": "./dist/lite/lite.umd.js",
41
39
  "module": "./dist/lite/lite.esm.browser.js",
42
40
  "import": "./dist/lite/lite.esm.browser.js",
@@ -67,22 +65,22 @@
67
65
  "test": "jest"
68
66
  },
69
67
  "dependencies": {
70
- "@algolia/client-abtesting": "5.1.1",
71
- "@algolia/client-analytics": "5.1.1",
72
- "@algolia/client-common": "5.1.1",
73
- "@algolia/client-personalization": "5.1.1",
74
- "@algolia/client-search": "5.1.1",
75
- "@algolia/recommend": "5.1.1",
76
- "@algolia/requester-browser-xhr": "5.1.1",
77
- "@algolia/requester-node-http": "5.1.1"
68
+ "@algolia/client-abtesting": "5.2.2",
69
+ "@algolia/client-analytics": "5.2.2",
70
+ "@algolia/client-common": "5.2.2",
71
+ "@algolia/client-personalization": "5.2.2",
72
+ "@algolia/client-search": "5.2.2",
73
+ "@algolia/recommend": "5.2.2",
74
+ "@algolia/requester-browser-xhr": "5.2.2",
75
+ "@algolia/requester-node-http": "5.2.2"
78
76
  },
79
77
  "devDependencies": {
80
- "@babel/preset-env": "7.25.3",
78
+ "@babel/preset-env": "7.25.4",
81
79
  "@babel/preset-typescript": "7.24.7",
82
80
  "@types/jest": "29.5.12",
83
- "@types/node": "22.2.0",
81
+ "@types/node": "22.5.0",
84
82
  "jest": "29.7.0",
85
- "rollup": "4.20.0",
83
+ "rollup": "4.21.0",
86
84
  "typescript": "5.5.4"
87
85
  },
88
86
  "engines": {
@@ -1,141 +0,0 @@
1
- import type { CreateClientOptions, RequestOptions } from '@algolia/client-common';
2
- import type { ABTest } from '../model/aBTest';
3
- import type { ABTestResponse } from '../model/aBTestResponse';
4
- import type { AddABTestsRequest } from '../model/addABTestsRequest';
5
- import type { CustomDeleteProps, CustomGetProps, CustomPostProps, CustomPutProps, DeleteABTestProps, GetABTestProps, ListABTestsProps, StopABTestProps } from '../model/clientMethodProps';
6
- import type { ListABTestsResponse } from '../model/listABTestsResponse';
7
- import type { ScheduleABTestResponse } from '../model/scheduleABTestResponse';
8
- import type { ScheduleABTestsRequest } from '../model/scheduleABTestsRequest';
9
- export declare const apiClientVersion = "5.1.1";
10
- export declare const REGIONS: readonly ["de", "us"];
11
- export type Region = (typeof REGIONS)[number];
12
- export declare function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }: CreateClientOptions & {
13
- region?: Region;
14
- }): {
15
- transporter: import("@algolia/client-common").Transporter;
16
- /**
17
- * The `appId` currently in use.
18
- */
19
- appId: string;
20
- /**
21
- * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
22
- */
23
- clearCache(): Promise<void>;
24
- /**
25
- * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
26
- */
27
- readonly _ua: string;
28
- /**
29
- * Adds a `segment` to the `x-algolia-agent` sent with every requests.
30
- *
31
- * @param segment - The algolia agent (user-agent) segment to add.
32
- * @param version - The version of the agent.
33
- */
34
- addAlgoliaAgent(segment: string, version?: string): void;
35
- /**
36
- * Creates a new A/B test.
37
- *
38
- * Required API Key ACLs:
39
- * - editSettings.
40
- *
41
- * @param addABTestsRequest - The addABTestsRequest object.
42
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
43
- */
44
- addABTests(addABTestsRequest: AddABTestsRequest, requestOptions?: RequestOptions): Promise<ABTestResponse>;
45
- /**
46
- * This method allow you to send requests to the Algolia REST API.
47
- *
48
- * @param customDelete - The customDelete object.
49
- * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
50
- * @param customDelete.parameters - Query parameters to apply to the current query.
51
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
52
- */
53
- customDelete({ path, parameters }: CustomDeleteProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
54
- /**
55
- * This method allow you to send requests to the Algolia REST API.
56
- *
57
- * @param customGet - The customGet object.
58
- * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
59
- * @param customGet.parameters - Query parameters to apply to the current query.
60
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
61
- */
62
- customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
63
- /**
64
- * This method allow you to send requests to the Algolia REST API.
65
- *
66
- * @param customPost - The customPost object.
67
- * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
68
- * @param customPost.parameters - Query parameters to apply to the current query.
69
- * @param customPost.body - Parameters to send with the custom request.
70
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
71
- */
72
- customPost({ path, parameters, body }: CustomPostProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
73
- /**
74
- * This method allow you to send requests to the Algolia REST API.
75
- *
76
- * @param customPut - The customPut object.
77
- * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
78
- * @param customPut.parameters - Query parameters to apply to the current query.
79
- * @param customPut.body - Parameters to send with the custom request.
80
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
81
- */
82
- customPut({ path, parameters, body }: CustomPutProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
83
- /**
84
- * Deletes an A/B test by its ID.
85
- *
86
- * Required API Key ACLs:
87
- * - editSettings.
88
- *
89
- * @param deleteABTest - The deleteABTest object.
90
- * @param deleteABTest.id - Unique A/B test identifier.
91
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
92
- */
93
- deleteABTest({ id }: DeleteABTestProps, requestOptions?: RequestOptions): Promise<ABTestResponse>;
94
- /**
95
- * Retrieves the details for an A/B test by its ID.
96
- *
97
- * Required API Key ACLs:
98
- * - analytics.
99
- *
100
- * @param getABTest - The getABTest object.
101
- * @param getABTest.id - Unique A/B test identifier.
102
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
103
- */
104
- getABTest({ id }: GetABTestProps, requestOptions?: RequestOptions): Promise<ABTest>;
105
- /**
106
- * Lists all A/B tests you configured for this application.
107
- *
108
- * Required API Key ACLs:
109
- * - analytics.
110
- *
111
- * @param listABTests - The listABTests object.
112
- * @param listABTests.offset - Position of the first item to return.
113
- * @param listABTests.limit - Number of items to return.
114
- * @param listABTests.indexPrefix - Index name prefix. Only A/B tests for indices starting with this string are included in the response.
115
- * @param listABTests.indexSuffix - Index name suffix. Only A/B tests for indices ending with this string are included in the response.
116
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
117
- */
118
- listABTests({ offset, limit, indexPrefix, indexSuffix }?: ListABTestsProps, requestOptions?: RequestOptions | undefined): Promise<ListABTestsResponse>;
119
- /**
120
- * Schedule an A/B test to be started at a later time.
121
- *
122
- * Required API Key ACLs:
123
- * - editSettings.
124
- *
125
- * @param scheduleABTestsRequest - The scheduleABTestsRequest object.
126
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
127
- */
128
- scheduleABTest(scheduleABTestsRequest: ScheduleABTestsRequest, requestOptions?: RequestOptions): Promise<ScheduleABTestResponse>;
129
- /**
130
- * Stops an A/B test by its ID. You can\'t restart stopped A/B tests.
131
- *
132
- * Required API Key ACLs:
133
- * - editSettings.
134
- *
135
- * @param stopABTest - The stopABTest object.
136
- * @param stopABTest.id - Unique A/B test identifier.
137
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
138
- */
139
- stopABTest({ id }: StopABTestProps, requestOptions?: RequestOptions): Promise<ABTestResponse>;
140
- };
141
- //# sourceMappingURL=abtestingClient.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"abtestingClient.d.ts","sourceRoot":"","sources":["../../../../client-abtesting/src/abtestingClient.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,mBAAmB,EAKnB,cAAc,EACf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,eAAe,EAChB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAE9E,eAAO,MAAM,gBAAgB,UAAU,CAAC;AAExC,eAAO,MAAM,OAAO,uBAAwB,CAAC;AAC7C,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AAW9C,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,YAAY,EACpB,QAAQ,EACR,aAAa,EACb,MAAM,EAAE,YAAY,EACpB,GAAG,OAAO,EACX,EAAE,mBAAmB,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE;;IAwBxC;;OAEG;;IAGH;;OAEG;kBACW,OAAO,CAAC,IAAI,CAAC;IAO3B;;OAEG;;IAKH;;;;;OAKG;6BACsB,MAAM,YAAY,MAAM,GAAG,IAAI;IAIxD;;;;;;;;OAQG;kCAEkB,iBAAiB,mBACnB,cAAc,GAC9B,OAAO,CAAC,cAAc,CAAC;IAsC1B;;;;;;;OAOG;uCAEqB,iBAAiB,mBACtB,cAAc,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAqB/B;;;;;;;OAOG;oCAEqB,cAAc,mBACnB,cAAc,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAqB/B;;;;;;;;OAQG;2CAE2B,eAAe,mBAC1B,cAAc,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAsB/B;;;;;;;;OAQG;0CAE2B,cAAc,mBACzB,cAAc,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAsB/B;;;;;;;;;OASG;yBAEO,iBAAiB,mBACR,cAAc,GAC9B,OAAO,CAAC,cAAc,CAAC;IAwB1B;;;;;;;;;OASG;sBAEO,cAAc,mBACL,cAAc,GAC9B,OAAO,CAAC,MAAM,CAAC;IAsBlB;;;;;;;;;;;;OAYG;8DAE4C,gBAAgB,mBAC7C,cAAc,GAAG,SAAS,GACzC,OAAO,CAAC,mBAAmB,CAAC;IA+B/B;;;;;;;;OAQG;2CAEuB,sBAAsB,mBAC7B,cAAc,GAC9B,OAAO,CAAC,sBAAsB,CAAC;IA2ClC;;;;;;;;;OASG;uBAEO,eAAe,mBACN,cAAc,GAC9B,OAAO,CAAC,cAAc,CAAC;EAwB7B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"currenciesValue.d.ts","sourceRoot":"","sources":["../../../../client-analytics/model/currenciesValue.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}