@algolia/client-search 5.0.0-alpha.4 → 5.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client-search.cjs.js +14 -14
- package/dist/client-search.esm.browser.js +14 -14
- package/dist/client-search.esm.node.js +14 -14
- package/dist/client-search.umd.js +2 -2
- package/dist/model/clientMethodProps.d.ts +7 -9
- package/dist/model/clientMethodProps.d.ts.map +1 -1
- package/dist/src/searchClient.d.ts +8 -8
- package/dist/src/searchClient.d.ts.map +1 -1
- package/model/clientMethodProps.ts +7 -12
- package/package.json +4 -4
|
@@ -6,7 +6,7 @@ var clientCommon = require('@algolia/client-common');
|
|
|
6
6
|
var requesterNodeHttp = require('@algolia/requester-node-http');
|
|
7
7
|
|
|
8
8
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
9
|
-
const apiClientVersion = '5.0.0-alpha.
|
|
9
|
+
const apiClientVersion = '5.0.0-alpha.5';
|
|
10
10
|
function getDefaultHosts(appId) {
|
|
11
11
|
return [
|
|
12
12
|
{
|
|
@@ -170,7 +170,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
170
170
|
* @param browseObjects - The browseObjects object.
|
|
171
171
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
172
172
|
* @param browseObjects.browseRequest - The `browse` method parameters.
|
|
173
|
-
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
|
|
173
|
+
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is no `cursor` in the response.
|
|
174
174
|
* @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`.
|
|
175
175
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `browse` method and merged with the transporter requestOptions.
|
|
176
176
|
*/
|
|
@@ -196,7 +196,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
196
196
|
* @param browseObjects - The browseObjects object.
|
|
197
197
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
198
198
|
* @param browseObjects.searchRulesParams - The `searchRules` method parameters.
|
|
199
|
-
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
|
|
199
|
+
* @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).
|
|
200
200
|
* @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`.
|
|
201
201
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchRules` method and merged with the transporter requestOptions.
|
|
202
202
|
*/
|
|
@@ -227,7 +227,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
227
227
|
* @summary Helper method that iterates on the `searchSynonyms` method.
|
|
228
228
|
* @param browseObjects - The browseObjects object.
|
|
229
229
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
230
|
-
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
|
|
230
|
+
* @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).
|
|
231
231
|
* @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`.
|
|
232
232
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchSynonyms` method and merged with the transporter requestOptions.
|
|
233
233
|
*/
|
|
@@ -1305,19 +1305,19 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1305
1305
|
* @param partialUpdateObject - The partialUpdateObject object.
|
|
1306
1306
|
* @param partialUpdateObject.indexName - The index in which to perform the request.
|
|
1307
1307
|
* @param partialUpdateObject.objectID - Unique identifier of an object.
|
|
1308
|
-
* @param partialUpdateObject.
|
|
1308
|
+
* @param partialUpdateObject.attributesToUpdate - Map of attribute(s) to update.
|
|
1309
1309
|
* @param partialUpdateObject.createIfNotExists - Creates the record if it does not exist yet.
|
|
1310
1310
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1311
1311
|
*/
|
|
1312
|
-
partialUpdateObject({ indexName, objectID,
|
|
1312
|
+
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists, }, requestOptions) {
|
|
1313
1313
|
if (!indexName) {
|
|
1314
1314
|
throw new Error('Parameter `indexName` is required when calling `partialUpdateObject`.');
|
|
1315
1315
|
}
|
|
1316
1316
|
if (!objectID) {
|
|
1317
1317
|
throw new Error('Parameter `objectID` is required when calling `partialUpdateObject`.');
|
|
1318
1318
|
}
|
|
1319
|
-
if (!
|
|
1320
|
-
throw new Error('Parameter `
|
|
1319
|
+
if (!attributesToUpdate) {
|
|
1320
|
+
throw new Error('Parameter `attributesToUpdate` is required when calling `partialUpdateObject`.');
|
|
1321
1321
|
}
|
|
1322
1322
|
const requestPath = '/1/indexes/{indexName}/{objectID}/partial'
|
|
1323
1323
|
.replace('{indexName}', encodeURIComponent(indexName))
|
|
@@ -1332,7 +1332,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1332
1332
|
path: requestPath,
|
|
1333
1333
|
queryParameters,
|
|
1334
1334
|
headers,
|
|
1335
|
-
data:
|
|
1335
|
+
data: attributesToUpdate,
|
|
1336
1336
|
};
|
|
1337
1337
|
return transporter.request(request, requestOptions);
|
|
1338
1338
|
},
|
|
@@ -1533,17 +1533,17 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1533
1533
|
* @summary Save a batch of rules.
|
|
1534
1534
|
* @param saveRules - The saveRules object.
|
|
1535
1535
|
* @param saveRules.indexName - The index in which to perform the request.
|
|
1536
|
-
* @param saveRules.
|
|
1536
|
+
* @param saveRules.rules - The rules object.
|
|
1537
1537
|
* @param saveRules.forwardToReplicas - When true, changes are also propagated to replicas of the given indexName.
|
|
1538
1538
|
* @param saveRules.clearExistingRules - When true, existing Rules are cleared before adding this batch. When false, existing Rules are kept.
|
|
1539
1539
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1540
1540
|
*/
|
|
1541
|
-
saveRules({ indexName,
|
|
1541
|
+
saveRules({ indexName, rules, forwardToReplicas, clearExistingRules, }, requestOptions) {
|
|
1542
1542
|
if (!indexName) {
|
|
1543
1543
|
throw new Error('Parameter `indexName` is required when calling `saveRules`.');
|
|
1544
1544
|
}
|
|
1545
|
-
if (!
|
|
1546
|
-
throw new Error('Parameter `
|
|
1545
|
+
if (!rules) {
|
|
1546
|
+
throw new Error('Parameter `rules` is required when calling `saveRules`.');
|
|
1547
1547
|
}
|
|
1548
1548
|
const requestPath = '/1/indexes/{indexName}/rules/batch'.replace('{indexName}', encodeURIComponent(indexName));
|
|
1549
1549
|
const headers = {};
|
|
@@ -1559,7 +1559,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1559
1559
|
path: requestPath,
|
|
1560
1560
|
queryParameters,
|
|
1561
1561
|
headers,
|
|
1562
|
-
data:
|
|
1562
|
+
data: rules,
|
|
1563
1563
|
};
|
|
1564
1564
|
return transporter.request(request, requestOptions);
|
|
1565
1565
|
},
|
|
@@ -767,7 +767,7 @@ function createXhrRequester() {
|
|
|
767
767
|
}
|
|
768
768
|
|
|
769
769
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
770
|
-
const apiClientVersion = '5.0.0-alpha.
|
|
770
|
+
const apiClientVersion = '5.0.0-alpha.5';
|
|
771
771
|
function getDefaultHosts(appId) {
|
|
772
772
|
return [
|
|
773
773
|
{
|
|
@@ -931,7 +931,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
931
931
|
* @param browseObjects - The browseObjects object.
|
|
932
932
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
933
933
|
* @param browseObjects.browseRequest - The `browse` method parameters.
|
|
934
|
-
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
|
|
934
|
+
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is no `cursor` in the response.
|
|
935
935
|
* @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`.
|
|
936
936
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `browse` method and merged with the transporter requestOptions.
|
|
937
937
|
*/
|
|
@@ -957,7 +957,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
957
957
|
* @param browseObjects - The browseObjects object.
|
|
958
958
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
959
959
|
* @param browseObjects.searchRulesParams - The `searchRules` method parameters.
|
|
960
|
-
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
|
|
960
|
+
* @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).
|
|
961
961
|
* @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`.
|
|
962
962
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchRules` method and merged with the transporter requestOptions.
|
|
963
963
|
*/
|
|
@@ -988,7 +988,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
988
988
|
* @summary Helper method that iterates on the `searchSynonyms` method.
|
|
989
989
|
* @param browseObjects - The browseObjects object.
|
|
990
990
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
991
|
-
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
|
|
991
|
+
* @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).
|
|
992
992
|
* @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`.
|
|
993
993
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchSynonyms` method and merged with the transporter requestOptions.
|
|
994
994
|
*/
|
|
@@ -2066,19 +2066,19 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2066
2066
|
* @param partialUpdateObject - The partialUpdateObject object.
|
|
2067
2067
|
* @param partialUpdateObject.indexName - The index in which to perform the request.
|
|
2068
2068
|
* @param partialUpdateObject.objectID - Unique identifier of an object.
|
|
2069
|
-
* @param partialUpdateObject.
|
|
2069
|
+
* @param partialUpdateObject.attributesToUpdate - Map of attribute(s) to update.
|
|
2070
2070
|
* @param partialUpdateObject.createIfNotExists - Creates the record if it does not exist yet.
|
|
2071
2071
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2072
2072
|
*/
|
|
2073
|
-
partialUpdateObject({ indexName, objectID,
|
|
2073
|
+
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists, }, requestOptions) {
|
|
2074
2074
|
if (!indexName) {
|
|
2075
2075
|
throw new Error('Parameter `indexName` is required when calling `partialUpdateObject`.');
|
|
2076
2076
|
}
|
|
2077
2077
|
if (!objectID) {
|
|
2078
2078
|
throw new Error('Parameter `objectID` is required when calling `partialUpdateObject`.');
|
|
2079
2079
|
}
|
|
2080
|
-
if (!
|
|
2081
|
-
throw new Error('Parameter `
|
|
2080
|
+
if (!attributesToUpdate) {
|
|
2081
|
+
throw new Error('Parameter `attributesToUpdate` is required when calling `partialUpdateObject`.');
|
|
2082
2082
|
}
|
|
2083
2083
|
const requestPath = '/1/indexes/{indexName}/{objectID}/partial'
|
|
2084
2084
|
.replace('{indexName}', encodeURIComponent(indexName))
|
|
@@ -2093,7 +2093,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2093
2093
|
path: requestPath,
|
|
2094
2094
|
queryParameters,
|
|
2095
2095
|
headers,
|
|
2096
|
-
data:
|
|
2096
|
+
data: attributesToUpdate,
|
|
2097
2097
|
};
|
|
2098
2098
|
return transporter.request(request, requestOptions);
|
|
2099
2099
|
},
|
|
@@ -2294,17 +2294,17 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2294
2294
|
* @summary Save a batch of rules.
|
|
2295
2295
|
* @param saveRules - The saveRules object.
|
|
2296
2296
|
* @param saveRules.indexName - The index in which to perform the request.
|
|
2297
|
-
* @param saveRules.
|
|
2297
|
+
* @param saveRules.rules - The rules object.
|
|
2298
2298
|
* @param saveRules.forwardToReplicas - When true, changes are also propagated to replicas of the given indexName.
|
|
2299
2299
|
* @param saveRules.clearExistingRules - When true, existing Rules are cleared before adding this batch. When false, existing Rules are kept.
|
|
2300
2300
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2301
2301
|
*/
|
|
2302
|
-
saveRules({ indexName,
|
|
2302
|
+
saveRules({ indexName, rules, forwardToReplicas, clearExistingRules, }, requestOptions) {
|
|
2303
2303
|
if (!indexName) {
|
|
2304
2304
|
throw new Error('Parameter `indexName` is required when calling `saveRules`.');
|
|
2305
2305
|
}
|
|
2306
|
-
if (!
|
|
2307
|
-
throw new Error('Parameter `
|
|
2306
|
+
if (!rules) {
|
|
2307
|
+
throw new Error('Parameter `rules` is required when calling `saveRules`.');
|
|
2308
2308
|
}
|
|
2309
2309
|
const requestPath = '/1/indexes/{indexName}/rules/batch'.replace('{indexName}', encodeURIComponent(indexName));
|
|
2310
2310
|
const headers = {};
|
|
@@ -2320,7 +2320,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2320
2320
|
path: requestPath,
|
|
2321
2321
|
queryParameters,
|
|
2322
2322
|
headers,
|
|
2323
|
-
data:
|
|
2323
|
+
data: rules,
|
|
2324
2324
|
};
|
|
2325
2325
|
return transporter.request(request, requestOptions);
|
|
2326
2326
|
},
|
|
@@ -2,7 +2,7 @@ import { createAuth, createTransporter, getAlgoliaAgent, createIterablePromise,
|
|
|
2
2
|
import { createHttpRequester } from '@algolia/requester-node-http';
|
|
3
3
|
|
|
4
4
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
5
|
-
const apiClientVersion = '5.0.0-alpha.
|
|
5
|
+
const apiClientVersion = '5.0.0-alpha.5';
|
|
6
6
|
function getDefaultHosts(appId) {
|
|
7
7
|
return [
|
|
8
8
|
{
|
|
@@ -166,7 +166,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
166
166
|
* @param browseObjects - The browseObjects object.
|
|
167
167
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
168
168
|
* @param browseObjects.browseRequest - The `browse` method parameters.
|
|
169
|
-
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
|
|
169
|
+
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is no `cursor` in the response.
|
|
170
170
|
* @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`.
|
|
171
171
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `browse` method and merged with the transporter requestOptions.
|
|
172
172
|
*/
|
|
@@ -192,7 +192,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
192
192
|
* @param browseObjects - The browseObjects object.
|
|
193
193
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
194
194
|
* @param browseObjects.searchRulesParams - The `searchRules` method parameters.
|
|
195
|
-
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
|
|
195
|
+
* @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).
|
|
196
196
|
* @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`.
|
|
197
197
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchRules` method and merged with the transporter requestOptions.
|
|
198
198
|
*/
|
|
@@ -223,7 +223,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
223
223
|
* @summary Helper method that iterates on the `searchSynonyms` method.
|
|
224
224
|
* @param browseObjects - The browseObjects object.
|
|
225
225
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
226
|
-
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
|
|
226
|
+
* @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).
|
|
227
227
|
* @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`.
|
|
228
228
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchSynonyms` method and merged with the transporter requestOptions.
|
|
229
229
|
*/
|
|
@@ -1301,19 +1301,19 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1301
1301
|
* @param partialUpdateObject - The partialUpdateObject object.
|
|
1302
1302
|
* @param partialUpdateObject.indexName - The index in which to perform the request.
|
|
1303
1303
|
* @param partialUpdateObject.objectID - Unique identifier of an object.
|
|
1304
|
-
* @param partialUpdateObject.
|
|
1304
|
+
* @param partialUpdateObject.attributesToUpdate - Map of attribute(s) to update.
|
|
1305
1305
|
* @param partialUpdateObject.createIfNotExists - Creates the record if it does not exist yet.
|
|
1306
1306
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1307
1307
|
*/
|
|
1308
|
-
partialUpdateObject({ indexName, objectID,
|
|
1308
|
+
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists, }, requestOptions) {
|
|
1309
1309
|
if (!indexName) {
|
|
1310
1310
|
throw new Error('Parameter `indexName` is required when calling `partialUpdateObject`.');
|
|
1311
1311
|
}
|
|
1312
1312
|
if (!objectID) {
|
|
1313
1313
|
throw new Error('Parameter `objectID` is required when calling `partialUpdateObject`.');
|
|
1314
1314
|
}
|
|
1315
|
-
if (!
|
|
1316
|
-
throw new Error('Parameter `
|
|
1315
|
+
if (!attributesToUpdate) {
|
|
1316
|
+
throw new Error('Parameter `attributesToUpdate` is required when calling `partialUpdateObject`.');
|
|
1317
1317
|
}
|
|
1318
1318
|
const requestPath = '/1/indexes/{indexName}/{objectID}/partial'
|
|
1319
1319
|
.replace('{indexName}', encodeURIComponent(indexName))
|
|
@@ -1328,7 +1328,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1328
1328
|
path: requestPath,
|
|
1329
1329
|
queryParameters,
|
|
1330
1330
|
headers,
|
|
1331
|
-
data:
|
|
1331
|
+
data: attributesToUpdate,
|
|
1332
1332
|
};
|
|
1333
1333
|
return transporter.request(request, requestOptions);
|
|
1334
1334
|
},
|
|
@@ -1529,17 +1529,17 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1529
1529
|
* @summary Save a batch of rules.
|
|
1530
1530
|
* @param saveRules - The saveRules object.
|
|
1531
1531
|
* @param saveRules.indexName - The index in which to perform the request.
|
|
1532
|
-
* @param saveRules.
|
|
1532
|
+
* @param saveRules.rules - The rules object.
|
|
1533
1533
|
* @param saveRules.forwardToReplicas - When true, changes are also propagated to replicas of the given indexName.
|
|
1534
1534
|
* @param saveRules.clearExistingRules - When true, existing Rules are cleared before adding this batch. When false, existing Rules are kept.
|
|
1535
1535
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1536
1536
|
*/
|
|
1537
|
-
saveRules({ indexName,
|
|
1537
|
+
saveRules({ indexName, rules, forwardToReplicas, clearExistingRules, }, requestOptions) {
|
|
1538
1538
|
if (!indexName) {
|
|
1539
1539
|
throw new Error('Parameter `indexName` is required when calling `saveRules`.');
|
|
1540
1540
|
}
|
|
1541
|
-
if (!
|
|
1542
|
-
throw new Error('Parameter `
|
|
1541
|
+
if (!rules) {
|
|
1542
|
+
throw new Error('Parameter `rules` is required when calling `saveRules`.');
|
|
1543
1543
|
}
|
|
1544
1544
|
const requestPath = '/1/indexes/{indexName}/rules/batch'.replace('{indexName}', encodeURIComponent(indexName));
|
|
1545
1545
|
const headers = {};
|
|
@@ -1555,7 +1555,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1555
1555
|
path: requestPath,
|
|
1556
1556
|
queryParameters,
|
|
1557
1557
|
headers,
|
|
1558
|
-
data:
|
|
1558
|
+
data: rules,
|
|
1559
1559
|
};
|
|
1560
1560
|
return transporter.request(request, requestOptions);
|
|
1561
1561
|
},
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! client-search.umd.js | 5.0.0-alpha.
|
|
2
|
-
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/client-search"]={})}(this,(function(e){"use strict";function r(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function t({func:e,validate:r,aggregator:t,error:a,timeout:n=(()=>0)}){const i=o=>new Promise(((s,c)=>{e(o).then((e=>(t&&t(e),r(e)?s(e):a&&a.validate(e)?c(new Error(a.message(e))):setTimeout((()=>{i(e).then(s).catch(c)}),n())))).catch((e=>{c(e)}))}));return i()}function a(e){let r;const t=`algolia-client-js-${e.key}`;function a(){return void 0===r&&(r=e.localStorage||window.localStorage),r}function n(){return JSON.parse(a().getItem(t)||"{}")}return{get:(e,r,t={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const t=JSON.stringify(e),a=n()[t];return Promise.all([a||r(),void 0!==a])})).then((([e,r])=>Promise.all([e,r||t.miss(e)]))).then((([e])=>e)),set:(e,r)=>Promise.resolve().then((()=>{const i=n();return i[JSON.stringify(e)]=r,a().setItem(t,JSON.stringify(i)),r})),delete:e=>Promise.resolve().then((()=>{const r=n();delete r[JSON.stringify(e)],a().setItem(t,JSON.stringify(r))})),clear:()=>Promise.resolve().then((()=>{a().removeItem(t)}))}}function n(e){const r=[...e.caches],t=r.shift();return void 0===t?{get:(e,r,t={miss:()=>Promise.resolve()})=>r().then((e=>Promise.all([e,t.miss(e)]))).then((([e])=>e)),set:(e,r)=>Promise.resolve(r),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,a,i={miss:()=>Promise.resolve()})=>t.get(e,a,i).catch((()=>n({caches:r}).get(e,a,i))),set:(e,a)=>t.set(e,a).catch((()=>n({caches:r}).set(e,a))),delete:e=>t.delete(e).catch((()=>n({caches:r}).delete(e))),clear:()=>t.clear().catch((()=>n({caches:r}).clear()))}}function i(e={serializable:!0}){let r={};return{get(t,a,n={miss:()=>Promise.resolve()}){const i=JSON.stringify(t);if(i in r)return Promise.resolve(e.serializable?JSON.parse(r[i]):r[i]);const o=a();return o.then((e=>n.miss(e))).then((()=>o))},set:(t,a)=>(r[JSON.stringify(t)]=e.serializable?JSON.stringify(a):a,Promise.resolve(a)),delete:e=>(delete r[JSON.stringify(e)],Promise.resolve()),clear:()=>(r={},Promise.resolve())}}const o=12e4;function s(e,r="up"){const t=Date.now();return{...e,status:r,lastUpdate:t,isUp:function(){return"up"===r||Date.now()-t>o},isTimedOut:function(){return"timed out"===r&&Date.now()-t<=o}}}function c(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class u extends Error{constructor(e,r){super(e),c(this,"name","AlgoliaError"),r&&(this.name=r)}}class d extends u{constructor(e,r,t){super(e,t),c(this,"stackTrace",void 0),this.stackTrace=r}}class l extends d{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class m extends d{constructor(e,r,t){super(e,t,"ApiError"),c(this,"status",void 0),this.status=r}}class h extends u{constructor(e,r){super(e,"DeserializationError"),c(this,"response",void 0),this.response=r}}function p(e,r,t){const a=function(e){const r=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((t=>`${t}=${r(e[t])?JSON.stringify(e[t]):e[t]}`)).join("&")}(t);let n=`${e.protocol}://${e.url}/${"/"===r.charAt(0)?r.substr(1):r}`;return a.length&&(n+=`?${a}`),n}function f(e){const r=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...r}}}}function g({hosts:e,hostsCache:r,baseHeaders:t,baseQueryParameters:a,algoliaAgent:n,timeouts:i,requester:o,requestsCache:c,responsesCache:u}){async function d(c,u,d=!0){const g=[],w=function(e,r){if("GET"===e.method||void 0===e.data&&void 0===r.data)return;const t=Array.isArray(e.data)?e.data:{...e.data,...r.data};return JSON.stringify(t)}(c,u),y=function(e,r,t){const a={Accept:"application/json",...e,...r,...t},n={};return Object.keys(a).forEach((e=>{const r=a[e];n[e.toLowerCase()]=r})),n}(t,c.headers,u.headers),P="GET"===c.method?{...c.data,...u.data}:{},q={"x-algolia-agent":n.value,...a,...c.queryParameters,...P};if(u&&u.queryParameters)for(const e of Object.keys(u.queryParameters))u.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(u.queryParameters[e])?q[e]=u.queryParameters[e].toString():q[e]=u.queryParameters[e];let v=0;const b=async(e,t)=>{const a=e.pop();if(void 0===a)throw new l(function(e){return e.map((e=>f(e)))}(g));let n=u.timeout;void 0===n&&(n=d?i.read:i.write);const P={data:w,headers:y,method:c.method,url:p(a,c.path,q),connectTimeout:t(v,i.connect),responseTimeout:t(v,n)},x=r=>{const t={request:P,response:r,host:a,triesLeft:e.length};return g.push(t),t},E=await o.send(P);if(function({isTimedOut:e,status:r}){return e||function({isTimedOut:e,status:r}){return!e&&0==~~r}({isTimedOut:e,status:r})||2!=~~(r/100)&&4!=~~(r/100)}(E)){const n=x(E);return E.isTimedOut&&v++,console.log("Retryable failure",f(n)),await r.set(a,s(a,E.isTimedOut?"timed out":"down")),b(e,t)}if(function({status:e}){return 2==~~(e/100)}(E))return function(e){try{return JSON.parse(e.content)}catch(r){throw new h(r.message,e)}}(E);throw x(E),function({content:e,status:r},t){let a=e;try{a=JSON.parse(e).message}catch(e){}return new m(a,r,t)}(E,g)},x=e.filter((e=>"readWrite"===e.accept||(d?"read"===e.accept:"write"===e.accept))),E=await async function(e){const t=await Promise.all(e.map((e=>r.get(e,(()=>Promise.resolve(s(e))))))),a=t.filter((e=>e.isUp())),n=t.filter((e=>e.isTimedOut())),i=[...a,...n];return{hosts:i.length>0?i:e,getTimeout:(e,r)=>(0===n.length&&0===e?1:n.length+3+e)*r}}(x);return b([...E.hosts].reverse(),E.getTimeout)}return{hostsCache:r,requester:o,timeouts:i,algoliaAgent:n,baseHeaders:t,baseQueryParameters:a,hosts:e,request:function(e,r={}){const n=e.useReadTransporter||"GET"===e.method;if(!n)return d(e,r,n);const i=()=>d(e,r);if(!0!==(r.cacheable||e.cacheable))return i();const o={request:e,requestOptions:r,transporter:{queryParameters:a,headers:t}};return u.get(o,(()=>c.get(o,(()=>c.set(o,i()).then((e=>Promise.all([c.delete(o),e])),(e=>Promise.all([c.delete(o),Promise.reject(e)]))).then((([e,r])=>r))))),{miss:e=>u.set(o,e)})},requestsCache:c,responsesCache:u}}function w({algoliaAgents:e,client:r,version:t}){const a=function(e){const r={value:`Algolia for JavaScript (${e})`,add(e){const t=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===r.value.indexOf(t)&&(r.value=`${r.value}${t}`),r}};return r}(t).add({segment:r,version:t});return e.forEach((e=>a.add(e))),a}function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function P(e,r){if(null==e)return{};var t,a,n=function(e,r){if(null==e)return{};var t,a,n={},i=Object.keys(e);for(a=0;a<i.length;a++)t=i[a],r.indexOf(t)>=0||(n[t]=e[t]);return n}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}var q=["appId","apiKey","authMode","algoliaAgents"],v=["indexName","browseRequest"],b=["indexName","searchRulesParams"],x=["indexName","validate","aggregator"],E=["params"];function I(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function N(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?I(Object(a),!0).forEach((function(t){r(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):I(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}var O="5.0.0-alpha.4";function S(e){return[{url:"".concat(e,"-dsn.algolia.net"),accept:"read",protocol:"https"},{url:"".concat(e,".algolia.net"),accept:"write",protocol:"https"}].concat(function(e){const r=e;for(let t=e.length-1;t>0;t--){const a=Math.floor(Math.random()*(t+1)),n=e[t];r[t]=e[a],r[a]=n}return r}([{url:"".concat(e,"-1.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-2.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-3.algolianet.com"),accept:"readWrite",protocol:"https"}]))}function T(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}e.apiClientVersion=O,e.searchClient=function(e,o,s){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!o||"string"!=typeof o)throw new Error("`apiKey` is missing.");return function(e){var r=e.appId,a=e.apiKey,n=e.authMode,i=e.algoliaAgents,o=P(e,q),s=function(e,r,t="WithinHeaders"){const a={"x-algolia-api-key":r,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===t?a:{},queryParameters:()=>"WithinQueryParameters"===t?a:{}}}(r,a,n),c=g(N(N({hosts:S(r)},o),{},{algoliaAgent:w({algoliaAgents:i,client:"Search",version:O}),baseHeaders:N(N({"content-type":"text/plain"},s.headers()),o.baseHeaders),baseQueryParameters:N(N({},s.queryParameters()),o.baseQueryParameters)}));return{transporter:c,appId:r,clearCache:function(){return Promise.all([c.requestsCache.clear(),c.responsesCache.clear()]).then((function(){}))},get _ua(){return c.algoliaAgent.value},addAlgoliaAgent:function(e,r){c.algoliaAgent.add({segment:e,version:r})},waitForTask:function(e,r){var a=this,n=e.indexName,i=e.taskID,o=e.maxRetries,s=void 0===o?50:o,c=e.timeout,u=void 0===c?function(e){return Math.min(200*e,5e3)}:c,d=0;return t({func:function(){return a.getTask({indexName:n,taskID:i},r)},validate:function(e){return"published"===e.status},aggregator:function(){return d+=1},error:{validate:function(){return d>=s},message:function(){return"The maximum number of retries exceeded. (".concat(d,"/").concat(s,")")}},timeout:function(){return u(d)}})},waitForApiKey:function(e,r){var a=this,n=e.operation,i=e.key,o=e.apiKey,s=e.maxRetries,c=void 0===s?50:s,u=e.timeout,d=void 0===u?function(e){return Math.min(200*e,5e3)}:u,l=0,m={aggregator:function(){return l+=1},error:{validate:function(){return l>=c},message:function(){return"The maximum number of retries exceeded. (".concat(l,"/").concat(c,")")}},timeout:function(){return d(l)}};if("update"===n){if(!o)throw new Error("`apiKey` is required when waiting for an `update` operation.");return t(N(N({},m),{},{func:function(){return a.getApiKey({key:i},r)},validate:function(e){for(var r=function(){var r=a[t];if(Array.isArray(o[r])){if(o[r].length!==e[r].length||o[r].some((function(t,a){return t!==e[r][a]})))return{v:!1}}else if(e[r]!==o[r])return{v:!1}},t=0,a=Object.keys(o);t<a.length;t++){var n=r();if("object"===y(n))return n.v}return!0}}))}return t(N(N({},m),{},{func:function(){return a.getApiKey({key:i},r).catch((function(e){return e}))},validate:function(e){return"add"===n?404!==e.status:404===e.status}}))},browseObjects:function(e,r){var a=this,n=e.indexName,i=e.browseRequest;return t(N({func:function(e){return a.browse({indexName:n,browseRequest:N({cursor:e?e.cursor:void 0},i)},r)},validate:function(e){return void 0===e.cursor}},P(e,v)))},browseRules:function(e,r){var a=this,n=e.indexName,i=e.searchRulesParams,o=P(e,b),s=N({hitsPerPage:1e3},i);return t(N({func:function(e){return a.searchRules({indexName:n,searchRulesParams:N(N({},s),{},{page:e?e.page+1:s.page||0})},r)},validate:function(e){return e.nbHits<s.hitsPerPage}},o))},browseSynonyms:function(e,r){var a=this,n=e.indexName;e.validate,e.aggregator;var i=P(e,x),o=N({hitsPerPage:1e3},i);return t(N({func:function(e){return a.searchSynonyms(N(N({},o),{},{indexName:n,page:e?e.page+1:i.page||0}),r)},validate:function(e){return e.nbHits<o.hitsPerPage}},i))},addApiKey:function(e,r){if(!e)throw new Error("Parameter `apiKey` is required when calling `addApiKey`.");if(!e.acl)throw new Error("Parameter `apiKey.acl` is required when calling `addApiKey`.");var t={method:"POST",path:"/1/keys",queryParameters:{},headers:{},data:e};return c.request(t,r)},addOrUpdateObject:function(e,r){var t=e.indexName,a=e.objectID,n=e.body;if(!t)throw new Error("Parameter `indexName` is required when calling `addOrUpdateObject`.");if(!a)throw new Error("Parameter `objectID` is required when calling `addOrUpdateObject`.");if(!n)throw new Error("Parameter `body` is required when calling `addOrUpdateObject`.");var i={method:"PUT",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),queryParameters:{},headers:{},data:n};return c.request(i,r)},appendSource:function(e,r){if(!e)throw new Error("Parameter `source` is required when calling `appendSource`.");var t={method:"POST",path:"/1/security/sources/append",queryParameters:{},headers:{},data:e};return c.request(t,r)},assignUserId:function(e,r){var t=e.xAlgoliaUserID,a=e.assignUserIdParams;if(!t)throw new Error("Parameter `xAlgoliaUserID` is required when calling `assignUserId`.");if(!a)throw new Error("Parameter `assignUserIdParams` is required when calling `assignUserId`.");if(!a.cluster)throw new Error("Parameter `assignUserIdParams.cluster` is required when calling `assignUserId`.");var n={};void 0!==t&&(n["X-Algolia-User-ID"]=t.toString());var i={method:"POST",path:"/1/clusters/mapping",queryParameters:{},headers:n,data:a};return c.request(i,r)},batch:function(e,r){var t=e.indexName,a=e.batchWriteParams;if(!t)throw new Error("Parameter `indexName` is required when calling `batch`.");if(!a)throw new Error("Parameter `batchWriteParams` is required when calling `batch`.");var n={method:"POST",path:"/1/indexes/{indexName}/batch".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a};return c.request(n,r)},batchAssignUserIds:function(e,r){var t=e.xAlgoliaUserID,a=e.batchAssignUserIdsParams;if(!t)throw new Error("Parameter `xAlgoliaUserID` is required when calling `batchAssignUserIds`.");if(!a)throw new Error("Parameter `batchAssignUserIdsParams` is required when calling `batchAssignUserIds`.");if(!a.cluster)throw new Error("Parameter `batchAssignUserIdsParams.cluster` is required when calling `batchAssignUserIds`.");if(!a.users)throw new Error("Parameter `batchAssignUserIdsParams.users` is required when calling `batchAssignUserIds`.");var n={};void 0!==t&&(n["X-Algolia-User-ID"]=t.toString());var i={method:"POST",path:"/1/clusters/mapping/batch",queryParameters:{},headers:n,data:a};return c.request(i,r)},batchDictionaryEntries:function(e,r){var t=e.dictionaryName,a=e.batchDictionaryEntriesParams;if(!t)throw new Error("Parameter `dictionaryName` is required when calling `batchDictionaryEntries`.");if(!a)throw new Error("Parameter `batchDictionaryEntriesParams` is required when calling `batchDictionaryEntries`.");if(!a.requests)throw new Error("Parameter `batchDictionaryEntriesParams.requests` is required when calling `batchDictionaryEntries`.");var n={method:"POST",path:"/1/dictionaries/{dictionaryName}/batch".replace("{dictionaryName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a};return c.request(n,r)},browse:function(e,r){var t=e.indexName,a=e.browseRequest;if(!t)throw new Error("Parameter `indexName` is required when calling `browse`.");var n={method:"POST",path:"/1/indexes/{indexName}/browse".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a||{}};return c.request(n,r)},clearAllSynonyms:function(e,r){var t=e.indexName,a=e.forwardToReplicas;if(!t)throw new Error("Parameter `indexName` is required when calling `clearAllSynonyms`.");var n="/1/indexes/{indexName}/synonyms/clear".replace("{indexName}",encodeURIComponent(t)),i={};void 0!==a&&(i.forwardToReplicas=a.toString());var o={method:"POST",path:n,queryParameters:i,headers:{}};return c.request(o,r)},clearObjects:function(e,r){var t=e.indexName;if(!t)throw new Error("Parameter `indexName` is required when calling `clearObjects`.");var a={method:"POST",path:"/1/indexes/{indexName}/clear".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{}};return c.request(a,r)},clearRules:function(e,r){var t=e.indexName,a=e.forwardToReplicas;if(!t)throw new Error("Parameter `indexName` is required when calling `clearRules`.");var n="/1/indexes/{indexName}/rules/clear".replace("{indexName}",encodeURIComponent(t)),i={};void 0!==a&&(i.forwardToReplicas=a.toString());var o={method:"POST",path:n,queryParameters:i,headers:{}};return c.request(o,r)},del:function(e,r){var t=e.path,a=e.parameters;if(!t)throw new Error("Parameter `path` is required when calling `del`.");var n={method:"DELETE",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{}};return c.request(n,r)},deleteApiKey:function(e,r){var t=e.key;if(!t)throw new Error("Parameter `key` is required when calling `deleteApiKey`.");var a={method:"DELETE",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(t)),queryParameters:{},headers:{}};return c.request(a,r)},deleteBy:function(e,r){var t=e.indexName,a=e.searchParams;if(!t)throw new Error("Parameter `indexName` is required when calling `deleteBy`.");if(!a)throw new Error("Parameter `searchParams` is required when calling `deleteBy`.");var n={method:"POST",path:"/1/indexes/{indexName}/deleteByQuery".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a};return c.request(n,r)},deleteIndex:function(e,r){var t=e.indexName;if(!t)throw new Error("Parameter `indexName` is required when calling `deleteIndex`.");var a={method:"DELETE",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{}};return c.request(a,r)},deleteObject:function(e,r){var t=e.indexName,a=e.objectID;if(!t)throw new Error("Parameter `indexName` is required when calling `deleteObject`.");if(!a)throw new Error("Parameter `objectID` is required when calling `deleteObject`.");var n={method:"DELETE",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),queryParameters:{},headers:{}};return c.request(n,r)},deleteRule:function(e,r){var t=e.indexName,a=e.objectID,n=e.forwardToReplicas;if(!t)throw new Error("Parameter `indexName` is required when calling `deleteRule`.");if(!a)throw new Error("Parameter `objectID` is required when calling `deleteRule`.");var i="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),o={};void 0!==n&&(o.forwardToReplicas=n.toString());var s={method:"DELETE",path:i,queryParameters:o,headers:{}};return c.request(s,r)},deleteSource:function(e,r){var t=e.source;if(!t)throw new Error("Parameter `source` is required when calling `deleteSource`.");var a={method:"DELETE",path:"/1/security/sources/{source}".replace("{source}",encodeURIComponent(t)),queryParameters:{},headers:{}};return c.request(a,r)},deleteSynonym:function(e,r){var t=e.indexName,a=e.objectID,n=e.forwardToReplicas;if(!t)throw new Error("Parameter `indexName` is required when calling `deleteSynonym`.");if(!a)throw new Error("Parameter `objectID` is required when calling `deleteSynonym`.");var i="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),o={};void 0!==n&&(o.forwardToReplicas=n.toString());var s={method:"DELETE",path:i,queryParameters:o,headers:{}};return c.request(s,r)},get:function(e,r){var t=e.path,a=e.parameters;if(!t)throw new Error("Parameter `path` is required when calling `get`.");var n={method:"GET",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{}};return c.request(n,r)},getApiKey:function(e,r){var t=e.key;if(!t)throw new Error("Parameter `key` is required when calling `getApiKey`.");var a={method:"GET",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(t)),queryParameters:{},headers:{}};return c.request(a,r)},getDictionaryLanguages:function(e){var r={method:"GET",path:"/1/dictionaries/*/languages",queryParameters:{},headers:{}};return c.request(r,e)},getDictionarySettings:function(e){var r={method:"GET",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{}};return c.request(r,e)},getLogs:function(e,r){var t=e.offset,a=e.length,n=e.indexName,i=e.type,o={};void 0!==t&&(o.offset=t.toString()),void 0!==a&&(o.length=a.toString()),void 0!==n&&(o.indexName=n.toString()),void 0!==i&&(o.type=i.toString());var s={method:"GET",path:"/1/logs",queryParameters:o,headers:{}};return c.request(s,r)},getObject:function(e,r){var t=e.indexName,a=e.objectID,n=e.attributesToRetrieve;if(!t)throw new Error("Parameter `indexName` is required when calling `getObject`.");if(!a)throw new Error("Parameter `objectID` is required when calling `getObject`.");var i="/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),o={};void 0!==n&&(o.attributesToRetrieve=n.toString());var s={method:"GET",path:i,queryParameters:o,headers:{}};return c.request(s,r)},getObjects:function(e,r){if(!e)throw new Error("Parameter `getObjectsParams` is required when calling `getObjects`.");if(!e.requests)throw new Error("Parameter `getObjectsParams.requests` is required when calling `getObjects`.");var t={method:"POST",path:"/1/indexes/*/objects",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return c.request(t,r)},getRule:function(e,r){var t=e.indexName,a=e.objectID;if(!t)throw new Error("Parameter `indexName` is required when calling `getRule`.");if(!a)throw new Error("Parameter `objectID` is required when calling `getRule`.");var n={method:"GET",path:"/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),queryParameters:{},headers:{}};return c.request(n,r)},getSettings:function(e,r){var t=e.indexName;if(!t)throw new Error("Parameter `indexName` is required when calling `getSettings`.");var a={method:"GET",path:"/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{}};return c.request(a,r)},getSources:function(e){var r={method:"GET",path:"/1/security/sources",queryParameters:{},headers:{}};return c.request(r,e)},getSynonym:function(e,r){var t=e.indexName,a=e.objectID;if(!t)throw new Error("Parameter `indexName` is required when calling `getSynonym`.");if(!a)throw new Error("Parameter `objectID` is required when calling `getSynonym`.");var n={method:"GET",path:"/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),queryParameters:{},headers:{}};return c.request(n,r)},getTask:function(e,r){var t=e.indexName,a=e.taskID;if(!t)throw new Error("Parameter `indexName` is required when calling `getTask`.");if(!a)throw new Error("Parameter `taskID` is required when calling `getTask`.");var n={method:"GET",path:"/1/indexes/{indexName}/task/{taskID}".replace("{indexName}",encodeURIComponent(t)).replace("{taskID}",encodeURIComponent(a)),queryParameters:{},headers:{}};return c.request(n,r)},getTopUserIds:function(e){var r={method:"GET",path:"/1/clusters/mapping/top",queryParameters:{},headers:{}};return c.request(r,e)},getUserId:function(e,r){var t=e.userID;if(!t)throw new Error("Parameter `userID` is required when calling `getUserId`.");var a={method:"GET",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(t)),queryParameters:{},headers:{}};return c.request(a,r)},hasPendingMappings:function(e,r){var t=e.getClusters,a={};void 0!==t&&(a.getClusters=t.toString());var n={method:"GET",path:"/1/clusters/mapping/pending",queryParameters:a,headers:{}};return c.request(n,r)},listApiKeys:function(e){var r={method:"GET",path:"/1/keys",queryParameters:{},headers:{}};return c.request(r,e)},listClusters:function(e){var r={method:"GET",path:"/1/clusters",queryParameters:{},headers:{}};return c.request(r,e)},listIndices:function(e,r){var t=e.page,a={};void 0!==t&&(a.page=t.toString());var n={method:"GET",path:"/1/indexes",queryParameters:a,headers:{}};return c.request(n,r)},listUserIds:function(e,r){var t=e.page,a=e.hitsPerPage,n={};void 0!==t&&(n.page=t.toString()),void 0!==a&&(n.hitsPerPage=a.toString());var i={method:"GET",path:"/1/clusters/mapping",queryParameters:n,headers:{}};return c.request(i,r)},multipleBatch:function(e,r){if(!e)throw new Error("Parameter `batchParams` is required when calling `multipleBatch`.");if(!e.requests)throw new Error("Parameter `batchParams.requests` is required when calling `multipleBatch`.");var t={method:"POST",path:"/1/indexes/*/batch",queryParameters:{},headers:{},data:e};return c.request(t,r)},operationIndex:function(e,r){var t=e.indexName,a=e.operationIndexParams;if(!t)throw new Error("Parameter `indexName` is required when calling `operationIndex`.");if(!a)throw new Error("Parameter `operationIndexParams` is required when calling `operationIndex`.");if(!a.operation)throw new Error("Parameter `operationIndexParams.operation` is required when calling `operationIndex`.");if(!a.destination)throw new Error("Parameter `operationIndexParams.destination` is required when calling `operationIndex`.");var n={method:"POST",path:"/1/indexes/{indexName}/operation".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a};return c.request(n,r)},partialUpdateObject:function(e,r){var t=e.indexName,a=e.objectID,n=e.attributeToUpdate,i=e.createIfNotExists;if(!t)throw new Error("Parameter `indexName` is required when calling `partialUpdateObject`.");if(!a)throw new Error("Parameter `objectID` is required when calling `partialUpdateObject`.");if(!n)throw new Error("Parameter `attributeToUpdate` is required when calling `partialUpdateObject`.");var o="/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),s={};void 0!==i&&(s.createIfNotExists=i.toString());var u={method:"POST",path:o,queryParameters:s,headers:{},data:n};return c.request(u,r)},post:function(e,r){var t=e.path,a=e.parameters,n=e.body;if(!t)throw new Error("Parameter `path` is required when calling `post`.");var i={method:"POST",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{},data:n||{}};return c.request(i,r)},put:function(e,r){var t=e.path,a=e.parameters,n=e.body;if(!t)throw new Error("Parameter `path` is required when calling `put`.");var i={method:"PUT",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{},data:n||{}};return c.request(i,r)},removeUserId:function(e,r){var t=e.userID;if(!t)throw new Error("Parameter `userID` is required when calling `removeUserId`.");var a={method:"DELETE",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(t)),queryParameters:{},headers:{}};return c.request(a,r)},replaceSources:function(e,r){var t=e.source;if(!t)throw new Error("Parameter `source` is required when calling `replaceSources`.");var a={method:"PUT",path:"/1/security/sources",queryParameters:{},headers:{},data:t};return c.request(a,r)},restoreApiKey:function(e,r){var t=e.key;if(!t)throw new Error("Parameter `key` is required when calling `restoreApiKey`.");var a={method:"POST",path:"/1/keys/{key}/restore".replace("{key}",encodeURIComponent(t)),queryParameters:{},headers:{}};return c.request(a,r)},saveObject:function(e,r){var t=e.indexName,a=e.body;if(!t)throw new Error("Parameter `indexName` is required when calling `saveObject`.");if(!a)throw new Error("Parameter `body` is required when calling `saveObject`.");var n={method:"POST",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a};return c.request(n,r)},saveRule:function(e,r){var t=e.indexName,a=e.objectID,n=e.rule,i=e.forwardToReplicas;if(!t)throw new Error("Parameter `indexName` is required when calling `saveRule`.");if(!a)throw new Error("Parameter `objectID` is required when calling `saveRule`.");if(!n)throw new Error("Parameter `rule` is required when calling `saveRule`.");if(!n.objectID)throw new Error("Parameter `rule.objectID` is required when calling `saveRule`.");var o="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),s={};void 0!==i&&(s.forwardToReplicas=i.toString());var u={method:"PUT",path:o,queryParameters:s,headers:{},data:n};return c.request(u,r)},saveRules:function(e,r){var t=e.indexName,a=e.rule,n=e.forwardToReplicas,i=e.clearExistingRules;if(!t)throw new Error("Parameter `indexName` is required when calling `saveRules`.");if(!a)throw new Error("Parameter `rule` is required when calling `saveRules`.");var o="/1/indexes/{indexName}/rules/batch".replace("{indexName}",encodeURIComponent(t)),s={};void 0!==n&&(s.forwardToReplicas=n.toString()),void 0!==i&&(s.clearExistingRules=i.toString());var u={method:"POST",path:o,queryParameters:s,headers:{},data:a};return c.request(u,r)},saveSynonym:function(e,r){var t=e.indexName,a=e.objectID,n=e.synonymHit,i=e.forwardToReplicas;if(!t)throw new Error("Parameter `indexName` is required when calling `saveSynonym`.");if(!a)throw new Error("Parameter `objectID` is required when calling `saveSynonym`.");if(!n)throw new Error("Parameter `synonymHit` is required when calling `saveSynonym`.");if(!n.objectID)throw new Error("Parameter `synonymHit.objectID` is required when calling `saveSynonym`.");var o="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),s={};void 0!==i&&(s.forwardToReplicas=i.toString());var u={method:"PUT",path:o,queryParameters:s,headers:{},data:n};return c.request(u,r)},saveSynonyms:function(e,r){var t=e.indexName,a=e.synonymHit,n=e.forwardToReplicas,i=e.replaceExistingSynonyms;if(!t)throw new Error("Parameter `indexName` is required when calling `saveSynonyms`.");if(!a)throw new Error("Parameter `synonymHit` is required when calling `saveSynonyms`.");var o="/1/indexes/{indexName}/synonyms/batch".replace("{indexName}",encodeURIComponent(t)),s={};void 0!==n&&(s.forwardToReplicas=n.toString()),void 0!==i&&(s.replaceExistingSynonyms=i.toString());var u={method:"POST",path:o,queryParameters:s,headers:{},data:a};return c.request(u,r)},search:function(e,r){if(e&&Array.isArray(e)){var t={requests:e.map((function(e){var r=e.params,t=P(e,E);return"facet"===t.type?N(N(N({},t),r),{},{type:"facet"}):N(N(N({},t),r),{},{facet:void 0,maxFacetHits:void 0,facetQuery:void 0})}))};e=t}if(!e)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!e.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");var a={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return c.request(a,r)},searchDictionaryEntries:function(e,r){var t=e.dictionaryName,a=e.searchDictionaryEntriesParams;if(!t)throw new Error("Parameter `dictionaryName` is required when calling `searchDictionaryEntries`.");if(!a)throw new Error("Parameter `searchDictionaryEntriesParams` is required when calling `searchDictionaryEntries`.");if(!a.query)throw new Error("Parameter `searchDictionaryEntriesParams.query` is required when calling `searchDictionaryEntries`.");var n={method:"POST",path:"/1/dictionaries/{dictionaryName}/search".replace("{dictionaryName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a,useReadTransporter:!0,cacheable:!0};return c.request(n,r)},searchForFacetValues:function(e,r){var t=e.indexName,a=e.facetName,n=e.searchForFacetValuesRequest;if(!t)throw new Error("Parameter `indexName` is required when calling `searchForFacetValues`.");if(!a)throw new Error("Parameter `facetName` is required when calling `searchForFacetValues`.");var i={method:"POST",path:"/1/indexes/{indexName}/facets/{facetName}/query".replace("{indexName}",encodeURIComponent(t)).replace("{facetName}",encodeURIComponent(a)),queryParameters:{},headers:{},data:n||{},useReadTransporter:!0,cacheable:!0};return c.request(i,r)},searchRules:function(e,r){var t=e.indexName,a=e.searchRulesParams;if(!t)throw new Error("Parameter `indexName` is required when calling `searchRules`.");var n={method:"POST",path:"/1/indexes/{indexName}/rules/search".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a||{},useReadTransporter:!0,cacheable:!0};return c.request(n,r)},searchSingleIndex:function(e,r){var t=e.indexName,a=e.searchParams;if(!t)throw new Error("Parameter `indexName` is required when calling `searchSingleIndex`.");var n={method:"POST",path:"/1/indexes/{indexName}/query".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a||{},useReadTransporter:!0,cacheable:!0};return c.request(n,r)},searchSynonyms:function(e,r){var t=e.indexName,a=e.type,n=e.page,i=e.hitsPerPage,o=e.searchSynonymsParams;if(!t)throw new Error("Parameter `indexName` is required when calling `searchSynonyms`.");var s="/1/indexes/{indexName}/synonyms/search".replace("{indexName}",encodeURIComponent(t)),u={};void 0!==a&&(u.type=a.toString()),void 0!==n&&(u.page=n.toString()),void 0!==i&&(u.hitsPerPage=i.toString());var d={method:"POST",path:s,queryParameters:u,headers:{},data:o||{},useReadTransporter:!0,cacheable:!0};return c.request(d,r)},searchUserIds:function(e,r){if(!e)throw new Error("Parameter `searchUserIdsParams` is required when calling `searchUserIds`.");if(!e.query)throw new Error("Parameter `searchUserIdsParams.query` is required when calling `searchUserIds`.");var t={method:"POST",path:"/1/clusters/mapping/search",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return c.request(t,r)},setDictionarySettings:function(e,r){if(!e)throw new Error("Parameter `dictionarySettingsParams` is required when calling `setDictionarySettings`.");if(!e.disableStandardEntries)throw new Error("Parameter `dictionarySettingsParams.disableStandardEntries` is required when calling `setDictionarySettings`.");var t={method:"PUT",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{},data:e};return c.request(t,r)},setSettings:function(e,r){var t=e.indexName,a=e.indexSettings,n=e.forwardToReplicas;if(!t)throw new Error("Parameter `indexName` is required when calling `setSettings`.");if(!a)throw new Error("Parameter `indexSettings` is required when calling `setSettings`.");var i="/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(t)),o={};void 0!==n&&(o.forwardToReplicas=n.toString());var s={method:"PUT",path:i,queryParameters:o,headers:{},data:a};return c.request(s,r)},updateApiKey:function(e,r){var t=e.key,a=e.apiKey;if(!t)throw new Error("Parameter `key` is required when calling `updateApiKey`.");if(!a)throw new Error("Parameter `apiKey` is required when calling `updateApiKey`.");if(!a.acl)throw new Error("Parameter `apiKey.acl` is required when calling `updateApiKey`.");var n={method:"PUT",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a};return c.request(n,r)}}}(function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?T(Object(a),!0).forEach((function(t){r(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):T(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}({appId:e,apiKey:o,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((r=>{const t=new XMLHttpRequest;t.open(e.method,e.url,!0),Object.keys(e.headers).forEach((r=>t.setRequestHeader(r,e.headers[r])));const a=(e,a)=>setTimeout((()=>{t.abort(),r({status:0,content:a,isTimedOut:!0})}),e),n=a(e.connectTimeout,"Connection timeout");let i;t.onreadystatechange=()=>{t.readyState>t.OPENED&&void 0===i&&(clearTimeout(n),i=a(e.responseTimeout,"Socket timeout"))},t.onerror=()=>{0===t.status&&(clearTimeout(n),clearTimeout(i),r({content:t.responseText||"Network request failed",status:t.status,isTimedOut:!1}))},t.onload=()=>{clearTimeout(n),clearTimeout(i),r({content:t.responseText,status:t.status,isTimedOut:!1})},t.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:i(),requestsCache:i({serializable:!1}),hostsCache:n({caches:[a({key:"".concat(O,"-").concat(e)}),i()]})},s))}}));
|
|
1
|
+
/*! client-search.umd.js | 5.0.0-alpha.5 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
|
|
2
|
+
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/client-search"]={})}(this,(function(e){"use strict";function r(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function t({func:e,validate:r,aggregator:t,error:a,timeout:n=(()=>0)}){const i=o=>new Promise(((s,c)=>{e(o).then((e=>(t&&t(e),r(e)?s(e):a&&a.validate(e)?c(new Error(a.message(e))):setTimeout((()=>{i(e).then(s).catch(c)}),n())))).catch((e=>{c(e)}))}));return i()}function a(e){let r;const t=`algolia-client-js-${e.key}`;function a(){return void 0===r&&(r=e.localStorage||window.localStorage),r}function n(){return JSON.parse(a().getItem(t)||"{}")}return{get:(e,r,t={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const t=JSON.stringify(e),a=n()[t];return Promise.all([a||r(),void 0!==a])})).then((([e,r])=>Promise.all([e,r||t.miss(e)]))).then((([e])=>e)),set:(e,r)=>Promise.resolve().then((()=>{const i=n();return i[JSON.stringify(e)]=r,a().setItem(t,JSON.stringify(i)),r})),delete:e=>Promise.resolve().then((()=>{const r=n();delete r[JSON.stringify(e)],a().setItem(t,JSON.stringify(r))})),clear:()=>Promise.resolve().then((()=>{a().removeItem(t)}))}}function n(e){const r=[...e.caches],t=r.shift();return void 0===t?{get:(e,r,t={miss:()=>Promise.resolve()})=>r().then((e=>Promise.all([e,t.miss(e)]))).then((([e])=>e)),set:(e,r)=>Promise.resolve(r),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,a,i={miss:()=>Promise.resolve()})=>t.get(e,a,i).catch((()=>n({caches:r}).get(e,a,i))),set:(e,a)=>t.set(e,a).catch((()=>n({caches:r}).set(e,a))),delete:e=>t.delete(e).catch((()=>n({caches:r}).delete(e))),clear:()=>t.clear().catch((()=>n({caches:r}).clear()))}}function i(e={serializable:!0}){let r={};return{get(t,a,n={miss:()=>Promise.resolve()}){const i=JSON.stringify(t);if(i in r)return Promise.resolve(e.serializable?JSON.parse(r[i]):r[i]);const o=a();return o.then((e=>n.miss(e))).then((()=>o))},set:(t,a)=>(r[JSON.stringify(t)]=e.serializable?JSON.stringify(a):a,Promise.resolve(a)),delete:e=>(delete r[JSON.stringify(e)],Promise.resolve()),clear:()=>(r={},Promise.resolve())}}const o=12e4;function s(e,r="up"){const t=Date.now();return{...e,status:r,lastUpdate:t,isUp:function(){return"up"===r||Date.now()-t>o},isTimedOut:function(){return"timed out"===r&&Date.now()-t<=o}}}function c(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class u extends Error{constructor(e,r){super(e),c(this,"name","AlgoliaError"),r&&(this.name=r)}}class d extends u{constructor(e,r,t){super(e,t),c(this,"stackTrace",void 0),this.stackTrace=r}}class l extends d{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class m extends d{constructor(e,r,t){super(e,t,"ApiError"),c(this,"status",void 0),this.status=r}}class h extends u{constructor(e,r){super(e,"DeserializationError"),c(this,"response",void 0),this.response=r}}function p(e,r,t){const a=function(e){const r=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((t=>`${t}=${r(e[t])?JSON.stringify(e[t]):e[t]}`)).join("&")}(t);let n=`${e.protocol}://${e.url}/${"/"===r.charAt(0)?r.substr(1):r}`;return a.length&&(n+=`?${a}`),n}function f(e){const r=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...r}}}}function g({hosts:e,hostsCache:r,baseHeaders:t,baseQueryParameters:a,algoliaAgent:n,timeouts:i,requester:o,requestsCache:c,responsesCache:u}){async function d(c,u,d=!0){const g=[],w=function(e,r){if("GET"===e.method||void 0===e.data&&void 0===r.data)return;const t=Array.isArray(e.data)?e.data:{...e.data,...r.data};return JSON.stringify(t)}(c,u),y=function(e,r,t){const a={Accept:"application/json",...e,...r,...t},n={};return Object.keys(a).forEach((e=>{const r=a[e];n[e.toLowerCase()]=r})),n}(t,c.headers,u.headers),P="GET"===c.method?{...c.data,...u.data}:{},q={"x-algolia-agent":n.value,...a,...c.queryParameters,...P};if(u&&u.queryParameters)for(const e of Object.keys(u.queryParameters))u.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(u.queryParameters[e])?q[e]=u.queryParameters[e].toString():q[e]=u.queryParameters[e];let v=0;const b=async(e,t)=>{const a=e.pop();if(void 0===a)throw new l(function(e){return e.map((e=>f(e)))}(g));let n=u.timeout;void 0===n&&(n=d?i.read:i.write);const P={data:w,headers:y,method:c.method,url:p(a,c.path,q),connectTimeout:t(v,i.connect),responseTimeout:t(v,n)},x=r=>{const t={request:P,response:r,host:a,triesLeft:e.length};return g.push(t),t},E=await o.send(P);if(function({isTimedOut:e,status:r}){return e||function({isTimedOut:e,status:r}){return!e&&0==~~r}({isTimedOut:e,status:r})||2!=~~(r/100)&&4!=~~(r/100)}(E)){const n=x(E);return E.isTimedOut&&v++,console.log("Retryable failure",f(n)),await r.set(a,s(a,E.isTimedOut?"timed out":"down")),b(e,t)}if(function({status:e}){return 2==~~(e/100)}(E))return function(e){try{return JSON.parse(e.content)}catch(r){throw new h(r.message,e)}}(E);throw x(E),function({content:e,status:r},t){let a=e;try{a=JSON.parse(e).message}catch(e){}return new m(a,r,t)}(E,g)},x=e.filter((e=>"readWrite"===e.accept||(d?"read"===e.accept:"write"===e.accept))),E=await async function(e){const t=await Promise.all(e.map((e=>r.get(e,(()=>Promise.resolve(s(e))))))),a=t.filter((e=>e.isUp())),n=t.filter((e=>e.isTimedOut())),i=[...a,...n];return{hosts:i.length>0?i:e,getTimeout:(e,r)=>(0===n.length&&0===e?1:n.length+3+e)*r}}(x);return b([...E.hosts].reverse(),E.getTimeout)}return{hostsCache:r,requester:o,timeouts:i,algoliaAgent:n,baseHeaders:t,baseQueryParameters:a,hosts:e,request:function(e,r={}){const n=e.useReadTransporter||"GET"===e.method;if(!n)return d(e,r,n);const i=()=>d(e,r);if(!0!==(r.cacheable||e.cacheable))return i();const o={request:e,requestOptions:r,transporter:{queryParameters:a,headers:t}};return u.get(o,(()=>c.get(o,(()=>c.set(o,i()).then((e=>Promise.all([c.delete(o),e])),(e=>Promise.all([c.delete(o),Promise.reject(e)]))).then((([e,r])=>r))))),{miss:e=>u.set(o,e)})},requestsCache:c,responsesCache:u}}function w({algoliaAgents:e,client:r,version:t}){const a=function(e){const r={value:`Algolia for JavaScript (${e})`,add(e){const t=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===r.value.indexOf(t)&&(r.value=`${r.value}${t}`),r}};return r}(t).add({segment:r,version:t});return e.forEach((e=>a.add(e))),a}function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function P(e,r){if(null==e)return{};var t,a,n=function(e,r){if(null==e)return{};var t,a,n={},i=Object.keys(e);for(a=0;a<i.length;a++)t=i[a],r.indexOf(t)>=0||(n[t]=e[t]);return n}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}var q=["appId","apiKey","authMode","algoliaAgents"],v=["indexName","browseRequest"],b=["indexName","searchRulesParams"],x=["indexName","validate","aggregator"],E=["params"];function I(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function N(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?I(Object(a),!0).forEach((function(t){r(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):I(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}var O="5.0.0-alpha.5";function S(e){return[{url:"".concat(e,"-dsn.algolia.net"),accept:"read",protocol:"https"},{url:"".concat(e,".algolia.net"),accept:"write",protocol:"https"}].concat(function(e){const r=e;for(let t=e.length-1;t>0;t--){const a=Math.floor(Math.random()*(t+1)),n=e[t];r[t]=e[a],r[a]=n}return r}([{url:"".concat(e,"-1.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-2.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-3.algolianet.com"),accept:"readWrite",protocol:"https"}]))}function T(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}e.apiClientVersion=O,e.searchClient=function(e,o,s){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!o||"string"!=typeof o)throw new Error("`apiKey` is missing.");return function(e){var r=e.appId,a=e.apiKey,n=e.authMode,i=e.algoliaAgents,o=P(e,q),s=function(e,r,t="WithinHeaders"){const a={"x-algolia-api-key":r,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===t?a:{},queryParameters:()=>"WithinQueryParameters"===t?a:{}}}(r,a,n),c=g(N(N({hosts:S(r)},o),{},{algoliaAgent:w({algoliaAgents:i,client:"Search",version:O}),baseHeaders:N(N({"content-type":"text/plain"},s.headers()),o.baseHeaders),baseQueryParameters:N(N({},s.queryParameters()),o.baseQueryParameters)}));return{transporter:c,appId:r,clearCache:function(){return Promise.all([c.requestsCache.clear(),c.responsesCache.clear()]).then((function(){}))},get _ua(){return c.algoliaAgent.value},addAlgoliaAgent:function(e,r){c.algoliaAgent.add({segment:e,version:r})},waitForTask:function(e,r){var a=this,n=e.indexName,i=e.taskID,o=e.maxRetries,s=void 0===o?50:o,c=e.timeout,u=void 0===c?function(e){return Math.min(200*e,5e3)}:c,d=0;return t({func:function(){return a.getTask({indexName:n,taskID:i},r)},validate:function(e){return"published"===e.status},aggregator:function(){return d+=1},error:{validate:function(){return d>=s},message:function(){return"The maximum number of retries exceeded. (".concat(d,"/").concat(s,")")}},timeout:function(){return u(d)}})},waitForApiKey:function(e,r){var a=this,n=e.operation,i=e.key,o=e.apiKey,s=e.maxRetries,c=void 0===s?50:s,u=e.timeout,d=void 0===u?function(e){return Math.min(200*e,5e3)}:u,l=0,m={aggregator:function(){return l+=1},error:{validate:function(){return l>=c},message:function(){return"The maximum number of retries exceeded. (".concat(l,"/").concat(c,")")}},timeout:function(){return d(l)}};if("update"===n){if(!o)throw new Error("`apiKey` is required when waiting for an `update` operation.");return t(N(N({},m),{},{func:function(){return a.getApiKey({key:i},r)},validate:function(e){for(var r=function(){var r=a[t];if(Array.isArray(o[r])){if(o[r].length!==e[r].length||o[r].some((function(t,a){return t!==e[r][a]})))return{v:!1}}else if(e[r]!==o[r])return{v:!1}},t=0,a=Object.keys(o);t<a.length;t++){var n=r();if("object"===y(n))return n.v}return!0}}))}return t(N(N({},m),{},{func:function(){return a.getApiKey({key:i},r).catch((function(e){return e}))},validate:function(e){return"add"===n?404!==e.status:404===e.status}}))},browseObjects:function(e,r){var a=this,n=e.indexName,i=e.browseRequest;return t(N({func:function(e){return a.browse({indexName:n,browseRequest:N({cursor:e?e.cursor:void 0},i)},r)},validate:function(e){return void 0===e.cursor}},P(e,v)))},browseRules:function(e,r){var a=this,n=e.indexName,i=e.searchRulesParams,o=P(e,b),s=N({hitsPerPage:1e3},i);return t(N({func:function(e){return a.searchRules({indexName:n,searchRulesParams:N(N({},s),{},{page:e?e.page+1:s.page||0})},r)},validate:function(e){return e.nbHits<s.hitsPerPage}},o))},browseSynonyms:function(e,r){var a=this,n=e.indexName;e.validate,e.aggregator;var i=P(e,x),o=N({hitsPerPage:1e3},i);return t(N({func:function(e){return a.searchSynonyms(N(N({},o),{},{indexName:n,page:e?e.page+1:i.page||0}),r)},validate:function(e){return e.nbHits<o.hitsPerPage}},i))},addApiKey:function(e,r){if(!e)throw new Error("Parameter `apiKey` is required when calling `addApiKey`.");if(!e.acl)throw new Error("Parameter `apiKey.acl` is required when calling `addApiKey`.");var t={method:"POST",path:"/1/keys",queryParameters:{},headers:{},data:e};return c.request(t,r)},addOrUpdateObject:function(e,r){var t=e.indexName,a=e.objectID,n=e.body;if(!t)throw new Error("Parameter `indexName` is required when calling `addOrUpdateObject`.");if(!a)throw new Error("Parameter `objectID` is required when calling `addOrUpdateObject`.");if(!n)throw new Error("Parameter `body` is required when calling `addOrUpdateObject`.");var i={method:"PUT",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),queryParameters:{},headers:{},data:n};return c.request(i,r)},appendSource:function(e,r){if(!e)throw new Error("Parameter `source` is required when calling `appendSource`.");var t={method:"POST",path:"/1/security/sources/append",queryParameters:{},headers:{},data:e};return c.request(t,r)},assignUserId:function(e,r){var t=e.xAlgoliaUserID,a=e.assignUserIdParams;if(!t)throw new Error("Parameter `xAlgoliaUserID` is required when calling `assignUserId`.");if(!a)throw new Error("Parameter `assignUserIdParams` is required when calling `assignUserId`.");if(!a.cluster)throw new Error("Parameter `assignUserIdParams.cluster` is required when calling `assignUserId`.");var n={};void 0!==t&&(n["X-Algolia-User-ID"]=t.toString());var i={method:"POST",path:"/1/clusters/mapping",queryParameters:{},headers:n,data:a};return c.request(i,r)},batch:function(e,r){var t=e.indexName,a=e.batchWriteParams;if(!t)throw new Error("Parameter `indexName` is required when calling `batch`.");if(!a)throw new Error("Parameter `batchWriteParams` is required when calling `batch`.");var n={method:"POST",path:"/1/indexes/{indexName}/batch".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a};return c.request(n,r)},batchAssignUserIds:function(e,r){var t=e.xAlgoliaUserID,a=e.batchAssignUserIdsParams;if(!t)throw new Error("Parameter `xAlgoliaUserID` is required when calling `batchAssignUserIds`.");if(!a)throw new Error("Parameter `batchAssignUserIdsParams` is required when calling `batchAssignUserIds`.");if(!a.cluster)throw new Error("Parameter `batchAssignUserIdsParams.cluster` is required when calling `batchAssignUserIds`.");if(!a.users)throw new Error("Parameter `batchAssignUserIdsParams.users` is required when calling `batchAssignUserIds`.");var n={};void 0!==t&&(n["X-Algolia-User-ID"]=t.toString());var i={method:"POST",path:"/1/clusters/mapping/batch",queryParameters:{},headers:n,data:a};return c.request(i,r)},batchDictionaryEntries:function(e,r){var t=e.dictionaryName,a=e.batchDictionaryEntriesParams;if(!t)throw new Error("Parameter `dictionaryName` is required when calling `batchDictionaryEntries`.");if(!a)throw new Error("Parameter `batchDictionaryEntriesParams` is required when calling `batchDictionaryEntries`.");if(!a.requests)throw new Error("Parameter `batchDictionaryEntriesParams.requests` is required when calling `batchDictionaryEntries`.");var n={method:"POST",path:"/1/dictionaries/{dictionaryName}/batch".replace("{dictionaryName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a};return c.request(n,r)},browse:function(e,r){var t=e.indexName,a=e.browseRequest;if(!t)throw new Error("Parameter `indexName` is required when calling `browse`.");var n={method:"POST",path:"/1/indexes/{indexName}/browse".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a||{}};return c.request(n,r)},clearAllSynonyms:function(e,r){var t=e.indexName,a=e.forwardToReplicas;if(!t)throw new Error("Parameter `indexName` is required when calling `clearAllSynonyms`.");var n="/1/indexes/{indexName}/synonyms/clear".replace("{indexName}",encodeURIComponent(t)),i={};void 0!==a&&(i.forwardToReplicas=a.toString());var o={method:"POST",path:n,queryParameters:i,headers:{}};return c.request(o,r)},clearObjects:function(e,r){var t=e.indexName;if(!t)throw new Error("Parameter `indexName` is required when calling `clearObjects`.");var a={method:"POST",path:"/1/indexes/{indexName}/clear".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{}};return c.request(a,r)},clearRules:function(e,r){var t=e.indexName,a=e.forwardToReplicas;if(!t)throw new Error("Parameter `indexName` is required when calling `clearRules`.");var n="/1/indexes/{indexName}/rules/clear".replace("{indexName}",encodeURIComponent(t)),i={};void 0!==a&&(i.forwardToReplicas=a.toString());var o={method:"POST",path:n,queryParameters:i,headers:{}};return c.request(o,r)},del:function(e,r){var t=e.path,a=e.parameters;if(!t)throw new Error("Parameter `path` is required when calling `del`.");var n={method:"DELETE",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{}};return c.request(n,r)},deleteApiKey:function(e,r){var t=e.key;if(!t)throw new Error("Parameter `key` is required when calling `deleteApiKey`.");var a={method:"DELETE",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(t)),queryParameters:{},headers:{}};return c.request(a,r)},deleteBy:function(e,r){var t=e.indexName,a=e.searchParams;if(!t)throw new Error("Parameter `indexName` is required when calling `deleteBy`.");if(!a)throw new Error("Parameter `searchParams` is required when calling `deleteBy`.");var n={method:"POST",path:"/1/indexes/{indexName}/deleteByQuery".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a};return c.request(n,r)},deleteIndex:function(e,r){var t=e.indexName;if(!t)throw new Error("Parameter `indexName` is required when calling `deleteIndex`.");var a={method:"DELETE",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{}};return c.request(a,r)},deleteObject:function(e,r){var t=e.indexName,a=e.objectID;if(!t)throw new Error("Parameter `indexName` is required when calling `deleteObject`.");if(!a)throw new Error("Parameter `objectID` is required when calling `deleteObject`.");var n={method:"DELETE",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),queryParameters:{},headers:{}};return c.request(n,r)},deleteRule:function(e,r){var t=e.indexName,a=e.objectID,n=e.forwardToReplicas;if(!t)throw new Error("Parameter `indexName` is required when calling `deleteRule`.");if(!a)throw new Error("Parameter `objectID` is required when calling `deleteRule`.");var i="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),o={};void 0!==n&&(o.forwardToReplicas=n.toString());var s={method:"DELETE",path:i,queryParameters:o,headers:{}};return c.request(s,r)},deleteSource:function(e,r){var t=e.source;if(!t)throw new Error("Parameter `source` is required when calling `deleteSource`.");var a={method:"DELETE",path:"/1/security/sources/{source}".replace("{source}",encodeURIComponent(t)),queryParameters:{},headers:{}};return c.request(a,r)},deleteSynonym:function(e,r){var t=e.indexName,a=e.objectID,n=e.forwardToReplicas;if(!t)throw new Error("Parameter `indexName` is required when calling `deleteSynonym`.");if(!a)throw new Error("Parameter `objectID` is required when calling `deleteSynonym`.");var i="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),o={};void 0!==n&&(o.forwardToReplicas=n.toString());var s={method:"DELETE",path:i,queryParameters:o,headers:{}};return c.request(s,r)},get:function(e,r){var t=e.path,a=e.parameters;if(!t)throw new Error("Parameter `path` is required when calling `get`.");var n={method:"GET",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{}};return c.request(n,r)},getApiKey:function(e,r){var t=e.key;if(!t)throw new Error("Parameter `key` is required when calling `getApiKey`.");var a={method:"GET",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(t)),queryParameters:{},headers:{}};return c.request(a,r)},getDictionaryLanguages:function(e){var r={method:"GET",path:"/1/dictionaries/*/languages",queryParameters:{},headers:{}};return c.request(r,e)},getDictionarySettings:function(e){var r={method:"GET",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{}};return c.request(r,e)},getLogs:function(e,r){var t=e.offset,a=e.length,n=e.indexName,i=e.type,o={};void 0!==t&&(o.offset=t.toString()),void 0!==a&&(o.length=a.toString()),void 0!==n&&(o.indexName=n.toString()),void 0!==i&&(o.type=i.toString());var s={method:"GET",path:"/1/logs",queryParameters:o,headers:{}};return c.request(s,r)},getObject:function(e,r){var t=e.indexName,a=e.objectID,n=e.attributesToRetrieve;if(!t)throw new Error("Parameter `indexName` is required when calling `getObject`.");if(!a)throw new Error("Parameter `objectID` is required when calling `getObject`.");var i="/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),o={};void 0!==n&&(o.attributesToRetrieve=n.toString());var s={method:"GET",path:i,queryParameters:o,headers:{}};return c.request(s,r)},getObjects:function(e,r){if(!e)throw new Error("Parameter `getObjectsParams` is required when calling `getObjects`.");if(!e.requests)throw new Error("Parameter `getObjectsParams.requests` is required when calling `getObjects`.");var t={method:"POST",path:"/1/indexes/*/objects",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return c.request(t,r)},getRule:function(e,r){var t=e.indexName,a=e.objectID;if(!t)throw new Error("Parameter `indexName` is required when calling `getRule`.");if(!a)throw new Error("Parameter `objectID` is required when calling `getRule`.");var n={method:"GET",path:"/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),queryParameters:{},headers:{}};return c.request(n,r)},getSettings:function(e,r){var t=e.indexName;if(!t)throw new Error("Parameter `indexName` is required when calling `getSettings`.");var a={method:"GET",path:"/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{}};return c.request(a,r)},getSources:function(e){var r={method:"GET",path:"/1/security/sources",queryParameters:{},headers:{}};return c.request(r,e)},getSynonym:function(e,r){var t=e.indexName,a=e.objectID;if(!t)throw new Error("Parameter `indexName` is required when calling `getSynonym`.");if(!a)throw new Error("Parameter `objectID` is required when calling `getSynonym`.");var n={method:"GET",path:"/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),queryParameters:{},headers:{}};return c.request(n,r)},getTask:function(e,r){var t=e.indexName,a=e.taskID;if(!t)throw new Error("Parameter `indexName` is required when calling `getTask`.");if(!a)throw new Error("Parameter `taskID` is required when calling `getTask`.");var n={method:"GET",path:"/1/indexes/{indexName}/task/{taskID}".replace("{indexName}",encodeURIComponent(t)).replace("{taskID}",encodeURIComponent(a)),queryParameters:{},headers:{}};return c.request(n,r)},getTopUserIds:function(e){var r={method:"GET",path:"/1/clusters/mapping/top",queryParameters:{},headers:{}};return c.request(r,e)},getUserId:function(e,r){var t=e.userID;if(!t)throw new Error("Parameter `userID` is required when calling `getUserId`.");var a={method:"GET",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(t)),queryParameters:{},headers:{}};return c.request(a,r)},hasPendingMappings:function(e,r){var t=e.getClusters,a={};void 0!==t&&(a.getClusters=t.toString());var n={method:"GET",path:"/1/clusters/mapping/pending",queryParameters:a,headers:{}};return c.request(n,r)},listApiKeys:function(e){var r={method:"GET",path:"/1/keys",queryParameters:{},headers:{}};return c.request(r,e)},listClusters:function(e){var r={method:"GET",path:"/1/clusters",queryParameters:{},headers:{}};return c.request(r,e)},listIndices:function(e,r){var t=e.page,a={};void 0!==t&&(a.page=t.toString());var n={method:"GET",path:"/1/indexes",queryParameters:a,headers:{}};return c.request(n,r)},listUserIds:function(e,r){var t=e.page,a=e.hitsPerPage,n={};void 0!==t&&(n.page=t.toString()),void 0!==a&&(n.hitsPerPage=a.toString());var i={method:"GET",path:"/1/clusters/mapping",queryParameters:n,headers:{}};return c.request(i,r)},multipleBatch:function(e,r){if(!e)throw new Error("Parameter `batchParams` is required when calling `multipleBatch`.");if(!e.requests)throw new Error("Parameter `batchParams.requests` is required when calling `multipleBatch`.");var t={method:"POST",path:"/1/indexes/*/batch",queryParameters:{},headers:{},data:e};return c.request(t,r)},operationIndex:function(e,r){var t=e.indexName,a=e.operationIndexParams;if(!t)throw new Error("Parameter `indexName` is required when calling `operationIndex`.");if(!a)throw new Error("Parameter `operationIndexParams` is required when calling `operationIndex`.");if(!a.operation)throw new Error("Parameter `operationIndexParams.operation` is required when calling `operationIndex`.");if(!a.destination)throw new Error("Parameter `operationIndexParams.destination` is required when calling `operationIndex`.");var n={method:"POST",path:"/1/indexes/{indexName}/operation".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a};return c.request(n,r)},partialUpdateObject:function(e,r){var t=e.indexName,a=e.objectID,n=e.attributesToUpdate,i=e.createIfNotExists;if(!t)throw new Error("Parameter `indexName` is required when calling `partialUpdateObject`.");if(!a)throw new Error("Parameter `objectID` is required when calling `partialUpdateObject`.");if(!n)throw new Error("Parameter `attributesToUpdate` is required when calling `partialUpdateObject`.");var o="/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),s={};void 0!==i&&(s.createIfNotExists=i.toString());var u={method:"POST",path:o,queryParameters:s,headers:{},data:n};return c.request(u,r)},post:function(e,r){var t=e.path,a=e.parameters,n=e.body;if(!t)throw new Error("Parameter `path` is required when calling `post`.");var i={method:"POST",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{},data:n||{}};return c.request(i,r)},put:function(e,r){var t=e.path,a=e.parameters,n=e.body;if(!t)throw new Error("Parameter `path` is required when calling `put`.");var i={method:"PUT",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{},data:n||{}};return c.request(i,r)},removeUserId:function(e,r){var t=e.userID;if(!t)throw new Error("Parameter `userID` is required when calling `removeUserId`.");var a={method:"DELETE",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(t)),queryParameters:{},headers:{}};return c.request(a,r)},replaceSources:function(e,r){var t=e.source;if(!t)throw new Error("Parameter `source` is required when calling `replaceSources`.");var a={method:"PUT",path:"/1/security/sources",queryParameters:{},headers:{},data:t};return c.request(a,r)},restoreApiKey:function(e,r){var t=e.key;if(!t)throw new Error("Parameter `key` is required when calling `restoreApiKey`.");var a={method:"POST",path:"/1/keys/{key}/restore".replace("{key}",encodeURIComponent(t)),queryParameters:{},headers:{}};return c.request(a,r)},saveObject:function(e,r){var t=e.indexName,a=e.body;if(!t)throw new Error("Parameter `indexName` is required when calling `saveObject`.");if(!a)throw new Error("Parameter `body` is required when calling `saveObject`.");var n={method:"POST",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a};return c.request(n,r)},saveRule:function(e,r){var t=e.indexName,a=e.objectID,n=e.rule,i=e.forwardToReplicas;if(!t)throw new Error("Parameter `indexName` is required when calling `saveRule`.");if(!a)throw new Error("Parameter `objectID` is required when calling `saveRule`.");if(!n)throw new Error("Parameter `rule` is required when calling `saveRule`.");if(!n.objectID)throw new Error("Parameter `rule.objectID` is required when calling `saveRule`.");var o="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),s={};void 0!==i&&(s.forwardToReplicas=i.toString());var u={method:"PUT",path:o,queryParameters:s,headers:{},data:n};return c.request(u,r)},saveRules:function(e,r){var t=e.indexName,a=e.rules,n=e.forwardToReplicas,i=e.clearExistingRules;if(!t)throw new Error("Parameter `indexName` is required when calling `saveRules`.");if(!a)throw new Error("Parameter `rules` is required when calling `saveRules`.");var o="/1/indexes/{indexName}/rules/batch".replace("{indexName}",encodeURIComponent(t)),s={};void 0!==n&&(s.forwardToReplicas=n.toString()),void 0!==i&&(s.clearExistingRules=i.toString());var u={method:"POST",path:o,queryParameters:s,headers:{},data:a};return c.request(u,r)},saveSynonym:function(e,r){var t=e.indexName,a=e.objectID,n=e.synonymHit,i=e.forwardToReplicas;if(!t)throw new Error("Parameter `indexName` is required when calling `saveSynonym`.");if(!a)throw new Error("Parameter `objectID` is required when calling `saveSynonym`.");if(!n)throw new Error("Parameter `synonymHit` is required when calling `saveSynonym`.");if(!n.objectID)throw new Error("Parameter `synonymHit.objectID` is required when calling `saveSynonym`.");var o="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),s={};void 0!==i&&(s.forwardToReplicas=i.toString());var u={method:"PUT",path:o,queryParameters:s,headers:{},data:n};return c.request(u,r)},saveSynonyms:function(e,r){var t=e.indexName,a=e.synonymHit,n=e.forwardToReplicas,i=e.replaceExistingSynonyms;if(!t)throw new Error("Parameter `indexName` is required when calling `saveSynonyms`.");if(!a)throw new Error("Parameter `synonymHit` is required when calling `saveSynonyms`.");var o="/1/indexes/{indexName}/synonyms/batch".replace("{indexName}",encodeURIComponent(t)),s={};void 0!==n&&(s.forwardToReplicas=n.toString()),void 0!==i&&(s.replaceExistingSynonyms=i.toString());var u={method:"POST",path:o,queryParameters:s,headers:{},data:a};return c.request(u,r)},search:function(e,r){if(e&&Array.isArray(e)){var t={requests:e.map((function(e){var r=e.params,t=P(e,E);return"facet"===t.type?N(N(N({},t),r),{},{type:"facet"}):N(N(N({},t),r),{},{facet:void 0,maxFacetHits:void 0,facetQuery:void 0})}))};e=t}if(!e)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!e.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");var a={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return c.request(a,r)},searchDictionaryEntries:function(e,r){var t=e.dictionaryName,a=e.searchDictionaryEntriesParams;if(!t)throw new Error("Parameter `dictionaryName` is required when calling `searchDictionaryEntries`.");if(!a)throw new Error("Parameter `searchDictionaryEntriesParams` is required when calling `searchDictionaryEntries`.");if(!a.query)throw new Error("Parameter `searchDictionaryEntriesParams.query` is required when calling `searchDictionaryEntries`.");var n={method:"POST",path:"/1/dictionaries/{dictionaryName}/search".replace("{dictionaryName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a,useReadTransporter:!0,cacheable:!0};return c.request(n,r)},searchForFacetValues:function(e,r){var t=e.indexName,a=e.facetName,n=e.searchForFacetValuesRequest;if(!t)throw new Error("Parameter `indexName` is required when calling `searchForFacetValues`.");if(!a)throw new Error("Parameter `facetName` is required when calling `searchForFacetValues`.");var i={method:"POST",path:"/1/indexes/{indexName}/facets/{facetName}/query".replace("{indexName}",encodeURIComponent(t)).replace("{facetName}",encodeURIComponent(a)),queryParameters:{},headers:{},data:n||{},useReadTransporter:!0,cacheable:!0};return c.request(i,r)},searchRules:function(e,r){var t=e.indexName,a=e.searchRulesParams;if(!t)throw new Error("Parameter `indexName` is required when calling `searchRules`.");var n={method:"POST",path:"/1/indexes/{indexName}/rules/search".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a||{},useReadTransporter:!0,cacheable:!0};return c.request(n,r)},searchSingleIndex:function(e,r){var t=e.indexName,a=e.searchParams;if(!t)throw new Error("Parameter `indexName` is required when calling `searchSingleIndex`.");var n={method:"POST",path:"/1/indexes/{indexName}/query".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a||{},useReadTransporter:!0,cacheable:!0};return c.request(n,r)},searchSynonyms:function(e,r){var t=e.indexName,a=e.type,n=e.page,i=e.hitsPerPage,o=e.searchSynonymsParams;if(!t)throw new Error("Parameter `indexName` is required when calling `searchSynonyms`.");var s="/1/indexes/{indexName}/synonyms/search".replace("{indexName}",encodeURIComponent(t)),u={};void 0!==a&&(u.type=a.toString()),void 0!==n&&(u.page=n.toString()),void 0!==i&&(u.hitsPerPage=i.toString());var d={method:"POST",path:s,queryParameters:u,headers:{},data:o||{},useReadTransporter:!0,cacheable:!0};return c.request(d,r)},searchUserIds:function(e,r){if(!e)throw new Error("Parameter `searchUserIdsParams` is required when calling `searchUserIds`.");if(!e.query)throw new Error("Parameter `searchUserIdsParams.query` is required when calling `searchUserIds`.");var t={method:"POST",path:"/1/clusters/mapping/search",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return c.request(t,r)},setDictionarySettings:function(e,r){if(!e)throw new Error("Parameter `dictionarySettingsParams` is required when calling `setDictionarySettings`.");if(!e.disableStandardEntries)throw new Error("Parameter `dictionarySettingsParams.disableStandardEntries` is required when calling `setDictionarySettings`.");var t={method:"PUT",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{},data:e};return c.request(t,r)},setSettings:function(e,r){var t=e.indexName,a=e.indexSettings,n=e.forwardToReplicas;if(!t)throw new Error("Parameter `indexName` is required when calling `setSettings`.");if(!a)throw new Error("Parameter `indexSettings` is required when calling `setSettings`.");var i="/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(t)),o={};void 0!==n&&(o.forwardToReplicas=n.toString());var s={method:"PUT",path:i,queryParameters:o,headers:{},data:a};return c.request(s,r)},updateApiKey:function(e,r){var t=e.key,a=e.apiKey;if(!t)throw new Error("Parameter `key` is required when calling `updateApiKey`.");if(!a)throw new Error("Parameter `apiKey` is required when calling `updateApiKey`.");if(!a.acl)throw new Error("Parameter `apiKey.acl` is required when calling `updateApiKey`.");var n={method:"PUT",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a};return c.request(n,r)}}}(function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?T(Object(a),!0).forEach((function(t){r(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):T(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}({appId:e,apiKey:o,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((r=>{const t=new XMLHttpRequest;t.open(e.method,e.url,!0),Object.keys(e.headers).forEach((r=>t.setRequestHeader(r,e.headers[r])));const a=(e,a)=>setTimeout((()=>{t.abort(),r({status:0,content:a,isTimedOut:!0})}),e),n=a(e.connectTimeout,"Connection timeout");let i;t.onreadystatechange=()=>{t.readyState>t.OPENED&&void 0===i&&(clearTimeout(n),i=a(e.responseTimeout,"Socket timeout"))},t.onerror=()=>{0===t.status&&(clearTimeout(n),clearTimeout(i),r({content:t.responseText||"Network request failed",status:t.status,isTimedOut:!1}))},t.onload=()=>{clearTimeout(n),clearTimeout(i),r({content:t.responseText,status:t.status,isTimedOut:!1})},t.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:i(),requestsCache:i({serializable:!1}),hostsCache:n({caches:[a({key:"".concat(O,"-").concat(e)}),i()]})},s))}}));
|
|
@@ -7,8 +7,6 @@ import type { BatchDictionaryEntriesParams } from './batchDictionaryEntriesParam
|
|
|
7
7
|
import type { BatchWriteParams } from './batchWriteParams';
|
|
8
8
|
import type { BrowseRequest } from './browseRequest';
|
|
9
9
|
import type { DictionaryType } from './dictionaryType';
|
|
10
|
-
import type { GetApiKeyResponse } from './getApiKeyResponse';
|
|
11
|
-
import type { GetTaskResponse } from './getTaskResponse';
|
|
12
10
|
import type { IndexSettings } from './indexSettings';
|
|
13
11
|
import type { LogType } from './logType';
|
|
14
12
|
import type { OperationIndexParams } from './operationIndexParams';
|
|
@@ -394,9 +392,9 @@ export declare type PartialUpdateObjectProps = {
|
|
|
394
392
|
*/
|
|
395
393
|
objectID: string;
|
|
396
394
|
/**
|
|
397
|
-
*
|
|
395
|
+
* Map of attribute(s) to update.
|
|
398
396
|
*/
|
|
399
|
-
|
|
397
|
+
attributesToUpdate: Record<string, AttributeToUpdate>;
|
|
400
398
|
/**
|
|
401
399
|
* Creates the record if it does not exist yet.
|
|
402
400
|
*/
|
|
@@ -502,7 +500,7 @@ export declare type SaveRulesProps = {
|
|
|
502
500
|
* The index in which to perform the request.
|
|
503
501
|
*/
|
|
504
502
|
indexName: string;
|
|
505
|
-
|
|
503
|
+
rules: Rule[];
|
|
506
504
|
/**
|
|
507
505
|
* When true, changes are also propagated to replicas of the given indexName.
|
|
508
506
|
*/
|
|
@@ -672,7 +670,7 @@ export declare type UpdateApiKeyProps = {
|
|
|
672
670
|
* The `browseObjects`, `browseRules`, `browseSynonyms` options.
|
|
673
671
|
*/
|
|
674
672
|
export declare type BrowseOptions<T> = Partial<Pick<CreateIterablePromise<T>, 'validate'>> & Required<Pick<CreateIterablePromise<T>, 'aggregator'>>;
|
|
675
|
-
declare type WaitForOptions
|
|
673
|
+
declare type WaitForOptions = Partial<{
|
|
676
674
|
/**
|
|
677
675
|
* The maximum number of retries. 50 by default.
|
|
678
676
|
*/
|
|
@@ -681,8 +679,8 @@ declare type WaitForOptions<T> = Omit<CreateIterablePromise<T>, 'func' | 'timeou
|
|
|
681
679
|
* The function to decide how long to wait between retries.
|
|
682
680
|
*/
|
|
683
681
|
timeout: (retryCount: number) => number;
|
|
684
|
-
}
|
|
685
|
-
export declare type WaitForTaskOptions = WaitForOptions
|
|
682
|
+
}>;
|
|
683
|
+
export declare type WaitForTaskOptions = WaitForOptions & {
|
|
686
684
|
/**
|
|
687
685
|
* The `indexName` where the operation was performed.
|
|
688
686
|
*/
|
|
@@ -692,7 +690,7 @@ export declare type WaitForTaskOptions = WaitForOptions<GetTaskResponse> & {
|
|
|
692
690
|
*/
|
|
693
691
|
taskID: number;
|
|
694
692
|
};
|
|
695
|
-
export declare type WaitForApiKeyOptions = WaitForOptions
|
|
693
|
+
export declare type WaitForApiKeyOptions = WaitForOptions & {
|
|
696
694
|
/**
|
|
697
695
|
* The API Key.
|
|
698
696
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientMethodProps.d.ts","sourceRoot":"","sources":["../../../../packages/client-search/model/clientMethodProps.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAEpE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AACnF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"clientMethodProps.d.ts","sourceRoot":"","sources":["../../../../packages/client-search/model/clientMethodProps.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAEpE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AACnF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kB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EG;AACH,oBAAY,aAAa,CAAC,CAAC,IAAI,OAAO,CACpC,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAC3C,GACC,QAAQ,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC;AAEzD,aAAK,cAAc,GAAG,OAAO,CAAC;IAC5B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,OAAO,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,CAAC;CACzC,CAAC,CAAC;AAEH,oBAAY,kBAAkB,GAAG,cAAc,GAAG;IAChD;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,oBAAY,oBAAoB,GAAG,cAAc,GAAG;IAClD;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb,GAAG,CACE;IACE;;OAEG;IACH,SAAS,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC5B,MAAM,CAAC,EAAE,KAAK,CAAC;CAChB,GACD;IACE;;OAEG;IACH,SAAS,EAAE,QAAQ,CAAC;IACpB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;CACzB,CACJ,CAAC"}
|
|
@@ -45,7 +45,7 @@ import type { UpdatedAtResponse } from '../model/updatedAtResponse';
|
|
|
45
45
|
import type { UpdatedAtWithObjectIdResponse } from '../model/updatedAtWithObjectIdResponse';
|
|
46
46
|
import type { UpdatedRuleResponse } from '../model/updatedRuleResponse';
|
|
47
47
|
import type { UserId } from '../model/userId';
|
|
48
|
-
export declare const apiClientVersion = "5.0.0-alpha.
|
|
48
|
+
export declare const apiClientVersion = "5.0.0-alpha.5";
|
|
49
49
|
export declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
|
|
50
50
|
transporter: import("@algolia/client-common").Transporter;
|
|
51
51
|
/**
|
|
@@ -99,7 +99,7 @@ export declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyO
|
|
|
99
99
|
* @param browseObjects - The browseObjects object.
|
|
100
100
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
101
101
|
* @param browseObjects.browseRequest - The `browse` method parameters.
|
|
102
|
-
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
|
|
102
|
+
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is no `cursor` in the response.
|
|
103
103
|
* @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`.
|
|
104
104
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `browse` method and merged with the transporter requestOptions.
|
|
105
105
|
*/
|
|
@@ -111,7 +111,7 @@ export declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyO
|
|
|
111
111
|
* @param browseObjects - The browseObjects object.
|
|
112
112
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
113
113
|
* @param browseObjects.searchRulesParams - The `searchRules` method parameters.
|
|
114
|
-
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
|
|
114
|
+
* @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).
|
|
115
115
|
* @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`.
|
|
116
116
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchRules` method and merged with the transporter requestOptions.
|
|
117
117
|
*/
|
|
@@ -122,7 +122,7 @@ export declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyO
|
|
|
122
122
|
* @summary Helper method that iterates on the `searchSynonyms` method.
|
|
123
123
|
* @param browseObjects - The browseObjects object.
|
|
124
124
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
125
|
-
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
|
|
125
|
+
* @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).
|
|
126
126
|
* @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`.
|
|
127
127
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchSynonyms` method and merged with the transporter requestOptions.
|
|
128
128
|
*/
|
|
@@ -505,11 +505,11 @@ export declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyO
|
|
|
505
505
|
* @param partialUpdateObject - The partialUpdateObject object.
|
|
506
506
|
* @param partialUpdateObject.indexName - The index in which to perform the request.
|
|
507
507
|
* @param partialUpdateObject.objectID - Unique identifier of an object.
|
|
508
|
-
* @param partialUpdateObject.
|
|
508
|
+
* @param partialUpdateObject.attributesToUpdate - Map of attribute(s) to update.
|
|
509
509
|
* @param partialUpdateObject.createIfNotExists - Creates the record if it does not exist yet.
|
|
510
510
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
511
511
|
*/
|
|
512
|
-
partialUpdateObject({ indexName, objectID,
|
|
512
|
+
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists, }: PartialUpdateObjectProps, requestOptions?: RequestOptions): Promise<UpdatedAtWithObjectIdResponse>;
|
|
513
513
|
/**
|
|
514
514
|
* This method allow you to send requests to the Algolia REST API.
|
|
515
515
|
*
|
|
@@ -587,12 +587,12 @@ export declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyO
|
|
|
587
587
|
* @summary Save a batch of rules.
|
|
588
588
|
* @param saveRules - The saveRules object.
|
|
589
589
|
* @param saveRules.indexName - The index in which to perform the request.
|
|
590
|
-
* @param saveRules.
|
|
590
|
+
* @param saveRules.rules - The rules object.
|
|
591
591
|
* @param saveRules.forwardToReplicas - When true, changes are also propagated to replicas of the given indexName.
|
|
592
592
|
* @param saveRules.clearExistingRules - When true, existing Rules are cleared before adding this batch. When false, existing Rules are kept.
|
|
593
593
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
594
594
|
*/
|
|
595
|
-
saveRules({ indexName,
|
|
595
|
+
saveRules({ indexName, rules, forwardToReplicas, clearExistingRules, }: SaveRulesProps, requestOptions?: RequestOptions): Promise<UpdatedAtResponse>;
|
|
596
596
|
/**
|
|
597
597
|
* Create a new synonym object or update the existing synonym object with the given object ID.
|
|
598
598
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchClient.d.ts","sourceRoot":"","sources":["../../../../packages/client-search/src/searchClient.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,mBAAmB,EAInB,cAAc,EAEd,QAAQ,EAET,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EACV,aAAa,EACb,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,UAAU,EACV,uBAAuB,EACvB,2BAA2B,EAC3B,WAAW,EACX,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,QAAQ,EACR,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,cAAc,EACd,uBAAuB,EACvB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,wBAAwB,EACxB,SAAS,EACT,QAAQ,EACR,iBAAiB,EACjB,mBAAmB,EACn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AQG;uCAEsB,gBAAgB,mBACtB,cAAc,GAC9B,QAAQ,mBAAmB,CAAC;IAuB/B;;;;;;OAMG;+BAEY,WAAW,mBACP,cAAc,GAC9B,QAAQ,qBAAqB,CAAC;IA4BjC;;;;;;;;OAQG;wDAEoC,mBAAmB,mBACvC,cAAc,GAC9B,QAAQ,iBAAiB,CAAC;IA0C7B;;;;;;;;;;OAUG;
|
|
1
|
+
{"version":3,"file":"searchClient.d.ts","sourceRoot":"","sources":["../../../../packages/client-search/src/searchClient.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,mBAAmB,EAInB,cAAc,EAEd,QAAQ,EAET,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EACV,aAAa,EACb,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,UAAU,EACV,uBAAuB,EACvB,2BAA2B,EAC3B,WAAW,EACX,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,QAAQ,EACR,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,cAAc,EACd,uBAAuB,EACvB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,wBAAwB,EACxB,SAAS,EACT,QAAQ,EACR,iBAAiB,EACjB,mBAAmB,EACnB,kBAA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gFAKE,4BAA4B,mBACd,cAAc,GAC9B,QAAQ,iBAAiB,CAAC;IAuC7B;;;;;;;;;OASG;iFAME,yBAAyB,mBACX,cAAc,GAC9B,QAAQ,4BAA4B,CAAC;IAgCxC;;;;;;;;OAQG;kDAEiC,gBAAgB,mBACjC,cAAc,GAC9B,QAAQ,mBAAmB,CAAC;IA2B/B;;;;;;;;OAQG;wDAE4B,sBAAsB,mBAClC,cAAc;IA4BjC;;;;;;;;;;;OAWG;kFAQE,mBAAmB,mBACL,cAAc,GAC9B,QAAQ,sBAAsB,CAAC;IAuClC;;;;;;OAMG;uCAEoB,mBAAmB,mBACvB,cAAc,GAC9B,QAAQ,qBAAqB,CAAC;IA8BjC;;;;;;OAMG;oDAEyB,wBAAwB,mBACjC,cAAc,GAC9B,QAAQ,iBAAiB,CAAC;IA4B7B;;;;;;;;;OASG;iEAEgD,gBAAgB,mBAChD,cAAc,GAC9B,QAAQ,iBAAiB,CAAC;IAmC7B;;;;;;;;OAQG;kCAEgB,iBAAiB,mBACjB,cAAc,GAC9B,QAAQ,oBAAoB,CAAC;EAqCnC;AAED;;GAEG;AACH,oBAAY,YAAY,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -10,8 +10,6 @@ import type { BatchDictionaryEntriesParams } from './batchDictionaryEntriesParam
|
|
|
10
10
|
import type { BatchWriteParams } from './batchWriteParams';
|
|
11
11
|
import type { BrowseRequest } from './browseRequest';
|
|
12
12
|
import type { DictionaryType } from './dictionaryType';
|
|
13
|
-
import type { GetApiKeyResponse } from './getApiKeyResponse';
|
|
14
|
-
import type { GetTaskResponse } from './getTaskResponse';
|
|
15
13
|
import type { IndexSettings } from './indexSettings';
|
|
16
14
|
import type { LogType } from './logType';
|
|
17
15
|
import type { OperationIndexParams } from './operationIndexParams';
|
|
@@ -428,9 +426,9 @@ export type PartialUpdateObjectProps = {
|
|
|
428
426
|
*/
|
|
429
427
|
objectID: string;
|
|
430
428
|
/**
|
|
431
|
-
*
|
|
429
|
+
* Map of attribute(s) to update.
|
|
432
430
|
*/
|
|
433
|
-
|
|
431
|
+
attributesToUpdate: Record<string, AttributeToUpdate>;
|
|
434
432
|
/**
|
|
435
433
|
* Creates the record if it does not exist yet.
|
|
436
434
|
*/
|
|
@@ -544,7 +542,7 @@ export type SaveRulesProps = {
|
|
|
544
542
|
* The index in which to perform the request.
|
|
545
543
|
*/
|
|
546
544
|
indexName: string;
|
|
547
|
-
|
|
545
|
+
rules: Rule[];
|
|
548
546
|
/**
|
|
549
547
|
* When true, changes are also propagated to replicas of the given indexName.
|
|
550
548
|
*/
|
|
@@ -733,10 +731,7 @@ export type BrowseOptions<T> = Partial<
|
|
|
733
731
|
> &
|
|
734
732
|
Required<Pick<CreateIterablePromise<T>, 'aggregator'>>;
|
|
735
733
|
|
|
736
|
-
type WaitForOptions
|
|
737
|
-
CreateIterablePromise<T>,
|
|
738
|
-
'func' | 'timeout' | 'validate'
|
|
739
|
-
> & {
|
|
734
|
+
type WaitForOptions = Partial<{
|
|
740
735
|
/**
|
|
741
736
|
* The maximum number of retries. 50 by default.
|
|
742
737
|
*/
|
|
@@ -746,9 +741,9 @@ type WaitForOptions<T> = Omit<
|
|
|
746
741
|
* The function to decide how long to wait between retries.
|
|
747
742
|
*/
|
|
748
743
|
timeout: (retryCount: number) => number;
|
|
749
|
-
}
|
|
744
|
+
}>;
|
|
750
745
|
|
|
751
|
-
export type WaitForTaskOptions = WaitForOptions
|
|
746
|
+
export type WaitForTaskOptions = WaitForOptions & {
|
|
752
747
|
/**
|
|
753
748
|
* The `indexName` where the operation was performed.
|
|
754
749
|
*/
|
|
@@ -759,7 +754,7 @@ export type WaitForTaskOptions = WaitForOptions<GetTaskResponse> & {
|
|
|
759
754
|
taskID: number;
|
|
760
755
|
};
|
|
761
756
|
|
|
762
|
-
export type WaitForApiKeyOptions = WaitForOptions
|
|
757
|
+
export type WaitForApiKeyOptions = WaitForOptions & {
|
|
763
758
|
/**
|
|
764
759
|
* The API Key.
|
|
765
760
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@algolia/client-search",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.5",
|
|
4
4
|
"description": "JavaScript client for client-search",
|
|
5
5
|
"repository": "algolia/algoliasearch-client-javascript",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"clean": "rm -rf ./dist"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@algolia/client-common": "5.0.0-alpha.
|
|
25
|
-
"@algolia/requester-browser-xhr": "5.0.0-alpha.
|
|
26
|
-
"@algolia/requester-node-http": "5.0.0-alpha.
|
|
24
|
+
"@algolia/client-common": "5.0.0-alpha.5",
|
|
25
|
+
"@algolia/requester-browser-xhr": "5.0.0-alpha.5",
|
|
26
|
+
"@algolia/requester-node-http": "5.0.0-alpha.5"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/node": "16.11.47",
|