algoliasearch 5.0.0-alpha.90 → 5.0.0-alpha.97

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 (67) hide show
  1. package/builds/browser.ts +3 -9
  2. package/builds/models.ts +11 -5
  3. package/builds/node.ts +3 -9
  4. package/dist/algoliasearch/builds/browser.d.ts +7 -7
  5. package/dist/algoliasearch/builds/browser.d.ts.map +1 -1
  6. package/dist/algoliasearch/builds/models.d.ts +2 -2
  7. package/dist/algoliasearch/builds/models.d.ts.map +1 -1
  8. package/dist/algoliasearch/builds/node.d.ts +7 -7
  9. package/dist/algoliasearch/builds/node.d.ts.map +1 -1
  10. package/dist/algoliasearch.cjs +282 -282
  11. package/dist/algoliasearch.esm.browser.js +325 -301
  12. package/dist/algoliasearch.esm.node.js +282 -282
  13. package/dist/algoliasearch.umd.js +2 -2
  14. package/dist/client-abtesting/model/clientMethodProps.d.ts +42 -42
  15. package/dist/client-abtesting/model/clientMethodProps.d.ts.map +1 -1
  16. package/dist/client-abtesting/src/abtestingClient.d.ts +37 -37
  17. package/dist/client-abtesting/src/abtestingClient.d.ts.map +1 -1
  18. package/dist/client-analytics/model/clientMethodProps.d.ts +38 -38
  19. package/dist/client-analytics/model/clientMethodProps.d.ts.map +1 -1
  20. package/dist/client-analytics/src/analyticsClient.d.ts +32 -32
  21. package/dist/client-analytics/src/analyticsClient.d.ts.map +1 -1
  22. package/dist/client-personalization/model/clientMethodProps.d.ts +26 -26
  23. package/dist/client-personalization/model/clientMethodProps.d.ts.map +1 -1
  24. package/dist/client-personalization/src/personalizationClient.d.ts +37 -37
  25. package/dist/client-personalization/src/personalizationClient.d.ts.map +1 -1
  26. package/dist/client-search/model/clientMethodProps.d.ts +49 -49
  27. package/dist/client-search/model/clientMethodProps.d.ts.map +1 -1
  28. package/dist/client-search/model/highlightResult.d.ts +1 -1
  29. package/dist/client-search/model/highlightResult.d.ts.map +1 -1
  30. package/dist/client-search/model/searchForFacetValuesResponse.d.ts +8 -0
  31. package/dist/client-search/model/searchForFacetValuesResponse.d.ts.map +1 -1
  32. package/dist/client-search/model/searchResponses.d.ts +2 -2
  33. package/dist/client-search/model/searchResponses.d.ts.map +1 -1
  34. package/dist/client-search/model/searchResult.d.ts +1 -1
  35. package/dist/client-search/model/searchResult.d.ts.map +1 -1
  36. package/dist/client-search/model/snippetResult.d.ts +1 -1
  37. package/dist/client-search/model/snippetResult.d.ts.map +1 -1
  38. package/dist/client-search/model/userHighlightResult.d.ts +2 -8
  39. package/dist/client-search/model/userHighlightResult.d.ts.map +1 -1
  40. package/dist/client-search/src/searchClient.d.ts +40 -40
  41. package/dist/client-search/src/searchClient.d.ts.map +1 -1
  42. package/dist/lite/lite.cjs +7 -7
  43. package/dist/lite/lite.esm.browser.js +50 -26
  44. package/dist/lite/lite.esm.node.js +7 -7
  45. package/dist/lite/lite.umd.js +2 -2
  46. package/dist/lite/model/clientMethodProps.d.ts +2 -2
  47. package/dist/lite/model/clientMethodProps.d.ts.map +1 -1
  48. package/dist/lite/model/highlightResult.d.ts +1 -1
  49. package/dist/lite/model/highlightResult.d.ts.map +1 -1
  50. package/dist/lite/model/searchForFacetValuesResponse.d.ts +8 -0
  51. package/dist/lite/model/searchForFacetValuesResponse.d.ts.map +1 -1
  52. package/dist/lite/model/searchResponses.d.ts +2 -2
  53. package/dist/lite/model/searchResponses.d.ts.map +1 -1
  54. package/dist/lite/model/searchResult.d.ts +1 -1
  55. package/dist/lite/model/searchResult.d.ts.map +1 -1
  56. package/dist/lite/model/snippetResult.d.ts +1 -1
  57. package/dist/lite/model/snippetResult.d.ts.map +1 -1
  58. package/dist/lite/src/liteClient.d.ts +8 -8
  59. package/dist/lite/src/liteClient.d.ts.map +1 -1
  60. package/lite/model/clientMethodProps.ts +2 -2
  61. package/lite/model/highlightResult.ts +3 -1
  62. package/lite/model/searchForFacetValuesResponse.ts +10 -0
  63. package/lite/model/searchResponses.ts +2 -2
  64. package/lite/model/searchResult.ts +3 -1
  65. package/lite/model/snippetResult.ts +3 -1
  66. package/lite/src/liteClient.ts +13 -11
  67. package/package.json +14 -14
