@algolia/client-search 5.3.1 → 5.4.0
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/browser.d.ts +1 -1
- package/dist/builds/browser.js +87 -88
- package/dist/builds/browser.js.map +1 -1
- package/dist/builds/browser.min.js +1 -1
- package/dist/builds/browser.min.js.map +1 -1
- package/dist/builds/browser.umd.js +2 -2
- package/dist/builds/fetch.js +2429 -0
- package/dist/builds/fetch.js.map +1 -0
- package/dist/builds/node.cjs +87 -88
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +87 -88
- package/dist/builds/node.js.map +1 -1
- package/dist/fetch.d.ts +3866 -0
- package/dist/node.d.cts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/src/searchClient.cjs +87 -88
- package/dist/src/searchClient.cjs.map +1 -1
- package/dist/src/searchClient.js +87 -88
- package/dist/src/searchClient.js.map +1 -1
- package/package.json +9 -4
package/dist/builds/node.cjs
CHANGED
|
@@ -30,7 +30,7 @@ var import_requester_node_http = require("@algolia/requester-node-http");
|
|
|
30
30
|
|
|
31
31
|
// src/searchClient.ts
|
|
32
32
|
var import_client_common = require("@algolia/client-common");
|
|
33
|
-
var apiClientVersion = "5.
|
|
33
|
+
var apiClientVersion = "5.4.0";
|
|
34
34
|
function getDefaultHosts(appId) {
|
|
35
35
|
return [
|
|
36
36
|
{
|
|
@@ -71,25 +71,26 @@ function createSearchClient({
|
|
|
71
71
|
...options
|
|
72
72
|
}) {
|
|
73
73
|
const auth = (0, import_client_common.createAuth)(appIdOption, apiKeyOption, authMode);
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
version: apiClientVersion
|
|
82
|
-
}),
|
|
83
|
-
baseHeaders: {
|
|
84
|
-
"content-type": "text/plain",
|
|
85
|
-
...auth.headers(),
|
|
86
|
-
...options.baseHeaders
|
|
87
|
-
},
|
|
88
|
-
baseQueryParameters: {
|
|
89
|
-
...auth.queryParameters(),
|
|
90
|
-
...options.baseQueryParameters
|
|
91
|
-
}
|
|
74
|
+
const transporter = (0, import_client_common.createTransporter)({
|
|
75
|
+
hosts: getDefaultHosts(appIdOption),
|
|
76
|
+
...options,
|
|
77
|
+
algoliaAgent: (0, import_client_common.getAlgoliaAgent)({
|
|
78
|
+
algoliaAgents,
|
|
79
|
+
client: "Search",
|
|
80
|
+
version: apiClientVersion
|
|
92
81
|
}),
|
|
82
|
+
baseHeaders: {
|
|
83
|
+
"content-type": "text/plain",
|
|
84
|
+
...auth.headers(),
|
|
85
|
+
...options.baseHeaders
|
|
86
|
+
},
|
|
87
|
+
baseQueryParameters: {
|
|
88
|
+
...auth.queryParameters(),
|
|
89
|
+
...options.baseQueryParameters
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
return {
|
|
93
|
+
transporter,
|
|
93
94
|
/**
|
|
94
95
|
* The `appId` currently in use.
|
|
95
96
|
*/
|
|
@@ -98,15 +99,13 @@ function createSearchClient({
|
|
|
98
99
|
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
|
|
99
100
|
*/
|
|
100
101
|
clearCache() {
|
|
101
|
-
return Promise.all([
|
|
102
|
-
() => void 0
|
|
103
|
-
);
|
|
102
|
+
return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);
|
|
104
103
|
},
|
|
105
104
|
/**
|
|
106
105
|
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
|
|
107
106
|
*/
|
|
108
107
|
get _ua() {
|
|
109
|
-
return
|
|
108
|
+
return transporter.algoliaAgent.value;
|
|
110
109
|
},
|
|
111
110
|
/**
|
|
112
111
|
* Adds a `segment` to the `x-algolia-agent` sent with every requests.
|
|
@@ -115,7 +114,7 @@ function createSearchClient({
|
|
|
115
114
|
* @param version - The version of the agent.
|
|
116
115
|
*/
|
|
117
116
|
addAlgoliaAgent(segment, version) {
|
|
118
|
-
|
|
117
|
+
transporter.algoliaAgent.add({ segment, version });
|
|
119
118
|
},
|
|
120
119
|
/**
|
|
121
120
|
* Helper method to switch the API key used to authenticate the requests.
|
|
@@ -125,9 +124,9 @@ function createSearchClient({
|
|
|
125
124
|
*/
|
|
126
125
|
setClientApiKey({ apiKey }) {
|
|
127
126
|
if (!authMode || authMode === "WithinHeaders") {
|
|
128
|
-
|
|
127
|
+
transporter.baseHeaders["x-algolia-api-key"] = apiKey;
|
|
129
128
|
} else {
|
|
130
|
-
|
|
129
|
+
transporter.baseQueryParameters["x-algolia-api-key"] = apiKey;
|
|
131
130
|
}
|
|
132
131
|
},
|
|
133
132
|
/**
|
|
@@ -551,7 +550,7 @@ function createSearchClient({
|
|
|
551
550
|
headers,
|
|
552
551
|
data: apiKey
|
|
553
552
|
};
|
|
554
|
-
return
|
|
553
|
+
return transporter.request(request, requestOptions);
|
|
555
554
|
},
|
|
556
555
|
/**
|
|
557
556
|
* If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. To update _some_ attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch).
|
|
@@ -585,7 +584,7 @@ function createSearchClient({
|
|
|
585
584
|
headers,
|
|
586
585
|
data: body
|
|
587
586
|
};
|
|
588
|
-
return
|
|
587
|
+
return transporter.request(request, requestOptions);
|
|
589
588
|
},
|
|
590
589
|
/**
|
|
591
590
|
* Adds a source to the list of allowed sources.
|
|
@@ -613,7 +612,7 @@ function createSearchClient({
|
|
|
613
612
|
headers,
|
|
614
613
|
data: source
|
|
615
614
|
};
|
|
616
|
-
return
|
|
615
|
+
return transporter.request(request, requestOptions);
|
|
617
616
|
},
|
|
618
617
|
/**
|
|
619
618
|
* Assigns or moves a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID.
|
|
@@ -649,7 +648,7 @@ function createSearchClient({
|
|
|
649
648
|
headers,
|
|
650
649
|
data: assignUserIdParams
|
|
651
650
|
};
|
|
652
|
-
return
|
|
651
|
+
return transporter.request(request, requestOptions);
|
|
653
652
|
},
|
|
654
653
|
/**
|
|
655
654
|
* Adds, updates, or deletes records in one index with a single API request. Batching index updates reduces latency and increases data integrity. - Actions are applied in the order they\'re specified. - Actions are equivalent to the individual API requests of the same name.
|
|
@@ -679,7 +678,7 @@ function createSearchClient({
|
|
|
679
678
|
headers,
|
|
680
679
|
data: batchWriteParams
|
|
681
680
|
};
|
|
682
|
-
return
|
|
681
|
+
return transporter.request(request, requestOptions);
|
|
683
682
|
},
|
|
684
683
|
/**
|
|
685
684
|
* Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
|
|
@@ -718,7 +717,7 @@ function createSearchClient({
|
|
|
718
717
|
headers,
|
|
719
718
|
data: batchAssignUserIdsParams
|
|
720
719
|
};
|
|
721
|
-
return
|
|
720
|
+
return transporter.request(request, requestOptions);
|
|
722
721
|
},
|
|
723
722
|
/**
|
|
724
723
|
* Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
|
|
@@ -756,7 +755,7 @@ function createSearchClient({
|
|
|
756
755
|
headers,
|
|
757
756
|
data: batchDictionaryEntriesParams
|
|
758
757
|
};
|
|
759
|
-
return
|
|
758
|
+
return transporter.request(request, requestOptions);
|
|
760
759
|
},
|
|
761
760
|
/**
|
|
762
761
|
* Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn\'t collect data when using `browse`. - Records are ranked by attributes and custom ranking. - There\'s no ranking for: typo-tolerance, number of matched words, proximity, geo distance. Browse requests automatically apply these settings: - `advancedSyntax`: `false` - `attributesToHighlight`: `[]` - `attributesToSnippet`: `[]` - `distinct`: `false` - `enablePersonalization`: `false` - `enableRules`: `false` - `facets`: `[]` - `getRankingInfo`: `false` - `ignorePlurals`: `false` - `optionalFilters`: `[]` - `typoTolerance`: `true` or `false` (`min` and `strict` is evaluated to `true`) If you send these parameters with your browse requests, they\'ll be ignored.
|
|
@@ -783,7 +782,7 @@ function createSearchClient({
|
|
|
783
782
|
headers,
|
|
784
783
|
data: browseParams ? browseParams : {}
|
|
785
784
|
};
|
|
786
|
-
return
|
|
785
|
+
return transporter.request(request, requestOptions);
|
|
787
786
|
},
|
|
788
787
|
/**
|
|
789
788
|
* Deletes only the records from an index while keeping settings, synonyms, and rules.
|
|
@@ -808,7 +807,7 @@ function createSearchClient({
|
|
|
808
807
|
queryParameters,
|
|
809
808
|
headers
|
|
810
809
|
};
|
|
811
|
-
return
|
|
810
|
+
return transporter.request(request, requestOptions);
|
|
812
811
|
},
|
|
813
812
|
/**
|
|
814
813
|
* Deletes all rules from the index.
|
|
@@ -837,7 +836,7 @@ function createSearchClient({
|
|
|
837
836
|
queryParameters,
|
|
838
837
|
headers
|
|
839
838
|
};
|
|
840
|
-
return
|
|
839
|
+
return transporter.request(request, requestOptions);
|
|
841
840
|
},
|
|
842
841
|
/**
|
|
843
842
|
* Deletes all synonyms from the index.
|
|
@@ -866,7 +865,7 @@ function createSearchClient({
|
|
|
866
865
|
queryParameters,
|
|
867
866
|
headers
|
|
868
867
|
};
|
|
869
|
-
return
|
|
868
|
+
return transporter.request(request, requestOptions);
|
|
870
869
|
},
|
|
871
870
|
/**
|
|
872
871
|
* This method allow you to send requests to the Algolia REST API.
|
|
@@ -889,7 +888,7 @@ function createSearchClient({
|
|
|
889
888
|
queryParameters,
|
|
890
889
|
headers
|
|
891
890
|
};
|
|
892
|
-
return
|
|
891
|
+
return transporter.request(request, requestOptions);
|
|
893
892
|
},
|
|
894
893
|
/**
|
|
895
894
|
* This method allow you to send requests to the Algolia REST API.
|
|
@@ -912,7 +911,7 @@ function createSearchClient({
|
|
|
912
911
|
queryParameters,
|
|
913
912
|
headers
|
|
914
913
|
};
|
|
915
|
-
return
|
|
914
|
+
return transporter.request(request, requestOptions);
|
|
916
915
|
},
|
|
917
916
|
/**
|
|
918
917
|
* This method allow you to send requests to the Algolia REST API.
|
|
@@ -937,7 +936,7 @@ function createSearchClient({
|
|
|
937
936
|
headers,
|
|
938
937
|
data: body ? body : {}
|
|
939
938
|
};
|
|
940
|
-
return
|
|
939
|
+
return transporter.request(request, requestOptions);
|
|
941
940
|
},
|
|
942
941
|
/**
|
|
943
942
|
* This method allow you to send requests to the Algolia REST API.
|
|
@@ -962,7 +961,7 @@ function createSearchClient({
|
|
|
962
961
|
headers,
|
|
963
962
|
data: body ? body : {}
|
|
964
963
|
};
|
|
965
|
-
return
|
|
964
|
+
return transporter.request(request, requestOptions);
|
|
966
965
|
},
|
|
967
966
|
/**
|
|
968
967
|
* Deletes the API key.
|
|
@@ -987,7 +986,7 @@ function createSearchClient({
|
|
|
987
986
|
queryParameters,
|
|
988
987
|
headers
|
|
989
988
|
};
|
|
990
|
-
return
|
|
989
|
+
return transporter.request(request, requestOptions);
|
|
991
990
|
},
|
|
992
991
|
/**
|
|
993
992
|
* This operation doesn\'t accept empty queries or filters. It\'s more efficient to get a list of object IDs with the [`browse` operation](#tag/Search/operation/browse), and then delete the records using the [`batch` operation](#tag/Records/operation/batch).
|
|
@@ -1017,7 +1016,7 @@ function createSearchClient({
|
|
|
1017
1016
|
headers,
|
|
1018
1017
|
data: deleteByParams
|
|
1019
1018
|
};
|
|
1020
|
-
return
|
|
1019
|
+
return transporter.request(request, requestOptions);
|
|
1021
1020
|
},
|
|
1022
1021
|
/**
|
|
1023
1022
|
* Deletes an index and all its settings. - Deleting an index doesn\'t delete its analytics data. - If you try to delete a non-existing index, the operation is ignored without warning. - If the index you want to delete has replica indices, the replicas become independent indices. - If the index you want to delete is a replica index, you must first unlink it from its primary index before you can delete it. For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas/).
|
|
@@ -1042,7 +1041,7 @@ function createSearchClient({
|
|
|
1042
1041
|
queryParameters,
|
|
1043
1042
|
headers
|
|
1044
1043
|
};
|
|
1045
|
-
return
|
|
1044
|
+
return transporter.request(request, requestOptions);
|
|
1046
1045
|
},
|
|
1047
1046
|
/**
|
|
1048
1047
|
* Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](#tag/Records/operation/batch). To delete records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy).
|
|
@@ -1071,7 +1070,7 @@ function createSearchClient({
|
|
|
1071
1070
|
queryParameters,
|
|
1072
1071
|
headers
|
|
1073
1072
|
};
|
|
1074
|
-
return
|
|
1073
|
+
return transporter.request(request, requestOptions);
|
|
1075
1074
|
},
|
|
1076
1075
|
/**
|
|
1077
1076
|
* Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
|
@@ -1104,7 +1103,7 @@ function createSearchClient({
|
|
|
1104
1103
|
queryParameters,
|
|
1105
1104
|
headers
|
|
1106
1105
|
};
|
|
1107
|
-
return
|
|
1106
|
+
return transporter.request(request, requestOptions);
|
|
1108
1107
|
},
|
|
1109
1108
|
/**
|
|
1110
1109
|
* Deletes a source from the list of allowed sources.
|
|
@@ -1129,7 +1128,7 @@ function createSearchClient({
|
|
|
1129
1128
|
queryParameters,
|
|
1130
1129
|
headers
|
|
1131
1130
|
};
|
|
1132
|
-
return
|
|
1131
|
+
return transporter.request(request, requestOptions);
|
|
1133
1132
|
},
|
|
1134
1133
|
/**
|
|
1135
1134
|
* Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
|
@@ -1162,7 +1161,7 @@ function createSearchClient({
|
|
|
1162
1161
|
queryParameters,
|
|
1163
1162
|
headers
|
|
1164
1163
|
};
|
|
1165
|
-
return
|
|
1164
|
+
return transporter.request(request, requestOptions);
|
|
1166
1165
|
},
|
|
1167
1166
|
/**
|
|
1168
1167
|
* Gets the permissions and restrictions of an API key. When authenticating with the admin API key, you can request information for any of your application\'s keys. When authenticating with other API keys, you can only retrieve information for that key.
|
|
@@ -1184,7 +1183,7 @@ function createSearchClient({
|
|
|
1184
1183
|
queryParameters,
|
|
1185
1184
|
headers
|
|
1186
1185
|
};
|
|
1187
|
-
return
|
|
1186
|
+
return transporter.request(request, requestOptions);
|
|
1188
1187
|
},
|
|
1189
1188
|
/**
|
|
1190
1189
|
* Checks the status of a given application task.
|
|
@@ -1209,7 +1208,7 @@ function createSearchClient({
|
|
|
1209
1208
|
queryParameters,
|
|
1210
1209
|
headers
|
|
1211
1210
|
};
|
|
1212
|
-
return
|
|
1211
|
+
return transporter.request(request, requestOptions);
|
|
1213
1212
|
},
|
|
1214
1213
|
/**
|
|
1215
1214
|
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
@@ -1229,7 +1228,7 @@ function createSearchClient({
|
|
|
1229
1228
|
queryParameters,
|
|
1230
1229
|
headers
|
|
1231
1230
|
};
|
|
1232
|
-
return
|
|
1231
|
+
return transporter.request(request, requestOptions);
|
|
1233
1232
|
},
|
|
1234
1233
|
/**
|
|
1235
1234
|
* Retrieves the languages for which standard dictionary entries are turned off.
|
|
@@ -1249,7 +1248,7 @@ function createSearchClient({
|
|
|
1249
1248
|
queryParameters,
|
|
1250
1249
|
headers
|
|
1251
1250
|
};
|
|
1252
|
-
return
|
|
1251
|
+
return transporter.request(request, requestOptions);
|
|
1253
1252
|
},
|
|
1254
1253
|
/**
|
|
1255
1254
|
* The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last seven days. - Up to 1,000 API requests per server are logged. - This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn\'t appear in the logs itself.
|
|
@@ -1286,7 +1285,7 @@ function createSearchClient({
|
|
|
1286
1285
|
queryParameters,
|
|
1287
1286
|
headers
|
|
1288
1287
|
};
|
|
1289
|
-
return
|
|
1288
|
+
return transporter.request(request, requestOptions);
|
|
1290
1289
|
},
|
|
1291
1290
|
/**
|
|
1292
1291
|
* Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects).
|
|
@@ -1319,7 +1318,7 @@ function createSearchClient({
|
|
|
1319
1318
|
queryParameters,
|
|
1320
1319
|
headers
|
|
1321
1320
|
};
|
|
1322
|
-
return
|
|
1321
|
+
return transporter.request(request, requestOptions);
|
|
1323
1322
|
},
|
|
1324
1323
|
/**
|
|
1325
1324
|
* Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
|
|
@@ -1349,7 +1348,7 @@ function createSearchClient({
|
|
|
1349
1348
|
useReadTransporter: true,
|
|
1350
1349
|
cacheable: true
|
|
1351
1350
|
};
|
|
1352
|
-
return
|
|
1351
|
+
return transporter.request(request, requestOptions);
|
|
1353
1352
|
},
|
|
1354
1353
|
/**
|
|
1355
1354
|
* Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
|
@@ -1378,7 +1377,7 @@ function createSearchClient({
|
|
|
1378
1377
|
queryParameters,
|
|
1379
1378
|
headers
|
|
1380
1379
|
};
|
|
1381
|
-
return
|
|
1380
|
+
return transporter.request(request, requestOptions);
|
|
1382
1381
|
},
|
|
1383
1382
|
/**
|
|
1384
1383
|
* Retrieves an object with non-null index settings.
|
|
@@ -1403,7 +1402,7 @@ function createSearchClient({
|
|
|
1403
1402
|
queryParameters,
|
|
1404
1403
|
headers
|
|
1405
1404
|
};
|
|
1406
|
-
return
|
|
1405
|
+
return transporter.request(request, requestOptions);
|
|
1407
1406
|
},
|
|
1408
1407
|
/**
|
|
1409
1408
|
* Retrieves all allowed IP addresses with access to your application.
|
|
@@ -1423,7 +1422,7 @@ function createSearchClient({
|
|
|
1423
1422
|
queryParameters,
|
|
1424
1423
|
headers
|
|
1425
1424
|
};
|
|
1426
|
-
return
|
|
1425
|
+
return transporter.request(request, requestOptions);
|
|
1427
1426
|
},
|
|
1428
1427
|
/**
|
|
1429
1428
|
* Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
|
@@ -1452,7 +1451,7 @@ function createSearchClient({
|
|
|
1452
1451
|
queryParameters,
|
|
1453
1452
|
headers
|
|
1454
1453
|
};
|
|
1455
|
-
return
|
|
1454
|
+
return transporter.request(request, requestOptions);
|
|
1456
1455
|
},
|
|
1457
1456
|
/**
|
|
1458
1457
|
* Checks the status of a given task. Indexing tasks are asynchronous. When you add, update, or delete records or indices, a task is created on a queue and completed depending on the load on the server. The indexing tasks\' responses include a task ID that you can use to check the status.
|
|
@@ -1481,7 +1480,7 @@ function createSearchClient({
|
|
|
1481
1480
|
queryParameters,
|
|
1482
1481
|
headers
|
|
1483
1482
|
};
|
|
1484
|
-
return
|
|
1483
|
+
return transporter.request(request, requestOptions);
|
|
1485
1484
|
},
|
|
1486
1485
|
/**
|
|
1487
1486
|
* Get the IDs of the 10 users with the highest number of records per cluster. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time.
|
|
@@ -1501,7 +1500,7 @@ function createSearchClient({
|
|
|
1501
1500
|
queryParameters,
|
|
1502
1501
|
headers
|
|
1503
1502
|
};
|
|
1504
|
-
return
|
|
1503
|
+
return transporter.request(request, requestOptions);
|
|
1505
1504
|
},
|
|
1506
1505
|
/**
|
|
1507
1506
|
* Returns the user ID data stored in the mapping. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time.
|
|
@@ -1526,7 +1525,7 @@ function createSearchClient({
|
|
|
1526
1525
|
queryParameters,
|
|
1527
1526
|
headers
|
|
1528
1527
|
};
|
|
1529
|
-
return
|
|
1528
|
+
return transporter.request(request, requestOptions);
|
|
1530
1529
|
},
|
|
1531
1530
|
/**
|
|
1532
1531
|
* To determine when the time-consuming process of creating a large batch of users or migrating users from one cluster to another is complete, this operation retrieves the status of the process.
|
|
@@ -1551,7 +1550,7 @@ function createSearchClient({
|
|
|
1551
1550
|
queryParameters,
|
|
1552
1551
|
headers
|
|
1553
1552
|
};
|
|
1554
|
-
return
|
|
1553
|
+
return transporter.request(request, requestOptions);
|
|
1555
1554
|
},
|
|
1556
1555
|
/**
|
|
1557
1556
|
* Lists all API keys associated with your Algolia application, including their permissions and restrictions.
|
|
@@ -1571,7 +1570,7 @@ function createSearchClient({
|
|
|
1571
1570
|
queryParameters,
|
|
1572
1571
|
headers
|
|
1573
1572
|
};
|
|
1574
|
-
return
|
|
1573
|
+
return transporter.request(request, requestOptions);
|
|
1575
1574
|
},
|
|
1576
1575
|
/**
|
|
1577
1576
|
* Lists the available clusters in a multi-cluster setup.
|
|
@@ -1591,7 +1590,7 @@ function createSearchClient({
|
|
|
1591
1590
|
queryParameters,
|
|
1592
1591
|
headers
|
|
1593
1592
|
};
|
|
1594
|
-
return
|
|
1593
|
+
return transporter.request(request, requestOptions);
|
|
1595
1594
|
},
|
|
1596
1595
|
/**
|
|
1597
1596
|
* Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
|
|
@@ -1620,7 +1619,7 @@ function createSearchClient({
|
|
|
1620
1619
|
queryParameters,
|
|
1621
1620
|
headers
|
|
1622
1621
|
};
|
|
1623
|
-
return
|
|
1622
|
+
return transporter.request(request, requestOptions);
|
|
1624
1623
|
},
|
|
1625
1624
|
/**
|
|
1626
1625
|
* Lists the userIDs assigned to a multi-cluster application. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time.
|
|
@@ -1649,7 +1648,7 @@ function createSearchClient({
|
|
|
1649
1648
|
queryParameters,
|
|
1650
1649
|
headers
|
|
1651
1650
|
};
|
|
1652
|
-
return
|
|
1651
|
+
return transporter.request(request, requestOptions);
|
|
1653
1652
|
},
|
|
1654
1653
|
/**
|
|
1655
1654
|
* Adds, updates, or deletes records in multiple indices with a single API request. - Actions are applied in the order they are specified. - Actions are equivalent to the individual API requests of the same name.
|
|
@@ -1674,7 +1673,7 @@ function createSearchClient({
|
|
|
1674
1673
|
headers,
|
|
1675
1674
|
data: batchParams
|
|
1676
1675
|
};
|
|
1677
|
-
return
|
|
1676
|
+
return transporter.request(request, requestOptions);
|
|
1678
1677
|
},
|
|
1679
1678
|
/**
|
|
1680
1679
|
* Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn\'t exist yet, it\'ll be created. **Copy** - Copying a source index that doesn\'t exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can\'t copy the `enableReRanking`, `mode`, and `replicas` settings. - You can\'t copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn\'t exist is ignored without returning an error. - When moving an index, the analytics data keep their original name and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/).
|
|
@@ -1710,7 +1709,7 @@ function createSearchClient({
|
|
|
1710
1709
|
headers,
|
|
1711
1710
|
data: operationIndexParams
|
|
1712
1711
|
};
|
|
1713
|
-
return
|
|
1712
|
+
return transporter.request(request, requestOptions);
|
|
1714
1713
|
},
|
|
1715
1714
|
/**
|
|
1716
1715
|
* Adds new attributes to a record, or update existing ones. - If a record with the specified object ID doesn\'t exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn\'t exist yet, this method creates a new index. - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor. To update an attribute without pushing the entire record, you can use these built-in operations. These operations can be helpful if you don\'t have access to your initial data. - Increment: increment a numeric attribute - Decrement: decrement a numeric attribute - Add: append a number or string element to an array attribute - Remove: remove all matching number or string elements from an array attribute made of numbers or strings - AddUnique: add a number or string element to an array attribute made of numbers or strings only if it\'s not already present - IncrementFrom: increment a numeric integer attribute only if the provided value matches the current value, and otherwise ignore the whole object update. For example, if you pass an IncrementFrom value of 2 for the version attribute, but the current value of the attribute is 1, the engine ignores the update. If the object doesn\'t exist, the engine only creates it if you pass an IncrementFrom value of 0. - IncrementSet: increment a numeric integer attribute only if the provided value is greater than the current value, and otherwise ignore the whole object update. For example, if you pass an IncrementSet value of 2 for the version attribute, and the current value of the attribute is 1, the engine updates the object. If the object doesn\'t exist yet, the engine only creates it if you pass an IncrementSet value that\'s greater than 0. You can specify an operation by providing an object with the attribute to update as the key and its value being an object with the following properties: - _operation: the operation to apply on the attribute - value: the right-hand side argument to the operation, for example, increment or decrement step, value to add or remove.
|
|
@@ -1748,7 +1747,7 @@ function createSearchClient({
|
|
|
1748
1747
|
headers,
|
|
1749
1748
|
data: attributesToUpdate
|
|
1750
1749
|
};
|
|
1751
|
-
return
|
|
1750
|
+
return transporter.request(request, requestOptions);
|
|
1752
1751
|
},
|
|
1753
1752
|
/**
|
|
1754
1753
|
* Deletes a user ID and its associated data from the clusters.
|
|
@@ -1773,7 +1772,7 @@ function createSearchClient({
|
|
|
1773
1772
|
queryParameters,
|
|
1774
1773
|
headers
|
|
1775
1774
|
};
|
|
1776
|
-
return
|
|
1775
|
+
return transporter.request(request, requestOptions);
|
|
1777
1776
|
},
|
|
1778
1777
|
/**
|
|
1779
1778
|
* Replaces the list of allowed sources.
|
|
@@ -1799,7 +1798,7 @@ function createSearchClient({
|
|
|
1799
1798
|
headers,
|
|
1800
1799
|
data: source
|
|
1801
1800
|
};
|
|
1802
|
-
return
|
|
1801
|
+
return transporter.request(request, requestOptions);
|
|
1803
1802
|
},
|
|
1804
1803
|
/**
|
|
1805
1804
|
* Restores a deleted API key. Restoring resets the `validity` attribute to `0`. Algolia stores up to 1,000 API keys per application. If you create more, the oldest API keys are deleted and can\'t be restored.
|
|
@@ -1824,7 +1823,7 @@ function createSearchClient({
|
|
|
1824
1823
|
queryParameters,
|
|
1825
1824
|
headers
|
|
1826
1825
|
};
|
|
1827
|
-
return
|
|
1826
|
+
return transporter.request(request, requestOptions);
|
|
1828
1827
|
},
|
|
1829
1828
|
/**
|
|
1830
1829
|
* Adds a record to an index or replace it. - If the record doesn\'t have an object ID, a new record with an auto-generated object ID is added to your index. - If a record with the specified object ID exists, the existing record is replaced. - If a record with the specified object ID doesn\'t exist, a new record is added to your index. - If you add a record to an index that doesn\'t exist yet, a new index is created. To update _some_ attributes of a record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject). To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch).
|
|
@@ -1854,7 +1853,7 @@ function createSearchClient({
|
|
|
1854
1853
|
headers,
|
|
1855
1854
|
data: body
|
|
1856
1855
|
};
|
|
1857
|
-
return
|
|
1856
|
+
return transporter.request(request, requestOptions);
|
|
1858
1857
|
},
|
|
1859
1858
|
/**
|
|
1860
1859
|
* If a rule with the specified object ID doesn\'t exist, it\'s created. Otherwise, the existing rule is replaced. To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules).
|
|
@@ -1895,7 +1894,7 @@ function createSearchClient({
|
|
|
1895
1894
|
headers,
|
|
1896
1895
|
data: rule
|
|
1897
1896
|
};
|
|
1898
|
-
return
|
|
1897
|
+
return transporter.request(request, requestOptions);
|
|
1899
1898
|
},
|
|
1900
1899
|
/**
|
|
1901
1900
|
* Create or update multiple rules. If a rule with the specified object ID doesn\'t exist, Algolia creates a new one. Otherwise, existing rules are replaced.
|
|
@@ -1933,7 +1932,7 @@ function createSearchClient({
|
|
|
1933
1932
|
headers,
|
|
1934
1933
|
data: rules
|
|
1935
1934
|
};
|
|
1936
|
-
return
|
|
1935
|
+
return transporter.request(request, requestOptions);
|
|
1937
1936
|
},
|
|
1938
1937
|
/**
|
|
1939
1938
|
* If a synonym with the specified object ID doesn\'t exist, Algolia adds a new one. Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms).
|
|
@@ -1977,7 +1976,7 @@ function createSearchClient({
|
|
|
1977
1976
|
headers,
|
|
1978
1977
|
data: synonymHit
|
|
1979
1978
|
};
|
|
1980
|
-
return
|
|
1979
|
+
return transporter.request(request, requestOptions);
|
|
1981
1980
|
},
|
|
1982
1981
|
/**
|
|
1983
1982
|
* If a synonym with the `objectID` doesn\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced.
|
|
@@ -2015,7 +2014,7 @@ function createSearchClient({
|
|
|
2015
2014
|
headers,
|
|
2016
2015
|
data: synonymHit
|
|
2017
2016
|
};
|
|
2018
|
-
return
|
|
2017
|
+
return transporter.request(request, requestOptions);
|
|
2019
2018
|
},
|
|
2020
2019
|
/**
|
|
2021
2020
|
* Sends multiple search request to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters.
|
|
@@ -2066,7 +2065,7 @@ function createSearchClient({
|
|
|
2066
2065
|
useReadTransporter: true,
|
|
2067
2066
|
cacheable: true
|
|
2068
2067
|
};
|
|
2069
|
-
return
|
|
2068
|
+
return transporter.request(request, requestOptions);
|
|
2070
2069
|
},
|
|
2071
2070
|
/**
|
|
2072
2071
|
* Searches for standard and custom dictionary entries.
|
|
@@ -2108,7 +2107,7 @@ function createSearchClient({
|
|
|
2108
2107
|
useReadTransporter: true,
|
|
2109
2108
|
cacheable: true
|
|
2110
2109
|
};
|
|
2111
|
-
return
|
|
2110
|
+
return transporter.request(request, requestOptions);
|
|
2112
2111
|
},
|
|
2113
2112
|
/**
|
|
2114
2113
|
* Searches for values of a specified facet attribute. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn\'t work if you have **more than 65 searchable facets and searchable attributes combined**.
|
|
@@ -2141,7 +2140,7 @@ function createSearchClient({
|
|
|
2141
2140
|
useReadTransporter: true,
|
|
2142
2141
|
cacheable: true
|
|
2143
2142
|
};
|
|
2144
|
-
return
|
|
2143
|
+
return transporter.request(request, requestOptions);
|
|
2145
2144
|
},
|
|
2146
2145
|
/**
|
|
2147
2146
|
* Searches for rules in your index.
|
|
@@ -2170,7 +2169,7 @@ function createSearchClient({
|
|
|
2170
2169
|
useReadTransporter: true,
|
|
2171
2170
|
cacheable: true
|
|
2172
2171
|
};
|
|
2173
|
-
return
|
|
2172
|
+
return transporter.request(request, requestOptions);
|
|
2174
2173
|
},
|
|
2175
2174
|
/**
|
|
2176
2175
|
* Searches a single index and return matching search results (_hits_). This method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting.
|
|
@@ -2199,7 +2198,7 @@ function createSearchClient({
|
|
|
2199
2198
|
useReadTransporter: true,
|
|
2200
2199
|
cacheable: true
|
|
2201
2200
|
};
|
|
2202
|
-
return
|
|
2201
|
+
return transporter.request(request, requestOptions);
|
|
2203
2202
|
},
|
|
2204
2203
|
/**
|
|
2205
2204
|
* Searches for synonyms in your index.
|
|
@@ -2231,7 +2230,7 @@ function createSearchClient({
|
|
|
2231
2230
|
useReadTransporter: true,
|
|
2232
2231
|
cacheable: true
|
|
2233
2232
|
};
|
|
2234
|
-
return
|
|
2233
|
+
return transporter.request(request, requestOptions);
|
|
2235
2234
|
},
|
|
2236
2235
|
/**
|
|
2237
2236
|
* Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time. To ensure rapid updates, the user IDs index isn\'t built at the same time as the mapping. Instead, it\'s built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours).
|
|
@@ -2261,7 +2260,7 @@ function createSearchClient({
|
|
|
2261
2260
|
useReadTransporter: true,
|
|
2262
2261
|
cacheable: true
|
|
2263
2262
|
};
|
|
2264
|
-
return
|
|
2263
|
+
return transporter.request(request, requestOptions);
|
|
2265
2264
|
},
|
|
2266
2265
|
/**
|
|
2267
2266
|
* Turns standard stop word dictionary entries on or off for a given language.
|
|
@@ -2291,7 +2290,7 @@ function createSearchClient({
|
|
|
2291
2290
|
headers,
|
|
2292
2291
|
data: dictionarySettingsParams
|
|
2293
2292
|
};
|
|
2294
|
-
return
|
|
2293
|
+
return transporter.request(request, requestOptions);
|
|
2295
2294
|
},
|
|
2296
2295
|
/**
|
|
2297
2296
|
* Update the specified index settings. Index settings that you don\'t specify are left unchanged. Specify `null` to reset a setting to its default value. For best performance, update the index settings before you add new records to your index.
|
|
@@ -2325,7 +2324,7 @@ function createSearchClient({
|
|
|
2325
2324
|
headers,
|
|
2326
2325
|
data: indexSettings
|
|
2327
2326
|
};
|
|
2328
|
-
return
|
|
2327
|
+
return transporter.request(request, requestOptions);
|
|
2329
2328
|
},
|
|
2330
2329
|
/**
|
|
2331
2330
|
* Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
|
|
@@ -2358,7 +2357,7 @@ function createSearchClient({
|
|
|
2358
2357
|
headers,
|
|
2359
2358
|
data: apiKey
|
|
2360
2359
|
};
|
|
2361
|
-
return
|
|
2360
|
+
return transporter.request(request, requestOptions);
|
|
2362
2361
|
}
|
|
2363
2362
|
};
|
|
2364
2363
|
}
|