@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
package/dist/builds/node.cjs
CHANGED
|
@@ -31,7 +31,7 @@ var import_requester_node_http = require("@algolia/requester-node-http");
|
|
|
31
31
|
|
|
32
32
|
// src/searchClient.ts
|
|
33
33
|
var import_client_common = require("@algolia/client-common");
|
|
34
|
-
var apiClientVersion = "5.
|
|
34
|
+
var apiClientVersion = "5.57.0";
|
|
35
35
|
function getDefaultHosts(appId) {
|
|
36
36
|
return [
|
|
37
37
|
{
|
|
@@ -151,6 +151,7 @@ function createSearchClient({
|
|
|
151
151
|
maxRetries = 100,
|
|
152
152
|
timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
|
|
153
153
|
}, requestOptions) {
|
|
154
|
+
requestOptions = (0, import_client_common.withRequestId)(transporter, requestOptions);
|
|
154
155
|
let retryCount = 0;
|
|
155
156
|
return (0, import_client_common.createIterablePromise)({
|
|
156
157
|
func: () => this.getTask({ indexName, taskID }, requestOptions),
|
|
@@ -178,6 +179,7 @@ function createSearchClient({
|
|
|
178
179
|
maxRetries = 100,
|
|
179
180
|
timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
|
|
180
181
|
}, requestOptions) {
|
|
182
|
+
requestOptions = (0, import_client_common.withRequestId)(transporter, requestOptions);
|
|
181
183
|
let retryCount = 0;
|
|
182
184
|
return (0, import_client_common.createIterablePromise)({
|
|
183
185
|
func: () => this.getAppTask({ taskID }, requestOptions),
|
|
@@ -209,6 +211,7 @@ function createSearchClient({
|
|
|
209
211
|
maxRetries = 100,
|
|
210
212
|
timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
|
|
211
213
|
}, requestOptions) {
|
|
214
|
+
requestOptions = (0, import_client_common.withRequestId)(transporter, requestOptions);
|
|
212
215
|
let retryCount = 0;
|
|
213
216
|
const baseIteratorOptions = {
|
|
214
217
|
aggregator: () => retryCount += 1,
|
|
@@ -264,6 +267,7 @@ function createSearchClient({
|
|
|
264
267
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `browse` method and merged with the transporter requestOptions.
|
|
265
268
|
*/
|
|
266
269
|
browseObjects({ indexName, browseParams, ...browseObjectsOptions }, requestOptions) {
|
|
270
|
+
requestOptions = (0, import_client_common.withRequestId)(transporter, requestOptions);
|
|
267
271
|
return (0, import_client_common.createIterablePromise)({
|
|
268
272
|
func: (previousResponse) => {
|
|
269
273
|
return this.browse(
|
|
@@ -294,6 +298,7 @@ function createSearchClient({
|
|
|
294
298
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchRules` method and merged with the transporter requestOptions.
|
|
295
299
|
*/
|
|
296
300
|
browseRules({ indexName, searchRulesParams, ...browseRulesOptions }, requestOptions) {
|
|
301
|
+
requestOptions = (0, import_client_common.withRequestId)(transporter, requestOptions);
|
|
297
302
|
const params = {
|
|
298
303
|
...searchRulesParams,
|
|
299
304
|
hitsPerPage: (searchRulesParams == null ? void 0 : searchRulesParams.hitsPerPage) || 1e3
|
|
@@ -331,6 +336,7 @@ function createSearchClient({
|
|
|
331
336
|
searchSynonymsParams,
|
|
332
337
|
...browseSynonymsOptions
|
|
333
338
|
}, requestOptions) {
|
|
339
|
+
requestOptions = (0, import_client_common.withRequestId)(transporter, requestOptions);
|
|
334
340
|
const params = {
|
|
335
341
|
...searchSynonymsParams,
|
|
336
342
|
page: (searchSynonymsParams == null ? void 0 : searchSynonymsParams.page) || 0,
|
|
@@ -376,6 +382,7 @@ function createSearchClient({
|
|
|
376
382
|
batchSize = 1e3,
|
|
377
383
|
maxRetries = 100
|
|
378
384
|
}, requestOptions) {
|
|
385
|
+
requestOptions = (0, import_client_common.withRequestId)(transporter, requestOptions);
|
|
379
386
|
let requests = [];
|
|
380
387
|
const responses = [];
|
|
381
388
|
const objectEntries = objects.entries();
|
|
@@ -388,7 +395,7 @@ function createSearchClient({
|
|
|
388
395
|
}
|
|
389
396
|
if (waitForTasks) {
|
|
390
397
|
for (const resp of responses) {
|
|
391
|
-
await this.waitForTask({ indexName, taskID: resp.taskID, maxRetries });
|
|
398
|
+
await this.waitForTask({ indexName, taskID: resp.taskID, maxRetries }, requestOptions);
|
|
392
399
|
}
|
|
393
400
|
}
|
|
394
401
|
return responses;
|
|
@@ -466,6 +473,8 @@ function createSearchClient({
|
|
|
466
473
|
* 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.
|
|
467
474
|
* See https://api-clients-automation.netlify.app/docs/custom-helpers/#replaceallobjects for implementation details.
|
|
468
475
|
*
|
|
476
|
+
* Warning: calling this method with an empty `objects` list replaces the index with an empty one, deleting all existing records.
|
|
477
|
+
*
|
|
469
478
|
* @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.
|
|
470
479
|
* @param replaceAllObjects - The `replaceAllObjects` object.
|
|
471
480
|
* @param replaceAllObjects.indexName - The `indexName` to replace `objects` in.
|
|
@@ -482,6 +491,13 @@ function createSearchClient({
|
|
|
482
491
|
scopes,
|
|
483
492
|
maxRetries = import_client_common.DEFAULT_REPLACE_ALL_OBJECTS_MAX_RETRIES
|
|
484
493
|
}, requestOptions) {
|
|
494
|
+
requestOptions = (0, import_client_common.withRequestId)(transporter, requestOptions);
|
|
495
|
+
if (objects.length === 0) {
|
|
496
|
+
(0, import_client_common.logWarning)(
|
|
497
|
+
transporter.logger,
|
|
498
|
+
`replaceAllObjects was called with an empty list of objects, which will delete all records currently in the "${indexName}" index.`
|
|
499
|
+
);
|
|
500
|
+
}
|
|
485
501
|
const randomSuffix = Math.floor(Math.random() * 1e6) + 1e5;
|
|
486
502
|
const tmpIndexName = `${indexName}_tmp_${randomSuffix}`;
|
|
487
503
|
if (scopes === void 0) {
|
|
@@ -503,11 +519,14 @@ function createSearchClient({
|
|
|
503
519
|
{ indexName: tmpIndexName, objects, waitForTasks: true, batchSize, maxRetries },
|
|
504
520
|
requestOptions
|
|
505
521
|
);
|
|
506
|
-
await this.waitForTask(
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
522
|
+
await this.waitForTask(
|
|
523
|
+
{
|
|
524
|
+
indexName: tmpIndexName,
|
|
525
|
+
taskID: copyOperationResponse.taskID,
|
|
526
|
+
maxRetries
|
|
527
|
+
},
|
|
528
|
+
requestOptions
|
|
529
|
+
);
|
|
511
530
|
copyOperationResponse = await this.operationIndex(
|
|
512
531
|
{
|
|
513
532
|
indexName,
|
|
@@ -519,11 +538,14 @@ function createSearchClient({
|
|
|
519
538
|
},
|
|
520
539
|
requestOptions
|
|
521
540
|
);
|
|
522
|
-
await this.waitForTask(
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
541
|
+
await this.waitForTask(
|
|
542
|
+
{
|
|
543
|
+
indexName: tmpIndexName,
|
|
544
|
+
taskID: copyOperationResponse.taskID,
|
|
545
|
+
maxRetries
|
|
546
|
+
},
|
|
547
|
+
requestOptions
|
|
548
|
+
);
|
|
527
549
|
const moveOperationResponse = await this.operationIndex(
|
|
528
550
|
{
|
|
529
551
|
indexName: tmpIndexName,
|
|
@@ -531,20 +553,23 @@ function createSearchClient({
|
|
|
531
553
|
},
|
|
532
554
|
requestOptions
|
|
533
555
|
);
|
|
534
|
-
await this.waitForTask(
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
556
|
+
await this.waitForTask(
|
|
557
|
+
{
|
|
558
|
+
indexName: tmpIndexName,
|
|
559
|
+
taskID: moveOperationResponse.taskID,
|
|
560
|
+
maxRetries
|
|
561
|
+
},
|
|
562
|
+
requestOptions
|
|
563
|
+
);
|
|
539
564
|
return { copyOperationResponse, batchResponses, moveOperationResponse };
|
|
540
565
|
} catch (error) {
|
|
541
|
-
await this.deleteIndex({ indexName: tmpIndexName });
|
|
566
|
+
await this.deleteIndex({ indexName: tmpIndexName }, requestOptions);
|
|
542
567
|
throw error;
|
|
543
568
|
}
|
|
544
569
|
},
|
|
545
|
-
async indexExists({ indexName }) {
|
|
570
|
+
async indexExists({ indexName }, requestOptions) {
|
|
546
571
|
try {
|
|
547
|
-
await this.getSettings({ indexName });
|
|
572
|
+
await this.getSettings({ indexName }, requestOptions);
|
|
548
573
|
} catch (error) {
|
|
549
574
|
if (error instanceof import_client_common.ApiError && error.status === 404) {
|
|
550
575
|
return false;
|
|
@@ -598,6 +623,32 @@ function createSearchClient({
|
|
|
598
623
|
};
|
|
599
624
|
return transporter.request(request, requestOptions);
|
|
600
625
|
},
|
|
626
|
+
/**
|
|
627
|
+
* Creates a new API key with specific permissions and restrictions.
|
|
628
|
+
*
|
|
629
|
+
* 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.
|
|
630
|
+
*
|
|
631
|
+
* Required API Key ACLs:
|
|
632
|
+
* - admin
|
|
633
|
+
* @param apiKey - The apiKey object.
|
|
634
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
635
|
+
* @see addApiKey for the plain version.
|
|
636
|
+
*/
|
|
637
|
+
addApiKeyWithHTTPInfo(apiKey, requestOptions) {
|
|
638
|
+
(0, import_client_common.validateRequired)("apiKey", "addApiKeyWithHTTPInfo", apiKey);
|
|
639
|
+
(0, import_client_common.validateRequired)("apiKey.acl", "addApiKeyWithHTTPInfo", apiKey.acl);
|
|
640
|
+
const requestPath = "/1/keys";
|
|
641
|
+
const headers = {};
|
|
642
|
+
const queryParameters = {};
|
|
643
|
+
const request = {
|
|
644
|
+
method: "POST",
|
|
645
|
+
path: requestPath,
|
|
646
|
+
queryParameters,
|
|
647
|
+
headers,
|
|
648
|
+
data: apiKey
|
|
649
|
+
};
|
|
650
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
651
|
+
},
|
|
601
652
|
/**
|
|
602
653
|
* 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).
|
|
603
654
|
*
|
|
@@ -625,6 +676,36 @@ function createSearchClient({
|
|
|
625
676
|
};
|
|
626
677
|
return transporter.request(request, requestOptions);
|
|
627
678
|
},
|
|
679
|
+
/**
|
|
680
|
+
* 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).
|
|
681
|
+
*
|
|
682
|
+
* 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.
|
|
683
|
+
*
|
|
684
|
+
* Required API Key ACLs:
|
|
685
|
+
* - addObject
|
|
686
|
+
* @param addOrUpdateObject - The addOrUpdateObject object.
|
|
687
|
+
* @param addOrUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
688
|
+
* @param addOrUpdateObject.objectID - Unique record identifier.
|
|
689
|
+
* @param addOrUpdateObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
690
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
691
|
+
* @see addOrUpdateObject for the plain version.
|
|
692
|
+
*/
|
|
693
|
+
addOrUpdateObjectWithHTTPInfo({ indexName, objectID, body }, requestOptions) {
|
|
694
|
+
(0, import_client_common.validateRequired)("indexName", "addOrUpdateObjectWithHTTPInfo", indexName);
|
|
695
|
+
(0, import_client_common.validateRequired)("objectID", "addOrUpdateObjectWithHTTPInfo", objectID);
|
|
696
|
+
(0, import_client_common.validateRequired)("body", "addOrUpdateObjectWithHTTPInfo", body);
|
|
697
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
698
|
+
const headers = {};
|
|
699
|
+
const queryParameters = {};
|
|
700
|
+
const request = {
|
|
701
|
+
method: "PUT",
|
|
702
|
+
path: requestPath,
|
|
703
|
+
queryParameters,
|
|
704
|
+
headers,
|
|
705
|
+
data: body
|
|
706
|
+
};
|
|
707
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
708
|
+
},
|
|
628
709
|
/**
|
|
629
710
|
* Adds a source to the list of allowed sources.
|
|
630
711
|
*
|
|
@@ -648,6 +729,32 @@ function createSearchClient({
|
|
|
648
729
|
};
|
|
649
730
|
return transporter.request(request, requestOptions);
|
|
650
731
|
},
|
|
732
|
+
/**
|
|
733
|
+
* Adds a source to the list of allowed sources.
|
|
734
|
+
*
|
|
735
|
+
* 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.
|
|
736
|
+
*
|
|
737
|
+
* Required API Key ACLs:
|
|
738
|
+
* - admin
|
|
739
|
+
* @param source - Source to add.
|
|
740
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
741
|
+
* @see appendSource for the plain version.
|
|
742
|
+
*/
|
|
743
|
+
appendSourceWithHTTPInfo(source, requestOptions) {
|
|
744
|
+
(0, import_client_common.validateRequired)("source", "appendSourceWithHTTPInfo", source);
|
|
745
|
+
(0, import_client_common.validateRequired)("source.source", "appendSourceWithHTTPInfo", source.source);
|
|
746
|
+
const requestPath = "/1/security/sources/append";
|
|
747
|
+
const headers = {};
|
|
748
|
+
const queryParameters = {};
|
|
749
|
+
const request = {
|
|
750
|
+
method: "POST",
|
|
751
|
+
path: requestPath,
|
|
752
|
+
queryParameters,
|
|
753
|
+
headers,
|
|
754
|
+
data: source
|
|
755
|
+
};
|
|
756
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
757
|
+
},
|
|
651
758
|
/**
|
|
652
759
|
* 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.
|
|
653
760
|
*
|
|
@@ -679,6 +786,40 @@ function createSearchClient({
|
|
|
679
786
|
};
|
|
680
787
|
return transporter.request(request, requestOptions);
|
|
681
788
|
},
|
|
789
|
+
/**
|
|
790
|
+
* 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.
|
|
791
|
+
*
|
|
792
|
+
* 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.
|
|
793
|
+
*
|
|
794
|
+
* Required API Key ACLs:
|
|
795
|
+
* - admin
|
|
796
|
+
*
|
|
797
|
+
* @deprecated
|
|
798
|
+
* @param assignUserId - The assignUserId object.
|
|
799
|
+
* @param assignUserId.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
800
|
+
* @param assignUserId.assignUserIdParams - The assignUserIdParams object.
|
|
801
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
802
|
+
* @see assignUserId for the plain version.
|
|
803
|
+
*/
|
|
804
|
+
assignUserIdWithHTTPInfo({ xAlgoliaUserID, assignUserIdParams }, requestOptions) {
|
|
805
|
+
(0, import_client_common.validateRequired)("xAlgoliaUserID", "assignUserIdWithHTTPInfo", xAlgoliaUserID);
|
|
806
|
+
(0, import_client_common.validateRequired)("assignUserIdParams", "assignUserIdWithHTTPInfo", assignUserIdParams);
|
|
807
|
+
(0, import_client_common.validateRequired)("assignUserIdParams.cluster", "assignUserIdWithHTTPInfo", assignUserIdParams.cluster);
|
|
808
|
+
const requestPath = "/1/clusters/mapping";
|
|
809
|
+
const headers = {};
|
|
810
|
+
const queryParameters = {};
|
|
811
|
+
if (xAlgoliaUserID !== void 0) {
|
|
812
|
+
headers["X-Algolia-User-ID"] = xAlgoliaUserID.toString();
|
|
813
|
+
}
|
|
814
|
+
const request = {
|
|
815
|
+
method: "POST",
|
|
816
|
+
path: requestPath,
|
|
817
|
+
queryParameters,
|
|
818
|
+
headers,
|
|
819
|
+
data: assignUserIdParams
|
|
820
|
+
};
|
|
821
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
822
|
+
},
|
|
682
823
|
/**
|
|
683
824
|
* 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).
|
|
684
825
|
*
|
|
@@ -705,6 +846,35 @@ function createSearchClient({
|
|
|
705
846
|
};
|
|
706
847
|
return transporter.request(request, requestOptions);
|
|
707
848
|
},
|
|
849
|
+
/**
|
|
850
|
+
* 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).
|
|
851
|
+
*
|
|
852
|
+
* 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.
|
|
853
|
+
*
|
|
854
|
+
* Required API Key ACLs:
|
|
855
|
+
* - addObject
|
|
856
|
+
* @param batch - The batch object.
|
|
857
|
+
* @param batch.indexName - Name of the index on which to perform the operation.
|
|
858
|
+
* @param batch.batchWriteParams - The batchWriteParams object.
|
|
859
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
860
|
+
* @see batch for the plain version.
|
|
861
|
+
*/
|
|
862
|
+
batchWithHTTPInfo({ indexName, batchWriteParams }, requestOptions) {
|
|
863
|
+
(0, import_client_common.validateRequired)("indexName", "batchWithHTTPInfo", indexName);
|
|
864
|
+
(0, import_client_common.validateRequired)("batchWriteParams", "batchWithHTTPInfo", batchWriteParams);
|
|
865
|
+
(0, import_client_common.validateRequired)("batchWriteParams.requests", "batchWithHTTPInfo", batchWriteParams.requests);
|
|
866
|
+
const requestPath = "/1/indexes/{indexName}/batch".replace("{indexName}", encodeURIComponent(indexName));
|
|
867
|
+
const headers = {};
|
|
868
|
+
const queryParameters = {};
|
|
869
|
+
const request = {
|
|
870
|
+
method: "POST",
|
|
871
|
+
path: requestPath,
|
|
872
|
+
queryParameters,
|
|
873
|
+
headers,
|
|
874
|
+
data: batchWriteParams
|
|
875
|
+
};
|
|
876
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
877
|
+
},
|
|
708
878
|
/**
|
|
709
879
|
* Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
|
|
710
880
|
*
|
|
@@ -737,6 +907,49 @@ function createSearchClient({
|
|
|
737
907
|
};
|
|
738
908
|
return transporter.request(request, requestOptions);
|
|
739
909
|
},
|
|
910
|
+
/**
|
|
911
|
+
* Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
|
|
912
|
+
*
|
|
913
|
+
* 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.
|
|
914
|
+
*
|
|
915
|
+
* Required API Key ACLs:
|
|
916
|
+
* - admin
|
|
917
|
+
*
|
|
918
|
+
* @deprecated
|
|
919
|
+
* @param batchAssignUserIds - The batchAssignUserIds object.
|
|
920
|
+
* @param batchAssignUserIds.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
921
|
+
* @param batchAssignUserIds.batchAssignUserIdsParams - The batchAssignUserIdsParams object.
|
|
922
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
923
|
+
* @see batchAssignUserIds for the plain version.
|
|
924
|
+
*/
|
|
925
|
+
batchAssignUserIdsWithHTTPInfo({ xAlgoliaUserID, batchAssignUserIdsParams }, requestOptions) {
|
|
926
|
+
(0, import_client_common.validateRequired)("xAlgoliaUserID", "batchAssignUserIdsWithHTTPInfo", xAlgoliaUserID);
|
|
927
|
+
(0, import_client_common.validateRequired)("batchAssignUserIdsParams", "batchAssignUserIdsWithHTTPInfo", batchAssignUserIdsParams);
|
|
928
|
+
(0, import_client_common.validateRequired)(
|
|
929
|
+
"batchAssignUserIdsParams.cluster",
|
|
930
|
+
"batchAssignUserIdsWithHTTPInfo",
|
|
931
|
+
batchAssignUserIdsParams.cluster
|
|
932
|
+
);
|
|
933
|
+
(0, import_client_common.validateRequired)(
|
|
934
|
+
"batchAssignUserIdsParams.users",
|
|
935
|
+
"batchAssignUserIdsWithHTTPInfo",
|
|
936
|
+
batchAssignUserIdsParams.users
|
|
937
|
+
);
|
|
938
|
+
const requestPath = "/1/clusters/mapping/batch";
|
|
939
|
+
const headers = {};
|
|
940
|
+
const queryParameters = {};
|
|
941
|
+
if (xAlgoliaUserID !== void 0) {
|
|
942
|
+
headers["X-Algolia-User-ID"] = xAlgoliaUserID.toString();
|
|
943
|
+
}
|
|
944
|
+
const request = {
|
|
945
|
+
method: "POST",
|
|
946
|
+
path: requestPath,
|
|
947
|
+
queryParameters,
|
|
948
|
+
headers,
|
|
949
|
+
data: batchAssignUserIdsParams
|
|
950
|
+
};
|
|
951
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
952
|
+
},
|
|
740
953
|
/**
|
|
741
954
|
* Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
|
|
742
955
|
*
|
|
@@ -770,6 +983,46 @@ function createSearchClient({
|
|
|
770
983
|
};
|
|
771
984
|
return transporter.request(request, requestOptions);
|
|
772
985
|
},
|
|
986
|
+
/**
|
|
987
|
+
* Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
|
|
988
|
+
*
|
|
989
|
+
* 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.
|
|
990
|
+
*
|
|
991
|
+
* Required API Key ACLs:
|
|
992
|
+
* - editSettings
|
|
993
|
+
* @param batchDictionaryEntries - The batchDictionaryEntries object.
|
|
994
|
+
* @param batchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
995
|
+
* @param batchDictionaryEntries.batchDictionaryEntriesParams - The batchDictionaryEntriesParams object.
|
|
996
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
997
|
+
* @see batchDictionaryEntries for the plain version.
|
|
998
|
+
*/
|
|
999
|
+
batchDictionaryEntriesWithHTTPInfo({ dictionaryName, batchDictionaryEntriesParams }, requestOptions) {
|
|
1000
|
+
(0, import_client_common.validateRequired)("dictionaryName", "batchDictionaryEntriesWithHTTPInfo", dictionaryName);
|
|
1001
|
+
(0, import_client_common.validateRequired)(
|
|
1002
|
+
"batchDictionaryEntriesParams",
|
|
1003
|
+
"batchDictionaryEntriesWithHTTPInfo",
|
|
1004
|
+
batchDictionaryEntriesParams
|
|
1005
|
+
);
|
|
1006
|
+
(0, import_client_common.validateRequired)(
|
|
1007
|
+
"batchDictionaryEntriesParams.requests",
|
|
1008
|
+
"batchDictionaryEntriesWithHTTPInfo",
|
|
1009
|
+
batchDictionaryEntriesParams.requests
|
|
1010
|
+
);
|
|
1011
|
+
const requestPath = "/1/dictionaries/{dictionaryName}/batch".replace(
|
|
1012
|
+
"{dictionaryName}",
|
|
1013
|
+
encodeURIComponent(dictionaryName)
|
|
1014
|
+
);
|
|
1015
|
+
const headers = {};
|
|
1016
|
+
const queryParameters = {};
|
|
1017
|
+
const request = {
|
|
1018
|
+
method: "POST",
|
|
1019
|
+
path: requestPath,
|
|
1020
|
+
queryParameters,
|
|
1021
|
+
headers,
|
|
1022
|
+
data: batchDictionaryEntriesParams
|
|
1023
|
+
};
|
|
1024
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1025
|
+
},
|
|
773
1026
|
/**
|
|
774
1027
|
* 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.
|
|
775
1028
|
*
|
|
@@ -795,6 +1048,34 @@ function createSearchClient({
|
|
|
795
1048
|
};
|
|
796
1049
|
return transporter.request(request, requestOptions);
|
|
797
1050
|
},
|
|
1051
|
+
/**
|
|
1052
|
+
* 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.
|
|
1053
|
+
*
|
|
1054
|
+
* 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.
|
|
1055
|
+
*
|
|
1056
|
+
* Required API Key ACLs:
|
|
1057
|
+
* - browse
|
|
1058
|
+
* @param browse - The browse object.
|
|
1059
|
+
* @param browse.indexName - Name of the index on which to perform the operation.
|
|
1060
|
+
* @param browse.browseParams - The browseParams object.
|
|
1061
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1062
|
+
* @see browse for the plain version.
|
|
1063
|
+
*/
|
|
1064
|
+
browseWithHTTPInfo({ indexName, browseParams }, requestOptions) {
|
|
1065
|
+
(0, import_client_common.validateRequired)("indexName", "browseWithHTTPInfo", indexName);
|
|
1066
|
+
const requestPath = "/1/indexes/{indexName}/browse".replace("{indexName}", encodeURIComponent(indexName));
|
|
1067
|
+
const headers = {};
|
|
1068
|
+
const queryParameters = {};
|
|
1069
|
+
const request = {
|
|
1070
|
+
method: "POST",
|
|
1071
|
+
path: requestPath,
|
|
1072
|
+
queryParameters,
|
|
1073
|
+
headers,
|
|
1074
|
+
data: browseParams ? browseParams : {},
|
|
1075
|
+
useReadTransporter: true
|
|
1076
|
+
};
|
|
1077
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1078
|
+
},
|
|
798
1079
|
/**
|
|
799
1080
|
* 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).
|
|
800
1081
|
*
|
|
@@ -817,6 +1098,31 @@ function createSearchClient({
|
|
|
817
1098
|
};
|
|
818
1099
|
return transporter.request(request, requestOptions);
|
|
819
1100
|
},
|
|
1101
|
+
/**
|
|
1102
|
+
* 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).
|
|
1103
|
+
*
|
|
1104
|
+
* 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.
|
|
1105
|
+
*
|
|
1106
|
+
* Required API Key ACLs:
|
|
1107
|
+
* - deleteIndex
|
|
1108
|
+
* @param clearObjects - The clearObjects object.
|
|
1109
|
+
* @param clearObjects.indexName - Name of the index on which to perform the operation.
|
|
1110
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1111
|
+
* @see clearObjects for the plain version.
|
|
1112
|
+
*/
|
|
1113
|
+
clearObjectsWithHTTPInfo({ indexName }, requestOptions) {
|
|
1114
|
+
(0, import_client_common.validateRequired)("indexName", "clearObjectsWithHTTPInfo", indexName);
|
|
1115
|
+
const requestPath = "/1/indexes/{indexName}/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
1116
|
+
const headers = {};
|
|
1117
|
+
const queryParameters = {};
|
|
1118
|
+
const request = {
|
|
1119
|
+
method: "POST",
|
|
1120
|
+
path: requestPath,
|
|
1121
|
+
queryParameters,
|
|
1122
|
+
headers
|
|
1123
|
+
};
|
|
1124
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1125
|
+
},
|
|
820
1126
|
/**
|
|
821
1127
|
* Deletes all rules from the index.
|
|
822
1128
|
*
|
|
@@ -844,18 +1150,21 @@ function createSearchClient({
|
|
|
844
1150
|
return transporter.request(request, requestOptions);
|
|
845
1151
|
},
|
|
846
1152
|
/**
|
|
847
|
-
* Deletes all
|
|
1153
|
+
* Deletes all rules from the index.
|
|
1154
|
+
*
|
|
1155
|
+
* 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.
|
|
848
1156
|
*
|
|
849
1157
|
* Required API Key ACLs:
|
|
850
1158
|
* - editSettings
|
|
851
|
-
* @param
|
|
852
|
-
* @param
|
|
853
|
-
* @param
|
|
1159
|
+
* @param clearRules - The clearRules object.
|
|
1160
|
+
* @param clearRules.indexName - Name of the index on which to perform the operation.
|
|
1161
|
+
* @param clearRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
854
1162
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1163
|
+
* @see clearRules for the plain version.
|
|
855
1164
|
*/
|
|
856
|
-
|
|
857
|
-
(0, import_client_common.validateRequired)("indexName", "
|
|
858
|
-
const requestPath = "/1/indexes/{indexName}/
|
|
1165
|
+
clearRulesWithHTTPInfo({ indexName, forwardToReplicas }, requestOptions) {
|
|
1166
|
+
(0, import_client_common.validateRequired)("indexName", "clearRulesWithHTTPInfo", indexName);
|
|
1167
|
+
const requestPath = "/1/indexes/{indexName}/rules/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
859
1168
|
const headers = {};
|
|
860
1169
|
const queryParameters = {};
|
|
861
1170
|
if (forwardToReplicas !== void 0) {
|
|
@@ -867,10 +1176,65 @@ function createSearchClient({
|
|
|
867
1176
|
queryParameters,
|
|
868
1177
|
headers
|
|
869
1178
|
};
|
|
870
|
-
return transporter.
|
|
1179
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
871
1180
|
},
|
|
872
1181
|
/**
|
|
873
|
-
*
|
|
1182
|
+
* Deletes all synonyms from the index.
|
|
1183
|
+
*
|
|
1184
|
+
* Required API Key ACLs:
|
|
1185
|
+
* - editSettings
|
|
1186
|
+
* @param clearSynonyms - The clearSynonyms object.
|
|
1187
|
+
* @param clearSynonyms.indexName - Name of the index on which to perform the operation.
|
|
1188
|
+
* @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1189
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1190
|
+
*/
|
|
1191
|
+
clearSynonyms({ indexName, forwardToReplicas }, requestOptions) {
|
|
1192
|
+
(0, import_client_common.validateRequired)("indexName", "clearSynonyms", indexName);
|
|
1193
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
1194
|
+
const headers = {};
|
|
1195
|
+
const queryParameters = {};
|
|
1196
|
+
if (forwardToReplicas !== void 0) {
|
|
1197
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1198
|
+
}
|
|
1199
|
+
const request = {
|
|
1200
|
+
method: "POST",
|
|
1201
|
+
path: requestPath,
|
|
1202
|
+
queryParameters,
|
|
1203
|
+
headers
|
|
1204
|
+
};
|
|
1205
|
+
return transporter.request(request, requestOptions);
|
|
1206
|
+
},
|
|
1207
|
+
/**
|
|
1208
|
+
* Deletes all synonyms from the index.
|
|
1209
|
+
*
|
|
1210
|
+
* 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.
|
|
1211
|
+
*
|
|
1212
|
+
* Required API Key ACLs:
|
|
1213
|
+
* - editSettings
|
|
1214
|
+
* @param clearSynonyms - The clearSynonyms object.
|
|
1215
|
+
* @param clearSynonyms.indexName - Name of the index on which to perform the operation.
|
|
1216
|
+
* @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1217
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1218
|
+
* @see clearSynonyms for the plain version.
|
|
1219
|
+
*/
|
|
1220
|
+
clearSynonymsWithHTTPInfo({ indexName, forwardToReplicas }, requestOptions) {
|
|
1221
|
+
(0, import_client_common.validateRequired)("indexName", "clearSynonymsWithHTTPInfo", indexName);
|
|
1222
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
1223
|
+
const headers = {};
|
|
1224
|
+
const queryParameters = {};
|
|
1225
|
+
if (forwardToReplicas !== void 0) {
|
|
1226
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1227
|
+
}
|
|
1228
|
+
const request = {
|
|
1229
|
+
method: "POST",
|
|
1230
|
+
path: requestPath,
|
|
1231
|
+
queryParameters,
|
|
1232
|
+
headers
|
|
1233
|
+
};
|
|
1234
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1235
|
+
},
|
|
1236
|
+
/**
|
|
1237
|
+
* This method lets you send requests to the Algolia REST API.
|
|
874
1238
|
* @param customDelete - The customDelete object.
|
|
875
1239
|
* @param customDelete.path - Path of the endpoint, for example `1/newFeature`.
|
|
876
1240
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -889,6 +1253,29 @@ function createSearchClient({
|
|
|
889
1253
|
};
|
|
890
1254
|
return transporter.request(request, requestOptions);
|
|
891
1255
|
},
|
|
1256
|
+
/**
|
|
1257
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1258
|
+
*
|
|
1259
|
+
* 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.
|
|
1260
|
+
* @param customDelete - The customDelete object.
|
|
1261
|
+
* @param customDelete.path - Path of the endpoint, for example `1/newFeature`.
|
|
1262
|
+
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
1263
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1264
|
+
* @see customDelete for the plain version.
|
|
1265
|
+
*/
|
|
1266
|
+
customDeleteWithHTTPInfo({ path, parameters }, requestOptions) {
|
|
1267
|
+
(0, import_client_common.validateRequired)("path", "customDeleteWithHTTPInfo", path);
|
|
1268
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1269
|
+
const headers = {};
|
|
1270
|
+
const queryParameters = parameters ? parameters : {};
|
|
1271
|
+
const request = {
|
|
1272
|
+
method: "DELETE",
|
|
1273
|
+
path: requestPath,
|
|
1274
|
+
queryParameters,
|
|
1275
|
+
headers
|
|
1276
|
+
};
|
|
1277
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1278
|
+
},
|
|
892
1279
|
/**
|
|
893
1280
|
* This method lets you send requests to the Algolia REST API.
|
|
894
1281
|
* @param customGet - The customGet object.
|
|
@@ -909,6 +1296,29 @@ function createSearchClient({
|
|
|
909
1296
|
};
|
|
910
1297
|
return transporter.request(request, requestOptions);
|
|
911
1298
|
},
|
|
1299
|
+
/**
|
|
1300
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1301
|
+
*
|
|
1302
|
+
* 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.
|
|
1303
|
+
* @param customGet - The customGet object.
|
|
1304
|
+
* @param customGet.path - Path of the endpoint, for example `1/newFeature`.
|
|
1305
|
+
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
1306
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1307
|
+
* @see customGet for the plain version.
|
|
1308
|
+
*/
|
|
1309
|
+
customGetWithHTTPInfo({ path, parameters }, requestOptions) {
|
|
1310
|
+
(0, import_client_common.validateRequired)("path", "customGetWithHTTPInfo", path);
|
|
1311
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1312
|
+
const headers = {};
|
|
1313
|
+
const queryParameters = parameters ? parameters : {};
|
|
1314
|
+
const request = {
|
|
1315
|
+
method: "GET",
|
|
1316
|
+
path: requestPath,
|
|
1317
|
+
queryParameters,
|
|
1318
|
+
headers
|
|
1319
|
+
};
|
|
1320
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1321
|
+
},
|
|
912
1322
|
/**
|
|
913
1323
|
* This method lets you send requests to the Algolia REST API.
|
|
914
1324
|
* @param customPost - The customPost object.
|
|
@@ -931,6 +1341,31 @@ function createSearchClient({
|
|
|
931
1341
|
};
|
|
932
1342
|
return transporter.request(request, requestOptions);
|
|
933
1343
|
},
|
|
1344
|
+
/**
|
|
1345
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1346
|
+
*
|
|
1347
|
+
* 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.
|
|
1348
|
+
* @param customPost - The customPost object.
|
|
1349
|
+
* @param customPost.path - Path of the endpoint, for example `1/newFeature`.
|
|
1350
|
+
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
1351
|
+
* @param customPost.body - Parameters to send with the custom request.
|
|
1352
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1353
|
+
* @see customPost for the plain version.
|
|
1354
|
+
*/
|
|
1355
|
+
customPostWithHTTPInfo({ path, parameters, body }, requestOptions) {
|
|
1356
|
+
(0, import_client_common.validateRequired)("path", "customPostWithHTTPInfo", path);
|
|
1357
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1358
|
+
const headers = {};
|
|
1359
|
+
const queryParameters = parameters ? parameters : {};
|
|
1360
|
+
const request = {
|
|
1361
|
+
method: "POST",
|
|
1362
|
+
path: requestPath,
|
|
1363
|
+
queryParameters,
|
|
1364
|
+
headers,
|
|
1365
|
+
data: body ? body : {}
|
|
1366
|
+
};
|
|
1367
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1368
|
+
},
|
|
934
1369
|
/**
|
|
935
1370
|
* This method lets you send requests to the Algolia REST API.
|
|
936
1371
|
* @param customPut - The customPut object.
|
|
@@ -953,6 +1388,31 @@ function createSearchClient({
|
|
|
953
1388
|
};
|
|
954
1389
|
return transporter.request(request, requestOptions);
|
|
955
1390
|
},
|
|
1391
|
+
/**
|
|
1392
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1393
|
+
*
|
|
1394
|
+
* 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.
|
|
1395
|
+
* @param customPut - The customPut object.
|
|
1396
|
+
* @param customPut.path - Path of the endpoint, for example `1/newFeature`.
|
|
1397
|
+
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
1398
|
+
* @param customPut.body - Parameters to send with the custom request.
|
|
1399
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1400
|
+
* @see customPut for the plain version.
|
|
1401
|
+
*/
|
|
1402
|
+
customPutWithHTTPInfo({ path, parameters, body }, requestOptions) {
|
|
1403
|
+
(0, import_client_common.validateRequired)("path", "customPutWithHTTPInfo", path);
|
|
1404
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1405
|
+
const headers = {};
|
|
1406
|
+
const queryParameters = parameters ? parameters : {};
|
|
1407
|
+
const request = {
|
|
1408
|
+
method: "PUT",
|
|
1409
|
+
path: requestPath,
|
|
1410
|
+
queryParameters,
|
|
1411
|
+
headers,
|
|
1412
|
+
data: body ? body : {}
|
|
1413
|
+
};
|
|
1414
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1415
|
+
},
|
|
956
1416
|
/**
|
|
957
1417
|
* Deletes the API key.
|
|
958
1418
|
*
|
|
@@ -975,6 +1435,31 @@ function createSearchClient({
|
|
|
975
1435
|
};
|
|
976
1436
|
return transporter.request(request, requestOptions);
|
|
977
1437
|
},
|
|
1438
|
+
/**
|
|
1439
|
+
* Deletes the API key.
|
|
1440
|
+
*
|
|
1441
|
+
* 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.
|
|
1442
|
+
*
|
|
1443
|
+
* Required API Key ACLs:
|
|
1444
|
+
* - admin
|
|
1445
|
+
* @param deleteApiKey - The deleteApiKey object.
|
|
1446
|
+
* @param deleteApiKey.key - API key.
|
|
1447
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1448
|
+
* @see deleteApiKey for the plain version.
|
|
1449
|
+
*/
|
|
1450
|
+
deleteApiKeyWithHTTPInfo({ key }, requestOptions) {
|
|
1451
|
+
(0, import_client_common.validateRequired)("key", "deleteApiKeyWithHTTPInfo", key);
|
|
1452
|
+
const requestPath = "/1/keys/{key}".replace("{key}", encodeURIComponent(key));
|
|
1453
|
+
const headers = {};
|
|
1454
|
+
const queryParameters = {};
|
|
1455
|
+
const request = {
|
|
1456
|
+
method: "DELETE",
|
|
1457
|
+
path: requestPath,
|
|
1458
|
+
queryParameters,
|
|
1459
|
+
headers
|
|
1460
|
+
};
|
|
1461
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1462
|
+
},
|
|
978
1463
|
/**
|
|
979
1464
|
* 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).
|
|
980
1465
|
*
|
|
@@ -1000,6 +1485,34 @@ function createSearchClient({
|
|
|
1000
1485
|
};
|
|
1001
1486
|
return transporter.request(request, requestOptions);
|
|
1002
1487
|
},
|
|
1488
|
+
/**
|
|
1489
|
+
* 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).
|
|
1490
|
+
*
|
|
1491
|
+
* 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.
|
|
1492
|
+
*
|
|
1493
|
+
* Required API Key ACLs:
|
|
1494
|
+
* - deleteIndex
|
|
1495
|
+
* @param deleteBy - The deleteBy object.
|
|
1496
|
+
* @param deleteBy.indexName - Name of the index on which to perform the operation.
|
|
1497
|
+
* @param deleteBy.deleteByParams - The deleteByParams object.
|
|
1498
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1499
|
+
* @see deleteBy for the plain version.
|
|
1500
|
+
*/
|
|
1501
|
+
deleteByWithHTTPInfo({ indexName, deleteByParams }, requestOptions) {
|
|
1502
|
+
(0, import_client_common.validateRequired)("indexName", "deleteByWithHTTPInfo", indexName);
|
|
1503
|
+
(0, import_client_common.validateRequired)("deleteByParams", "deleteByWithHTTPInfo", deleteByParams);
|
|
1504
|
+
const requestPath = "/1/indexes/{indexName}/deleteByQuery".replace("{indexName}", encodeURIComponent(indexName));
|
|
1505
|
+
const headers = {};
|
|
1506
|
+
const queryParameters = {};
|
|
1507
|
+
const request = {
|
|
1508
|
+
method: "POST",
|
|
1509
|
+
path: requestPath,
|
|
1510
|
+
queryParameters,
|
|
1511
|
+
headers,
|
|
1512
|
+
data: deleteByParams
|
|
1513
|
+
};
|
|
1514
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1515
|
+
},
|
|
1003
1516
|
/**
|
|
1004
1517
|
* 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).
|
|
1005
1518
|
*
|
|
@@ -1022,6 +1535,31 @@ function createSearchClient({
|
|
|
1022
1535
|
};
|
|
1023
1536
|
return transporter.request(request, requestOptions);
|
|
1024
1537
|
},
|
|
1538
|
+
/**
|
|
1539
|
+
* 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).
|
|
1540
|
+
*
|
|
1541
|
+
* 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.
|
|
1542
|
+
*
|
|
1543
|
+
* Required API Key ACLs:
|
|
1544
|
+
* - deleteIndex
|
|
1545
|
+
* @param deleteIndex - The deleteIndex object.
|
|
1546
|
+
* @param deleteIndex.indexName - Name of the index on which to perform the operation.
|
|
1547
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1548
|
+
* @see deleteIndex for the plain version.
|
|
1549
|
+
*/
|
|
1550
|
+
deleteIndexWithHTTPInfo({ indexName }, requestOptions) {
|
|
1551
|
+
(0, import_client_common.validateRequired)("indexName", "deleteIndexWithHTTPInfo", indexName);
|
|
1552
|
+
const requestPath = "/1/indexes/{indexName}".replace("{indexName}", encodeURIComponent(indexName));
|
|
1553
|
+
const headers = {};
|
|
1554
|
+
const queryParameters = {};
|
|
1555
|
+
const request = {
|
|
1556
|
+
method: "DELETE",
|
|
1557
|
+
path: requestPath,
|
|
1558
|
+
queryParameters,
|
|
1559
|
+
headers
|
|
1560
|
+
};
|
|
1561
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1562
|
+
},
|
|
1025
1563
|
/**
|
|
1026
1564
|
* 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).
|
|
1027
1565
|
*
|
|
@@ -1046,6 +1584,33 @@ function createSearchClient({
|
|
|
1046
1584
|
};
|
|
1047
1585
|
return transporter.request(request, requestOptions);
|
|
1048
1586
|
},
|
|
1587
|
+
/**
|
|
1588
|
+
* 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).
|
|
1589
|
+
*
|
|
1590
|
+
* 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.
|
|
1591
|
+
*
|
|
1592
|
+
* Required API Key ACLs:
|
|
1593
|
+
* - deleteObject
|
|
1594
|
+
* @param deleteObject - The deleteObject object.
|
|
1595
|
+
* @param deleteObject.indexName - Name of the index on which to perform the operation.
|
|
1596
|
+
* @param deleteObject.objectID - Unique record identifier.
|
|
1597
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1598
|
+
* @see deleteObject for the plain version.
|
|
1599
|
+
*/
|
|
1600
|
+
deleteObjectWithHTTPInfo({ indexName, objectID }, requestOptions) {
|
|
1601
|
+
(0, import_client_common.validateRequired)("indexName", "deleteObjectWithHTTPInfo", indexName);
|
|
1602
|
+
(0, import_client_common.validateRequired)("objectID", "deleteObjectWithHTTPInfo", objectID);
|
|
1603
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1604
|
+
const headers = {};
|
|
1605
|
+
const queryParameters = {};
|
|
1606
|
+
const request = {
|
|
1607
|
+
method: "DELETE",
|
|
1608
|
+
path: requestPath,
|
|
1609
|
+
queryParameters,
|
|
1610
|
+
headers
|
|
1611
|
+
};
|
|
1612
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1613
|
+
},
|
|
1049
1614
|
/**
|
|
1050
1615
|
* 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).
|
|
1051
1616
|
*
|
|
@@ -1074,6 +1639,37 @@ function createSearchClient({
|
|
|
1074
1639
|
};
|
|
1075
1640
|
return transporter.request(request, requestOptions);
|
|
1076
1641
|
},
|
|
1642
|
+
/**
|
|
1643
|
+
* 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).
|
|
1644
|
+
*
|
|
1645
|
+
* 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.
|
|
1646
|
+
*
|
|
1647
|
+
* Required API Key ACLs:
|
|
1648
|
+
* - editSettings
|
|
1649
|
+
* @param deleteRule - The deleteRule object.
|
|
1650
|
+
* @param deleteRule.indexName - Name of the index on which to perform the operation.
|
|
1651
|
+
* @param deleteRule.objectID - Unique identifier of a rule object.
|
|
1652
|
+
* @param deleteRule.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1653
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1654
|
+
* @see deleteRule for the plain version.
|
|
1655
|
+
*/
|
|
1656
|
+
deleteRuleWithHTTPInfo({ indexName, objectID, forwardToReplicas }, requestOptions) {
|
|
1657
|
+
(0, import_client_common.validateRequired)("indexName", "deleteRuleWithHTTPInfo", indexName);
|
|
1658
|
+
(0, import_client_common.validateRequired)("objectID", "deleteRuleWithHTTPInfo", objectID);
|
|
1659
|
+
const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1660
|
+
const headers = {};
|
|
1661
|
+
const queryParameters = {};
|
|
1662
|
+
if (forwardToReplicas !== void 0) {
|
|
1663
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1664
|
+
}
|
|
1665
|
+
const request = {
|
|
1666
|
+
method: "DELETE",
|
|
1667
|
+
path: requestPath,
|
|
1668
|
+
queryParameters,
|
|
1669
|
+
headers
|
|
1670
|
+
};
|
|
1671
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1672
|
+
},
|
|
1077
1673
|
/**
|
|
1078
1674
|
* Deletes a source from the list of allowed sources.
|
|
1079
1675
|
*
|
|
@@ -1096,6 +1692,31 @@ function createSearchClient({
|
|
|
1096
1692
|
};
|
|
1097
1693
|
return transporter.request(request, requestOptions);
|
|
1098
1694
|
},
|
|
1695
|
+
/**
|
|
1696
|
+
* Deletes a source from the list of allowed sources.
|
|
1697
|
+
*
|
|
1698
|
+
* 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.
|
|
1699
|
+
*
|
|
1700
|
+
* Required API Key ACLs:
|
|
1701
|
+
* - admin
|
|
1702
|
+
* @param deleteSource - The deleteSource object.
|
|
1703
|
+
* @param deleteSource.source - IP address range of the source.
|
|
1704
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1705
|
+
* @see deleteSource for the plain version.
|
|
1706
|
+
*/
|
|
1707
|
+
deleteSourceWithHTTPInfo({ source }, requestOptions) {
|
|
1708
|
+
(0, import_client_common.validateRequired)("source", "deleteSourceWithHTTPInfo", source);
|
|
1709
|
+
const requestPath = "/1/security/sources/{source}".replace("{source}", encodeURIComponent(source));
|
|
1710
|
+
const headers = {};
|
|
1711
|
+
const queryParameters = {};
|
|
1712
|
+
const request = {
|
|
1713
|
+
method: "DELETE",
|
|
1714
|
+
path: requestPath,
|
|
1715
|
+
queryParameters,
|
|
1716
|
+
headers
|
|
1717
|
+
};
|
|
1718
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1719
|
+
},
|
|
1099
1720
|
/**
|
|
1100
1721
|
* 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).
|
|
1101
1722
|
*
|
|
@@ -1125,7 +1746,38 @@ function createSearchClient({
|
|
|
1125
1746
|
return transporter.request(request, requestOptions);
|
|
1126
1747
|
},
|
|
1127
1748
|
/**
|
|
1128
|
-
*
|
|
1749
|
+
* 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).
|
|
1750
|
+
*
|
|
1751
|
+
* 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.
|
|
1752
|
+
*
|
|
1753
|
+
* Required API Key ACLs:
|
|
1754
|
+
* - editSettings
|
|
1755
|
+
* @param deleteSynonym - The deleteSynonym object.
|
|
1756
|
+
* @param deleteSynonym.indexName - Name of the index on which to perform the operation.
|
|
1757
|
+
* @param deleteSynonym.objectID - Unique identifier of a synonym object.
|
|
1758
|
+
* @param deleteSynonym.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1759
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1760
|
+
* @see deleteSynonym for the plain version.
|
|
1761
|
+
*/
|
|
1762
|
+
deleteSynonymWithHTTPInfo({ indexName, objectID, forwardToReplicas }, requestOptions) {
|
|
1763
|
+
(0, import_client_common.validateRequired)("indexName", "deleteSynonymWithHTTPInfo", indexName);
|
|
1764
|
+
(0, import_client_common.validateRequired)("objectID", "deleteSynonymWithHTTPInfo", objectID);
|
|
1765
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1766
|
+
const headers = {};
|
|
1767
|
+
const queryParameters = {};
|
|
1768
|
+
if (forwardToReplicas !== void 0) {
|
|
1769
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1770
|
+
}
|
|
1771
|
+
const request = {
|
|
1772
|
+
method: "DELETE",
|
|
1773
|
+
path: requestPath,
|
|
1774
|
+
queryParameters,
|
|
1775
|
+
headers
|
|
1776
|
+
};
|
|
1777
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1778
|
+
},
|
|
1779
|
+
/**
|
|
1780
|
+
* 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>`.
|
|
1129
1781
|
*
|
|
1130
1782
|
* Required API Key ACLs:
|
|
1131
1783
|
* - search
|
|
@@ -1146,6 +1798,31 @@ function createSearchClient({
|
|
|
1146
1798
|
};
|
|
1147
1799
|
return transporter.request(request, requestOptions);
|
|
1148
1800
|
},
|
|
1801
|
+
/**
|
|
1802
|
+
* 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>`.
|
|
1803
|
+
*
|
|
1804
|
+
* 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.
|
|
1805
|
+
*
|
|
1806
|
+
* Required API Key ACLs:
|
|
1807
|
+
* - search
|
|
1808
|
+
* @param getApiKey - The getApiKey object.
|
|
1809
|
+
* @param getApiKey.key - API key.
|
|
1810
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1811
|
+
* @see getApiKey for the plain version.
|
|
1812
|
+
*/
|
|
1813
|
+
getApiKeyWithHTTPInfo({ key }, requestOptions) {
|
|
1814
|
+
(0, import_client_common.validateRequired)("key", "getApiKeyWithHTTPInfo", key);
|
|
1815
|
+
const requestPath = "/1/keys/{key}".replace("{key}", encodeURIComponent(key));
|
|
1816
|
+
const headers = {};
|
|
1817
|
+
const queryParameters = {};
|
|
1818
|
+
const request = {
|
|
1819
|
+
method: "GET",
|
|
1820
|
+
path: requestPath,
|
|
1821
|
+
queryParameters,
|
|
1822
|
+
headers
|
|
1823
|
+
};
|
|
1824
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1825
|
+
},
|
|
1149
1826
|
/**
|
|
1150
1827
|
* Checks the status of a given application task.
|
|
1151
1828
|
*
|
|
@@ -1168,6 +1845,31 @@ function createSearchClient({
|
|
|
1168
1845
|
};
|
|
1169
1846
|
return transporter.request(request, requestOptions);
|
|
1170
1847
|
},
|
|
1848
|
+
/**
|
|
1849
|
+
* Checks the status of a given application task.
|
|
1850
|
+
*
|
|
1851
|
+
* 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.
|
|
1852
|
+
*
|
|
1853
|
+
* Required API Key ACLs:
|
|
1854
|
+
* - editSettings
|
|
1855
|
+
* @param getAppTask - The getAppTask object.
|
|
1856
|
+
* @param getAppTask.taskID - Unique task identifier.
|
|
1857
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1858
|
+
* @see getAppTask for the plain version.
|
|
1859
|
+
*/
|
|
1860
|
+
getAppTaskWithHTTPInfo({ taskID }, requestOptions) {
|
|
1861
|
+
(0, import_client_common.validateRequired)("taskID", "getAppTaskWithHTTPInfo", taskID);
|
|
1862
|
+
const requestPath = "/1/task/{taskID}".replace("{taskID}", encodeURIComponent(taskID));
|
|
1863
|
+
const headers = {};
|
|
1864
|
+
const queryParameters = {};
|
|
1865
|
+
const request = {
|
|
1866
|
+
method: "GET",
|
|
1867
|
+
path: requestPath,
|
|
1868
|
+
queryParameters,
|
|
1869
|
+
headers
|
|
1870
|
+
};
|
|
1871
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1872
|
+
},
|
|
1171
1873
|
/**
|
|
1172
1874
|
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
1173
1875
|
*
|
|
@@ -1187,6 +1889,28 @@ function createSearchClient({
|
|
|
1187
1889
|
};
|
|
1188
1890
|
return transporter.request(request, requestOptions);
|
|
1189
1891
|
},
|
|
1892
|
+
/**
|
|
1893
|
+
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
1894
|
+
*
|
|
1895
|
+
* 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.
|
|
1896
|
+
*
|
|
1897
|
+
* Required API Key ACLs:
|
|
1898
|
+
* - settings
|
|
1899
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1900
|
+
* @see getDictionaryLanguages for the plain version.
|
|
1901
|
+
*/
|
|
1902
|
+
getDictionaryLanguagesWithHTTPInfo(requestOptions) {
|
|
1903
|
+
const requestPath = "/1/dictionaries/*/languages";
|
|
1904
|
+
const headers = {};
|
|
1905
|
+
const queryParameters = {};
|
|
1906
|
+
const request = {
|
|
1907
|
+
method: "GET",
|
|
1908
|
+
path: requestPath,
|
|
1909
|
+
queryParameters,
|
|
1910
|
+
headers
|
|
1911
|
+
};
|
|
1912
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1913
|
+
},
|
|
1190
1914
|
/**
|
|
1191
1915
|
* Retrieves the languages for which standard dictionary entries are turned off.
|
|
1192
1916
|
*
|
|
@@ -1206,6 +1930,28 @@ function createSearchClient({
|
|
|
1206
1930
|
};
|
|
1207
1931
|
return transporter.request(request, requestOptions);
|
|
1208
1932
|
},
|
|
1933
|
+
/**
|
|
1934
|
+
* Retrieves the languages for which standard dictionary entries are turned off.
|
|
1935
|
+
*
|
|
1936
|
+
* 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.
|
|
1937
|
+
*
|
|
1938
|
+
* Required API Key ACLs:
|
|
1939
|
+
* - settings
|
|
1940
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1941
|
+
* @see getDictionarySettings for the plain version.
|
|
1942
|
+
*/
|
|
1943
|
+
getDictionarySettingsWithHTTPInfo(requestOptions) {
|
|
1944
|
+
const requestPath = "/1/dictionaries/*/settings";
|
|
1945
|
+
const headers = {};
|
|
1946
|
+
const queryParameters = {};
|
|
1947
|
+
const request = {
|
|
1948
|
+
method: "GET",
|
|
1949
|
+
path: requestPath,
|
|
1950
|
+
queryParameters,
|
|
1951
|
+
headers
|
|
1952
|
+
};
|
|
1953
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1954
|
+
},
|
|
1209
1955
|
/**
|
|
1210
1956
|
* 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.
|
|
1211
1957
|
*
|
|
@@ -1242,6 +1988,45 @@ function createSearchClient({
|
|
|
1242
1988
|
};
|
|
1243
1989
|
return transporter.request(request, requestOptions);
|
|
1244
1990
|
},
|
|
1991
|
+
/**
|
|
1992
|
+
* 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.
|
|
1993
|
+
*
|
|
1994
|
+
* 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.
|
|
1995
|
+
*
|
|
1996
|
+
* Required API Key ACLs:
|
|
1997
|
+
* - logs
|
|
1998
|
+
* @param getLogs - The getLogs object.
|
|
1999
|
+
* @param getLogs.offset - First log entry to retrieve. The most recent entries are listed first.
|
|
2000
|
+
* @param getLogs.length - Maximum number of entries to retrieve.
|
|
2001
|
+
* @param getLogs.indexName - Index for which to retrieve log entries. By default, log entries are retrieved for all indices.
|
|
2002
|
+
* @param getLogs.type - Type of log entries to retrieve. By default, all log entries are retrieved.
|
|
2003
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2004
|
+
* @see getLogs for the plain version.
|
|
2005
|
+
*/
|
|
2006
|
+
getLogsWithHTTPInfo({ offset, length, indexName, type } = {}, requestOptions = void 0) {
|
|
2007
|
+
const requestPath = "/1/logs";
|
|
2008
|
+
const headers = {};
|
|
2009
|
+
const queryParameters = {};
|
|
2010
|
+
if (offset !== void 0) {
|
|
2011
|
+
queryParameters["offset"] = offset.toString();
|
|
2012
|
+
}
|
|
2013
|
+
if (length !== void 0) {
|
|
2014
|
+
queryParameters["length"] = length.toString();
|
|
2015
|
+
}
|
|
2016
|
+
if (indexName !== void 0) {
|
|
2017
|
+
queryParameters["indexName"] = indexName.toString();
|
|
2018
|
+
}
|
|
2019
|
+
if (type !== void 0) {
|
|
2020
|
+
queryParameters["type"] = type.toString();
|
|
2021
|
+
}
|
|
2022
|
+
const request = {
|
|
2023
|
+
method: "GET",
|
|
2024
|
+
path: requestPath,
|
|
2025
|
+
queryParameters,
|
|
2026
|
+
headers
|
|
2027
|
+
};
|
|
2028
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2029
|
+
},
|
|
1245
2030
|
/**
|
|
1246
2031
|
* 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).
|
|
1247
2032
|
*
|
|
@@ -1270,6 +2055,37 @@ function createSearchClient({
|
|
|
1270
2055
|
};
|
|
1271
2056
|
return transporter.request(request, requestOptions);
|
|
1272
2057
|
},
|
|
2058
|
+
/**
|
|
2059
|
+
* 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).
|
|
2060
|
+
*
|
|
2061
|
+
* 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.
|
|
2062
|
+
*
|
|
2063
|
+
* Required API Key ACLs:
|
|
2064
|
+
* - search
|
|
2065
|
+
* @param getObject - The getObject object.
|
|
2066
|
+
* @param getObject.indexName - Name of the index on which to perform the operation.
|
|
2067
|
+
* @param getObject.objectID - Unique record identifier.
|
|
2068
|
+
* @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.
|
|
2069
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2070
|
+
* @see getObject for the plain version.
|
|
2071
|
+
*/
|
|
2072
|
+
getObjectWithHTTPInfo({ indexName, objectID, attributesToRetrieve }, requestOptions) {
|
|
2073
|
+
(0, import_client_common.validateRequired)("indexName", "getObjectWithHTTPInfo", indexName);
|
|
2074
|
+
(0, import_client_common.validateRequired)("objectID", "getObjectWithHTTPInfo", objectID);
|
|
2075
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2076
|
+
const headers = {};
|
|
2077
|
+
const queryParameters = {};
|
|
2078
|
+
if (attributesToRetrieve !== void 0) {
|
|
2079
|
+
queryParameters["attributesToRetrieve"] = attributesToRetrieve.toString();
|
|
2080
|
+
}
|
|
2081
|
+
const request = {
|
|
2082
|
+
method: "GET",
|
|
2083
|
+
path: requestPath,
|
|
2084
|
+
queryParameters,
|
|
2085
|
+
headers
|
|
2086
|
+
};
|
|
2087
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2088
|
+
},
|
|
1273
2089
|
/**
|
|
1274
2090
|
* Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
|
|
1275
2091
|
*
|
|
@@ -1295,6 +2111,34 @@ function createSearchClient({
|
|
|
1295
2111
|
};
|
|
1296
2112
|
return transporter.request(request, requestOptions);
|
|
1297
2113
|
},
|
|
2114
|
+
/**
|
|
2115
|
+
* Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
|
|
2116
|
+
*
|
|
2117
|
+
* 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.
|
|
2118
|
+
*
|
|
2119
|
+
* Required API Key ACLs:
|
|
2120
|
+
* - search
|
|
2121
|
+
* @param getObjectsParams - Request object.
|
|
2122
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2123
|
+
* @see getObjects for the plain version.
|
|
2124
|
+
*/
|
|
2125
|
+
getObjectsWithHTTPInfo(getObjectsParams, requestOptions) {
|
|
2126
|
+
(0, import_client_common.validateRequired)("getObjectsParams", "getObjectsWithHTTPInfo", getObjectsParams);
|
|
2127
|
+
(0, import_client_common.validateRequired)("getObjectsParams.requests", "getObjectsWithHTTPInfo", getObjectsParams.requests);
|
|
2128
|
+
const requestPath = "/1/indexes/*/objects";
|
|
2129
|
+
const headers = {};
|
|
2130
|
+
const queryParameters = {};
|
|
2131
|
+
const request = {
|
|
2132
|
+
method: "POST",
|
|
2133
|
+
path: requestPath,
|
|
2134
|
+
queryParameters,
|
|
2135
|
+
headers,
|
|
2136
|
+
data: getObjectsParams,
|
|
2137
|
+
useReadTransporter: true,
|
|
2138
|
+
cacheable: true
|
|
2139
|
+
};
|
|
2140
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2141
|
+
},
|
|
1298
2142
|
/**
|
|
1299
2143
|
* 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).
|
|
1300
2144
|
*
|
|
@@ -1320,40 +2164,241 @@ function createSearchClient({
|
|
|
1320
2164
|
return transporter.request(request, requestOptions);
|
|
1321
2165
|
},
|
|
1322
2166
|
/**
|
|
1323
|
-
* Retrieves
|
|
2167
|
+
* 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).
|
|
2168
|
+
*
|
|
2169
|
+
* 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.
|
|
2170
|
+
*
|
|
2171
|
+
* Required API Key ACLs:
|
|
2172
|
+
* - settings
|
|
2173
|
+
* @param getRule - The getRule object.
|
|
2174
|
+
* @param getRule.indexName - Name of the index on which to perform the operation.
|
|
2175
|
+
* @param getRule.objectID - Unique identifier of a rule object.
|
|
2176
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2177
|
+
* @see getRule for the plain version.
|
|
2178
|
+
*/
|
|
2179
|
+
getRuleWithHTTPInfo({ indexName, objectID }, requestOptions) {
|
|
2180
|
+
(0, import_client_common.validateRequired)("indexName", "getRuleWithHTTPInfo", indexName);
|
|
2181
|
+
(0, import_client_common.validateRequired)("objectID", "getRuleWithHTTPInfo", objectID);
|
|
2182
|
+
const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2183
|
+
const headers = {};
|
|
2184
|
+
const queryParameters = {};
|
|
2185
|
+
const request = {
|
|
2186
|
+
method: "GET",
|
|
2187
|
+
path: requestPath,
|
|
2188
|
+
queryParameters,
|
|
2189
|
+
headers
|
|
2190
|
+
};
|
|
2191
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2192
|
+
},
|
|
2193
|
+
/**
|
|
2194
|
+
* Retrieves an object with non-null index settings.
|
|
2195
|
+
*
|
|
2196
|
+
* Required API Key ACLs:
|
|
2197
|
+
* - settings
|
|
2198
|
+
* @param getSettings - The getSettings object.
|
|
2199
|
+
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
2200
|
+
* @param getSettings.getVersion - When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.
|
|
2201
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2202
|
+
*/
|
|
2203
|
+
getSettings({ indexName, getVersion }, requestOptions) {
|
|
2204
|
+
(0, import_client_common.validateRequired)("indexName", "getSettings", indexName);
|
|
2205
|
+
const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
|
|
2206
|
+
const headers = {};
|
|
2207
|
+
const queryParameters = {};
|
|
2208
|
+
if (getVersion !== void 0) {
|
|
2209
|
+
queryParameters["getVersion"] = getVersion.toString();
|
|
2210
|
+
}
|
|
2211
|
+
const request = {
|
|
2212
|
+
method: "GET",
|
|
2213
|
+
path: requestPath,
|
|
2214
|
+
queryParameters,
|
|
2215
|
+
headers
|
|
2216
|
+
};
|
|
2217
|
+
return transporter.request(request, requestOptions);
|
|
2218
|
+
},
|
|
2219
|
+
/**
|
|
2220
|
+
* Retrieves an object with non-null index settings.
|
|
2221
|
+
*
|
|
2222
|
+
* 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.
|
|
2223
|
+
*
|
|
2224
|
+
* Required API Key ACLs:
|
|
2225
|
+
* - settings
|
|
2226
|
+
* @param getSettings - The getSettings object.
|
|
2227
|
+
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
2228
|
+
* @param getSettings.getVersion - When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.
|
|
2229
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2230
|
+
* @see getSettings for the plain version.
|
|
2231
|
+
*/
|
|
2232
|
+
getSettingsWithHTTPInfo({ indexName, getVersion }, requestOptions) {
|
|
2233
|
+
(0, import_client_common.validateRequired)("indexName", "getSettingsWithHTTPInfo", indexName);
|
|
2234
|
+
const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
|
|
2235
|
+
const headers = {};
|
|
2236
|
+
const queryParameters = {};
|
|
2237
|
+
if (getVersion !== void 0) {
|
|
2238
|
+
queryParameters["getVersion"] = getVersion.toString();
|
|
2239
|
+
}
|
|
2240
|
+
const request = {
|
|
2241
|
+
method: "GET",
|
|
2242
|
+
path: requestPath,
|
|
2243
|
+
queryParameters,
|
|
2244
|
+
headers
|
|
2245
|
+
};
|
|
2246
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2247
|
+
},
|
|
2248
|
+
/**
|
|
2249
|
+
* Retrieves all allowed IP addresses with access to your application.
|
|
2250
|
+
*
|
|
2251
|
+
* Required API Key ACLs:
|
|
2252
|
+
* - admin
|
|
2253
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2254
|
+
*/
|
|
2255
|
+
getSources(requestOptions) {
|
|
2256
|
+
const requestPath = "/1/security/sources";
|
|
2257
|
+
const headers = {};
|
|
2258
|
+
const queryParameters = {};
|
|
2259
|
+
const request = {
|
|
2260
|
+
method: "GET",
|
|
2261
|
+
path: requestPath,
|
|
2262
|
+
queryParameters,
|
|
2263
|
+
headers
|
|
2264
|
+
};
|
|
2265
|
+
return transporter.request(request, requestOptions);
|
|
2266
|
+
},
|
|
2267
|
+
/**
|
|
2268
|
+
* Retrieves all allowed IP addresses with access to your application.
|
|
2269
|
+
*
|
|
2270
|
+
* 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.
|
|
2271
|
+
*
|
|
2272
|
+
* Required API Key ACLs:
|
|
2273
|
+
* - admin
|
|
2274
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2275
|
+
* @see getSources for the plain version.
|
|
2276
|
+
*/
|
|
2277
|
+
getSourcesWithHTTPInfo(requestOptions) {
|
|
2278
|
+
const requestPath = "/1/security/sources";
|
|
2279
|
+
const headers = {};
|
|
2280
|
+
const queryParameters = {};
|
|
2281
|
+
const request = {
|
|
2282
|
+
method: "GET",
|
|
2283
|
+
path: requestPath,
|
|
2284
|
+
queryParameters,
|
|
2285
|
+
headers
|
|
2286
|
+
};
|
|
2287
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2288
|
+
},
|
|
2289
|
+
/**
|
|
2290
|
+
* 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).
|
|
2291
|
+
*
|
|
2292
|
+
* Required API Key ACLs:
|
|
2293
|
+
* - settings
|
|
2294
|
+
* @param getSynonym - The getSynonym object.
|
|
2295
|
+
* @param getSynonym.indexName - Name of the index on which to perform the operation.
|
|
2296
|
+
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
2297
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2298
|
+
*/
|
|
2299
|
+
getSynonym({ indexName, objectID }, requestOptions) {
|
|
2300
|
+
(0, import_client_common.validateRequired)("indexName", "getSynonym", indexName);
|
|
2301
|
+
(0, import_client_common.validateRequired)("objectID", "getSynonym", objectID);
|
|
2302
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2303
|
+
const headers = {};
|
|
2304
|
+
const queryParameters = {};
|
|
2305
|
+
const request = {
|
|
2306
|
+
method: "GET",
|
|
2307
|
+
path: requestPath,
|
|
2308
|
+
queryParameters,
|
|
2309
|
+
headers
|
|
2310
|
+
};
|
|
2311
|
+
return transporter.request(request, requestOptions);
|
|
2312
|
+
},
|
|
2313
|
+
/**
|
|
2314
|
+
* 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).
|
|
2315
|
+
*
|
|
2316
|
+
* 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.
|
|
2317
|
+
*
|
|
2318
|
+
* Required API Key ACLs:
|
|
2319
|
+
* - settings
|
|
2320
|
+
* @param getSynonym - The getSynonym object.
|
|
2321
|
+
* @param getSynonym.indexName - Name of the index on which to perform the operation.
|
|
2322
|
+
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
2323
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2324
|
+
* @see getSynonym for the plain version.
|
|
2325
|
+
*/
|
|
2326
|
+
getSynonymWithHTTPInfo({ indexName, objectID }, requestOptions) {
|
|
2327
|
+
(0, import_client_common.validateRequired)("indexName", "getSynonymWithHTTPInfo", indexName);
|
|
2328
|
+
(0, import_client_common.validateRequired)("objectID", "getSynonymWithHTTPInfo", objectID);
|
|
2329
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2330
|
+
const headers = {};
|
|
2331
|
+
const queryParameters = {};
|
|
2332
|
+
const request = {
|
|
2333
|
+
method: "GET",
|
|
2334
|
+
path: requestPath,
|
|
2335
|
+
queryParameters,
|
|
2336
|
+
headers
|
|
2337
|
+
};
|
|
2338
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2339
|
+
},
|
|
2340
|
+
/**
|
|
2341
|
+
* 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.
|
|
2342
|
+
*
|
|
2343
|
+
* Required API Key ACLs:
|
|
2344
|
+
* - addObject
|
|
2345
|
+
* @param getTask - The getTask object.
|
|
2346
|
+
* @param getTask.indexName - Name of the index on which to perform the operation.
|
|
2347
|
+
* @param getTask.taskID - Unique task identifier.
|
|
2348
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2349
|
+
*/
|
|
2350
|
+
getTask({ indexName, taskID }, requestOptions) {
|
|
2351
|
+
(0, import_client_common.validateRequired)("indexName", "getTask", indexName);
|
|
2352
|
+
(0, import_client_common.validateRequired)("taskID", "getTask", taskID);
|
|
2353
|
+
const requestPath = "/1/indexes/{indexName}/task/{taskID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{taskID}", encodeURIComponent(taskID));
|
|
2354
|
+
const headers = {};
|
|
2355
|
+
const queryParameters = {};
|
|
2356
|
+
const request = {
|
|
2357
|
+
method: "GET",
|
|
2358
|
+
path: requestPath,
|
|
2359
|
+
queryParameters,
|
|
2360
|
+
headers
|
|
2361
|
+
};
|
|
2362
|
+
return transporter.request(request, requestOptions);
|
|
2363
|
+
},
|
|
2364
|
+
/**
|
|
2365
|
+
* 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.
|
|
2366
|
+
*
|
|
2367
|
+
* 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.
|
|
1324
2368
|
*
|
|
1325
2369
|
* Required API Key ACLs:
|
|
1326
|
-
* -
|
|
1327
|
-
* @param
|
|
1328
|
-
* @param
|
|
1329
|
-
* @param
|
|
2370
|
+
* - addObject
|
|
2371
|
+
* @param getTask - The getTask object.
|
|
2372
|
+
* @param getTask.indexName - Name of the index on which to perform the operation.
|
|
2373
|
+
* @param getTask.taskID - Unique task identifier.
|
|
1330
2374
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2375
|
+
* @see getTask for the plain version.
|
|
1331
2376
|
*/
|
|
1332
|
-
|
|
1333
|
-
(0, import_client_common.validateRequired)("indexName", "
|
|
1334
|
-
|
|
2377
|
+
getTaskWithHTTPInfo({ indexName, taskID }, requestOptions) {
|
|
2378
|
+
(0, import_client_common.validateRequired)("indexName", "getTaskWithHTTPInfo", indexName);
|
|
2379
|
+
(0, import_client_common.validateRequired)("taskID", "getTaskWithHTTPInfo", taskID);
|
|
2380
|
+
const requestPath = "/1/indexes/{indexName}/task/{taskID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{taskID}", encodeURIComponent(taskID));
|
|
1335
2381
|
const headers = {};
|
|
1336
2382
|
const queryParameters = {};
|
|
1337
|
-
if (getVersion !== void 0) {
|
|
1338
|
-
queryParameters["getVersion"] = getVersion.toString();
|
|
1339
|
-
}
|
|
1340
2383
|
const request = {
|
|
1341
2384
|
method: "GET",
|
|
1342
2385
|
path: requestPath,
|
|
1343
2386
|
queryParameters,
|
|
1344
2387
|
headers
|
|
1345
2388
|
};
|
|
1346
|
-
return transporter.
|
|
2389
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1347
2390
|
},
|
|
1348
2391
|
/**
|
|
1349
|
-
*
|
|
2392
|
+
* 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.
|
|
1350
2393
|
*
|
|
1351
2394
|
* Required API Key ACLs:
|
|
1352
2395
|
* - admin
|
|
2396
|
+
*
|
|
2397
|
+
* @deprecated
|
|
1353
2398
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1354
2399
|
*/
|
|
1355
|
-
|
|
1356
|
-
const requestPath = "/1/
|
|
2400
|
+
getTopUserIds(requestOptions) {
|
|
2401
|
+
const requestPath = "/1/clusters/mapping/top";
|
|
1357
2402
|
const headers = {};
|
|
1358
2403
|
const queryParameters = {};
|
|
1359
2404
|
const request = {
|
|
@@ -1365,19 +2410,19 @@ function createSearchClient({
|
|
|
1365
2410
|
return transporter.request(request, requestOptions);
|
|
1366
2411
|
},
|
|
1367
2412
|
/**
|
|
1368
|
-
*
|
|
2413
|
+
* 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.
|
|
2414
|
+
*
|
|
2415
|
+
* 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.
|
|
1369
2416
|
*
|
|
1370
2417
|
* Required API Key ACLs:
|
|
1371
|
-
* -
|
|
1372
|
-
*
|
|
1373
|
-
* @
|
|
1374
|
-
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
2418
|
+
* - admin
|
|
2419
|
+
*
|
|
2420
|
+
* @deprecated
|
|
1375
2421
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2422
|
+
* @see getTopUserIds for the plain version.
|
|
1376
2423
|
*/
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
(0, import_client_common.validateRequired)("objectID", "getSynonym", objectID);
|
|
1380
|
-
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2424
|
+
getTopUserIdsWithHTTPInfo(requestOptions) {
|
|
2425
|
+
const requestPath = "/1/clusters/mapping/top";
|
|
1381
2426
|
const headers = {};
|
|
1382
2427
|
const queryParameters = {};
|
|
1383
2428
|
const request = {
|
|
@@ -1386,22 +2431,22 @@ function createSearchClient({
|
|
|
1386
2431
|
queryParameters,
|
|
1387
2432
|
headers
|
|
1388
2433
|
};
|
|
1389
|
-
return transporter.
|
|
2434
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1390
2435
|
},
|
|
1391
2436
|
/**
|
|
1392
|
-
*
|
|
2437
|
+
* 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.
|
|
1393
2438
|
*
|
|
1394
2439
|
* Required API Key ACLs:
|
|
1395
|
-
* -
|
|
1396
|
-
*
|
|
1397
|
-
* @
|
|
1398
|
-
* @param
|
|
2440
|
+
* - admin
|
|
2441
|
+
*
|
|
2442
|
+
* @deprecated
|
|
2443
|
+
* @param getUserId - The getUserId object.
|
|
2444
|
+
* @param getUserId.userID - Unique identifier of the user who makes the search request.
|
|
1399
2445
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1400
2446
|
*/
|
|
1401
|
-
|
|
1402
|
-
(0, import_client_common.validateRequired)("
|
|
1403
|
-
|
|
1404
|
-
const requestPath = "/1/indexes/{indexName}/task/{taskID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{taskID}", encodeURIComponent(taskID));
|
|
2447
|
+
getUserId({ userID }, requestOptions) {
|
|
2448
|
+
(0, import_client_common.validateRequired)("userID", "getUserId", userID);
|
|
2449
|
+
const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
|
|
1405
2450
|
const headers = {};
|
|
1406
2451
|
const queryParameters = {};
|
|
1407
2452
|
const request = {
|
|
@@ -1413,16 +2458,22 @@ function createSearchClient({
|
|
|
1413
2458
|
return transporter.request(request, requestOptions);
|
|
1414
2459
|
},
|
|
1415
2460
|
/**
|
|
1416
|
-
*
|
|
2461
|
+
* 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.
|
|
2462
|
+
*
|
|
2463
|
+
* 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.
|
|
1417
2464
|
*
|
|
1418
2465
|
* Required API Key ACLs:
|
|
1419
2466
|
* - admin
|
|
1420
2467
|
*
|
|
1421
2468
|
* @deprecated
|
|
2469
|
+
* @param getUserId - The getUserId object.
|
|
2470
|
+
* @param getUserId.userID - Unique identifier of the user who makes the search request.
|
|
1422
2471
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2472
|
+
* @see getUserId for the plain version.
|
|
1423
2473
|
*/
|
|
1424
|
-
|
|
1425
|
-
|
|
2474
|
+
getUserIdWithHTTPInfo({ userID }, requestOptions) {
|
|
2475
|
+
(0, import_client_common.validateRequired)("userID", "getUserIdWithHTTPInfo", userID);
|
|
2476
|
+
const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
|
|
1426
2477
|
const headers = {};
|
|
1427
2478
|
const queryParameters = {};
|
|
1428
2479
|
const request = {
|
|
@@ -1431,24 +2482,26 @@ function createSearchClient({
|
|
|
1431
2482
|
queryParameters,
|
|
1432
2483
|
headers
|
|
1433
2484
|
};
|
|
1434
|
-
return transporter.
|
|
2485
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1435
2486
|
},
|
|
1436
2487
|
/**
|
|
1437
|
-
*
|
|
2488
|
+
* 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.
|
|
1438
2489
|
*
|
|
1439
2490
|
* Required API Key ACLs:
|
|
1440
2491
|
* - admin
|
|
1441
2492
|
*
|
|
1442
2493
|
* @deprecated
|
|
1443
|
-
* @param
|
|
1444
|
-
* @param
|
|
2494
|
+
* @param hasPendingMappings - The hasPendingMappings object.
|
|
2495
|
+
* @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
|
|
1445
2496
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1446
2497
|
*/
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
|
|
2498
|
+
hasPendingMappings({ getClusters } = {}, requestOptions = void 0) {
|
|
2499
|
+
const requestPath = "/1/clusters/mapping/pending";
|
|
1450
2500
|
const headers = {};
|
|
1451
2501
|
const queryParameters = {};
|
|
2502
|
+
if (getClusters !== void 0) {
|
|
2503
|
+
queryParameters["getClusters"] = getClusters.toString();
|
|
2504
|
+
}
|
|
1452
2505
|
const request = {
|
|
1453
2506
|
method: "GET",
|
|
1454
2507
|
path: requestPath,
|
|
@@ -1460,6 +2513,8 @@ function createSearchClient({
|
|
|
1460
2513
|
/**
|
|
1461
2514
|
* 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.
|
|
1462
2515
|
*
|
|
2516
|
+
* 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.
|
|
2517
|
+
*
|
|
1463
2518
|
* Required API Key ACLs:
|
|
1464
2519
|
* - admin
|
|
1465
2520
|
*
|
|
@@ -1467,8 +2522,9 @@ function createSearchClient({
|
|
|
1467
2522
|
* @param hasPendingMappings - The hasPendingMappings object.
|
|
1468
2523
|
* @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
|
|
1469
2524
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2525
|
+
* @see hasPendingMappings for the plain version.
|
|
1470
2526
|
*/
|
|
1471
|
-
|
|
2527
|
+
hasPendingMappingsWithHTTPInfo({ getClusters } = {}, requestOptions = void 0) {
|
|
1472
2528
|
const requestPath = "/1/clusters/mapping/pending";
|
|
1473
2529
|
const headers = {};
|
|
1474
2530
|
const queryParameters = {};
|
|
@@ -1481,7 +2537,7 @@ function createSearchClient({
|
|
|
1481
2537
|
queryParameters,
|
|
1482
2538
|
headers
|
|
1483
2539
|
};
|
|
1484
|
-
return transporter.
|
|
2540
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1485
2541
|
},
|
|
1486
2542
|
/**
|
|
1487
2543
|
* Lists all API keys associated with your Algolia application, including their permissions and restrictions.
|
|
@@ -1502,6 +2558,28 @@ function createSearchClient({
|
|
|
1502
2558
|
};
|
|
1503
2559
|
return transporter.request(request, requestOptions);
|
|
1504
2560
|
},
|
|
2561
|
+
/**
|
|
2562
|
+
* Lists all API keys associated with your Algolia application, including their permissions and restrictions.
|
|
2563
|
+
*
|
|
2564
|
+
* 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.
|
|
2565
|
+
*
|
|
2566
|
+
* Required API Key ACLs:
|
|
2567
|
+
* - admin
|
|
2568
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2569
|
+
* @see listApiKeys for the plain version.
|
|
2570
|
+
*/
|
|
2571
|
+
listApiKeysWithHTTPInfo(requestOptions) {
|
|
2572
|
+
const requestPath = "/1/keys";
|
|
2573
|
+
const headers = {};
|
|
2574
|
+
const queryParameters = {};
|
|
2575
|
+
const request = {
|
|
2576
|
+
method: "GET",
|
|
2577
|
+
path: requestPath,
|
|
2578
|
+
queryParameters,
|
|
2579
|
+
headers
|
|
2580
|
+
};
|
|
2581
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2582
|
+
},
|
|
1505
2583
|
/**
|
|
1506
2584
|
* Lists the available clusters in a multi-cluster setup.
|
|
1507
2585
|
*
|
|
@@ -1523,6 +2601,30 @@ function createSearchClient({
|
|
|
1523
2601
|
};
|
|
1524
2602
|
return transporter.request(request, requestOptions);
|
|
1525
2603
|
},
|
|
2604
|
+
/**
|
|
2605
|
+
* Lists the available clusters in a multi-cluster setup.
|
|
2606
|
+
*
|
|
2607
|
+
* 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.
|
|
2608
|
+
*
|
|
2609
|
+
* Required API Key ACLs:
|
|
2610
|
+
* - admin
|
|
2611
|
+
*
|
|
2612
|
+
* @deprecated
|
|
2613
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2614
|
+
* @see listClusters for the plain version.
|
|
2615
|
+
*/
|
|
2616
|
+
listClustersWithHTTPInfo(requestOptions) {
|
|
2617
|
+
const requestPath = "/1/clusters";
|
|
2618
|
+
const headers = {};
|
|
2619
|
+
const queryParameters = {};
|
|
2620
|
+
const request = {
|
|
2621
|
+
method: "GET",
|
|
2622
|
+
path: requestPath,
|
|
2623
|
+
queryParameters,
|
|
2624
|
+
headers
|
|
2625
|
+
};
|
|
2626
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2627
|
+
},
|
|
1526
2628
|
/**
|
|
1527
2629
|
* Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
|
|
1528
2630
|
*
|
|
@@ -1551,6 +2653,37 @@ function createSearchClient({
|
|
|
1551
2653
|
};
|
|
1552
2654
|
return transporter.request(request, requestOptions);
|
|
1553
2655
|
},
|
|
2656
|
+
/**
|
|
2657
|
+
* Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
|
|
2658
|
+
*
|
|
2659
|
+
* 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.
|
|
2660
|
+
*
|
|
2661
|
+
* Required API Key ACLs:
|
|
2662
|
+
* - listIndexes
|
|
2663
|
+
* @param listIndices - The listIndices object.
|
|
2664
|
+
* @param listIndices.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
2665
|
+
* @param listIndices.hitsPerPage - Number of hits per page.
|
|
2666
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2667
|
+
* @see listIndices for the plain version.
|
|
2668
|
+
*/
|
|
2669
|
+
listIndicesWithHTTPInfo({ page, hitsPerPage } = {}, requestOptions = void 0) {
|
|
2670
|
+
const requestPath = "/1/indexes";
|
|
2671
|
+
const headers = {};
|
|
2672
|
+
const queryParameters = {};
|
|
2673
|
+
if (page !== void 0) {
|
|
2674
|
+
queryParameters["page"] = page.toString();
|
|
2675
|
+
}
|
|
2676
|
+
if (hitsPerPage !== void 0) {
|
|
2677
|
+
queryParameters["hitsPerPage"] = hitsPerPage.toString();
|
|
2678
|
+
}
|
|
2679
|
+
const request = {
|
|
2680
|
+
method: "GET",
|
|
2681
|
+
path: requestPath,
|
|
2682
|
+
queryParameters,
|
|
2683
|
+
headers
|
|
2684
|
+
};
|
|
2685
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2686
|
+
},
|
|
1554
2687
|
/**
|
|
1555
2688
|
* 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.
|
|
1556
2689
|
*
|
|
@@ -1581,6 +2714,39 @@ function createSearchClient({
|
|
|
1581
2714
|
};
|
|
1582
2715
|
return transporter.request(request, requestOptions);
|
|
1583
2716
|
},
|
|
2717
|
+
/**
|
|
2718
|
+
* 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.
|
|
2719
|
+
*
|
|
2720
|
+
* 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.
|
|
2721
|
+
*
|
|
2722
|
+
* Required API Key ACLs:
|
|
2723
|
+
* - admin
|
|
2724
|
+
*
|
|
2725
|
+
* @deprecated
|
|
2726
|
+
* @param listUserIds - The listUserIds object.
|
|
2727
|
+
* @param listUserIds.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
2728
|
+
* @param listUserIds.hitsPerPage - Number of hits per page.
|
|
2729
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2730
|
+
* @see listUserIds for the plain version.
|
|
2731
|
+
*/
|
|
2732
|
+
listUserIdsWithHTTPInfo({ page, hitsPerPage } = {}, requestOptions = void 0) {
|
|
2733
|
+
const requestPath = "/1/clusters/mapping";
|
|
2734
|
+
const headers = {};
|
|
2735
|
+
const queryParameters = {};
|
|
2736
|
+
if (page !== void 0) {
|
|
2737
|
+
queryParameters["page"] = page.toString();
|
|
2738
|
+
}
|
|
2739
|
+
if (hitsPerPage !== void 0) {
|
|
2740
|
+
queryParameters["hitsPerPage"] = hitsPerPage.toString();
|
|
2741
|
+
}
|
|
2742
|
+
const request = {
|
|
2743
|
+
method: "GET",
|
|
2744
|
+
path: requestPath,
|
|
2745
|
+
queryParameters,
|
|
2746
|
+
headers
|
|
2747
|
+
};
|
|
2748
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2749
|
+
},
|
|
1584
2750
|
/**
|
|
1585
2751
|
* 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).
|
|
1586
2752
|
*
|
|
@@ -1604,6 +2770,32 @@ function createSearchClient({
|
|
|
1604
2770
|
};
|
|
1605
2771
|
return transporter.request(request, requestOptions);
|
|
1606
2772
|
},
|
|
2773
|
+
/**
|
|
2774
|
+
* 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).
|
|
2775
|
+
*
|
|
2776
|
+
* 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.
|
|
2777
|
+
*
|
|
2778
|
+
* Required API Key ACLs:
|
|
2779
|
+
* - addObject
|
|
2780
|
+
* @param batchParams - The batchParams object.
|
|
2781
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2782
|
+
* @see multipleBatch for the plain version.
|
|
2783
|
+
*/
|
|
2784
|
+
multipleBatchWithHTTPInfo(batchParams, requestOptions) {
|
|
2785
|
+
(0, import_client_common.validateRequired)("batchParams", "multipleBatchWithHTTPInfo", batchParams);
|
|
2786
|
+
(0, import_client_common.validateRequired)("batchParams.requests", "multipleBatchWithHTTPInfo", batchParams.requests);
|
|
2787
|
+
const requestPath = "/1/indexes/*/batch";
|
|
2788
|
+
const headers = {};
|
|
2789
|
+
const queryParameters = {};
|
|
2790
|
+
const request = {
|
|
2791
|
+
method: "POST",
|
|
2792
|
+
path: requestPath,
|
|
2793
|
+
queryParameters,
|
|
2794
|
+
headers,
|
|
2795
|
+
data: batchParams
|
|
2796
|
+
};
|
|
2797
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2798
|
+
},
|
|
1607
2799
|
/**
|
|
1608
2800
|
* 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).
|
|
1609
2801
|
*
|
|
@@ -1627,13 +2819,80 @@ function createSearchClient({
|
|
|
1627
2819
|
path: requestPath,
|
|
1628
2820
|
queryParameters,
|
|
1629
2821
|
headers,
|
|
1630
|
-
data: operationIndexParams
|
|
2822
|
+
data: operationIndexParams
|
|
2823
|
+
};
|
|
2824
|
+
return transporter.request(request, requestOptions);
|
|
2825
|
+
},
|
|
2826
|
+
/**
|
|
2827
|
+
* 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).
|
|
2828
|
+
*
|
|
2829
|
+
* 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.
|
|
2830
|
+
*
|
|
2831
|
+
* Required API Key ACLs:
|
|
2832
|
+
* - addObject
|
|
2833
|
+
* @param operationIndex - The operationIndex object.
|
|
2834
|
+
* @param operationIndex.indexName - Name of the index on which to perform the operation.
|
|
2835
|
+
* @param operationIndex.operationIndexParams - The operationIndexParams object.
|
|
2836
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2837
|
+
* @see operationIndex for the plain version.
|
|
2838
|
+
*/
|
|
2839
|
+
operationIndexWithHTTPInfo({ indexName, operationIndexParams }, requestOptions) {
|
|
2840
|
+
(0, import_client_common.validateRequired)("indexName", "operationIndexWithHTTPInfo", indexName);
|
|
2841
|
+
(0, import_client_common.validateRequired)("operationIndexParams", "operationIndexWithHTTPInfo", operationIndexParams);
|
|
2842
|
+
(0, import_client_common.validateRequired)("operationIndexParams.operation", "operationIndexWithHTTPInfo", operationIndexParams.operation);
|
|
2843
|
+
(0, import_client_common.validateRequired)(
|
|
2844
|
+
"operationIndexParams.destination",
|
|
2845
|
+
"operationIndexWithHTTPInfo",
|
|
2846
|
+
operationIndexParams.destination
|
|
2847
|
+
);
|
|
2848
|
+
const requestPath = "/1/indexes/{indexName}/operation".replace("{indexName}", encodeURIComponent(indexName));
|
|
2849
|
+
const headers = {};
|
|
2850
|
+
const queryParameters = {};
|
|
2851
|
+
const request = {
|
|
2852
|
+
method: "POST",
|
|
2853
|
+
path: requestPath,
|
|
2854
|
+
queryParameters,
|
|
2855
|
+
headers,
|
|
2856
|
+
data: operationIndexParams
|
|
2857
|
+
};
|
|
2858
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2859
|
+
},
|
|
2860
|
+
/**
|
|
2861
|
+
* 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).
|
|
2862
|
+
*
|
|
2863
|
+
* Required API Key ACLs:
|
|
2864
|
+
* - addObject
|
|
2865
|
+
* @param partialUpdateObject - The partialUpdateObject object.
|
|
2866
|
+
* @param partialUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
2867
|
+
* @param partialUpdateObject.objectID - Unique record identifier.
|
|
2868
|
+
* @param partialUpdateObject.attributesToUpdate - Attributes with their values.
|
|
2869
|
+
* @param partialUpdateObject.createIfNotExists - Whether to create a new record if it doesn\'t exist.
|
|
2870
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2871
|
+
*/
|
|
2872
|
+
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists }, requestOptions) {
|
|
2873
|
+
(0, import_client_common.validateRequired)("indexName", "partialUpdateObject", indexName);
|
|
2874
|
+
(0, import_client_common.validateRequired)("objectID", "partialUpdateObject", objectID);
|
|
2875
|
+
(0, import_client_common.validateRequired)("attributesToUpdate", "partialUpdateObject", attributesToUpdate);
|
|
2876
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2877
|
+
const headers = {};
|
|
2878
|
+
const queryParameters = {};
|
|
2879
|
+
if (createIfNotExists !== void 0) {
|
|
2880
|
+
queryParameters["createIfNotExists"] = createIfNotExists.toString();
|
|
2881
|
+
}
|
|
2882
|
+
const request = {
|
|
2883
|
+
method: "POST",
|
|
2884
|
+
path: requestPath,
|
|
2885
|
+
queryParameters,
|
|
2886
|
+
headers,
|
|
2887
|
+
data: attributesToUpdate
|
|
1631
2888
|
};
|
|
1632
2889
|
return transporter.request(request, requestOptions);
|
|
1633
2890
|
},
|
|
1634
2891
|
/**
|
|
1635
2892
|
* 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).
|
|
1636
2893
|
*
|
|
2894
|
+
* 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.
|
|
2895
|
+
*
|
|
1637
2896
|
* Required API Key ACLs:
|
|
1638
2897
|
* - addObject
|
|
1639
2898
|
* @param partialUpdateObject - The partialUpdateObject object.
|
|
@@ -1642,11 +2901,12 @@ function createSearchClient({
|
|
|
1642
2901
|
* @param partialUpdateObject.attributesToUpdate - Attributes with their values.
|
|
1643
2902
|
* @param partialUpdateObject.createIfNotExists - Whether to create a new record if it doesn\'t exist.
|
|
1644
2903
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2904
|
+
* @see partialUpdateObject for the plain version.
|
|
1645
2905
|
*/
|
|
1646
|
-
|
|
1647
|
-
(0, import_client_common.validateRequired)("indexName", "
|
|
1648
|
-
(0, import_client_common.validateRequired)("objectID", "
|
|
1649
|
-
(0, import_client_common.validateRequired)("attributesToUpdate", "
|
|
2906
|
+
partialUpdateObjectWithHTTPInfo({ indexName, objectID, attributesToUpdate, createIfNotExists }, requestOptions) {
|
|
2907
|
+
(0, import_client_common.validateRequired)("indexName", "partialUpdateObjectWithHTTPInfo", indexName);
|
|
2908
|
+
(0, import_client_common.validateRequired)("objectID", "partialUpdateObjectWithHTTPInfo", objectID);
|
|
2909
|
+
(0, import_client_common.validateRequired)("attributesToUpdate", "partialUpdateObjectWithHTTPInfo", attributesToUpdate);
|
|
1650
2910
|
const requestPath = "/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1651
2911
|
const headers = {};
|
|
1652
2912
|
const queryParameters = {};
|
|
@@ -1660,7 +2920,7 @@ function createSearchClient({
|
|
|
1660
2920
|
headers,
|
|
1661
2921
|
data: attributesToUpdate
|
|
1662
2922
|
};
|
|
1663
|
-
return transporter.
|
|
2923
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1664
2924
|
},
|
|
1665
2925
|
/**
|
|
1666
2926
|
* Deletes a user ID and its associated data from the clusters.
|
|
@@ -1686,6 +2946,33 @@ function createSearchClient({
|
|
|
1686
2946
|
};
|
|
1687
2947
|
return transporter.request(request, requestOptions);
|
|
1688
2948
|
},
|
|
2949
|
+
/**
|
|
2950
|
+
* Deletes a user ID and its associated data from the clusters.
|
|
2951
|
+
*
|
|
2952
|
+
* 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.
|
|
2953
|
+
*
|
|
2954
|
+
* Required API Key ACLs:
|
|
2955
|
+
* - admin
|
|
2956
|
+
*
|
|
2957
|
+
* @deprecated
|
|
2958
|
+
* @param removeUserId - The removeUserId object.
|
|
2959
|
+
* @param removeUserId.userID - Unique identifier of the user who makes the search request.
|
|
2960
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2961
|
+
* @see removeUserId for the plain version.
|
|
2962
|
+
*/
|
|
2963
|
+
removeUserIdWithHTTPInfo({ userID }, requestOptions) {
|
|
2964
|
+
(0, import_client_common.validateRequired)("userID", "removeUserIdWithHTTPInfo", userID);
|
|
2965
|
+
const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
|
|
2966
|
+
const headers = {};
|
|
2967
|
+
const queryParameters = {};
|
|
2968
|
+
const request = {
|
|
2969
|
+
method: "DELETE",
|
|
2970
|
+
path: requestPath,
|
|
2971
|
+
queryParameters,
|
|
2972
|
+
headers
|
|
2973
|
+
};
|
|
2974
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2975
|
+
},
|
|
1689
2976
|
/**
|
|
1690
2977
|
* Replaces the list of allowed sources.
|
|
1691
2978
|
*
|
|
@@ -1709,6 +2996,32 @@ function createSearchClient({
|
|
|
1709
2996
|
};
|
|
1710
2997
|
return transporter.request(request, requestOptions);
|
|
1711
2998
|
},
|
|
2999
|
+
/**
|
|
3000
|
+
* Replaces the list of allowed sources.
|
|
3001
|
+
*
|
|
3002
|
+
* 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.
|
|
3003
|
+
*
|
|
3004
|
+
* Required API Key ACLs:
|
|
3005
|
+
* - admin
|
|
3006
|
+
* @param replaceSources - The replaceSources object.
|
|
3007
|
+
* @param replaceSources.source - Allowed sources.
|
|
3008
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3009
|
+
* @see replaceSources for the plain version.
|
|
3010
|
+
*/
|
|
3011
|
+
replaceSourcesWithHTTPInfo({ source }, requestOptions) {
|
|
3012
|
+
(0, import_client_common.validateRequired)("source", "replaceSourcesWithHTTPInfo", source);
|
|
3013
|
+
const requestPath = "/1/security/sources";
|
|
3014
|
+
const headers = {};
|
|
3015
|
+
const queryParameters = {};
|
|
3016
|
+
const request = {
|
|
3017
|
+
method: "PUT",
|
|
3018
|
+
path: requestPath,
|
|
3019
|
+
queryParameters,
|
|
3020
|
+
headers,
|
|
3021
|
+
data: source
|
|
3022
|
+
};
|
|
3023
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3024
|
+
},
|
|
1712
3025
|
/**
|
|
1713
3026
|
* 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.
|
|
1714
3027
|
*
|
|
@@ -1731,6 +3044,31 @@ function createSearchClient({
|
|
|
1731
3044
|
};
|
|
1732
3045
|
return transporter.request(request, requestOptions);
|
|
1733
3046
|
},
|
|
3047
|
+
/**
|
|
3048
|
+
* 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.
|
|
3049
|
+
*
|
|
3050
|
+
* 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.
|
|
3051
|
+
*
|
|
3052
|
+
* Required API Key ACLs:
|
|
3053
|
+
* - admin
|
|
3054
|
+
* @param restoreApiKey - The restoreApiKey object.
|
|
3055
|
+
* @param restoreApiKey.key - API key.
|
|
3056
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3057
|
+
* @see restoreApiKey for the plain version.
|
|
3058
|
+
*/
|
|
3059
|
+
restoreApiKeyWithHTTPInfo({ key }, requestOptions) {
|
|
3060
|
+
(0, import_client_common.validateRequired)("key", "restoreApiKeyWithHTTPInfo", key);
|
|
3061
|
+
const requestPath = "/1/keys/{key}/restore".replace("{key}", encodeURIComponent(key));
|
|
3062
|
+
const headers = {};
|
|
3063
|
+
const queryParameters = {};
|
|
3064
|
+
const request = {
|
|
3065
|
+
method: "POST",
|
|
3066
|
+
path: requestPath,
|
|
3067
|
+
queryParameters,
|
|
3068
|
+
headers
|
|
3069
|
+
};
|
|
3070
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3071
|
+
},
|
|
1734
3072
|
/**
|
|
1735
3073
|
* 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).
|
|
1736
3074
|
*
|
|
@@ -1756,6 +3094,34 @@ function createSearchClient({
|
|
|
1756
3094
|
};
|
|
1757
3095
|
return transporter.request(request, requestOptions);
|
|
1758
3096
|
},
|
|
3097
|
+
/**
|
|
3098
|
+
* 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).
|
|
3099
|
+
*
|
|
3100
|
+
* 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.
|
|
3101
|
+
*
|
|
3102
|
+
* Required API Key ACLs:
|
|
3103
|
+
* - addObject
|
|
3104
|
+
* @param saveObject - The saveObject object.
|
|
3105
|
+
* @param saveObject.indexName - Name of the index on which to perform the operation.
|
|
3106
|
+
* @param saveObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
3107
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3108
|
+
* @see saveObject for the plain version.
|
|
3109
|
+
*/
|
|
3110
|
+
saveObjectWithHTTPInfo({ indexName, body }, requestOptions) {
|
|
3111
|
+
(0, import_client_common.validateRequired)("indexName", "saveObjectWithHTTPInfo", indexName);
|
|
3112
|
+
(0, import_client_common.validateRequired)("body", "saveObjectWithHTTPInfo", body);
|
|
3113
|
+
const requestPath = "/1/indexes/{indexName}".replace("{indexName}", encodeURIComponent(indexName));
|
|
3114
|
+
const headers = {};
|
|
3115
|
+
const queryParameters = {};
|
|
3116
|
+
const request = {
|
|
3117
|
+
method: "POST",
|
|
3118
|
+
path: requestPath,
|
|
3119
|
+
queryParameters,
|
|
3120
|
+
headers,
|
|
3121
|
+
data: body
|
|
3122
|
+
};
|
|
3123
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3124
|
+
},
|
|
1759
3125
|
/**
|
|
1760
3126
|
* 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).
|
|
1761
3127
|
*
|
|
@@ -1789,6 +3155,42 @@ function createSearchClient({
|
|
|
1789
3155
|
};
|
|
1790
3156
|
return transporter.request(request, requestOptions);
|
|
1791
3157
|
},
|
|
3158
|
+
/**
|
|
3159
|
+
* 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).
|
|
3160
|
+
*
|
|
3161
|
+
* 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.
|
|
3162
|
+
*
|
|
3163
|
+
* Required API Key ACLs:
|
|
3164
|
+
* - editSettings
|
|
3165
|
+
* @param saveRule - The saveRule object.
|
|
3166
|
+
* @param saveRule.indexName - Name of the index on which to perform the operation.
|
|
3167
|
+
* @param saveRule.objectID - Unique identifier of a rule object.
|
|
3168
|
+
* @param saveRule.rule - The rule object.
|
|
3169
|
+
* @param saveRule.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3170
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3171
|
+
* @see saveRule for the plain version.
|
|
3172
|
+
*/
|
|
3173
|
+
saveRuleWithHTTPInfo({ indexName, objectID, rule, forwardToReplicas }, requestOptions) {
|
|
3174
|
+
(0, import_client_common.validateRequired)("indexName", "saveRuleWithHTTPInfo", indexName);
|
|
3175
|
+
(0, import_client_common.validateRequired)("objectID", "saveRuleWithHTTPInfo", objectID);
|
|
3176
|
+
(0, import_client_common.validateRequired)("rule", "saveRuleWithHTTPInfo", rule);
|
|
3177
|
+
(0, import_client_common.validateRequired)("rule.objectID", "saveRuleWithHTTPInfo", rule.objectID);
|
|
3178
|
+
(0, import_client_common.validateRequired)("rule.consequence", "saveRuleWithHTTPInfo", rule.consequence);
|
|
3179
|
+
const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
3180
|
+
const headers = {};
|
|
3181
|
+
const queryParameters = {};
|
|
3182
|
+
if (forwardToReplicas !== void 0) {
|
|
3183
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3184
|
+
}
|
|
3185
|
+
const request = {
|
|
3186
|
+
method: "PUT",
|
|
3187
|
+
path: requestPath,
|
|
3188
|
+
queryParameters,
|
|
3189
|
+
headers,
|
|
3190
|
+
data: rule
|
|
3191
|
+
};
|
|
3192
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3193
|
+
},
|
|
1792
3194
|
/**
|
|
1793
3195
|
* 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).
|
|
1794
3196
|
*
|
|
@@ -1822,6 +3224,42 @@ function createSearchClient({
|
|
|
1822
3224
|
};
|
|
1823
3225
|
return transporter.request(request, requestOptions);
|
|
1824
3226
|
},
|
|
3227
|
+
/**
|
|
3228
|
+
* 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).
|
|
3229
|
+
*
|
|
3230
|
+
* 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.
|
|
3231
|
+
*
|
|
3232
|
+
* Required API Key ACLs:
|
|
3233
|
+
* - editSettings
|
|
3234
|
+
* @param saveRules - The saveRules object.
|
|
3235
|
+
* @param saveRules.indexName - Name of the index on which to perform the operation.
|
|
3236
|
+
* @param saveRules.rules - The rules object.
|
|
3237
|
+
* @param saveRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3238
|
+
* @param saveRules.clearExistingRules - Whether existing rules should be deleted before adding this batch.
|
|
3239
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3240
|
+
* @see saveRules for the plain version.
|
|
3241
|
+
*/
|
|
3242
|
+
saveRulesWithHTTPInfo({ indexName, rules, forwardToReplicas, clearExistingRules }, requestOptions) {
|
|
3243
|
+
(0, import_client_common.validateRequired)("indexName", "saveRulesWithHTTPInfo", indexName);
|
|
3244
|
+
(0, import_client_common.validateRequired)("rules", "saveRulesWithHTTPInfo", rules);
|
|
3245
|
+
const requestPath = "/1/indexes/{indexName}/rules/batch".replace("{indexName}", encodeURIComponent(indexName));
|
|
3246
|
+
const headers = {};
|
|
3247
|
+
const queryParameters = {};
|
|
3248
|
+
if (forwardToReplicas !== void 0) {
|
|
3249
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3250
|
+
}
|
|
3251
|
+
if (clearExistingRules !== void 0) {
|
|
3252
|
+
queryParameters["clearExistingRules"] = clearExistingRules.toString();
|
|
3253
|
+
}
|
|
3254
|
+
const request = {
|
|
3255
|
+
method: "POST",
|
|
3256
|
+
path: requestPath,
|
|
3257
|
+
queryParameters,
|
|
3258
|
+
headers,
|
|
3259
|
+
data: rules
|
|
3260
|
+
};
|
|
3261
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3262
|
+
},
|
|
1825
3263
|
/**
|
|
1826
3264
|
* 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).
|
|
1827
3265
|
*
|
|
@@ -1855,6 +3293,42 @@ function createSearchClient({
|
|
|
1855
3293
|
};
|
|
1856
3294
|
return transporter.request(request, requestOptions);
|
|
1857
3295
|
},
|
|
3296
|
+
/**
|
|
3297
|
+
* 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).
|
|
3298
|
+
*
|
|
3299
|
+
* 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.
|
|
3300
|
+
*
|
|
3301
|
+
* Required API Key ACLs:
|
|
3302
|
+
* - editSettings
|
|
3303
|
+
* @param saveSynonym - The saveSynonym object.
|
|
3304
|
+
* @param saveSynonym.indexName - Name of the index on which to perform the operation.
|
|
3305
|
+
* @param saveSynonym.objectID - Unique identifier of a synonym object.
|
|
3306
|
+
* @param saveSynonym.synonymHit - The synonymHit object.
|
|
3307
|
+
* @param saveSynonym.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3308
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3309
|
+
* @see saveSynonym for the plain version.
|
|
3310
|
+
*/
|
|
3311
|
+
saveSynonymWithHTTPInfo({ indexName, objectID, synonymHit, forwardToReplicas }, requestOptions) {
|
|
3312
|
+
(0, import_client_common.validateRequired)("indexName", "saveSynonymWithHTTPInfo", indexName);
|
|
3313
|
+
(0, import_client_common.validateRequired)("objectID", "saveSynonymWithHTTPInfo", objectID);
|
|
3314
|
+
(0, import_client_common.validateRequired)("synonymHit", "saveSynonymWithHTTPInfo", synonymHit);
|
|
3315
|
+
(0, import_client_common.validateRequired)("synonymHit.objectID", "saveSynonymWithHTTPInfo", synonymHit.objectID);
|
|
3316
|
+
(0, import_client_common.validateRequired)("synonymHit.type", "saveSynonymWithHTTPInfo", synonymHit.type);
|
|
3317
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
3318
|
+
const headers = {};
|
|
3319
|
+
const queryParameters = {};
|
|
3320
|
+
if (forwardToReplicas !== void 0) {
|
|
3321
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3322
|
+
}
|
|
3323
|
+
const request = {
|
|
3324
|
+
method: "PUT",
|
|
3325
|
+
path: requestPath,
|
|
3326
|
+
queryParameters,
|
|
3327
|
+
headers,
|
|
3328
|
+
data: synonymHit
|
|
3329
|
+
};
|
|
3330
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3331
|
+
},
|
|
1858
3332
|
/**
|
|
1859
3333
|
* 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).
|
|
1860
3334
|
*
|
|
@@ -1888,6 +3362,42 @@ function createSearchClient({
|
|
|
1888
3362
|
};
|
|
1889
3363
|
return transporter.request(request, requestOptions);
|
|
1890
3364
|
},
|
|
3365
|
+
/**
|
|
3366
|
+
* 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).
|
|
3367
|
+
*
|
|
3368
|
+
* 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.
|
|
3369
|
+
*
|
|
3370
|
+
* Required API Key ACLs:
|
|
3371
|
+
* - editSettings
|
|
3372
|
+
* @param saveSynonyms - The saveSynonyms object.
|
|
3373
|
+
* @param saveSynonyms.indexName - Name of the index on which to perform the operation.
|
|
3374
|
+
* @param saveSynonyms.synonymHit - The synonymHit object.
|
|
3375
|
+
* @param saveSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3376
|
+
* @param saveSynonyms.replaceExistingSynonyms - Whether to replace all synonyms in the index with the ones sent with this request.
|
|
3377
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3378
|
+
* @see saveSynonyms for the plain version.
|
|
3379
|
+
*/
|
|
3380
|
+
saveSynonymsWithHTTPInfo({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms }, requestOptions) {
|
|
3381
|
+
(0, import_client_common.validateRequired)("indexName", "saveSynonymsWithHTTPInfo", indexName);
|
|
3382
|
+
(0, import_client_common.validateRequired)("synonymHit", "saveSynonymsWithHTTPInfo", synonymHit);
|
|
3383
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/batch".replace("{indexName}", encodeURIComponent(indexName));
|
|
3384
|
+
const headers = {};
|
|
3385
|
+
const queryParameters = {};
|
|
3386
|
+
if (forwardToReplicas !== void 0) {
|
|
3387
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3388
|
+
}
|
|
3389
|
+
if (replaceExistingSynonyms !== void 0) {
|
|
3390
|
+
queryParameters["replaceExistingSynonyms"] = replaceExistingSynonyms.toString();
|
|
3391
|
+
}
|
|
3392
|
+
const request = {
|
|
3393
|
+
method: "POST",
|
|
3394
|
+
path: requestPath,
|
|
3395
|
+
queryParameters,
|
|
3396
|
+
headers,
|
|
3397
|
+
data: synonymHit
|
|
3398
|
+
};
|
|
3399
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3400
|
+
},
|
|
1891
3401
|
/**
|
|
1892
3402
|
* 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.
|
|
1893
3403
|
*
|
|
@@ -1932,7 +3442,56 @@ function createSearchClient({
|
|
|
1932
3442
|
useReadTransporter: true,
|
|
1933
3443
|
cacheable: true
|
|
1934
3444
|
};
|
|
1935
|
-
return transporter.request(request, requestOptions);
|
|
3445
|
+
return transporter.request(request, requestOptions);
|
|
3446
|
+
},
|
|
3447
|
+
/**
|
|
3448
|
+
* 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.
|
|
3449
|
+
*
|
|
3450
|
+
* 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.
|
|
3451
|
+
*
|
|
3452
|
+
* Required API Key ACLs:
|
|
3453
|
+
* - search
|
|
3454
|
+
* @param searchMethodParams - Multi-query search request body. Results are returned in the same order as the requests.
|
|
3455
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3456
|
+
* @see search for the plain version.
|
|
3457
|
+
*/
|
|
3458
|
+
searchWithHTTPInfo(searchMethodParams, requestOptions) {
|
|
3459
|
+
if (searchMethodParams && Array.isArray(searchMethodParams)) {
|
|
3460
|
+
const newSignatureRequest = {
|
|
3461
|
+
requests: searchMethodParams.map(({ params, ...legacyRequest }) => {
|
|
3462
|
+
if (legacyRequest.type === "facet") {
|
|
3463
|
+
return {
|
|
3464
|
+
...legacyRequest,
|
|
3465
|
+
...params,
|
|
3466
|
+
type: "facet"
|
|
3467
|
+
};
|
|
3468
|
+
}
|
|
3469
|
+
return {
|
|
3470
|
+
...legacyRequest,
|
|
3471
|
+
...params,
|
|
3472
|
+
facet: void 0,
|
|
3473
|
+
maxFacetHits: void 0,
|
|
3474
|
+
facetQuery: void 0
|
|
3475
|
+
};
|
|
3476
|
+
})
|
|
3477
|
+
};
|
|
3478
|
+
searchMethodParams = newSignatureRequest;
|
|
3479
|
+
}
|
|
3480
|
+
(0, import_client_common.validateRequired)("searchMethodParams", "searchWithHTTPInfo", searchMethodParams);
|
|
3481
|
+
(0, import_client_common.validateRequired)("searchMethodParams.requests", "searchWithHTTPInfo", searchMethodParams.requests);
|
|
3482
|
+
const requestPath = "/1/indexes/*/queries";
|
|
3483
|
+
const headers = {};
|
|
3484
|
+
const queryParameters = {};
|
|
3485
|
+
const request = {
|
|
3486
|
+
method: "POST",
|
|
3487
|
+
path: requestPath,
|
|
3488
|
+
queryParameters,
|
|
3489
|
+
headers,
|
|
3490
|
+
data: searchMethodParams,
|
|
3491
|
+
useReadTransporter: true,
|
|
3492
|
+
cacheable: true
|
|
3493
|
+
};
|
|
3494
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1936
3495
|
},
|
|
1937
3496
|
/**
|
|
1938
3497
|
* Searches for standard and custom dictionary entries.
|
|
@@ -1969,6 +3528,48 @@ function createSearchClient({
|
|
|
1969
3528
|
};
|
|
1970
3529
|
return transporter.request(request, requestOptions);
|
|
1971
3530
|
},
|
|
3531
|
+
/**
|
|
3532
|
+
* Searches for standard and custom dictionary entries.
|
|
3533
|
+
*
|
|
3534
|
+
* 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.
|
|
3535
|
+
*
|
|
3536
|
+
* Required API Key ACLs:
|
|
3537
|
+
* - settings
|
|
3538
|
+
* @param searchDictionaryEntries - The searchDictionaryEntries object.
|
|
3539
|
+
* @param searchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
3540
|
+
* @param searchDictionaryEntries.searchDictionaryEntriesParams - The searchDictionaryEntriesParams object.
|
|
3541
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3542
|
+
* @see searchDictionaryEntries for the plain version.
|
|
3543
|
+
*/
|
|
3544
|
+
searchDictionaryEntriesWithHTTPInfo({ dictionaryName, searchDictionaryEntriesParams }, requestOptions) {
|
|
3545
|
+
(0, import_client_common.validateRequired)("dictionaryName", "searchDictionaryEntriesWithHTTPInfo", dictionaryName);
|
|
3546
|
+
(0, import_client_common.validateRequired)(
|
|
3547
|
+
"searchDictionaryEntriesParams",
|
|
3548
|
+
"searchDictionaryEntriesWithHTTPInfo",
|
|
3549
|
+
searchDictionaryEntriesParams
|
|
3550
|
+
);
|
|
3551
|
+
(0, import_client_common.validateRequired)(
|
|
3552
|
+
"searchDictionaryEntriesParams.query",
|
|
3553
|
+
"searchDictionaryEntriesWithHTTPInfo",
|
|
3554
|
+
searchDictionaryEntriesParams.query
|
|
3555
|
+
);
|
|
3556
|
+
const requestPath = "/1/dictionaries/{dictionaryName}/search".replace(
|
|
3557
|
+
"{dictionaryName}",
|
|
3558
|
+
encodeURIComponent(dictionaryName)
|
|
3559
|
+
);
|
|
3560
|
+
const headers = {};
|
|
3561
|
+
const queryParameters = {};
|
|
3562
|
+
const request = {
|
|
3563
|
+
method: "POST",
|
|
3564
|
+
path: requestPath,
|
|
3565
|
+
queryParameters,
|
|
3566
|
+
headers,
|
|
3567
|
+
data: searchDictionaryEntriesParams,
|
|
3568
|
+
useReadTransporter: true,
|
|
3569
|
+
cacheable: true
|
|
3570
|
+
};
|
|
3571
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3572
|
+
},
|
|
1972
3573
|
/**
|
|
1973
3574
|
* 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**.
|
|
1974
3575
|
*
|
|
@@ -1997,6 +3598,37 @@ function createSearchClient({
|
|
|
1997
3598
|
};
|
|
1998
3599
|
return transporter.request(request, requestOptions);
|
|
1999
3600
|
},
|
|
3601
|
+
/**
|
|
3602
|
+
* 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**.
|
|
3603
|
+
*
|
|
3604
|
+
* 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.
|
|
3605
|
+
*
|
|
3606
|
+
* Required API Key ACLs:
|
|
3607
|
+
* - search
|
|
3608
|
+
* @param searchForFacetValues - The searchForFacetValues object.
|
|
3609
|
+
* @param searchForFacetValues.indexName - Name of the index on which to perform the operation.
|
|
3610
|
+
* @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.
|
|
3611
|
+
* @param searchForFacetValues.searchForFacetValuesRequest - The searchForFacetValuesRequest object.
|
|
3612
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3613
|
+
* @see searchForFacetValues for the plain version.
|
|
3614
|
+
*/
|
|
3615
|
+
searchForFacetValuesWithHTTPInfo({ indexName, facetName, searchForFacetValuesRequest }, requestOptions) {
|
|
3616
|
+
(0, import_client_common.validateRequired)("indexName", "searchForFacetValuesWithHTTPInfo", indexName);
|
|
3617
|
+
(0, import_client_common.validateRequired)("facetName", "searchForFacetValuesWithHTTPInfo", facetName);
|
|
3618
|
+
const requestPath = "/1/indexes/{indexName}/facets/{facetName}/query".replace("{indexName}", encodeURIComponent(indexName)).replace("{facetName}", encodeURIComponent(facetName));
|
|
3619
|
+
const headers = {};
|
|
3620
|
+
const queryParameters = {};
|
|
3621
|
+
const request = {
|
|
3622
|
+
method: "POST",
|
|
3623
|
+
path: requestPath,
|
|
3624
|
+
queryParameters,
|
|
3625
|
+
headers,
|
|
3626
|
+
data: searchForFacetValuesRequest ? searchForFacetValuesRequest : {},
|
|
3627
|
+
useReadTransporter: true,
|
|
3628
|
+
cacheable: true
|
|
3629
|
+
};
|
|
3630
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3631
|
+
},
|
|
2000
3632
|
/**
|
|
2001
3633
|
* Searches for rules in your index.
|
|
2002
3634
|
*
|
|
@@ -2023,6 +3655,35 @@ function createSearchClient({
|
|
|
2023
3655
|
};
|
|
2024
3656
|
return transporter.request(request, requestOptions);
|
|
2025
3657
|
},
|
|
3658
|
+
/**
|
|
3659
|
+
* Searches for rules in your index.
|
|
3660
|
+
*
|
|
3661
|
+
* 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.
|
|
3662
|
+
*
|
|
3663
|
+
* Required API Key ACLs:
|
|
3664
|
+
* - settings
|
|
3665
|
+
* @param searchRules - The searchRules object.
|
|
3666
|
+
* @param searchRules.indexName - Name of the index on which to perform the operation.
|
|
3667
|
+
* @param searchRules.searchRulesParams - The searchRulesParams object.
|
|
3668
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3669
|
+
* @see searchRules for the plain version.
|
|
3670
|
+
*/
|
|
3671
|
+
searchRulesWithHTTPInfo({ indexName, searchRulesParams }, requestOptions) {
|
|
3672
|
+
(0, import_client_common.validateRequired)("indexName", "searchRulesWithHTTPInfo", indexName);
|
|
3673
|
+
const requestPath = "/1/indexes/{indexName}/rules/search".replace("{indexName}", encodeURIComponent(indexName));
|
|
3674
|
+
const headers = {};
|
|
3675
|
+
const queryParameters = {};
|
|
3676
|
+
const request = {
|
|
3677
|
+
method: "POST",
|
|
3678
|
+
path: requestPath,
|
|
3679
|
+
queryParameters,
|
|
3680
|
+
headers,
|
|
3681
|
+
data: searchRulesParams ? searchRulesParams : {},
|
|
3682
|
+
useReadTransporter: true,
|
|
3683
|
+
cacheable: true
|
|
3684
|
+
};
|
|
3685
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3686
|
+
},
|
|
2026
3687
|
/**
|
|
2027
3688
|
* 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.
|
|
2028
3689
|
*
|
|
@@ -2049,6 +3710,35 @@ function createSearchClient({
|
|
|
2049
3710
|
};
|
|
2050
3711
|
return transporter.request(request, requestOptions);
|
|
2051
3712
|
},
|
|
3713
|
+
/**
|
|
3714
|
+
* 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.
|
|
3715
|
+
*
|
|
3716
|
+
* 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.
|
|
3717
|
+
*
|
|
3718
|
+
* Required API Key ACLs:
|
|
3719
|
+
* - search
|
|
3720
|
+
* @param searchSingleIndex - The searchSingleIndex object.
|
|
3721
|
+
* @param searchSingleIndex.indexName - Name of the index on which to perform the operation.
|
|
3722
|
+
* @param searchSingleIndex.searchParams - The searchParams object.
|
|
3723
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3724
|
+
* @see searchSingleIndex for the plain version.
|
|
3725
|
+
*/
|
|
3726
|
+
searchSingleIndexWithHTTPInfo({ indexName, searchParams }, requestOptions) {
|
|
3727
|
+
(0, import_client_common.validateRequired)("indexName", "searchSingleIndexWithHTTPInfo", indexName);
|
|
3728
|
+
const requestPath = "/1/indexes/{indexName}/query".replace("{indexName}", encodeURIComponent(indexName));
|
|
3729
|
+
const headers = {};
|
|
3730
|
+
const queryParameters = {};
|
|
3731
|
+
const request = {
|
|
3732
|
+
method: "POST",
|
|
3733
|
+
path: requestPath,
|
|
3734
|
+
queryParameters,
|
|
3735
|
+
headers,
|
|
3736
|
+
data: searchParams ? searchParams : {},
|
|
3737
|
+
useReadTransporter: true,
|
|
3738
|
+
cacheable: true
|
|
3739
|
+
};
|
|
3740
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3741
|
+
},
|
|
2052
3742
|
/**
|
|
2053
3743
|
* Searches for synonyms in your index.
|
|
2054
3744
|
*
|
|
@@ -2078,6 +3768,38 @@ function createSearchClient({
|
|
|
2078
3768
|
};
|
|
2079
3769
|
return transporter.request(request, requestOptions);
|
|
2080
3770
|
},
|
|
3771
|
+
/**
|
|
3772
|
+
* Searches for synonyms in your index.
|
|
3773
|
+
*
|
|
3774
|
+
* 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.
|
|
3775
|
+
*
|
|
3776
|
+
* Required API Key ACLs:
|
|
3777
|
+
* - settings
|
|
3778
|
+
* @param searchSynonyms - The searchSynonyms object.
|
|
3779
|
+
* @param searchSynonyms.indexName - Name of the index on which to perform the operation.
|
|
3780
|
+
* @param searchSynonyms.searchSynonymsParams - Body of the `searchSynonyms` operation.
|
|
3781
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3782
|
+
* @see searchSynonyms for the plain version.
|
|
3783
|
+
*/
|
|
3784
|
+
searchSynonymsWithHTTPInfo({ indexName, searchSynonymsParams }, requestOptions) {
|
|
3785
|
+
(0, import_client_common.validateRequired)("indexName", "searchSynonymsWithHTTPInfo", indexName);
|
|
3786
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/search".replace(
|
|
3787
|
+
"{indexName}",
|
|
3788
|
+
encodeURIComponent(indexName)
|
|
3789
|
+
);
|
|
3790
|
+
const headers = {};
|
|
3791
|
+
const queryParameters = {};
|
|
3792
|
+
const request = {
|
|
3793
|
+
method: "POST",
|
|
3794
|
+
path: requestPath,
|
|
3795
|
+
queryParameters,
|
|
3796
|
+
headers,
|
|
3797
|
+
data: searchSynonymsParams ? searchSynonymsParams : {},
|
|
3798
|
+
useReadTransporter: true,
|
|
3799
|
+
cacheable: true
|
|
3800
|
+
};
|
|
3801
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3802
|
+
},
|
|
2081
3803
|
/**
|
|
2082
3804
|
* 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).
|
|
2083
3805
|
*
|
|
@@ -2105,6 +3827,36 @@ function createSearchClient({
|
|
|
2105
3827
|
};
|
|
2106
3828
|
return transporter.request(request, requestOptions);
|
|
2107
3829
|
},
|
|
3830
|
+
/**
|
|
3831
|
+
* 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).
|
|
3832
|
+
*
|
|
3833
|
+
* 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.
|
|
3834
|
+
*
|
|
3835
|
+
* Required API Key ACLs:
|
|
3836
|
+
* - admin
|
|
3837
|
+
*
|
|
3838
|
+
* @deprecated
|
|
3839
|
+
* @param searchUserIdsParams - The searchUserIdsParams object.
|
|
3840
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3841
|
+
* @see searchUserIds for the plain version.
|
|
3842
|
+
*/
|
|
3843
|
+
searchUserIdsWithHTTPInfo(searchUserIdsParams, requestOptions) {
|
|
3844
|
+
(0, import_client_common.validateRequired)("searchUserIdsParams", "searchUserIdsWithHTTPInfo", searchUserIdsParams);
|
|
3845
|
+
(0, import_client_common.validateRequired)("searchUserIdsParams.query", "searchUserIdsWithHTTPInfo", searchUserIdsParams.query);
|
|
3846
|
+
const requestPath = "/1/clusters/mapping/search";
|
|
3847
|
+
const headers = {};
|
|
3848
|
+
const queryParameters = {};
|
|
3849
|
+
const request = {
|
|
3850
|
+
method: "POST",
|
|
3851
|
+
path: requestPath,
|
|
3852
|
+
queryParameters,
|
|
3853
|
+
headers,
|
|
3854
|
+
data: searchUserIdsParams,
|
|
3855
|
+
useReadTransporter: true,
|
|
3856
|
+
cacheable: true
|
|
3857
|
+
};
|
|
3858
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3859
|
+
},
|
|
2108
3860
|
/**
|
|
2109
3861
|
* Turns standard stop word dictionary entries on or off for a given language.
|
|
2110
3862
|
*
|
|
@@ -2132,6 +3884,36 @@ function createSearchClient({
|
|
|
2132
3884
|
};
|
|
2133
3885
|
return transporter.request(request, requestOptions);
|
|
2134
3886
|
},
|
|
3887
|
+
/**
|
|
3888
|
+
* Turns standard stop word dictionary entries on or off for a given language.
|
|
3889
|
+
*
|
|
3890
|
+
* 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.
|
|
3891
|
+
*
|
|
3892
|
+
* Required API Key ACLs:
|
|
3893
|
+
* - editSettings
|
|
3894
|
+
* @param dictionarySettingsParams - The dictionarySettingsParams object.
|
|
3895
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3896
|
+
* @see setDictionarySettings for the plain version.
|
|
3897
|
+
*/
|
|
3898
|
+
setDictionarySettingsWithHTTPInfo(dictionarySettingsParams, requestOptions) {
|
|
3899
|
+
(0, import_client_common.validateRequired)("dictionarySettingsParams", "setDictionarySettingsWithHTTPInfo", dictionarySettingsParams);
|
|
3900
|
+
(0, import_client_common.validateRequired)(
|
|
3901
|
+
"dictionarySettingsParams.disableStandardEntries",
|
|
3902
|
+
"setDictionarySettingsWithHTTPInfo",
|
|
3903
|
+
dictionarySettingsParams.disableStandardEntries
|
|
3904
|
+
);
|
|
3905
|
+
const requestPath = "/1/dictionaries/*/settings";
|
|
3906
|
+
const headers = {};
|
|
3907
|
+
const queryParameters = {};
|
|
3908
|
+
const request = {
|
|
3909
|
+
method: "PUT",
|
|
3910
|
+
path: requestPath,
|
|
3911
|
+
queryParameters,
|
|
3912
|
+
headers,
|
|
3913
|
+
data: dictionarySettingsParams
|
|
3914
|
+
};
|
|
3915
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3916
|
+
},
|
|
2135
3917
|
/**
|
|
2136
3918
|
* 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.
|
|
2137
3919
|
*
|
|
@@ -2161,6 +3943,38 @@ function createSearchClient({
|
|
|
2161
3943
|
};
|
|
2162
3944
|
return transporter.request(request, requestOptions);
|
|
2163
3945
|
},
|
|
3946
|
+
/**
|
|
3947
|
+
* 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.
|
|
3948
|
+
*
|
|
3949
|
+
* 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.
|
|
3950
|
+
*
|
|
3951
|
+
* Required API Key ACLs:
|
|
3952
|
+
* - editSettings
|
|
3953
|
+
* @param setSettings - The setSettings object.
|
|
3954
|
+
* @param setSettings.indexName - Name of the index on which to perform the operation.
|
|
3955
|
+
* @param setSettings.indexSettings - The indexSettings object.
|
|
3956
|
+
* @param setSettings.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3957
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3958
|
+
* @see setSettings for the plain version.
|
|
3959
|
+
*/
|
|
3960
|
+
setSettingsWithHTTPInfo({ indexName, indexSettings, forwardToReplicas }, requestOptions) {
|
|
3961
|
+
(0, import_client_common.validateRequired)("indexName", "setSettingsWithHTTPInfo", indexName);
|
|
3962
|
+
(0, import_client_common.validateRequired)("indexSettings", "setSettingsWithHTTPInfo", indexSettings);
|
|
3963
|
+
const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
|
|
3964
|
+
const headers = {};
|
|
3965
|
+
const queryParameters = {};
|
|
3966
|
+
if (forwardToReplicas !== void 0) {
|
|
3967
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3968
|
+
}
|
|
3969
|
+
const request = {
|
|
3970
|
+
method: "PUT",
|
|
3971
|
+
path: requestPath,
|
|
3972
|
+
queryParameters,
|
|
3973
|
+
headers,
|
|
3974
|
+
data: indexSettings
|
|
3975
|
+
};
|
|
3976
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3977
|
+
},
|
|
2164
3978
|
/**
|
|
2165
3979
|
* Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
|
|
2166
3980
|
*
|
|
@@ -2186,6 +4000,35 @@ function createSearchClient({
|
|
|
2186
4000
|
data: apiKey
|
|
2187
4001
|
};
|
|
2188
4002
|
return transporter.request(request, requestOptions);
|
|
4003
|
+
},
|
|
4004
|
+
/**
|
|
4005
|
+
* Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
|
|
4006
|
+
*
|
|
4007
|
+
* 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.
|
|
4008
|
+
*
|
|
4009
|
+
* Required API Key ACLs:
|
|
4010
|
+
* - admin
|
|
4011
|
+
* @param updateApiKey - The updateApiKey object.
|
|
4012
|
+
* @param updateApiKey.key - API key.
|
|
4013
|
+
* @param updateApiKey.apiKey - The apiKey object.
|
|
4014
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4015
|
+
* @see updateApiKey for the plain version.
|
|
4016
|
+
*/
|
|
4017
|
+
updateApiKeyWithHTTPInfo({ key, apiKey }, requestOptions) {
|
|
4018
|
+
(0, import_client_common.validateRequired)("key", "updateApiKeyWithHTTPInfo", key);
|
|
4019
|
+
(0, import_client_common.validateRequired)("apiKey", "updateApiKeyWithHTTPInfo", apiKey);
|
|
4020
|
+
(0, import_client_common.validateRequired)("apiKey.acl", "updateApiKeyWithHTTPInfo", apiKey.acl);
|
|
4021
|
+
const requestPath = "/1/keys/{key}".replace("{key}", encodeURIComponent(key));
|
|
4022
|
+
const headers = {};
|
|
4023
|
+
const queryParameters = {};
|
|
4024
|
+
const request = {
|
|
4025
|
+
method: "PUT",
|
|
4026
|
+
path: requestPath,
|
|
4027
|
+
queryParameters,
|
|
4028
|
+
headers,
|
|
4029
|
+
data: apiKey
|
|
4030
|
+
};
|
|
4031
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2189
4032
|
}
|
|
2190
4033
|
};
|
|
2191
4034
|
}
|
|
@@ -2210,6 +4053,7 @@ function searchClient(appId, apiKey, options) {
|
|
|
2210
4053
|
logger: (0, import_client_common2.createNullLogger)(),
|
|
2211
4054
|
requester: (0, import_requester_node_http.createHttpRequester)(),
|
|
2212
4055
|
algoliaAgents: [{ segment: "Node.js", version: process.versions.node }],
|
|
4056
|
+
requestIdChannel: "headers",
|
|
2213
4057
|
responsesCache: (0, import_client_common2.createNullCache)(),
|
|
2214
4058
|
requestsCache: (0, import_client_common2.createNullCache)(),
|
|
2215
4059
|
hostsCache: (0, import_client_common2.createMemoryCache)(),
|
|
@@ -2267,11 +4111,12 @@ function searchClient(appId, apiKey, options) {
|
|
|
2267
4111
|
batchSize,
|
|
2268
4112
|
maxRetries = 100
|
|
2269
4113
|
}, requestOptions) {
|
|
4114
|
+
requestOptions = (0, import_client_common2.withRequestId)(this.transporter, requestOptions);
|
|
2270
4115
|
const responses = [];
|
|
2271
4116
|
if (this.appId === destinationAppID) {
|
|
2272
4117
|
throw new import_client_common2.IndicesInSameAppError();
|
|
2273
4118
|
}
|
|
2274
|
-
if (!await this.indexExists({ indexName: sourceIndexName })) {
|
|
4119
|
+
if (!await this.indexExists({ indexName: sourceIndexName }, requestOptions)) {
|
|
2275
4120
|
throw new import_client_common2.IndexNotFoundError(sourceIndexName);
|
|
2276
4121
|
}
|
|
2277
4122
|
const destinationClient = createSearchClient({
|
|
@@ -2290,54 +4135,66 @@ function searchClient(appId, apiKey, options) {
|
|
|
2290
4135
|
hostsCache: (0, import_client_common2.createMemoryCache)(),
|
|
2291
4136
|
...options
|
|
2292
4137
|
});
|
|
2293
|
-
if (await destinationClient.indexExists({ indexName: destinationIndexName })) {
|
|
4138
|
+
if (await destinationClient.indexExists({ indexName: destinationIndexName }, requestOptions)) {
|
|
2294
4139
|
throw new import_client_common2.IndexAlreadyExistsError(destinationIndexName);
|
|
2295
4140
|
}
|
|
2296
4141
|
responses.push(
|
|
2297
4142
|
await destinationClient.setSettings(
|
|
2298
4143
|
{
|
|
2299
4144
|
indexName: destinationIndexName,
|
|
2300
|
-
indexSettings: await this.getSettings({ indexName: sourceIndexName })
|
|
4145
|
+
indexSettings: await this.getSettings({ indexName: sourceIndexName }, requestOptions)
|
|
2301
4146
|
},
|
|
2302
4147
|
requestOptions
|
|
2303
4148
|
)
|
|
2304
4149
|
);
|
|
2305
|
-
await this.browseRules(
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
4150
|
+
await this.browseRules(
|
|
4151
|
+
{
|
|
4152
|
+
indexName: sourceIndexName,
|
|
4153
|
+
async aggregator(response) {
|
|
4154
|
+
responses.push(
|
|
4155
|
+
await destinationClient.saveRules(
|
|
4156
|
+
{ indexName: destinationIndexName, rules: response.hits },
|
|
4157
|
+
requestOptions
|
|
4158
|
+
)
|
|
4159
|
+
);
|
|
4160
|
+
}
|
|
4161
|
+
},
|
|
4162
|
+
requestOptions
|
|
4163
|
+
);
|
|
4164
|
+
await this.browseSynonyms(
|
|
4165
|
+
{
|
|
4166
|
+
indexName: sourceIndexName,
|
|
4167
|
+
async aggregator(response) {
|
|
4168
|
+
responses.push(
|
|
4169
|
+
await destinationClient.saveSynonyms(
|
|
4170
|
+
{ indexName: destinationIndexName, synonymHit: response.hits },
|
|
4171
|
+
requestOptions
|
|
4172
|
+
)
|
|
4173
|
+
);
|
|
4174
|
+
}
|
|
4175
|
+
},
|
|
4176
|
+
requestOptions
|
|
4177
|
+
);
|
|
4178
|
+
await this.browseObjects(
|
|
4179
|
+
{
|
|
4180
|
+
indexName: sourceIndexName,
|
|
4181
|
+
browseParams: batchSize ? { hitsPerPage: batchSize } : void 0,
|
|
4182
|
+
async aggregator(response) {
|
|
4183
|
+
responses.push(
|
|
4184
|
+
...await destinationClient.saveObjects(
|
|
4185
|
+
{ indexName: destinationIndexName, objects: response.hits, batchSize },
|
|
4186
|
+
requestOptions
|
|
4187
|
+
)
|
|
4188
|
+
);
|
|
4189
|
+
}
|
|
4190
|
+
},
|
|
4191
|
+
requestOptions
|
|
4192
|
+
);
|
|
2339
4193
|
for (const response of responses) {
|
|
2340
|
-
await destinationClient.waitForTask(
|
|
4194
|
+
await destinationClient.waitForTask(
|
|
4195
|
+
{ indexName: destinationIndexName, taskID: response.taskID, maxRetries },
|
|
4196
|
+
requestOptions
|
|
4197
|
+
);
|
|
2341
4198
|
}
|
|
2342
4199
|
},
|
|
2343
4200
|
/**
|