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