algoliasearch 5.0.0-alpha.91 → 5.0.0-alpha.98
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.
- package/builds/browser.ts +3 -9
- package/builds/models.ts +11 -5
- package/builds/node.ts +3 -9
- package/dist/algoliasearch/builds/browser.d.ts +10 -10
- package/dist/algoliasearch/builds/browser.d.ts.map +1 -1
- package/dist/algoliasearch/builds/models.d.ts +2 -2
- package/dist/algoliasearch/builds/models.d.ts.map +1 -1
- package/dist/algoliasearch/builds/node.d.ts +10 -10
- package/dist/algoliasearch/builds/node.d.ts.map +1 -1
- package/dist/algoliasearch.cjs +319 -327
- package/dist/algoliasearch.esm.browser.js +362 -346
- package/dist/algoliasearch.esm.node.js +319 -327
- package/dist/algoliasearch.umd.js +2 -2
- package/dist/client-abtesting/model/clientMethodProps.d.ts +42 -42
- package/dist/client-abtesting/model/clientMethodProps.d.ts.map +1 -1
- package/dist/client-abtesting/model/variant.d.ts +4 -0
- package/dist/client-abtesting/model/variant.d.ts.map +1 -1
- package/dist/client-abtesting/src/abtestingClient.d.ts +37 -37
- package/dist/client-abtesting/src/abtestingClient.d.ts.map +1 -1
- package/dist/client-analytics/model/clientMethodProps.d.ts +38 -38
- package/dist/client-analytics/model/clientMethodProps.d.ts.map +1 -1
- package/dist/client-analytics/src/analyticsClient.d.ts +32 -32
- package/dist/client-analytics/src/analyticsClient.d.ts.map +1 -1
- package/dist/client-personalization/model/clientMethodProps.d.ts +26 -26
- package/dist/client-personalization/model/clientMethodProps.d.ts.map +1 -1
- package/dist/client-personalization/src/personalizationClient.d.ts +37 -37
- package/dist/client-personalization/src/personalizationClient.d.ts.map +1 -1
- package/dist/client-search/model/clientMethodProps.d.ts +59 -72
- package/dist/client-search/model/clientMethodProps.d.ts.map +1 -1
- package/dist/client-search/model/highlightResult.d.ts +1 -1
- package/dist/client-search/model/highlightResult.d.ts.map +1 -1
- package/dist/client-search/model/searchForFacetValuesResponse.d.ts +8 -0
- package/dist/client-search/model/searchForFacetValuesResponse.d.ts.map +1 -1
- package/dist/client-search/model/searchResponses.d.ts +2 -2
- package/dist/client-search/model/searchResponses.d.ts.map +1 -1
- package/dist/client-search/model/searchResult.d.ts +1 -1
- package/dist/client-search/model/searchResult.d.ts.map +1 -1
- package/dist/client-search/model/searchSynonymsParams.d.ts +10 -0
- package/dist/client-search/model/searchSynonymsParams.d.ts.map +1 -1
- package/dist/client-search/model/snippetResult.d.ts +1 -1
- package/dist/client-search/model/snippetResult.d.ts.map +1 -1
- package/dist/client-search/model/userHighlightResult.d.ts +2 -8
- package/dist/client-search/model/userHighlightResult.d.ts.map +1 -1
- package/dist/client-search/src/searchClient.d.ts +53 -55
- package/dist/client-search/src/searchClient.d.ts.map +1 -1
- package/dist/lite/lite.cjs +7 -7
- package/dist/lite/lite.esm.browser.js +50 -26
- package/dist/lite/lite.esm.node.js +7 -7
- package/dist/lite/lite.umd.js +2 -2
- package/dist/lite/model/clientMethodProps.d.ts +2 -2
- package/dist/lite/model/clientMethodProps.d.ts.map +1 -1
- package/dist/lite/model/highlightResult.d.ts +1 -1
- package/dist/lite/model/highlightResult.d.ts.map +1 -1
- package/dist/lite/model/searchForFacetValuesResponse.d.ts +8 -0
- package/dist/lite/model/searchForFacetValuesResponse.d.ts.map +1 -1
- package/dist/lite/model/searchResponses.d.ts +2 -2
- package/dist/lite/model/searchResponses.d.ts.map +1 -1
- package/dist/lite/model/searchResult.d.ts +1 -1
- package/dist/lite/model/searchResult.d.ts.map +1 -1
- package/dist/lite/model/snippetResult.d.ts +1 -1
- package/dist/lite/model/snippetResult.d.ts.map +1 -1
- package/dist/lite/src/liteClient.d.ts +8 -8
- package/dist/lite/src/liteClient.d.ts.map +1 -1
- package/lite/model/clientMethodProps.ts +2 -2
- package/lite/model/highlightResult.ts +3 -1
- package/lite/model/searchForFacetValuesResponse.ts +10 -0
- package/lite/model/searchResponses.ts +2 -2
- package/lite/model/searchResult.ts +3 -1
- package/lite/model/snippetResult.ts +3 -1
- package/lite/src/liteClient.ts +13 -11
- package/package.json +13 -13
package/dist/algoliasearch.cjs
CHANGED
|
@@ -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.
|
|
7
|
+
const apiClientVersion$4 = '5.0.0-alpha.98';
|
|
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
|
|
103
|
-
* @param
|
|
104
|
-
* @param
|
|
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
|
-
|
|
107
|
+
customDelete({ path, parameters }, requestOptions) {
|
|
108
108
|
if (!path) {
|
|
109
|
-
throw new Error('Parameter `path` is required when calling `
|
|
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
|
-
*
|
|
123
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
124
124
|
*
|
|
125
|
-
* @summary
|
|
126
|
-
* @param
|
|
127
|
-
* @param
|
|
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
|
-
|
|
131
|
-
if (!
|
|
132
|
-
throw new Error('Parameter `
|
|
131
|
+
customGet({ path, parameters }, requestOptions) {
|
|
132
|
+
if (!path) {
|
|
133
|
+
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
133
134
|
}
|
|
134
|
-
const requestPath = '/
|
|
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: '
|
|
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
|
|
150
|
-
* @param
|
|
151
|
-
* @param
|
|
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
|
-
|
|
156
|
+
customPost({ path, parameters, body }, requestOptions) {
|
|
155
157
|
if (!path) {
|
|
156
|
-
throw new Error('Parameter `path` is required when calling `
|
|
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: '
|
|
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.
|
|
306
|
+
const apiClientVersion$3 = '5.0.0-alpha.98';
|
|
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
|
|
370
|
-
* @param
|
|
371
|
-
* @param
|
|
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
|
-
|
|
374
|
+
customDelete({ path, parameters }, requestOptions) {
|
|
375
375
|
if (!path) {
|
|
376
|
-
throw new Error('Parameter `path` is required when calling `
|
|
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
|
|
394
|
-
* @param
|
|
395
|
-
* @param
|
|
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
|
-
|
|
398
|
+
customGet({ path, parameters }, requestOptions) {
|
|
399
399
|
if (!path) {
|
|
400
|
-
throw new Error('Parameter `path` is required when calling `
|
|
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.
|
|
1203
|
+
const apiClientVersion$2 = '5.0.0-alpha.98';
|
|
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
|
|
1265
|
-
* @param
|
|
1266
|
-
* @param
|
|
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
|
-
|
|
1269
|
+
customDelete({ path, parameters }, requestOptions) {
|
|
1270
1270
|
if (!path) {
|
|
1271
|
-
throw new Error('Parameter `path` is required when calling `
|
|
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
|
-
*
|
|
1285
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
1286
1286
|
*
|
|
1287
|
-
* @summary
|
|
1288
|
-
* @param
|
|
1289
|
-
* @param
|
|
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
|
-
|
|
1293
|
-
if (!
|
|
1294
|
-
throw new Error('Parameter `
|
|
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
|
|
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: '
|
|
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
|
|
1312
|
-
* @param
|
|
1313
|
-
* @param
|
|
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
|
-
|
|
1318
|
+
customPost({ path, parameters, body }, requestOptions) {
|
|
1317
1319
|
if (!path) {
|
|
1318
|
-
throw new Error('Parameter `path` is required when calling `
|
|
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: '
|
|
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
|
-
*
|
|
1335
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
1333
1336
|
*
|
|
1334
|
-
* @summary
|
|
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
|
-
|
|
1338
|
-
|
|
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: '
|
|
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
|
-
*
|
|
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
|
|
1353
|
-
* @param
|
|
1354
|
-
* @param
|
|
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
|
-
|
|
1368
|
+
deleteUserProfile({ userToken }, requestOptions) {
|
|
1358
1369
|
if (!userToken) {
|
|
1359
|
-
throw new Error('Parameter `userToken` is required when calling `
|
|
1370
|
+
throw new Error('Parameter `userToken` is required when calling `deleteUserProfile`.');
|
|
1360
1371
|
}
|
|
1361
|
-
const requestPath = '/1/profiles/
|
|
1372
|
+
const requestPath = '/1/profiles/{userToken}'.replace('{userToken}', encodeURIComponent(userToken));
|
|
1362
1373
|
const headers = {};
|
|
1363
1374
|
const queryParameters = {};
|
|
1364
1375
|
const request = {
|
|
1365
|
-
method: '
|
|
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
|
-
*
|
|
1384
|
+
* The strategy contains information on the events and facets that impact user profiles and personalized search results.
|
|
1374
1385
|
*
|
|
1375
|
-
* @summary
|
|
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
|
-
|
|
1383
|
-
|
|
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 =
|
|
1392
|
+
const queryParameters = {};
|
|
1389
1393
|
const request = {
|
|
1390
|
-
method: '
|
|
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
|
-
*
|
|
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
|
|
1402
|
-
* @param
|
|
1403
|
-
* @param
|
|
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
|
-
|
|
1409
|
-
if (!
|
|
1410
|
-
throw new Error('Parameter `
|
|
1409
|
+
getUserTokenProfile({ userToken }, requestOptions) {
|
|
1410
|
+
if (!userToken) {
|
|
1411
|
+
throw new Error('Parameter `userToken` is required when calling `getUserTokenProfile`.');
|
|
1411
1412
|
}
|
|
1412
|
-
const requestPath = '/1{
|
|
1413
|
+
const requestPath = '/1/profiles/personalization/{userToken}'.replace('{userToken}', encodeURIComponent(userToken));
|
|
1413
1414
|
const headers = {};
|
|
1414
|
-
const queryParameters =
|
|
1415
|
+
const queryParameters = {};
|
|
1415
1416
|
const request = {
|
|
1416
|
-
method: '
|
|
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.
|
|
1460
|
+
const apiClientVersion$1 = '5.0.0-alpha.98';
|
|
1461
1461
|
function getDefaultHosts(appId) {
|
|
1462
1462
|
return [
|
|
1463
1463
|
{
|
|
@@ -1682,21 +1682,25 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1682
1682
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
1683
1683
|
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is less hits returned than the number of maximum hits (1000).
|
|
1684
1684
|
* @param browseObjects.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.
|
|
1685
|
+
* @param browseObjects.searchSynonymsParams - The `searchSynonyms` method parameters.
|
|
1685
1686
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchSynonyms` method and merged with the transporter requestOptions.
|
|
1686
1687
|
*/
|
|
1687
|
-
browseSynonyms({ indexName,
|
|
1688
|
+
browseSynonyms({ indexName, searchSynonymsParams, ...browseSynonymsOptions }, requestOptions) {
|
|
1688
1689
|
const params = {
|
|
1690
|
+
page: 0,
|
|
1691
|
+
...searchSynonymsParams,
|
|
1689
1692
|
hitsPerPage: 1000,
|
|
1690
|
-
...browseSynonymsOptions,
|
|
1691
1693
|
};
|
|
1692
1694
|
return clientCommon.createIterablePromise({
|
|
1693
1695
|
func: (previousResponse) => {
|
|
1694
1696
|
return this.searchSynonyms({
|
|
1695
|
-
...params,
|
|
1696
1697
|
indexName,
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
:
|
|
1698
|
+
searchSynonymsParams: {
|
|
1699
|
+
...params,
|
|
1700
|
+
page: previousResponse
|
|
1701
|
+
? previousResponse.page + 1
|
|
1702
|
+
: params.page,
|
|
1703
|
+
},
|
|
1700
1704
|
}, requestOptions);
|
|
1701
1705
|
},
|
|
1702
1706
|
validate: (response) => response.nbHits < params.hitsPerPage,
|
|
@@ -1970,24 +1974,20 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1970
1974
|
return transporter.request(request, requestOptions);
|
|
1971
1975
|
},
|
|
1972
1976
|
/**
|
|
1973
|
-
* Delete
|
|
1977
|
+
* Delete the records but leave settings and index-specific API keys untouched.
|
|
1974
1978
|
*
|
|
1975
|
-
* @summary Delete all
|
|
1976
|
-
* @param
|
|
1977
|
-
* @param
|
|
1978
|
-
* @param clearAllSynonyms.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices.
|
|
1979
|
+
* @summary Delete all records from an index.
|
|
1980
|
+
* @param clearObjects - The clearObjects object.
|
|
1981
|
+
* @param clearObjects.indexName - Index on which to perform the request.
|
|
1979
1982
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1980
1983
|
*/
|
|
1981
|
-
|
|
1984
|
+
clearObjects({ indexName }, requestOptions) {
|
|
1982
1985
|
if (!indexName) {
|
|
1983
|
-
throw new Error('Parameter `indexName` is required when calling `
|
|
1986
|
+
throw new Error('Parameter `indexName` is required when calling `clearObjects`.');
|
|
1984
1987
|
}
|
|
1985
|
-
const requestPath = '/1/indexes/{indexName}/
|
|
1988
|
+
const requestPath = '/1/indexes/{indexName}/clear'.replace('{indexName}', encodeURIComponent(indexName));
|
|
1986
1989
|
const headers = {};
|
|
1987
1990
|
const queryParameters = {};
|
|
1988
|
-
if (forwardToReplicas !== undefined) {
|
|
1989
|
-
queryParameters.forwardToReplicas = forwardToReplicas.toString();
|
|
1990
|
-
}
|
|
1991
1991
|
const request = {
|
|
1992
1992
|
method: 'POST',
|
|
1993
1993
|
path: requestPath,
|
|
@@ -1997,20 +1997,24 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1997
1997
|
return transporter.request(request, requestOptions);
|
|
1998
1998
|
},
|
|
1999
1999
|
/**
|
|
2000
|
-
* Delete
|
|
2000
|
+
* Delete all rules in the index.
|
|
2001
2001
|
*
|
|
2002
|
-
* @summary Delete all
|
|
2003
|
-
* @param
|
|
2004
|
-
* @param
|
|
2002
|
+
* @summary Delete all rules.
|
|
2003
|
+
* @param clearRules - The clearRules object.
|
|
2004
|
+
* @param clearRules.indexName - Index on which to perform the request.
|
|
2005
|
+
* @param clearRules.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices.
|
|
2005
2006
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2006
2007
|
*/
|
|
2007
|
-
|
|
2008
|
+
clearRules({ indexName, forwardToReplicas }, requestOptions) {
|
|
2008
2009
|
if (!indexName) {
|
|
2009
|
-
throw new Error('Parameter `indexName` is required when calling `
|
|
2010
|
+
throw new Error('Parameter `indexName` is required when calling `clearRules`.');
|
|
2010
2011
|
}
|
|
2011
|
-
const requestPath = '/1/indexes/{indexName}/clear'.replace('{indexName}', encodeURIComponent(indexName));
|
|
2012
|
+
const requestPath = '/1/indexes/{indexName}/rules/clear'.replace('{indexName}', encodeURIComponent(indexName));
|
|
2012
2013
|
const headers = {};
|
|
2013
2014
|
const queryParameters = {};
|
|
2015
|
+
if (forwardToReplicas !== undefined) {
|
|
2016
|
+
queryParameters.forwardToReplicas = forwardToReplicas.toString();
|
|
2017
|
+
}
|
|
2014
2018
|
const request = {
|
|
2015
2019
|
method: 'POST',
|
|
2016
2020
|
path: requestPath,
|
|
@@ -2020,19 +2024,19 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2020
2024
|
return transporter.request(request, requestOptions);
|
|
2021
2025
|
},
|
|
2022
2026
|
/**
|
|
2023
|
-
* Delete all
|
|
2027
|
+
* Delete all synonyms in the index.
|
|
2024
2028
|
*
|
|
2025
|
-
* @summary Delete all
|
|
2026
|
-
* @param
|
|
2027
|
-
* @param
|
|
2028
|
-
* @param
|
|
2029
|
+
* @summary Delete all synonyms.
|
|
2030
|
+
* @param clearSynonyms - The clearSynonyms object.
|
|
2031
|
+
* @param clearSynonyms.indexName - Index on which to perform the request.
|
|
2032
|
+
* @param clearSynonyms.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices.
|
|
2029
2033
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2030
2034
|
*/
|
|
2031
|
-
|
|
2035
|
+
clearSynonyms({ indexName, forwardToReplicas }, requestOptions) {
|
|
2032
2036
|
if (!indexName) {
|
|
2033
|
-
throw new Error('Parameter `indexName` is required when calling `
|
|
2037
|
+
throw new Error('Parameter `indexName` is required when calling `clearSynonyms`.');
|
|
2034
2038
|
}
|
|
2035
|
-
const requestPath = '/1/indexes/{indexName}/
|
|
2039
|
+
const requestPath = '/1/indexes/{indexName}/synonyms/clear'.replace('{indexName}', encodeURIComponent(indexName));
|
|
2036
2040
|
const headers = {};
|
|
2037
2041
|
const queryParameters = {};
|
|
2038
2042
|
if (forwardToReplicas !== undefined) {
|
|
@@ -2050,14 +2054,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2050
2054
|
* This method allow you to send requests to the Algolia REST API.
|
|
2051
2055
|
*
|
|
2052
2056
|
* @summary Send requests to the Algolia REST API.
|
|
2053
|
-
* @param
|
|
2054
|
-
* @param
|
|
2055
|
-
* @param
|
|
2057
|
+
* @param customDelete - The customDelete object.
|
|
2058
|
+
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
2059
|
+
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
2056
2060
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2057
2061
|
*/
|
|
2058
|
-
|
|
2062
|
+
customDelete({ path, parameters }, requestOptions) {
|
|
2059
2063
|
if (!path) {
|
|
2060
|
-
throw new Error('Parameter `path` is required when calling `
|
|
2064
|
+
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
2061
2065
|
}
|
|
2062
2066
|
const requestPath = '/1{path}'.replace('{path}', path);
|
|
2063
2067
|
const headers = {};
|
|
@@ -2070,6 +2074,82 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2070
2074
|
};
|
|
2071
2075
|
return transporter.request(request, requestOptions);
|
|
2072
2076
|
},
|
|
2077
|
+
/**
|
|
2078
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
2079
|
+
*
|
|
2080
|
+
* @summary Send requests to the Algolia REST API.
|
|
2081
|
+
* @param customGet - The customGet object.
|
|
2082
|
+
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
2083
|
+
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
2084
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2085
|
+
*/
|
|
2086
|
+
customGet({ path, parameters }, requestOptions) {
|
|
2087
|
+
if (!path) {
|
|
2088
|
+
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
2089
|
+
}
|
|
2090
|
+
const requestPath = '/1{path}'.replace('{path}', path);
|
|
2091
|
+
const headers = {};
|
|
2092
|
+
const queryParameters = parameters ? parameters : {};
|
|
2093
|
+
const request = {
|
|
2094
|
+
method: 'GET',
|
|
2095
|
+
path: requestPath,
|
|
2096
|
+
queryParameters,
|
|
2097
|
+
headers,
|
|
2098
|
+
};
|
|
2099
|
+
return transporter.request(request, requestOptions);
|
|
2100
|
+
},
|
|
2101
|
+
/**
|
|
2102
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
2103
|
+
*
|
|
2104
|
+
* @summary Send requests to the Algolia REST API.
|
|
2105
|
+
* @param customPost - The customPost object.
|
|
2106
|
+
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
2107
|
+
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
2108
|
+
* @param customPost.body - Parameters to send with the custom request.
|
|
2109
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2110
|
+
*/
|
|
2111
|
+
customPost({ path, parameters, body }, requestOptions) {
|
|
2112
|
+
if (!path) {
|
|
2113
|
+
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
2114
|
+
}
|
|
2115
|
+
const requestPath = '/1{path}'.replace('{path}', path);
|
|
2116
|
+
const headers = {};
|
|
2117
|
+
const queryParameters = parameters ? parameters : {};
|
|
2118
|
+
const request = {
|
|
2119
|
+
method: 'POST',
|
|
2120
|
+
path: requestPath,
|
|
2121
|
+
queryParameters,
|
|
2122
|
+
headers,
|
|
2123
|
+
data: body ? body : {},
|
|
2124
|
+
};
|
|
2125
|
+
return transporter.request(request, requestOptions);
|
|
2126
|
+
},
|
|
2127
|
+
/**
|
|
2128
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
2129
|
+
*
|
|
2130
|
+
* @summary Send requests to the Algolia REST API.
|
|
2131
|
+
* @param customPut - The customPut object.
|
|
2132
|
+
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
2133
|
+
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
2134
|
+
* @param customPut.body - Parameters to send with the custom request.
|
|
2135
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2136
|
+
*/
|
|
2137
|
+
customPut({ path, parameters, body }, requestOptions) {
|
|
2138
|
+
if (!path) {
|
|
2139
|
+
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
2140
|
+
}
|
|
2141
|
+
const requestPath = '/1{path}'.replace('{path}', path);
|
|
2142
|
+
const headers = {};
|
|
2143
|
+
const queryParameters = parameters ? parameters : {};
|
|
2144
|
+
const request = {
|
|
2145
|
+
method: 'PUT',
|
|
2146
|
+
path: requestPath,
|
|
2147
|
+
queryParameters,
|
|
2148
|
+
headers,
|
|
2149
|
+
data: body ? body : {},
|
|
2150
|
+
};
|
|
2151
|
+
return transporter.request(request, requestOptions);
|
|
2152
|
+
},
|
|
2073
2153
|
/**
|
|
2074
2154
|
* Delete an existing API key. The request must be authenticated with the admin API key.
|
|
2075
2155
|
*
|
|
@@ -2262,30 +2342,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2262
2342
|
};
|
|
2263
2343
|
return transporter.request(request, requestOptions);
|
|
2264
2344
|
},
|
|
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
2345
|
/**
|
|
2290
2346
|
* 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
2347
|
*
|
|
@@ -2821,58 +2877,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2821
2877
|
};
|
|
2822
2878
|
return transporter.request(request, requestOptions);
|
|
2823
2879
|
},
|
|
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
2880
|
/**
|
|
2877
2881
|
* Remove a userID and its associated data from the multi-clusters.
|
|
2878
2882
|
*
|
|
@@ -3305,28 +3309,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3305
3309
|
* @summary Search for synonyms.
|
|
3306
3310
|
* @param searchSynonyms - The searchSynonyms object.
|
|
3307
3311
|
* @param searchSynonyms.indexName - Index on which to perform the request.
|
|
3308
|
-
* @param searchSynonyms.type - Search for specific [types of synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms).
|
|
3309
|
-
* @param searchSynonyms.page - Returns the requested page number (the first page is 0). Page size is set by `hitsPerPage`. When null, there\'s no pagination.
|
|
3310
|
-
* @param searchSynonyms.hitsPerPage - Maximum number of hits per page.
|
|
3311
3312
|
* @param searchSynonyms.searchSynonymsParams - Body of the `searchSynonyms` operation.
|
|
3312
3313
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3313
3314
|
*/
|
|
3314
|
-
searchSynonyms({ indexName,
|
|
3315
|
+
searchSynonyms({ indexName, searchSynonymsParams }, requestOptions) {
|
|
3315
3316
|
if (!indexName) {
|
|
3316
3317
|
throw new Error('Parameter `indexName` is required when calling `searchSynonyms`.');
|
|
3317
3318
|
}
|
|
3318
3319
|
const requestPath = '/1/indexes/{indexName}/synonyms/search'.replace('{indexName}', encodeURIComponent(indexName));
|
|
3319
3320
|
const headers = {};
|
|
3320
3321
|
const queryParameters = {};
|
|
3321
|
-
if (type !== undefined) {
|
|
3322
|
-
queryParameters.type = type.toString();
|
|
3323
|
-
}
|
|
3324
|
-
if (page !== undefined) {
|
|
3325
|
-
queryParameters.page = page.toString();
|
|
3326
|
-
}
|
|
3327
|
-
if (hitsPerPage !== undefined) {
|
|
3328
|
-
queryParameters.hitsPerPage = hitsPerPage.toString();
|
|
3329
|
-
}
|
|
3330
3322
|
const request = {
|
|
3331
3323
|
method: 'POST',
|
|
3332
3324
|
path: requestPath,
|