@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/fetch.js
CHANGED
|
@@ -8,7 +8,8 @@ import {
|
|
|
8
8
|
createMemoryCache,
|
|
9
9
|
createNullCache,
|
|
10
10
|
createNullLogger,
|
|
11
|
-
serializeQueryParameters
|
|
11
|
+
serializeQueryParameters,
|
|
12
|
+
withRequestId as withRequestId2
|
|
12
13
|
} from "@algolia/client-common";
|
|
13
14
|
import { createFetchRequester } from "@algolia/requester-fetch";
|
|
14
15
|
import { createHttpRequester } from "@algolia/requester-node-http";
|
|
@@ -21,10 +22,12 @@ import {
|
|
|
21
22
|
createIterablePromise,
|
|
22
23
|
createTransporter,
|
|
23
24
|
getAlgoliaAgent,
|
|
25
|
+
logWarning,
|
|
24
26
|
shuffle,
|
|
25
|
-
validateRequired
|
|
27
|
+
validateRequired,
|
|
28
|
+
withRequestId
|
|
26
29
|
} from "@algolia/client-common";
|
|
27
|
-
var apiClientVersion = "5.
|
|
30
|
+
var apiClientVersion = "5.57.0";
|
|
28
31
|
function getDefaultHosts(appId) {
|
|
29
32
|
return [
|
|
30
33
|
{
|
|
@@ -144,6 +147,7 @@ function createSearchClient({
|
|
|
144
147
|
maxRetries = 100,
|
|
145
148
|
timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
|
|
146
149
|
}, requestOptions) {
|
|
150
|
+
requestOptions = withRequestId(transporter, requestOptions);
|
|
147
151
|
let retryCount = 0;
|
|
148
152
|
return createIterablePromise({
|
|
149
153
|
func: () => this.getTask({ indexName, taskID }, requestOptions),
|
|
@@ -171,6 +175,7 @@ function createSearchClient({
|
|
|
171
175
|
maxRetries = 100,
|
|
172
176
|
timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
|
|
173
177
|
}, requestOptions) {
|
|
178
|
+
requestOptions = withRequestId(transporter, requestOptions);
|
|
174
179
|
let retryCount = 0;
|
|
175
180
|
return createIterablePromise({
|
|
176
181
|
func: () => this.getAppTask({ taskID }, requestOptions),
|
|
@@ -202,6 +207,7 @@ function createSearchClient({
|
|
|
202
207
|
maxRetries = 100,
|
|
203
208
|
timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
|
|
204
209
|
}, requestOptions) {
|
|
210
|
+
requestOptions = withRequestId(transporter, requestOptions);
|
|
205
211
|
let retryCount = 0;
|
|
206
212
|
const baseIteratorOptions = {
|
|
207
213
|
aggregator: () => retryCount += 1,
|
|
@@ -257,6 +263,7 @@ function createSearchClient({
|
|
|
257
263
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `browse` method and merged with the transporter requestOptions.
|
|
258
264
|
*/
|
|
259
265
|
browseObjects({ indexName, browseParams, ...browseObjectsOptions }, requestOptions) {
|
|
266
|
+
requestOptions = withRequestId(transporter, requestOptions);
|
|
260
267
|
return createIterablePromise({
|
|
261
268
|
func: (previousResponse) => {
|
|
262
269
|
return this.browse(
|
|
@@ -287,6 +294,7 @@ function createSearchClient({
|
|
|
287
294
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchRules` method and merged with the transporter requestOptions.
|
|
288
295
|
*/
|
|
289
296
|
browseRules({ indexName, searchRulesParams, ...browseRulesOptions }, requestOptions) {
|
|
297
|
+
requestOptions = withRequestId(transporter, requestOptions);
|
|
290
298
|
const params = {
|
|
291
299
|
...searchRulesParams,
|
|
292
300
|
hitsPerPage: (searchRulesParams == null ? void 0 : searchRulesParams.hitsPerPage) || 1e3
|
|
@@ -324,6 +332,7 @@ function createSearchClient({
|
|
|
324
332
|
searchSynonymsParams,
|
|
325
333
|
...browseSynonymsOptions
|
|
326
334
|
}, requestOptions) {
|
|
335
|
+
requestOptions = withRequestId(transporter, requestOptions);
|
|
327
336
|
const params = {
|
|
328
337
|
...searchSynonymsParams,
|
|
329
338
|
page: (searchSynonymsParams == null ? void 0 : searchSynonymsParams.page) || 0,
|
|
@@ -369,6 +378,7 @@ function createSearchClient({
|
|
|
369
378
|
batchSize = 1e3,
|
|
370
379
|
maxRetries = 100
|
|
371
380
|
}, requestOptions) {
|
|
381
|
+
requestOptions = withRequestId(transporter, requestOptions);
|
|
372
382
|
let requests = [];
|
|
373
383
|
const responses = [];
|
|
374
384
|
const objectEntries = objects.entries();
|
|
@@ -381,7 +391,7 @@ function createSearchClient({
|
|
|
381
391
|
}
|
|
382
392
|
if (waitForTasks) {
|
|
383
393
|
for (const resp of responses) {
|
|
384
|
-
await this.waitForTask({ indexName, taskID: resp.taskID, maxRetries });
|
|
394
|
+
await this.waitForTask({ indexName, taskID: resp.taskID, maxRetries }, requestOptions);
|
|
385
395
|
}
|
|
386
396
|
}
|
|
387
397
|
return responses;
|
|
@@ -459,6 +469,8 @@ function createSearchClient({
|
|
|
459
469
|
* 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.
|
|
460
470
|
* See https://api-clients-automation.netlify.app/docs/custom-helpers/#replaceallobjects for implementation details.
|
|
461
471
|
*
|
|
472
|
+
* Warning: calling this method with an empty `objects` list replaces the index with an empty one, deleting all existing records.
|
|
473
|
+
*
|
|
462
474
|
* @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.
|
|
463
475
|
* @param replaceAllObjects - The `replaceAllObjects` object.
|
|
464
476
|
* @param replaceAllObjects.indexName - The `indexName` to replace `objects` in.
|
|
@@ -475,6 +487,13 @@ function createSearchClient({
|
|
|
475
487
|
scopes,
|
|
476
488
|
maxRetries = DEFAULT_REPLACE_ALL_OBJECTS_MAX_RETRIES
|
|
477
489
|
}, requestOptions) {
|
|
490
|
+
requestOptions = withRequestId(transporter, requestOptions);
|
|
491
|
+
if (objects.length === 0) {
|
|
492
|
+
logWarning(
|
|
493
|
+
transporter.logger,
|
|
494
|
+
`replaceAllObjects was called with an empty list of objects, which will delete all records currently in the "${indexName}" index.`
|
|
495
|
+
);
|
|
496
|
+
}
|
|
478
497
|
const randomSuffix = Math.floor(Math.random() * 1e6) + 1e5;
|
|
479
498
|
const tmpIndexName = `${indexName}_tmp_${randomSuffix}`;
|
|
480
499
|
if (scopes === void 0) {
|
|
@@ -496,11 +515,14 @@ function createSearchClient({
|
|
|
496
515
|
{ indexName: tmpIndexName, objects, waitForTasks: true, batchSize, maxRetries },
|
|
497
516
|
requestOptions
|
|
498
517
|
);
|
|
499
|
-
await this.waitForTask(
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
518
|
+
await this.waitForTask(
|
|
519
|
+
{
|
|
520
|
+
indexName: tmpIndexName,
|
|
521
|
+
taskID: copyOperationResponse.taskID,
|
|
522
|
+
maxRetries
|
|
523
|
+
},
|
|
524
|
+
requestOptions
|
|
525
|
+
);
|
|
504
526
|
copyOperationResponse = await this.operationIndex(
|
|
505
527
|
{
|
|
506
528
|
indexName,
|
|
@@ -512,11 +534,14 @@ function createSearchClient({
|
|
|
512
534
|
},
|
|
513
535
|
requestOptions
|
|
514
536
|
);
|
|
515
|
-
await this.waitForTask(
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
537
|
+
await this.waitForTask(
|
|
538
|
+
{
|
|
539
|
+
indexName: tmpIndexName,
|
|
540
|
+
taskID: copyOperationResponse.taskID,
|
|
541
|
+
maxRetries
|
|
542
|
+
},
|
|
543
|
+
requestOptions
|
|
544
|
+
);
|
|
520
545
|
const moveOperationResponse = await this.operationIndex(
|
|
521
546
|
{
|
|
522
547
|
indexName: tmpIndexName,
|
|
@@ -524,20 +549,23 @@ function createSearchClient({
|
|
|
524
549
|
},
|
|
525
550
|
requestOptions
|
|
526
551
|
);
|
|
527
|
-
await this.waitForTask(
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
552
|
+
await this.waitForTask(
|
|
553
|
+
{
|
|
554
|
+
indexName: tmpIndexName,
|
|
555
|
+
taskID: moveOperationResponse.taskID,
|
|
556
|
+
maxRetries
|
|
557
|
+
},
|
|
558
|
+
requestOptions
|
|
559
|
+
);
|
|
532
560
|
return { copyOperationResponse, batchResponses, moveOperationResponse };
|
|
533
561
|
} catch (error) {
|
|
534
|
-
await this.deleteIndex({ indexName: tmpIndexName });
|
|
562
|
+
await this.deleteIndex({ indexName: tmpIndexName }, requestOptions);
|
|
535
563
|
throw error;
|
|
536
564
|
}
|
|
537
565
|
},
|
|
538
|
-
async indexExists({ indexName }) {
|
|
566
|
+
async indexExists({ indexName }, requestOptions) {
|
|
539
567
|
try {
|
|
540
|
-
await this.getSettings({ indexName });
|
|
568
|
+
await this.getSettings({ indexName }, requestOptions);
|
|
541
569
|
} catch (error) {
|
|
542
570
|
if (error instanceof ApiError && error.status === 404) {
|
|
543
571
|
return false;
|
|
@@ -591,6 +619,32 @@ function createSearchClient({
|
|
|
591
619
|
};
|
|
592
620
|
return transporter.request(request, requestOptions);
|
|
593
621
|
},
|
|
622
|
+
/**
|
|
623
|
+
* Creates a new API key with specific permissions and restrictions.
|
|
624
|
+
*
|
|
625
|
+
* 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.
|
|
626
|
+
*
|
|
627
|
+
* Required API Key ACLs:
|
|
628
|
+
* - admin
|
|
629
|
+
* @param apiKey - The apiKey object.
|
|
630
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
631
|
+
* @see addApiKey for the plain version.
|
|
632
|
+
*/
|
|
633
|
+
addApiKeyWithHTTPInfo(apiKey, requestOptions) {
|
|
634
|
+
validateRequired("apiKey", "addApiKeyWithHTTPInfo", apiKey);
|
|
635
|
+
validateRequired("apiKey.acl", "addApiKeyWithHTTPInfo", apiKey.acl);
|
|
636
|
+
const requestPath = "/1/keys";
|
|
637
|
+
const headers = {};
|
|
638
|
+
const queryParameters = {};
|
|
639
|
+
const request = {
|
|
640
|
+
method: "POST",
|
|
641
|
+
path: requestPath,
|
|
642
|
+
queryParameters,
|
|
643
|
+
headers,
|
|
644
|
+
data: apiKey
|
|
645
|
+
};
|
|
646
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
647
|
+
},
|
|
594
648
|
/**
|
|
595
649
|
* 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).
|
|
596
650
|
*
|
|
@@ -618,6 +672,36 @@ function createSearchClient({
|
|
|
618
672
|
};
|
|
619
673
|
return transporter.request(request, requestOptions);
|
|
620
674
|
},
|
|
675
|
+
/**
|
|
676
|
+
* 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).
|
|
677
|
+
*
|
|
678
|
+
* 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.
|
|
679
|
+
*
|
|
680
|
+
* Required API Key ACLs:
|
|
681
|
+
* - addObject
|
|
682
|
+
* @param addOrUpdateObject - The addOrUpdateObject object.
|
|
683
|
+
* @param addOrUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
684
|
+
* @param addOrUpdateObject.objectID - Unique record identifier.
|
|
685
|
+
* @param addOrUpdateObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
686
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
687
|
+
* @see addOrUpdateObject for the plain version.
|
|
688
|
+
*/
|
|
689
|
+
addOrUpdateObjectWithHTTPInfo({ indexName, objectID, body }, requestOptions) {
|
|
690
|
+
validateRequired("indexName", "addOrUpdateObjectWithHTTPInfo", indexName);
|
|
691
|
+
validateRequired("objectID", "addOrUpdateObjectWithHTTPInfo", objectID);
|
|
692
|
+
validateRequired("body", "addOrUpdateObjectWithHTTPInfo", body);
|
|
693
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
694
|
+
const headers = {};
|
|
695
|
+
const queryParameters = {};
|
|
696
|
+
const request = {
|
|
697
|
+
method: "PUT",
|
|
698
|
+
path: requestPath,
|
|
699
|
+
queryParameters,
|
|
700
|
+
headers,
|
|
701
|
+
data: body
|
|
702
|
+
};
|
|
703
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
704
|
+
},
|
|
621
705
|
/**
|
|
622
706
|
* Adds a source to the list of allowed sources.
|
|
623
707
|
*
|
|
@@ -641,6 +725,32 @@ function createSearchClient({
|
|
|
641
725
|
};
|
|
642
726
|
return transporter.request(request, requestOptions);
|
|
643
727
|
},
|
|
728
|
+
/**
|
|
729
|
+
* Adds a source to the list of allowed sources.
|
|
730
|
+
*
|
|
731
|
+
* 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.
|
|
732
|
+
*
|
|
733
|
+
* Required API Key ACLs:
|
|
734
|
+
* - admin
|
|
735
|
+
* @param source - Source to add.
|
|
736
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
737
|
+
* @see appendSource for the plain version.
|
|
738
|
+
*/
|
|
739
|
+
appendSourceWithHTTPInfo(source, requestOptions) {
|
|
740
|
+
validateRequired("source", "appendSourceWithHTTPInfo", source);
|
|
741
|
+
validateRequired("source.source", "appendSourceWithHTTPInfo", source.source);
|
|
742
|
+
const requestPath = "/1/security/sources/append";
|
|
743
|
+
const headers = {};
|
|
744
|
+
const queryParameters = {};
|
|
745
|
+
const request = {
|
|
746
|
+
method: "POST",
|
|
747
|
+
path: requestPath,
|
|
748
|
+
queryParameters,
|
|
749
|
+
headers,
|
|
750
|
+
data: source
|
|
751
|
+
};
|
|
752
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
753
|
+
},
|
|
644
754
|
/**
|
|
645
755
|
* 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.
|
|
646
756
|
*
|
|
@@ -672,6 +782,40 @@ function createSearchClient({
|
|
|
672
782
|
};
|
|
673
783
|
return transporter.request(request, requestOptions);
|
|
674
784
|
},
|
|
785
|
+
/**
|
|
786
|
+
* 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.
|
|
787
|
+
*
|
|
788
|
+
* 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.
|
|
789
|
+
*
|
|
790
|
+
* Required API Key ACLs:
|
|
791
|
+
* - admin
|
|
792
|
+
*
|
|
793
|
+
* @deprecated
|
|
794
|
+
* @param assignUserId - The assignUserId object.
|
|
795
|
+
* @param assignUserId.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
796
|
+
* @param assignUserId.assignUserIdParams - The assignUserIdParams object.
|
|
797
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
798
|
+
* @see assignUserId for the plain version.
|
|
799
|
+
*/
|
|
800
|
+
assignUserIdWithHTTPInfo({ xAlgoliaUserID, assignUserIdParams }, requestOptions) {
|
|
801
|
+
validateRequired("xAlgoliaUserID", "assignUserIdWithHTTPInfo", xAlgoliaUserID);
|
|
802
|
+
validateRequired("assignUserIdParams", "assignUserIdWithHTTPInfo", assignUserIdParams);
|
|
803
|
+
validateRequired("assignUserIdParams.cluster", "assignUserIdWithHTTPInfo", assignUserIdParams.cluster);
|
|
804
|
+
const requestPath = "/1/clusters/mapping";
|
|
805
|
+
const headers = {};
|
|
806
|
+
const queryParameters = {};
|
|
807
|
+
if (xAlgoliaUserID !== void 0) {
|
|
808
|
+
headers["X-Algolia-User-ID"] = xAlgoliaUserID.toString();
|
|
809
|
+
}
|
|
810
|
+
const request = {
|
|
811
|
+
method: "POST",
|
|
812
|
+
path: requestPath,
|
|
813
|
+
queryParameters,
|
|
814
|
+
headers,
|
|
815
|
+
data: assignUserIdParams
|
|
816
|
+
};
|
|
817
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
818
|
+
},
|
|
675
819
|
/**
|
|
676
820
|
* 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).
|
|
677
821
|
*
|
|
@@ -698,6 +842,35 @@ function createSearchClient({
|
|
|
698
842
|
};
|
|
699
843
|
return transporter.request(request, requestOptions);
|
|
700
844
|
},
|
|
845
|
+
/**
|
|
846
|
+
* 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).
|
|
847
|
+
*
|
|
848
|
+
* 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.
|
|
849
|
+
*
|
|
850
|
+
* Required API Key ACLs:
|
|
851
|
+
* - addObject
|
|
852
|
+
* @param batch - The batch object.
|
|
853
|
+
* @param batch.indexName - Name of the index on which to perform the operation.
|
|
854
|
+
* @param batch.batchWriteParams - The batchWriteParams object.
|
|
855
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
856
|
+
* @see batch for the plain version.
|
|
857
|
+
*/
|
|
858
|
+
batchWithHTTPInfo({ indexName, batchWriteParams }, requestOptions) {
|
|
859
|
+
validateRequired("indexName", "batchWithHTTPInfo", indexName);
|
|
860
|
+
validateRequired("batchWriteParams", "batchWithHTTPInfo", batchWriteParams);
|
|
861
|
+
validateRequired("batchWriteParams.requests", "batchWithHTTPInfo", batchWriteParams.requests);
|
|
862
|
+
const requestPath = "/1/indexes/{indexName}/batch".replace("{indexName}", encodeURIComponent(indexName));
|
|
863
|
+
const headers = {};
|
|
864
|
+
const queryParameters = {};
|
|
865
|
+
const request = {
|
|
866
|
+
method: "POST",
|
|
867
|
+
path: requestPath,
|
|
868
|
+
queryParameters,
|
|
869
|
+
headers,
|
|
870
|
+
data: batchWriteParams
|
|
871
|
+
};
|
|
872
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
873
|
+
},
|
|
701
874
|
/**
|
|
702
875
|
* Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
|
|
703
876
|
*
|
|
@@ -730,6 +903,49 @@ function createSearchClient({
|
|
|
730
903
|
};
|
|
731
904
|
return transporter.request(request, requestOptions);
|
|
732
905
|
},
|
|
906
|
+
/**
|
|
907
|
+
* Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
|
|
908
|
+
*
|
|
909
|
+
* 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.
|
|
910
|
+
*
|
|
911
|
+
* Required API Key ACLs:
|
|
912
|
+
* - admin
|
|
913
|
+
*
|
|
914
|
+
* @deprecated
|
|
915
|
+
* @param batchAssignUserIds - The batchAssignUserIds object.
|
|
916
|
+
* @param batchAssignUserIds.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
917
|
+
* @param batchAssignUserIds.batchAssignUserIdsParams - The batchAssignUserIdsParams object.
|
|
918
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
919
|
+
* @see batchAssignUserIds for the plain version.
|
|
920
|
+
*/
|
|
921
|
+
batchAssignUserIdsWithHTTPInfo({ xAlgoliaUserID, batchAssignUserIdsParams }, requestOptions) {
|
|
922
|
+
validateRequired("xAlgoliaUserID", "batchAssignUserIdsWithHTTPInfo", xAlgoliaUserID);
|
|
923
|
+
validateRequired("batchAssignUserIdsParams", "batchAssignUserIdsWithHTTPInfo", batchAssignUserIdsParams);
|
|
924
|
+
validateRequired(
|
|
925
|
+
"batchAssignUserIdsParams.cluster",
|
|
926
|
+
"batchAssignUserIdsWithHTTPInfo",
|
|
927
|
+
batchAssignUserIdsParams.cluster
|
|
928
|
+
);
|
|
929
|
+
validateRequired(
|
|
930
|
+
"batchAssignUserIdsParams.users",
|
|
931
|
+
"batchAssignUserIdsWithHTTPInfo",
|
|
932
|
+
batchAssignUserIdsParams.users
|
|
933
|
+
);
|
|
934
|
+
const requestPath = "/1/clusters/mapping/batch";
|
|
935
|
+
const headers = {};
|
|
936
|
+
const queryParameters = {};
|
|
937
|
+
if (xAlgoliaUserID !== void 0) {
|
|
938
|
+
headers["X-Algolia-User-ID"] = xAlgoliaUserID.toString();
|
|
939
|
+
}
|
|
940
|
+
const request = {
|
|
941
|
+
method: "POST",
|
|
942
|
+
path: requestPath,
|
|
943
|
+
queryParameters,
|
|
944
|
+
headers,
|
|
945
|
+
data: batchAssignUserIdsParams
|
|
946
|
+
};
|
|
947
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
948
|
+
},
|
|
733
949
|
/**
|
|
734
950
|
* Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
|
|
735
951
|
*
|
|
@@ -763,6 +979,46 @@ function createSearchClient({
|
|
|
763
979
|
};
|
|
764
980
|
return transporter.request(request, requestOptions);
|
|
765
981
|
},
|
|
982
|
+
/**
|
|
983
|
+
* Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
|
|
984
|
+
*
|
|
985
|
+
* 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.
|
|
986
|
+
*
|
|
987
|
+
* Required API Key ACLs:
|
|
988
|
+
* - editSettings
|
|
989
|
+
* @param batchDictionaryEntries - The batchDictionaryEntries object.
|
|
990
|
+
* @param batchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
991
|
+
* @param batchDictionaryEntries.batchDictionaryEntriesParams - The batchDictionaryEntriesParams object.
|
|
992
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
993
|
+
* @see batchDictionaryEntries for the plain version.
|
|
994
|
+
*/
|
|
995
|
+
batchDictionaryEntriesWithHTTPInfo({ dictionaryName, batchDictionaryEntriesParams }, requestOptions) {
|
|
996
|
+
validateRequired("dictionaryName", "batchDictionaryEntriesWithHTTPInfo", dictionaryName);
|
|
997
|
+
validateRequired(
|
|
998
|
+
"batchDictionaryEntriesParams",
|
|
999
|
+
"batchDictionaryEntriesWithHTTPInfo",
|
|
1000
|
+
batchDictionaryEntriesParams
|
|
1001
|
+
);
|
|
1002
|
+
validateRequired(
|
|
1003
|
+
"batchDictionaryEntriesParams.requests",
|
|
1004
|
+
"batchDictionaryEntriesWithHTTPInfo",
|
|
1005
|
+
batchDictionaryEntriesParams.requests
|
|
1006
|
+
);
|
|
1007
|
+
const requestPath = "/1/dictionaries/{dictionaryName}/batch".replace(
|
|
1008
|
+
"{dictionaryName}",
|
|
1009
|
+
encodeURIComponent(dictionaryName)
|
|
1010
|
+
);
|
|
1011
|
+
const headers = {};
|
|
1012
|
+
const queryParameters = {};
|
|
1013
|
+
const request = {
|
|
1014
|
+
method: "POST",
|
|
1015
|
+
path: requestPath,
|
|
1016
|
+
queryParameters,
|
|
1017
|
+
headers,
|
|
1018
|
+
data: batchDictionaryEntriesParams
|
|
1019
|
+
};
|
|
1020
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1021
|
+
},
|
|
766
1022
|
/**
|
|
767
1023
|
* 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.
|
|
768
1024
|
*
|
|
@@ -788,6 +1044,34 @@ function createSearchClient({
|
|
|
788
1044
|
};
|
|
789
1045
|
return transporter.request(request, requestOptions);
|
|
790
1046
|
},
|
|
1047
|
+
/**
|
|
1048
|
+
* 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.
|
|
1049
|
+
*
|
|
1050
|
+
* 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.
|
|
1051
|
+
*
|
|
1052
|
+
* Required API Key ACLs:
|
|
1053
|
+
* - browse
|
|
1054
|
+
* @param browse - The browse object.
|
|
1055
|
+
* @param browse.indexName - Name of the index on which to perform the operation.
|
|
1056
|
+
* @param browse.browseParams - The browseParams object.
|
|
1057
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1058
|
+
* @see browse for the plain version.
|
|
1059
|
+
*/
|
|
1060
|
+
browseWithHTTPInfo({ indexName, browseParams }, requestOptions) {
|
|
1061
|
+
validateRequired("indexName", "browseWithHTTPInfo", indexName);
|
|
1062
|
+
const requestPath = "/1/indexes/{indexName}/browse".replace("{indexName}", encodeURIComponent(indexName));
|
|
1063
|
+
const headers = {};
|
|
1064
|
+
const queryParameters = {};
|
|
1065
|
+
const request = {
|
|
1066
|
+
method: "POST",
|
|
1067
|
+
path: requestPath,
|
|
1068
|
+
queryParameters,
|
|
1069
|
+
headers,
|
|
1070
|
+
data: browseParams ? browseParams : {},
|
|
1071
|
+
useReadTransporter: true
|
|
1072
|
+
};
|
|
1073
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1074
|
+
},
|
|
791
1075
|
/**
|
|
792
1076
|
* 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).
|
|
793
1077
|
*
|
|
@@ -810,6 +1094,31 @@ function createSearchClient({
|
|
|
810
1094
|
};
|
|
811
1095
|
return transporter.request(request, requestOptions);
|
|
812
1096
|
},
|
|
1097
|
+
/**
|
|
1098
|
+
* 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).
|
|
1099
|
+
*
|
|
1100
|
+
* 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.
|
|
1101
|
+
*
|
|
1102
|
+
* Required API Key ACLs:
|
|
1103
|
+
* - deleteIndex
|
|
1104
|
+
* @param clearObjects - The clearObjects object.
|
|
1105
|
+
* @param clearObjects.indexName - Name of the index on which to perform the operation.
|
|
1106
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1107
|
+
* @see clearObjects for the plain version.
|
|
1108
|
+
*/
|
|
1109
|
+
clearObjectsWithHTTPInfo({ indexName }, requestOptions) {
|
|
1110
|
+
validateRequired("indexName", "clearObjectsWithHTTPInfo", indexName);
|
|
1111
|
+
const requestPath = "/1/indexes/{indexName}/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
1112
|
+
const headers = {};
|
|
1113
|
+
const queryParameters = {};
|
|
1114
|
+
const request = {
|
|
1115
|
+
method: "POST",
|
|
1116
|
+
path: requestPath,
|
|
1117
|
+
queryParameters,
|
|
1118
|
+
headers
|
|
1119
|
+
};
|
|
1120
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1121
|
+
},
|
|
813
1122
|
/**
|
|
814
1123
|
* Deletes all rules from the index.
|
|
815
1124
|
*
|
|
@@ -837,18 +1146,21 @@ function createSearchClient({
|
|
|
837
1146
|
return transporter.request(request, requestOptions);
|
|
838
1147
|
},
|
|
839
1148
|
/**
|
|
840
|
-
* Deletes all
|
|
1149
|
+
* Deletes all rules from the index.
|
|
1150
|
+
*
|
|
1151
|
+
* 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.
|
|
841
1152
|
*
|
|
842
1153
|
* Required API Key ACLs:
|
|
843
1154
|
* - editSettings
|
|
844
|
-
* @param
|
|
845
|
-
* @param
|
|
846
|
-
* @param
|
|
1155
|
+
* @param clearRules - The clearRules object.
|
|
1156
|
+
* @param clearRules.indexName - Name of the index on which to perform the operation.
|
|
1157
|
+
* @param clearRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
847
1158
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1159
|
+
* @see clearRules for the plain version.
|
|
848
1160
|
*/
|
|
849
|
-
|
|
850
|
-
validateRequired("indexName", "
|
|
851
|
-
const requestPath = "/1/indexes/{indexName}/
|
|
1161
|
+
clearRulesWithHTTPInfo({ indexName, forwardToReplicas }, requestOptions) {
|
|
1162
|
+
validateRequired("indexName", "clearRulesWithHTTPInfo", indexName);
|
|
1163
|
+
const requestPath = "/1/indexes/{indexName}/rules/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
852
1164
|
const headers = {};
|
|
853
1165
|
const queryParameters = {};
|
|
854
1166
|
if (forwardToReplicas !== void 0) {
|
|
@@ -860,10 +1172,65 @@ function createSearchClient({
|
|
|
860
1172
|
queryParameters,
|
|
861
1173
|
headers
|
|
862
1174
|
};
|
|
863
|
-
return transporter.
|
|
1175
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
864
1176
|
},
|
|
865
1177
|
/**
|
|
866
|
-
*
|
|
1178
|
+
* Deletes all synonyms from the index.
|
|
1179
|
+
*
|
|
1180
|
+
* Required API Key ACLs:
|
|
1181
|
+
* - editSettings
|
|
1182
|
+
* @param clearSynonyms - The clearSynonyms object.
|
|
1183
|
+
* @param clearSynonyms.indexName - Name of the index on which to perform the operation.
|
|
1184
|
+
* @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1185
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1186
|
+
*/
|
|
1187
|
+
clearSynonyms({ indexName, forwardToReplicas }, requestOptions) {
|
|
1188
|
+
validateRequired("indexName", "clearSynonyms", indexName);
|
|
1189
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
1190
|
+
const headers = {};
|
|
1191
|
+
const queryParameters = {};
|
|
1192
|
+
if (forwardToReplicas !== void 0) {
|
|
1193
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1194
|
+
}
|
|
1195
|
+
const request = {
|
|
1196
|
+
method: "POST",
|
|
1197
|
+
path: requestPath,
|
|
1198
|
+
queryParameters,
|
|
1199
|
+
headers
|
|
1200
|
+
};
|
|
1201
|
+
return transporter.request(request, requestOptions);
|
|
1202
|
+
},
|
|
1203
|
+
/**
|
|
1204
|
+
* Deletes all synonyms from the index.
|
|
1205
|
+
*
|
|
1206
|
+
* 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.
|
|
1207
|
+
*
|
|
1208
|
+
* Required API Key ACLs:
|
|
1209
|
+
* - editSettings
|
|
1210
|
+
* @param clearSynonyms - The clearSynonyms object.
|
|
1211
|
+
* @param clearSynonyms.indexName - Name of the index on which to perform the operation.
|
|
1212
|
+
* @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1213
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1214
|
+
* @see clearSynonyms for the plain version.
|
|
1215
|
+
*/
|
|
1216
|
+
clearSynonymsWithHTTPInfo({ indexName, forwardToReplicas }, requestOptions) {
|
|
1217
|
+
validateRequired("indexName", "clearSynonymsWithHTTPInfo", indexName);
|
|
1218
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
1219
|
+
const headers = {};
|
|
1220
|
+
const queryParameters = {};
|
|
1221
|
+
if (forwardToReplicas !== void 0) {
|
|
1222
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1223
|
+
}
|
|
1224
|
+
const request = {
|
|
1225
|
+
method: "POST",
|
|
1226
|
+
path: requestPath,
|
|
1227
|
+
queryParameters,
|
|
1228
|
+
headers
|
|
1229
|
+
};
|
|
1230
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1231
|
+
},
|
|
1232
|
+
/**
|
|
1233
|
+
* This method lets you send requests to the Algolia REST API.
|
|
867
1234
|
* @param customDelete - The customDelete object.
|
|
868
1235
|
* @param customDelete.path - Path of the endpoint, for example `1/newFeature`.
|
|
869
1236
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -882,6 +1249,29 @@ function createSearchClient({
|
|
|
882
1249
|
};
|
|
883
1250
|
return transporter.request(request, requestOptions);
|
|
884
1251
|
},
|
|
1252
|
+
/**
|
|
1253
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1254
|
+
*
|
|
1255
|
+
* 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.
|
|
1256
|
+
* @param customDelete - The customDelete object.
|
|
1257
|
+
* @param customDelete.path - Path of the endpoint, for example `1/newFeature`.
|
|
1258
|
+
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
1259
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1260
|
+
* @see customDelete for the plain version.
|
|
1261
|
+
*/
|
|
1262
|
+
customDeleteWithHTTPInfo({ path, parameters }, requestOptions) {
|
|
1263
|
+
validateRequired("path", "customDeleteWithHTTPInfo", path);
|
|
1264
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1265
|
+
const headers = {};
|
|
1266
|
+
const queryParameters = parameters ? parameters : {};
|
|
1267
|
+
const request = {
|
|
1268
|
+
method: "DELETE",
|
|
1269
|
+
path: requestPath,
|
|
1270
|
+
queryParameters,
|
|
1271
|
+
headers
|
|
1272
|
+
};
|
|
1273
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1274
|
+
},
|
|
885
1275
|
/**
|
|
886
1276
|
* This method lets you send requests to the Algolia REST API.
|
|
887
1277
|
* @param customGet - The customGet object.
|
|
@@ -902,6 +1292,29 @@ function createSearchClient({
|
|
|
902
1292
|
};
|
|
903
1293
|
return transporter.request(request, requestOptions);
|
|
904
1294
|
},
|
|
1295
|
+
/**
|
|
1296
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1297
|
+
*
|
|
1298
|
+
* 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.
|
|
1299
|
+
* @param customGet - The customGet object.
|
|
1300
|
+
* @param customGet.path - Path of the endpoint, for example `1/newFeature`.
|
|
1301
|
+
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
1302
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1303
|
+
* @see customGet for the plain version.
|
|
1304
|
+
*/
|
|
1305
|
+
customGetWithHTTPInfo({ path, parameters }, requestOptions) {
|
|
1306
|
+
validateRequired("path", "customGetWithHTTPInfo", path);
|
|
1307
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1308
|
+
const headers = {};
|
|
1309
|
+
const queryParameters = parameters ? parameters : {};
|
|
1310
|
+
const request = {
|
|
1311
|
+
method: "GET",
|
|
1312
|
+
path: requestPath,
|
|
1313
|
+
queryParameters,
|
|
1314
|
+
headers
|
|
1315
|
+
};
|
|
1316
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1317
|
+
},
|
|
905
1318
|
/**
|
|
906
1319
|
* This method lets you send requests to the Algolia REST API.
|
|
907
1320
|
* @param customPost - The customPost object.
|
|
@@ -924,6 +1337,31 @@ function createSearchClient({
|
|
|
924
1337
|
};
|
|
925
1338
|
return transporter.request(request, requestOptions);
|
|
926
1339
|
},
|
|
1340
|
+
/**
|
|
1341
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1342
|
+
*
|
|
1343
|
+
* 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.
|
|
1344
|
+
* @param customPost - The customPost object.
|
|
1345
|
+
* @param customPost.path - Path of the endpoint, for example `1/newFeature`.
|
|
1346
|
+
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
1347
|
+
* @param customPost.body - Parameters to send with the custom request.
|
|
1348
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1349
|
+
* @see customPost for the plain version.
|
|
1350
|
+
*/
|
|
1351
|
+
customPostWithHTTPInfo({ path, parameters, body }, requestOptions) {
|
|
1352
|
+
validateRequired("path", "customPostWithHTTPInfo", path);
|
|
1353
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1354
|
+
const headers = {};
|
|
1355
|
+
const queryParameters = parameters ? parameters : {};
|
|
1356
|
+
const request = {
|
|
1357
|
+
method: "POST",
|
|
1358
|
+
path: requestPath,
|
|
1359
|
+
queryParameters,
|
|
1360
|
+
headers,
|
|
1361
|
+
data: body ? body : {}
|
|
1362
|
+
};
|
|
1363
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1364
|
+
},
|
|
927
1365
|
/**
|
|
928
1366
|
* This method lets you send requests to the Algolia REST API.
|
|
929
1367
|
* @param customPut - The customPut object.
|
|
@@ -946,6 +1384,31 @@ function createSearchClient({
|
|
|
946
1384
|
};
|
|
947
1385
|
return transporter.request(request, requestOptions);
|
|
948
1386
|
},
|
|
1387
|
+
/**
|
|
1388
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1389
|
+
*
|
|
1390
|
+
* 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.
|
|
1391
|
+
* @param customPut - The customPut object.
|
|
1392
|
+
* @param customPut.path - Path of the endpoint, for example `1/newFeature`.
|
|
1393
|
+
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
1394
|
+
* @param customPut.body - Parameters to send with the custom request.
|
|
1395
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1396
|
+
* @see customPut for the plain version.
|
|
1397
|
+
*/
|
|
1398
|
+
customPutWithHTTPInfo({ path, parameters, body }, requestOptions) {
|
|
1399
|
+
validateRequired("path", "customPutWithHTTPInfo", path);
|
|
1400
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1401
|
+
const headers = {};
|
|
1402
|
+
const queryParameters = parameters ? parameters : {};
|
|
1403
|
+
const request = {
|
|
1404
|
+
method: "PUT",
|
|
1405
|
+
path: requestPath,
|
|
1406
|
+
queryParameters,
|
|
1407
|
+
headers,
|
|
1408
|
+
data: body ? body : {}
|
|
1409
|
+
};
|
|
1410
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1411
|
+
},
|
|
949
1412
|
/**
|
|
950
1413
|
* Deletes the API key.
|
|
951
1414
|
*
|
|
@@ -968,6 +1431,31 @@ function createSearchClient({
|
|
|
968
1431
|
};
|
|
969
1432
|
return transporter.request(request, requestOptions);
|
|
970
1433
|
},
|
|
1434
|
+
/**
|
|
1435
|
+
* Deletes the API key.
|
|
1436
|
+
*
|
|
1437
|
+
* 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.
|
|
1438
|
+
*
|
|
1439
|
+
* Required API Key ACLs:
|
|
1440
|
+
* - admin
|
|
1441
|
+
* @param deleteApiKey - The deleteApiKey object.
|
|
1442
|
+
* @param deleteApiKey.key - API key.
|
|
1443
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1444
|
+
* @see deleteApiKey for the plain version.
|
|
1445
|
+
*/
|
|
1446
|
+
deleteApiKeyWithHTTPInfo({ key }, requestOptions) {
|
|
1447
|
+
validateRequired("key", "deleteApiKeyWithHTTPInfo", key);
|
|
1448
|
+
const requestPath = "/1/keys/{key}".replace("{key}", encodeURIComponent(key));
|
|
1449
|
+
const headers = {};
|
|
1450
|
+
const queryParameters = {};
|
|
1451
|
+
const request = {
|
|
1452
|
+
method: "DELETE",
|
|
1453
|
+
path: requestPath,
|
|
1454
|
+
queryParameters,
|
|
1455
|
+
headers
|
|
1456
|
+
};
|
|
1457
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1458
|
+
},
|
|
971
1459
|
/**
|
|
972
1460
|
* 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).
|
|
973
1461
|
*
|
|
@@ -993,6 +1481,34 @@ function createSearchClient({
|
|
|
993
1481
|
};
|
|
994
1482
|
return transporter.request(request, requestOptions);
|
|
995
1483
|
},
|
|
1484
|
+
/**
|
|
1485
|
+
* 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).
|
|
1486
|
+
*
|
|
1487
|
+
* 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.
|
|
1488
|
+
*
|
|
1489
|
+
* Required API Key ACLs:
|
|
1490
|
+
* - deleteIndex
|
|
1491
|
+
* @param deleteBy - The deleteBy object.
|
|
1492
|
+
* @param deleteBy.indexName - Name of the index on which to perform the operation.
|
|
1493
|
+
* @param deleteBy.deleteByParams - The deleteByParams object.
|
|
1494
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1495
|
+
* @see deleteBy for the plain version.
|
|
1496
|
+
*/
|
|
1497
|
+
deleteByWithHTTPInfo({ indexName, deleteByParams }, requestOptions) {
|
|
1498
|
+
validateRequired("indexName", "deleteByWithHTTPInfo", indexName);
|
|
1499
|
+
validateRequired("deleteByParams", "deleteByWithHTTPInfo", deleteByParams);
|
|
1500
|
+
const requestPath = "/1/indexes/{indexName}/deleteByQuery".replace("{indexName}", encodeURIComponent(indexName));
|
|
1501
|
+
const headers = {};
|
|
1502
|
+
const queryParameters = {};
|
|
1503
|
+
const request = {
|
|
1504
|
+
method: "POST",
|
|
1505
|
+
path: requestPath,
|
|
1506
|
+
queryParameters,
|
|
1507
|
+
headers,
|
|
1508
|
+
data: deleteByParams
|
|
1509
|
+
};
|
|
1510
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1511
|
+
},
|
|
996
1512
|
/**
|
|
997
1513
|
* 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).
|
|
998
1514
|
*
|
|
@@ -1015,6 +1531,31 @@ function createSearchClient({
|
|
|
1015
1531
|
};
|
|
1016
1532
|
return transporter.request(request, requestOptions);
|
|
1017
1533
|
},
|
|
1534
|
+
/**
|
|
1535
|
+
* 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).
|
|
1536
|
+
*
|
|
1537
|
+
* 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.
|
|
1538
|
+
*
|
|
1539
|
+
* Required API Key ACLs:
|
|
1540
|
+
* - deleteIndex
|
|
1541
|
+
* @param deleteIndex - The deleteIndex object.
|
|
1542
|
+
* @param deleteIndex.indexName - Name of the index on which to perform the operation.
|
|
1543
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1544
|
+
* @see deleteIndex for the plain version.
|
|
1545
|
+
*/
|
|
1546
|
+
deleteIndexWithHTTPInfo({ indexName }, requestOptions) {
|
|
1547
|
+
validateRequired("indexName", "deleteIndexWithHTTPInfo", indexName);
|
|
1548
|
+
const requestPath = "/1/indexes/{indexName}".replace("{indexName}", encodeURIComponent(indexName));
|
|
1549
|
+
const headers = {};
|
|
1550
|
+
const queryParameters = {};
|
|
1551
|
+
const request = {
|
|
1552
|
+
method: "DELETE",
|
|
1553
|
+
path: requestPath,
|
|
1554
|
+
queryParameters,
|
|
1555
|
+
headers
|
|
1556
|
+
};
|
|
1557
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1558
|
+
},
|
|
1018
1559
|
/**
|
|
1019
1560
|
* 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).
|
|
1020
1561
|
*
|
|
@@ -1039,6 +1580,33 @@ function createSearchClient({
|
|
|
1039
1580
|
};
|
|
1040
1581
|
return transporter.request(request, requestOptions);
|
|
1041
1582
|
},
|
|
1583
|
+
/**
|
|
1584
|
+
* 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).
|
|
1585
|
+
*
|
|
1586
|
+
* 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.
|
|
1587
|
+
*
|
|
1588
|
+
* Required API Key ACLs:
|
|
1589
|
+
* - deleteObject
|
|
1590
|
+
* @param deleteObject - The deleteObject object.
|
|
1591
|
+
* @param deleteObject.indexName - Name of the index on which to perform the operation.
|
|
1592
|
+
* @param deleteObject.objectID - Unique record identifier.
|
|
1593
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1594
|
+
* @see deleteObject for the plain version.
|
|
1595
|
+
*/
|
|
1596
|
+
deleteObjectWithHTTPInfo({ indexName, objectID }, requestOptions) {
|
|
1597
|
+
validateRequired("indexName", "deleteObjectWithHTTPInfo", indexName);
|
|
1598
|
+
validateRequired("objectID", "deleteObjectWithHTTPInfo", objectID);
|
|
1599
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1600
|
+
const headers = {};
|
|
1601
|
+
const queryParameters = {};
|
|
1602
|
+
const request = {
|
|
1603
|
+
method: "DELETE",
|
|
1604
|
+
path: requestPath,
|
|
1605
|
+
queryParameters,
|
|
1606
|
+
headers
|
|
1607
|
+
};
|
|
1608
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1609
|
+
},
|
|
1042
1610
|
/**
|
|
1043
1611
|
* 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).
|
|
1044
1612
|
*
|
|
@@ -1067,6 +1635,37 @@ function createSearchClient({
|
|
|
1067
1635
|
};
|
|
1068
1636
|
return transporter.request(request, requestOptions);
|
|
1069
1637
|
},
|
|
1638
|
+
/**
|
|
1639
|
+
* 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).
|
|
1640
|
+
*
|
|
1641
|
+
* 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.
|
|
1642
|
+
*
|
|
1643
|
+
* Required API Key ACLs:
|
|
1644
|
+
* - editSettings
|
|
1645
|
+
* @param deleteRule - The deleteRule object.
|
|
1646
|
+
* @param deleteRule.indexName - Name of the index on which to perform the operation.
|
|
1647
|
+
* @param deleteRule.objectID - Unique identifier of a rule object.
|
|
1648
|
+
* @param deleteRule.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1649
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1650
|
+
* @see deleteRule for the plain version.
|
|
1651
|
+
*/
|
|
1652
|
+
deleteRuleWithHTTPInfo({ indexName, objectID, forwardToReplicas }, requestOptions) {
|
|
1653
|
+
validateRequired("indexName", "deleteRuleWithHTTPInfo", indexName);
|
|
1654
|
+
validateRequired("objectID", "deleteRuleWithHTTPInfo", objectID);
|
|
1655
|
+
const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1656
|
+
const headers = {};
|
|
1657
|
+
const queryParameters = {};
|
|
1658
|
+
if (forwardToReplicas !== void 0) {
|
|
1659
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1660
|
+
}
|
|
1661
|
+
const request = {
|
|
1662
|
+
method: "DELETE",
|
|
1663
|
+
path: requestPath,
|
|
1664
|
+
queryParameters,
|
|
1665
|
+
headers
|
|
1666
|
+
};
|
|
1667
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1668
|
+
},
|
|
1070
1669
|
/**
|
|
1071
1670
|
* Deletes a source from the list of allowed sources.
|
|
1072
1671
|
*
|
|
@@ -1089,6 +1688,31 @@ function createSearchClient({
|
|
|
1089
1688
|
};
|
|
1090
1689
|
return transporter.request(request, requestOptions);
|
|
1091
1690
|
},
|
|
1691
|
+
/**
|
|
1692
|
+
* Deletes a source from the list of allowed sources.
|
|
1693
|
+
*
|
|
1694
|
+
* 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.
|
|
1695
|
+
*
|
|
1696
|
+
* Required API Key ACLs:
|
|
1697
|
+
* - admin
|
|
1698
|
+
* @param deleteSource - The deleteSource object.
|
|
1699
|
+
* @param deleteSource.source - IP address range of the source.
|
|
1700
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1701
|
+
* @see deleteSource for the plain version.
|
|
1702
|
+
*/
|
|
1703
|
+
deleteSourceWithHTTPInfo({ source }, requestOptions) {
|
|
1704
|
+
validateRequired("source", "deleteSourceWithHTTPInfo", source);
|
|
1705
|
+
const requestPath = "/1/security/sources/{source}".replace("{source}", encodeURIComponent(source));
|
|
1706
|
+
const headers = {};
|
|
1707
|
+
const queryParameters = {};
|
|
1708
|
+
const request = {
|
|
1709
|
+
method: "DELETE",
|
|
1710
|
+
path: requestPath,
|
|
1711
|
+
queryParameters,
|
|
1712
|
+
headers
|
|
1713
|
+
};
|
|
1714
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1715
|
+
},
|
|
1092
1716
|
/**
|
|
1093
1717
|
* 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).
|
|
1094
1718
|
*
|
|
@@ -1118,7 +1742,38 @@ function createSearchClient({
|
|
|
1118
1742
|
return transporter.request(request, requestOptions);
|
|
1119
1743
|
},
|
|
1120
1744
|
/**
|
|
1121
|
-
*
|
|
1745
|
+
* 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).
|
|
1746
|
+
*
|
|
1747
|
+
* 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.
|
|
1748
|
+
*
|
|
1749
|
+
* Required API Key ACLs:
|
|
1750
|
+
* - editSettings
|
|
1751
|
+
* @param deleteSynonym - The deleteSynonym object.
|
|
1752
|
+
* @param deleteSynonym.indexName - Name of the index on which to perform the operation.
|
|
1753
|
+
* @param deleteSynonym.objectID - Unique identifier of a synonym object.
|
|
1754
|
+
* @param deleteSynonym.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1755
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1756
|
+
* @see deleteSynonym for the plain version.
|
|
1757
|
+
*/
|
|
1758
|
+
deleteSynonymWithHTTPInfo({ indexName, objectID, forwardToReplicas }, requestOptions) {
|
|
1759
|
+
validateRequired("indexName", "deleteSynonymWithHTTPInfo", indexName);
|
|
1760
|
+
validateRequired("objectID", "deleteSynonymWithHTTPInfo", objectID);
|
|
1761
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1762
|
+
const headers = {};
|
|
1763
|
+
const queryParameters = {};
|
|
1764
|
+
if (forwardToReplicas !== void 0) {
|
|
1765
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1766
|
+
}
|
|
1767
|
+
const request = {
|
|
1768
|
+
method: "DELETE",
|
|
1769
|
+
path: requestPath,
|
|
1770
|
+
queryParameters,
|
|
1771
|
+
headers
|
|
1772
|
+
};
|
|
1773
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1774
|
+
},
|
|
1775
|
+
/**
|
|
1776
|
+
* 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>`.
|
|
1122
1777
|
*
|
|
1123
1778
|
* Required API Key ACLs:
|
|
1124
1779
|
* - search
|
|
@@ -1139,6 +1794,31 @@ function createSearchClient({
|
|
|
1139
1794
|
};
|
|
1140
1795
|
return transporter.request(request, requestOptions);
|
|
1141
1796
|
},
|
|
1797
|
+
/**
|
|
1798
|
+
* 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>`.
|
|
1799
|
+
*
|
|
1800
|
+
* 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.
|
|
1801
|
+
*
|
|
1802
|
+
* Required API Key ACLs:
|
|
1803
|
+
* - search
|
|
1804
|
+
* @param getApiKey - The getApiKey object.
|
|
1805
|
+
* @param getApiKey.key - API key.
|
|
1806
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1807
|
+
* @see getApiKey for the plain version.
|
|
1808
|
+
*/
|
|
1809
|
+
getApiKeyWithHTTPInfo({ key }, requestOptions) {
|
|
1810
|
+
validateRequired("key", "getApiKeyWithHTTPInfo", key);
|
|
1811
|
+
const requestPath = "/1/keys/{key}".replace("{key}", encodeURIComponent(key));
|
|
1812
|
+
const headers = {};
|
|
1813
|
+
const queryParameters = {};
|
|
1814
|
+
const request = {
|
|
1815
|
+
method: "GET",
|
|
1816
|
+
path: requestPath,
|
|
1817
|
+
queryParameters,
|
|
1818
|
+
headers
|
|
1819
|
+
};
|
|
1820
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1821
|
+
},
|
|
1142
1822
|
/**
|
|
1143
1823
|
* Checks the status of a given application task.
|
|
1144
1824
|
*
|
|
@@ -1161,6 +1841,31 @@ function createSearchClient({
|
|
|
1161
1841
|
};
|
|
1162
1842
|
return transporter.request(request, requestOptions);
|
|
1163
1843
|
},
|
|
1844
|
+
/**
|
|
1845
|
+
* Checks the status of a given application task.
|
|
1846
|
+
*
|
|
1847
|
+
* 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.
|
|
1848
|
+
*
|
|
1849
|
+
* Required API Key ACLs:
|
|
1850
|
+
* - editSettings
|
|
1851
|
+
* @param getAppTask - The getAppTask object.
|
|
1852
|
+
* @param getAppTask.taskID - Unique task identifier.
|
|
1853
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1854
|
+
* @see getAppTask for the plain version.
|
|
1855
|
+
*/
|
|
1856
|
+
getAppTaskWithHTTPInfo({ taskID }, requestOptions) {
|
|
1857
|
+
validateRequired("taskID", "getAppTaskWithHTTPInfo", taskID);
|
|
1858
|
+
const requestPath = "/1/task/{taskID}".replace("{taskID}", encodeURIComponent(taskID));
|
|
1859
|
+
const headers = {};
|
|
1860
|
+
const queryParameters = {};
|
|
1861
|
+
const request = {
|
|
1862
|
+
method: "GET",
|
|
1863
|
+
path: requestPath,
|
|
1864
|
+
queryParameters,
|
|
1865
|
+
headers
|
|
1866
|
+
};
|
|
1867
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1868
|
+
},
|
|
1164
1869
|
/**
|
|
1165
1870
|
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
1166
1871
|
*
|
|
@@ -1180,6 +1885,28 @@ function createSearchClient({
|
|
|
1180
1885
|
};
|
|
1181
1886
|
return transporter.request(request, requestOptions);
|
|
1182
1887
|
},
|
|
1888
|
+
/**
|
|
1889
|
+
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
1890
|
+
*
|
|
1891
|
+
* 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.
|
|
1892
|
+
*
|
|
1893
|
+
* Required API Key ACLs:
|
|
1894
|
+
* - settings
|
|
1895
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1896
|
+
* @see getDictionaryLanguages for the plain version.
|
|
1897
|
+
*/
|
|
1898
|
+
getDictionaryLanguagesWithHTTPInfo(requestOptions) {
|
|
1899
|
+
const requestPath = "/1/dictionaries/*/languages";
|
|
1900
|
+
const headers = {};
|
|
1901
|
+
const queryParameters = {};
|
|
1902
|
+
const request = {
|
|
1903
|
+
method: "GET",
|
|
1904
|
+
path: requestPath,
|
|
1905
|
+
queryParameters,
|
|
1906
|
+
headers
|
|
1907
|
+
};
|
|
1908
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1909
|
+
},
|
|
1183
1910
|
/**
|
|
1184
1911
|
* Retrieves the languages for which standard dictionary entries are turned off.
|
|
1185
1912
|
*
|
|
@@ -1199,6 +1926,28 @@ function createSearchClient({
|
|
|
1199
1926
|
};
|
|
1200
1927
|
return transporter.request(request, requestOptions);
|
|
1201
1928
|
},
|
|
1929
|
+
/**
|
|
1930
|
+
* Retrieves the languages for which standard dictionary entries are turned off.
|
|
1931
|
+
*
|
|
1932
|
+
* 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.
|
|
1933
|
+
*
|
|
1934
|
+
* Required API Key ACLs:
|
|
1935
|
+
* - settings
|
|
1936
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1937
|
+
* @see getDictionarySettings for the plain version.
|
|
1938
|
+
*/
|
|
1939
|
+
getDictionarySettingsWithHTTPInfo(requestOptions) {
|
|
1940
|
+
const requestPath = "/1/dictionaries/*/settings";
|
|
1941
|
+
const headers = {};
|
|
1942
|
+
const queryParameters = {};
|
|
1943
|
+
const request = {
|
|
1944
|
+
method: "GET",
|
|
1945
|
+
path: requestPath,
|
|
1946
|
+
queryParameters,
|
|
1947
|
+
headers
|
|
1948
|
+
};
|
|
1949
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1950
|
+
},
|
|
1202
1951
|
/**
|
|
1203
1952
|
* 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.
|
|
1204
1953
|
*
|
|
@@ -1235,6 +1984,45 @@ function createSearchClient({
|
|
|
1235
1984
|
};
|
|
1236
1985
|
return transporter.request(request, requestOptions);
|
|
1237
1986
|
},
|
|
1987
|
+
/**
|
|
1988
|
+
* 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.
|
|
1989
|
+
*
|
|
1990
|
+
* 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.
|
|
1991
|
+
*
|
|
1992
|
+
* Required API Key ACLs:
|
|
1993
|
+
* - logs
|
|
1994
|
+
* @param getLogs - The getLogs object.
|
|
1995
|
+
* @param getLogs.offset - First log entry to retrieve. The most recent entries are listed first.
|
|
1996
|
+
* @param getLogs.length - Maximum number of entries to retrieve.
|
|
1997
|
+
* @param getLogs.indexName - Index for which to retrieve log entries. By default, log entries are retrieved for all indices.
|
|
1998
|
+
* @param getLogs.type - Type of log entries to retrieve. By default, all log entries are retrieved.
|
|
1999
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2000
|
+
* @see getLogs for the plain version.
|
|
2001
|
+
*/
|
|
2002
|
+
getLogsWithHTTPInfo({ offset, length, indexName, type } = {}, requestOptions = void 0) {
|
|
2003
|
+
const requestPath = "/1/logs";
|
|
2004
|
+
const headers = {};
|
|
2005
|
+
const queryParameters = {};
|
|
2006
|
+
if (offset !== void 0) {
|
|
2007
|
+
queryParameters["offset"] = offset.toString();
|
|
2008
|
+
}
|
|
2009
|
+
if (length !== void 0) {
|
|
2010
|
+
queryParameters["length"] = length.toString();
|
|
2011
|
+
}
|
|
2012
|
+
if (indexName !== void 0) {
|
|
2013
|
+
queryParameters["indexName"] = indexName.toString();
|
|
2014
|
+
}
|
|
2015
|
+
if (type !== void 0) {
|
|
2016
|
+
queryParameters["type"] = type.toString();
|
|
2017
|
+
}
|
|
2018
|
+
const request = {
|
|
2019
|
+
method: "GET",
|
|
2020
|
+
path: requestPath,
|
|
2021
|
+
queryParameters,
|
|
2022
|
+
headers
|
|
2023
|
+
};
|
|
2024
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2025
|
+
},
|
|
1238
2026
|
/**
|
|
1239
2027
|
* 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).
|
|
1240
2028
|
*
|
|
@@ -1263,6 +2051,37 @@ function createSearchClient({
|
|
|
1263
2051
|
};
|
|
1264
2052
|
return transporter.request(request, requestOptions);
|
|
1265
2053
|
},
|
|
2054
|
+
/**
|
|
2055
|
+
* 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).
|
|
2056
|
+
*
|
|
2057
|
+
* 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.
|
|
2058
|
+
*
|
|
2059
|
+
* Required API Key ACLs:
|
|
2060
|
+
* - search
|
|
2061
|
+
* @param getObject - The getObject object.
|
|
2062
|
+
* @param getObject.indexName - Name of the index on which to perform the operation.
|
|
2063
|
+
* @param getObject.objectID - Unique record identifier.
|
|
2064
|
+
* @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.
|
|
2065
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2066
|
+
* @see getObject for the plain version.
|
|
2067
|
+
*/
|
|
2068
|
+
getObjectWithHTTPInfo({ indexName, objectID, attributesToRetrieve }, requestOptions) {
|
|
2069
|
+
validateRequired("indexName", "getObjectWithHTTPInfo", indexName);
|
|
2070
|
+
validateRequired("objectID", "getObjectWithHTTPInfo", objectID);
|
|
2071
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2072
|
+
const headers = {};
|
|
2073
|
+
const queryParameters = {};
|
|
2074
|
+
if (attributesToRetrieve !== void 0) {
|
|
2075
|
+
queryParameters["attributesToRetrieve"] = attributesToRetrieve.toString();
|
|
2076
|
+
}
|
|
2077
|
+
const request = {
|
|
2078
|
+
method: "GET",
|
|
2079
|
+
path: requestPath,
|
|
2080
|
+
queryParameters,
|
|
2081
|
+
headers
|
|
2082
|
+
};
|
|
2083
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2084
|
+
},
|
|
1266
2085
|
/**
|
|
1267
2086
|
* Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
|
|
1268
2087
|
*
|
|
@@ -1288,6 +2107,34 @@ function createSearchClient({
|
|
|
1288
2107
|
};
|
|
1289
2108
|
return transporter.request(request, requestOptions);
|
|
1290
2109
|
},
|
|
2110
|
+
/**
|
|
2111
|
+
* Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
|
|
2112
|
+
*
|
|
2113
|
+
* 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.
|
|
2114
|
+
*
|
|
2115
|
+
* Required API Key ACLs:
|
|
2116
|
+
* - search
|
|
2117
|
+
* @param getObjectsParams - Request object.
|
|
2118
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2119
|
+
* @see getObjects for the plain version.
|
|
2120
|
+
*/
|
|
2121
|
+
getObjectsWithHTTPInfo(getObjectsParams, requestOptions) {
|
|
2122
|
+
validateRequired("getObjectsParams", "getObjectsWithHTTPInfo", getObjectsParams);
|
|
2123
|
+
validateRequired("getObjectsParams.requests", "getObjectsWithHTTPInfo", getObjectsParams.requests);
|
|
2124
|
+
const requestPath = "/1/indexes/*/objects";
|
|
2125
|
+
const headers = {};
|
|
2126
|
+
const queryParameters = {};
|
|
2127
|
+
const request = {
|
|
2128
|
+
method: "POST",
|
|
2129
|
+
path: requestPath,
|
|
2130
|
+
queryParameters,
|
|
2131
|
+
headers,
|
|
2132
|
+
data: getObjectsParams,
|
|
2133
|
+
useReadTransporter: true,
|
|
2134
|
+
cacheable: true
|
|
2135
|
+
};
|
|
2136
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2137
|
+
},
|
|
1291
2138
|
/**
|
|
1292
2139
|
* 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).
|
|
1293
2140
|
*
|
|
@@ -1313,40 +2160,241 @@ function createSearchClient({
|
|
|
1313
2160
|
return transporter.request(request, requestOptions);
|
|
1314
2161
|
},
|
|
1315
2162
|
/**
|
|
1316
|
-
* Retrieves
|
|
2163
|
+
* 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).
|
|
2164
|
+
*
|
|
2165
|
+
* 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.
|
|
2166
|
+
*
|
|
2167
|
+
* Required API Key ACLs:
|
|
2168
|
+
* - settings
|
|
2169
|
+
* @param getRule - The getRule object.
|
|
2170
|
+
* @param getRule.indexName - Name of the index on which to perform the operation.
|
|
2171
|
+
* @param getRule.objectID - Unique identifier of a rule object.
|
|
2172
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2173
|
+
* @see getRule for the plain version.
|
|
2174
|
+
*/
|
|
2175
|
+
getRuleWithHTTPInfo({ indexName, objectID }, requestOptions) {
|
|
2176
|
+
validateRequired("indexName", "getRuleWithHTTPInfo", indexName);
|
|
2177
|
+
validateRequired("objectID", "getRuleWithHTTPInfo", objectID);
|
|
2178
|
+
const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2179
|
+
const headers = {};
|
|
2180
|
+
const queryParameters = {};
|
|
2181
|
+
const request = {
|
|
2182
|
+
method: "GET",
|
|
2183
|
+
path: requestPath,
|
|
2184
|
+
queryParameters,
|
|
2185
|
+
headers
|
|
2186
|
+
};
|
|
2187
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2188
|
+
},
|
|
2189
|
+
/**
|
|
2190
|
+
* Retrieves an object with non-null index settings.
|
|
2191
|
+
*
|
|
2192
|
+
* Required API Key ACLs:
|
|
2193
|
+
* - settings
|
|
2194
|
+
* @param getSettings - The getSettings object.
|
|
2195
|
+
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
2196
|
+
* @param getSettings.getVersion - When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.
|
|
2197
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2198
|
+
*/
|
|
2199
|
+
getSettings({ indexName, getVersion }, requestOptions) {
|
|
2200
|
+
validateRequired("indexName", "getSettings", indexName);
|
|
2201
|
+
const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
|
|
2202
|
+
const headers = {};
|
|
2203
|
+
const queryParameters = {};
|
|
2204
|
+
if (getVersion !== void 0) {
|
|
2205
|
+
queryParameters["getVersion"] = getVersion.toString();
|
|
2206
|
+
}
|
|
2207
|
+
const request = {
|
|
2208
|
+
method: "GET",
|
|
2209
|
+
path: requestPath,
|
|
2210
|
+
queryParameters,
|
|
2211
|
+
headers
|
|
2212
|
+
};
|
|
2213
|
+
return transporter.request(request, requestOptions);
|
|
2214
|
+
},
|
|
2215
|
+
/**
|
|
2216
|
+
* Retrieves an object with non-null index settings.
|
|
2217
|
+
*
|
|
2218
|
+
* 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.
|
|
2219
|
+
*
|
|
2220
|
+
* Required API Key ACLs:
|
|
2221
|
+
* - settings
|
|
2222
|
+
* @param getSettings - The getSettings object.
|
|
2223
|
+
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
2224
|
+
* @param getSettings.getVersion - When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.
|
|
2225
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2226
|
+
* @see getSettings for the plain version.
|
|
2227
|
+
*/
|
|
2228
|
+
getSettingsWithHTTPInfo({ indexName, getVersion }, requestOptions) {
|
|
2229
|
+
validateRequired("indexName", "getSettingsWithHTTPInfo", indexName);
|
|
2230
|
+
const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
|
|
2231
|
+
const headers = {};
|
|
2232
|
+
const queryParameters = {};
|
|
2233
|
+
if (getVersion !== void 0) {
|
|
2234
|
+
queryParameters["getVersion"] = getVersion.toString();
|
|
2235
|
+
}
|
|
2236
|
+
const request = {
|
|
2237
|
+
method: "GET",
|
|
2238
|
+
path: requestPath,
|
|
2239
|
+
queryParameters,
|
|
2240
|
+
headers
|
|
2241
|
+
};
|
|
2242
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2243
|
+
},
|
|
2244
|
+
/**
|
|
2245
|
+
* Retrieves all allowed IP addresses with access to your application.
|
|
2246
|
+
*
|
|
2247
|
+
* Required API Key ACLs:
|
|
2248
|
+
* - admin
|
|
2249
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2250
|
+
*/
|
|
2251
|
+
getSources(requestOptions) {
|
|
2252
|
+
const requestPath = "/1/security/sources";
|
|
2253
|
+
const headers = {};
|
|
2254
|
+
const queryParameters = {};
|
|
2255
|
+
const request = {
|
|
2256
|
+
method: "GET",
|
|
2257
|
+
path: requestPath,
|
|
2258
|
+
queryParameters,
|
|
2259
|
+
headers
|
|
2260
|
+
};
|
|
2261
|
+
return transporter.request(request, requestOptions);
|
|
2262
|
+
},
|
|
2263
|
+
/**
|
|
2264
|
+
* Retrieves all allowed IP addresses with access to your application.
|
|
2265
|
+
*
|
|
2266
|
+
* 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.
|
|
2267
|
+
*
|
|
2268
|
+
* Required API Key ACLs:
|
|
2269
|
+
* - admin
|
|
2270
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2271
|
+
* @see getSources for the plain version.
|
|
2272
|
+
*/
|
|
2273
|
+
getSourcesWithHTTPInfo(requestOptions) {
|
|
2274
|
+
const requestPath = "/1/security/sources";
|
|
2275
|
+
const headers = {};
|
|
2276
|
+
const queryParameters = {};
|
|
2277
|
+
const request = {
|
|
2278
|
+
method: "GET",
|
|
2279
|
+
path: requestPath,
|
|
2280
|
+
queryParameters,
|
|
2281
|
+
headers
|
|
2282
|
+
};
|
|
2283
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2284
|
+
},
|
|
2285
|
+
/**
|
|
2286
|
+
* 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).
|
|
2287
|
+
*
|
|
2288
|
+
* Required API Key ACLs:
|
|
2289
|
+
* - settings
|
|
2290
|
+
* @param getSynonym - The getSynonym object.
|
|
2291
|
+
* @param getSynonym.indexName - Name of the index on which to perform the operation.
|
|
2292
|
+
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
2293
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2294
|
+
*/
|
|
2295
|
+
getSynonym({ indexName, objectID }, requestOptions) {
|
|
2296
|
+
validateRequired("indexName", "getSynonym", indexName);
|
|
2297
|
+
validateRequired("objectID", "getSynonym", objectID);
|
|
2298
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2299
|
+
const headers = {};
|
|
2300
|
+
const queryParameters = {};
|
|
2301
|
+
const request = {
|
|
2302
|
+
method: "GET",
|
|
2303
|
+
path: requestPath,
|
|
2304
|
+
queryParameters,
|
|
2305
|
+
headers
|
|
2306
|
+
};
|
|
2307
|
+
return transporter.request(request, requestOptions);
|
|
2308
|
+
},
|
|
2309
|
+
/**
|
|
2310
|
+
* 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).
|
|
2311
|
+
*
|
|
2312
|
+
* 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.
|
|
2313
|
+
*
|
|
2314
|
+
* Required API Key ACLs:
|
|
2315
|
+
* - settings
|
|
2316
|
+
* @param getSynonym - The getSynonym object.
|
|
2317
|
+
* @param getSynonym.indexName - Name of the index on which to perform the operation.
|
|
2318
|
+
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
2319
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2320
|
+
* @see getSynonym for the plain version.
|
|
2321
|
+
*/
|
|
2322
|
+
getSynonymWithHTTPInfo({ indexName, objectID }, requestOptions) {
|
|
2323
|
+
validateRequired("indexName", "getSynonymWithHTTPInfo", indexName);
|
|
2324
|
+
validateRequired("objectID", "getSynonymWithHTTPInfo", objectID);
|
|
2325
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2326
|
+
const headers = {};
|
|
2327
|
+
const queryParameters = {};
|
|
2328
|
+
const request = {
|
|
2329
|
+
method: "GET",
|
|
2330
|
+
path: requestPath,
|
|
2331
|
+
queryParameters,
|
|
2332
|
+
headers
|
|
2333
|
+
};
|
|
2334
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2335
|
+
},
|
|
2336
|
+
/**
|
|
2337
|
+
* 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.
|
|
2338
|
+
*
|
|
2339
|
+
* Required API Key ACLs:
|
|
2340
|
+
* - addObject
|
|
2341
|
+
* @param getTask - The getTask object.
|
|
2342
|
+
* @param getTask.indexName - Name of the index on which to perform the operation.
|
|
2343
|
+
* @param getTask.taskID - Unique task identifier.
|
|
2344
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2345
|
+
*/
|
|
2346
|
+
getTask({ indexName, taskID }, requestOptions) {
|
|
2347
|
+
validateRequired("indexName", "getTask", indexName);
|
|
2348
|
+
validateRequired("taskID", "getTask", taskID);
|
|
2349
|
+
const requestPath = "/1/indexes/{indexName}/task/{taskID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{taskID}", encodeURIComponent(taskID));
|
|
2350
|
+
const headers = {};
|
|
2351
|
+
const queryParameters = {};
|
|
2352
|
+
const request = {
|
|
2353
|
+
method: "GET",
|
|
2354
|
+
path: requestPath,
|
|
2355
|
+
queryParameters,
|
|
2356
|
+
headers
|
|
2357
|
+
};
|
|
2358
|
+
return transporter.request(request, requestOptions);
|
|
2359
|
+
},
|
|
2360
|
+
/**
|
|
2361
|
+
* 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.
|
|
2362
|
+
*
|
|
2363
|
+
* 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.
|
|
1317
2364
|
*
|
|
1318
2365
|
* Required API Key ACLs:
|
|
1319
|
-
* -
|
|
1320
|
-
* @param
|
|
1321
|
-
* @param
|
|
1322
|
-
* @param
|
|
2366
|
+
* - addObject
|
|
2367
|
+
* @param getTask - The getTask object.
|
|
2368
|
+
* @param getTask.indexName - Name of the index on which to perform the operation.
|
|
2369
|
+
* @param getTask.taskID - Unique task identifier.
|
|
1323
2370
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2371
|
+
* @see getTask for the plain version.
|
|
1324
2372
|
*/
|
|
1325
|
-
|
|
1326
|
-
validateRequired("indexName", "
|
|
1327
|
-
|
|
2373
|
+
getTaskWithHTTPInfo({ indexName, taskID }, requestOptions) {
|
|
2374
|
+
validateRequired("indexName", "getTaskWithHTTPInfo", indexName);
|
|
2375
|
+
validateRequired("taskID", "getTaskWithHTTPInfo", taskID);
|
|
2376
|
+
const requestPath = "/1/indexes/{indexName}/task/{taskID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{taskID}", encodeURIComponent(taskID));
|
|
1328
2377
|
const headers = {};
|
|
1329
2378
|
const queryParameters = {};
|
|
1330
|
-
if (getVersion !== void 0) {
|
|
1331
|
-
queryParameters["getVersion"] = getVersion.toString();
|
|
1332
|
-
}
|
|
1333
2379
|
const request = {
|
|
1334
2380
|
method: "GET",
|
|
1335
2381
|
path: requestPath,
|
|
1336
2382
|
queryParameters,
|
|
1337
2383
|
headers
|
|
1338
2384
|
};
|
|
1339
|
-
return transporter.
|
|
2385
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1340
2386
|
},
|
|
1341
2387
|
/**
|
|
1342
|
-
*
|
|
2388
|
+
* 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.
|
|
1343
2389
|
*
|
|
1344
2390
|
* Required API Key ACLs:
|
|
1345
2391
|
* - admin
|
|
2392
|
+
*
|
|
2393
|
+
* @deprecated
|
|
1346
2394
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1347
2395
|
*/
|
|
1348
|
-
|
|
1349
|
-
const requestPath = "/1/
|
|
2396
|
+
getTopUserIds(requestOptions) {
|
|
2397
|
+
const requestPath = "/1/clusters/mapping/top";
|
|
1350
2398
|
const headers = {};
|
|
1351
2399
|
const queryParameters = {};
|
|
1352
2400
|
const request = {
|
|
@@ -1358,19 +2406,19 @@ function createSearchClient({
|
|
|
1358
2406
|
return transporter.request(request, requestOptions);
|
|
1359
2407
|
},
|
|
1360
2408
|
/**
|
|
1361
|
-
*
|
|
2409
|
+
* 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.
|
|
2410
|
+
*
|
|
2411
|
+
* 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.
|
|
1362
2412
|
*
|
|
1363
2413
|
* Required API Key ACLs:
|
|
1364
|
-
* -
|
|
1365
|
-
*
|
|
1366
|
-
* @
|
|
1367
|
-
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
2414
|
+
* - admin
|
|
2415
|
+
*
|
|
2416
|
+
* @deprecated
|
|
1368
2417
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2418
|
+
* @see getTopUserIds for the plain version.
|
|
1369
2419
|
*/
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
validateRequired("objectID", "getSynonym", objectID);
|
|
1373
|
-
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2420
|
+
getTopUserIdsWithHTTPInfo(requestOptions) {
|
|
2421
|
+
const requestPath = "/1/clusters/mapping/top";
|
|
1374
2422
|
const headers = {};
|
|
1375
2423
|
const queryParameters = {};
|
|
1376
2424
|
const request = {
|
|
@@ -1379,22 +2427,22 @@ function createSearchClient({
|
|
|
1379
2427
|
queryParameters,
|
|
1380
2428
|
headers
|
|
1381
2429
|
};
|
|
1382
|
-
return transporter.
|
|
2430
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1383
2431
|
},
|
|
1384
2432
|
/**
|
|
1385
|
-
*
|
|
2433
|
+
* 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.
|
|
1386
2434
|
*
|
|
1387
2435
|
* Required API Key ACLs:
|
|
1388
|
-
* -
|
|
1389
|
-
*
|
|
1390
|
-
* @
|
|
1391
|
-
* @param
|
|
2436
|
+
* - admin
|
|
2437
|
+
*
|
|
2438
|
+
* @deprecated
|
|
2439
|
+
* @param getUserId - The getUserId object.
|
|
2440
|
+
* @param getUserId.userID - Unique identifier of the user who makes the search request.
|
|
1392
2441
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1393
2442
|
*/
|
|
1394
|
-
|
|
1395
|
-
validateRequired("
|
|
1396
|
-
|
|
1397
|
-
const requestPath = "/1/indexes/{indexName}/task/{taskID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{taskID}", encodeURIComponent(taskID));
|
|
2443
|
+
getUserId({ userID }, requestOptions) {
|
|
2444
|
+
validateRequired("userID", "getUserId", userID);
|
|
2445
|
+
const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
|
|
1398
2446
|
const headers = {};
|
|
1399
2447
|
const queryParameters = {};
|
|
1400
2448
|
const request = {
|
|
@@ -1406,16 +2454,22 @@ function createSearchClient({
|
|
|
1406
2454
|
return transporter.request(request, requestOptions);
|
|
1407
2455
|
},
|
|
1408
2456
|
/**
|
|
1409
|
-
*
|
|
2457
|
+
* 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.
|
|
2458
|
+
*
|
|
2459
|
+
* 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.
|
|
1410
2460
|
*
|
|
1411
2461
|
* Required API Key ACLs:
|
|
1412
2462
|
* - admin
|
|
1413
2463
|
*
|
|
1414
2464
|
* @deprecated
|
|
2465
|
+
* @param getUserId - The getUserId object.
|
|
2466
|
+
* @param getUserId.userID - Unique identifier of the user who makes the search request.
|
|
1415
2467
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2468
|
+
* @see getUserId for the plain version.
|
|
1416
2469
|
*/
|
|
1417
|
-
|
|
1418
|
-
|
|
2470
|
+
getUserIdWithHTTPInfo({ userID }, requestOptions) {
|
|
2471
|
+
validateRequired("userID", "getUserIdWithHTTPInfo", userID);
|
|
2472
|
+
const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
|
|
1419
2473
|
const headers = {};
|
|
1420
2474
|
const queryParameters = {};
|
|
1421
2475
|
const request = {
|
|
@@ -1424,24 +2478,26 @@ function createSearchClient({
|
|
|
1424
2478
|
queryParameters,
|
|
1425
2479
|
headers
|
|
1426
2480
|
};
|
|
1427
|
-
return transporter.
|
|
2481
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1428
2482
|
},
|
|
1429
2483
|
/**
|
|
1430
|
-
*
|
|
2484
|
+
* 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.
|
|
1431
2485
|
*
|
|
1432
2486
|
* Required API Key ACLs:
|
|
1433
2487
|
* - admin
|
|
1434
2488
|
*
|
|
1435
2489
|
* @deprecated
|
|
1436
|
-
* @param
|
|
1437
|
-
* @param
|
|
2490
|
+
* @param hasPendingMappings - The hasPendingMappings object.
|
|
2491
|
+
* @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
|
|
1438
2492
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1439
2493
|
*/
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
|
|
2494
|
+
hasPendingMappings({ getClusters } = {}, requestOptions = void 0) {
|
|
2495
|
+
const requestPath = "/1/clusters/mapping/pending";
|
|
1443
2496
|
const headers = {};
|
|
1444
2497
|
const queryParameters = {};
|
|
2498
|
+
if (getClusters !== void 0) {
|
|
2499
|
+
queryParameters["getClusters"] = getClusters.toString();
|
|
2500
|
+
}
|
|
1445
2501
|
const request = {
|
|
1446
2502
|
method: "GET",
|
|
1447
2503
|
path: requestPath,
|
|
@@ -1453,6 +2509,8 @@ function createSearchClient({
|
|
|
1453
2509
|
/**
|
|
1454
2510
|
* 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.
|
|
1455
2511
|
*
|
|
2512
|
+
* 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.
|
|
2513
|
+
*
|
|
1456
2514
|
* Required API Key ACLs:
|
|
1457
2515
|
* - admin
|
|
1458
2516
|
*
|
|
@@ -1460,8 +2518,9 @@ function createSearchClient({
|
|
|
1460
2518
|
* @param hasPendingMappings - The hasPendingMappings object.
|
|
1461
2519
|
* @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
|
|
1462
2520
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2521
|
+
* @see hasPendingMappings for the plain version.
|
|
1463
2522
|
*/
|
|
1464
|
-
|
|
2523
|
+
hasPendingMappingsWithHTTPInfo({ getClusters } = {}, requestOptions = void 0) {
|
|
1465
2524
|
const requestPath = "/1/clusters/mapping/pending";
|
|
1466
2525
|
const headers = {};
|
|
1467
2526
|
const queryParameters = {};
|
|
@@ -1474,7 +2533,7 @@ function createSearchClient({
|
|
|
1474
2533
|
queryParameters,
|
|
1475
2534
|
headers
|
|
1476
2535
|
};
|
|
1477
|
-
return transporter.
|
|
2536
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1478
2537
|
},
|
|
1479
2538
|
/**
|
|
1480
2539
|
* Lists all API keys associated with your Algolia application, including their permissions and restrictions.
|
|
@@ -1495,6 +2554,28 @@ function createSearchClient({
|
|
|
1495
2554
|
};
|
|
1496
2555
|
return transporter.request(request, requestOptions);
|
|
1497
2556
|
},
|
|
2557
|
+
/**
|
|
2558
|
+
* Lists all API keys associated with your Algolia application, including their permissions and restrictions.
|
|
2559
|
+
*
|
|
2560
|
+
* 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.
|
|
2561
|
+
*
|
|
2562
|
+
* Required API Key ACLs:
|
|
2563
|
+
* - admin
|
|
2564
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2565
|
+
* @see listApiKeys for the plain version.
|
|
2566
|
+
*/
|
|
2567
|
+
listApiKeysWithHTTPInfo(requestOptions) {
|
|
2568
|
+
const requestPath = "/1/keys";
|
|
2569
|
+
const headers = {};
|
|
2570
|
+
const queryParameters = {};
|
|
2571
|
+
const request = {
|
|
2572
|
+
method: "GET",
|
|
2573
|
+
path: requestPath,
|
|
2574
|
+
queryParameters,
|
|
2575
|
+
headers
|
|
2576
|
+
};
|
|
2577
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2578
|
+
},
|
|
1498
2579
|
/**
|
|
1499
2580
|
* Lists the available clusters in a multi-cluster setup.
|
|
1500
2581
|
*
|
|
@@ -1516,6 +2597,30 @@ function createSearchClient({
|
|
|
1516
2597
|
};
|
|
1517
2598
|
return transporter.request(request, requestOptions);
|
|
1518
2599
|
},
|
|
2600
|
+
/**
|
|
2601
|
+
* Lists the available clusters in a multi-cluster setup.
|
|
2602
|
+
*
|
|
2603
|
+
* 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.
|
|
2604
|
+
*
|
|
2605
|
+
* Required API Key ACLs:
|
|
2606
|
+
* - admin
|
|
2607
|
+
*
|
|
2608
|
+
* @deprecated
|
|
2609
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2610
|
+
* @see listClusters for the plain version.
|
|
2611
|
+
*/
|
|
2612
|
+
listClustersWithHTTPInfo(requestOptions) {
|
|
2613
|
+
const requestPath = "/1/clusters";
|
|
2614
|
+
const headers = {};
|
|
2615
|
+
const queryParameters = {};
|
|
2616
|
+
const request = {
|
|
2617
|
+
method: "GET",
|
|
2618
|
+
path: requestPath,
|
|
2619
|
+
queryParameters,
|
|
2620
|
+
headers
|
|
2621
|
+
};
|
|
2622
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2623
|
+
},
|
|
1519
2624
|
/**
|
|
1520
2625
|
* Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
|
|
1521
2626
|
*
|
|
@@ -1544,6 +2649,37 @@ function createSearchClient({
|
|
|
1544
2649
|
};
|
|
1545
2650
|
return transporter.request(request, requestOptions);
|
|
1546
2651
|
},
|
|
2652
|
+
/**
|
|
2653
|
+
* Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
|
|
2654
|
+
*
|
|
2655
|
+
* 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.
|
|
2656
|
+
*
|
|
2657
|
+
* Required API Key ACLs:
|
|
2658
|
+
* - listIndexes
|
|
2659
|
+
* @param listIndices - The listIndices object.
|
|
2660
|
+
* @param listIndices.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
2661
|
+
* @param listIndices.hitsPerPage - Number of hits per page.
|
|
2662
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2663
|
+
* @see listIndices for the plain version.
|
|
2664
|
+
*/
|
|
2665
|
+
listIndicesWithHTTPInfo({ page, hitsPerPage } = {}, requestOptions = void 0) {
|
|
2666
|
+
const requestPath = "/1/indexes";
|
|
2667
|
+
const headers = {};
|
|
2668
|
+
const queryParameters = {};
|
|
2669
|
+
if (page !== void 0) {
|
|
2670
|
+
queryParameters["page"] = page.toString();
|
|
2671
|
+
}
|
|
2672
|
+
if (hitsPerPage !== void 0) {
|
|
2673
|
+
queryParameters["hitsPerPage"] = hitsPerPage.toString();
|
|
2674
|
+
}
|
|
2675
|
+
const request = {
|
|
2676
|
+
method: "GET",
|
|
2677
|
+
path: requestPath,
|
|
2678
|
+
queryParameters,
|
|
2679
|
+
headers
|
|
2680
|
+
};
|
|
2681
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2682
|
+
},
|
|
1547
2683
|
/**
|
|
1548
2684
|
* 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.
|
|
1549
2685
|
*
|
|
@@ -1574,6 +2710,39 @@ function createSearchClient({
|
|
|
1574
2710
|
};
|
|
1575
2711
|
return transporter.request(request, requestOptions);
|
|
1576
2712
|
},
|
|
2713
|
+
/**
|
|
2714
|
+
* 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.
|
|
2715
|
+
*
|
|
2716
|
+
* 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.
|
|
2717
|
+
*
|
|
2718
|
+
* Required API Key ACLs:
|
|
2719
|
+
* - admin
|
|
2720
|
+
*
|
|
2721
|
+
* @deprecated
|
|
2722
|
+
* @param listUserIds - The listUserIds object.
|
|
2723
|
+
* @param listUserIds.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
2724
|
+
* @param listUserIds.hitsPerPage - Number of hits per page.
|
|
2725
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2726
|
+
* @see listUserIds for the plain version.
|
|
2727
|
+
*/
|
|
2728
|
+
listUserIdsWithHTTPInfo({ page, hitsPerPage } = {}, requestOptions = void 0) {
|
|
2729
|
+
const requestPath = "/1/clusters/mapping";
|
|
2730
|
+
const headers = {};
|
|
2731
|
+
const queryParameters = {};
|
|
2732
|
+
if (page !== void 0) {
|
|
2733
|
+
queryParameters["page"] = page.toString();
|
|
2734
|
+
}
|
|
2735
|
+
if (hitsPerPage !== void 0) {
|
|
2736
|
+
queryParameters["hitsPerPage"] = hitsPerPage.toString();
|
|
2737
|
+
}
|
|
2738
|
+
const request = {
|
|
2739
|
+
method: "GET",
|
|
2740
|
+
path: requestPath,
|
|
2741
|
+
queryParameters,
|
|
2742
|
+
headers
|
|
2743
|
+
};
|
|
2744
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2745
|
+
},
|
|
1577
2746
|
/**
|
|
1578
2747
|
* 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).
|
|
1579
2748
|
*
|
|
@@ -1597,6 +2766,32 @@ function createSearchClient({
|
|
|
1597
2766
|
};
|
|
1598
2767
|
return transporter.request(request, requestOptions);
|
|
1599
2768
|
},
|
|
2769
|
+
/**
|
|
2770
|
+
* 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).
|
|
2771
|
+
*
|
|
2772
|
+
* 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.
|
|
2773
|
+
*
|
|
2774
|
+
* Required API Key ACLs:
|
|
2775
|
+
* - addObject
|
|
2776
|
+
* @param batchParams - The batchParams object.
|
|
2777
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2778
|
+
* @see multipleBatch for the plain version.
|
|
2779
|
+
*/
|
|
2780
|
+
multipleBatchWithHTTPInfo(batchParams, requestOptions) {
|
|
2781
|
+
validateRequired("batchParams", "multipleBatchWithHTTPInfo", batchParams);
|
|
2782
|
+
validateRequired("batchParams.requests", "multipleBatchWithHTTPInfo", batchParams.requests);
|
|
2783
|
+
const requestPath = "/1/indexes/*/batch";
|
|
2784
|
+
const headers = {};
|
|
2785
|
+
const queryParameters = {};
|
|
2786
|
+
const request = {
|
|
2787
|
+
method: "POST",
|
|
2788
|
+
path: requestPath,
|
|
2789
|
+
queryParameters,
|
|
2790
|
+
headers,
|
|
2791
|
+
data: batchParams
|
|
2792
|
+
};
|
|
2793
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2794
|
+
},
|
|
1600
2795
|
/**
|
|
1601
2796
|
* 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).
|
|
1602
2797
|
*
|
|
@@ -1620,13 +2815,80 @@ function createSearchClient({
|
|
|
1620
2815
|
path: requestPath,
|
|
1621
2816
|
queryParameters,
|
|
1622
2817
|
headers,
|
|
1623
|
-
data: operationIndexParams
|
|
2818
|
+
data: operationIndexParams
|
|
2819
|
+
};
|
|
2820
|
+
return transporter.request(request, requestOptions);
|
|
2821
|
+
},
|
|
2822
|
+
/**
|
|
2823
|
+
* 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).
|
|
2824
|
+
*
|
|
2825
|
+
* 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.
|
|
2826
|
+
*
|
|
2827
|
+
* Required API Key ACLs:
|
|
2828
|
+
* - addObject
|
|
2829
|
+
* @param operationIndex - The operationIndex object.
|
|
2830
|
+
* @param operationIndex.indexName - Name of the index on which to perform the operation.
|
|
2831
|
+
* @param operationIndex.operationIndexParams - The operationIndexParams object.
|
|
2832
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2833
|
+
* @see operationIndex for the plain version.
|
|
2834
|
+
*/
|
|
2835
|
+
operationIndexWithHTTPInfo({ indexName, operationIndexParams }, requestOptions) {
|
|
2836
|
+
validateRequired("indexName", "operationIndexWithHTTPInfo", indexName);
|
|
2837
|
+
validateRequired("operationIndexParams", "operationIndexWithHTTPInfo", operationIndexParams);
|
|
2838
|
+
validateRequired("operationIndexParams.operation", "operationIndexWithHTTPInfo", operationIndexParams.operation);
|
|
2839
|
+
validateRequired(
|
|
2840
|
+
"operationIndexParams.destination",
|
|
2841
|
+
"operationIndexWithHTTPInfo",
|
|
2842
|
+
operationIndexParams.destination
|
|
2843
|
+
);
|
|
2844
|
+
const requestPath = "/1/indexes/{indexName}/operation".replace("{indexName}", encodeURIComponent(indexName));
|
|
2845
|
+
const headers = {};
|
|
2846
|
+
const queryParameters = {};
|
|
2847
|
+
const request = {
|
|
2848
|
+
method: "POST",
|
|
2849
|
+
path: requestPath,
|
|
2850
|
+
queryParameters,
|
|
2851
|
+
headers,
|
|
2852
|
+
data: operationIndexParams
|
|
2853
|
+
};
|
|
2854
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2855
|
+
},
|
|
2856
|
+
/**
|
|
2857
|
+
* 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).
|
|
2858
|
+
*
|
|
2859
|
+
* Required API Key ACLs:
|
|
2860
|
+
* - addObject
|
|
2861
|
+
* @param partialUpdateObject - The partialUpdateObject object.
|
|
2862
|
+
* @param partialUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
2863
|
+
* @param partialUpdateObject.objectID - Unique record identifier.
|
|
2864
|
+
* @param partialUpdateObject.attributesToUpdate - Attributes with their values.
|
|
2865
|
+
* @param partialUpdateObject.createIfNotExists - Whether to create a new record if it doesn\'t exist.
|
|
2866
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2867
|
+
*/
|
|
2868
|
+
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists }, requestOptions) {
|
|
2869
|
+
validateRequired("indexName", "partialUpdateObject", indexName);
|
|
2870
|
+
validateRequired("objectID", "partialUpdateObject", objectID);
|
|
2871
|
+
validateRequired("attributesToUpdate", "partialUpdateObject", attributesToUpdate);
|
|
2872
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2873
|
+
const headers = {};
|
|
2874
|
+
const queryParameters = {};
|
|
2875
|
+
if (createIfNotExists !== void 0) {
|
|
2876
|
+
queryParameters["createIfNotExists"] = createIfNotExists.toString();
|
|
2877
|
+
}
|
|
2878
|
+
const request = {
|
|
2879
|
+
method: "POST",
|
|
2880
|
+
path: requestPath,
|
|
2881
|
+
queryParameters,
|
|
2882
|
+
headers,
|
|
2883
|
+
data: attributesToUpdate
|
|
1624
2884
|
};
|
|
1625
2885
|
return transporter.request(request, requestOptions);
|
|
1626
2886
|
},
|
|
1627
2887
|
/**
|
|
1628
2888
|
* 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).
|
|
1629
2889
|
*
|
|
2890
|
+
* 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.
|
|
2891
|
+
*
|
|
1630
2892
|
* Required API Key ACLs:
|
|
1631
2893
|
* - addObject
|
|
1632
2894
|
* @param partialUpdateObject - The partialUpdateObject object.
|
|
@@ -1635,11 +2897,12 @@ function createSearchClient({
|
|
|
1635
2897
|
* @param partialUpdateObject.attributesToUpdate - Attributes with their values.
|
|
1636
2898
|
* @param partialUpdateObject.createIfNotExists - Whether to create a new record if it doesn\'t exist.
|
|
1637
2899
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2900
|
+
* @see partialUpdateObject for the plain version.
|
|
1638
2901
|
*/
|
|
1639
|
-
|
|
1640
|
-
validateRequired("indexName", "
|
|
1641
|
-
validateRequired("objectID", "
|
|
1642
|
-
validateRequired("attributesToUpdate", "
|
|
2902
|
+
partialUpdateObjectWithHTTPInfo({ indexName, objectID, attributesToUpdate, createIfNotExists }, requestOptions) {
|
|
2903
|
+
validateRequired("indexName", "partialUpdateObjectWithHTTPInfo", indexName);
|
|
2904
|
+
validateRequired("objectID", "partialUpdateObjectWithHTTPInfo", objectID);
|
|
2905
|
+
validateRequired("attributesToUpdate", "partialUpdateObjectWithHTTPInfo", attributesToUpdate);
|
|
1643
2906
|
const requestPath = "/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1644
2907
|
const headers = {};
|
|
1645
2908
|
const queryParameters = {};
|
|
@@ -1653,7 +2916,7 @@ function createSearchClient({
|
|
|
1653
2916
|
headers,
|
|
1654
2917
|
data: attributesToUpdate
|
|
1655
2918
|
};
|
|
1656
|
-
return transporter.
|
|
2919
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1657
2920
|
},
|
|
1658
2921
|
/**
|
|
1659
2922
|
* Deletes a user ID and its associated data from the clusters.
|
|
@@ -1679,6 +2942,33 @@ function createSearchClient({
|
|
|
1679
2942
|
};
|
|
1680
2943
|
return transporter.request(request, requestOptions);
|
|
1681
2944
|
},
|
|
2945
|
+
/**
|
|
2946
|
+
* Deletes a user ID and its associated data from the clusters.
|
|
2947
|
+
*
|
|
2948
|
+
* 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.
|
|
2949
|
+
*
|
|
2950
|
+
* Required API Key ACLs:
|
|
2951
|
+
* - admin
|
|
2952
|
+
*
|
|
2953
|
+
* @deprecated
|
|
2954
|
+
* @param removeUserId - The removeUserId object.
|
|
2955
|
+
* @param removeUserId.userID - Unique identifier of the user who makes the search request.
|
|
2956
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2957
|
+
* @see removeUserId for the plain version.
|
|
2958
|
+
*/
|
|
2959
|
+
removeUserIdWithHTTPInfo({ userID }, requestOptions) {
|
|
2960
|
+
validateRequired("userID", "removeUserIdWithHTTPInfo", userID);
|
|
2961
|
+
const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
|
|
2962
|
+
const headers = {};
|
|
2963
|
+
const queryParameters = {};
|
|
2964
|
+
const request = {
|
|
2965
|
+
method: "DELETE",
|
|
2966
|
+
path: requestPath,
|
|
2967
|
+
queryParameters,
|
|
2968
|
+
headers
|
|
2969
|
+
};
|
|
2970
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2971
|
+
},
|
|
1682
2972
|
/**
|
|
1683
2973
|
* Replaces the list of allowed sources.
|
|
1684
2974
|
*
|
|
@@ -1702,6 +2992,32 @@ function createSearchClient({
|
|
|
1702
2992
|
};
|
|
1703
2993
|
return transporter.request(request, requestOptions);
|
|
1704
2994
|
},
|
|
2995
|
+
/**
|
|
2996
|
+
* Replaces the list of allowed sources.
|
|
2997
|
+
*
|
|
2998
|
+
* 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.
|
|
2999
|
+
*
|
|
3000
|
+
* Required API Key ACLs:
|
|
3001
|
+
* - admin
|
|
3002
|
+
* @param replaceSources - The replaceSources object.
|
|
3003
|
+
* @param replaceSources.source - Allowed sources.
|
|
3004
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3005
|
+
* @see replaceSources for the plain version.
|
|
3006
|
+
*/
|
|
3007
|
+
replaceSourcesWithHTTPInfo({ source }, requestOptions) {
|
|
3008
|
+
validateRequired("source", "replaceSourcesWithHTTPInfo", source);
|
|
3009
|
+
const requestPath = "/1/security/sources";
|
|
3010
|
+
const headers = {};
|
|
3011
|
+
const queryParameters = {};
|
|
3012
|
+
const request = {
|
|
3013
|
+
method: "PUT",
|
|
3014
|
+
path: requestPath,
|
|
3015
|
+
queryParameters,
|
|
3016
|
+
headers,
|
|
3017
|
+
data: source
|
|
3018
|
+
};
|
|
3019
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3020
|
+
},
|
|
1705
3021
|
/**
|
|
1706
3022
|
* 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.
|
|
1707
3023
|
*
|
|
@@ -1724,6 +3040,31 @@ function createSearchClient({
|
|
|
1724
3040
|
};
|
|
1725
3041
|
return transporter.request(request, requestOptions);
|
|
1726
3042
|
},
|
|
3043
|
+
/**
|
|
3044
|
+
* 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.
|
|
3045
|
+
*
|
|
3046
|
+
* 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.
|
|
3047
|
+
*
|
|
3048
|
+
* Required API Key ACLs:
|
|
3049
|
+
* - admin
|
|
3050
|
+
* @param restoreApiKey - The restoreApiKey object.
|
|
3051
|
+
* @param restoreApiKey.key - API key.
|
|
3052
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3053
|
+
* @see restoreApiKey for the plain version.
|
|
3054
|
+
*/
|
|
3055
|
+
restoreApiKeyWithHTTPInfo({ key }, requestOptions) {
|
|
3056
|
+
validateRequired("key", "restoreApiKeyWithHTTPInfo", key);
|
|
3057
|
+
const requestPath = "/1/keys/{key}/restore".replace("{key}", encodeURIComponent(key));
|
|
3058
|
+
const headers = {};
|
|
3059
|
+
const queryParameters = {};
|
|
3060
|
+
const request = {
|
|
3061
|
+
method: "POST",
|
|
3062
|
+
path: requestPath,
|
|
3063
|
+
queryParameters,
|
|
3064
|
+
headers
|
|
3065
|
+
};
|
|
3066
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3067
|
+
},
|
|
1727
3068
|
/**
|
|
1728
3069
|
* 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).
|
|
1729
3070
|
*
|
|
@@ -1749,6 +3090,34 @@ function createSearchClient({
|
|
|
1749
3090
|
};
|
|
1750
3091
|
return transporter.request(request, requestOptions);
|
|
1751
3092
|
},
|
|
3093
|
+
/**
|
|
3094
|
+
* 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).
|
|
3095
|
+
*
|
|
3096
|
+
* 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.
|
|
3097
|
+
*
|
|
3098
|
+
* Required API Key ACLs:
|
|
3099
|
+
* - addObject
|
|
3100
|
+
* @param saveObject - The saveObject object.
|
|
3101
|
+
* @param saveObject.indexName - Name of the index on which to perform the operation.
|
|
3102
|
+
* @param saveObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
3103
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3104
|
+
* @see saveObject for the plain version.
|
|
3105
|
+
*/
|
|
3106
|
+
saveObjectWithHTTPInfo({ indexName, body }, requestOptions) {
|
|
3107
|
+
validateRequired("indexName", "saveObjectWithHTTPInfo", indexName);
|
|
3108
|
+
validateRequired("body", "saveObjectWithHTTPInfo", body);
|
|
3109
|
+
const requestPath = "/1/indexes/{indexName}".replace("{indexName}", encodeURIComponent(indexName));
|
|
3110
|
+
const headers = {};
|
|
3111
|
+
const queryParameters = {};
|
|
3112
|
+
const request = {
|
|
3113
|
+
method: "POST",
|
|
3114
|
+
path: requestPath,
|
|
3115
|
+
queryParameters,
|
|
3116
|
+
headers,
|
|
3117
|
+
data: body
|
|
3118
|
+
};
|
|
3119
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3120
|
+
},
|
|
1752
3121
|
/**
|
|
1753
3122
|
* 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).
|
|
1754
3123
|
*
|
|
@@ -1782,6 +3151,42 @@ function createSearchClient({
|
|
|
1782
3151
|
};
|
|
1783
3152
|
return transporter.request(request, requestOptions);
|
|
1784
3153
|
},
|
|
3154
|
+
/**
|
|
3155
|
+
* 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).
|
|
3156
|
+
*
|
|
3157
|
+
* 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.
|
|
3158
|
+
*
|
|
3159
|
+
* Required API Key ACLs:
|
|
3160
|
+
* - editSettings
|
|
3161
|
+
* @param saveRule - The saveRule object.
|
|
3162
|
+
* @param saveRule.indexName - Name of the index on which to perform the operation.
|
|
3163
|
+
* @param saveRule.objectID - Unique identifier of a rule object.
|
|
3164
|
+
* @param saveRule.rule - The rule object.
|
|
3165
|
+
* @param saveRule.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3166
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3167
|
+
* @see saveRule for the plain version.
|
|
3168
|
+
*/
|
|
3169
|
+
saveRuleWithHTTPInfo({ indexName, objectID, rule, forwardToReplicas }, requestOptions) {
|
|
3170
|
+
validateRequired("indexName", "saveRuleWithHTTPInfo", indexName);
|
|
3171
|
+
validateRequired("objectID", "saveRuleWithHTTPInfo", objectID);
|
|
3172
|
+
validateRequired("rule", "saveRuleWithHTTPInfo", rule);
|
|
3173
|
+
validateRequired("rule.objectID", "saveRuleWithHTTPInfo", rule.objectID);
|
|
3174
|
+
validateRequired("rule.consequence", "saveRuleWithHTTPInfo", rule.consequence);
|
|
3175
|
+
const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
3176
|
+
const headers = {};
|
|
3177
|
+
const queryParameters = {};
|
|
3178
|
+
if (forwardToReplicas !== void 0) {
|
|
3179
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3180
|
+
}
|
|
3181
|
+
const request = {
|
|
3182
|
+
method: "PUT",
|
|
3183
|
+
path: requestPath,
|
|
3184
|
+
queryParameters,
|
|
3185
|
+
headers,
|
|
3186
|
+
data: rule
|
|
3187
|
+
};
|
|
3188
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3189
|
+
},
|
|
1785
3190
|
/**
|
|
1786
3191
|
* 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).
|
|
1787
3192
|
*
|
|
@@ -1815,6 +3220,42 @@ function createSearchClient({
|
|
|
1815
3220
|
};
|
|
1816
3221
|
return transporter.request(request, requestOptions);
|
|
1817
3222
|
},
|
|
3223
|
+
/**
|
|
3224
|
+
* 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).
|
|
3225
|
+
*
|
|
3226
|
+
* 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.
|
|
3227
|
+
*
|
|
3228
|
+
* Required API Key ACLs:
|
|
3229
|
+
* - editSettings
|
|
3230
|
+
* @param saveRules - The saveRules object.
|
|
3231
|
+
* @param saveRules.indexName - Name of the index on which to perform the operation.
|
|
3232
|
+
* @param saveRules.rules - The rules object.
|
|
3233
|
+
* @param saveRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3234
|
+
* @param saveRules.clearExistingRules - Whether existing rules should be deleted before adding this batch.
|
|
3235
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3236
|
+
* @see saveRules for the plain version.
|
|
3237
|
+
*/
|
|
3238
|
+
saveRulesWithHTTPInfo({ indexName, rules, forwardToReplicas, clearExistingRules }, requestOptions) {
|
|
3239
|
+
validateRequired("indexName", "saveRulesWithHTTPInfo", indexName);
|
|
3240
|
+
validateRequired("rules", "saveRulesWithHTTPInfo", rules);
|
|
3241
|
+
const requestPath = "/1/indexes/{indexName}/rules/batch".replace("{indexName}", encodeURIComponent(indexName));
|
|
3242
|
+
const headers = {};
|
|
3243
|
+
const queryParameters = {};
|
|
3244
|
+
if (forwardToReplicas !== void 0) {
|
|
3245
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3246
|
+
}
|
|
3247
|
+
if (clearExistingRules !== void 0) {
|
|
3248
|
+
queryParameters["clearExistingRules"] = clearExistingRules.toString();
|
|
3249
|
+
}
|
|
3250
|
+
const request = {
|
|
3251
|
+
method: "POST",
|
|
3252
|
+
path: requestPath,
|
|
3253
|
+
queryParameters,
|
|
3254
|
+
headers,
|
|
3255
|
+
data: rules
|
|
3256
|
+
};
|
|
3257
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3258
|
+
},
|
|
1818
3259
|
/**
|
|
1819
3260
|
* 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).
|
|
1820
3261
|
*
|
|
@@ -1848,6 +3289,42 @@ function createSearchClient({
|
|
|
1848
3289
|
};
|
|
1849
3290
|
return transporter.request(request, requestOptions);
|
|
1850
3291
|
},
|
|
3292
|
+
/**
|
|
3293
|
+
* 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).
|
|
3294
|
+
*
|
|
3295
|
+
* 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.
|
|
3296
|
+
*
|
|
3297
|
+
* Required API Key ACLs:
|
|
3298
|
+
* - editSettings
|
|
3299
|
+
* @param saveSynonym - The saveSynonym object.
|
|
3300
|
+
* @param saveSynonym.indexName - Name of the index on which to perform the operation.
|
|
3301
|
+
* @param saveSynonym.objectID - Unique identifier of a synonym object.
|
|
3302
|
+
* @param saveSynonym.synonymHit - The synonymHit object.
|
|
3303
|
+
* @param saveSynonym.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3304
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3305
|
+
* @see saveSynonym for the plain version.
|
|
3306
|
+
*/
|
|
3307
|
+
saveSynonymWithHTTPInfo({ indexName, objectID, synonymHit, forwardToReplicas }, requestOptions) {
|
|
3308
|
+
validateRequired("indexName", "saveSynonymWithHTTPInfo", indexName);
|
|
3309
|
+
validateRequired("objectID", "saveSynonymWithHTTPInfo", objectID);
|
|
3310
|
+
validateRequired("synonymHit", "saveSynonymWithHTTPInfo", synonymHit);
|
|
3311
|
+
validateRequired("synonymHit.objectID", "saveSynonymWithHTTPInfo", synonymHit.objectID);
|
|
3312
|
+
validateRequired("synonymHit.type", "saveSynonymWithHTTPInfo", synonymHit.type);
|
|
3313
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
3314
|
+
const headers = {};
|
|
3315
|
+
const queryParameters = {};
|
|
3316
|
+
if (forwardToReplicas !== void 0) {
|
|
3317
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3318
|
+
}
|
|
3319
|
+
const request = {
|
|
3320
|
+
method: "PUT",
|
|
3321
|
+
path: requestPath,
|
|
3322
|
+
queryParameters,
|
|
3323
|
+
headers,
|
|
3324
|
+
data: synonymHit
|
|
3325
|
+
};
|
|
3326
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3327
|
+
},
|
|
1851
3328
|
/**
|
|
1852
3329
|
* 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).
|
|
1853
3330
|
*
|
|
@@ -1881,6 +3358,42 @@ function createSearchClient({
|
|
|
1881
3358
|
};
|
|
1882
3359
|
return transporter.request(request, requestOptions);
|
|
1883
3360
|
},
|
|
3361
|
+
/**
|
|
3362
|
+
* 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).
|
|
3363
|
+
*
|
|
3364
|
+
* 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.
|
|
3365
|
+
*
|
|
3366
|
+
* Required API Key ACLs:
|
|
3367
|
+
* - editSettings
|
|
3368
|
+
* @param saveSynonyms - The saveSynonyms object.
|
|
3369
|
+
* @param saveSynonyms.indexName - Name of the index on which to perform the operation.
|
|
3370
|
+
* @param saveSynonyms.synonymHit - The synonymHit object.
|
|
3371
|
+
* @param saveSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3372
|
+
* @param saveSynonyms.replaceExistingSynonyms - Whether to replace all synonyms in the index with the ones sent with this request.
|
|
3373
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3374
|
+
* @see saveSynonyms for the plain version.
|
|
3375
|
+
*/
|
|
3376
|
+
saveSynonymsWithHTTPInfo({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms }, requestOptions) {
|
|
3377
|
+
validateRequired("indexName", "saveSynonymsWithHTTPInfo", indexName);
|
|
3378
|
+
validateRequired("synonymHit", "saveSynonymsWithHTTPInfo", synonymHit);
|
|
3379
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/batch".replace("{indexName}", encodeURIComponent(indexName));
|
|
3380
|
+
const headers = {};
|
|
3381
|
+
const queryParameters = {};
|
|
3382
|
+
if (forwardToReplicas !== void 0) {
|
|
3383
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3384
|
+
}
|
|
3385
|
+
if (replaceExistingSynonyms !== void 0) {
|
|
3386
|
+
queryParameters["replaceExistingSynonyms"] = replaceExistingSynonyms.toString();
|
|
3387
|
+
}
|
|
3388
|
+
const request = {
|
|
3389
|
+
method: "POST",
|
|
3390
|
+
path: requestPath,
|
|
3391
|
+
queryParameters,
|
|
3392
|
+
headers,
|
|
3393
|
+
data: synonymHit
|
|
3394
|
+
};
|
|
3395
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3396
|
+
},
|
|
1884
3397
|
/**
|
|
1885
3398
|
* 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.
|
|
1886
3399
|
*
|
|
@@ -1925,7 +3438,56 @@ function createSearchClient({
|
|
|
1925
3438
|
useReadTransporter: true,
|
|
1926
3439
|
cacheable: true
|
|
1927
3440
|
};
|
|
1928
|
-
return transporter.request(request, requestOptions);
|
|
3441
|
+
return transporter.request(request, requestOptions);
|
|
3442
|
+
},
|
|
3443
|
+
/**
|
|
3444
|
+
* 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.
|
|
3445
|
+
*
|
|
3446
|
+
* 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.
|
|
3447
|
+
*
|
|
3448
|
+
* Required API Key ACLs:
|
|
3449
|
+
* - search
|
|
3450
|
+
* @param searchMethodParams - Multi-query search request body. Results are returned in the same order as the requests.
|
|
3451
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3452
|
+
* @see search for the plain version.
|
|
3453
|
+
*/
|
|
3454
|
+
searchWithHTTPInfo(searchMethodParams, requestOptions) {
|
|
3455
|
+
if (searchMethodParams && Array.isArray(searchMethodParams)) {
|
|
3456
|
+
const newSignatureRequest = {
|
|
3457
|
+
requests: searchMethodParams.map(({ params, ...legacyRequest }) => {
|
|
3458
|
+
if (legacyRequest.type === "facet") {
|
|
3459
|
+
return {
|
|
3460
|
+
...legacyRequest,
|
|
3461
|
+
...params,
|
|
3462
|
+
type: "facet"
|
|
3463
|
+
};
|
|
3464
|
+
}
|
|
3465
|
+
return {
|
|
3466
|
+
...legacyRequest,
|
|
3467
|
+
...params,
|
|
3468
|
+
facet: void 0,
|
|
3469
|
+
maxFacetHits: void 0,
|
|
3470
|
+
facetQuery: void 0
|
|
3471
|
+
};
|
|
3472
|
+
})
|
|
3473
|
+
};
|
|
3474
|
+
searchMethodParams = newSignatureRequest;
|
|
3475
|
+
}
|
|
3476
|
+
validateRequired("searchMethodParams", "searchWithHTTPInfo", searchMethodParams);
|
|
3477
|
+
validateRequired("searchMethodParams.requests", "searchWithHTTPInfo", searchMethodParams.requests);
|
|
3478
|
+
const requestPath = "/1/indexes/*/queries";
|
|
3479
|
+
const headers = {};
|
|
3480
|
+
const queryParameters = {};
|
|
3481
|
+
const request = {
|
|
3482
|
+
method: "POST",
|
|
3483
|
+
path: requestPath,
|
|
3484
|
+
queryParameters,
|
|
3485
|
+
headers,
|
|
3486
|
+
data: searchMethodParams,
|
|
3487
|
+
useReadTransporter: true,
|
|
3488
|
+
cacheable: true
|
|
3489
|
+
};
|
|
3490
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1929
3491
|
},
|
|
1930
3492
|
/**
|
|
1931
3493
|
* Searches for standard and custom dictionary entries.
|
|
@@ -1962,6 +3524,48 @@ function createSearchClient({
|
|
|
1962
3524
|
};
|
|
1963
3525
|
return transporter.request(request, requestOptions);
|
|
1964
3526
|
},
|
|
3527
|
+
/**
|
|
3528
|
+
* Searches for standard and custom dictionary entries.
|
|
3529
|
+
*
|
|
3530
|
+
* 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.
|
|
3531
|
+
*
|
|
3532
|
+
* Required API Key ACLs:
|
|
3533
|
+
* - settings
|
|
3534
|
+
* @param searchDictionaryEntries - The searchDictionaryEntries object.
|
|
3535
|
+
* @param searchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
3536
|
+
* @param searchDictionaryEntries.searchDictionaryEntriesParams - The searchDictionaryEntriesParams object.
|
|
3537
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3538
|
+
* @see searchDictionaryEntries for the plain version.
|
|
3539
|
+
*/
|
|
3540
|
+
searchDictionaryEntriesWithHTTPInfo({ dictionaryName, searchDictionaryEntriesParams }, requestOptions) {
|
|
3541
|
+
validateRequired("dictionaryName", "searchDictionaryEntriesWithHTTPInfo", dictionaryName);
|
|
3542
|
+
validateRequired(
|
|
3543
|
+
"searchDictionaryEntriesParams",
|
|
3544
|
+
"searchDictionaryEntriesWithHTTPInfo",
|
|
3545
|
+
searchDictionaryEntriesParams
|
|
3546
|
+
);
|
|
3547
|
+
validateRequired(
|
|
3548
|
+
"searchDictionaryEntriesParams.query",
|
|
3549
|
+
"searchDictionaryEntriesWithHTTPInfo",
|
|
3550
|
+
searchDictionaryEntriesParams.query
|
|
3551
|
+
);
|
|
3552
|
+
const requestPath = "/1/dictionaries/{dictionaryName}/search".replace(
|
|
3553
|
+
"{dictionaryName}",
|
|
3554
|
+
encodeURIComponent(dictionaryName)
|
|
3555
|
+
);
|
|
3556
|
+
const headers = {};
|
|
3557
|
+
const queryParameters = {};
|
|
3558
|
+
const request = {
|
|
3559
|
+
method: "POST",
|
|
3560
|
+
path: requestPath,
|
|
3561
|
+
queryParameters,
|
|
3562
|
+
headers,
|
|
3563
|
+
data: searchDictionaryEntriesParams,
|
|
3564
|
+
useReadTransporter: true,
|
|
3565
|
+
cacheable: true
|
|
3566
|
+
};
|
|
3567
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3568
|
+
},
|
|
1965
3569
|
/**
|
|
1966
3570
|
* 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**.
|
|
1967
3571
|
*
|
|
@@ -1990,6 +3594,37 @@ function createSearchClient({
|
|
|
1990
3594
|
};
|
|
1991
3595
|
return transporter.request(request, requestOptions);
|
|
1992
3596
|
},
|
|
3597
|
+
/**
|
|
3598
|
+
* 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**.
|
|
3599
|
+
*
|
|
3600
|
+
* 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.
|
|
3601
|
+
*
|
|
3602
|
+
* Required API Key ACLs:
|
|
3603
|
+
* - search
|
|
3604
|
+
* @param searchForFacetValues - The searchForFacetValues object.
|
|
3605
|
+
* @param searchForFacetValues.indexName - Name of the index on which to perform the operation.
|
|
3606
|
+
* @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.
|
|
3607
|
+
* @param searchForFacetValues.searchForFacetValuesRequest - The searchForFacetValuesRequest object.
|
|
3608
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3609
|
+
* @see searchForFacetValues for the plain version.
|
|
3610
|
+
*/
|
|
3611
|
+
searchForFacetValuesWithHTTPInfo({ indexName, facetName, searchForFacetValuesRequest }, requestOptions) {
|
|
3612
|
+
validateRequired("indexName", "searchForFacetValuesWithHTTPInfo", indexName);
|
|
3613
|
+
validateRequired("facetName", "searchForFacetValuesWithHTTPInfo", facetName);
|
|
3614
|
+
const requestPath = "/1/indexes/{indexName}/facets/{facetName}/query".replace("{indexName}", encodeURIComponent(indexName)).replace("{facetName}", encodeURIComponent(facetName));
|
|
3615
|
+
const headers = {};
|
|
3616
|
+
const queryParameters = {};
|
|
3617
|
+
const request = {
|
|
3618
|
+
method: "POST",
|
|
3619
|
+
path: requestPath,
|
|
3620
|
+
queryParameters,
|
|
3621
|
+
headers,
|
|
3622
|
+
data: searchForFacetValuesRequest ? searchForFacetValuesRequest : {},
|
|
3623
|
+
useReadTransporter: true,
|
|
3624
|
+
cacheable: true
|
|
3625
|
+
};
|
|
3626
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3627
|
+
},
|
|
1993
3628
|
/**
|
|
1994
3629
|
* Searches for rules in your index.
|
|
1995
3630
|
*
|
|
@@ -2016,6 +3651,35 @@ function createSearchClient({
|
|
|
2016
3651
|
};
|
|
2017
3652
|
return transporter.request(request, requestOptions);
|
|
2018
3653
|
},
|
|
3654
|
+
/**
|
|
3655
|
+
* Searches for rules in your index.
|
|
3656
|
+
*
|
|
3657
|
+
* 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.
|
|
3658
|
+
*
|
|
3659
|
+
* Required API Key ACLs:
|
|
3660
|
+
* - settings
|
|
3661
|
+
* @param searchRules - The searchRules object.
|
|
3662
|
+
* @param searchRules.indexName - Name of the index on which to perform the operation.
|
|
3663
|
+
* @param searchRules.searchRulesParams - The searchRulesParams object.
|
|
3664
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3665
|
+
* @see searchRules for the plain version.
|
|
3666
|
+
*/
|
|
3667
|
+
searchRulesWithHTTPInfo({ indexName, searchRulesParams }, requestOptions) {
|
|
3668
|
+
validateRequired("indexName", "searchRulesWithHTTPInfo", indexName);
|
|
3669
|
+
const requestPath = "/1/indexes/{indexName}/rules/search".replace("{indexName}", encodeURIComponent(indexName));
|
|
3670
|
+
const headers = {};
|
|
3671
|
+
const queryParameters = {};
|
|
3672
|
+
const request = {
|
|
3673
|
+
method: "POST",
|
|
3674
|
+
path: requestPath,
|
|
3675
|
+
queryParameters,
|
|
3676
|
+
headers,
|
|
3677
|
+
data: searchRulesParams ? searchRulesParams : {},
|
|
3678
|
+
useReadTransporter: true,
|
|
3679
|
+
cacheable: true
|
|
3680
|
+
};
|
|
3681
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3682
|
+
},
|
|
2019
3683
|
/**
|
|
2020
3684
|
* 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.
|
|
2021
3685
|
*
|
|
@@ -2042,6 +3706,35 @@ function createSearchClient({
|
|
|
2042
3706
|
};
|
|
2043
3707
|
return transporter.request(request, requestOptions);
|
|
2044
3708
|
},
|
|
3709
|
+
/**
|
|
3710
|
+
* 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.
|
|
3711
|
+
*
|
|
3712
|
+
* 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.
|
|
3713
|
+
*
|
|
3714
|
+
* Required API Key ACLs:
|
|
3715
|
+
* - search
|
|
3716
|
+
* @param searchSingleIndex - The searchSingleIndex object.
|
|
3717
|
+
* @param searchSingleIndex.indexName - Name of the index on which to perform the operation.
|
|
3718
|
+
* @param searchSingleIndex.searchParams - The searchParams object.
|
|
3719
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3720
|
+
* @see searchSingleIndex for the plain version.
|
|
3721
|
+
*/
|
|
3722
|
+
searchSingleIndexWithHTTPInfo({ indexName, searchParams }, requestOptions) {
|
|
3723
|
+
validateRequired("indexName", "searchSingleIndexWithHTTPInfo", indexName);
|
|
3724
|
+
const requestPath = "/1/indexes/{indexName}/query".replace("{indexName}", encodeURIComponent(indexName));
|
|
3725
|
+
const headers = {};
|
|
3726
|
+
const queryParameters = {};
|
|
3727
|
+
const request = {
|
|
3728
|
+
method: "POST",
|
|
3729
|
+
path: requestPath,
|
|
3730
|
+
queryParameters,
|
|
3731
|
+
headers,
|
|
3732
|
+
data: searchParams ? searchParams : {},
|
|
3733
|
+
useReadTransporter: true,
|
|
3734
|
+
cacheable: true
|
|
3735
|
+
};
|
|
3736
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3737
|
+
},
|
|
2045
3738
|
/**
|
|
2046
3739
|
* Searches for synonyms in your index.
|
|
2047
3740
|
*
|
|
@@ -2071,6 +3764,38 @@ function createSearchClient({
|
|
|
2071
3764
|
};
|
|
2072
3765
|
return transporter.request(request, requestOptions);
|
|
2073
3766
|
},
|
|
3767
|
+
/**
|
|
3768
|
+
* Searches for synonyms in your index.
|
|
3769
|
+
*
|
|
3770
|
+
* 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.
|
|
3771
|
+
*
|
|
3772
|
+
* Required API Key ACLs:
|
|
3773
|
+
* - settings
|
|
3774
|
+
* @param searchSynonyms - The searchSynonyms object.
|
|
3775
|
+
* @param searchSynonyms.indexName - Name of the index on which to perform the operation.
|
|
3776
|
+
* @param searchSynonyms.searchSynonymsParams - Body of the `searchSynonyms` operation.
|
|
3777
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3778
|
+
* @see searchSynonyms for the plain version.
|
|
3779
|
+
*/
|
|
3780
|
+
searchSynonymsWithHTTPInfo({ indexName, searchSynonymsParams }, requestOptions) {
|
|
3781
|
+
validateRequired("indexName", "searchSynonymsWithHTTPInfo", indexName);
|
|
3782
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/search".replace(
|
|
3783
|
+
"{indexName}",
|
|
3784
|
+
encodeURIComponent(indexName)
|
|
3785
|
+
);
|
|
3786
|
+
const headers = {};
|
|
3787
|
+
const queryParameters = {};
|
|
3788
|
+
const request = {
|
|
3789
|
+
method: "POST",
|
|
3790
|
+
path: requestPath,
|
|
3791
|
+
queryParameters,
|
|
3792
|
+
headers,
|
|
3793
|
+
data: searchSynonymsParams ? searchSynonymsParams : {},
|
|
3794
|
+
useReadTransporter: true,
|
|
3795
|
+
cacheable: true
|
|
3796
|
+
};
|
|
3797
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3798
|
+
},
|
|
2074
3799
|
/**
|
|
2075
3800
|
* 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).
|
|
2076
3801
|
*
|
|
@@ -2098,6 +3823,36 @@ function createSearchClient({
|
|
|
2098
3823
|
};
|
|
2099
3824
|
return transporter.request(request, requestOptions);
|
|
2100
3825
|
},
|
|
3826
|
+
/**
|
|
3827
|
+
* 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).
|
|
3828
|
+
*
|
|
3829
|
+
* 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.
|
|
3830
|
+
*
|
|
3831
|
+
* Required API Key ACLs:
|
|
3832
|
+
* - admin
|
|
3833
|
+
*
|
|
3834
|
+
* @deprecated
|
|
3835
|
+
* @param searchUserIdsParams - The searchUserIdsParams object.
|
|
3836
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3837
|
+
* @see searchUserIds for the plain version.
|
|
3838
|
+
*/
|
|
3839
|
+
searchUserIdsWithHTTPInfo(searchUserIdsParams, requestOptions) {
|
|
3840
|
+
validateRequired("searchUserIdsParams", "searchUserIdsWithHTTPInfo", searchUserIdsParams);
|
|
3841
|
+
validateRequired("searchUserIdsParams.query", "searchUserIdsWithHTTPInfo", searchUserIdsParams.query);
|
|
3842
|
+
const requestPath = "/1/clusters/mapping/search";
|
|
3843
|
+
const headers = {};
|
|
3844
|
+
const queryParameters = {};
|
|
3845
|
+
const request = {
|
|
3846
|
+
method: "POST",
|
|
3847
|
+
path: requestPath,
|
|
3848
|
+
queryParameters,
|
|
3849
|
+
headers,
|
|
3850
|
+
data: searchUserIdsParams,
|
|
3851
|
+
useReadTransporter: true,
|
|
3852
|
+
cacheable: true
|
|
3853
|
+
};
|
|
3854
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3855
|
+
},
|
|
2101
3856
|
/**
|
|
2102
3857
|
* Turns standard stop word dictionary entries on or off for a given language.
|
|
2103
3858
|
*
|
|
@@ -2125,6 +3880,36 @@ function createSearchClient({
|
|
|
2125
3880
|
};
|
|
2126
3881
|
return transporter.request(request, requestOptions);
|
|
2127
3882
|
},
|
|
3883
|
+
/**
|
|
3884
|
+
* Turns standard stop word dictionary entries on or off for a given language.
|
|
3885
|
+
*
|
|
3886
|
+
* 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.
|
|
3887
|
+
*
|
|
3888
|
+
* Required API Key ACLs:
|
|
3889
|
+
* - editSettings
|
|
3890
|
+
* @param dictionarySettingsParams - The dictionarySettingsParams object.
|
|
3891
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3892
|
+
* @see setDictionarySettings for the plain version.
|
|
3893
|
+
*/
|
|
3894
|
+
setDictionarySettingsWithHTTPInfo(dictionarySettingsParams, requestOptions) {
|
|
3895
|
+
validateRequired("dictionarySettingsParams", "setDictionarySettingsWithHTTPInfo", dictionarySettingsParams);
|
|
3896
|
+
validateRequired(
|
|
3897
|
+
"dictionarySettingsParams.disableStandardEntries",
|
|
3898
|
+
"setDictionarySettingsWithHTTPInfo",
|
|
3899
|
+
dictionarySettingsParams.disableStandardEntries
|
|
3900
|
+
);
|
|
3901
|
+
const requestPath = "/1/dictionaries/*/settings";
|
|
3902
|
+
const headers = {};
|
|
3903
|
+
const queryParameters = {};
|
|
3904
|
+
const request = {
|
|
3905
|
+
method: "PUT",
|
|
3906
|
+
path: requestPath,
|
|
3907
|
+
queryParameters,
|
|
3908
|
+
headers,
|
|
3909
|
+
data: dictionarySettingsParams
|
|
3910
|
+
};
|
|
3911
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3912
|
+
},
|
|
2128
3913
|
/**
|
|
2129
3914
|
* 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.
|
|
2130
3915
|
*
|
|
@@ -2154,6 +3939,38 @@ function createSearchClient({
|
|
|
2154
3939
|
};
|
|
2155
3940
|
return transporter.request(request, requestOptions);
|
|
2156
3941
|
},
|
|
3942
|
+
/**
|
|
3943
|
+
* 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.
|
|
3944
|
+
*
|
|
3945
|
+
* 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.
|
|
3946
|
+
*
|
|
3947
|
+
* Required API Key ACLs:
|
|
3948
|
+
* - editSettings
|
|
3949
|
+
* @param setSettings - The setSettings object.
|
|
3950
|
+
* @param setSettings.indexName - Name of the index on which to perform the operation.
|
|
3951
|
+
* @param setSettings.indexSettings - The indexSettings object.
|
|
3952
|
+
* @param setSettings.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3953
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3954
|
+
* @see setSettings for the plain version.
|
|
3955
|
+
*/
|
|
3956
|
+
setSettingsWithHTTPInfo({ indexName, indexSettings, forwardToReplicas }, requestOptions) {
|
|
3957
|
+
validateRequired("indexName", "setSettingsWithHTTPInfo", indexName);
|
|
3958
|
+
validateRequired("indexSettings", "setSettingsWithHTTPInfo", indexSettings);
|
|
3959
|
+
const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
|
|
3960
|
+
const headers = {};
|
|
3961
|
+
const queryParameters = {};
|
|
3962
|
+
if (forwardToReplicas !== void 0) {
|
|
3963
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3964
|
+
}
|
|
3965
|
+
const request = {
|
|
3966
|
+
method: "PUT",
|
|
3967
|
+
path: requestPath,
|
|
3968
|
+
queryParameters,
|
|
3969
|
+
headers,
|
|
3970
|
+
data: indexSettings
|
|
3971
|
+
};
|
|
3972
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3973
|
+
},
|
|
2157
3974
|
/**
|
|
2158
3975
|
* Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
|
|
2159
3976
|
*
|
|
@@ -2179,6 +3996,35 @@ function createSearchClient({
|
|
|
2179
3996
|
data: apiKey
|
|
2180
3997
|
};
|
|
2181
3998
|
return transporter.request(request, requestOptions);
|
|
3999
|
+
},
|
|
4000
|
+
/**
|
|
4001
|
+
* Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
|
|
4002
|
+
*
|
|
4003
|
+
* 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.
|
|
4004
|
+
*
|
|
4005
|
+
* Required API Key ACLs:
|
|
4006
|
+
* - admin
|
|
4007
|
+
* @param updateApiKey - The updateApiKey object.
|
|
4008
|
+
* @param updateApiKey.key - API key.
|
|
4009
|
+
* @param updateApiKey.apiKey - The apiKey object.
|
|
4010
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4011
|
+
* @see updateApiKey for the plain version.
|
|
4012
|
+
*/
|
|
4013
|
+
updateApiKeyWithHTTPInfo({ key, apiKey }, requestOptions) {
|
|
4014
|
+
validateRequired("key", "updateApiKeyWithHTTPInfo", key);
|
|
4015
|
+
validateRequired("apiKey", "updateApiKeyWithHTTPInfo", apiKey);
|
|
4016
|
+
validateRequired("apiKey.acl", "updateApiKeyWithHTTPInfo", apiKey.acl);
|
|
4017
|
+
const requestPath = "/1/keys/{key}".replace("{key}", encodeURIComponent(key));
|
|
4018
|
+
const headers = {};
|
|
4019
|
+
const queryParameters = {};
|
|
4020
|
+
const request = {
|
|
4021
|
+
method: "PUT",
|
|
4022
|
+
path: requestPath,
|
|
4023
|
+
queryParameters,
|
|
4024
|
+
headers,
|
|
4025
|
+
data: apiKey
|
|
4026
|
+
};
|
|
4027
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2182
4028
|
}
|
|
2183
4029
|
};
|
|
2184
4030
|
}
|
|
@@ -2203,6 +4049,7 @@ function searchClient(appId, apiKey, options) {
|
|
|
2203
4049
|
logger: createNullLogger(),
|
|
2204
4050
|
requester: createFetchRequester(),
|
|
2205
4051
|
algoliaAgents: [{ segment: "Fetch" }],
|
|
4052
|
+
requestIdChannel: "queryParameters",
|
|
2206
4053
|
responsesCache: createNullCache(),
|
|
2207
4054
|
requestsCache: createNullCache(),
|
|
2208
4055
|
hostsCache: createMemoryCache(),
|
|
@@ -2260,11 +4107,12 @@ function searchClient(appId, apiKey, options) {
|
|
|
2260
4107
|
batchSize,
|
|
2261
4108
|
maxRetries = 100
|
|
2262
4109
|
}, requestOptions) {
|
|
4110
|
+
requestOptions = withRequestId2(this.transporter, requestOptions);
|
|
2263
4111
|
const responses = [];
|
|
2264
4112
|
if (this.appId === destinationAppID) {
|
|
2265
4113
|
throw new IndicesInSameAppError();
|
|
2266
4114
|
}
|
|
2267
|
-
if (!await this.indexExists({ indexName: sourceIndexName })) {
|
|
4115
|
+
if (!await this.indexExists({ indexName: sourceIndexName }, requestOptions)) {
|
|
2268
4116
|
throw new IndexNotFoundError(sourceIndexName);
|
|
2269
4117
|
}
|
|
2270
4118
|
const destinationClient = createSearchClient({
|
|
@@ -2283,54 +4131,66 @@ function searchClient(appId, apiKey, options) {
|
|
|
2283
4131
|
hostsCache: createMemoryCache(),
|
|
2284
4132
|
...options
|
|
2285
4133
|
});
|
|
2286
|
-
if (await destinationClient.indexExists({ indexName: destinationIndexName })) {
|
|
4134
|
+
if (await destinationClient.indexExists({ indexName: destinationIndexName }, requestOptions)) {
|
|
2287
4135
|
throw new IndexAlreadyExistsError(destinationIndexName);
|
|
2288
4136
|
}
|
|
2289
4137
|
responses.push(
|
|
2290
4138
|
await destinationClient.setSettings(
|
|
2291
4139
|
{
|
|
2292
4140
|
indexName: destinationIndexName,
|
|
2293
|
-
indexSettings: await this.getSettings({ indexName: sourceIndexName })
|
|
4141
|
+
indexSettings: await this.getSettings({ indexName: sourceIndexName }, requestOptions)
|
|
2294
4142
|
},
|
|
2295
4143
|
requestOptions
|
|
2296
4144
|
)
|
|
2297
4145
|
);
|
|
2298
|
-
await this.browseRules(
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
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
|
-
|
|
4146
|
+
await this.browseRules(
|
|
4147
|
+
{
|
|
4148
|
+
indexName: sourceIndexName,
|
|
4149
|
+
async aggregator(response) {
|
|
4150
|
+
responses.push(
|
|
4151
|
+
await destinationClient.saveRules(
|
|
4152
|
+
{ indexName: destinationIndexName, rules: response.hits },
|
|
4153
|
+
requestOptions
|
|
4154
|
+
)
|
|
4155
|
+
);
|
|
4156
|
+
}
|
|
4157
|
+
},
|
|
4158
|
+
requestOptions
|
|
4159
|
+
);
|
|
4160
|
+
await this.browseSynonyms(
|
|
4161
|
+
{
|
|
4162
|
+
indexName: sourceIndexName,
|
|
4163
|
+
async aggregator(response) {
|
|
4164
|
+
responses.push(
|
|
4165
|
+
await destinationClient.saveSynonyms(
|
|
4166
|
+
{ indexName: destinationIndexName, synonymHit: response.hits },
|
|
4167
|
+
requestOptions
|
|
4168
|
+
)
|
|
4169
|
+
);
|
|
4170
|
+
}
|
|
4171
|
+
},
|
|
4172
|
+
requestOptions
|
|
4173
|
+
);
|
|
4174
|
+
await this.browseObjects(
|
|
4175
|
+
{
|
|
4176
|
+
indexName: sourceIndexName,
|
|
4177
|
+
browseParams: batchSize ? { hitsPerPage: batchSize } : void 0,
|
|
4178
|
+
async aggregator(response) {
|
|
4179
|
+
responses.push(
|
|
4180
|
+
...await destinationClient.saveObjects(
|
|
4181
|
+
{ indexName: destinationIndexName, objects: response.hits, batchSize },
|
|
4182
|
+
requestOptions
|
|
4183
|
+
)
|
|
4184
|
+
);
|
|
4185
|
+
}
|
|
4186
|
+
},
|
|
4187
|
+
requestOptions
|
|
4188
|
+
);
|
|
2332
4189
|
for (const response of responses) {
|
|
2333
|
-
await destinationClient.waitForTask(
|
|
4190
|
+
await destinationClient.waitForTask(
|
|
4191
|
+
{ indexName: destinationIndexName, taskID: response.taskID, maxRetries },
|
|
4192
|
+
requestOptions
|
|
4193
|
+
);
|
|
2334
4194
|
}
|
|
2335
4195
|
},
|
|
2336
4196
|
/**
|