@algolia/client-search 5.3.0 → 5.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.d.ts +1 -1
- package/dist/builds/browser.js +90 -87
- 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 +1 -1
- package/dist/builds/node.cjs +90 -87
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +90 -87
- package/dist/builds/node.js.map +1 -1
- package/dist/node.d.cts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/src/searchClient.cjs +90 -87
- package/dist/src/searchClient.cjs.map +1 -1
- package/dist/src/searchClient.js +90 -87
- package/dist/src/searchClient.js.map +1 -1
- package/package.json +4 -4
package/dist/builds/node.js
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
ApiError,
|
|
20
20
|
createIterablePromise
|
|
21
21
|
} from "@algolia/client-common";
|
|
22
|
-
var apiClientVersion = "5.3.
|
|
22
|
+
var apiClientVersion = "5.3.2";
|
|
23
23
|
function getDefaultHosts(appId) {
|
|
24
24
|
return [
|
|
25
25
|
{
|
|
@@ -60,25 +60,26 @@ function createSearchClient({
|
|
|
60
60
|
...options
|
|
61
61
|
}) {
|
|
62
62
|
const auth = createAuth(appIdOption, apiKeyOption, authMode);
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
version: apiClientVersion
|
|
71
|
-
}),
|
|
72
|
-
baseHeaders: {
|
|
73
|
-
"content-type": "text/plain",
|
|
74
|
-
...auth.headers(),
|
|
75
|
-
...options.baseHeaders
|
|
76
|
-
},
|
|
77
|
-
baseQueryParameters: {
|
|
78
|
-
...auth.queryParameters(),
|
|
79
|
-
...options.baseQueryParameters
|
|
80
|
-
}
|
|
63
|
+
const transporter = createTransporter({
|
|
64
|
+
hosts: getDefaultHosts(appIdOption),
|
|
65
|
+
...options,
|
|
66
|
+
algoliaAgent: getAlgoliaAgent({
|
|
67
|
+
algoliaAgents,
|
|
68
|
+
client: "Search",
|
|
69
|
+
version: apiClientVersion
|
|
81
70
|
}),
|
|
71
|
+
baseHeaders: {
|
|
72
|
+
"content-type": "text/plain",
|
|
73
|
+
...auth.headers(),
|
|
74
|
+
...options.baseHeaders
|
|
75
|
+
},
|
|
76
|
+
baseQueryParameters: {
|
|
77
|
+
...auth.queryParameters(),
|
|
78
|
+
...options.baseQueryParameters
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
return {
|
|
82
|
+
transporter,
|
|
82
83
|
/**
|
|
83
84
|
* The `appId` currently in use.
|
|
84
85
|
*/
|
|
@@ -87,15 +88,13 @@ function createSearchClient({
|
|
|
87
88
|
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
|
|
88
89
|
*/
|
|
89
90
|
clearCache() {
|
|
90
|
-
return Promise.all([
|
|
91
|
-
() => void 0
|
|
92
|
-
);
|
|
91
|
+
return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);
|
|
93
92
|
},
|
|
94
93
|
/**
|
|
95
94
|
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
|
|
96
95
|
*/
|
|
97
96
|
get _ua() {
|
|
98
|
-
return
|
|
97
|
+
return transporter.algoliaAgent.value;
|
|
99
98
|
},
|
|
100
99
|
/**
|
|
101
100
|
* Adds a `segment` to the `x-algolia-agent` sent with every requests.
|
|
@@ -104,7 +103,7 @@ function createSearchClient({
|
|
|
104
103
|
* @param version - The version of the agent.
|
|
105
104
|
*/
|
|
106
105
|
addAlgoliaAgent(segment, version) {
|
|
107
|
-
|
|
106
|
+
transporter.algoliaAgent.add({ segment, version });
|
|
108
107
|
},
|
|
109
108
|
/**
|
|
110
109
|
* Helper method to switch the API key used to authenticate the requests.
|
|
@@ -113,7 +112,11 @@ function createSearchClient({
|
|
|
113
112
|
* @param params.apiKey - The new API Key to use.
|
|
114
113
|
*/
|
|
115
114
|
setClientApiKey({ apiKey }) {
|
|
116
|
-
|
|
115
|
+
if (!authMode || authMode === "WithinHeaders") {
|
|
116
|
+
transporter.baseHeaders["x-algolia-api-key"] = apiKey;
|
|
117
|
+
} else {
|
|
118
|
+
transporter.baseQueryParameters["x-algolia-api-key"] = apiKey;
|
|
119
|
+
}
|
|
117
120
|
},
|
|
118
121
|
/**
|
|
119
122
|
* Helper: Wait for a task to be published (completed) for a given `indexName` and `taskID`.
|
|
@@ -536,7 +539,7 @@ function createSearchClient({
|
|
|
536
539
|
headers,
|
|
537
540
|
data: apiKey
|
|
538
541
|
};
|
|
539
|
-
return
|
|
542
|
+
return transporter.request(request, requestOptions);
|
|
540
543
|
},
|
|
541
544
|
/**
|
|
542
545
|
* 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).
|
|
@@ -570,7 +573,7 @@ function createSearchClient({
|
|
|
570
573
|
headers,
|
|
571
574
|
data: body
|
|
572
575
|
};
|
|
573
|
-
return
|
|
576
|
+
return transporter.request(request, requestOptions);
|
|
574
577
|
},
|
|
575
578
|
/**
|
|
576
579
|
* Adds a source to the list of allowed sources.
|
|
@@ -598,7 +601,7 @@ function createSearchClient({
|
|
|
598
601
|
headers,
|
|
599
602
|
data: source
|
|
600
603
|
};
|
|
601
|
-
return
|
|
604
|
+
return transporter.request(request, requestOptions);
|
|
602
605
|
},
|
|
603
606
|
/**
|
|
604
607
|
* 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.
|
|
@@ -634,7 +637,7 @@ function createSearchClient({
|
|
|
634
637
|
headers,
|
|
635
638
|
data: assignUserIdParams
|
|
636
639
|
};
|
|
637
|
-
return
|
|
640
|
+
return transporter.request(request, requestOptions);
|
|
638
641
|
},
|
|
639
642
|
/**
|
|
640
643
|
* 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.
|
|
@@ -664,7 +667,7 @@ function createSearchClient({
|
|
|
664
667
|
headers,
|
|
665
668
|
data: batchWriteParams
|
|
666
669
|
};
|
|
667
|
-
return
|
|
670
|
+
return transporter.request(request, requestOptions);
|
|
668
671
|
},
|
|
669
672
|
/**
|
|
670
673
|
* Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
|
|
@@ -703,7 +706,7 @@ function createSearchClient({
|
|
|
703
706
|
headers,
|
|
704
707
|
data: batchAssignUserIdsParams
|
|
705
708
|
};
|
|
706
|
-
return
|
|
709
|
+
return transporter.request(request, requestOptions);
|
|
707
710
|
},
|
|
708
711
|
/**
|
|
709
712
|
* Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
|
|
@@ -741,7 +744,7 @@ function createSearchClient({
|
|
|
741
744
|
headers,
|
|
742
745
|
data: batchDictionaryEntriesParams
|
|
743
746
|
};
|
|
744
|
-
return
|
|
747
|
+
return transporter.request(request, requestOptions);
|
|
745
748
|
},
|
|
746
749
|
/**
|
|
747
750
|
* 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.
|
|
@@ -768,7 +771,7 @@ function createSearchClient({
|
|
|
768
771
|
headers,
|
|
769
772
|
data: browseParams ? browseParams : {}
|
|
770
773
|
};
|
|
771
|
-
return
|
|
774
|
+
return transporter.request(request, requestOptions);
|
|
772
775
|
},
|
|
773
776
|
/**
|
|
774
777
|
* Deletes only the records from an index while keeping settings, synonyms, and rules.
|
|
@@ -793,7 +796,7 @@ function createSearchClient({
|
|
|
793
796
|
queryParameters,
|
|
794
797
|
headers
|
|
795
798
|
};
|
|
796
|
-
return
|
|
799
|
+
return transporter.request(request, requestOptions);
|
|
797
800
|
},
|
|
798
801
|
/**
|
|
799
802
|
* Deletes all rules from the index.
|
|
@@ -822,7 +825,7 @@ function createSearchClient({
|
|
|
822
825
|
queryParameters,
|
|
823
826
|
headers
|
|
824
827
|
};
|
|
825
|
-
return
|
|
828
|
+
return transporter.request(request, requestOptions);
|
|
826
829
|
},
|
|
827
830
|
/**
|
|
828
831
|
* Deletes all synonyms from the index.
|
|
@@ -851,7 +854,7 @@ function createSearchClient({
|
|
|
851
854
|
queryParameters,
|
|
852
855
|
headers
|
|
853
856
|
};
|
|
854
|
-
return
|
|
857
|
+
return transporter.request(request, requestOptions);
|
|
855
858
|
},
|
|
856
859
|
/**
|
|
857
860
|
* This method allow you to send requests to the Algolia REST API.
|
|
@@ -874,7 +877,7 @@ function createSearchClient({
|
|
|
874
877
|
queryParameters,
|
|
875
878
|
headers
|
|
876
879
|
};
|
|
877
|
-
return
|
|
880
|
+
return transporter.request(request, requestOptions);
|
|
878
881
|
},
|
|
879
882
|
/**
|
|
880
883
|
* This method allow you to send requests to the Algolia REST API.
|
|
@@ -897,7 +900,7 @@ function createSearchClient({
|
|
|
897
900
|
queryParameters,
|
|
898
901
|
headers
|
|
899
902
|
};
|
|
900
|
-
return
|
|
903
|
+
return transporter.request(request, requestOptions);
|
|
901
904
|
},
|
|
902
905
|
/**
|
|
903
906
|
* This method allow you to send requests to the Algolia REST API.
|
|
@@ -922,7 +925,7 @@ function createSearchClient({
|
|
|
922
925
|
headers,
|
|
923
926
|
data: body ? body : {}
|
|
924
927
|
};
|
|
925
|
-
return
|
|
928
|
+
return transporter.request(request, requestOptions);
|
|
926
929
|
},
|
|
927
930
|
/**
|
|
928
931
|
* This method allow you to send requests to the Algolia REST API.
|
|
@@ -947,7 +950,7 @@ function createSearchClient({
|
|
|
947
950
|
headers,
|
|
948
951
|
data: body ? body : {}
|
|
949
952
|
};
|
|
950
|
-
return
|
|
953
|
+
return transporter.request(request, requestOptions);
|
|
951
954
|
},
|
|
952
955
|
/**
|
|
953
956
|
* Deletes the API key.
|
|
@@ -972,7 +975,7 @@ function createSearchClient({
|
|
|
972
975
|
queryParameters,
|
|
973
976
|
headers
|
|
974
977
|
};
|
|
975
|
-
return
|
|
978
|
+
return transporter.request(request, requestOptions);
|
|
976
979
|
},
|
|
977
980
|
/**
|
|
978
981
|
* 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).
|
|
@@ -1002,7 +1005,7 @@ function createSearchClient({
|
|
|
1002
1005
|
headers,
|
|
1003
1006
|
data: deleteByParams
|
|
1004
1007
|
};
|
|
1005
|
-
return
|
|
1008
|
+
return transporter.request(request, requestOptions);
|
|
1006
1009
|
},
|
|
1007
1010
|
/**
|
|
1008
1011
|
* 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/).
|
|
@@ -1027,7 +1030,7 @@ function createSearchClient({
|
|
|
1027
1030
|
queryParameters,
|
|
1028
1031
|
headers
|
|
1029
1032
|
};
|
|
1030
|
-
return
|
|
1033
|
+
return transporter.request(request, requestOptions);
|
|
1031
1034
|
},
|
|
1032
1035
|
/**
|
|
1033
1036
|
* 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).
|
|
@@ -1056,7 +1059,7 @@ function createSearchClient({
|
|
|
1056
1059
|
queryParameters,
|
|
1057
1060
|
headers
|
|
1058
1061
|
};
|
|
1059
|
-
return
|
|
1062
|
+
return transporter.request(request, requestOptions);
|
|
1060
1063
|
},
|
|
1061
1064
|
/**
|
|
1062
1065
|
* Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
|
@@ -1089,7 +1092,7 @@ function createSearchClient({
|
|
|
1089
1092
|
queryParameters,
|
|
1090
1093
|
headers
|
|
1091
1094
|
};
|
|
1092
|
-
return
|
|
1095
|
+
return transporter.request(request, requestOptions);
|
|
1093
1096
|
},
|
|
1094
1097
|
/**
|
|
1095
1098
|
* Deletes a source from the list of allowed sources.
|
|
@@ -1114,7 +1117,7 @@ function createSearchClient({
|
|
|
1114
1117
|
queryParameters,
|
|
1115
1118
|
headers
|
|
1116
1119
|
};
|
|
1117
|
-
return
|
|
1120
|
+
return transporter.request(request, requestOptions);
|
|
1118
1121
|
},
|
|
1119
1122
|
/**
|
|
1120
1123
|
* Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
|
@@ -1147,7 +1150,7 @@ function createSearchClient({
|
|
|
1147
1150
|
queryParameters,
|
|
1148
1151
|
headers
|
|
1149
1152
|
};
|
|
1150
|
-
return
|
|
1153
|
+
return transporter.request(request, requestOptions);
|
|
1151
1154
|
},
|
|
1152
1155
|
/**
|
|
1153
1156
|
* 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.
|
|
@@ -1169,7 +1172,7 @@ function createSearchClient({
|
|
|
1169
1172
|
queryParameters,
|
|
1170
1173
|
headers
|
|
1171
1174
|
};
|
|
1172
|
-
return
|
|
1175
|
+
return transporter.request(request, requestOptions);
|
|
1173
1176
|
},
|
|
1174
1177
|
/**
|
|
1175
1178
|
* Checks the status of a given application task.
|
|
@@ -1194,7 +1197,7 @@ function createSearchClient({
|
|
|
1194
1197
|
queryParameters,
|
|
1195
1198
|
headers
|
|
1196
1199
|
};
|
|
1197
|
-
return
|
|
1200
|
+
return transporter.request(request, requestOptions);
|
|
1198
1201
|
},
|
|
1199
1202
|
/**
|
|
1200
1203
|
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
@@ -1214,7 +1217,7 @@ function createSearchClient({
|
|
|
1214
1217
|
queryParameters,
|
|
1215
1218
|
headers
|
|
1216
1219
|
};
|
|
1217
|
-
return
|
|
1220
|
+
return transporter.request(request, requestOptions);
|
|
1218
1221
|
},
|
|
1219
1222
|
/**
|
|
1220
1223
|
* Retrieves the languages for which standard dictionary entries are turned off.
|
|
@@ -1234,7 +1237,7 @@ function createSearchClient({
|
|
|
1234
1237
|
queryParameters,
|
|
1235
1238
|
headers
|
|
1236
1239
|
};
|
|
1237
|
-
return
|
|
1240
|
+
return transporter.request(request, requestOptions);
|
|
1238
1241
|
},
|
|
1239
1242
|
/**
|
|
1240
1243
|
* 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.
|
|
@@ -1271,7 +1274,7 @@ function createSearchClient({
|
|
|
1271
1274
|
queryParameters,
|
|
1272
1275
|
headers
|
|
1273
1276
|
};
|
|
1274
|
-
return
|
|
1277
|
+
return transporter.request(request, requestOptions);
|
|
1275
1278
|
},
|
|
1276
1279
|
/**
|
|
1277
1280
|
* Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects).
|
|
@@ -1304,7 +1307,7 @@ function createSearchClient({
|
|
|
1304
1307
|
queryParameters,
|
|
1305
1308
|
headers
|
|
1306
1309
|
};
|
|
1307
|
-
return
|
|
1310
|
+
return transporter.request(request, requestOptions);
|
|
1308
1311
|
},
|
|
1309
1312
|
/**
|
|
1310
1313
|
* Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
|
|
@@ -1334,7 +1337,7 @@ function createSearchClient({
|
|
|
1334
1337
|
useReadTransporter: true,
|
|
1335
1338
|
cacheable: true
|
|
1336
1339
|
};
|
|
1337
|
-
return
|
|
1340
|
+
return transporter.request(request, requestOptions);
|
|
1338
1341
|
},
|
|
1339
1342
|
/**
|
|
1340
1343
|
* Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
|
@@ -1363,7 +1366,7 @@ function createSearchClient({
|
|
|
1363
1366
|
queryParameters,
|
|
1364
1367
|
headers
|
|
1365
1368
|
};
|
|
1366
|
-
return
|
|
1369
|
+
return transporter.request(request, requestOptions);
|
|
1367
1370
|
},
|
|
1368
1371
|
/**
|
|
1369
1372
|
* Retrieves an object with non-null index settings.
|
|
@@ -1388,7 +1391,7 @@ function createSearchClient({
|
|
|
1388
1391
|
queryParameters,
|
|
1389
1392
|
headers
|
|
1390
1393
|
};
|
|
1391
|
-
return
|
|
1394
|
+
return transporter.request(request, requestOptions);
|
|
1392
1395
|
},
|
|
1393
1396
|
/**
|
|
1394
1397
|
* Retrieves all allowed IP addresses with access to your application.
|
|
@@ -1408,7 +1411,7 @@ function createSearchClient({
|
|
|
1408
1411
|
queryParameters,
|
|
1409
1412
|
headers
|
|
1410
1413
|
};
|
|
1411
|
-
return
|
|
1414
|
+
return transporter.request(request, requestOptions);
|
|
1412
1415
|
},
|
|
1413
1416
|
/**
|
|
1414
1417
|
* Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
|
@@ -1437,7 +1440,7 @@ function createSearchClient({
|
|
|
1437
1440
|
queryParameters,
|
|
1438
1441
|
headers
|
|
1439
1442
|
};
|
|
1440
|
-
return
|
|
1443
|
+
return transporter.request(request, requestOptions);
|
|
1441
1444
|
},
|
|
1442
1445
|
/**
|
|
1443
1446
|
* 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.
|
|
@@ -1466,7 +1469,7 @@ function createSearchClient({
|
|
|
1466
1469
|
queryParameters,
|
|
1467
1470
|
headers
|
|
1468
1471
|
};
|
|
1469
|
-
return
|
|
1472
|
+
return transporter.request(request, requestOptions);
|
|
1470
1473
|
},
|
|
1471
1474
|
/**
|
|
1472
1475
|
* 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.
|
|
@@ -1486,7 +1489,7 @@ function createSearchClient({
|
|
|
1486
1489
|
queryParameters,
|
|
1487
1490
|
headers
|
|
1488
1491
|
};
|
|
1489
|
-
return
|
|
1492
|
+
return transporter.request(request, requestOptions);
|
|
1490
1493
|
},
|
|
1491
1494
|
/**
|
|
1492
1495
|
* 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.
|
|
@@ -1511,7 +1514,7 @@ function createSearchClient({
|
|
|
1511
1514
|
queryParameters,
|
|
1512
1515
|
headers
|
|
1513
1516
|
};
|
|
1514
|
-
return
|
|
1517
|
+
return transporter.request(request, requestOptions);
|
|
1515
1518
|
},
|
|
1516
1519
|
/**
|
|
1517
1520
|
* 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.
|
|
@@ -1536,7 +1539,7 @@ function createSearchClient({
|
|
|
1536
1539
|
queryParameters,
|
|
1537
1540
|
headers
|
|
1538
1541
|
};
|
|
1539
|
-
return
|
|
1542
|
+
return transporter.request(request, requestOptions);
|
|
1540
1543
|
},
|
|
1541
1544
|
/**
|
|
1542
1545
|
* Lists all API keys associated with your Algolia application, including their permissions and restrictions.
|
|
@@ -1556,7 +1559,7 @@ function createSearchClient({
|
|
|
1556
1559
|
queryParameters,
|
|
1557
1560
|
headers
|
|
1558
1561
|
};
|
|
1559
|
-
return
|
|
1562
|
+
return transporter.request(request, requestOptions);
|
|
1560
1563
|
},
|
|
1561
1564
|
/**
|
|
1562
1565
|
* Lists the available clusters in a multi-cluster setup.
|
|
@@ -1576,7 +1579,7 @@ function createSearchClient({
|
|
|
1576
1579
|
queryParameters,
|
|
1577
1580
|
headers
|
|
1578
1581
|
};
|
|
1579
|
-
return
|
|
1582
|
+
return transporter.request(request, requestOptions);
|
|
1580
1583
|
},
|
|
1581
1584
|
/**
|
|
1582
1585
|
* Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
|
|
@@ -1605,7 +1608,7 @@ function createSearchClient({
|
|
|
1605
1608
|
queryParameters,
|
|
1606
1609
|
headers
|
|
1607
1610
|
};
|
|
1608
|
-
return
|
|
1611
|
+
return transporter.request(request, requestOptions);
|
|
1609
1612
|
},
|
|
1610
1613
|
/**
|
|
1611
1614
|
* 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.
|
|
@@ -1634,7 +1637,7 @@ function createSearchClient({
|
|
|
1634
1637
|
queryParameters,
|
|
1635
1638
|
headers
|
|
1636
1639
|
};
|
|
1637
|
-
return
|
|
1640
|
+
return transporter.request(request, requestOptions);
|
|
1638
1641
|
},
|
|
1639
1642
|
/**
|
|
1640
1643
|
* 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.
|
|
@@ -1659,7 +1662,7 @@ function createSearchClient({
|
|
|
1659
1662
|
headers,
|
|
1660
1663
|
data: batchParams
|
|
1661
1664
|
};
|
|
1662
|
-
return
|
|
1665
|
+
return transporter.request(request, requestOptions);
|
|
1663
1666
|
},
|
|
1664
1667
|
/**
|
|
1665
1668
|
* 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/).
|
|
@@ -1695,7 +1698,7 @@ function createSearchClient({
|
|
|
1695
1698
|
headers,
|
|
1696
1699
|
data: operationIndexParams
|
|
1697
1700
|
};
|
|
1698
|
-
return
|
|
1701
|
+
return transporter.request(request, requestOptions);
|
|
1699
1702
|
},
|
|
1700
1703
|
/**
|
|
1701
1704
|
* 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.
|
|
@@ -1733,7 +1736,7 @@ function createSearchClient({
|
|
|
1733
1736
|
headers,
|
|
1734
1737
|
data: attributesToUpdate
|
|
1735
1738
|
};
|
|
1736
|
-
return
|
|
1739
|
+
return transporter.request(request, requestOptions);
|
|
1737
1740
|
},
|
|
1738
1741
|
/**
|
|
1739
1742
|
* Deletes a user ID and its associated data from the clusters.
|
|
@@ -1758,7 +1761,7 @@ function createSearchClient({
|
|
|
1758
1761
|
queryParameters,
|
|
1759
1762
|
headers
|
|
1760
1763
|
};
|
|
1761
|
-
return
|
|
1764
|
+
return transporter.request(request, requestOptions);
|
|
1762
1765
|
},
|
|
1763
1766
|
/**
|
|
1764
1767
|
* Replaces the list of allowed sources.
|
|
@@ -1784,7 +1787,7 @@ function createSearchClient({
|
|
|
1784
1787
|
headers,
|
|
1785
1788
|
data: source
|
|
1786
1789
|
};
|
|
1787
|
-
return
|
|
1790
|
+
return transporter.request(request, requestOptions);
|
|
1788
1791
|
},
|
|
1789
1792
|
/**
|
|
1790
1793
|
* 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.
|
|
@@ -1809,7 +1812,7 @@ function createSearchClient({
|
|
|
1809
1812
|
queryParameters,
|
|
1810
1813
|
headers
|
|
1811
1814
|
};
|
|
1812
|
-
return
|
|
1815
|
+
return transporter.request(request, requestOptions);
|
|
1813
1816
|
},
|
|
1814
1817
|
/**
|
|
1815
1818
|
* 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).
|
|
@@ -1839,7 +1842,7 @@ function createSearchClient({
|
|
|
1839
1842
|
headers,
|
|
1840
1843
|
data: body
|
|
1841
1844
|
};
|
|
1842
|
-
return
|
|
1845
|
+
return transporter.request(request, requestOptions);
|
|
1843
1846
|
},
|
|
1844
1847
|
/**
|
|
1845
1848
|
* 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).
|
|
@@ -1880,7 +1883,7 @@ function createSearchClient({
|
|
|
1880
1883
|
headers,
|
|
1881
1884
|
data: rule
|
|
1882
1885
|
};
|
|
1883
|
-
return
|
|
1886
|
+
return transporter.request(request, requestOptions);
|
|
1884
1887
|
},
|
|
1885
1888
|
/**
|
|
1886
1889
|
* 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.
|
|
@@ -1918,7 +1921,7 @@ function createSearchClient({
|
|
|
1918
1921
|
headers,
|
|
1919
1922
|
data: rules
|
|
1920
1923
|
};
|
|
1921
|
-
return
|
|
1924
|
+
return transporter.request(request, requestOptions);
|
|
1922
1925
|
},
|
|
1923
1926
|
/**
|
|
1924
1927
|
* 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).
|
|
@@ -1962,7 +1965,7 @@ function createSearchClient({
|
|
|
1962
1965
|
headers,
|
|
1963
1966
|
data: synonymHit
|
|
1964
1967
|
};
|
|
1965
|
-
return
|
|
1968
|
+
return transporter.request(request, requestOptions);
|
|
1966
1969
|
},
|
|
1967
1970
|
/**
|
|
1968
1971
|
* If a synonym with the `objectID` doesn\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced.
|
|
@@ -2000,7 +2003,7 @@ function createSearchClient({
|
|
|
2000
2003
|
headers,
|
|
2001
2004
|
data: synonymHit
|
|
2002
2005
|
};
|
|
2003
|
-
return
|
|
2006
|
+
return transporter.request(request, requestOptions);
|
|
2004
2007
|
},
|
|
2005
2008
|
/**
|
|
2006
2009
|
* 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.
|
|
@@ -2051,7 +2054,7 @@ function createSearchClient({
|
|
|
2051
2054
|
useReadTransporter: true,
|
|
2052
2055
|
cacheable: true
|
|
2053
2056
|
};
|
|
2054
|
-
return
|
|
2057
|
+
return transporter.request(request, requestOptions);
|
|
2055
2058
|
},
|
|
2056
2059
|
/**
|
|
2057
2060
|
* Searches for standard and custom dictionary entries.
|
|
@@ -2093,7 +2096,7 @@ function createSearchClient({
|
|
|
2093
2096
|
useReadTransporter: true,
|
|
2094
2097
|
cacheable: true
|
|
2095
2098
|
};
|
|
2096
|
-
return
|
|
2099
|
+
return transporter.request(request, requestOptions);
|
|
2097
2100
|
},
|
|
2098
2101
|
/**
|
|
2099
2102
|
* 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**.
|
|
@@ -2126,7 +2129,7 @@ function createSearchClient({
|
|
|
2126
2129
|
useReadTransporter: true,
|
|
2127
2130
|
cacheable: true
|
|
2128
2131
|
};
|
|
2129
|
-
return
|
|
2132
|
+
return transporter.request(request, requestOptions);
|
|
2130
2133
|
},
|
|
2131
2134
|
/**
|
|
2132
2135
|
* Searches for rules in your index.
|
|
@@ -2155,7 +2158,7 @@ function createSearchClient({
|
|
|
2155
2158
|
useReadTransporter: true,
|
|
2156
2159
|
cacheable: true
|
|
2157
2160
|
};
|
|
2158
|
-
return
|
|
2161
|
+
return transporter.request(request, requestOptions);
|
|
2159
2162
|
},
|
|
2160
2163
|
/**
|
|
2161
2164
|
* 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.
|
|
@@ -2184,7 +2187,7 @@ function createSearchClient({
|
|
|
2184
2187
|
useReadTransporter: true,
|
|
2185
2188
|
cacheable: true
|
|
2186
2189
|
};
|
|
2187
|
-
return
|
|
2190
|
+
return transporter.request(request, requestOptions);
|
|
2188
2191
|
},
|
|
2189
2192
|
/**
|
|
2190
2193
|
* Searches for synonyms in your index.
|
|
@@ -2216,7 +2219,7 @@ function createSearchClient({
|
|
|
2216
2219
|
useReadTransporter: true,
|
|
2217
2220
|
cacheable: true
|
|
2218
2221
|
};
|
|
2219
|
-
return
|
|
2222
|
+
return transporter.request(request, requestOptions);
|
|
2220
2223
|
},
|
|
2221
2224
|
/**
|
|
2222
2225
|
* 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).
|
|
@@ -2246,7 +2249,7 @@ function createSearchClient({
|
|
|
2246
2249
|
useReadTransporter: true,
|
|
2247
2250
|
cacheable: true
|
|
2248
2251
|
};
|
|
2249
|
-
return
|
|
2252
|
+
return transporter.request(request, requestOptions);
|
|
2250
2253
|
},
|
|
2251
2254
|
/**
|
|
2252
2255
|
* Turns standard stop word dictionary entries on or off for a given language.
|
|
@@ -2276,7 +2279,7 @@ function createSearchClient({
|
|
|
2276
2279
|
headers,
|
|
2277
2280
|
data: dictionarySettingsParams
|
|
2278
2281
|
};
|
|
2279
|
-
return
|
|
2282
|
+
return transporter.request(request, requestOptions);
|
|
2280
2283
|
},
|
|
2281
2284
|
/**
|
|
2282
2285
|
* 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.
|
|
@@ -2310,7 +2313,7 @@ function createSearchClient({
|
|
|
2310
2313
|
headers,
|
|
2311
2314
|
data: indexSettings
|
|
2312
2315
|
};
|
|
2313
|
-
return
|
|
2316
|
+
return transporter.request(request, requestOptions);
|
|
2314
2317
|
},
|
|
2315
2318
|
/**
|
|
2316
2319
|
* Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
|
|
@@ -2343,7 +2346,7 @@ function createSearchClient({
|
|
|
2343
2346
|
headers,
|
|
2344
2347
|
data: apiKey
|
|
2345
2348
|
};
|
|
2346
|
-
return
|
|
2349
|
+
return transporter.request(request, requestOptions);
|
|
2347
2350
|
}
|
|
2348
2351
|
};
|
|
2349
2352
|
}
|