@@ -4,7 +4,7 @@ var clientCommon = require('@algolia/client-common');
4
4
  var requesterNodeHttp = require('@algolia/requester-node-http');
5
5
 
6
6
  // 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.
7
- const apiClientVersion$4 = '5.0.0-alpha.90';
7
+ const apiClientVersion$4 = '5.0.0-alpha.97';
8
8
  const REGIONS$2 = ['de', 'us'];
9
9
  function getDefaultHosts$3(region) {
10
10
  const url = !region
@@ -99,14 +99,14 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
99
99
  * This method allow you to send requests to the Algolia REST API.
100
100
  *
101
101
  * @summary Send requests to the Algolia REST API.
102
- * @param del - The del object.
103
- * @param del.path - Path of the endpoint, anything after \"/1\" must be specified.
104
- * @param del.parameters - Query parameters to apply to the current query.
102
+ * @param customDelete - The customDelete object.
103
+ * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
104
+ * @param customDelete.parameters - Query parameters to apply to the current query.
105
105
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
106
106
  */
107
- del({ path, parameters }, requestOptions) {
107
+ customDelete({ path, parameters }, requestOptions) {
108
108
  if (!path) {
109
- throw new Error('Parameter `path` is required when calling `del`.');
109
+ throw new Error('Parameter `path` is required when calling `customDelete`.');
110
110
  }
111
111
  const requestPath = '/1{path}'.replace('{path}', path);
112
112
  const headers = {};
@@ -120,22 +120,23 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
120
120
  return transporter.request(request, requestOptions);
121
121
  },
122
122
  /**
123
- * Delete an A/B test. To determine the `id` for an A/B test, use the [`listABTests` operation](#tag/abtest/operation/listABTests).
123
+ * This method allow you to send requests to the Algolia REST API.
124
124
  *
125
- * @summary Delete an A/B test.
126
- * @param deleteABTest - The deleteABTest object.
127
- * @param deleteABTest.id - Unique A/B test ID.
125
+ * @summary Send requests to the Algolia REST API.
126
+ * @param customGet - The customGet object.
127
+ * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
128
+ * @param customGet.parameters - Query parameters to apply to the current query.
128
129
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
129
130
  */
130
- deleteABTest({ id }, requestOptions) {
131
- if (!id) {
132
- throw new Error('Parameter `id` is required when calling `deleteABTest`.');
131
+ customGet({ path, parameters }, requestOptions) {
132
+ if (!path) {
133
+ throw new Error('Parameter `path` is required when calling `customGet`.');
133
134
  }
134
- const requestPath = '/2/abtests/{id}'.replace('{id}', encodeURIComponent(id));
135
+ const requestPath = '/1{path}'.replace('{path}', path);
135
136
  const headers = {};
136
- const queryParameters = {};
137
+ const queryParameters = parameters ? parameters : {};
137
138
  const request = {
138
- method: 'DELETE',
139
+ method: 'GET',
139
140
  path: requestPath,
140
141
  queryParameters,
141
142
  headers,
@@ -146,20 +147,71 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
146
147
  * This method allow you to send requests to the Algolia REST API.
147
148
  *
148
149
  * @summary Send requests to the Algolia REST API.
149
- * @param get - The get object.
150
- * @param get.path - Path of the endpoint, anything after \"/1\" must be specified.
151
- * @param get.parameters - Query parameters to apply to the current query.
150
+ * @param customPost - The customPost object.
151
+ * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
152
+ * @param customPost.parameters - Query parameters to apply to the current query.
153
+ * @param customPost.body - Parameters to send with the custom request.
152
154
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
153
155
  */
154
- get({ path, parameters }, requestOptions) {
156
+ customPost({ path, parameters, body }, requestOptions) {
155
157
  if (!path) {
156
- throw new Error('Parameter `path` is required when calling `get`.');
158
+ throw new Error('Parameter `path` is required when calling `customPost`.');
157
159
  }
158
160
  const requestPath = '/1{path}'.replace('{path}', path);
159
161
  const headers = {};
160
162
  const queryParameters = parameters ? parameters : {};
161
163
  const request = {
162
- method: 'GET',
164
+ method: 'POST',
165
+ path: requestPath,
166
+ queryParameters,
167
+ headers,
168
+ data: body ? body : {},
169
+ };
170
+ return transporter.request(request, requestOptions);
171
+ },
172
+ /**
173
+ * This method allow you to send requests to the Algolia REST API.
174
+ *
175
+ * @summary Send requests to the Algolia REST API.
176
+ * @param customPut - The customPut object.
177
+ * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
178
+ * @param customPut.parameters - Query parameters to apply to the current query.
179
+ * @param customPut.body - Parameters to send with the custom request.
180
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
181
+ */
182
+ customPut({ path, parameters, body }, requestOptions) {
183
+ if (!path) {
184
+ throw new Error('Parameter `path` is required when calling `customPut`.');
185
+ }
186
+ const requestPath = '/1{path}'.replace('{path}', path);
187
+ const headers = {};
188
+ const queryParameters = parameters ? parameters : {};
189
+ const request = {
190
+ method: 'PUT',
191
+ path: requestPath,
192
+ queryParameters,
193
+ headers,
194
+ data: body ? body : {},
195
+ };
196
+ return transporter.request(request, requestOptions);
197
+ },
198
+ /**
199
+ * Delete an A/B test. To determine the `id` for an A/B test, use the [`listABTests` operation](#tag/abtest/operation/listABTests).
200
+ *
201
+ * @summary Delete an A/B test.
202
+ * @param deleteABTest - The deleteABTest object.
203
+ * @param deleteABTest.id - Unique A/B test ID.
204
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
205
+ */
206
+ deleteABTest({ id }, requestOptions) {
207
+ if (!id) {
208
+ throw new Error('Parameter `id` is required when calling `deleteABTest`.');
209
+ }
210
+ const requestPath = '/2/abtests/{id}'.replace('{id}', encodeURIComponent(id));
211
+ const headers = {};
212
+ const queryParameters = {};
213
+ const request = {
214
+ method: 'DELETE',
163
215
  path: requestPath,
164
216
  queryParameters,
165
217
  headers,
@@ -224,58 +276,6 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
224
276
  };
225
277
  return transporter.request(request, requestOptions);
226
278
  },
227
- /**
228
- * This method allow you to send requests to the Algolia REST API.
229
- *
230
- * @summary Send requests to the Algolia REST API.
231
- * @param post - The post object.
232
- * @param post.path - Path of the endpoint, anything after \"/1\" must be specified.
233
- * @param post.parameters - Query parameters to apply to the current query.
234
- * @param post.body - Parameters to send with the custom request.
235
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
236
- */
237
- post({ path, parameters, body }, requestOptions) {
238
- if (!path) {
239
- throw new Error('Parameter `path` is required when calling `post`.');
240
- }
241
- const requestPath = '/1{path}'.replace('{path}', path);
242
- const headers = {};
243
- const queryParameters = parameters ? parameters : {};
244
- const request = {
245
- method: 'POST',
246
- path: requestPath,
247
- queryParameters,
248
- headers,
249
- data: body ? body : {},
250
- };
251
- return transporter.request(request, requestOptions);
252
- },
253
- /**
254
- * This method allow you to send requests to the Algolia REST API.
255
- *
256
- * @summary Send requests to the Algolia REST API.
257
- * @param put - The put object.
258
- * @param put.path - Path of the endpoint, anything after \"/1\" must be specified.
259
- * @param put.parameters - Query parameters to apply to the current query.
260
- * @param put.body - Parameters to send with the custom request.
261
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
262
- */
263
- put({ path, parameters, body }, requestOptions) {
264
- if (!path) {
265
- throw new Error('Parameter `path` is required when calling `put`.');
266
- }
267
- const requestPath = '/1{path}'.replace('{path}', path);
268
- const headers = {};
269
- const queryParameters = parameters ? parameters : {};
270
- const request = {
271
- method: 'PUT',
272
- path: requestPath,
273
- queryParameters,
274
- headers,
275
- data: body ? body : {},
276
- };
277
- return transporter.request(request, requestOptions);
278
- },
279
279
  /**
280
280
  * If stopped, the test is over and can\'t be restarted. There is now only one index, receiving 100% of all search requests. The data gathered for stopped A/B tests is retained. To determine the `id` for an A/B test, use the [`listABTests` operation](#tag/abtest/operation/listABTests).
281
281
  *
@@ -303,7 +303,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
303
303
  }
304
304
 
305
305
  // 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.
306
- const apiClientVersion$3 = '5.0.0-alpha.90';
306
+ const apiClientVersion$3 = '5.0.0-alpha.97';
307
307
  const REGIONS$1 = ['de', 'us'];
308
308
  function getDefaultHosts$2(region) {
309
309
  const url = !region
@@ -366,14 +366,14 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
366
366
  * This method allow you to send requests to the Algolia REST API.
367
367
  *
368
368
  * @summary Send requests to the Algolia REST API.
369
- * @param del - The del object.
370
- * @param del.path - Path of the endpoint, anything after \"/1\" must be specified.
371
- * @param del.parameters - Query parameters to apply to the current query.
369
+ * @param customDelete - The customDelete object.
370
+ * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
371
+ * @param customDelete.parameters - Query parameters to apply to the current query.
372
372
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
373
373
  */
374
- del({ path, parameters }, requestOptions) {
374
+ customDelete({ path, parameters }, requestOptions) {
375
375
  if (!path) {
376
- throw new Error('Parameter `path` is required when calling `del`.');
376
+ throw new Error('Parameter `path` is required when calling `customDelete`.');
377
377
  }
378
378
  const requestPath = '/1{path}'.replace('{path}', path);
379
379
  const headers = {};
@@ -390,14 +390,14 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
390
390
  * This method allow you to send requests to the Algolia REST API.
391
391
  *
392
392
  * @summary Send requests to the Algolia REST API.
393
- * @param get - The get object.
394
- * @param get.path - Path of the endpoint, anything after \"/1\" must be specified.
395
- * @param get.parameters - Query parameters to apply to the current query.
393
+ * @param customGet - The customGet object.
394
+ * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
395
+ * @param customGet.parameters - Query parameters to apply to the current query.
396
396
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
397
397
  */
398
- get({ path, parameters }, requestOptions) {
398
+ customGet({ path, parameters }, requestOptions) {
399
399
  if (!path) {
400
- throw new Error('Parameter `path` is required when calling `get`.');
400
+ throw new Error('Parameter `path` is required when calling `customGet`.');
401
401
  }
402
402
  const requestPath = '/1{path}'.replace('{path}', path);
403
403
  const headers = {};
@@ -410,6 +410,58 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
410
410
  };
411
411
  return transporter.request(request, requestOptions);
412
412
  },
413
+ /**
414
+ * This method allow you to send requests to the Algolia REST API.
415
+ *
416
+ * @summary Send requests to the Algolia REST API.
417
+ * @param customPost - The customPost object.
418
+ * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
419
+ * @param customPost.parameters - Query parameters to apply to the current query.
420
+ * @param customPost.body - Parameters to send with the custom request.
421
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
422
+ */
423
+ customPost({ path, parameters, body }, requestOptions) {
424
+ if (!path) {
425
+ throw new Error('Parameter `path` is required when calling `customPost`.');
426
+ }
427
+ const requestPath = '/1{path}'.replace('{path}', path);
428
+ const headers = {};
429
+ const queryParameters = parameters ? parameters : {};
430
+ const request = {
431
+ method: 'POST',
432
+ path: requestPath,
433
+ queryParameters,
434
+ headers,
435
+ data: body ? body : {},
436
+ };
437
+ return transporter.request(request, requestOptions);
438
+ },
439
+ /**
440
+ * This method allow you to send requests to the Algolia REST API.
441
+ *
442
+ * @summary Send requests to the Algolia REST API.
443
+ * @param customPut - The customPut object.
444
+ * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
445
+ * @param customPut.parameters - Query parameters to apply to the current query.
446
+ * @param customPut.body - Parameters to send with the custom request.
447
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
448
+ */
449
+ customPut({ path, parameters, body }, requestOptions) {
450
+ if (!path) {
451
+ throw new Error('Parameter `path` is required when calling `customPut`.');
452
+ }
453
+ const requestPath = '/1{path}'.replace('{path}', path);
454
+ const headers = {};
455
+ const queryParameters = parameters ? parameters : {};
456
+ const request = {
457
+ method: 'PUT',
458
+ path: requestPath,
459
+ queryParameters,
460
+ headers,
461
+ data: body ? body : {},
462
+ };
463
+ return transporter.request(request, requestOptions);
464
+ },
413
465
  /**
414
466
  * Return the average click position for the complete time range and for individual days. > **Note**: If all `positions` have a `clickCount` of `0` or `null`, it means Algolia didn\'t receive any click events for tracked searches. A _tracked_ search is a search request where the `clickAnalytics` parameter is `true`.
415
467
  *
@@ -1144,63 +1196,11 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1144
1196
  };
1145
1197
  return transporter.request(request, requestOptions);
1146
1198
  },
1147
- /**
1148
- * This method allow you to send requests to the Algolia REST API.
1149
- *
1150
- * @summary Send requests to the Algolia REST API.
1151
- * @param post - The post object.
1152
- * @param post.path - Path of the endpoint, anything after \"/1\" must be specified.
1153
- * @param post.parameters - Query parameters to apply to the current query.
1154
- * @param post.body - Parameters to send with the custom request.
1155
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1156
- */
1157
- post({ path, parameters, body }, requestOptions) {
1158
- if (!path) {
1159
- throw new Error('Parameter `path` is required when calling `post`.');
1160
- }
1161
- const requestPath = '/1{path}'.replace('{path}', path);
1162
- const headers = {};
1163
- const queryParameters = parameters ? parameters : {};
1164
- const request = {
1165
- method: 'POST',
1166
- path: requestPath,
1167
- queryParameters,
1168
- headers,
1169
- data: body ? body : {},
1170
- };
1171
- return transporter.request(request, requestOptions);
1172
- },
1173
- /**
1174
- * This method allow you to send requests to the Algolia REST API.
1175
- *
1176
- * @summary Send requests to the Algolia REST API.
1177
- * @param put - The put object.
1178
- * @param put.path - Path of the endpoint, anything after \"/1\" must be specified.
1179
- * @param put.parameters - Query parameters to apply to the current query.
1180
- * @param put.body - Parameters to send with the custom request.
1181
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1182
- */
1183
- put({ path, parameters, body }, requestOptions) {
1184
- if (!path) {
1185
- throw new Error('Parameter `path` is required when calling `put`.');
1186
- }
1187
- const requestPath = '/1{path}'.replace('{path}', path);
1188
- const headers = {};
1189
- const queryParameters = parameters ? parameters : {};
1190
- const request = {
1191
- method: 'PUT',
1192
- path: requestPath,
1193
- queryParameters,
1194
- headers,
1195
- data: body ? body : {},
1196
- };
1197
- return transporter.request(request, requestOptions);
1198
- },
1199
1199
  };
1200
1200
  }
1201
1201
 
1202
1202
  // 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.
1203
- const apiClientVersion$2 = '5.0.0-alpha.90';
1203
+ const apiClientVersion$2 = '5.0.0-alpha.97';
1204
1204
  const REGIONS = ['eu', 'us'];
1205
1205
  function getDefaultHosts$1(region) {
1206
1206
  const url = 'personalization.{region}.algolia.com'.replace('{region}', region);
@@ -1261,14 +1261,14 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1261
1261
  * This method allow you to send requests to the Algolia REST API.
1262
1262
  *
1263
1263
  * @summary Send requests to the Algolia REST API.
1264
- * @param del - The del object.
1265
- * @param del.path - Path of the endpoint, anything after \"/1\" must be specified.
1266
- * @param del.parameters - Query parameters to apply to the current query.
1264
+ * @param customDelete - The customDelete object.
1265
+ * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
1266
+ * @param customDelete.parameters - Query parameters to apply to the current query.
1267
1267
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1268
1268
  */
1269
- del({ path, parameters }, requestOptions) {
1269
+ customDelete({ path, parameters }, requestOptions) {
1270
1270
  if (!path) {
1271
- throw new Error('Parameter `path` is required when calling `del`.');
1271
+ throw new Error('Parameter `path` is required when calling `customDelete`.');
1272
1272
  }
1273
1273
  const requestPath = '/1{path}'.replace('{path}', path);
1274
1274
  const headers = {};
@@ -1282,22 +1282,23 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1282
1282
  return transporter.request(request, requestOptions);
1283
1283
  },
1284
1284
  /**
1285
- * Delete the user profile and all its associated data. Returns, as part of the response, a date until which the data can safely be considered as deleted for the given user. This means if you send events for the given user before this date, they will be ignored. Any data received after the deletedUntil date will start building a new user profile. It might take a couple hours for the deletion request to be fully processed.
1285
+ * This method allow you to send requests to the Algolia REST API.
1286
1286
  *
1287
- * @summary Delete a user profile.
1288
- * @param deleteUserProfile - The deleteUserProfile object.
1289
- * @param deleteUserProfile.userToken - UserToken representing the user for which to fetch the Personalization profile.
1287
+ * @summary Send requests to the Algolia REST API.
1288
+ * @param customGet - The customGet object.
1289
+ * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
1290
+ * @param customGet.parameters - Query parameters to apply to the current query.
1290
1291
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1291
1292
  */
1292
- deleteUserProfile({ userToken }, requestOptions) {
1293
- if (!userToken) {
1294
- throw new Error('Parameter `userToken` is required when calling `deleteUserProfile`.');
1293
+ customGet({ path, parameters }, requestOptions) {
1294
+ if (!path) {
1295
+ throw new Error('Parameter `path` is required when calling `customGet`.');
1295
1296
  }
1296
- const requestPath = '/1/profiles/{userToken}'.replace('{userToken}', encodeURIComponent(userToken));
1297
+ const requestPath = '/1{path}'.replace('{path}', path);
1297
1298
  const headers = {};
1298
- const queryParameters = {};
1299
+ const queryParameters = parameters ? parameters : {};
1299
1300
  const request = {
1300
- method: 'DELETE',
1301
+ method: 'GET',
1301
1302
  path: requestPath,
1302
1303
  queryParameters,
1303
1304
  headers,
@@ -1308,61 +1309,71 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1308
1309
  * This method allow you to send requests to the Algolia REST API.
1309
1310
  *
1310
1311
  * @summary Send requests to the Algolia REST API.
1311
- * @param get - The get object.
1312
- * @param get.path - Path of the endpoint, anything after \"/1\" must be specified.
1313
- * @param get.parameters - Query parameters to apply to the current query.
1312
+ * @param customPost - The customPost object.
1313
+ * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
1314
+ * @param customPost.parameters - Query parameters to apply to the current query.
1315
+ * @param customPost.body - Parameters to send with the custom request.
1314
1316
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1315
1317
  */
1316
- get({ path, parameters }, requestOptions) {
1318
+ customPost({ path, parameters, body }, requestOptions) {
1317
1319
  if (!path) {
1318
- throw new Error('Parameter `path` is required when calling `get`.');
1320
+ throw new Error('Parameter `path` is required when calling `customPost`.');
1319
1321
  }
1320
1322
  const requestPath = '/1{path}'.replace('{path}', path);
1321
1323
  const headers = {};
1322
1324
  const queryParameters = parameters ? parameters : {};
1323
1325
  const request = {
1324
- method: 'GET',
1326
+ method: 'POST',
1325
1327
  path: requestPath,
1326
1328
  queryParameters,
1327
1329
  headers,
1330
+ data: body ? body : {},
1328
1331
  };
1329
1332
  return transporter.request(request, requestOptions);
1330
1333
  },
1331
1334
  /**
1332
- * The strategy contains information on the events and facets that impact user profiles and personalized search results.
1335
+ * This method allow you to send requests to the Algolia REST API.
1333
1336
  *
1334
- * @summary Get the current strategy.
1337
+ * @summary Send requests to the Algolia REST API.
1338
+ * @param customPut - The customPut object.
1339
+ * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
1340
+ * @param customPut.parameters - Query parameters to apply to the current query.
1341
+ * @param customPut.body - Parameters to send with the custom request.
1335
1342
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1336
1343
  */
1337
- getPersonalizationStrategy(requestOptions) {
1338
- const requestPath = '/1/strategies/personalization';
1344
+ customPut({ path, parameters, body }, requestOptions) {
1345
+ if (!path) {
1346
+ throw new Error('Parameter `path` is required when calling `customPut`.');
1347
+ }
1348
+ const requestPath = '/1{path}'.replace('{path}', path);
1339
1349
  const headers = {};
1340
- const queryParameters = {};
1350
+ const queryParameters = parameters ? parameters : {};
1341
1351
  const request = {
1342
- method: 'GET',
1352
+ method: 'PUT',
1343
1353
  path: requestPath,
1344
1354
  queryParameters,
1345
1355
  headers,
1356
+ data: body ? body : {},
1346
1357
  };
1347
1358
  return transporter.request(request, requestOptions);
1348
1359
  },
1349
1360
  /**
1350
- * Get the user profile built from Personalization strategy. The profile is structured by facet name used in the strategy. Each facet value is mapped to its score. Each score represents the user affinity for a specific facet value given the userToken past events and the Personalization strategy defined. Scores are bounded to 20. The last processed event timestamp is provided using the ISO 8601 format for debugging purposes.
1361
+ * Delete the user profile and all its associated data. Returns, as part of the response, a date until which the data can safely be considered as deleted for the given user. This means if you send events for the given user before this date, they will be ignored. Any data received after the deletedUntil date will start building a new user profile. It might take a couple hours for the deletion request to be fully processed.
1351
1362
  *
1352
- * @summary Get a user profile.
1353
- * @param getUserTokenProfile - The getUserTokenProfile object.
1354
- * @param getUserTokenProfile.userToken - UserToken representing the user for which to fetch the Personalization profile.
1363
+ * @summary Delete a user profile.
1364
+ * @param deleteUserProfile - The deleteUserProfile object.
1365
+ * @param deleteUserProfile.userToken - UserToken representing the user for which to fetch the Personalization profile.
1355
1366
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1356
1367
  */
1357
- getUserTokenProfile({ userToken }, requestOptions) {
1368
+ deleteUserProfile({ userToken }, requestOptions) {
1358
1369
  if (!userToken) {
1359
- throw new Error('Parameter `userToken` is required when calling `getUserTokenProfile`.');
1370
+ throw new Error('Parameter `userToken` is required when calling `deleteUserProfile`.');
1360
1371
  }
1361
- const requestPath = '/1/profiles/personalization/{userToken}'.replace('{userToken}', encodeURIComponent(userToken));
1372
+ const requestPath = '/1/profiles/{userToken}'.replace('{userToken}', encodeURIComponent(userToken));
1362
1373
  const headers = {};
1363
1374
  const queryParameters = {};
1364
1375
  const request = {
1365
- method: 'GET',
1376
+ method: 'DELETE',
1366
1377
  path: requestPath,
1367
1378
  queryParameters,
1368
1379
  headers,
@@ -1370,54 +1381,43 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1370
1381
  return transporter.request(request, requestOptions);
1371
1382
  },
1372
1383
  /**
1373
- * This method allow you to send requests to the Algolia REST API.
1384
+ * The strategy contains information on the events and facets that impact user profiles and personalized search results.
1374
1385
  *
1375
- * @summary Send requests to the Algolia REST API.
1376
- * @param post - The post object.
1377
- * @param post.path - Path of the endpoint, anything after \"/1\" must be specified.
1378
- * @param post.parameters - Query parameters to apply to the current query.
1379
- * @param post.body - Parameters to send with the custom request.
1386
+ * @summary Get the current strategy.
1380
1387
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1381
1388
  */
1382
- post({ path, parameters, body }, requestOptions) {
1383
- if (!path) {
1384
- throw new Error('Parameter `path` is required when calling `post`.');
1385
- }
1386
- const requestPath = '/1{path}'.replace('{path}', path);
1389
+ getPersonalizationStrategy(requestOptions) {
1390
+ const requestPath = '/1/strategies/personalization';
1387
1391
  const headers = {};
1388
- const queryParameters = parameters ? parameters : {};
1392
+ const queryParameters = {};
1389
1393
  const request = {
1390
- method: 'POST',
1394
+ method: 'GET',
1391
1395
  path: requestPath,
1392
1396
  queryParameters,
1393
1397
  headers,
1394
- data: body ? body : {},
1395
1398
  };
1396
1399
  return transporter.request(request, requestOptions);
1397
1400
  },
1398
1401
  /**
1399
- * This method allow you to send requests to the Algolia REST API.
1402
+ * Get the user profile built from Personalization strategy. The profile is structured by facet name used in the strategy. Each facet value is mapped to its score. Each score represents the user affinity for a specific facet value given the userToken past events and the Personalization strategy defined. Scores are bounded to 20. The last processed event timestamp is provided using the ISO 8601 format for debugging purposes.
1400
1403
  *
1401
- * @summary Send requests to the Algolia REST API.
1402
- * @param put - The put object.
1403
- * @param put.path - Path of the endpoint, anything after \"/1\" must be specified.
1404
- * @param put.parameters - Query parameters to apply to the current query.
1405
- * @param put.body - Parameters to send with the custom request.
1404
+ * @summary Get a user profile.
1405
+ * @param getUserTokenProfile - The getUserTokenProfile object.
1406
+ * @param getUserTokenProfile.userToken - UserToken representing the user for which to fetch the Personalization profile.
1406
1407
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1407
1408
  */
1408
- put({ path, parameters, body }, requestOptions) {
1409
- if (!path) {
1410
- throw new Error('Parameter `path` is required when calling `put`.');
1409
+ getUserTokenProfile({ userToken }, requestOptions) {
1410
+ if (!userToken) {
1411
+ throw new Error('Parameter `userToken` is required when calling `getUserTokenProfile`.');
1411
1412
  }
1412
- const requestPath = '/1{path}'.replace('{path}', path);
1413
+ const requestPath = '/1/profiles/personalization/{userToken}'.replace('{userToken}', encodeURIComponent(userToken));
1413
1414
  const headers = {};
1414
- const queryParameters = parameters ? parameters : {};
1415
+ const queryParameters = {};
1415
1416
  const request = {
1416
- method: 'PUT',
1417
+ method: 'GET',
1417
1418
  path: requestPath,
1418
1419
  queryParameters,
1419
1420
  headers,
1420
- data: body ? body : {},
1421
1421
  };
1422
1422
  return transporter.request(request, requestOptions);
1423
1423
  },
@@ -1457,7 +1457,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1457
1457
  }
1458
1458
 
1459
1459
  // 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.
1460
- const apiClientVersion$1 = '5.0.0-alpha.90';
1460
+ const apiClientVersion$1 = '5.0.0-alpha.97';
1461
1461
  function getDefaultHosts(appId) {
1462
1462
  return [
1463
1463
  {
@@ -2050,14 +2050,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2050
2050
  * This method allow you to send requests to the Algolia REST API.
2051
2051
  *
2052
2052
  * @summary Send requests to the Algolia REST API.
2053
- * @param del - The del object.
2054
- * @param del.path - Path of the endpoint, anything after \"/1\" must be specified.
2055
- * @param del.parameters - Query parameters to apply to the current query.
2053
+ * @param customDelete - The customDelete object.
2054
+ * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
2055
+ * @param customDelete.parameters - Query parameters to apply to the current query.
2056
2056
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2057
2057
  */
2058
- del({ path, parameters }, requestOptions) {
2058
+ customDelete({ path, parameters }, requestOptions) {
2059
2059
  if (!path) {
2060
- throw new Error('Parameter `path` is required when calling `del`.');
2060
+ throw new Error('Parameter `path` is required when calling `customDelete`.');
2061
2061
  }
2062
2062
  const requestPath = '/1{path}'.replace('{path}', path);
2063
2063
  const headers = {};
@@ -2070,6 +2070,82 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2070
2070
  };
2071
2071
  return transporter.request(request, requestOptions);
2072
2072
  },
2073
+ /**
2074
+ * This method allow you to send requests to the Algolia REST API.
2075
+ *
2076
+ * @summary Send requests to the Algolia REST API.
2077
+ * @param customGet - The customGet object.
2078
+ * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
2079
+ * @param customGet.parameters - Query parameters to apply to the current query.
2080
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2081
+ */
2082
+ customGet({ path, parameters }, requestOptions) {
2083
+ if (!path) {
2084
+ throw new Error('Parameter `path` is required when calling `customGet`.');
2085
+ }
2086
+ const requestPath = '/1{path}'.replace('{path}', path);
2087
+ const headers = {};
2088
+ const queryParameters = parameters ? parameters : {};
2089
+ const request = {
2090
+ method: 'GET',
2091
+ path: requestPath,
2092
+ queryParameters,
2093
+ headers,
2094
+ };
2095
+ return transporter.request(request, requestOptions);
2096
+ },
2097
+ /**
2098
+ * This method allow you to send requests to the Algolia REST API.
2099
+ *
2100
+ * @summary Send requests to the Algolia REST API.
2101
+ * @param customPost - The customPost object.
2102
+ * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
2103
+ * @param customPost.parameters - Query parameters to apply to the current query.
2104
+ * @param customPost.body - Parameters to send with the custom request.
2105
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2106
+ */
2107
+ customPost({ path, parameters, body }, requestOptions) {
2108
+ if (!path) {
2109
+ throw new Error('Parameter `path` is required when calling `customPost`.');
2110
+ }
2111
+ const requestPath = '/1{path}'.replace('{path}', path);
2112
+ const headers = {};
2113
+ const queryParameters = parameters ? parameters : {};
2114
+ const request = {
2115
+ method: 'POST',
2116
+ path: requestPath,
2117
+ queryParameters,
2118
+ headers,
2119
+ data: body ? body : {},
2120
+ };
2121
+ return transporter.request(request, requestOptions);
2122
+ },
2123
+ /**
2124
+ * This method allow you to send requests to the Algolia REST API.
2125
+ *
2126
+ * @summary Send requests to the Algolia REST API.
2127
+ * @param customPut - The customPut object.
2128
+ * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
2129
+ * @param customPut.parameters - Query parameters to apply to the current query.
2130
+ * @param customPut.body - Parameters to send with the custom request.
2131
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2132
+ */
2133
+ customPut({ path, parameters, body }, requestOptions) {
2134
+ if (!path) {
2135
+ throw new Error('Parameter `path` is required when calling `customPut`.');
2136
+ }
2137
+ const requestPath = '/1{path}'.replace('{path}', path);
2138
+ const headers = {};
2139
+ const queryParameters = parameters ? parameters : {};
2140
+ const request = {
2141
+ method: 'PUT',
2142
+ path: requestPath,
2143
+ queryParameters,
2144
+ headers,
2145
+ data: body ? body : {},
2146
+ };
2147
+ return transporter.request(request, requestOptions);
2148
+ },
2073
2149
  /**
2074
2150
  * Delete an existing API key. The request must be authenticated with the admin API key.
2075
2151
  *
@@ -2262,30 +2338,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2262
2338
  };
2263
2339
  return transporter.request(request, requestOptions);
2264
2340
  },
2265
- /**
2266
- * This method allow you to send requests to the Algolia REST API.
2267
- *
2268
- * @summary Send requests to the Algolia REST API.
2269
- * @param get - The get object.
2270
- * @param get.path - Path of the endpoint, anything after \"/1\" must be specified.
2271
- * @param get.parameters - Query parameters to apply to the current query.
2272
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2273
- */
2274
- get({ path, parameters }, requestOptions) {
2275
- if (!path) {
2276
- throw new Error('Parameter `path` is required when calling `get`.');
2277
- }
2278
- const requestPath = '/1{path}'.replace('{path}', path);
2279
- const headers = {};
2280
- const queryParameters = parameters ? parameters : {};
2281
- const request = {
2282
- method: 'GET',
2283
- path: requestPath,
2284
- queryParameters,
2285
- headers,
2286
- };
2287
- return transporter.request(request, requestOptions);
2288
- },
2289
2341
  /**
2290
2342
  * Get the permissions and restrictions of a specific API key. When authenticating with the admin API key, you can request information for any of your application\'s keys. When authenticating with other API keys, you can only retrieve information for that key.
2291
2343
  *
@@ -2821,58 +2873,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2821
2873
  };
2822
2874
  return transporter.request(request, requestOptions);
2823
2875
  },
2824
- /**
2825
- * This method allow you to send requests to the Algolia REST API.
2826
- *
2827
- * @summary Send requests to the Algolia REST API.
2828
- * @param post - The post object.
2829
- * @param post.path - Path of the endpoint, anything after \"/1\" must be specified.
2830
- * @param post.parameters - Query parameters to apply to the current query.
2831
- * @param post.body - Parameters to send with the custom request.
2832
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2833
- */
2834
- post({ path, parameters, body }, requestOptions) {
2835
- if (!path) {
2836
- throw new Error('Parameter `path` is required when calling `post`.');
2837
- }
2838
- const requestPath = '/1{path}'.replace('{path}', path);
2839
- const headers = {};
2840
- const queryParameters = parameters ? parameters : {};
2841
- const request = {
2842
- method: 'POST',
2843
- path: requestPath,
2844
- queryParameters,
2845
- headers,
2846
- data: body ? body : {},
2847
- };
2848
- return transporter.request(request, requestOptions);
2849
- },
2850
- /**
2851
- * This method allow you to send requests to the Algolia REST API.
2852
- *
2853
- * @summary Send requests to the Algolia REST API.
2854
- * @param put - The put object.
2855
- * @param put.path - Path of the endpoint, anything after \"/1\" must be specified.
2856
- * @param put.parameters - Query parameters to apply to the current query.
2857
- * @param put.body - Parameters to send with the custom request.
2858
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2859
- */
2860
- put({ path, parameters, body }, requestOptions) {
2861
- if (!path) {
2862
- throw new Error('Parameter `path` is required when calling `put`.');
2863
- }
2864
- const requestPath = '/1{path}'.replace('{path}', path);
2865
- const headers = {};
2866
- const queryParameters = parameters ? parameters : {};
2867
- const request = {
2868
- method: 'PUT',
2869
- path: requestPath,
2870
- queryParameters,
2871
- headers,
2872
- data: body ? body : {},
2873
- };
2874
- return transporter.request(request, requestOptions);
2875
- },
2876
2876
  /**
2877
2877
  * Remove a userID and its associated data from the multi-clusters.
2878
2878
  *