@algolia/client-search 5.55.2 → 5.57.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/README.md +4 -4
- package/dist/browser.d.ts +861 -6
- package/dist/builds/browser.js +1933 -87
- package/dist/builds/browser.js.map +1 -1
- package/dist/builds/browser.min.js +5 -5
- package/dist/builds/browser.min.js.map +1 -1
- package/dist/builds/browser.umd.js +7 -7
- package/dist/builds/fetch.js +1983 -123
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +1978 -121
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +1983 -123
- package/dist/builds/node.js.map +1 -1
- package/dist/builds/worker.js +1933 -87
- package/dist/builds/worker.js.map +1 -1
- package/dist/fetch.d.ts +861 -6
- package/dist/node.d.cts +861 -6
- package/dist/node.d.ts +861 -6
- package/dist/src/searchClient.cjs +1929 -86
- package/dist/src/searchClient.cjs.map +1 -1
- package/dist/src/searchClient.js +1932 -87
- package/dist/src/searchClient.js.map +1 -1
- package/dist/worker.d.ts +861 -6
- package/package.json +10 -10
|
@@ -25,7 +25,7 @@ __export(searchClient_exports, {
|
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(searchClient_exports);
|
|
27
27
|
var import_client_common = require("@algolia/client-common");
|
|
28
|
-
var apiClientVersion = "5.
|
|
28
|
+
var apiClientVersion = "5.57.0";
|
|
29
29
|
function getDefaultHosts(appId) {
|
|
30
30
|
return [
|
|
31
31
|
{
|
|
@@ -145,6 +145,7 @@ function createSearchClient({
|
|
|
145
145
|
maxRetries = 100,
|
|
146
146
|
timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
|
|
147
147
|
}, requestOptions) {
|
|
148
|
+
requestOptions = (0, import_client_common.withRequestId)(transporter, requestOptions);
|
|
148
149
|
let retryCount = 0;
|
|
149
150
|
return (0, import_client_common.createIterablePromise)({
|
|
150
151
|
func: () => this.getTask({ indexName, taskID }, requestOptions),
|
|
@@ -172,6 +173,7 @@ function createSearchClient({
|
|
|
172
173
|
maxRetries = 100,
|
|
173
174
|
timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
|
|
174
175
|
}, requestOptions) {
|
|
176
|
+
requestOptions = (0, import_client_common.withRequestId)(transporter, requestOptions);
|
|
175
177
|
let retryCount = 0;
|
|
176
178
|
return (0, import_client_common.createIterablePromise)({
|
|
177
179
|
func: () => this.getAppTask({ taskID }, requestOptions),
|
|
@@ -203,6 +205,7 @@ function createSearchClient({
|
|
|
203
205
|
maxRetries = 100,
|
|
204
206
|
timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
|
|
205
207
|
}, requestOptions) {
|
|
208
|
+
requestOptions = (0, import_client_common.withRequestId)(transporter, requestOptions);
|
|
206
209
|
let retryCount = 0;
|
|
207
210
|
const baseIteratorOptions = {
|
|
208
211
|
aggregator: () => retryCount += 1,
|
|
@@ -258,6 +261,7 @@ function createSearchClient({
|
|
|
258
261
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `browse` method and merged with the transporter requestOptions.
|
|
259
262
|
*/
|
|
260
263
|
browseObjects({ indexName, browseParams, ...browseObjectsOptions }, requestOptions) {
|
|
264
|
+
requestOptions = (0, import_client_common.withRequestId)(transporter, requestOptions);
|
|
261
265
|
return (0, import_client_common.createIterablePromise)({
|
|
262
266
|
func: (previousResponse) => {
|
|
263
267
|
return this.browse(
|
|
@@ -288,6 +292,7 @@ function createSearchClient({
|
|
|
288
292
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchRules` method and merged with the transporter requestOptions.
|
|
289
293
|
*/
|
|
290
294
|
browseRules({ indexName, searchRulesParams, ...browseRulesOptions }, requestOptions) {
|
|
295
|
+
requestOptions = (0, import_client_common.withRequestId)(transporter, requestOptions);
|
|
291
296
|
const params = {
|
|
292
297
|
...searchRulesParams,
|
|
293
298
|
hitsPerPage: (searchRulesParams == null ? void 0 : searchRulesParams.hitsPerPage) || 1e3
|
|
@@ -325,6 +330,7 @@ function createSearchClient({
|
|
|
325
330
|
searchSynonymsParams,
|
|
326
331
|
...browseSynonymsOptions
|
|
327
332
|
}, requestOptions) {
|
|
333
|
+
requestOptions = (0, import_client_common.withRequestId)(transporter, requestOptions);
|
|
328
334
|
const params = {
|
|
329
335
|
...searchSynonymsParams,
|
|
330
336
|
page: (searchSynonymsParams == null ? void 0 : searchSynonymsParams.page) || 0,
|
|
@@ -370,6 +376,7 @@ function createSearchClient({
|
|
|
370
376
|
batchSize = 1e3,
|
|
371
377
|
maxRetries = 100
|
|
372
378
|
}, requestOptions) {
|
|
379
|
+
requestOptions = (0, import_client_common.withRequestId)(transporter, requestOptions);
|
|
373
380
|
let requests = [];
|
|
374
381
|
const responses = [];
|
|
375
382
|
const objectEntries = objects.entries();
|
|
@@ -382,7 +389,7 @@ function createSearchClient({
|
|
|
382
389
|
}
|
|
383
390
|
if (waitForTasks) {
|
|
384
391
|
for (const resp of responses) {
|
|
385
|
-
await this.waitForTask({ indexName, taskID: resp.taskID, maxRetries });
|
|
392
|
+
await this.waitForTask({ indexName, taskID: resp.taskID, maxRetries }, requestOptions);
|
|
386
393
|
}
|
|
387
394
|
}
|
|
388
395
|
return responses;
|
|
@@ -460,6 +467,8 @@ function createSearchClient({
|
|
|
460
467
|
* Helper: Replaces all objects (records) in the given `index_name` with the given `objects`. A temporary index is created during this process in order to backup your data.
|
|
461
468
|
* See https://api-clients-automation.netlify.app/docs/custom-helpers/#replaceallobjects for implementation details.
|
|
462
469
|
*
|
|
470
|
+
* Warning: calling this method with an empty `objects` list replaces the index with an empty one, deleting all existing records.
|
|
471
|
+
*
|
|
463
472
|
* @summary Helper: Replaces all objects (records) in the given `index_name` with the given `objects`. A temporary index is created during this process in order to backup your data.
|
|
464
473
|
* @param replaceAllObjects - The `replaceAllObjects` object.
|
|
465
474
|
* @param replaceAllObjects.indexName - The `indexName` to replace `objects` in.
|
|
@@ -476,6 +485,13 @@ function createSearchClient({
|
|
|
476
485
|
scopes,
|
|
477
486
|
maxRetries = import_client_common.DEFAULT_REPLACE_ALL_OBJECTS_MAX_RETRIES
|
|
478
487
|
}, requestOptions) {
|
|
488
|
+
requestOptions = (0, import_client_common.withRequestId)(transporter, requestOptions);
|
|
489
|
+
if (objects.length === 0) {
|
|
490
|
+
(0, import_client_common.logWarning)(
|
|
491
|
+
transporter.logger,
|
|
492
|
+
`replaceAllObjects was called with an empty list of objects, which will delete all records currently in the "${indexName}" index.`
|
|
493
|
+
);
|
|
494
|
+
}
|
|
479
495
|
const randomSuffix = Math.floor(Math.random() * 1e6) + 1e5;
|
|
480
496
|
const tmpIndexName = `${indexName}_tmp_${randomSuffix}`;
|
|
481
497
|
if (scopes === void 0) {
|
|
@@ -497,11 +513,14 @@ function createSearchClient({
|
|
|
497
513
|
{ indexName: tmpIndexName, objects, waitForTasks: true, batchSize, maxRetries },
|
|
498
514
|
requestOptions
|
|
499
515
|
);
|
|
500
|
-
await this.waitForTask(
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
516
|
+
await this.waitForTask(
|
|
517
|
+
{
|
|
518
|
+
indexName: tmpIndexName,
|
|
519
|
+
taskID: copyOperationResponse.taskID,
|
|
520
|
+
maxRetries
|
|
521
|
+
},
|
|
522
|
+
requestOptions
|
|
523
|
+
);
|
|
505
524
|
copyOperationResponse = await this.operationIndex(
|
|
506
525
|
{
|
|
507
526
|
indexName,
|
|
@@ -513,11 +532,14 @@ function createSearchClient({
|
|
|
513
532
|
},
|
|
514
533
|
requestOptions
|
|
515
534
|
);
|
|
516
|
-
await this.waitForTask(
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
535
|
+
await this.waitForTask(
|
|
536
|
+
{
|
|
537
|
+
indexName: tmpIndexName,
|
|
538
|
+
taskID: copyOperationResponse.taskID,
|
|
539
|
+
maxRetries
|
|
540
|
+
},
|
|
541
|
+
requestOptions
|
|
542
|
+
);
|
|
521
543
|
const moveOperationResponse = await this.operationIndex(
|
|
522
544
|
{
|
|
523
545
|
indexName: tmpIndexName,
|
|
@@ -525,20 +547,23 @@ function createSearchClient({
|
|
|
525
547
|
},
|
|
526
548
|
requestOptions
|
|
527
549
|
);
|
|
528
|
-
await this.waitForTask(
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
550
|
+
await this.waitForTask(
|
|
551
|
+
{
|
|
552
|
+
indexName: tmpIndexName,
|
|
553
|
+
taskID: moveOperationResponse.taskID,
|
|
554
|
+
maxRetries
|
|
555
|
+
},
|
|
556
|
+
requestOptions
|
|
557
|
+
);
|
|
533
558
|
return { copyOperationResponse, batchResponses, moveOperationResponse };
|
|
534
559
|
} catch (error) {
|
|
535
|
-
await this.deleteIndex({ indexName: tmpIndexName });
|
|
560
|
+
await this.deleteIndex({ indexName: tmpIndexName }, requestOptions);
|
|
536
561
|
throw error;
|
|
537
562
|
}
|
|
538
563
|
},
|
|
539
|
-
async indexExists({ indexName }) {
|
|
564
|
+
async indexExists({ indexName }, requestOptions) {
|
|
540
565
|
try {
|
|
541
|
-
await this.getSettings({ indexName });
|
|
566
|
+
await this.getSettings({ indexName }, requestOptions);
|
|
542
567
|
} catch (error) {
|
|
543
568
|
if (error instanceof import_client_common.ApiError && error.status === 404) {
|
|
544
569
|
return false;
|
|
@@ -592,6 +617,32 @@ function createSearchClient({
|
|
|
592
617
|
};
|
|
593
618
|
return transporter.request(request, requestOptions);
|
|
594
619
|
},
|
|
620
|
+
/**
|
|
621
|
+
* Creates a new API key with specific permissions and restrictions.
|
|
622
|
+
*
|
|
623
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
624
|
+
*
|
|
625
|
+
* Required API Key ACLs:
|
|
626
|
+
* - admin
|
|
627
|
+
* @param apiKey - The apiKey object.
|
|
628
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
629
|
+
* @see addApiKey for the plain version.
|
|
630
|
+
*/
|
|
631
|
+
addApiKeyWithHTTPInfo(apiKey, requestOptions) {
|
|
632
|
+
(0, import_client_common.validateRequired)("apiKey", "addApiKeyWithHTTPInfo", apiKey);
|
|
633
|
+
(0, import_client_common.validateRequired)("apiKey.acl", "addApiKeyWithHTTPInfo", apiKey.acl);
|
|
634
|
+
const requestPath = "/1/keys";
|
|
635
|
+
const headers = {};
|
|
636
|
+
const queryParameters = {};
|
|
637
|
+
const request = {
|
|
638
|
+
method: "POST",
|
|
639
|
+
path: requestPath,
|
|
640
|
+
queryParameters,
|
|
641
|
+
headers,
|
|
642
|
+
data: apiKey
|
|
643
|
+
};
|
|
644
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
645
|
+
},
|
|
595
646
|
/**
|
|
596
647
|
* If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. If you want to use auto-generated object IDs, use the [`saveObject` operation](https://www.algolia.com/doc/rest-api/search/save-object). To update _some_ attributes of an existing record, use the [`partial` operation](https://www.algolia.com/doc/rest-api/search/partial-update-object) instead. To add, update, or replace multiple records, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch).
|
|
597
648
|
*
|
|
@@ -619,6 +670,36 @@ function createSearchClient({
|
|
|
619
670
|
};
|
|
620
671
|
return transporter.request(request, requestOptions);
|
|
621
672
|
},
|
|
673
|
+
/**
|
|
674
|
+
* If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. If you want to use auto-generated object IDs, use the [`saveObject` operation](https://www.algolia.com/doc/rest-api/search/save-object). To update _some_ attributes of an existing record, use the [`partial` operation](https://www.algolia.com/doc/rest-api/search/partial-update-object) instead. To add, update, or replace multiple records, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch).
|
|
675
|
+
*
|
|
676
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
677
|
+
*
|
|
678
|
+
* Required API Key ACLs:
|
|
679
|
+
* - addObject
|
|
680
|
+
* @param addOrUpdateObject - The addOrUpdateObject object.
|
|
681
|
+
* @param addOrUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
682
|
+
* @param addOrUpdateObject.objectID - Unique record identifier.
|
|
683
|
+
* @param addOrUpdateObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
684
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
685
|
+
* @see addOrUpdateObject for the plain version.
|
|
686
|
+
*/
|
|
687
|
+
addOrUpdateObjectWithHTTPInfo({ indexName, objectID, body }, requestOptions) {
|
|
688
|
+
(0, import_client_common.validateRequired)("indexName", "addOrUpdateObjectWithHTTPInfo", indexName);
|
|
689
|
+
(0, import_client_common.validateRequired)("objectID", "addOrUpdateObjectWithHTTPInfo", objectID);
|
|
690
|
+
(0, import_client_common.validateRequired)("body", "addOrUpdateObjectWithHTTPInfo", body);
|
|
691
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
692
|
+
const headers = {};
|
|
693
|
+
const queryParameters = {};
|
|
694
|
+
const request = {
|
|
695
|
+
method: "PUT",
|
|
696
|
+
path: requestPath,
|
|
697
|
+
queryParameters,
|
|
698
|
+
headers,
|
|
699
|
+
data: body
|
|
700
|
+
};
|
|
701
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
702
|
+
},
|
|
622
703
|
/**
|
|
623
704
|
* Adds a source to the list of allowed sources.
|
|
624
705
|
*
|
|
@@ -642,6 +723,32 @@ function createSearchClient({
|
|
|
642
723
|
};
|
|
643
724
|
return transporter.request(request, requestOptions);
|
|
644
725
|
},
|
|
726
|
+
/**
|
|
727
|
+
* Adds a source to the list of allowed sources.
|
|
728
|
+
*
|
|
729
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
730
|
+
*
|
|
731
|
+
* Required API Key ACLs:
|
|
732
|
+
* - admin
|
|
733
|
+
* @param source - Source to add.
|
|
734
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
735
|
+
* @see appendSource for the plain version.
|
|
736
|
+
*/
|
|
737
|
+
appendSourceWithHTTPInfo(source, requestOptions) {
|
|
738
|
+
(0, import_client_common.validateRequired)("source", "appendSourceWithHTTPInfo", source);
|
|
739
|
+
(0, import_client_common.validateRequired)("source.source", "appendSourceWithHTTPInfo", source.source);
|
|
740
|
+
const requestPath = "/1/security/sources/append";
|
|
741
|
+
const headers = {};
|
|
742
|
+
const queryParameters = {};
|
|
743
|
+
const request = {
|
|
744
|
+
method: "POST",
|
|
745
|
+
path: requestPath,
|
|
746
|
+
queryParameters,
|
|
747
|
+
headers,
|
|
748
|
+
data: source
|
|
749
|
+
};
|
|
750
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
751
|
+
},
|
|
645
752
|
/**
|
|
646
753
|
* 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.
|
|
647
754
|
*
|
|
@@ -673,6 +780,40 @@ function createSearchClient({
|
|
|
673
780
|
};
|
|
674
781
|
return transporter.request(request, requestOptions);
|
|
675
782
|
},
|
|
783
|
+
/**
|
|
784
|
+
* 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.
|
|
785
|
+
*
|
|
786
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
787
|
+
*
|
|
788
|
+
* Required API Key ACLs:
|
|
789
|
+
* - admin
|
|
790
|
+
*
|
|
791
|
+
* @deprecated
|
|
792
|
+
* @param assignUserId - The assignUserId object.
|
|
793
|
+
* @param assignUserId.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
794
|
+
* @param assignUserId.assignUserIdParams - The assignUserIdParams object.
|
|
795
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
796
|
+
* @see assignUserId for the plain version.
|
|
797
|
+
*/
|
|
798
|
+
assignUserIdWithHTTPInfo({ xAlgoliaUserID, assignUserIdParams }, requestOptions) {
|
|
799
|
+
(0, import_client_common.validateRequired)("xAlgoliaUserID", "assignUserIdWithHTTPInfo", xAlgoliaUserID);
|
|
800
|
+
(0, import_client_common.validateRequired)("assignUserIdParams", "assignUserIdWithHTTPInfo", assignUserIdParams);
|
|
801
|
+
(0, import_client_common.validateRequired)("assignUserIdParams.cluster", "assignUserIdWithHTTPInfo", assignUserIdParams.cluster);
|
|
802
|
+
const requestPath = "/1/clusters/mapping";
|
|
803
|
+
const headers = {};
|
|
804
|
+
const queryParameters = {};
|
|
805
|
+
if (xAlgoliaUserID !== void 0) {
|
|
806
|
+
headers["X-Algolia-User-ID"] = xAlgoliaUserID.toString();
|
|
807
|
+
}
|
|
808
|
+
const request = {
|
|
809
|
+
method: "POST",
|
|
810
|
+
path: requestPath,
|
|
811
|
+
queryParameters,
|
|
812
|
+
headers,
|
|
813
|
+
data: assignUserIdParams
|
|
814
|
+
};
|
|
815
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
816
|
+
},
|
|
676
817
|
/**
|
|
677
818
|
* 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. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
678
819
|
*
|
|
@@ -699,6 +840,35 @@ function createSearchClient({
|
|
|
699
840
|
};
|
|
700
841
|
return transporter.request(request, requestOptions);
|
|
701
842
|
},
|
|
843
|
+
/**
|
|
844
|
+
* 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. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
845
|
+
*
|
|
846
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
847
|
+
*
|
|
848
|
+
* Required API Key ACLs:
|
|
849
|
+
* - addObject
|
|
850
|
+
* @param batch - The batch object.
|
|
851
|
+
* @param batch.indexName - Name of the index on which to perform the operation.
|
|
852
|
+
* @param batch.batchWriteParams - The batchWriteParams object.
|
|
853
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
854
|
+
* @see batch for the plain version.
|
|
855
|
+
*/
|
|
856
|
+
batchWithHTTPInfo({ indexName, batchWriteParams }, requestOptions) {
|
|
857
|
+
(0, import_client_common.validateRequired)("indexName", "batchWithHTTPInfo", indexName);
|
|
858
|
+
(0, import_client_common.validateRequired)("batchWriteParams", "batchWithHTTPInfo", batchWriteParams);
|
|
859
|
+
(0, import_client_common.validateRequired)("batchWriteParams.requests", "batchWithHTTPInfo", batchWriteParams.requests);
|
|
860
|
+
const requestPath = "/1/indexes/{indexName}/batch".replace("{indexName}", encodeURIComponent(indexName));
|
|
861
|
+
const headers = {};
|
|
862
|
+
const queryParameters = {};
|
|
863
|
+
const request = {
|
|
864
|
+
method: "POST",
|
|
865
|
+
path: requestPath,
|
|
866
|
+
queryParameters,
|
|
867
|
+
headers,
|
|
868
|
+
data: batchWriteParams
|
|
869
|
+
};
|
|
870
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
871
|
+
},
|
|
702
872
|
/**
|
|
703
873
|
* Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
|
|
704
874
|
*
|
|
@@ -731,6 +901,49 @@ function createSearchClient({
|
|
|
731
901
|
};
|
|
732
902
|
return transporter.request(request, requestOptions);
|
|
733
903
|
},
|
|
904
|
+
/**
|
|
905
|
+
* Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
|
|
906
|
+
*
|
|
907
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
908
|
+
*
|
|
909
|
+
* Required API Key ACLs:
|
|
910
|
+
* - admin
|
|
911
|
+
*
|
|
912
|
+
* @deprecated
|
|
913
|
+
* @param batchAssignUserIds - The batchAssignUserIds object.
|
|
914
|
+
* @param batchAssignUserIds.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
915
|
+
* @param batchAssignUserIds.batchAssignUserIdsParams - The batchAssignUserIdsParams object.
|
|
916
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
917
|
+
* @see batchAssignUserIds for the plain version.
|
|
918
|
+
*/
|
|
919
|
+
batchAssignUserIdsWithHTTPInfo({ xAlgoliaUserID, batchAssignUserIdsParams }, requestOptions) {
|
|
920
|
+
(0, import_client_common.validateRequired)("xAlgoliaUserID", "batchAssignUserIdsWithHTTPInfo", xAlgoliaUserID);
|
|
921
|
+
(0, import_client_common.validateRequired)("batchAssignUserIdsParams", "batchAssignUserIdsWithHTTPInfo", batchAssignUserIdsParams);
|
|
922
|
+
(0, import_client_common.validateRequired)(
|
|
923
|
+
"batchAssignUserIdsParams.cluster",
|
|
924
|
+
"batchAssignUserIdsWithHTTPInfo",
|
|
925
|
+
batchAssignUserIdsParams.cluster
|
|
926
|
+
);
|
|
927
|
+
(0, import_client_common.validateRequired)(
|
|
928
|
+
"batchAssignUserIdsParams.users",
|
|
929
|
+
"batchAssignUserIdsWithHTTPInfo",
|
|
930
|
+
batchAssignUserIdsParams.users
|
|
931
|
+
);
|
|
932
|
+
const requestPath = "/1/clusters/mapping/batch";
|
|
933
|
+
const headers = {};
|
|
934
|
+
const queryParameters = {};
|
|
935
|
+
if (xAlgoliaUserID !== void 0) {
|
|
936
|
+
headers["X-Algolia-User-ID"] = xAlgoliaUserID.toString();
|
|
937
|
+
}
|
|
938
|
+
const request = {
|
|
939
|
+
method: "POST",
|
|
940
|
+
path: requestPath,
|
|
941
|
+
queryParameters,
|
|
942
|
+
headers,
|
|
943
|
+
data: batchAssignUserIdsParams
|
|
944
|
+
};
|
|
945
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
946
|
+
},
|
|
734
947
|
/**
|
|
735
948
|
* Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
|
|
736
949
|
*
|
|
@@ -764,6 +977,46 @@ function createSearchClient({
|
|
|
764
977
|
};
|
|
765
978
|
return transporter.request(request, requestOptions);
|
|
766
979
|
},
|
|
980
|
+
/**
|
|
981
|
+
* Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
|
|
982
|
+
*
|
|
983
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
984
|
+
*
|
|
985
|
+
* Required API Key ACLs:
|
|
986
|
+
* - editSettings
|
|
987
|
+
* @param batchDictionaryEntries - The batchDictionaryEntries object.
|
|
988
|
+
* @param batchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
989
|
+
* @param batchDictionaryEntries.batchDictionaryEntriesParams - The batchDictionaryEntriesParams object.
|
|
990
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
991
|
+
* @see batchDictionaryEntries for the plain version.
|
|
992
|
+
*/
|
|
993
|
+
batchDictionaryEntriesWithHTTPInfo({ dictionaryName, batchDictionaryEntriesParams }, requestOptions) {
|
|
994
|
+
(0, import_client_common.validateRequired)("dictionaryName", "batchDictionaryEntriesWithHTTPInfo", dictionaryName);
|
|
995
|
+
(0, import_client_common.validateRequired)(
|
|
996
|
+
"batchDictionaryEntriesParams",
|
|
997
|
+
"batchDictionaryEntriesWithHTTPInfo",
|
|
998
|
+
batchDictionaryEntriesParams
|
|
999
|
+
);
|
|
1000
|
+
(0, import_client_common.validateRequired)(
|
|
1001
|
+
"batchDictionaryEntriesParams.requests",
|
|
1002
|
+
"batchDictionaryEntriesWithHTTPInfo",
|
|
1003
|
+
batchDictionaryEntriesParams.requests
|
|
1004
|
+
);
|
|
1005
|
+
const requestPath = "/1/dictionaries/{dictionaryName}/batch".replace(
|
|
1006
|
+
"{dictionaryName}",
|
|
1007
|
+
encodeURIComponent(dictionaryName)
|
|
1008
|
+
);
|
|
1009
|
+
const headers = {};
|
|
1010
|
+
const queryParameters = {};
|
|
1011
|
+
const request = {
|
|
1012
|
+
method: "POST",
|
|
1013
|
+
path: requestPath,
|
|
1014
|
+
queryParameters,
|
|
1015
|
+
headers,
|
|
1016
|
+
data: batchDictionaryEntriesParams
|
|
1017
|
+
};
|
|
1018
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1019
|
+
},
|
|
767
1020
|
/**
|
|
768
1021
|
* Retrieves records from an index, up to 1,000 per request. Searching returns _hits_ (records augmented with highlighting and ranking details). Browsing returns matching records only. Use browse 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, or 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` evaluate to `true`) If you send these parameters with your browse requests, they\'re ignored.
|
|
769
1022
|
*
|
|
@@ -789,6 +1042,34 @@ function createSearchClient({
|
|
|
789
1042
|
};
|
|
790
1043
|
return transporter.request(request, requestOptions);
|
|
791
1044
|
},
|
|
1045
|
+
/**
|
|
1046
|
+
* Retrieves records from an index, up to 1,000 per request. Searching returns _hits_ (records augmented with highlighting and ranking details). Browsing returns matching records only. Use browse 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, or 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` evaluate to `true`) If you send these parameters with your browse requests, they\'re ignored.
|
|
1047
|
+
*
|
|
1048
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1049
|
+
*
|
|
1050
|
+
* Required API Key ACLs:
|
|
1051
|
+
* - browse
|
|
1052
|
+
* @param browse - The browse object.
|
|
1053
|
+
* @param browse.indexName - Name of the index on which to perform the operation.
|
|
1054
|
+
* @param browse.browseParams - The browseParams object.
|
|
1055
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1056
|
+
* @see browse for the plain version.
|
|
1057
|
+
*/
|
|
1058
|
+
browseWithHTTPInfo({ indexName, browseParams }, requestOptions) {
|
|
1059
|
+
(0, import_client_common.validateRequired)("indexName", "browseWithHTTPInfo", indexName);
|
|
1060
|
+
const requestPath = "/1/indexes/{indexName}/browse".replace("{indexName}", encodeURIComponent(indexName));
|
|
1061
|
+
const headers = {};
|
|
1062
|
+
const queryParameters = {};
|
|
1063
|
+
const request = {
|
|
1064
|
+
method: "POST",
|
|
1065
|
+
path: requestPath,
|
|
1066
|
+
queryParameters,
|
|
1067
|
+
headers,
|
|
1068
|
+
data: browseParams ? browseParams : {},
|
|
1069
|
+
useReadTransporter: true
|
|
1070
|
+
};
|
|
1071
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1072
|
+
},
|
|
792
1073
|
/**
|
|
793
1074
|
* Deletes only the records from an index while keeping settings, synonyms, and rules. This operation is resource-intensive and subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
794
1075
|
*
|
|
@@ -811,6 +1092,31 @@ function createSearchClient({
|
|
|
811
1092
|
};
|
|
812
1093
|
return transporter.request(request, requestOptions);
|
|
813
1094
|
},
|
|
1095
|
+
/**
|
|
1096
|
+
* Deletes only the records from an index while keeping settings, synonyms, and rules. This operation is resource-intensive and subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
1097
|
+
*
|
|
1098
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1099
|
+
*
|
|
1100
|
+
* Required API Key ACLs:
|
|
1101
|
+
* - deleteIndex
|
|
1102
|
+
* @param clearObjects - The clearObjects object.
|
|
1103
|
+
* @param clearObjects.indexName - Name of the index on which to perform the operation.
|
|
1104
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1105
|
+
* @see clearObjects for the plain version.
|
|
1106
|
+
*/
|
|
1107
|
+
clearObjectsWithHTTPInfo({ indexName }, requestOptions) {
|
|
1108
|
+
(0, import_client_common.validateRequired)("indexName", "clearObjectsWithHTTPInfo", indexName);
|
|
1109
|
+
const requestPath = "/1/indexes/{indexName}/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
1110
|
+
const headers = {};
|
|
1111
|
+
const queryParameters = {};
|
|
1112
|
+
const request = {
|
|
1113
|
+
method: "POST",
|
|
1114
|
+
path: requestPath,
|
|
1115
|
+
queryParameters,
|
|
1116
|
+
headers
|
|
1117
|
+
};
|
|
1118
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1119
|
+
},
|
|
814
1120
|
/**
|
|
815
1121
|
* Deletes all rules from the index.
|
|
816
1122
|
*
|
|
@@ -838,18 +1144,21 @@ function createSearchClient({
|
|
|
838
1144
|
return transporter.request(request, requestOptions);
|
|
839
1145
|
},
|
|
840
1146
|
/**
|
|
841
|
-
* Deletes all
|
|
1147
|
+
* Deletes all rules from the index.
|
|
1148
|
+
*
|
|
1149
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
842
1150
|
*
|
|
843
1151
|
* Required API Key ACLs:
|
|
844
1152
|
* - editSettings
|
|
845
|
-
* @param
|
|
846
|
-
* @param
|
|
847
|
-
* @param
|
|
1153
|
+
* @param clearRules - The clearRules object.
|
|
1154
|
+
* @param clearRules.indexName - Name of the index on which to perform the operation.
|
|
1155
|
+
* @param clearRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
848
1156
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1157
|
+
* @see clearRules for the plain version.
|
|
849
1158
|
*/
|
|
850
|
-
|
|
851
|
-
(0, import_client_common.validateRequired)("indexName", "
|
|
852
|
-
const requestPath = "/1/indexes/{indexName}/
|
|
1159
|
+
clearRulesWithHTTPInfo({ indexName, forwardToReplicas }, requestOptions) {
|
|
1160
|
+
(0, import_client_common.validateRequired)("indexName", "clearRulesWithHTTPInfo", indexName);
|
|
1161
|
+
const requestPath = "/1/indexes/{indexName}/rules/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
853
1162
|
const headers = {};
|
|
854
1163
|
const queryParameters = {};
|
|
855
1164
|
if (forwardToReplicas !== void 0) {
|
|
@@ -861,10 +1170,65 @@ function createSearchClient({
|
|
|
861
1170
|
queryParameters,
|
|
862
1171
|
headers
|
|
863
1172
|
};
|
|
864
|
-
return transporter.
|
|
1173
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
865
1174
|
},
|
|
866
1175
|
/**
|
|
867
|
-
*
|
|
1176
|
+
* Deletes all synonyms from the index.
|
|
1177
|
+
*
|
|
1178
|
+
* Required API Key ACLs:
|
|
1179
|
+
* - editSettings
|
|
1180
|
+
* @param clearSynonyms - The clearSynonyms object.
|
|
1181
|
+
* @param clearSynonyms.indexName - Name of the index on which to perform the operation.
|
|
1182
|
+
* @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1183
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1184
|
+
*/
|
|
1185
|
+
clearSynonyms({ indexName, forwardToReplicas }, requestOptions) {
|
|
1186
|
+
(0, import_client_common.validateRequired)("indexName", "clearSynonyms", indexName);
|
|
1187
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
1188
|
+
const headers = {};
|
|
1189
|
+
const queryParameters = {};
|
|
1190
|
+
if (forwardToReplicas !== void 0) {
|
|
1191
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1192
|
+
}
|
|
1193
|
+
const request = {
|
|
1194
|
+
method: "POST",
|
|
1195
|
+
path: requestPath,
|
|
1196
|
+
queryParameters,
|
|
1197
|
+
headers
|
|
1198
|
+
};
|
|
1199
|
+
return transporter.request(request, requestOptions);
|
|
1200
|
+
},
|
|
1201
|
+
/**
|
|
1202
|
+
* Deletes all synonyms from the index.
|
|
1203
|
+
*
|
|
1204
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1205
|
+
*
|
|
1206
|
+
* Required API Key ACLs:
|
|
1207
|
+
* - editSettings
|
|
1208
|
+
* @param clearSynonyms - The clearSynonyms object.
|
|
1209
|
+
* @param clearSynonyms.indexName - Name of the index on which to perform the operation.
|
|
1210
|
+
* @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1211
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1212
|
+
* @see clearSynonyms for the plain version.
|
|
1213
|
+
*/
|
|
1214
|
+
clearSynonymsWithHTTPInfo({ indexName, forwardToReplicas }, requestOptions) {
|
|
1215
|
+
(0, import_client_common.validateRequired)("indexName", "clearSynonymsWithHTTPInfo", indexName);
|
|
1216
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
1217
|
+
const headers = {};
|
|
1218
|
+
const queryParameters = {};
|
|
1219
|
+
if (forwardToReplicas !== void 0) {
|
|
1220
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1221
|
+
}
|
|
1222
|
+
const request = {
|
|
1223
|
+
method: "POST",
|
|
1224
|
+
path: requestPath,
|
|
1225
|
+
queryParameters,
|
|
1226
|
+
headers
|
|
1227
|
+
};
|
|
1228
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1229
|
+
},
|
|
1230
|
+
/**
|
|
1231
|
+
* This method lets you send requests to the Algolia REST API.
|
|
868
1232
|
* @param customDelete - The customDelete object.
|
|
869
1233
|
* @param customDelete.path - Path of the endpoint, for example `1/newFeature`.
|
|
870
1234
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -883,6 +1247,29 @@ function createSearchClient({
|
|
|
883
1247
|
};
|
|
884
1248
|
return transporter.request(request, requestOptions);
|
|
885
1249
|
},
|
|
1250
|
+
/**
|
|
1251
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1252
|
+
*
|
|
1253
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1254
|
+
* @param customDelete - The customDelete object.
|
|
1255
|
+
* @param customDelete.path - Path of the endpoint, for example `1/newFeature`.
|
|
1256
|
+
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
1257
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1258
|
+
* @see customDelete for the plain version.
|
|
1259
|
+
*/
|
|
1260
|
+
customDeleteWithHTTPInfo({ path, parameters }, requestOptions) {
|
|
1261
|
+
(0, import_client_common.validateRequired)("path", "customDeleteWithHTTPInfo", path);
|
|
1262
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1263
|
+
const headers = {};
|
|
1264
|
+
const queryParameters = parameters ? parameters : {};
|
|
1265
|
+
const request = {
|
|
1266
|
+
method: "DELETE",
|
|
1267
|
+
path: requestPath,
|
|
1268
|
+
queryParameters,
|
|
1269
|
+
headers
|
|
1270
|
+
};
|
|
1271
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1272
|
+
},
|
|
886
1273
|
/**
|
|
887
1274
|
* This method lets you send requests to the Algolia REST API.
|
|
888
1275
|
* @param customGet - The customGet object.
|
|
@@ -903,6 +1290,29 @@ function createSearchClient({
|
|
|
903
1290
|
};
|
|
904
1291
|
return transporter.request(request, requestOptions);
|
|
905
1292
|
},
|
|
1293
|
+
/**
|
|
1294
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1295
|
+
*
|
|
1296
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1297
|
+
* @param customGet - The customGet object.
|
|
1298
|
+
* @param customGet.path - Path of the endpoint, for example `1/newFeature`.
|
|
1299
|
+
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
1300
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1301
|
+
* @see customGet for the plain version.
|
|
1302
|
+
*/
|
|
1303
|
+
customGetWithHTTPInfo({ path, parameters }, requestOptions) {
|
|
1304
|
+
(0, import_client_common.validateRequired)("path", "customGetWithHTTPInfo", path);
|
|
1305
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1306
|
+
const headers = {};
|
|
1307
|
+
const queryParameters = parameters ? parameters : {};
|
|
1308
|
+
const request = {
|
|
1309
|
+
method: "GET",
|
|
1310
|
+
path: requestPath,
|
|
1311
|
+
queryParameters,
|
|
1312
|
+
headers
|
|
1313
|
+
};
|
|
1314
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1315
|
+
},
|
|
906
1316
|
/**
|
|
907
1317
|
* This method lets you send requests to the Algolia REST API.
|
|
908
1318
|
* @param customPost - The customPost object.
|
|
@@ -925,6 +1335,31 @@ function createSearchClient({
|
|
|
925
1335
|
};
|
|
926
1336
|
return transporter.request(request, requestOptions);
|
|
927
1337
|
},
|
|
1338
|
+
/**
|
|
1339
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1340
|
+
*
|
|
1341
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1342
|
+
* @param customPost - The customPost object.
|
|
1343
|
+
* @param customPost.path - Path of the endpoint, for example `1/newFeature`.
|
|
1344
|
+
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
1345
|
+
* @param customPost.body - Parameters to send with the custom request.
|
|
1346
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1347
|
+
* @see customPost for the plain version.
|
|
1348
|
+
*/
|
|
1349
|
+
customPostWithHTTPInfo({ path, parameters, body }, requestOptions) {
|
|
1350
|
+
(0, import_client_common.validateRequired)("path", "customPostWithHTTPInfo", path);
|
|
1351
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1352
|
+
const headers = {};
|
|
1353
|
+
const queryParameters = parameters ? parameters : {};
|
|
1354
|
+
const request = {
|
|
1355
|
+
method: "POST",
|
|
1356
|
+
path: requestPath,
|
|
1357
|
+
queryParameters,
|
|
1358
|
+
headers,
|
|
1359
|
+
data: body ? body : {}
|
|
1360
|
+
};
|
|
1361
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1362
|
+
},
|
|
928
1363
|
/**
|
|
929
1364
|
* This method lets you send requests to the Algolia REST API.
|
|
930
1365
|
* @param customPut - The customPut object.
|
|
@@ -947,6 +1382,31 @@ function createSearchClient({
|
|
|
947
1382
|
};
|
|
948
1383
|
return transporter.request(request, requestOptions);
|
|
949
1384
|
},
|
|
1385
|
+
/**
|
|
1386
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1387
|
+
*
|
|
1388
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1389
|
+
* @param customPut - The customPut object.
|
|
1390
|
+
* @param customPut.path - Path of the endpoint, for example `1/newFeature`.
|
|
1391
|
+
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
1392
|
+
* @param customPut.body - Parameters to send with the custom request.
|
|
1393
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1394
|
+
* @see customPut for the plain version.
|
|
1395
|
+
*/
|
|
1396
|
+
customPutWithHTTPInfo({ path, parameters, body }, requestOptions) {
|
|
1397
|
+
(0, import_client_common.validateRequired)("path", "customPutWithHTTPInfo", path);
|
|
1398
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1399
|
+
const headers = {};
|
|
1400
|
+
const queryParameters = parameters ? parameters : {};
|
|
1401
|
+
const request = {
|
|
1402
|
+
method: "PUT",
|
|
1403
|
+
path: requestPath,
|
|
1404
|
+
queryParameters,
|
|
1405
|
+
headers,
|
|
1406
|
+
data: body ? body : {}
|
|
1407
|
+
};
|
|
1408
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1409
|
+
},
|
|
950
1410
|
/**
|
|
951
1411
|
* Deletes the API key.
|
|
952
1412
|
*
|
|
@@ -969,6 +1429,31 @@ function createSearchClient({
|
|
|
969
1429
|
};
|
|
970
1430
|
return transporter.request(request, requestOptions);
|
|
971
1431
|
},
|
|
1432
|
+
/**
|
|
1433
|
+
* Deletes the API key.
|
|
1434
|
+
*
|
|
1435
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1436
|
+
*
|
|
1437
|
+
* Required API Key ACLs:
|
|
1438
|
+
* - admin
|
|
1439
|
+
* @param deleteApiKey - The deleteApiKey object.
|
|
1440
|
+
* @param deleteApiKey.key - API key.
|
|
1441
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1442
|
+
* @see deleteApiKey for the plain version.
|
|
1443
|
+
*/
|
|
1444
|
+
deleteApiKeyWithHTTPInfo({ key }, requestOptions) {
|
|
1445
|
+
(0, import_client_common.validateRequired)("key", "deleteApiKeyWithHTTPInfo", key);
|
|
1446
|
+
const requestPath = "/1/keys/{key}".replace("{key}", encodeURIComponent(key));
|
|
1447
|
+
const headers = {};
|
|
1448
|
+
const queryParameters = {};
|
|
1449
|
+
const request = {
|
|
1450
|
+
method: "DELETE",
|
|
1451
|
+
path: requestPath,
|
|
1452
|
+
queryParameters,
|
|
1453
|
+
headers
|
|
1454
|
+
};
|
|
1455
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1456
|
+
},
|
|
972
1457
|
/**
|
|
973
1458
|
* This operation doesn\'t accept empty filters. This operation is resource-intensive. Use it only if you can\'t get the object IDs of the records you want to delete. It\'s more efficient to get a list of object IDs with the [`browse` operation](https://www.algolia.com/doc/rest-api/search/browse), and then delete the records using the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch). This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
974
1459
|
*
|
|
@@ -994,6 +1479,34 @@ function createSearchClient({
|
|
|
994
1479
|
};
|
|
995
1480
|
return transporter.request(request, requestOptions);
|
|
996
1481
|
},
|
|
1482
|
+
/**
|
|
1483
|
+
* This operation doesn\'t accept empty filters. This operation is resource-intensive. Use it only if you can\'t get the object IDs of the records you want to delete. It\'s more efficient to get a list of object IDs with the [`browse` operation](https://www.algolia.com/doc/rest-api/search/browse), and then delete the records using the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch). This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
1484
|
+
*
|
|
1485
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1486
|
+
*
|
|
1487
|
+
* Required API Key ACLs:
|
|
1488
|
+
* - deleteIndex
|
|
1489
|
+
* @param deleteBy - The deleteBy object.
|
|
1490
|
+
* @param deleteBy.indexName - Name of the index on which to perform the operation.
|
|
1491
|
+
* @param deleteBy.deleteByParams - The deleteByParams object.
|
|
1492
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1493
|
+
* @see deleteBy for the plain version.
|
|
1494
|
+
*/
|
|
1495
|
+
deleteByWithHTTPInfo({ indexName, deleteByParams }, requestOptions) {
|
|
1496
|
+
(0, import_client_common.validateRequired)("indexName", "deleteByWithHTTPInfo", indexName);
|
|
1497
|
+
(0, import_client_common.validateRequired)("deleteByParams", "deleteByWithHTTPInfo", deleteByParams);
|
|
1498
|
+
const requestPath = "/1/indexes/{indexName}/deleteByQuery".replace("{indexName}", encodeURIComponent(indexName));
|
|
1499
|
+
const headers = {};
|
|
1500
|
+
const queryParameters = {};
|
|
1501
|
+
const request = {
|
|
1502
|
+
method: "POST",
|
|
1503
|
+
path: requestPath,
|
|
1504
|
+
queryParameters,
|
|
1505
|
+
headers,
|
|
1506
|
+
data: deleteByParams
|
|
1507
|
+
};
|
|
1508
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1509
|
+
},
|
|
997
1510
|
/**
|
|
998
1511
|
* 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).
|
|
999
1512
|
*
|
|
@@ -1016,6 +1529,31 @@ function createSearchClient({
|
|
|
1016
1529
|
};
|
|
1017
1530
|
return transporter.request(request, requestOptions);
|
|
1018
1531
|
},
|
|
1532
|
+
/**
|
|
1533
|
+
* 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).
|
|
1534
|
+
*
|
|
1535
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1536
|
+
*
|
|
1537
|
+
* Required API Key ACLs:
|
|
1538
|
+
* - deleteIndex
|
|
1539
|
+
* @param deleteIndex - The deleteIndex object.
|
|
1540
|
+
* @param deleteIndex.indexName - Name of the index on which to perform the operation.
|
|
1541
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1542
|
+
* @see deleteIndex for the plain version.
|
|
1543
|
+
*/
|
|
1544
|
+
deleteIndexWithHTTPInfo({ indexName }, requestOptions) {
|
|
1545
|
+
(0, import_client_common.validateRequired)("indexName", "deleteIndexWithHTTPInfo", indexName);
|
|
1546
|
+
const requestPath = "/1/indexes/{indexName}".replace("{indexName}", encodeURIComponent(indexName));
|
|
1547
|
+
const headers = {};
|
|
1548
|
+
const queryParameters = {};
|
|
1549
|
+
const request = {
|
|
1550
|
+
method: "DELETE",
|
|
1551
|
+
path: requestPath,
|
|
1552
|
+
queryParameters,
|
|
1553
|
+
headers
|
|
1554
|
+
};
|
|
1555
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1556
|
+
},
|
|
1019
1557
|
/**
|
|
1020
1558
|
* Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch). To delete records matching a query, use the [`deleteBy` operation](https://www.algolia.com/doc/rest-api/search/delete-by).
|
|
1021
1559
|
*
|
|
@@ -1040,6 +1578,33 @@ function createSearchClient({
|
|
|
1040
1578
|
};
|
|
1041
1579
|
return transporter.request(request, requestOptions);
|
|
1042
1580
|
},
|
|
1581
|
+
/**
|
|
1582
|
+
* Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch). To delete records matching a query, use the [`deleteBy` operation](https://www.algolia.com/doc/rest-api/search/delete-by).
|
|
1583
|
+
*
|
|
1584
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1585
|
+
*
|
|
1586
|
+
* Required API Key ACLs:
|
|
1587
|
+
* - deleteObject
|
|
1588
|
+
* @param deleteObject - The deleteObject object.
|
|
1589
|
+
* @param deleteObject.indexName - Name of the index on which to perform the operation.
|
|
1590
|
+
* @param deleteObject.objectID - Unique record identifier.
|
|
1591
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1592
|
+
* @see deleteObject for the plain version.
|
|
1593
|
+
*/
|
|
1594
|
+
deleteObjectWithHTTPInfo({ indexName, objectID }, requestOptions) {
|
|
1595
|
+
(0, import_client_common.validateRequired)("indexName", "deleteObjectWithHTTPInfo", indexName);
|
|
1596
|
+
(0, import_client_common.validateRequired)("objectID", "deleteObjectWithHTTPInfo", objectID);
|
|
1597
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1598
|
+
const headers = {};
|
|
1599
|
+
const queryParameters = {};
|
|
1600
|
+
const request = {
|
|
1601
|
+
method: "DELETE",
|
|
1602
|
+
path: requestPath,
|
|
1603
|
+
queryParameters,
|
|
1604
|
+
headers
|
|
1605
|
+
};
|
|
1606
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1607
|
+
},
|
|
1043
1608
|
/**
|
|
1044
1609
|
* Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-rules).
|
|
1045
1610
|
*
|
|
@@ -1068,6 +1633,37 @@ function createSearchClient({
|
|
|
1068
1633
|
};
|
|
1069
1634
|
return transporter.request(request, requestOptions);
|
|
1070
1635
|
},
|
|
1636
|
+
/**
|
|
1637
|
+
* Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-rules).
|
|
1638
|
+
*
|
|
1639
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1640
|
+
*
|
|
1641
|
+
* Required API Key ACLs:
|
|
1642
|
+
* - editSettings
|
|
1643
|
+
* @param deleteRule - The deleteRule object.
|
|
1644
|
+
* @param deleteRule.indexName - Name of the index on which to perform the operation.
|
|
1645
|
+
* @param deleteRule.objectID - Unique identifier of a rule object.
|
|
1646
|
+
* @param deleteRule.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1647
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1648
|
+
* @see deleteRule for the plain version.
|
|
1649
|
+
*/
|
|
1650
|
+
deleteRuleWithHTTPInfo({ indexName, objectID, forwardToReplicas }, requestOptions) {
|
|
1651
|
+
(0, import_client_common.validateRequired)("indexName", "deleteRuleWithHTTPInfo", indexName);
|
|
1652
|
+
(0, import_client_common.validateRequired)("objectID", "deleteRuleWithHTTPInfo", objectID);
|
|
1653
|
+
const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1654
|
+
const headers = {};
|
|
1655
|
+
const queryParameters = {};
|
|
1656
|
+
if (forwardToReplicas !== void 0) {
|
|
1657
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1658
|
+
}
|
|
1659
|
+
const request = {
|
|
1660
|
+
method: "DELETE",
|
|
1661
|
+
path: requestPath,
|
|
1662
|
+
queryParameters,
|
|
1663
|
+
headers
|
|
1664
|
+
};
|
|
1665
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1666
|
+
},
|
|
1071
1667
|
/**
|
|
1072
1668
|
* Deletes a source from the list of allowed sources.
|
|
1073
1669
|
*
|
|
@@ -1090,6 +1686,31 @@ function createSearchClient({
|
|
|
1090
1686
|
};
|
|
1091
1687
|
return transporter.request(request, requestOptions);
|
|
1092
1688
|
},
|
|
1689
|
+
/**
|
|
1690
|
+
* Deletes a source from the list of allowed sources.
|
|
1691
|
+
*
|
|
1692
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1693
|
+
*
|
|
1694
|
+
* Required API Key ACLs:
|
|
1695
|
+
* - admin
|
|
1696
|
+
* @param deleteSource - The deleteSource object.
|
|
1697
|
+
* @param deleteSource.source - IP address range of the source.
|
|
1698
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1699
|
+
* @see deleteSource for the plain version.
|
|
1700
|
+
*/
|
|
1701
|
+
deleteSourceWithHTTPInfo({ source }, requestOptions) {
|
|
1702
|
+
(0, import_client_common.validateRequired)("source", "deleteSourceWithHTTPInfo", source);
|
|
1703
|
+
const requestPath = "/1/security/sources/{source}".replace("{source}", encodeURIComponent(source));
|
|
1704
|
+
const headers = {};
|
|
1705
|
+
const queryParameters = {};
|
|
1706
|
+
const request = {
|
|
1707
|
+
method: "DELETE",
|
|
1708
|
+
path: requestPath,
|
|
1709
|
+
queryParameters,
|
|
1710
|
+
headers
|
|
1711
|
+
};
|
|
1712
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1713
|
+
},
|
|
1093
1714
|
/**
|
|
1094
1715
|
* Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-synonyms).
|
|
1095
1716
|
*
|
|
@@ -1119,7 +1740,38 @@ function createSearchClient({
|
|
|
1119
1740
|
return transporter.request(request, requestOptions);
|
|
1120
1741
|
},
|
|
1121
1742
|
/**
|
|
1122
|
-
*
|
|
1743
|
+
* Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-synonyms).
|
|
1744
|
+
*
|
|
1745
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1746
|
+
*
|
|
1747
|
+
* Required API Key ACLs:
|
|
1748
|
+
* - editSettings
|
|
1749
|
+
* @param deleteSynonym - The deleteSynonym object.
|
|
1750
|
+
* @param deleteSynonym.indexName - Name of the index on which to perform the operation.
|
|
1751
|
+
* @param deleteSynonym.objectID - Unique identifier of a synonym object.
|
|
1752
|
+
* @param deleteSynonym.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1753
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1754
|
+
* @see deleteSynonym for the plain version.
|
|
1755
|
+
*/
|
|
1756
|
+
deleteSynonymWithHTTPInfo({ indexName, objectID, forwardToReplicas }, requestOptions) {
|
|
1757
|
+
(0, import_client_common.validateRequired)("indexName", "deleteSynonymWithHTTPInfo", indexName);
|
|
1758
|
+
(0, import_client_common.validateRequired)("objectID", "deleteSynonymWithHTTPInfo", objectID);
|
|
1759
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1760
|
+
const headers = {};
|
|
1761
|
+
const queryParameters = {};
|
|
1762
|
+
if (forwardToReplicas !== void 0) {
|
|
1763
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1764
|
+
}
|
|
1765
|
+
const request = {
|
|
1766
|
+
method: "DELETE",
|
|
1767
|
+
path: requestPath,
|
|
1768
|
+
queryParameters,
|
|
1769
|
+
headers
|
|
1770
|
+
};
|
|
1771
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1772
|
+
},
|
|
1773
|
+
/**
|
|
1774
|
+
* 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, with the description replaced by `<redacted>`.
|
|
1123
1775
|
*
|
|
1124
1776
|
* Required API Key ACLs:
|
|
1125
1777
|
* - search
|
|
@@ -1140,6 +1792,31 @@ function createSearchClient({
|
|
|
1140
1792
|
};
|
|
1141
1793
|
return transporter.request(request, requestOptions);
|
|
1142
1794
|
},
|
|
1795
|
+
/**
|
|
1796
|
+
* 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, with the description replaced by `<redacted>`.
|
|
1797
|
+
*
|
|
1798
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1799
|
+
*
|
|
1800
|
+
* Required API Key ACLs:
|
|
1801
|
+
* - search
|
|
1802
|
+
* @param getApiKey - The getApiKey object.
|
|
1803
|
+
* @param getApiKey.key - API key.
|
|
1804
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1805
|
+
* @see getApiKey for the plain version.
|
|
1806
|
+
*/
|
|
1807
|
+
getApiKeyWithHTTPInfo({ key }, requestOptions) {
|
|
1808
|
+
(0, import_client_common.validateRequired)("key", "getApiKeyWithHTTPInfo", key);
|
|
1809
|
+
const requestPath = "/1/keys/{key}".replace("{key}", encodeURIComponent(key));
|
|
1810
|
+
const headers = {};
|
|
1811
|
+
const queryParameters = {};
|
|
1812
|
+
const request = {
|
|
1813
|
+
method: "GET",
|
|
1814
|
+
path: requestPath,
|
|
1815
|
+
queryParameters,
|
|
1816
|
+
headers
|
|
1817
|
+
};
|
|
1818
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1819
|
+
},
|
|
1143
1820
|
/**
|
|
1144
1821
|
* Checks the status of a given application task.
|
|
1145
1822
|
*
|
|
@@ -1162,6 +1839,31 @@ function createSearchClient({
|
|
|
1162
1839
|
};
|
|
1163
1840
|
return transporter.request(request, requestOptions);
|
|
1164
1841
|
},
|
|
1842
|
+
/**
|
|
1843
|
+
* Checks the status of a given application task.
|
|
1844
|
+
*
|
|
1845
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1846
|
+
*
|
|
1847
|
+
* Required API Key ACLs:
|
|
1848
|
+
* - editSettings
|
|
1849
|
+
* @param getAppTask - The getAppTask object.
|
|
1850
|
+
* @param getAppTask.taskID - Unique task identifier.
|
|
1851
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1852
|
+
* @see getAppTask for the plain version.
|
|
1853
|
+
*/
|
|
1854
|
+
getAppTaskWithHTTPInfo({ taskID }, requestOptions) {
|
|
1855
|
+
(0, import_client_common.validateRequired)("taskID", "getAppTaskWithHTTPInfo", taskID);
|
|
1856
|
+
const requestPath = "/1/task/{taskID}".replace("{taskID}", encodeURIComponent(taskID));
|
|
1857
|
+
const headers = {};
|
|
1858
|
+
const queryParameters = {};
|
|
1859
|
+
const request = {
|
|
1860
|
+
method: "GET",
|
|
1861
|
+
path: requestPath,
|
|
1862
|
+
queryParameters,
|
|
1863
|
+
headers
|
|
1864
|
+
};
|
|
1865
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1866
|
+
},
|
|
1165
1867
|
/**
|
|
1166
1868
|
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
1167
1869
|
*
|
|
@@ -1181,6 +1883,28 @@ function createSearchClient({
|
|
|
1181
1883
|
};
|
|
1182
1884
|
return transporter.request(request, requestOptions);
|
|
1183
1885
|
},
|
|
1886
|
+
/**
|
|
1887
|
+
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
1888
|
+
*
|
|
1889
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1890
|
+
*
|
|
1891
|
+
* Required API Key ACLs:
|
|
1892
|
+
* - settings
|
|
1893
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1894
|
+
* @see getDictionaryLanguages for the plain version.
|
|
1895
|
+
*/
|
|
1896
|
+
getDictionaryLanguagesWithHTTPInfo(requestOptions) {
|
|
1897
|
+
const requestPath = "/1/dictionaries/*/languages";
|
|
1898
|
+
const headers = {};
|
|
1899
|
+
const queryParameters = {};
|
|
1900
|
+
const request = {
|
|
1901
|
+
method: "GET",
|
|
1902
|
+
path: requestPath,
|
|
1903
|
+
queryParameters,
|
|
1904
|
+
headers
|
|
1905
|
+
};
|
|
1906
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1907
|
+
},
|
|
1184
1908
|
/**
|
|
1185
1909
|
* Retrieves the languages for which standard dictionary entries are turned off.
|
|
1186
1910
|
*
|
|
@@ -1200,6 +1924,28 @@ function createSearchClient({
|
|
|
1200
1924
|
};
|
|
1201
1925
|
return transporter.request(request, requestOptions);
|
|
1202
1926
|
},
|
|
1927
|
+
/**
|
|
1928
|
+
* Retrieves the languages for which standard dictionary entries are turned off.
|
|
1929
|
+
*
|
|
1930
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1931
|
+
*
|
|
1932
|
+
* Required API Key ACLs:
|
|
1933
|
+
* - settings
|
|
1934
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1935
|
+
* @see getDictionarySettings for the plain version.
|
|
1936
|
+
*/
|
|
1937
|
+
getDictionarySettingsWithHTTPInfo(requestOptions) {
|
|
1938
|
+
const requestPath = "/1/dictionaries/*/settings";
|
|
1939
|
+
const headers = {};
|
|
1940
|
+
const queryParameters = {};
|
|
1941
|
+
const request = {
|
|
1942
|
+
method: "GET",
|
|
1943
|
+
path: requestPath,
|
|
1944
|
+
queryParameters,
|
|
1945
|
+
headers
|
|
1946
|
+
};
|
|
1947
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1948
|
+
},
|
|
1203
1949
|
/**
|
|
1204
1950
|
* 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/articles/17245378392977-How-does-Algolia-count-records-and-operations) but doesn\'t appear in the logs itself.
|
|
1205
1951
|
*
|
|
@@ -1236,6 +1982,45 @@ function createSearchClient({
|
|
|
1236
1982
|
};
|
|
1237
1983
|
return transporter.request(request, requestOptions);
|
|
1238
1984
|
},
|
|
1985
|
+
/**
|
|
1986
|
+
* 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/articles/17245378392977-How-does-Algolia-count-records-and-operations) but doesn\'t appear in the logs itself.
|
|
1987
|
+
*
|
|
1988
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1989
|
+
*
|
|
1990
|
+
* Required API Key ACLs:
|
|
1991
|
+
* - logs
|
|
1992
|
+
* @param getLogs - The getLogs object.
|
|
1993
|
+
* @param getLogs.offset - First log entry to retrieve. The most recent entries are listed first.
|
|
1994
|
+
* @param getLogs.length - Maximum number of entries to retrieve.
|
|
1995
|
+
* @param getLogs.indexName - Index for which to retrieve log entries. By default, log entries are retrieved for all indices.
|
|
1996
|
+
* @param getLogs.type - Type of log entries to retrieve. By default, all log entries are retrieved.
|
|
1997
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1998
|
+
* @see getLogs for the plain version.
|
|
1999
|
+
*/
|
|
2000
|
+
getLogsWithHTTPInfo({ offset, length, indexName, type } = {}, requestOptions = void 0) {
|
|
2001
|
+
const requestPath = "/1/logs";
|
|
2002
|
+
const headers = {};
|
|
2003
|
+
const queryParameters = {};
|
|
2004
|
+
if (offset !== void 0) {
|
|
2005
|
+
queryParameters["offset"] = offset.toString();
|
|
2006
|
+
}
|
|
2007
|
+
if (length !== void 0) {
|
|
2008
|
+
queryParameters["length"] = length.toString();
|
|
2009
|
+
}
|
|
2010
|
+
if (indexName !== void 0) {
|
|
2011
|
+
queryParameters["indexName"] = indexName.toString();
|
|
2012
|
+
}
|
|
2013
|
+
if (type !== void 0) {
|
|
2014
|
+
queryParameters["type"] = type.toString();
|
|
2015
|
+
}
|
|
2016
|
+
const request = {
|
|
2017
|
+
method: "GET",
|
|
2018
|
+
path: requestPath,
|
|
2019
|
+
queryParameters,
|
|
2020
|
+
headers
|
|
2021
|
+
};
|
|
2022
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2023
|
+
},
|
|
1239
2024
|
/**
|
|
1240
2025
|
* Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](https://www.algolia.com/doc/rest-api/search/get-objects).
|
|
1241
2026
|
*
|
|
@@ -1264,6 +2049,37 @@ function createSearchClient({
|
|
|
1264
2049
|
};
|
|
1265
2050
|
return transporter.request(request, requestOptions);
|
|
1266
2051
|
},
|
|
2052
|
+
/**
|
|
2053
|
+
* Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](https://www.algolia.com/doc/rest-api/search/get-objects).
|
|
2054
|
+
*
|
|
2055
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2056
|
+
*
|
|
2057
|
+
* Required API Key ACLs:
|
|
2058
|
+
* - search
|
|
2059
|
+
* @param getObject - The getObject object.
|
|
2060
|
+
* @param getObject.indexName - Name of the index on which to perform the operation.
|
|
2061
|
+
* @param getObject.objectID - Unique record identifier.
|
|
2062
|
+
* @param getObject.attributesToRetrieve - Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` won\'t be retrieved unless the request is authenticated with the admin API key.
|
|
2063
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2064
|
+
* @see getObject for the plain version.
|
|
2065
|
+
*/
|
|
2066
|
+
getObjectWithHTTPInfo({ indexName, objectID, attributesToRetrieve }, requestOptions) {
|
|
2067
|
+
(0, import_client_common.validateRequired)("indexName", "getObjectWithHTTPInfo", indexName);
|
|
2068
|
+
(0, import_client_common.validateRequired)("objectID", "getObjectWithHTTPInfo", objectID);
|
|
2069
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2070
|
+
const headers = {};
|
|
2071
|
+
const queryParameters = {};
|
|
2072
|
+
if (attributesToRetrieve !== void 0) {
|
|
2073
|
+
queryParameters["attributesToRetrieve"] = attributesToRetrieve.toString();
|
|
2074
|
+
}
|
|
2075
|
+
const request = {
|
|
2076
|
+
method: "GET",
|
|
2077
|
+
path: requestPath,
|
|
2078
|
+
queryParameters,
|
|
2079
|
+
headers
|
|
2080
|
+
};
|
|
2081
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2082
|
+
},
|
|
1267
2083
|
/**
|
|
1268
2084
|
* Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
|
|
1269
2085
|
*
|
|
@@ -1289,6 +2105,34 @@ function createSearchClient({
|
|
|
1289
2105
|
};
|
|
1290
2106
|
return transporter.request(request, requestOptions);
|
|
1291
2107
|
},
|
|
2108
|
+
/**
|
|
2109
|
+
* Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
|
|
2110
|
+
*
|
|
2111
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2112
|
+
*
|
|
2113
|
+
* Required API Key ACLs:
|
|
2114
|
+
* - search
|
|
2115
|
+
* @param getObjectsParams - Request object.
|
|
2116
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2117
|
+
* @see getObjects for the plain version.
|
|
2118
|
+
*/
|
|
2119
|
+
getObjectsWithHTTPInfo(getObjectsParams, requestOptions) {
|
|
2120
|
+
(0, import_client_common.validateRequired)("getObjectsParams", "getObjectsWithHTTPInfo", getObjectsParams);
|
|
2121
|
+
(0, import_client_common.validateRequired)("getObjectsParams.requests", "getObjectsWithHTTPInfo", getObjectsParams.requests);
|
|
2122
|
+
const requestPath = "/1/indexes/*/objects";
|
|
2123
|
+
const headers = {};
|
|
2124
|
+
const queryParameters = {};
|
|
2125
|
+
const request = {
|
|
2126
|
+
method: "POST",
|
|
2127
|
+
path: requestPath,
|
|
2128
|
+
queryParameters,
|
|
2129
|
+
headers,
|
|
2130
|
+
data: getObjectsParams,
|
|
2131
|
+
useReadTransporter: true,
|
|
2132
|
+
cacheable: true
|
|
2133
|
+
};
|
|
2134
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2135
|
+
},
|
|
1292
2136
|
/**
|
|
1293
2137
|
* Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-rules).
|
|
1294
2138
|
*
|
|
@@ -1314,42 +2158,50 @@ function createSearchClient({
|
|
|
1314
2158
|
return transporter.request(request, requestOptions);
|
|
1315
2159
|
},
|
|
1316
2160
|
/**
|
|
1317
|
-
* Retrieves
|
|
2161
|
+
* Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-rules).
|
|
2162
|
+
*
|
|
2163
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1318
2164
|
*
|
|
1319
2165
|
* Required API Key ACLs:
|
|
1320
2166
|
* - settings
|
|
1321
|
-
* @param
|
|
1322
|
-
* @param
|
|
1323
|
-
* @param
|
|
2167
|
+
* @param getRule - The getRule object.
|
|
2168
|
+
* @param getRule.indexName - Name of the index on which to perform the operation.
|
|
2169
|
+
* @param getRule.objectID - Unique identifier of a rule object.
|
|
1324
2170
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2171
|
+
* @see getRule for the plain version.
|
|
1325
2172
|
*/
|
|
1326
|
-
|
|
1327
|
-
(0, import_client_common.validateRequired)("indexName", "
|
|
1328
|
-
|
|
2173
|
+
getRuleWithHTTPInfo({ indexName, objectID }, requestOptions) {
|
|
2174
|
+
(0, import_client_common.validateRequired)("indexName", "getRuleWithHTTPInfo", indexName);
|
|
2175
|
+
(0, import_client_common.validateRequired)("objectID", "getRuleWithHTTPInfo", objectID);
|
|
2176
|
+
const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1329
2177
|
const headers = {};
|
|
1330
2178
|
const queryParameters = {};
|
|
1331
|
-
if (getVersion !== void 0) {
|
|
1332
|
-
queryParameters["getVersion"] = getVersion.toString();
|
|
1333
|
-
}
|
|
1334
2179
|
const request = {
|
|
1335
2180
|
method: "GET",
|
|
1336
2181
|
path: requestPath,
|
|
1337
2182
|
queryParameters,
|
|
1338
2183
|
headers
|
|
1339
2184
|
};
|
|
1340
|
-
return transporter.
|
|
2185
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1341
2186
|
},
|
|
1342
2187
|
/**
|
|
1343
|
-
* Retrieves
|
|
2188
|
+
* Retrieves an object with non-null index settings.
|
|
1344
2189
|
*
|
|
1345
2190
|
* Required API Key ACLs:
|
|
1346
|
-
* -
|
|
2191
|
+
* - settings
|
|
2192
|
+
* @param getSettings - The getSettings object.
|
|
2193
|
+
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
2194
|
+
* @param getSettings.getVersion - When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.
|
|
1347
2195
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1348
2196
|
*/
|
|
1349
|
-
|
|
1350
|
-
|
|
2197
|
+
getSettings({ indexName, getVersion }, requestOptions) {
|
|
2198
|
+
(0, import_client_common.validateRequired)("indexName", "getSettings", indexName);
|
|
2199
|
+
const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
|
|
1351
2200
|
const headers = {};
|
|
1352
2201
|
const queryParameters = {};
|
|
2202
|
+
if (getVersion !== void 0) {
|
|
2203
|
+
queryParameters["getVersion"] = getVersion.toString();
|
|
2204
|
+
}
|
|
1353
2205
|
const request = {
|
|
1354
2206
|
method: "GET",
|
|
1355
2207
|
path: requestPath,
|
|
@@ -1359,43 +2211,43 @@ function createSearchClient({
|
|
|
1359
2211
|
return transporter.request(request, requestOptions);
|
|
1360
2212
|
},
|
|
1361
2213
|
/**
|
|
1362
|
-
* Retrieves
|
|
2214
|
+
* Retrieves an object with non-null index settings.
|
|
2215
|
+
*
|
|
2216
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1363
2217
|
*
|
|
1364
2218
|
* Required API Key ACLs:
|
|
1365
2219
|
* - settings
|
|
1366
|
-
* @param
|
|
1367
|
-
* @param
|
|
1368
|
-
* @param
|
|
2220
|
+
* @param getSettings - The getSettings object.
|
|
2221
|
+
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
2222
|
+
* @param getSettings.getVersion - When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.
|
|
1369
2223
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2224
|
+
* @see getSettings for the plain version.
|
|
1370
2225
|
*/
|
|
1371
|
-
|
|
1372
|
-
(0, import_client_common.validateRequired)("indexName", "
|
|
1373
|
-
|
|
1374
|
-
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2226
|
+
getSettingsWithHTTPInfo({ indexName, getVersion }, requestOptions) {
|
|
2227
|
+
(0, import_client_common.validateRequired)("indexName", "getSettingsWithHTTPInfo", indexName);
|
|
2228
|
+
const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
|
|
1375
2229
|
const headers = {};
|
|
1376
2230
|
const queryParameters = {};
|
|
2231
|
+
if (getVersion !== void 0) {
|
|
2232
|
+
queryParameters["getVersion"] = getVersion.toString();
|
|
2233
|
+
}
|
|
1377
2234
|
const request = {
|
|
1378
2235
|
method: "GET",
|
|
1379
2236
|
path: requestPath,
|
|
1380
2237
|
queryParameters,
|
|
1381
2238
|
headers
|
|
1382
2239
|
};
|
|
1383
|
-
return transporter.
|
|
2240
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1384
2241
|
},
|
|
1385
2242
|
/**
|
|
1386
|
-
*
|
|
2243
|
+
* Retrieves all allowed IP addresses with access to your application.
|
|
1387
2244
|
*
|
|
1388
2245
|
* Required API Key ACLs:
|
|
1389
|
-
* -
|
|
1390
|
-
* @param getTask - The getTask object.
|
|
1391
|
-
* @param getTask.indexName - Name of the index on which to perform the operation.
|
|
1392
|
-
* @param getTask.taskID - Unique task identifier.
|
|
2246
|
+
* - admin
|
|
1393
2247
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1394
2248
|
*/
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
(0, import_client_common.validateRequired)("taskID", "getTask", taskID);
|
|
1398
|
-
const requestPath = "/1/indexes/{indexName}/task/{taskID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{taskID}", encodeURIComponent(taskID));
|
|
2249
|
+
getSources(requestOptions) {
|
|
2250
|
+
const requestPath = "/1/security/sources";
|
|
1399
2251
|
const headers = {};
|
|
1400
2252
|
const queryParameters = {};
|
|
1401
2253
|
const request = {
|
|
@@ -1407,16 +2259,17 @@ function createSearchClient({
|
|
|
1407
2259
|
return transporter.request(request, requestOptions);
|
|
1408
2260
|
},
|
|
1409
2261
|
/**
|
|
1410
|
-
*
|
|
2262
|
+
* Retrieves all allowed IP addresses with access to your application.
|
|
2263
|
+
*
|
|
2264
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1411
2265
|
*
|
|
1412
2266
|
* Required API Key ACLs:
|
|
1413
2267
|
* - admin
|
|
1414
|
-
*
|
|
1415
|
-
* @deprecated
|
|
1416
2268
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2269
|
+
* @see getSources for the plain version.
|
|
1417
2270
|
*/
|
|
1418
|
-
|
|
1419
|
-
const requestPath = "/1/
|
|
2271
|
+
getSourcesWithHTTPInfo(requestOptions) {
|
|
2272
|
+
const requestPath = "/1/security/sources";
|
|
1420
2273
|
const headers = {};
|
|
1421
2274
|
const queryParameters = {};
|
|
1422
2275
|
const request = {
|
|
@@ -1425,7 +2278,154 @@ function createSearchClient({
|
|
|
1425
2278
|
queryParameters,
|
|
1426
2279
|
headers
|
|
1427
2280
|
};
|
|
1428
|
-
return transporter.
|
|
2281
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2282
|
+
},
|
|
2283
|
+
/**
|
|
2284
|
+
* Retrieves a synonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-synonyms).
|
|
2285
|
+
*
|
|
2286
|
+
* Required API Key ACLs:
|
|
2287
|
+
* - settings
|
|
2288
|
+
* @param getSynonym - The getSynonym object.
|
|
2289
|
+
* @param getSynonym.indexName - Name of the index on which to perform the operation.
|
|
2290
|
+
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
2291
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2292
|
+
*/
|
|
2293
|
+
getSynonym({ indexName, objectID }, requestOptions) {
|
|
2294
|
+
(0, import_client_common.validateRequired)("indexName", "getSynonym", indexName);
|
|
2295
|
+
(0, import_client_common.validateRequired)("objectID", "getSynonym", objectID);
|
|
2296
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2297
|
+
const headers = {};
|
|
2298
|
+
const queryParameters = {};
|
|
2299
|
+
const request = {
|
|
2300
|
+
method: "GET",
|
|
2301
|
+
path: requestPath,
|
|
2302
|
+
queryParameters,
|
|
2303
|
+
headers
|
|
2304
|
+
};
|
|
2305
|
+
return transporter.request(request, requestOptions);
|
|
2306
|
+
},
|
|
2307
|
+
/**
|
|
2308
|
+
* Retrieves a synonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-synonyms).
|
|
2309
|
+
*
|
|
2310
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2311
|
+
*
|
|
2312
|
+
* Required API Key ACLs:
|
|
2313
|
+
* - settings
|
|
2314
|
+
* @param getSynonym - The getSynonym object.
|
|
2315
|
+
* @param getSynonym.indexName - Name of the index on which to perform the operation.
|
|
2316
|
+
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
2317
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2318
|
+
* @see getSynonym for the plain version.
|
|
2319
|
+
*/
|
|
2320
|
+
getSynonymWithHTTPInfo({ indexName, objectID }, requestOptions) {
|
|
2321
|
+
(0, import_client_common.validateRequired)("indexName", "getSynonymWithHTTPInfo", indexName);
|
|
2322
|
+
(0, import_client_common.validateRequired)("objectID", "getSynonymWithHTTPInfo", objectID);
|
|
2323
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2324
|
+
const headers = {};
|
|
2325
|
+
const queryParameters = {};
|
|
2326
|
+
const request = {
|
|
2327
|
+
method: "GET",
|
|
2328
|
+
path: requestPath,
|
|
2329
|
+
queryParameters,
|
|
2330
|
+
headers
|
|
2331
|
+
};
|
|
2332
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2333
|
+
},
|
|
2334
|
+
/**
|
|
2335
|
+
* 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.
|
|
2336
|
+
*
|
|
2337
|
+
* Required API Key ACLs:
|
|
2338
|
+
* - addObject
|
|
2339
|
+
* @param getTask - The getTask object.
|
|
2340
|
+
* @param getTask.indexName - Name of the index on which to perform the operation.
|
|
2341
|
+
* @param getTask.taskID - Unique task identifier.
|
|
2342
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2343
|
+
*/
|
|
2344
|
+
getTask({ indexName, taskID }, requestOptions) {
|
|
2345
|
+
(0, import_client_common.validateRequired)("indexName", "getTask", indexName);
|
|
2346
|
+
(0, import_client_common.validateRequired)("taskID", "getTask", taskID);
|
|
2347
|
+
const requestPath = "/1/indexes/{indexName}/task/{taskID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{taskID}", encodeURIComponent(taskID));
|
|
2348
|
+
const headers = {};
|
|
2349
|
+
const queryParameters = {};
|
|
2350
|
+
const request = {
|
|
2351
|
+
method: "GET",
|
|
2352
|
+
path: requestPath,
|
|
2353
|
+
queryParameters,
|
|
2354
|
+
headers
|
|
2355
|
+
};
|
|
2356
|
+
return transporter.request(request, requestOptions);
|
|
2357
|
+
},
|
|
2358
|
+
/**
|
|
2359
|
+
* 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.
|
|
2360
|
+
*
|
|
2361
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2362
|
+
*
|
|
2363
|
+
* Required API Key ACLs:
|
|
2364
|
+
* - addObject
|
|
2365
|
+
* @param getTask - The getTask object.
|
|
2366
|
+
* @param getTask.indexName - Name of the index on which to perform the operation.
|
|
2367
|
+
* @param getTask.taskID - Unique task identifier.
|
|
2368
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2369
|
+
* @see getTask for the plain version.
|
|
2370
|
+
*/
|
|
2371
|
+
getTaskWithHTTPInfo({ indexName, taskID }, requestOptions) {
|
|
2372
|
+
(0, import_client_common.validateRequired)("indexName", "getTaskWithHTTPInfo", indexName);
|
|
2373
|
+
(0, import_client_common.validateRequired)("taskID", "getTaskWithHTTPInfo", taskID);
|
|
2374
|
+
const requestPath = "/1/indexes/{indexName}/task/{taskID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{taskID}", encodeURIComponent(taskID));
|
|
2375
|
+
const headers = {};
|
|
2376
|
+
const queryParameters = {};
|
|
2377
|
+
const request = {
|
|
2378
|
+
method: "GET",
|
|
2379
|
+
path: requestPath,
|
|
2380
|
+
queryParameters,
|
|
2381
|
+
headers
|
|
2382
|
+
};
|
|
2383
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2384
|
+
},
|
|
2385
|
+
/**
|
|
2386
|
+
* 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.
|
|
2387
|
+
*
|
|
2388
|
+
* Required API Key ACLs:
|
|
2389
|
+
* - admin
|
|
2390
|
+
*
|
|
2391
|
+
* @deprecated
|
|
2392
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2393
|
+
*/
|
|
2394
|
+
getTopUserIds(requestOptions) {
|
|
2395
|
+
const requestPath = "/1/clusters/mapping/top";
|
|
2396
|
+
const headers = {};
|
|
2397
|
+
const queryParameters = {};
|
|
2398
|
+
const request = {
|
|
2399
|
+
method: "GET",
|
|
2400
|
+
path: requestPath,
|
|
2401
|
+
queryParameters,
|
|
2402
|
+
headers
|
|
2403
|
+
};
|
|
2404
|
+
return transporter.request(request, requestOptions);
|
|
2405
|
+
},
|
|
2406
|
+
/**
|
|
2407
|
+
* 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.
|
|
2408
|
+
*
|
|
2409
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2410
|
+
*
|
|
2411
|
+
* Required API Key ACLs:
|
|
2412
|
+
* - admin
|
|
2413
|
+
*
|
|
2414
|
+
* @deprecated
|
|
2415
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2416
|
+
* @see getTopUserIds for the plain version.
|
|
2417
|
+
*/
|
|
2418
|
+
getTopUserIdsWithHTTPInfo(requestOptions) {
|
|
2419
|
+
const requestPath = "/1/clusters/mapping/top";
|
|
2420
|
+
const headers = {};
|
|
2421
|
+
const queryParameters = {};
|
|
2422
|
+
const request = {
|
|
2423
|
+
method: "GET",
|
|
2424
|
+
path: requestPath,
|
|
2425
|
+
queryParameters,
|
|
2426
|
+
headers
|
|
2427
|
+
};
|
|
2428
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1429
2429
|
},
|
|
1430
2430
|
/**
|
|
1431
2431
|
* 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.
|
|
@@ -1451,6 +2451,33 @@ function createSearchClient({
|
|
|
1451
2451
|
};
|
|
1452
2452
|
return transporter.request(request, requestOptions);
|
|
1453
2453
|
},
|
|
2454
|
+
/**
|
|
2455
|
+
* 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.
|
|
2456
|
+
*
|
|
2457
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2458
|
+
*
|
|
2459
|
+
* Required API Key ACLs:
|
|
2460
|
+
* - admin
|
|
2461
|
+
*
|
|
2462
|
+
* @deprecated
|
|
2463
|
+
* @param getUserId - The getUserId object.
|
|
2464
|
+
* @param getUserId.userID - Unique identifier of the user who makes the search request.
|
|
2465
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2466
|
+
* @see getUserId for the plain version.
|
|
2467
|
+
*/
|
|
2468
|
+
getUserIdWithHTTPInfo({ userID }, requestOptions) {
|
|
2469
|
+
(0, import_client_common.validateRequired)("userID", "getUserIdWithHTTPInfo", userID);
|
|
2470
|
+
const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
|
|
2471
|
+
const headers = {};
|
|
2472
|
+
const queryParameters = {};
|
|
2473
|
+
const request = {
|
|
2474
|
+
method: "GET",
|
|
2475
|
+
path: requestPath,
|
|
2476
|
+
queryParameters,
|
|
2477
|
+
headers
|
|
2478
|
+
};
|
|
2479
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2480
|
+
},
|
|
1454
2481
|
/**
|
|
1455
2482
|
* 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.
|
|
1456
2483
|
*
|
|
@@ -1477,6 +2504,35 @@ function createSearchClient({
|
|
|
1477
2504
|
};
|
|
1478
2505
|
return transporter.request(request, requestOptions);
|
|
1479
2506
|
},
|
|
2507
|
+
/**
|
|
2508
|
+
* 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.
|
|
2509
|
+
*
|
|
2510
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2511
|
+
*
|
|
2512
|
+
* Required API Key ACLs:
|
|
2513
|
+
* - admin
|
|
2514
|
+
*
|
|
2515
|
+
* @deprecated
|
|
2516
|
+
* @param hasPendingMappings - The hasPendingMappings object.
|
|
2517
|
+
* @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
|
|
2518
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2519
|
+
* @see hasPendingMappings for the plain version.
|
|
2520
|
+
*/
|
|
2521
|
+
hasPendingMappingsWithHTTPInfo({ getClusters } = {}, requestOptions = void 0) {
|
|
2522
|
+
const requestPath = "/1/clusters/mapping/pending";
|
|
2523
|
+
const headers = {};
|
|
2524
|
+
const queryParameters = {};
|
|
2525
|
+
if (getClusters !== void 0) {
|
|
2526
|
+
queryParameters["getClusters"] = getClusters.toString();
|
|
2527
|
+
}
|
|
2528
|
+
const request = {
|
|
2529
|
+
method: "GET",
|
|
2530
|
+
path: requestPath,
|
|
2531
|
+
queryParameters,
|
|
2532
|
+
headers
|
|
2533
|
+
};
|
|
2534
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2535
|
+
},
|
|
1480
2536
|
/**
|
|
1481
2537
|
* Lists all API keys associated with your Algolia application, including their permissions and restrictions.
|
|
1482
2538
|
*
|
|
@@ -1496,6 +2552,28 @@ function createSearchClient({
|
|
|
1496
2552
|
};
|
|
1497
2553
|
return transporter.request(request, requestOptions);
|
|
1498
2554
|
},
|
|
2555
|
+
/**
|
|
2556
|
+
* Lists all API keys associated with your Algolia application, including their permissions and restrictions.
|
|
2557
|
+
*
|
|
2558
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2559
|
+
*
|
|
2560
|
+
* Required API Key ACLs:
|
|
2561
|
+
* - admin
|
|
2562
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2563
|
+
* @see listApiKeys for the plain version.
|
|
2564
|
+
*/
|
|
2565
|
+
listApiKeysWithHTTPInfo(requestOptions) {
|
|
2566
|
+
const requestPath = "/1/keys";
|
|
2567
|
+
const headers = {};
|
|
2568
|
+
const queryParameters = {};
|
|
2569
|
+
const request = {
|
|
2570
|
+
method: "GET",
|
|
2571
|
+
path: requestPath,
|
|
2572
|
+
queryParameters,
|
|
2573
|
+
headers
|
|
2574
|
+
};
|
|
2575
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2576
|
+
},
|
|
1499
2577
|
/**
|
|
1500
2578
|
* Lists the available clusters in a multi-cluster setup.
|
|
1501
2579
|
*
|
|
@@ -1517,6 +2595,30 @@ function createSearchClient({
|
|
|
1517
2595
|
};
|
|
1518
2596
|
return transporter.request(request, requestOptions);
|
|
1519
2597
|
},
|
|
2598
|
+
/**
|
|
2599
|
+
* Lists the available clusters in a multi-cluster setup.
|
|
2600
|
+
*
|
|
2601
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2602
|
+
*
|
|
2603
|
+
* Required API Key ACLs:
|
|
2604
|
+
* - admin
|
|
2605
|
+
*
|
|
2606
|
+
* @deprecated
|
|
2607
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2608
|
+
* @see listClusters for the plain version.
|
|
2609
|
+
*/
|
|
2610
|
+
listClustersWithHTTPInfo(requestOptions) {
|
|
2611
|
+
const requestPath = "/1/clusters";
|
|
2612
|
+
const headers = {};
|
|
2613
|
+
const queryParameters = {};
|
|
2614
|
+
const request = {
|
|
2615
|
+
method: "GET",
|
|
2616
|
+
path: requestPath,
|
|
2617
|
+
queryParameters,
|
|
2618
|
+
headers
|
|
2619
|
+
};
|
|
2620
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2621
|
+
},
|
|
1520
2622
|
/**
|
|
1521
2623
|
* Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
|
|
1522
2624
|
*
|
|
@@ -1545,6 +2647,37 @@ function createSearchClient({
|
|
|
1545
2647
|
};
|
|
1546
2648
|
return transporter.request(request, requestOptions);
|
|
1547
2649
|
},
|
|
2650
|
+
/**
|
|
2651
|
+
* Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
|
|
2652
|
+
*
|
|
2653
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2654
|
+
*
|
|
2655
|
+
* Required API Key ACLs:
|
|
2656
|
+
* - listIndexes
|
|
2657
|
+
* @param listIndices - The listIndices object.
|
|
2658
|
+
* @param listIndices.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
2659
|
+
* @param listIndices.hitsPerPage - Number of hits per page.
|
|
2660
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2661
|
+
* @see listIndices for the plain version.
|
|
2662
|
+
*/
|
|
2663
|
+
listIndicesWithHTTPInfo({ page, hitsPerPage } = {}, requestOptions = void 0) {
|
|
2664
|
+
const requestPath = "/1/indexes";
|
|
2665
|
+
const headers = {};
|
|
2666
|
+
const queryParameters = {};
|
|
2667
|
+
if (page !== void 0) {
|
|
2668
|
+
queryParameters["page"] = page.toString();
|
|
2669
|
+
}
|
|
2670
|
+
if (hitsPerPage !== void 0) {
|
|
2671
|
+
queryParameters["hitsPerPage"] = hitsPerPage.toString();
|
|
2672
|
+
}
|
|
2673
|
+
const request = {
|
|
2674
|
+
method: "GET",
|
|
2675
|
+
path: requestPath,
|
|
2676
|
+
queryParameters,
|
|
2677
|
+
headers
|
|
2678
|
+
};
|
|
2679
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2680
|
+
},
|
|
1548
2681
|
/**
|
|
1549
2682
|
* 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.
|
|
1550
2683
|
*
|
|
@@ -1575,6 +2708,39 @@ function createSearchClient({
|
|
|
1575
2708
|
};
|
|
1576
2709
|
return transporter.request(request, requestOptions);
|
|
1577
2710
|
},
|
|
2711
|
+
/**
|
|
2712
|
+
* 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.
|
|
2713
|
+
*
|
|
2714
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2715
|
+
*
|
|
2716
|
+
* Required API Key ACLs:
|
|
2717
|
+
* - admin
|
|
2718
|
+
*
|
|
2719
|
+
* @deprecated
|
|
2720
|
+
* @param listUserIds - The listUserIds object.
|
|
2721
|
+
* @param listUserIds.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
2722
|
+
* @param listUserIds.hitsPerPage - Number of hits per page.
|
|
2723
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2724
|
+
* @see listUserIds for the plain version.
|
|
2725
|
+
*/
|
|
2726
|
+
listUserIdsWithHTTPInfo({ page, hitsPerPage } = {}, requestOptions = void 0) {
|
|
2727
|
+
const requestPath = "/1/clusters/mapping";
|
|
2728
|
+
const headers = {};
|
|
2729
|
+
const queryParameters = {};
|
|
2730
|
+
if (page !== void 0) {
|
|
2731
|
+
queryParameters["page"] = page.toString();
|
|
2732
|
+
}
|
|
2733
|
+
if (hitsPerPage !== void 0) {
|
|
2734
|
+
queryParameters["hitsPerPage"] = hitsPerPage.toString();
|
|
2735
|
+
}
|
|
2736
|
+
const request = {
|
|
2737
|
+
method: "GET",
|
|
2738
|
+
path: requestPath,
|
|
2739
|
+
queryParameters,
|
|
2740
|
+
headers
|
|
2741
|
+
};
|
|
2742
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2743
|
+
},
|
|
1578
2744
|
/**
|
|
1579
2745
|
* 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. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
1580
2746
|
*
|
|
@@ -1598,6 +2764,32 @@ function createSearchClient({
|
|
|
1598
2764
|
};
|
|
1599
2765
|
return transporter.request(request, requestOptions);
|
|
1600
2766
|
},
|
|
2767
|
+
/**
|
|
2768
|
+
* 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. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
2769
|
+
*
|
|
2770
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2771
|
+
*
|
|
2772
|
+
* Required API Key ACLs:
|
|
2773
|
+
* - addObject
|
|
2774
|
+
* @param batchParams - The batchParams object.
|
|
2775
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2776
|
+
* @see multipleBatch for the plain version.
|
|
2777
|
+
*/
|
|
2778
|
+
multipleBatchWithHTTPInfo(batchParams, requestOptions) {
|
|
2779
|
+
(0, import_client_common.validateRequired)("batchParams", "multipleBatchWithHTTPInfo", batchParams);
|
|
2780
|
+
(0, import_client_common.validateRequired)("batchParams.requests", "multipleBatchWithHTTPInfo", batchParams.requests);
|
|
2781
|
+
const requestPath = "/1/indexes/*/batch";
|
|
2782
|
+
const headers = {};
|
|
2783
|
+
const queryParameters = {};
|
|
2784
|
+
const request = {
|
|
2785
|
+
method: "POST",
|
|
2786
|
+
path: requestPath,
|
|
2787
|
+
queryParameters,
|
|
2788
|
+
headers,
|
|
2789
|
+
data: batchParams
|
|
2790
|
+
};
|
|
2791
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2792
|
+
},
|
|
1601
2793
|
/**
|
|
1602
2794
|
* Copies or moves (renames) an index within the same Algolia application. Notes: - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn\'t exist yet, it\'s created. - This operation is resource-intensive. **Copy** - If the source index doesn\'t exist, copying creates a new index with 0 records and default settings. - API keys from 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). - For more information, see [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices). **Move** - If the source index doesn\'t exist, moving is ignored without returning an error. - When moving an index, the analytics data keeps its 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. - For more information, see [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices). This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
1603
2795
|
*
|
|
@@ -1621,13 +2813,80 @@ function createSearchClient({
|
|
|
1621
2813
|
path: requestPath,
|
|
1622
2814
|
queryParameters,
|
|
1623
2815
|
headers,
|
|
1624
|
-
data: operationIndexParams
|
|
2816
|
+
data: operationIndexParams
|
|
2817
|
+
};
|
|
2818
|
+
return transporter.request(request, requestOptions);
|
|
2819
|
+
},
|
|
2820
|
+
/**
|
|
2821
|
+
* Copies or moves (renames) an index within the same Algolia application. Notes: - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn\'t exist yet, it\'s created. - This operation is resource-intensive. **Copy** - If the source index doesn\'t exist, copying creates a new index with 0 records and default settings. - API keys from 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). - For more information, see [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices). **Move** - If the source index doesn\'t exist, moving is ignored without returning an error. - When moving an index, the analytics data keeps its 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. - For more information, see [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices). This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
2822
|
+
*
|
|
2823
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2824
|
+
*
|
|
2825
|
+
* Required API Key ACLs:
|
|
2826
|
+
* - addObject
|
|
2827
|
+
* @param operationIndex - The operationIndex object.
|
|
2828
|
+
* @param operationIndex.indexName - Name of the index on which to perform the operation.
|
|
2829
|
+
* @param operationIndex.operationIndexParams - The operationIndexParams object.
|
|
2830
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2831
|
+
* @see operationIndex for the plain version.
|
|
2832
|
+
*/
|
|
2833
|
+
operationIndexWithHTTPInfo({ indexName, operationIndexParams }, requestOptions) {
|
|
2834
|
+
(0, import_client_common.validateRequired)("indexName", "operationIndexWithHTTPInfo", indexName);
|
|
2835
|
+
(0, import_client_common.validateRequired)("operationIndexParams", "operationIndexWithHTTPInfo", operationIndexParams);
|
|
2836
|
+
(0, import_client_common.validateRequired)("operationIndexParams.operation", "operationIndexWithHTTPInfo", operationIndexParams.operation);
|
|
2837
|
+
(0, import_client_common.validateRequired)(
|
|
2838
|
+
"operationIndexParams.destination",
|
|
2839
|
+
"operationIndexWithHTTPInfo",
|
|
2840
|
+
operationIndexParams.destination
|
|
2841
|
+
);
|
|
2842
|
+
const requestPath = "/1/indexes/{indexName}/operation".replace("{indexName}", encodeURIComponent(indexName));
|
|
2843
|
+
const headers = {};
|
|
2844
|
+
const queryParameters = {};
|
|
2845
|
+
const request = {
|
|
2846
|
+
method: "POST",
|
|
2847
|
+
path: requestPath,
|
|
2848
|
+
queryParameters,
|
|
2849
|
+
headers,
|
|
2850
|
+
data: operationIndexParams
|
|
2851
|
+
};
|
|
2852
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2853
|
+
},
|
|
2854
|
+
/**
|
|
2855
|
+
* Adds new attributes to a record, or updates 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. - Use first-level attributes only. Nested attributes aren\'t supported. If you specify a nested attribute, this operation replaces its first-level ancestor. To update attributes without replacing the full record, use these built-in operations. These operations are useful when the initial data isn\'t available. - `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. Otherwise, the update is ignored. Example: If you pass an `IncrementFrom` value of 2 for the `version` attribute but the current value is 1, the API ignores the update. If the object doesn\'t exist, the API 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. Otherwise, the update is ignored. Example: If you pass an `IncrementSet` value of 2 for the `version` attribute and the current value is 1, the API updates the object. If the object doesn\'t exist yet, the API only creates it if you pass an `IncrementSet` value greater than 0. Specify an operation by providing an object with the attribute to update as the key and its value as an object with these properties: - `_operation`: the operation to apply on the attribute. - `value`: the right-hand side argument to the operation, for example, increment or decrement step, or a value to add or remove. When updating multiple attributes or using multiple operations targeting the same record, use a single partial update for faster processing. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
2856
|
+
*
|
|
2857
|
+
* Required API Key ACLs:
|
|
2858
|
+
* - addObject
|
|
2859
|
+
* @param partialUpdateObject - The partialUpdateObject object.
|
|
2860
|
+
* @param partialUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
2861
|
+
* @param partialUpdateObject.objectID - Unique record identifier.
|
|
2862
|
+
* @param partialUpdateObject.attributesToUpdate - Attributes with their values.
|
|
2863
|
+
* @param partialUpdateObject.createIfNotExists - Whether to create a new record if it doesn\'t exist.
|
|
2864
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2865
|
+
*/
|
|
2866
|
+
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists }, requestOptions) {
|
|
2867
|
+
(0, import_client_common.validateRequired)("indexName", "partialUpdateObject", indexName);
|
|
2868
|
+
(0, import_client_common.validateRequired)("objectID", "partialUpdateObject", objectID);
|
|
2869
|
+
(0, import_client_common.validateRequired)("attributesToUpdate", "partialUpdateObject", attributesToUpdate);
|
|
2870
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2871
|
+
const headers = {};
|
|
2872
|
+
const queryParameters = {};
|
|
2873
|
+
if (createIfNotExists !== void 0) {
|
|
2874
|
+
queryParameters["createIfNotExists"] = createIfNotExists.toString();
|
|
2875
|
+
}
|
|
2876
|
+
const request = {
|
|
2877
|
+
method: "POST",
|
|
2878
|
+
path: requestPath,
|
|
2879
|
+
queryParameters,
|
|
2880
|
+
headers,
|
|
2881
|
+
data: attributesToUpdate
|
|
1625
2882
|
};
|
|
1626
2883
|
return transporter.request(request, requestOptions);
|
|
1627
2884
|
},
|
|
1628
2885
|
/**
|
|
1629
2886
|
* Adds new attributes to a record, or updates 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. - Use first-level attributes only. Nested attributes aren\'t supported. If you specify a nested attribute, this operation replaces its first-level ancestor. To update attributes without replacing the full record, use these built-in operations. These operations are useful when the initial data isn\'t available. - `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. Otherwise, the update is ignored. Example: If you pass an `IncrementFrom` value of 2 for the `version` attribute but the current value is 1, the API ignores the update. If the object doesn\'t exist, the API 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. Otherwise, the update is ignored. Example: If you pass an `IncrementSet` value of 2 for the `version` attribute and the current value is 1, the API updates the object. If the object doesn\'t exist yet, the API only creates it if you pass an `IncrementSet` value greater than 0. Specify an operation by providing an object with the attribute to update as the key and its value as an object with these properties: - `_operation`: the operation to apply on the attribute. - `value`: the right-hand side argument to the operation, for example, increment or decrement step, or a value to add or remove. When updating multiple attributes or using multiple operations targeting the same record, use a single partial update for faster processing. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
1630
2887
|
*
|
|
2888
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2889
|
+
*
|
|
1631
2890
|
* Required API Key ACLs:
|
|
1632
2891
|
* - addObject
|
|
1633
2892
|
* @param partialUpdateObject - The partialUpdateObject object.
|
|
@@ -1636,11 +2895,12 @@ function createSearchClient({
|
|
|
1636
2895
|
* @param partialUpdateObject.attributesToUpdate - Attributes with their values.
|
|
1637
2896
|
* @param partialUpdateObject.createIfNotExists - Whether to create a new record if it doesn\'t exist.
|
|
1638
2897
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2898
|
+
* @see partialUpdateObject for the plain version.
|
|
1639
2899
|
*/
|
|
1640
|
-
|
|
1641
|
-
(0, import_client_common.validateRequired)("indexName", "
|
|
1642
|
-
(0, import_client_common.validateRequired)("objectID", "
|
|
1643
|
-
(0, import_client_common.validateRequired)("attributesToUpdate", "
|
|
2900
|
+
partialUpdateObjectWithHTTPInfo({ indexName, objectID, attributesToUpdate, createIfNotExists }, requestOptions) {
|
|
2901
|
+
(0, import_client_common.validateRequired)("indexName", "partialUpdateObjectWithHTTPInfo", indexName);
|
|
2902
|
+
(0, import_client_common.validateRequired)("objectID", "partialUpdateObjectWithHTTPInfo", objectID);
|
|
2903
|
+
(0, import_client_common.validateRequired)("attributesToUpdate", "partialUpdateObjectWithHTTPInfo", attributesToUpdate);
|
|
1644
2904
|
const requestPath = "/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1645
2905
|
const headers = {};
|
|
1646
2906
|
const queryParameters = {};
|
|
@@ -1654,7 +2914,7 @@ function createSearchClient({
|
|
|
1654
2914
|
headers,
|
|
1655
2915
|
data: attributesToUpdate
|
|
1656
2916
|
};
|
|
1657
|
-
return transporter.
|
|
2917
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1658
2918
|
},
|
|
1659
2919
|
/**
|
|
1660
2920
|
* Deletes a user ID and its associated data from the clusters.
|
|
@@ -1680,6 +2940,33 @@ function createSearchClient({
|
|
|
1680
2940
|
};
|
|
1681
2941
|
return transporter.request(request, requestOptions);
|
|
1682
2942
|
},
|
|
2943
|
+
/**
|
|
2944
|
+
* Deletes a user ID and its associated data from the clusters.
|
|
2945
|
+
*
|
|
2946
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2947
|
+
*
|
|
2948
|
+
* Required API Key ACLs:
|
|
2949
|
+
* - admin
|
|
2950
|
+
*
|
|
2951
|
+
* @deprecated
|
|
2952
|
+
* @param removeUserId - The removeUserId object.
|
|
2953
|
+
* @param removeUserId.userID - Unique identifier of the user who makes the search request.
|
|
2954
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2955
|
+
* @see removeUserId for the plain version.
|
|
2956
|
+
*/
|
|
2957
|
+
removeUserIdWithHTTPInfo({ userID }, requestOptions) {
|
|
2958
|
+
(0, import_client_common.validateRequired)("userID", "removeUserIdWithHTTPInfo", userID);
|
|
2959
|
+
const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
|
|
2960
|
+
const headers = {};
|
|
2961
|
+
const queryParameters = {};
|
|
2962
|
+
const request = {
|
|
2963
|
+
method: "DELETE",
|
|
2964
|
+
path: requestPath,
|
|
2965
|
+
queryParameters,
|
|
2966
|
+
headers
|
|
2967
|
+
};
|
|
2968
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2969
|
+
},
|
|
1683
2970
|
/**
|
|
1684
2971
|
* Replaces the list of allowed sources.
|
|
1685
2972
|
*
|
|
@@ -1703,6 +2990,32 @@ function createSearchClient({
|
|
|
1703
2990
|
};
|
|
1704
2991
|
return transporter.request(request, requestOptions);
|
|
1705
2992
|
},
|
|
2993
|
+
/**
|
|
2994
|
+
* Replaces the list of allowed sources.
|
|
2995
|
+
*
|
|
2996
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2997
|
+
*
|
|
2998
|
+
* Required API Key ACLs:
|
|
2999
|
+
* - admin
|
|
3000
|
+
* @param replaceSources - The replaceSources object.
|
|
3001
|
+
* @param replaceSources.source - Allowed sources.
|
|
3002
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3003
|
+
* @see replaceSources for the plain version.
|
|
3004
|
+
*/
|
|
3005
|
+
replaceSourcesWithHTTPInfo({ source }, requestOptions) {
|
|
3006
|
+
(0, import_client_common.validateRequired)("source", "replaceSourcesWithHTTPInfo", source);
|
|
3007
|
+
const requestPath = "/1/security/sources";
|
|
3008
|
+
const headers = {};
|
|
3009
|
+
const queryParameters = {};
|
|
3010
|
+
const request = {
|
|
3011
|
+
method: "PUT",
|
|
3012
|
+
path: requestPath,
|
|
3013
|
+
queryParameters,
|
|
3014
|
+
headers,
|
|
3015
|
+
data: source
|
|
3016
|
+
};
|
|
3017
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3018
|
+
},
|
|
1706
3019
|
/**
|
|
1707
3020
|
* 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.
|
|
1708
3021
|
*
|
|
@@ -1725,6 +3038,31 @@ function createSearchClient({
|
|
|
1725
3038
|
};
|
|
1726
3039
|
return transporter.request(request, requestOptions);
|
|
1727
3040
|
},
|
|
3041
|
+
/**
|
|
3042
|
+
* 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.
|
|
3043
|
+
*
|
|
3044
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3045
|
+
*
|
|
3046
|
+
* Required API Key ACLs:
|
|
3047
|
+
* - admin
|
|
3048
|
+
* @param restoreApiKey - The restoreApiKey object.
|
|
3049
|
+
* @param restoreApiKey.key - API key.
|
|
3050
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3051
|
+
* @see restoreApiKey for the plain version.
|
|
3052
|
+
*/
|
|
3053
|
+
restoreApiKeyWithHTTPInfo({ key }, requestOptions) {
|
|
3054
|
+
(0, import_client_common.validateRequired)("key", "restoreApiKeyWithHTTPInfo", key);
|
|
3055
|
+
const requestPath = "/1/keys/{key}/restore".replace("{key}", encodeURIComponent(key));
|
|
3056
|
+
const headers = {};
|
|
3057
|
+
const queryParameters = {};
|
|
3058
|
+
const request = {
|
|
3059
|
+
method: "POST",
|
|
3060
|
+
path: requestPath,
|
|
3061
|
+
queryParameters,
|
|
3062
|
+
headers
|
|
3063
|
+
};
|
|
3064
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3065
|
+
},
|
|
1728
3066
|
/**
|
|
1729
3067
|
* Adds a record to an index or replaces 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](https://www.algolia.com/doc/rest-api/search/partial-update-object). To add, update, or replace multiple records, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch). This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
1730
3068
|
*
|
|
@@ -1750,6 +3088,34 @@ function createSearchClient({
|
|
|
1750
3088
|
};
|
|
1751
3089
|
return transporter.request(request, requestOptions);
|
|
1752
3090
|
},
|
|
3091
|
+
/**
|
|
3092
|
+
* Adds a record to an index or replaces 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](https://www.algolia.com/doc/rest-api/search/partial-update-object). To add, update, or replace multiple records, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch). This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
3093
|
+
*
|
|
3094
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3095
|
+
*
|
|
3096
|
+
* Required API Key ACLs:
|
|
3097
|
+
* - addObject
|
|
3098
|
+
* @param saveObject - The saveObject object.
|
|
3099
|
+
* @param saveObject.indexName - Name of the index on which to perform the operation.
|
|
3100
|
+
* @param saveObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
3101
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3102
|
+
* @see saveObject for the plain version.
|
|
3103
|
+
*/
|
|
3104
|
+
saveObjectWithHTTPInfo({ indexName, body }, requestOptions) {
|
|
3105
|
+
(0, import_client_common.validateRequired)("indexName", "saveObjectWithHTTPInfo", indexName);
|
|
3106
|
+
(0, import_client_common.validateRequired)("body", "saveObjectWithHTTPInfo", body);
|
|
3107
|
+
const requestPath = "/1/indexes/{indexName}".replace("{indexName}", encodeURIComponent(indexName));
|
|
3108
|
+
const headers = {};
|
|
3109
|
+
const queryParameters = {};
|
|
3110
|
+
const request = {
|
|
3111
|
+
method: "POST",
|
|
3112
|
+
path: requestPath,
|
|
3113
|
+
queryParameters,
|
|
3114
|
+
headers,
|
|
3115
|
+
data: body
|
|
3116
|
+
};
|
|
3117
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3118
|
+
},
|
|
1753
3119
|
/**
|
|
1754
3120
|
* 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](https://www.algolia.com/doc/rest-api/search/save-rules).
|
|
1755
3121
|
*
|
|
@@ -1783,6 +3149,42 @@ function createSearchClient({
|
|
|
1783
3149
|
};
|
|
1784
3150
|
return transporter.request(request, requestOptions);
|
|
1785
3151
|
},
|
|
3152
|
+
/**
|
|
3153
|
+
* 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](https://www.algolia.com/doc/rest-api/search/save-rules).
|
|
3154
|
+
*
|
|
3155
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3156
|
+
*
|
|
3157
|
+
* Required API Key ACLs:
|
|
3158
|
+
* - editSettings
|
|
3159
|
+
* @param saveRule - The saveRule object.
|
|
3160
|
+
* @param saveRule.indexName - Name of the index on which to perform the operation.
|
|
3161
|
+
* @param saveRule.objectID - Unique identifier of a rule object.
|
|
3162
|
+
* @param saveRule.rule - The rule object.
|
|
3163
|
+
* @param saveRule.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3164
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3165
|
+
* @see saveRule for the plain version.
|
|
3166
|
+
*/
|
|
3167
|
+
saveRuleWithHTTPInfo({ indexName, objectID, rule, forwardToReplicas }, requestOptions) {
|
|
3168
|
+
(0, import_client_common.validateRequired)("indexName", "saveRuleWithHTTPInfo", indexName);
|
|
3169
|
+
(0, import_client_common.validateRequired)("objectID", "saveRuleWithHTTPInfo", objectID);
|
|
3170
|
+
(0, import_client_common.validateRequired)("rule", "saveRuleWithHTTPInfo", rule);
|
|
3171
|
+
(0, import_client_common.validateRequired)("rule.objectID", "saveRuleWithHTTPInfo", rule.objectID);
|
|
3172
|
+
(0, import_client_common.validateRequired)("rule.consequence", "saveRuleWithHTTPInfo", rule.consequence);
|
|
3173
|
+
const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
3174
|
+
const headers = {};
|
|
3175
|
+
const queryParameters = {};
|
|
3176
|
+
if (forwardToReplicas !== void 0) {
|
|
3177
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3178
|
+
}
|
|
3179
|
+
const request = {
|
|
3180
|
+
method: "PUT",
|
|
3181
|
+
path: requestPath,
|
|
3182
|
+
queryParameters,
|
|
3183
|
+
headers,
|
|
3184
|
+
data: rule
|
|
3185
|
+
};
|
|
3186
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3187
|
+
},
|
|
1786
3188
|
/**
|
|
1787
3189
|
* 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. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
1788
3190
|
*
|
|
@@ -1816,6 +3218,42 @@ function createSearchClient({
|
|
|
1816
3218
|
};
|
|
1817
3219
|
return transporter.request(request, requestOptions);
|
|
1818
3220
|
},
|
|
3221
|
+
/**
|
|
3222
|
+
* 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. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
3223
|
+
*
|
|
3224
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3225
|
+
*
|
|
3226
|
+
* Required API Key ACLs:
|
|
3227
|
+
* - editSettings
|
|
3228
|
+
* @param saveRules - The saveRules object.
|
|
3229
|
+
* @param saveRules.indexName - Name of the index on which to perform the operation.
|
|
3230
|
+
* @param saveRules.rules - The rules object.
|
|
3231
|
+
* @param saveRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3232
|
+
* @param saveRules.clearExistingRules - Whether existing rules should be deleted before adding this batch.
|
|
3233
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3234
|
+
* @see saveRules for the plain version.
|
|
3235
|
+
*/
|
|
3236
|
+
saveRulesWithHTTPInfo({ indexName, rules, forwardToReplicas, clearExistingRules }, requestOptions) {
|
|
3237
|
+
(0, import_client_common.validateRequired)("indexName", "saveRulesWithHTTPInfo", indexName);
|
|
3238
|
+
(0, import_client_common.validateRequired)("rules", "saveRulesWithHTTPInfo", rules);
|
|
3239
|
+
const requestPath = "/1/indexes/{indexName}/rules/batch".replace("{indexName}", encodeURIComponent(indexName));
|
|
3240
|
+
const headers = {};
|
|
3241
|
+
const queryParameters = {};
|
|
3242
|
+
if (forwardToReplicas !== void 0) {
|
|
3243
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3244
|
+
}
|
|
3245
|
+
if (clearExistingRules !== void 0) {
|
|
3246
|
+
queryParameters["clearExistingRules"] = clearExistingRules.toString();
|
|
3247
|
+
}
|
|
3248
|
+
const request = {
|
|
3249
|
+
method: "POST",
|
|
3250
|
+
path: requestPath,
|
|
3251
|
+
queryParameters,
|
|
3252
|
+
headers,
|
|
3253
|
+
data: rules
|
|
3254
|
+
};
|
|
3255
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3256
|
+
},
|
|
1819
3257
|
/**
|
|
1820
3258
|
* 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](https://www.algolia.com/doc/rest-api/search/save-synonyms).
|
|
1821
3259
|
*
|
|
@@ -1849,6 +3287,42 @@ function createSearchClient({
|
|
|
1849
3287
|
};
|
|
1850
3288
|
return transporter.request(request, requestOptions);
|
|
1851
3289
|
},
|
|
3290
|
+
/**
|
|
3291
|
+
* 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](https://www.algolia.com/doc/rest-api/search/save-synonyms).
|
|
3292
|
+
*
|
|
3293
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3294
|
+
*
|
|
3295
|
+
* Required API Key ACLs:
|
|
3296
|
+
* - editSettings
|
|
3297
|
+
* @param saveSynonym - The saveSynonym object.
|
|
3298
|
+
* @param saveSynonym.indexName - Name of the index on which to perform the operation.
|
|
3299
|
+
* @param saveSynonym.objectID - Unique identifier of a synonym object.
|
|
3300
|
+
* @param saveSynonym.synonymHit - The synonymHit object.
|
|
3301
|
+
* @param saveSynonym.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3302
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3303
|
+
* @see saveSynonym for the plain version.
|
|
3304
|
+
*/
|
|
3305
|
+
saveSynonymWithHTTPInfo({ indexName, objectID, synonymHit, forwardToReplicas }, requestOptions) {
|
|
3306
|
+
(0, import_client_common.validateRequired)("indexName", "saveSynonymWithHTTPInfo", indexName);
|
|
3307
|
+
(0, import_client_common.validateRequired)("objectID", "saveSynonymWithHTTPInfo", objectID);
|
|
3308
|
+
(0, import_client_common.validateRequired)("synonymHit", "saveSynonymWithHTTPInfo", synonymHit);
|
|
3309
|
+
(0, import_client_common.validateRequired)("synonymHit.objectID", "saveSynonymWithHTTPInfo", synonymHit.objectID);
|
|
3310
|
+
(0, import_client_common.validateRequired)("synonymHit.type", "saveSynonymWithHTTPInfo", synonymHit.type);
|
|
3311
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
3312
|
+
const headers = {};
|
|
3313
|
+
const queryParameters = {};
|
|
3314
|
+
if (forwardToReplicas !== void 0) {
|
|
3315
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3316
|
+
}
|
|
3317
|
+
const request = {
|
|
3318
|
+
method: "PUT",
|
|
3319
|
+
path: requestPath,
|
|
3320
|
+
queryParameters,
|
|
3321
|
+
headers,
|
|
3322
|
+
data: synonymHit
|
|
3323
|
+
};
|
|
3324
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3325
|
+
},
|
|
1852
3326
|
/**
|
|
1853
3327
|
* If a synonym with the `objectID` doesn\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
1854
3328
|
*
|
|
@@ -1867,30 +3341,115 @@ function createSearchClient({
|
|
|
1867
3341
|
const requestPath = "/1/indexes/{indexName}/synonyms/batch".replace("{indexName}", encodeURIComponent(indexName));
|
|
1868
3342
|
const headers = {};
|
|
1869
3343
|
const queryParameters = {};
|
|
1870
|
-
if (forwardToReplicas !== void 0) {
|
|
1871
|
-
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1872
|
-
}
|
|
1873
|
-
if (replaceExistingSynonyms !== void 0) {
|
|
1874
|
-
queryParameters["replaceExistingSynonyms"] = replaceExistingSynonyms.toString();
|
|
1875
|
-
}
|
|
3344
|
+
if (forwardToReplicas !== void 0) {
|
|
3345
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3346
|
+
}
|
|
3347
|
+
if (replaceExistingSynonyms !== void 0) {
|
|
3348
|
+
queryParameters["replaceExistingSynonyms"] = replaceExistingSynonyms.toString();
|
|
3349
|
+
}
|
|
3350
|
+
const request = {
|
|
3351
|
+
method: "POST",
|
|
3352
|
+
path: requestPath,
|
|
3353
|
+
queryParameters,
|
|
3354
|
+
headers,
|
|
3355
|
+
data: synonymHit
|
|
3356
|
+
};
|
|
3357
|
+
return transporter.request(request, requestOptions);
|
|
3358
|
+
},
|
|
3359
|
+
/**
|
|
3360
|
+
* If a synonym with the `objectID` doesn\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
3361
|
+
*
|
|
3362
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3363
|
+
*
|
|
3364
|
+
* Required API Key ACLs:
|
|
3365
|
+
* - editSettings
|
|
3366
|
+
* @param saveSynonyms - The saveSynonyms object.
|
|
3367
|
+
* @param saveSynonyms.indexName - Name of the index on which to perform the operation.
|
|
3368
|
+
* @param saveSynonyms.synonymHit - The synonymHit object.
|
|
3369
|
+
* @param saveSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3370
|
+
* @param saveSynonyms.replaceExistingSynonyms - Whether to replace all synonyms in the index with the ones sent with this request.
|
|
3371
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3372
|
+
* @see saveSynonyms for the plain version.
|
|
3373
|
+
*/
|
|
3374
|
+
saveSynonymsWithHTTPInfo({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms }, requestOptions) {
|
|
3375
|
+
(0, import_client_common.validateRequired)("indexName", "saveSynonymsWithHTTPInfo", indexName);
|
|
3376
|
+
(0, import_client_common.validateRequired)("synonymHit", "saveSynonymsWithHTTPInfo", synonymHit);
|
|
3377
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/batch".replace("{indexName}", encodeURIComponent(indexName));
|
|
3378
|
+
const headers = {};
|
|
3379
|
+
const queryParameters = {};
|
|
3380
|
+
if (forwardToReplicas !== void 0) {
|
|
3381
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3382
|
+
}
|
|
3383
|
+
if (replaceExistingSynonyms !== void 0) {
|
|
3384
|
+
queryParameters["replaceExistingSynonyms"] = replaceExistingSynonyms.toString();
|
|
3385
|
+
}
|
|
3386
|
+
const request = {
|
|
3387
|
+
method: "POST",
|
|
3388
|
+
path: requestPath,
|
|
3389
|
+
queryParameters,
|
|
3390
|
+
headers,
|
|
3391
|
+
data: synonymHit
|
|
3392
|
+
};
|
|
3393
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3394
|
+
},
|
|
3395
|
+
/**
|
|
3396
|
+
* Runs multiple search queries against one or more indices in a single API request. Use cases include: - Searching different indices, such as products and marketing content. - Run multiple queries on the same index with different parameters or filters. If you know the expected result type, use the `searchForHits` or `searchForFacets` helper to simplify the response format.
|
|
3397
|
+
*
|
|
3398
|
+
* Required API Key ACLs:
|
|
3399
|
+
* - search
|
|
3400
|
+
* @param searchMethodParams - Multi-query search request body. Results are returned in the same order as the requests.
|
|
3401
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3402
|
+
*/
|
|
3403
|
+
search(searchMethodParams, requestOptions) {
|
|
3404
|
+
if (searchMethodParams && Array.isArray(searchMethodParams)) {
|
|
3405
|
+
const newSignatureRequest = {
|
|
3406
|
+
requests: searchMethodParams.map(({ params, ...legacyRequest }) => {
|
|
3407
|
+
if (legacyRequest.type === "facet") {
|
|
3408
|
+
return {
|
|
3409
|
+
...legacyRequest,
|
|
3410
|
+
...params,
|
|
3411
|
+
type: "facet"
|
|
3412
|
+
};
|
|
3413
|
+
}
|
|
3414
|
+
return {
|
|
3415
|
+
...legacyRequest,
|
|
3416
|
+
...params,
|
|
3417
|
+
facet: void 0,
|
|
3418
|
+
maxFacetHits: void 0,
|
|
3419
|
+
facetQuery: void 0
|
|
3420
|
+
};
|
|
3421
|
+
})
|
|
3422
|
+
};
|
|
3423
|
+
searchMethodParams = newSignatureRequest;
|
|
3424
|
+
}
|
|
3425
|
+
(0, import_client_common.validateRequired)("searchMethodParams", "search", searchMethodParams);
|
|
3426
|
+
(0, import_client_common.validateRequired)("searchMethodParams.requests", "search", searchMethodParams.requests);
|
|
3427
|
+
const requestPath = "/1/indexes/*/queries";
|
|
3428
|
+
const headers = {};
|
|
3429
|
+
const queryParameters = {};
|
|
1876
3430
|
const request = {
|
|
1877
3431
|
method: "POST",
|
|
1878
3432
|
path: requestPath,
|
|
1879
3433
|
queryParameters,
|
|
1880
3434
|
headers,
|
|
1881
|
-
data:
|
|
3435
|
+
data: searchMethodParams,
|
|
3436
|
+
useReadTransporter: true,
|
|
3437
|
+
cacheable: true
|
|
1882
3438
|
};
|
|
1883
3439
|
return transporter.request(request, requestOptions);
|
|
1884
3440
|
},
|
|
1885
3441
|
/**
|
|
1886
3442
|
* Runs multiple search queries against one or more indices in a single API request. Use cases include: - Searching different indices, such as products and marketing content. - Run multiple queries on the same index with different parameters or filters. If you know the expected result type, use the `searchForHits` or `searchForFacets` helper to simplify the response format.
|
|
1887
3443
|
*
|
|
3444
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3445
|
+
*
|
|
1888
3446
|
* Required API Key ACLs:
|
|
1889
3447
|
* - search
|
|
1890
3448
|
* @param searchMethodParams - Multi-query search request body. Results are returned in the same order as the requests.
|
|
1891
3449
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3450
|
+
* @see search for the plain version.
|
|
1892
3451
|
*/
|
|
1893
|
-
|
|
3452
|
+
searchWithHTTPInfo(searchMethodParams, requestOptions) {
|
|
1894
3453
|
if (searchMethodParams && Array.isArray(searchMethodParams)) {
|
|
1895
3454
|
const newSignatureRequest = {
|
|
1896
3455
|
requests: searchMethodParams.map(({ params, ...legacyRequest }) => {
|
|
@@ -1912,8 +3471,8 @@ function createSearchClient({
|
|
|
1912
3471
|
};
|
|
1913
3472
|
searchMethodParams = newSignatureRequest;
|
|
1914
3473
|
}
|
|
1915
|
-
(0, import_client_common.validateRequired)("searchMethodParams", "
|
|
1916
|
-
(0, import_client_common.validateRequired)("searchMethodParams.requests", "
|
|
3474
|
+
(0, import_client_common.validateRequired)("searchMethodParams", "searchWithHTTPInfo", searchMethodParams);
|
|
3475
|
+
(0, import_client_common.validateRequired)("searchMethodParams.requests", "searchWithHTTPInfo", searchMethodParams.requests);
|
|
1917
3476
|
const requestPath = "/1/indexes/*/queries";
|
|
1918
3477
|
const headers = {};
|
|
1919
3478
|
const queryParameters = {};
|
|
@@ -1926,7 +3485,7 @@ function createSearchClient({
|
|
|
1926
3485
|
useReadTransporter: true,
|
|
1927
3486
|
cacheable: true
|
|
1928
3487
|
};
|
|
1929
|
-
return transporter.
|
|
3488
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1930
3489
|
},
|
|
1931
3490
|
/**
|
|
1932
3491
|
* Searches for standard and custom dictionary entries.
|
|
@@ -1963,6 +3522,48 @@ function createSearchClient({
|
|
|
1963
3522
|
};
|
|
1964
3523
|
return transporter.request(request, requestOptions);
|
|
1965
3524
|
},
|
|
3525
|
+
/**
|
|
3526
|
+
* Searches for standard and custom dictionary entries.
|
|
3527
|
+
*
|
|
3528
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3529
|
+
*
|
|
3530
|
+
* Required API Key ACLs:
|
|
3531
|
+
* - settings
|
|
3532
|
+
* @param searchDictionaryEntries - The searchDictionaryEntries object.
|
|
3533
|
+
* @param searchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
3534
|
+
* @param searchDictionaryEntries.searchDictionaryEntriesParams - The searchDictionaryEntriesParams object.
|
|
3535
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3536
|
+
* @see searchDictionaryEntries for the plain version.
|
|
3537
|
+
*/
|
|
3538
|
+
searchDictionaryEntriesWithHTTPInfo({ dictionaryName, searchDictionaryEntriesParams }, requestOptions) {
|
|
3539
|
+
(0, import_client_common.validateRequired)("dictionaryName", "searchDictionaryEntriesWithHTTPInfo", dictionaryName);
|
|
3540
|
+
(0, import_client_common.validateRequired)(
|
|
3541
|
+
"searchDictionaryEntriesParams",
|
|
3542
|
+
"searchDictionaryEntriesWithHTTPInfo",
|
|
3543
|
+
searchDictionaryEntriesParams
|
|
3544
|
+
);
|
|
3545
|
+
(0, import_client_common.validateRequired)(
|
|
3546
|
+
"searchDictionaryEntriesParams.query",
|
|
3547
|
+
"searchDictionaryEntriesWithHTTPInfo",
|
|
3548
|
+
searchDictionaryEntriesParams.query
|
|
3549
|
+
);
|
|
3550
|
+
const requestPath = "/1/dictionaries/{dictionaryName}/search".replace(
|
|
3551
|
+
"{dictionaryName}",
|
|
3552
|
+
encodeURIComponent(dictionaryName)
|
|
3553
|
+
);
|
|
3554
|
+
const headers = {};
|
|
3555
|
+
const queryParameters = {};
|
|
3556
|
+
const request = {
|
|
3557
|
+
method: "POST",
|
|
3558
|
+
path: requestPath,
|
|
3559
|
+
queryParameters,
|
|
3560
|
+
headers,
|
|
3561
|
+
data: searchDictionaryEntriesParams,
|
|
3562
|
+
useReadTransporter: true,
|
|
3563
|
+
cacheable: true
|
|
3564
|
+
};
|
|
3565
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3566
|
+
},
|
|
1966
3567
|
/**
|
|
1967
3568
|
* 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**.
|
|
1968
3569
|
*
|
|
@@ -1991,6 +3592,37 @@ function createSearchClient({
|
|
|
1991
3592
|
};
|
|
1992
3593
|
return transporter.request(request, requestOptions);
|
|
1993
3594
|
},
|
|
3595
|
+
/**
|
|
3596
|
+
* 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**.
|
|
3597
|
+
*
|
|
3598
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3599
|
+
*
|
|
3600
|
+
* Required API Key ACLs:
|
|
3601
|
+
* - search
|
|
3602
|
+
* @param searchForFacetValues - The searchForFacetValues object.
|
|
3603
|
+
* @param searchForFacetValues.indexName - Name of the index on which to perform the operation.
|
|
3604
|
+
* @param searchForFacetValues.facetName - Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier.
|
|
3605
|
+
* @param searchForFacetValues.searchForFacetValuesRequest - The searchForFacetValuesRequest object.
|
|
3606
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3607
|
+
* @see searchForFacetValues for the plain version.
|
|
3608
|
+
*/
|
|
3609
|
+
searchForFacetValuesWithHTTPInfo({ indexName, facetName, searchForFacetValuesRequest }, requestOptions) {
|
|
3610
|
+
(0, import_client_common.validateRequired)("indexName", "searchForFacetValuesWithHTTPInfo", indexName);
|
|
3611
|
+
(0, import_client_common.validateRequired)("facetName", "searchForFacetValuesWithHTTPInfo", facetName);
|
|
3612
|
+
const requestPath = "/1/indexes/{indexName}/facets/{facetName}/query".replace("{indexName}", encodeURIComponent(indexName)).replace("{facetName}", encodeURIComponent(facetName));
|
|
3613
|
+
const headers = {};
|
|
3614
|
+
const queryParameters = {};
|
|
3615
|
+
const request = {
|
|
3616
|
+
method: "POST",
|
|
3617
|
+
path: requestPath,
|
|
3618
|
+
queryParameters,
|
|
3619
|
+
headers,
|
|
3620
|
+
data: searchForFacetValuesRequest ? searchForFacetValuesRequest : {},
|
|
3621
|
+
useReadTransporter: true,
|
|
3622
|
+
cacheable: true
|
|
3623
|
+
};
|
|
3624
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3625
|
+
},
|
|
1994
3626
|
/**
|
|
1995
3627
|
* Searches for rules in your index.
|
|
1996
3628
|
*
|
|
@@ -2017,6 +3649,35 @@ function createSearchClient({
|
|
|
2017
3649
|
};
|
|
2018
3650
|
return transporter.request(request, requestOptions);
|
|
2019
3651
|
},
|
|
3652
|
+
/**
|
|
3653
|
+
* Searches for rules in your index.
|
|
3654
|
+
*
|
|
3655
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3656
|
+
*
|
|
3657
|
+
* Required API Key ACLs:
|
|
3658
|
+
* - settings
|
|
3659
|
+
* @param searchRules - The searchRules object.
|
|
3660
|
+
* @param searchRules.indexName - Name of the index on which to perform the operation.
|
|
3661
|
+
* @param searchRules.searchRulesParams - The searchRulesParams object.
|
|
3662
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3663
|
+
* @see searchRules for the plain version.
|
|
3664
|
+
*/
|
|
3665
|
+
searchRulesWithHTTPInfo({ indexName, searchRulesParams }, requestOptions) {
|
|
3666
|
+
(0, import_client_common.validateRequired)("indexName", "searchRulesWithHTTPInfo", indexName);
|
|
3667
|
+
const requestPath = "/1/indexes/{indexName}/rules/search".replace("{indexName}", encodeURIComponent(indexName));
|
|
3668
|
+
const headers = {};
|
|
3669
|
+
const queryParameters = {};
|
|
3670
|
+
const request = {
|
|
3671
|
+
method: "POST",
|
|
3672
|
+
path: requestPath,
|
|
3673
|
+
queryParameters,
|
|
3674
|
+
headers,
|
|
3675
|
+
data: searchRulesParams ? searchRulesParams : {},
|
|
3676
|
+
useReadTransporter: true,
|
|
3677
|
+
cacheable: true
|
|
3678
|
+
};
|
|
3679
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3680
|
+
},
|
|
2020
3681
|
/**
|
|
2021
3682
|
* Searches a single index and returns matching search results as hits. This method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` operation](https://www.algolia.com/doc/rest-api/search/browse) or increase the `paginatedLimitedTo` index setting.
|
|
2022
3683
|
*
|
|
@@ -2043,6 +3704,35 @@ function createSearchClient({
|
|
|
2043
3704
|
};
|
|
2044
3705
|
return transporter.request(request, requestOptions);
|
|
2045
3706
|
},
|
|
3707
|
+
/**
|
|
3708
|
+
* Searches a single index and returns matching search results as hits. This method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` operation](https://www.algolia.com/doc/rest-api/search/browse) or increase the `paginatedLimitedTo` index setting.
|
|
3709
|
+
*
|
|
3710
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3711
|
+
*
|
|
3712
|
+
* Required API Key ACLs:
|
|
3713
|
+
* - search
|
|
3714
|
+
* @param searchSingleIndex - The searchSingleIndex object.
|
|
3715
|
+
* @param searchSingleIndex.indexName - Name of the index on which to perform the operation.
|
|
3716
|
+
* @param searchSingleIndex.searchParams - The searchParams object.
|
|
3717
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3718
|
+
* @see searchSingleIndex for the plain version.
|
|
3719
|
+
*/
|
|
3720
|
+
searchSingleIndexWithHTTPInfo({ indexName, searchParams }, requestOptions) {
|
|
3721
|
+
(0, import_client_common.validateRequired)("indexName", "searchSingleIndexWithHTTPInfo", indexName);
|
|
3722
|
+
const requestPath = "/1/indexes/{indexName}/query".replace("{indexName}", encodeURIComponent(indexName));
|
|
3723
|
+
const headers = {};
|
|
3724
|
+
const queryParameters = {};
|
|
3725
|
+
const request = {
|
|
3726
|
+
method: "POST",
|
|
3727
|
+
path: requestPath,
|
|
3728
|
+
queryParameters,
|
|
3729
|
+
headers,
|
|
3730
|
+
data: searchParams ? searchParams : {},
|
|
3731
|
+
useReadTransporter: true,
|
|
3732
|
+
cacheable: true
|
|
3733
|
+
};
|
|
3734
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3735
|
+
},
|
|
2046
3736
|
/**
|
|
2047
3737
|
* Searches for synonyms in your index.
|
|
2048
3738
|
*
|
|
@@ -2072,6 +3762,38 @@ function createSearchClient({
|
|
|
2072
3762
|
};
|
|
2073
3763
|
return transporter.request(request, requestOptions);
|
|
2074
3764
|
},
|
|
3765
|
+
/**
|
|
3766
|
+
* Searches for synonyms in your index.
|
|
3767
|
+
*
|
|
3768
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3769
|
+
*
|
|
3770
|
+
* Required API Key ACLs:
|
|
3771
|
+
* - settings
|
|
3772
|
+
* @param searchSynonyms - The searchSynonyms object.
|
|
3773
|
+
* @param searchSynonyms.indexName - Name of the index on which to perform the operation.
|
|
3774
|
+
* @param searchSynonyms.searchSynonymsParams - Body of the `searchSynonyms` operation.
|
|
3775
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3776
|
+
* @see searchSynonyms for the plain version.
|
|
3777
|
+
*/
|
|
3778
|
+
searchSynonymsWithHTTPInfo({ indexName, searchSynonymsParams }, requestOptions) {
|
|
3779
|
+
(0, import_client_common.validateRequired)("indexName", "searchSynonymsWithHTTPInfo", indexName);
|
|
3780
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/search".replace(
|
|
3781
|
+
"{indexName}",
|
|
3782
|
+
encodeURIComponent(indexName)
|
|
3783
|
+
);
|
|
3784
|
+
const headers = {};
|
|
3785
|
+
const queryParameters = {};
|
|
3786
|
+
const request = {
|
|
3787
|
+
method: "POST",
|
|
3788
|
+
path: requestPath,
|
|
3789
|
+
queryParameters,
|
|
3790
|
+
headers,
|
|
3791
|
+
data: searchSynonymsParams ? searchSynonymsParams : {},
|
|
3792
|
+
useReadTransporter: true,
|
|
3793
|
+
cacheable: true
|
|
3794
|
+
};
|
|
3795
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3796
|
+
},
|
|
2075
3797
|
/**
|
|
2076
3798
|
* 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).
|
|
2077
3799
|
*
|
|
@@ -2099,6 +3821,36 @@ function createSearchClient({
|
|
|
2099
3821
|
};
|
|
2100
3822
|
return transporter.request(request, requestOptions);
|
|
2101
3823
|
},
|
|
3824
|
+
/**
|
|
3825
|
+
* 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).
|
|
3826
|
+
*
|
|
3827
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3828
|
+
*
|
|
3829
|
+
* Required API Key ACLs:
|
|
3830
|
+
* - admin
|
|
3831
|
+
*
|
|
3832
|
+
* @deprecated
|
|
3833
|
+
* @param searchUserIdsParams - The searchUserIdsParams object.
|
|
3834
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3835
|
+
* @see searchUserIds for the plain version.
|
|
3836
|
+
*/
|
|
3837
|
+
searchUserIdsWithHTTPInfo(searchUserIdsParams, requestOptions) {
|
|
3838
|
+
(0, import_client_common.validateRequired)("searchUserIdsParams", "searchUserIdsWithHTTPInfo", searchUserIdsParams);
|
|
3839
|
+
(0, import_client_common.validateRequired)("searchUserIdsParams.query", "searchUserIdsWithHTTPInfo", searchUserIdsParams.query);
|
|
3840
|
+
const requestPath = "/1/clusters/mapping/search";
|
|
3841
|
+
const headers = {};
|
|
3842
|
+
const queryParameters = {};
|
|
3843
|
+
const request = {
|
|
3844
|
+
method: "POST",
|
|
3845
|
+
path: requestPath,
|
|
3846
|
+
queryParameters,
|
|
3847
|
+
headers,
|
|
3848
|
+
data: searchUserIdsParams,
|
|
3849
|
+
useReadTransporter: true,
|
|
3850
|
+
cacheable: true
|
|
3851
|
+
};
|
|
3852
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3853
|
+
},
|
|
2102
3854
|
/**
|
|
2103
3855
|
* Turns standard stop word dictionary entries on or off for a given language.
|
|
2104
3856
|
*
|
|
@@ -2126,6 +3878,36 @@ function createSearchClient({
|
|
|
2126
3878
|
};
|
|
2127
3879
|
return transporter.request(request, requestOptions);
|
|
2128
3880
|
},
|
|
3881
|
+
/**
|
|
3882
|
+
* Turns standard stop word dictionary entries on or off for a given language.
|
|
3883
|
+
*
|
|
3884
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3885
|
+
*
|
|
3886
|
+
* Required API Key ACLs:
|
|
3887
|
+
* - editSettings
|
|
3888
|
+
* @param dictionarySettingsParams - The dictionarySettingsParams object.
|
|
3889
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3890
|
+
* @see setDictionarySettings for the plain version.
|
|
3891
|
+
*/
|
|
3892
|
+
setDictionarySettingsWithHTTPInfo(dictionarySettingsParams, requestOptions) {
|
|
3893
|
+
(0, import_client_common.validateRequired)("dictionarySettingsParams", "setDictionarySettingsWithHTTPInfo", dictionarySettingsParams);
|
|
3894
|
+
(0, import_client_common.validateRequired)(
|
|
3895
|
+
"dictionarySettingsParams.disableStandardEntries",
|
|
3896
|
+
"setDictionarySettingsWithHTTPInfo",
|
|
3897
|
+
dictionarySettingsParams.disableStandardEntries
|
|
3898
|
+
);
|
|
3899
|
+
const requestPath = "/1/dictionaries/*/settings";
|
|
3900
|
+
const headers = {};
|
|
3901
|
+
const queryParameters = {};
|
|
3902
|
+
const request = {
|
|
3903
|
+
method: "PUT",
|
|
3904
|
+
path: requestPath,
|
|
3905
|
+
queryParameters,
|
|
3906
|
+
headers,
|
|
3907
|
+
data: dictionarySettingsParams
|
|
3908
|
+
};
|
|
3909
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3910
|
+
},
|
|
2129
3911
|
/**
|
|
2130
3912
|
* 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.
|
|
2131
3913
|
*
|
|
@@ -2155,6 +3937,38 @@ function createSearchClient({
|
|
|
2155
3937
|
};
|
|
2156
3938
|
return transporter.request(request, requestOptions);
|
|
2157
3939
|
},
|
|
3940
|
+
/**
|
|
3941
|
+
* 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.
|
|
3942
|
+
*
|
|
3943
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3944
|
+
*
|
|
3945
|
+
* Required API Key ACLs:
|
|
3946
|
+
* - editSettings
|
|
3947
|
+
* @param setSettings - The setSettings object.
|
|
3948
|
+
* @param setSettings.indexName - Name of the index on which to perform the operation.
|
|
3949
|
+
* @param setSettings.indexSettings - The indexSettings object.
|
|
3950
|
+
* @param setSettings.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3951
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3952
|
+
* @see setSettings for the plain version.
|
|
3953
|
+
*/
|
|
3954
|
+
setSettingsWithHTTPInfo({ indexName, indexSettings, forwardToReplicas }, requestOptions) {
|
|
3955
|
+
(0, import_client_common.validateRequired)("indexName", "setSettingsWithHTTPInfo", indexName);
|
|
3956
|
+
(0, import_client_common.validateRequired)("indexSettings", "setSettingsWithHTTPInfo", indexSettings);
|
|
3957
|
+
const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
|
|
3958
|
+
const headers = {};
|
|
3959
|
+
const queryParameters = {};
|
|
3960
|
+
if (forwardToReplicas !== void 0) {
|
|
3961
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3962
|
+
}
|
|
3963
|
+
const request = {
|
|
3964
|
+
method: "PUT",
|
|
3965
|
+
path: requestPath,
|
|
3966
|
+
queryParameters,
|
|
3967
|
+
headers,
|
|
3968
|
+
data: indexSettings
|
|
3969
|
+
};
|
|
3970
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3971
|
+
},
|
|
2158
3972
|
/**
|
|
2159
3973
|
* Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
|
|
2160
3974
|
*
|
|
@@ -2180,6 +3994,35 @@ function createSearchClient({
|
|
|
2180
3994
|
data: apiKey
|
|
2181
3995
|
};
|
|
2182
3996
|
return transporter.request(request, requestOptions);
|
|
3997
|
+
},
|
|
3998
|
+
/**
|
|
3999
|
+
* Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
|
|
4000
|
+
*
|
|
4001
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
4002
|
+
*
|
|
4003
|
+
* Required API Key ACLs:
|
|
4004
|
+
* - admin
|
|
4005
|
+
* @param updateApiKey - The updateApiKey object.
|
|
4006
|
+
* @param updateApiKey.key - API key.
|
|
4007
|
+
* @param updateApiKey.apiKey - The apiKey object.
|
|
4008
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4009
|
+
* @see updateApiKey for the plain version.
|
|
4010
|
+
*/
|
|
4011
|
+
updateApiKeyWithHTTPInfo({ key, apiKey }, requestOptions) {
|
|
4012
|
+
(0, import_client_common.validateRequired)("key", "updateApiKeyWithHTTPInfo", key);
|
|
4013
|
+
(0, import_client_common.validateRequired)("apiKey", "updateApiKeyWithHTTPInfo", apiKey);
|
|
4014
|
+
(0, import_client_common.validateRequired)("apiKey.acl", "updateApiKeyWithHTTPInfo", apiKey.acl);
|
|
4015
|
+
const requestPath = "/1/keys/{key}".replace("{key}", encodeURIComponent(key));
|
|
4016
|
+
const headers = {};
|
|
4017
|
+
const queryParameters = {};
|
|
4018
|
+
const request = {
|
|
4019
|
+
method: "PUT",
|
|
4020
|
+
path: requestPath,
|
|
4021
|
+
queryParameters,
|
|
4022
|
+
headers,
|
|
4023
|
+
data: apiKey
|
|
4024
|
+
};
|
|
4025
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2183
4026
|
}
|
|
2184
4027
|
};
|
|
2185
4028
|
}
|