@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/browser.js
CHANGED
|
@@ -15,10 +15,12 @@ import {
|
|
|
15
15
|
createIterablePromise,
|
|
16
16
|
createTransporter,
|
|
17
17
|
getAlgoliaAgent,
|
|
18
|
+
logWarning,
|
|
18
19
|
shuffle,
|
|
19
|
-
validateRequired
|
|
20
|
+
validateRequired,
|
|
21
|
+
withRequestId
|
|
20
22
|
} from "@algolia/client-common";
|
|
21
|
-
var apiClientVersion = "5.
|
|
23
|
+
var apiClientVersion = "5.57.0";
|
|
22
24
|
function getDefaultHosts(appId) {
|
|
23
25
|
return [
|
|
24
26
|
{
|
|
@@ -138,6 +140,7 @@ function createSearchClient({
|
|
|
138
140
|
maxRetries = 100,
|
|
139
141
|
timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
|
|
140
142
|
}, requestOptions) {
|
|
143
|
+
requestOptions = withRequestId(transporter, requestOptions);
|
|
141
144
|
let retryCount = 0;
|
|
142
145
|
return createIterablePromise({
|
|
143
146
|
func: () => this.getTask({ indexName, taskID }, requestOptions),
|
|
@@ -165,6 +168,7 @@ function createSearchClient({
|
|
|
165
168
|
maxRetries = 100,
|
|
166
169
|
timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
|
|
167
170
|
}, requestOptions) {
|
|
171
|
+
requestOptions = withRequestId(transporter, requestOptions);
|
|
168
172
|
let retryCount = 0;
|
|
169
173
|
return createIterablePromise({
|
|
170
174
|
func: () => this.getAppTask({ taskID }, requestOptions),
|
|
@@ -196,6 +200,7 @@ function createSearchClient({
|
|
|
196
200
|
maxRetries = 100,
|
|
197
201
|
timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
|
|
198
202
|
}, requestOptions) {
|
|
203
|
+
requestOptions = withRequestId(transporter, requestOptions);
|
|
199
204
|
let retryCount = 0;
|
|
200
205
|
const baseIteratorOptions = {
|
|
201
206
|
aggregator: () => retryCount += 1,
|
|
@@ -251,6 +256,7 @@ function createSearchClient({
|
|
|
251
256
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `browse` method and merged with the transporter requestOptions.
|
|
252
257
|
*/
|
|
253
258
|
browseObjects({ indexName, browseParams, ...browseObjectsOptions }, requestOptions) {
|
|
259
|
+
requestOptions = withRequestId(transporter, requestOptions);
|
|
254
260
|
return createIterablePromise({
|
|
255
261
|
func: (previousResponse) => {
|
|
256
262
|
return this.browse(
|
|
@@ -281,6 +287,7 @@ function createSearchClient({
|
|
|
281
287
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchRules` method and merged with the transporter requestOptions.
|
|
282
288
|
*/
|
|
283
289
|
browseRules({ indexName, searchRulesParams, ...browseRulesOptions }, requestOptions) {
|
|
290
|
+
requestOptions = withRequestId(transporter, requestOptions);
|
|
284
291
|
const params = {
|
|
285
292
|
...searchRulesParams,
|
|
286
293
|
hitsPerPage: searchRulesParams?.hitsPerPage || 1e3
|
|
@@ -318,6 +325,7 @@ function createSearchClient({
|
|
|
318
325
|
searchSynonymsParams,
|
|
319
326
|
...browseSynonymsOptions
|
|
320
327
|
}, requestOptions) {
|
|
328
|
+
requestOptions = withRequestId(transporter, requestOptions);
|
|
321
329
|
const params = {
|
|
322
330
|
...searchSynonymsParams,
|
|
323
331
|
page: searchSynonymsParams?.page || 0,
|
|
@@ -363,6 +371,7 @@ function createSearchClient({
|
|
|
363
371
|
batchSize = 1e3,
|
|
364
372
|
maxRetries = 100
|
|
365
373
|
}, requestOptions) {
|
|
374
|
+
requestOptions = withRequestId(transporter, requestOptions);
|
|
366
375
|
let requests = [];
|
|
367
376
|
const responses = [];
|
|
368
377
|
const objectEntries = objects.entries();
|
|
@@ -375,7 +384,7 @@ function createSearchClient({
|
|
|
375
384
|
}
|
|
376
385
|
if (waitForTasks) {
|
|
377
386
|
for (const resp of responses) {
|
|
378
|
-
await this.waitForTask({ indexName, taskID: resp.taskID, maxRetries });
|
|
387
|
+
await this.waitForTask({ indexName, taskID: resp.taskID, maxRetries }, requestOptions);
|
|
379
388
|
}
|
|
380
389
|
}
|
|
381
390
|
return responses;
|
|
@@ -453,6 +462,8 @@ function createSearchClient({
|
|
|
453
462
|
* 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.
|
|
454
463
|
* See https://api-clients-automation.netlify.app/docs/custom-helpers/#replaceallobjects for implementation details.
|
|
455
464
|
*
|
|
465
|
+
* Warning: calling this method with an empty `objects` list replaces the index with an empty one, deleting all existing records.
|
|
466
|
+
*
|
|
456
467
|
* @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.
|
|
457
468
|
* @param replaceAllObjects - The `replaceAllObjects` object.
|
|
458
469
|
* @param replaceAllObjects.indexName - The `indexName` to replace `objects` in.
|
|
@@ -469,6 +480,13 @@ function createSearchClient({
|
|
|
469
480
|
scopes,
|
|
470
481
|
maxRetries = DEFAULT_REPLACE_ALL_OBJECTS_MAX_RETRIES
|
|
471
482
|
}, requestOptions) {
|
|
483
|
+
requestOptions = withRequestId(transporter, requestOptions);
|
|
484
|
+
if (objects.length === 0) {
|
|
485
|
+
logWarning(
|
|
486
|
+
transporter.logger,
|
|
487
|
+
`replaceAllObjects was called with an empty list of objects, which will delete all records currently in the "${indexName}" index.`
|
|
488
|
+
);
|
|
489
|
+
}
|
|
472
490
|
const randomSuffix = Math.floor(Math.random() * 1e6) + 1e5;
|
|
473
491
|
const tmpIndexName = `${indexName}_tmp_${randomSuffix}`;
|
|
474
492
|
if (scopes === void 0) {
|
|
@@ -490,11 +508,14 @@ function createSearchClient({
|
|
|
490
508
|
{ indexName: tmpIndexName, objects, waitForTasks: true, batchSize, maxRetries },
|
|
491
509
|
requestOptions
|
|
492
510
|
);
|
|
493
|
-
await this.waitForTask(
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
511
|
+
await this.waitForTask(
|
|
512
|
+
{
|
|
513
|
+
indexName: tmpIndexName,
|
|
514
|
+
taskID: copyOperationResponse.taskID,
|
|
515
|
+
maxRetries
|
|
516
|
+
},
|
|
517
|
+
requestOptions
|
|
518
|
+
);
|
|
498
519
|
copyOperationResponse = await this.operationIndex(
|
|
499
520
|
{
|
|
500
521
|
indexName,
|
|
@@ -506,11 +527,14 @@ function createSearchClient({
|
|
|
506
527
|
},
|
|
507
528
|
requestOptions
|
|
508
529
|
);
|
|
509
|
-
await this.waitForTask(
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
530
|
+
await this.waitForTask(
|
|
531
|
+
{
|
|
532
|
+
indexName: tmpIndexName,
|
|
533
|
+
taskID: copyOperationResponse.taskID,
|
|
534
|
+
maxRetries
|
|
535
|
+
},
|
|
536
|
+
requestOptions
|
|
537
|
+
);
|
|
514
538
|
const moveOperationResponse = await this.operationIndex(
|
|
515
539
|
{
|
|
516
540
|
indexName: tmpIndexName,
|
|
@@ -518,20 +542,23 @@ function createSearchClient({
|
|
|
518
542
|
},
|
|
519
543
|
requestOptions
|
|
520
544
|
);
|
|
521
|
-
await this.waitForTask(
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
545
|
+
await this.waitForTask(
|
|
546
|
+
{
|
|
547
|
+
indexName: tmpIndexName,
|
|
548
|
+
taskID: moveOperationResponse.taskID,
|
|
549
|
+
maxRetries
|
|
550
|
+
},
|
|
551
|
+
requestOptions
|
|
552
|
+
);
|
|
526
553
|
return { copyOperationResponse, batchResponses, moveOperationResponse };
|
|
527
554
|
} catch (error) {
|
|
528
|
-
await this.deleteIndex({ indexName: tmpIndexName });
|
|
555
|
+
await this.deleteIndex({ indexName: tmpIndexName }, requestOptions);
|
|
529
556
|
throw error;
|
|
530
557
|
}
|
|
531
558
|
},
|
|
532
|
-
async indexExists({ indexName }) {
|
|
559
|
+
async indexExists({ indexName }, requestOptions) {
|
|
533
560
|
try {
|
|
534
|
-
await this.getSettings({ indexName });
|
|
561
|
+
await this.getSettings({ indexName }, requestOptions);
|
|
535
562
|
} catch (error) {
|
|
536
563
|
if (error instanceof ApiError && error.status === 404) {
|
|
537
564
|
return false;
|
|
@@ -585,6 +612,32 @@ function createSearchClient({
|
|
|
585
612
|
};
|
|
586
613
|
return transporter.request(request, requestOptions);
|
|
587
614
|
},
|
|
615
|
+
/**
|
|
616
|
+
* Creates a new API key with specific permissions and restrictions.
|
|
617
|
+
*
|
|
618
|
+
* 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.
|
|
619
|
+
*
|
|
620
|
+
* Required API Key ACLs:
|
|
621
|
+
* - admin
|
|
622
|
+
* @param apiKey - The apiKey object.
|
|
623
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
624
|
+
* @see addApiKey for the plain version.
|
|
625
|
+
*/
|
|
626
|
+
addApiKeyWithHTTPInfo(apiKey, requestOptions) {
|
|
627
|
+
validateRequired("apiKey", "addApiKeyWithHTTPInfo", apiKey);
|
|
628
|
+
validateRequired("apiKey.acl", "addApiKeyWithHTTPInfo", apiKey.acl);
|
|
629
|
+
const requestPath = "/1/keys";
|
|
630
|
+
const headers = {};
|
|
631
|
+
const queryParameters = {};
|
|
632
|
+
const request = {
|
|
633
|
+
method: "POST",
|
|
634
|
+
path: requestPath,
|
|
635
|
+
queryParameters,
|
|
636
|
+
headers,
|
|
637
|
+
data: apiKey
|
|
638
|
+
};
|
|
639
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
640
|
+
},
|
|
588
641
|
/**
|
|
589
642
|
* 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).
|
|
590
643
|
*
|
|
@@ -612,6 +665,36 @@ function createSearchClient({
|
|
|
612
665
|
};
|
|
613
666
|
return transporter.request(request, requestOptions);
|
|
614
667
|
},
|
|
668
|
+
/**
|
|
669
|
+
* 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).
|
|
670
|
+
*
|
|
671
|
+
* 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.
|
|
672
|
+
*
|
|
673
|
+
* Required API Key ACLs:
|
|
674
|
+
* - addObject
|
|
675
|
+
* @param addOrUpdateObject - The addOrUpdateObject object.
|
|
676
|
+
* @param addOrUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
677
|
+
* @param addOrUpdateObject.objectID - Unique record identifier.
|
|
678
|
+
* @param addOrUpdateObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
679
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
680
|
+
* @see addOrUpdateObject for the plain version.
|
|
681
|
+
*/
|
|
682
|
+
addOrUpdateObjectWithHTTPInfo({ indexName, objectID, body }, requestOptions) {
|
|
683
|
+
validateRequired("indexName", "addOrUpdateObjectWithHTTPInfo", indexName);
|
|
684
|
+
validateRequired("objectID", "addOrUpdateObjectWithHTTPInfo", objectID);
|
|
685
|
+
validateRequired("body", "addOrUpdateObjectWithHTTPInfo", body);
|
|
686
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
687
|
+
const headers = {};
|
|
688
|
+
const queryParameters = {};
|
|
689
|
+
const request = {
|
|
690
|
+
method: "PUT",
|
|
691
|
+
path: requestPath,
|
|
692
|
+
queryParameters,
|
|
693
|
+
headers,
|
|
694
|
+
data: body
|
|
695
|
+
};
|
|
696
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
697
|
+
},
|
|
615
698
|
/**
|
|
616
699
|
* Adds a source to the list of allowed sources.
|
|
617
700
|
*
|
|
@@ -635,6 +718,32 @@ function createSearchClient({
|
|
|
635
718
|
};
|
|
636
719
|
return transporter.request(request, requestOptions);
|
|
637
720
|
},
|
|
721
|
+
/**
|
|
722
|
+
* Adds a source to the list of allowed sources.
|
|
723
|
+
*
|
|
724
|
+
* 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.
|
|
725
|
+
*
|
|
726
|
+
* Required API Key ACLs:
|
|
727
|
+
* - admin
|
|
728
|
+
* @param source - Source to add.
|
|
729
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
730
|
+
* @see appendSource for the plain version.
|
|
731
|
+
*/
|
|
732
|
+
appendSourceWithHTTPInfo(source, requestOptions) {
|
|
733
|
+
validateRequired("source", "appendSourceWithHTTPInfo", source);
|
|
734
|
+
validateRequired("source.source", "appendSourceWithHTTPInfo", source.source);
|
|
735
|
+
const requestPath = "/1/security/sources/append";
|
|
736
|
+
const headers = {};
|
|
737
|
+
const queryParameters = {};
|
|
738
|
+
const request = {
|
|
739
|
+
method: "POST",
|
|
740
|
+
path: requestPath,
|
|
741
|
+
queryParameters,
|
|
742
|
+
headers,
|
|
743
|
+
data: source
|
|
744
|
+
};
|
|
745
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
746
|
+
},
|
|
638
747
|
/**
|
|
639
748
|
* 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.
|
|
640
749
|
*
|
|
@@ -666,6 +775,40 @@ function createSearchClient({
|
|
|
666
775
|
};
|
|
667
776
|
return transporter.request(request, requestOptions);
|
|
668
777
|
},
|
|
778
|
+
/**
|
|
779
|
+
* 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.
|
|
780
|
+
*
|
|
781
|
+
* 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.
|
|
782
|
+
*
|
|
783
|
+
* Required API Key ACLs:
|
|
784
|
+
* - admin
|
|
785
|
+
*
|
|
786
|
+
* @deprecated
|
|
787
|
+
* @param assignUserId - The assignUserId object.
|
|
788
|
+
* @param assignUserId.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
789
|
+
* @param assignUserId.assignUserIdParams - The assignUserIdParams object.
|
|
790
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
791
|
+
* @see assignUserId for the plain version.
|
|
792
|
+
*/
|
|
793
|
+
assignUserIdWithHTTPInfo({ xAlgoliaUserID, assignUserIdParams }, requestOptions) {
|
|
794
|
+
validateRequired("xAlgoliaUserID", "assignUserIdWithHTTPInfo", xAlgoliaUserID);
|
|
795
|
+
validateRequired("assignUserIdParams", "assignUserIdWithHTTPInfo", assignUserIdParams);
|
|
796
|
+
validateRequired("assignUserIdParams.cluster", "assignUserIdWithHTTPInfo", assignUserIdParams.cluster);
|
|
797
|
+
const requestPath = "/1/clusters/mapping";
|
|
798
|
+
const headers = {};
|
|
799
|
+
const queryParameters = {};
|
|
800
|
+
if (xAlgoliaUserID !== void 0) {
|
|
801
|
+
headers["X-Algolia-User-ID"] = xAlgoliaUserID.toString();
|
|
802
|
+
}
|
|
803
|
+
const request = {
|
|
804
|
+
method: "POST",
|
|
805
|
+
path: requestPath,
|
|
806
|
+
queryParameters,
|
|
807
|
+
headers,
|
|
808
|
+
data: assignUserIdParams
|
|
809
|
+
};
|
|
810
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
811
|
+
},
|
|
669
812
|
/**
|
|
670
813
|
* 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).
|
|
671
814
|
*
|
|
@@ -692,6 +835,35 @@ function createSearchClient({
|
|
|
692
835
|
};
|
|
693
836
|
return transporter.request(request, requestOptions);
|
|
694
837
|
},
|
|
838
|
+
/**
|
|
839
|
+
* 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).
|
|
840
|
+
*
|
|
841
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
842
|
+
*
|
|
843
|
+
* Required API Key ACLs:
|
|
844
|
+
* - addObject
|
|
845
|
+
* @param batch - The batch object.
|
|
846
|
+
* @param batch.indexName - Name of the index on which to perform the operation.
|
|
847
|
+
* @param batch.batchWriteParams - The batchWriteParams object.
|
|
848
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
849
|
+
* @see batch for the plain version.
|
|
850
|
+
*/
|
|
851
|
+
batchWithHTTPInfo({ indexName, batchWriteParams }, requestOptions) {
|
|
852
|
+
validateRequired("indexName", "batchWithHTTPInfo", indexName);
|
|
853
|
+
validateRequired("batchWriteParams", "batchWithHTTPInfo", batchWriteParams);
|
|
854
|
+
validateRequired("batchWriteParams.requests", "batchWithHTTPInfo", batchWriteParams.requests);
|
|
855
|
+
const requestPath = "/1/indexes/{indexName}/batch".replace("{indexName}", encodeURIComponent(indexName));
|
|
856
|
+
const headers = {};
|
|
857
|
+
const queryParameters = {};
|
|
858
|
+
const request = {
|
|
859
|
+
method: "POST",
|
|
860
|
+
path: requestPath,
|
|
861
|
+
queryParameters,
|
|
862
|
+
headers,
|
|
863
|
+
data: batchWriteParams
|
|
864
|
+
};
|
|
865
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
866
|
+
},
|
|
695
867
|
/**
|
|
696
868
|
* Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
|
|
697
869
|
*
|
|
@@ -724,6 +896,49 @@ function createSearchClient({
|
|
|
724
896
|
};
|
|
725
897
|
return transporter.request(request, requestOptions);
|
|
726
898
|
},
|
|
899
|
+
/**
|
|
900
|
+
* Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
|
|
901
|
+
*
|
|
902
|
+
* 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.
|
|
903
|
+
*
|
|
904
|
+
* Required API Key ACLs:
|
|
905
|
+
* - admin
|
|
906
|
+
*
|
|
907
|
+
* @deprecated
|
|
908
|
+
* @param batchAssignUserIds - The batchAssignUserIds object.
|
|
909
|
+
* @param batchAssignUserIds.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
910
|
+
* @param batchAssignUserIds.batchAssignUserIdsParams - The batchAssignUserIdsParams object.
|
|
911
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
912
|
+
* @see batchAssignUserIds for the plain version.
|
|
913
|
+
*/
|
|
914
|
+
batchAssignUserIdsWithHTTPInfo({ xAlgoliaUserID, batchAssignUserIdsParams }, requestOptions) {
|
|
915
|
+
validateRequired("xAlgoliaUserID", "batchAssignUserIdsWithHTTPInfo", xAlgoliaUserID);
|
|
916
|
+
validateRequired("batchAssignUserIdsParams", "batchAssignUserIdsWithHTTPInfo", batchAssignUserIdsParams);
|
|
917
|
+
validateRequired(
|
|
918
|
+
"batchAssignUserIdsParams.cluster",
|
|
919
|
+
"batchAssignUserIdsWithHTTPInfo",
|
|
920
|
+
batchAssignUserIdsParams.cluster
|
|
921
|
+
);
|
|
922
|
+
validateRequired(
|
|
923
|
+
"batchAssignUserIdsParams.users",
|
|
924
|
+
"batchAssignUserIdsWithHTTPInfo",
|
|
925
|
+
batchAssignUserIdsParams.users
|
|
926
|
+
);
|
|
927
|
+
const requestPath = "/1/clusters/mapping/batch";
|
|
928
|
+
const headers = {};
|
|
929
|
+
const queryParameters = {};
|
|
930
|
+
if (xAlgoliaUserID !== void 0) {
|
|
931
|
+
headers["X-Algolia-User-ID"] = xAlgoliaUserID.toString();
|
|
932
|
+
}
|
|
933
|
+
const request = {
|
|
934
|
+
method: "POST",
|
|
935
|
+
path: requestPath,
|
|
936
|
+
queryParameters,
|
|
937
|
+
headers,
|
|
938
|
+
data: batchAssignUserIdsParams
|
|
939
|
+
};
|
|
940
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
941
|
+
},
|
|
727
942
|
/**
|
|
728
943
|
* Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
|
|
729
944
|
*
|
|
@@ -757,6 +972,46 @@ function createSearchClient({
|
|
|
757
972
|
};
|
|
758
973
|
return transporter.request(request, requestOptions);
|
|
759
974
|
},
|
|
975
|
+
/**
|
|
976
|
+
* Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
|
|
977
|
+
*
|
|
978
|
+
* 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.
|
|
979
|
+
*
|
|
980
|
+
* Required API Key ACLs:
|
|
981
|
+
* - editSettings
|
|
982
|
+
* @param batchDictionaryEntries - The batchDictionaryEntries object.
|
|
983
|
+
* @param batchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
984
|
+
* @param batchDictionaryEntries.batchDictionaryEntriesParams - The batchDictionaryEntriesParams object.
|
|
985
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
986
|
+
* @see batchDictionaryEntries for the plain version.
|
|
987
|
+
*/
|
|
988
|
+
batchDictionaryEntriesWithHTTPInfo({ dictionaryName, batchDictionaryEntriesParams }, requestOptions) {
|
|
989
|
+
validateRequired("dictionaryName", "batchDictionaryEntriesWithHTTPInfo", dictionaryName);
|
|
990
|
+
validateRequired(
|
|
991
|
+
"batchDictionaryEntriesParams",
|
|
992
|
+
"batchDictionaryEntriesWithHTTPInfo",
|
|
993
|
+
batchDictionaryEntriesParams
|
|
994
|
+
);
|
|
995
|
+
validateRequired(
|
|
996
|
+
"batchDictionaryEntriesParams.requests",
|
|
997
|
+
"batchDictionaryEntriesWithHTTPInfo",
|
|
998
|
+
batchDictionaryEntriesParams.requests
|
|
999
|
+
);
|
|
1000
|
+
const requestPath = "/1/dictionaries/{dictionaryName}/batch".replace(
|
|
1001
|
+
"{dictionaryName}",
|
|
1002
|
+
encodeURIComponent(dictionaryName)
|
|
1003
|
+
);
|
|
1004
|
+
const headers = {};
|
|
1005
|
+
const queryParameters = {};
|
|
1006
|
+
const request = {
|
|
1007
|
+
method: "POST",
|
|
1008
|
+
path: requestPath,
|
|
1009
|
+
queryParameters,
|
|
1010
|
+
headers,
|
|
1011
|
+
data: batchDictionaryEntriesParams
|
|
1012
|
+
};
|
|
1013
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1014
|
+
},
|
|
760
1015
|
/**
|
|
761
1016
|
* 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.
|
|
762
1017
|
*
|
|
@@ -782,6 +1037,34 @@ function createSearchClient({
|
|
|
782
1037
|
};
|
|
783
1038
|
return transporter.request(request, requestOptions);
|
|
784
1039
|
},
|
|
1040
|
+
/**
|
|
1041
|
+
* 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.
|
|
1042
|
+
*
|
|
1043
|
+
* 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.
|
|
1044
|
+
*
|
|
1045
|
+
* Required API Key ACLs:
|
|
1046
|
+
* - browse
|
|
1047
|
+
* @param browse - The browse object.
|
|
1048
|
+
* @param browse.indexName - Name of the index on which to perform the operation.
|
|
1049
|
+
* @param browse.browseParams - The browseParams object.
|
|
1050
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1051
|
+
* @see browse for the plain version.
|
|
1052
|
+
*/
|
|
1053
|
+
browseWithHTTPInfo({ indexName, browseParams }, requestOptions) {
|
|
1054
|
+
validateRequired("indexName", "browseWithHTTPInfo", indexName);
|
|
1055
|
+
const requestPath = "/1/indexes/{indexName}/browse".replace("{indexName}", encodeURIComponent(indexName));
|
|
1056
|
+
const headers = {};
|
|
1057
|
+
const queryParameters = {};
|
|
1058
|
+
const request = {
|
|
1059
|
+
method: "POST",
|
|
1060
|
+
path: requestPath,
|
|
1061
|
+
queryParameters,
|
|
1062
|
+
headers,
|
|
1063
|
+
data: browseParams ? browseParams : {},
|
|
1064
|
+
useReadTransporter: true
|
|
1065
|
+
};
|
|
1066
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1067
|
+
},
|
|
785
1068
|
/**
|
|
786
1069
|
* 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).
|
|
787
1070
|
*
|
|
@@ -804,6 +1087,31 @@ function createSearchClient({
|
|
|
804
1087
|
};
|
|
805
1088
|
return transporter.request(request, requestOptions);
|
|
806
1089
|
},
|
|
1090
|
+
/**
|
|
1091
|
+
* 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).
|
|
1092
|
+
*
|
|
1093
|
+
* 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.
|
|
1094
|
+
*
|
|
1095
|
+
* Required API Key ACLs:
|
|
1096
|
+
* - deleteIndex
|
|
1097
|
+
* @param clearObjects - The clearObjects object.
|
|
1098
|
+
* @param clearObjects.indexName - Name of the index on which to perform the operation.
|
|
1099
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1100
|
+
* @see clearObjects for the plain version.
|
|
1101
|
+
*/
|
|
1102
|
+
clearObjectsWithHTTPInfo({ indexName }, requestOptions) {
|
|
1103
|
+
validateRequired("indexName", "clearObjectsWithHTTPInfo", indexName);
|
|
1104
|
+
const requestPath = "/1/indexes/{indexName}/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
1105
|
+
const headers = {};
|
|
1106
|
+
const queryParameters = {};
|
|
1107
|
+
const request = {
|
|
1108
|
+
method: "POST",
|
|
1109
|
+
path: requestPath,
|
|
1110
|
+
queryParameters,
|
|
1111
|
+
headers
|
|
1112
|
+
};
|
|
1113
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1114
|
+
},
|
|
807
1115
|
/**
|
|
808
1116
|
* Deletes all rules from the index.
|
|
809
1117
|
*
|
|
@@ -831,18 +1139,21 @@ function createSearchClient({
|
|
|
831
1139
|
return transporter.request(request, requestOptions);
|
|
832
1140
|
},
|
|
833
1141
|
/**
|
|
834
|
-
* Deletes all
|
|
1142
|
+
* Deletes all rules from the index.
|
|
1143
|
+
*
|
|
1144
|
+
* 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.
|
|
835
1145
|
*
|
|
836
1146
|
* Required API Key ACLs:
|
|
837
1147
|
* - editSettings
|
|
838
|
-
* @param
|
|
839
|
-
* @param
|
|
840
|
-
* @param
|
|
1148
|
+
* @param clearRules - The clearRules object.
|
|
1149
|
+
* @param clearRules.indexName - Name of the index on which to perform the operation.
|
|
1150
|
+
* @param clearRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
841
1151
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1152
|
+
* @see clearRules for the plain version.
|
|
842
1153
|
*/
|
|
843
|
-
|
|
844
|
-
validateRequired("indexName", "
|
|
845
|
-
const requestPath = "/1/indexes/{indexName}/
|
|
1154
|
+
clearRulesWithHTTPInfo({ indexName, forwardToReplicas }, requestOptions) {
|
|
1155
|
+
validateRequired("indexName", "clearRulesWithHTTPInfo", indexName);
|
|
1156
|
+
const requestPath = "/1/indexes/{indexName}/rules/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
846
1157
|
const headers = {};
|
|
847
1158
|
const queryParameters = {};
|
|
848
1159
|
if (forwardToReplicas !== void 0) {
|
|
@@ -854,10 +1165,65 @@ function createSearchClient({
|
|
|
854
1165
|
queryParameters,
|
|
855
1166
|
headers
|
|
856
1167
|
};
|
|
857
|
-
return transporter.
|
|
1168
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
858
1169
|
},
|
|
859
1170
|
/**
|
|
860
|
-
*
|
|
1171
|
+
* Deletes all synonyms from the index.
|
|
1172
|
+
*
|
|
1173
|
+
* Required API Key ACLs:
|
|
1174
|
+
* - editSettings
|
|
1175
|
+
* @param clearSynonyms - The clearSynonyms object.
|
|
1176
|
+
* @param clearSynonyms.indexName - Name of the index on which to perform the operation.
|
|
1177
|
+
* @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1178
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1179
|
+
*/
|
|
1180
|
+
clearSynonyms({ indexName, forwardToReplicas }, requestOptions) {
|
|
1181
|
+
validateRequired("indexName", "clearSynonyms", indexName);
|
|
1182
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
1183
|
+
const headers = {};
|
|
1184
|
+
const queryParameters = {};
|
|
1185
|
+
if (forwardToReplicas !== void 0) {
|
|
1186
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1187
|
+
}
|
|
1188
|
+
const request = {
|
|
1189
|
+
method: "POST",
|
|
1190
|
+
path: requestPath,
|
|
1191
|
+
queryParameters,
|
|
1192
|
+
headers
|
|
1193
|
+
};
|
|
1194
|
+
return transporter.request(request, requestOptions);
|
|
1195
|
+
},
|
|
1196
|
+
/**
|
|
1197
|
+
* Deletes all synonyms from the index.
|
|
1198
|
+
*
|
|
1199
|
+
* 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.
|
|
1200
|
+
*
|
|
1201
|
+
* Required API Key ACLs:
|
|
1202
|
+
* - editSettings
|
|
1203
|
+
* @param clearSynonyms - The clearSynonyms object.
|
|
1204
|
+
* @param clearSynonyms.indexName - Name of the index on which to perform the operation.
|
|
1205
|
+
* @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1206
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1207
|
+
* @see clearSynonyms for the plain version.
|
|
1208
|
+
*/
|
|
1209
|
+
clearSynonymsWithHTTPInfo({ indexName, forwardToReplicas }, requestOptions) {
|
|
1210
|
+
validateRequired("indexName", "clearSynonymsWithHTTPInfo", indexName);
|
|
1211
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
1212
|
+
const headers = {};
|
|
1213
|
+
const queryParameters = {};
|
|
1214
|
+
if (forwardToReplicas !== void 0) {
|
|
1215
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1216
|
+
}
|
|
1217
|
+
const request = {
|
|
1218
|
+
method: "POST",
|
|
1219
|
+
path: requestPath,
|
|
1220
|
+
queryParameters,
|
|
1221
|
+
headers
|
|
1222
|
+
};
|
|
1223
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1224
|
+
},
|
|
1225
|
+
/**
|
|
1226
|
+
* This method lets you send requests to the Algolia REST API.
|
|
861
1227
|
* @param customDelete - The customDelete object.
|
|
862
1228
|
* @param customDelete.path - Path of the endpoint, for example `1/newFeature`.
|
|
863
1229
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -876,6 +1242,29 @@ function createSearchClient({
|
|
|
876
1242
|
};
|
|
877
1243
|
return transporter.request(request, requestOptions);
|
|
878
1244
|
},
|
|
1245
|
+
/**
|
|
1246
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1247
|
+
*
|
|
1248
|
+
* 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.
|
|
1249
|
+
* @param customDelete - The customDelete object.
|
|
1250
|
+
* @param customDelete.path - Path of the endpoint, for example `1/newFeature`.
|
|
1251
|
+
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
1252
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1253
|
+
* @see customDelete for the plain version.
|
|
1254
|
+
*/
|
|
1255
|
+
customDeleteWithHTTPInfo({ path, parameters }, requestOptions) {
|
|
1256
|
+
validateRequired("path", "customDeleteWithHTTPInfo", path);
|
|
1257
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1258
|
+
const headers = {};
|
|
1259
|
+
const queryParameters = parameters ? parameters : {};
|
|
1260
|
+
const request = {
|
|
1261
|
+
method: "DELETE",
|
|
1262
|
+
path: requestPath,
|
|
1263
|
+
queryParameters,
|
|
1264
|
+
headers
|
|
1265
|
+
};
|
|
1266
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1267
|
+
},
|
|
879
1268
|
/**
|
|
880
1269
|
* This method lets you send requests to the Algolia REST API.
|
|
881
1270
|
* @param customGet - The customGet object.
|
|
@@ -896,6 +1285,29 @@ function createSearchClient({
|
|
|
896
1285
|
};
|
|
897
1286
|
return transporter.request(request, requestOptions);
|
|
898
1287
|
},
|
|
1288
|
+
/**
|
|
1289
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1290
|
+
*
|
|
1291
|
+
* 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.
|
|
1292
|
+
* @param customGet - The customGet object.
|
|
1293
|
+
* @param customGet.path - Path of the endpoint, for example `1/newFeature`.
|
|
1294
|
+
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
1295
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1296
|
+
* @see customGet for the plain version.
|
|
1297
|
+
*/
|
|
1298
|
+
customGetWithHTTPInfo({ path, parameters }, requestOptions) {
|
|
1299
|
+
validateRequired("path", "customGetWithHTTPInfo", path);
|
|
1300
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1301
|
+
const headers = {};
|
|
1302
|
+
const queryParameters = parameters ? parameters : {};
|
|
1303
|
+
const request = {
|
|
1304
|
+
method: "GET",
|
|
1305
|
+
path: requestPath,
|
|
1306
|
+
queryParameters,
|
|
1307
|
+
headers
|
|
1308
|
+
};
|
|
1309
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1310
|
+
},
|
|
899
1311
|
/**
|
|
900
1312
|
* This method lets you send requests to the Algolia REST API.
|
|
901
1313
|
* @param customPost - The customPost object.
|
|
@@ -918,6 +1330,31 @@ function createSearchClient({
|
|
|
918
1330
|
};
|
|
919
1331
|
return transporter.request(request, requestOptions);
|
|
920
1332
|
},
|
|
1333
|
+
/**
|
|
1334
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1335
|
+
*
|
|
1336
|
+
* 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.
|
|
1337
|
+
* @param customPost - The customPost object.
|
|
1338
|
+
* @param customPost.path - Path of the endpoint, for example `1/newFeature`.
|
|
1339
|
+
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
1340
|
+
* @param customPost.body - Parameters to send with the custom request.
|
|
1341
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1342
|
+
* @see customPost for the plain version.
|
|
1343
|
+
*/
|
|
1344
|
+
customPostWithHTTPInfo({ path, parameters, body }, requestOptions) {
|
|
1345
|
+
validateRequired("path", "customPostWithHTTPInfo", path);
|
|
1346
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1347
|
+
const headers = {};
|
|
1348
|
+
const queryParameters = parameters ? parameters : {};
|
|
1349
|
+
const request = {
|
|
1350
|
+
method: "POST",
|
|
1351
|
+
path: requestPath,
|
|
1352
|
+
queryParameters,
|
|
1353
|
+
headers,
|
|
1354
|
+
data: body ? body : {}
|
|
1355
|
+
};
|
|
1356
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1357
|
+
},
|
|
921
1358
|
/**
|
|
922
1359
|
* This method lets you send requests to the Algolia REST API.
|
|
923
1360
|
* @param customPut - The customPut object.
|
|
@@ -940,6 +1377,31 @@ function createSearchClient({
|
|
|
940
1377
|
};
|
|
941
1378
|
return transporter.request(request, requestOptions);
|
|
942
1379
|
},
|
|
1380
|
+
/**
|
|
1381
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1382
|
+
*
|
|
1383
|
+
* 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.
|
|
1384
|
+
* @param customPut - The customPut object.
|
|
1385
|
+
* @param customPut.path - Path of the endpoint, for example `1/newFeature`.
|
|
1386
|
+
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
1387
|
+
* @param customPut.body - Parameters to send with the custom request.
|
|
1388
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1389
|
+
* @see customPut for the plain version.
|
|
1390
|
+
*/
|
|
1391
|
+
customPutWithHTTPInfo({ path, parameters, body }, requestOptions) {
|
|
1392
|
+
validateRequired("path", "customPutWithHTTPInfo", path);
|
|
1393
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1394
|
+
const headers = {};
|
|
1395
|
+
const queryParameters = parameters ? parameters : {};
|
|
1396
|
+
const request = {
|
|
1397
|
+
method: "PUT",
|
|
1398
|
+
path: requestPath,
|
|
1399
|
+
queryParameters,
|
|
1400
|
+
headers,
|
|
1401
|
+
data: body ? body : {}
|
|
1402
|
+
};
|
|
1403
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1404
|
+
},
|
|
943
1405
|
/**
|
|
944
1406
|
* Deletes the API key.
|
|
945
1407
|
*
|
|
@@ -962,6 +1424,31 @@ function createSearchClient({
|
|
|
962
1424
|
};
|
|
963
1425
|
return transporter.request(request, requestOptions);
|
|
964
1426
|
},
|
|
1427
|
+
/**
|
|
1428
|
+
* Deletes the API key.
|
|
1429
|
+
*
|
|
1430
|
+
* 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.
|
|
1431
|
+
*
|
|
1432
|
+
* Required API Key ACLs:
|
|
1433
|
+
* - admin
|
|
1434
|
+
* @param deleteApiKey - The deleteApiKey object.
|
|
1435
|
+
* @param deleteApiKey.key - API key.
|
|
1436
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1437
|
+
* @see deleteApiKey for the plain version.
|
|
1438
|
+
*/
|
|
1439
|
+
deleteApiKeyWithHTTPInfo({ key }, requestOptions) {
|
|
1440
|
+
validateRequired("key", "deleteApiKeyWithHTTPInfo", key);
|
|
1441
|
+
const requestPath = "/1/keys/{key}".replace("{key}", encodeURIComponent(key));
|
|
1442
|
+
const headers = {};
|
|
1443
|
+
const queryParameters = {};
|
|
1444
|
+
const request = {
|
|
1445
|
+
method: "DELETE",
|
|
1446
|
+
path: requestPath,
|
|
1447
|
+
queryParameters,
|
|
1448
|
+
headers
|
|
1449
|
+
};
|
|
1450
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1451
|
+
},
|
|
965
1452
|
/**
|
|
966
1453
|
* 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).
|
|
967
1454
|
*
|
|
@@ -987,6 +1474,34 @@ function createSearchClient({
|
|
|
987
1474
|
};
|
|
988
1475
|
return transporter.request(request, requestOptions);
|
|
989
1476
|
},
|
|
1477
|
+
/**
|
|
1478
|
+
* 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).
|
|
1479
|
+
*
|
|
1480
|
+
* 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.
|
|
1481
|
+
*
|
|
1482
|
+
* Required API Key ACLs:
|
|
1483
|
+
* - deleteIndex
|
|
1484
|
+
* @param deleteBy - The deleteBy object.
|
|
1485
|
+
* @param deleteBy.indexName - Name of the index on which to perform the operation.
|
|
1486
|
+
* @param deleteBy.deleteByParams - The deleteByParams object.
|
|
1487
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1488
|
+
* @see deleteBy for the plain version.
|
|
1489
|
+
*/
|
|
1490
|
+
deleteByWithHTTPInfo({ indexName, deleteByParams }, requestOptions) {
|
|
1491
|
+
validateRequired("indexName", "deleteByWithHTTPInfo", indexName);
|
|
1492
|
+
validateRequired("deleteByParams", "deleteByWithHTTPInfo", deleteByParams);
|
|
1493
|
+
const requestPath = "/1/indexes/{indexName}/deleteByQuery".replace("{indexName}", encodeURIComponent(indexName));
|
|
1494
|
+
const headers = {};
|
|
1495
|
+
const queryParameters = {};
|
|
1496
|
+
const request = {
|
|
1497
|
+
method: "POST",
|
|
1498
|
+
path: requestPath,
|
|
1499
|
+
queryParameters,
|
|
1500
|
+
headers,
|
|
1501
|
+
data: deleteByParams
|
|
1502
|
+
};
|
|
1503
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1504
|
+
},
|
|
990
1505
|
/**
|
|
991
1506
|
* 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).
|
|
992
1507
|
*
|
|
@@ -1009,6 +1524,31 @@ function createSearchClient({
|
|
|
1009
1524
|
};
|
|
1010
1525
|
return transporter.request(request, requestOptions);
|
|
1011
1526
|
},
|
|
1527
|
+
/**
|
|
1528
|
+
* 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).
|
|
1529
|
+
*
|
|
1530
|
+
* 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.
|
|
1531
|
+
*
|
|
1532
|
+
* Required API Key ACLs:
|
|
1533
|
+
* - deleteIndex
|
|
1534
|
+
* @param deleteIndex - The deleteIndex object.
|
|
1535
|
+
* @param deleteIndex.indexName - Name of the index on which to perform the operation.
|
|
1536
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1537
|
+
* @see deleteIndex for the plain version.
|
|
1538
|
+
*/
|
|
1539
|
+
deleteIndexWithHTTPInfo({ indexName }, requestOptions) {
|
|
1540
|
+
validateRequired("indexName", "deleteIndexWithHTTPInfo", indexName);
|
|
1541
|
+
const requestPath = "/1/indexes/{indexName}".replace("{indexName}", encodeURIComponent(indexName));
|
|
1542
|
+
const headers = {};
|
|
1543
|
+
const queryParameters = {};
|
|
1544
|
+
const request = {
|
|
1545
|
+
method: "DELETE",
|
|
1546
|
+
path: requestPath,
|
|
1547
|
+
queryParameters,
|
|
1548
|
+
headers
|
|
1549
|
+
};
|
|
1550
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1551
|
+
},
|
|
1012
1552
|
/**
|
|
1013
1553
|
* 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).
|
|
1014
1554
|
*
|
|
@@ -1033,6 +1573,33 @@ function createSearchClient({
|
|
|
1033
1573
|
};
|
|
1034
1574
|
return transporter.request(request, requestOptions);
|
|
1035
1575
|
},
|
|
1576
|
+
/**
|
|
1577
|
+
* 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).
|
|
1578
|
+
*
|
|
1579
|
+
* 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.
|
|
1580
|
+
*
|
|
1581
|
+
* Required API Key ACLs:
|
|
1582
|
+
* - deleteObject
|
|
1583
|
+
* @param deleteObject - The deleteObject object.
|
|
1584
|
+
* @param deleteObject.indexName - Name of the index on which to perform the operation.
|
|
1585
|
+
* @param deleteObject.objectID - Unique record identifier.
|
|
1586
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1587
|
+
* @see deleteObject for the plain version.
|
|
1588
|
+
*/
|
|
1589
|
+
deleteObjectWithHTTPInfo({ indexName, objectID }, requestOptions) {
|
|
1590
|
+
validateRequired("indexName", "deleteObjectWithHTTPInfo", indexName);
|
|
1591
|
+
validateRequired("objectID", "deleteObjectWithHTTPInfo", objectID);
|
|
1592
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1593
|
+
const headers = {};
|
|
1594
|
+
const queryParameters = {};
|
|
1595
|
+
const request = {
|
|
1596
|
+
method: "DELETE",
|
|
1597
|
+
path: requestPath,
|
|
1598
|
+
queryParameters,
|
|
1599
|
+
headers
|
|
1600
|
+
};
|
|
1601
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1602
|
+
},
|
|
1036
1603
|
/**
|
|
1037
1604
|
* 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).
|
|
1038
1605
|
*
|
|
@@ -1061,6 +1628,37 @@ function createSearchClient({
|
|
|
1061
1628
|
};
|
|
1062
1629
|
return transporter.request(request, requestOptions);
|
|
1063
1630
|
},
|
|
1631
|
+
/**
|
|
1632
|
+
* 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).
|
|
1633
|
+
*
|
|
1634
|
+
* 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.
|
|
1635
|
+
*
|
|
1636
|
+
* Required API Key ACLs:
|
|
1637
|
+
* - editSettings
|
|
1638
|
+
* @param deleteRule - The deleteRule object.
|
|
1639
|
+
* @param deleteRule.indexName - Name of the index on which to perform the operation.
|
|
1640
|
+
* @param deleteRule.objectID - Unique identifier of a rule object.
|
|
1641
|
+
* @param deleteRule.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1642
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1643
|
+
* @see deleteRule for the plain version.
|
|
1644
|
+
*/
|
|
1645
|
+
deleteRuleWithHTTPInfo({ indexName, objectID, forwardToReplicas }, requestOptions) {
|
|
1646
|
+
validateRequired("indexName", "deleteRuleWithHTTPInfo", indexName);
|
|
1647
|
+
validateRequired("objectID", "deleteRuleWithHTTPInfo", objectID);
|
|
1648
|
+
const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1649
|
+
const headers = {};
|
|
1650
|
+
const queryParameters = {};
|
|
1651
|
+
if (forwardToReplicas !== void 0) {
|
|
1652
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1653
|
+
}
|
|
1654
|
+
const request = {
|
|
1655
|
+
method: "DELETE",
|
|
1656
|
+
path: requestPath,
|
|
1657
|
+
queryParameters,
|
|
1658
|
+
headers
|
|
1659
|
+
};
|
|
1660
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1661
|
+
},
|
|
1064
1662
|
/**
|
|
1065
1663
|
* Deletes a source from the list of allowed sources.
|
|
1066
1664
|
*
|
|
@@ -1083,6 +1681,31 @@ function createSearchClient({
|
|
|
1083
1681
|
};
|
|
1084
1682
|
return transporter.request(request, requestOptions);
|
|
1085
1683
|
},
|
|
1684
|
+
/**
|
|
1685
|
+
* Deletes a source from the list of allowed sources.
|
|
1686
|
+
*
|
|
1687
|
+
* 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.
|
|
1688
|
+
*
|
|
1689
|
+
* Required API Key ACLs:
|
|
1690
|
+
* - admin
|
|
1691
|
+
* @param deleteSource - The deleteSource object.
|
|
1692
|
+
* @param deleteSource.source - IP address range of the source.
|
|
1693
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1694
|
+
* @see deleteSource for the plain version.
|
|
1695
|
+
*/
|
|
1696
|
+
deleteSourceWithHTTPInfo({ source }, requestOptions) {
|
|
1697
|
+
validateRequired("source", "deleteSourceWithHTTPInfo", source);
|
|
1698
|
+
const requestPath = "/1/security/sources/{source}".replace("{source}", encodeURIComponent(source));
|
|
1699
|
+
const headers = {};
|
|
1700
|
+
const queryParameters = {};
|
|
1701
|
+
const request = {
|
|
1702
|
+
method: "DELETE",
|
|
1703
|
+
path: requestPath,
|
|
1704
|
+
queryParameters,
|
|
1705
|
+
headers
|
|
1706
|
+
};
|
|
1707
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1708
|
+
},
|
|
1086
1709
|
/**
|
|
1087
1710
|
* 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).
|
|
1088
1711
|
*
|
|
@@ -1112,7 +1735,38 @@ function createSearchClient({
|
|
|
1112
1735
|
return transporter.request(request, requestOptions);
|
|
1113
1736
|
},
|
|
1114
1737
|
/**
|
|
1115
|
-
*
|
|
1738
|
+
* 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).
|
|
1739
|
+
*
|
|
1740
|
+
* 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.
|
|
1741
|
+
*
|
|
1742
|
+
* Required API Key ACLs:
|
|
1743
|
+
* - editSettings
|
|
1744
|
+
* @param deleteSynonym - The deleteSynonym object.
|
|
1745
|
+
* @param deleteSynonym.indexName - Name of the index on which to perform the operation.
|
|
1746
|
+
* @param deleteSynonym.objectID - Unique identifier of a synonym object.
|
|
1747
|
+
* @param deleteSynonym.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1748
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1749
|
+
* @see deleteSynonym for the plain version.
|
|
1750
|
+
*/
|
|
1751
|
+
deleteSynonymWithHTTPInfo({ indexName, objectID, forwardToReplicas }, requestOptions) {
|
|
1752
|
+
validateRequired("indexName", "deleteSynonymWithHTTPInfo", indexName);
|
|
1753
|
+
validateRequired("objectID", "deleteSynonymWithHTTPInfo", objectID);
|
|
1754
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1755
|
+
const headers = {};
|
|
1756
|
+
const queryParameters = {};
|
|
1757
|
+
if (forwardToReplicas !== void 0) {
|
|
1758
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1759
|
+
}
|
|
1760
|
+
const request = {
|
|
1761
|
+
method: "DELETE",
|
|
1762
|
+
path: requestPath,
|
|
1763
|
+
queryParameters,
|
|
1764
|
+
headers
|
|
1765
|
+
};
|
|
1766
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1767
|
+
},
|
|
1768
|
+
/**
|
|
1769
|
+
* 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>`.
|
|
1116
1770
|
*
|
|
1117
1771
|
* Required API Key ACLs:
|
|
1118
1772
|
* - search
|
|
@@ -1133,6 +1787,31 @@ function createSearchClient({
|
|
|
1133
1787
|
};
|
|
1134
1788
|
return transporter.request(request, requestOptions);
|
|
1135
1789
|
},
|
|
1790
|
+
/**
|
|
1791
|
+
* 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>`.
|
|
1792
|
+
*
|
|
1793
|
+
* 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.
|
|
1794
|
+
*
|
|
1795
|
+
* Required API Key ACLs:
|
|
1796
|
+
* - search
|
|
1797
|
+
* @param getApiKey - The getApiKey object.
|
|
1798
|
+
* @param getApiKey.key - API key.
|
|
1799
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1800
|
+
* @see getApiKey for the plain version.
|
|
1801
|
+
*/
|
|
1802
|
+
getApiKeyWithHTTPInfo({ key }, requestOptions) {
|
|
1803
|
+
validateRequired("key", "getApiKeyWithHTTPInfo", key);
|
|
1804
|
+
const requestPath = "/1/keys/{key}".replace("{key}", encodeURIComponent(key));
|
|
1805
|
+
const headers = {};
|
|
1806
|
+
const queryParameters = {};
|
|
1807
|
+
const request = {
|
|
1808
|
+
method: "GET",
|
|
1809
|
+
path: requestPath,
|
|
1810
|
+
queryParameters,
|
|
1811
|
+
headers
|
|
1812
|
+
};
|
|
1813
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1814
|
+
},
|
|
1136
1815
|
/**
|
|
1137
1816
|
* Checks the status of a given application task.
|
|
1138
1817
|
*
|
|
@@ -1155,6 +1834,31 @@ function createSearchClient({
|
|
|
1155
1834
|
};
|
|
1156
1835
|
return transporter.request(request, requestOptions);
|
|
1157
1836
|
},
|
|
1837
|
+
/**
|
|
1838
|
+
* Checks the status of a given application task.
|
|
1839
|
+
*
|
|
1840
|
+
* 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.
|
|
1841
|
+
*
|
|
1842
|
+
* Required API Key ACLs:
|
|
1843
|
+
* - editSettings
|
|
1844
|
+
* @param getAppTask - The getAppTask object.
|
|
1845
|
+
* @param getAppTask.taskID - Unique task identifier.
|
|
1846
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1847
|
+
* @see getAppTask for the plain version.
|
|
1848
|
+
*/
|
|
1849
|
+
getAppTaskWithHTTPInfo({ taskID }, requestOptions) {
|
|
1850
|
+
validateRequired("taskID", "getAppTaskWithHTTPInfo", taskID);
|
|
1851
|
+
const requestPath = "/1/task/{taskID}".replace("{taskID}", encodeURIComponent(taskID));
|
|
1852
|
+
const headers = {};
|
|
1853
|
+
const queryParameters = {};
|
|
1854
|
+
const request = {
|
|
1855
|
+
method: "GET",
|
|
1856
|
+
path: requestPath,
|
|
1857
|
+
queryParameters,
|
|
1858
|
+
headers
|
|
1859
|
+
};
|
|
1860
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1861
|
+
},
|
|
1158
1862
|
/**
|
|
1159
1863
|
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
1160
1864
|
*
|
|
@@ -1174,6 +1878,28 @@ function createSearchClient({
|
|
|
1174
1878
|
};
|
|
1175
1879
|
return transporter.request(request, requestOptions);
|
|
1176
1880
|
},
|
|
1881
|
+
/**
|
|
1882
|
+
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
1883
|
+
*
|
|
1884
|
+
* 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.
|
|
1885
|
+
*
|
|
1886
|
+
* Required API Key ACLs:
|
|
1887
|
+
* - settings
|
|
1888
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1889
|
+
* @see getDictionaryLanguages for the plain version.
|
|
1890
|
+
*/
|
|
1891
|
+
getDictionaryLanguagesWithHTTPInfo(requestOptions) {
|
|
1892
|
+
const requestPath = "/1/dictionaries/*/languages";
|
|
1893
|
+
const headers = {};
|
|
1894
|
+
const queryParameters = {};
|
|
1895
|
+
const request = {
|
|
1896
|
+
method: "GET",
|
|
1897
|
+
path: requestPath,
|
|
1898
|
+
queryParameters,
|
|
1899
|
+
headers
|
|
1900
|
+
};
|
|
1901
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1902
|
+
},
|
|
1177
1903
|
/**
|
|
1178
1904
|
* Retrieves the languages for which standard dictionary entries are turned off.
|
|
1179
1905
|
*
|
|
@@ -1193,6 +1919,28 @@ function createSearchClient({
|
|
|
1193
1919
|
};
|
|
1194
1920
|
return transporter.request(request, requestOptions);
|
|
1195
1921
|
},
|
|
1922
|
+
/**
|
|
1923
|
+
* Retrieves the languages for which standard dictionary entries are turned off.
|
|
1924
|
+
*
|
|
1925
|
+
* 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.
|
|
1926
|
+
*
|
|
1927
|
+
* Required API Key ACLs:
|
|
1928
|
+
* - settings
|
|
1929
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1930
|
+
* @see getDictionarySettings for the plain version.
|
|
1931
|
+
*/
|
|
1932
|
+
getDictionarySettingsWithHTTPInfo(requestOptions) {
|
|
1933
|
+
const requestPath = "/1/dictionaries/*/settings";
|
|
1934
|
+
const headers = {};
|
|
1935
|
+
const queryParameters = {};
|
|
1936
|
+
const request = {
|
|
1937
|
+
method: "GET",
|
|
1938
|
+
path: requestPath,
|
|
1939
|
+
queryParameters,
|
|
1940
|
+
headers
|
|
1941
|
+
};
|
|
1942
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1943
|
+
},
|
|
1196
1944
|
/**
|
|
1197
1945
|
* 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.
|
|
1198
1946
|
*
|
|
@@ -1229,6 +1977,45 @@ function createSearchClient({
|
|
|
1229
1977
|
};
|
|
1230
1978
|
return transporter.request(request, requestOptions);
|
|
1231
1979
|
},
|
|
1980
|
+
/**
|
|
1981
|
+
* 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.
|
|
1982
|
+
*
|
|
1983
|
+
* 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.
|
|
1984
|
+
*
|
|
1985
|
+
* Required API Key ACLs:
|
|
1986
|
+
* - logs
|
|
1987
|
+
* @param getLogs - The getLogs object.
|
|
1988
|
+
* @param getLogs.offset - First log entry to retrieve. The most recent entries are listed first.
|
|
1989
|
+
* @param getLogs.length - Maximum number of entries to retrieve.
|
|
1990
|
+
* @param getLogs.indexName - Index for which to retrieve log entries. By default, log entries are retrieved for all indices.
|
|
1991
|
+
* @param getLogs.type - Type of log entries to retrieve. By default, all log entries are retrieved.
|
|
1992
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1993
|
+
* @see getLogs for the plain version.
|
|
1994
|
+
*/
|
|
1995
|
+
getLogsWithHTTPInfo({ offset, length, indexName, type } = {}, requestOptions = void 0) {
|
|
1996
|
+
const requestPath = "/1/logs";
|
|
1997
|
+
const headers = {};
|
|
1998
|
+
const queryParameters = {};
|
|
1999
|
+
if (offset !== void 0) {
|
|
2000
|
+
queryParameters["offset"] = offset.toString();
|
|
2001
|
+
}
|
|
2002
|
+
if (length !== void 0) {
|
|
2003
|
+
queryParameters["length"] = length.toString();
|
|
2004
|
+
}
|
|
2005
|
+
if (indexName !== void 0) {
|
|
2006
|
+
queryParameters["indexName"] = indexName.toString();
|
|
2007
|
+
}
|
|
2008
|
+
if (type !== void 0) {
|
|
2009
|
+
queryParameters["type"] = type.toString();
|
|
2010
|
+
}
|
|
2011
|
+
const request = {
|
|
2012
|
+
method: "GET",
|
|
2013
|
+
path: requestPath,
|
|
2014
|
+
queryParameters,
|
|
2015
|
+
headers
|
|
2016
|
+
};
|
|
2017
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2018
|
+
},
|
|
1232
2019
|
/**
|
|
1233
2020
|
* 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).
|
|
1234
2021
|
*
|
|
@@ -1257,6 +2044,37 @@ function createSearchClient({
|
|
|
1257
2044
|
};
|
|
1258
2045
|
return transporter.request(request, requestOptions);
|
|
1259
2046
|
},
|
|
2047
|
+
/**
|
|
2048
|
+
* 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).
|
|
2049
|
+
*
|
|
2050
|
+
* 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.
|
|
2051
|
+
*
|
|
2052
|
+
* Required API Key ACLs:
|
|
2053
|
+
* - search
|
|
2054
|
+
* @param getObject - The getObject object.
|
|
2055
|
+
* @param getObject.indexName - Name of the index on which to perform the operation.
|
|
2056
|
+
* @param getObject.objectID - Unique record identifier.
|
|
2057
|
+
* @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.
|
|
2058
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2059
|
+
* @see getObject for the plain version.
|
|
2060
|
+
*/
|
|
2061
|
+
getObjectWithHTTPInfo({ indexName, objectID, attributesToRetrieve }, requestOptions) {
|
|
2062
|
+
validateRequired("indexName", "getObjectWithHTTPInfo", indexName);
|
|
2063
|
+
validateRequired("objectID", "getObjectWithHTTPInfo", objectID);
|
|
2064
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2065
|
+
const headers = {};
|
|
2066
|
+
const queryParameters = {};
|
|
2067
|
+
if (attributesToRetrieve !== void 0) {
|
|
2068
|
+
queryParameters["attributesToRetrieve"] = attributesToRetrieve.toString();
|
|
2069
|
+
}
|
|
2070
|
+
const request = {
|
|
2071
|
+
method: "GET",
|
|
2072
|
+
path: requestPath,
|
|
2073
|
+
queryParameters,
|
|
2074
|
+
headers
|
|
2075
|
+
};
|
|
2076
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2077
|
+
},
|
|
1260
2078
|
/**
|
|
1261
2079
|
* Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
|
|
1262
2080
|
*
|
|
@@ -1282,6 +2100,34 @@ function createSearchClient({
|
|
|
1282
2100
|
};
|
|
1283
2101
|
return transporter.request(request, requestOptions);
|
|
1284
2102
|
},
|
|
2103
|
+
/**
|
|
2104
|
+
* Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
|
|
2105
|
+
*
|
|
2106
|
+
* 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.
|
|
2107
|
+
*
|
|
2108
|
+
* Required API Key ACLs:
|
|
2109
|
+
* - search
|
|
2110
|
+
* @param getObjectsParams - Request object.
|
|
2111
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2112
|
+
* @see getObjects for the plain version.
|
|
2113
|
+
*/
|
|
2114
|
+
getObjectsWithHTTPInfo(getObjectsParams, requestOptions) {
|
|
2115
|
+
validateRequired("getObjectsParams", "getObjectsWithHTTPInfo", getObjectsParams);
|
|
2116
|
+
validateRequired("getObjectsParams.requests", "getObjectsWithHTTPInfo", getObjectsParams.requests);
|
|
2117
|
+
const requestPath = "/1/indexes/*/objects";
|
|
2118
|
+
const headers = {};
|
|
2119
|
+
const queryParameters = {};
|
|
2120
|
+
const request = {
|
|
2121
|
+
method: "POST",
|
|
2122
|
+
path: requestPath,
|
|
2123
|
+
queryParameters,
|
|
2124
|
+
headers,
|
|
2125
|
+
data: getObjectsParams,
|
|
2126
|
+
useReadTransporter: true,
|
|
2127
|
+
cacheable: true
|
|
2128
|
+
};
|
|
2129
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2130
|
+
},
|
|
1285
2131
|
/**
|
|
1286
2132
|
* 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).
|
|
1287
2133
|
*
|
|
@@ -1307,42 +2153,50 @@ function createSearchClient({
|
|
|
1307
2153
|
return transporter.request(request, requestOptions);
|
|
1308
2154
|
},
|
|
1309
2155
|
/**
|
|
1310
|
-
* Retrieves
|
|
2156
|
+
* 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).
|
|
2157
|
+
*
|
|
2158
|
+
* 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.
|
|
1311
2159
|
*
|
|
1312
2160
|
* Required API Key ACLs:
|
|
1313
2161
|
* - settings
|
|
1314
|
-
* @param
|
|
1315
|
-
* @param
|
|
1316
|
-
* @param
|
|
2162
|
+
* @param getRule - The getRule object.
|
|
2163
|
+
* @param getRule.indexName - Name of the index on which to perform the operation.
|
|
2164
|
+
* @param getRule.objectID - Unique identifier of a rule object.
|
|
1317
2165
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2166
|
+
* @see getRule for the plain version.
|
|
1318
2167
|
*/
|
|
1319
|
-
|
|
1320
|
-
validateRequired("indexName", "
|
|
1321
|
-
|
|
2168
|
+
getRuleWithHTTPInfo({ indexName, objectID }, requestOptions) {
|
|
2169
|
+
validateRequired("indexName", "getRuleWithHTTPInfo", indexName);
|
|
2170
|
+
validateRequired("objectID", "getRuleWithHTTPInfo", objectID);
|
|
2171
|
+
const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1322
2172
|
const headers = {};
|
|
1323
2173
|
const queryParameters = {};
|
|
1324
|
-
if (getVersion !== void 0) {
|
|
1325
|
-
queryParameters["getVersion"] = getVersion.toString();
|
|
1326
|
-
}
|
|
1327
2174
|
const request = {
|
|
1328
2175
|
method: "GET",
|
|
1329
2176
|
path: requestPath,
|
|
1330
2177
|
queryParameters,
|
|
1331
2178
|
headers
|
|
1332
2179
|
};
|
|
1333
|
-
return transporter.
|
|
2180
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1334
2181
|
},
|
|
1335
2182
|
/**
|
|
1336
|
-
* Retrieves
|
|
2183
|
+
* Retrieves an object with non-null index settings.
|
|
1337
2184
|
*
|
|
1338
2185
|
* Required API Key ACLs:
|
|
1339
|
-
* -
|
|
2186
|
+
* - settings
|
|
2187
|
+
* @param getSettings - The getSettings object.
|
|
2188
|
+
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
2189
|
+
* @param getSettings.getVersion - When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.
|
|
1340
2190
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1341
2191
|
*/
|
|
1342
|
-
|
|
1343
|
-
|
|
2192
|
+
getSettings({ indexName, getVersion }, requestOptions) {
|
|
2193
|
+
validateRequired("indexName", "getSettings", indexName);
|
|
2194
|
+
const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
|
|
1344
2195
|
const headers = {};
|
|
1345
2196
|
const queryParameters = {};
|
|
2197
|
+
if (getVersion !== void 0) {
|
|
2198
|
+
queryParameters["getVersion"] = getVersion.toString();
|
|
2199
|
+
}
|
|
1346
2200
|
const request = {
|
|
1347
2201
|
method: "GET",
|
|
1348
2202
|
path: requestPath,
|
|
@@ -1352,43 +2206,43 @@ function createSearchClient({
|
|
|
1352
2206
|
return transporter.request(request, requestOptions);
|
|
1353
2207
|
},
|
|
1354
2208
|
/**
|
|
1355
|
-
* Retrieves
|
|
2209
|
+
* Retrieves an object with non-null index settings.
|
|
2210
|
+
*
|
|
2211
|
+
* 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.
|
|
1356
2212
|
*
|
|
1357
2213
|
* Required API Key ACLs:
|
|
1358
2214
|
* - settings
|
|
1359
|
-
* @param
|
|
1360
|
-
* @param
|
|
1361
|
-
* @param
|
|
2215
|
+
* @param getSettings - The getSettings object.
|
|
2216
|
+
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
2217
|
+
* @param getSettings.getVersion - When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.
|
|
1362
2218
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2219
|
+
* @see getSettings for the plain version.
|
|
1363
2220
|
*/
|
|
1364
|
-
|
|
1365
|
-
validateRequired("indexName", "
|
|
1366
|
-
|
|
1367
|
-
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2221
|
+
getSettingsWithHTTPInfo({ indexName, getVersion }, requestOptions) {
|
|
2222
|
+
validateRequired("indexName", "getSettingsWithHTTPInfo", indexName);
|
|
2223
|
+
const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
|
|
1368
2224
|
const headers = {};
|
|
1369
2225
|
const queryParameters = {};
|
|
2226
|
+
if (getVersion !== void 0) {
|
|
2227
|
+
queryParameters["getVersion"] = getVersion.toString();
|
|
2228
|
+
}
|
|
1370
2229
|
const request = {
|
|
1371
2230
|
method: "GET",
|
|
1372
2231
|
path: requestPath,
|
|
1373
2232
|
queryParameters,
|
|
1374
2233
|
headers
|
|
1375
2234
|
};
|
|
1376
|
-
return transporter.
|
|
2235
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1377
2236
|
},
|
|
1378
2237
|
/**
|
|
1379
|
-
*
|
|
2238
|
+
* Retrieves all allowed IP addresses with access to your application.
|
|
1380
2239
|
*
|
|
1381
2240
|
* Required API Key ACLs:
|
|
1382
|
-
* -
|
|
1383
|
-
* @param getTask - The getTask object.
|
|
1384
|
-
* @param getTask.indexName - Name of the index on which to perform the operation.
|
|
1385
|
-
* @param getTask.taskID - Unique task identifier.
|
|
2241
|
+
* - admin
|
|
1386
2242
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1387
2243
|
*/
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
validateRequired("taskID", "getTask", taskID);
|
|
1391
|
-
const requestPath = "/1/indexes/{indexName}/task/{taskID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{taskID}", encodeURIComponent(taskID));
|
|
2244
|
+
getSources(requestOptions) {
|
|
2245
|
+
const requestPath = "/1/security/sources";
|
|
1392
2246
|
const headers = {};
|
|
1393
2247
|
const queryParameters = {};
|
|
1394
2248
|
const request = {
|
|
@@ -1400,16 +2254,17 @@ function createSearchClient({
|
|
|
1400
2254
|
return transporter.request(request, requestOptions);
|
|
1401
2255
|
},
|
|
1402
2256
|
/**
|
|
1403
|
-
*
|
|
2257
|
+
* Retrieves all allowed IP addresses with access to your application.
|
|
2258
|
+
*
|
|
2259
|
+
* 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.
|
|
1404
2260
|
*
|
|
1405
2261
|
* Required API Key ACLs:
|
|
1406
2262
|
* - admin
|
|
1407
|
-
*
|
|
1408
|
-
* @deprecated
|
|
1409
2263
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2264
|
+
* @see getSources for the plain version.
|
|
1410
2265
|
*/
|
|
1411
|
-
|
|
1412
|
-
const requestPath = "/1/
|
|
2266
|
+
getSourcesWithHTTPInfo(requestOptions) {
|
|
2267
|
+
const requestPath = "/1/security/sources";
|
|
1413
2268
|
const headers = {};
|
|
1414
2269
|
const queryParameters = {};
|
|
1415
2270
|
const request = {
|
|
@@ -1418,7 +2273,154 @@ function createSearchClient({
|
|
|
1418
2273
|
queryParameters,
|
|
1419
2274
|
headers
|
|
1420
2275
|
};
|
|
1421
|
-
return transporter.
|
|
2276
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2277
|
+
},
|
|
2278
|
+
/**
|
|
2279
|
+
* 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).
|
|
2280
|
+
*
|
|
2281
|
+
* Required API Key ACLs:
|
|
2282
|
+
* - settings
|
|
2283
|
+
* @param getSynonym - The getSynonym object.
|
|
2284
|
+
* @param getSynonym.indexName - Name of the index on which to perform the operation.
|
|
2285
|
+
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
2286
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2287
|
+
*/
|
|
2288
|
+
getSynonym({ indexName, objectID }, requestOptions) {
|
|
2289
|
+
validateRequired("indexName", "getSynonym", indexName);
|
|
2290
|
+
validateRequired("objectID", "getSynonym", objectID);
|
|
2291
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2292
|
+
const headers = {};
|
|
2293
|
+
const queryParameters = {};
|
|
2294
|
+
const request = {
|
|
2295
|
+
method: "GET",
|
|
2296
|
+
path: requestPath,
|
|
2297
|
+
queryParameters,
|
|
2298
|
+
headers
|
|
2299
|
+
};
|
|
2300
|
+
return transporter.request(request, requestOptions);
|
|
2301
|
+
},
|
|
2302
|
+
/**
|
|
2303
|
+
* 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).
|
|
2304
|
+
*
|
|
2305
|
+
* 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.
|
|
2306
|
+
*
|
|
2307
|
+
* Required API Key ACLs:
|
|
2308
|
+
* - settings
|
|
2309
|
+
* @param getSynonym - The getSynonym object.
|
|
2310
|
+
* @param getSynonym.indexName - Name of the index on which to perform the operation.
|
|
2311
|
+
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
2312
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2313
|
+
* @see getSynonym for the plain version.
|
|
2314
|
+
*/
|
|
2315
|
+
getSynonymWithHTTPInfo({ indexName, objectID }, requestOptions) {
|
|
2316
|
+
validateRequired("indexName", "getSynonymWithHTTPInfo", indexName);
|
|
2317
|
+
validateRequired("objectID", "getSynonymWithHTTPInfo", objectID);
|
|
2318
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2319
|
+
const headers = {};
|
|
2320
|
+
const queryParameters = {};
|
|
2321
|
+
const request = {
|
|
2322
|
+
method: "GET",
|
|
2323
|
+
path: requestPath,
|
|
2324
|
+
queryParameters,
|
|
2325
|
+
headers
|
|
2326
|
+
};
|
|
2327
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2328
|
+
},
|
|
2329
|
+
/**
|
|
2330
|
+
* 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.
|
|
2331
|
+
*
|
|
2332
|
+
* Required API Key ACLs:
|
|
2333
|
+
* - addObject
|
|
2334
|
+
* @param getTask - The getTask object.
|
|
2335
|
+
* @param getTask.indexName - Name of the index on which to perform the operation.
|
|
2336
|
+
* @param getTask.taskID - Unique task identifier.
|
|
2337
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2338
|
+
*/
|
|
2339
|
+
getTask({ indexName, taskID }, requestOptions) {
|
|
2340
|
+
validateRequired("indexName", "getTask", indexName);
|
|
2341
|
+
validateRequired("taskID", "getTask", taskID);
|
|
2342
|
+
const requestPath = "/1/indexes/{indexName}/task/{taskID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{taskID}", encodeURIComponent(taskID));
|
|
2343
|
+
const headers = {};
|
|
2344
|
+
const queryParameters = {};
|
|
2345
|
+
const request = {
|
|
2346
|
+
method: "GET",
|
|
2347
|
+
path: requestPath,
|
|
2348
|
+
queryParameters,
|
|
2349
|
+
headers
|
|
2350
|
+
};
|
|
2351
|
+
return transporter.request(request, requestOptions);
|
|
2352
|
+
},
|
|
2353
|
+
/**
|
|
2354
|
+
* 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.
|
|
2355
|
+
*
|
|
2356
|
+
* 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.
|
|
2357
|
+
*
|
|
2358
|
+
* Required API Key ACLs:
|
|
2359
|
+
* - addObject
|
|
2360
|
+
* @param getTask - The getTask object.
|
|
2361
|
+
* @param getTask.indexName - Name of the index on which to perform the operation.
|
|
2362
|
+
* @param getTask.taskID - Unique task identifier.
|
|
2363
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2364
|
+
* @see getTask for the plain version.
|
|
2365
|
+
*/
|
|
2366
|
+
getTaskWithHTTPInfo({ indexName, taskID }, requestOptions) {
|
|
2367
|
+
validateRequired("indexName", "getTaskWithHTTPInfo", indexName);
|
|
2368
|
+
validateRequired("taskID", "getTaskWithHTTPInfo", taskID);
|
|
2369
|
+
const requestPath = "/1/indexes/{indexName}/task/{taskID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{taskID}", encodeURIComponent(taskID));
|
|
2370
|
+
const headers = {};
|
|
2371
|
+
const queryParameters = {};
|
|
2372
|
+
const request = {
|
|
2373
|
+
method: "GET",
|
|
2374
|
+
path: requestPath,
|
|
2375
|
+
queryParameters,
|
|
2376
|
+
headers
|
|
2377
|
+
};
|
|
2378
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2379
|
+
},
|
|
2380
|
+
/**
|
|
2381
|
+
* 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.
|
|
2382
|
+
*
|
|
2383
|
+
* Required API Key ACLs:
|
|
2384
|
+
* - admin
|
|
2385
|
+
*
|
|
2386
|
+
* @deprecated
|
|
2387
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2388
|
+
*/
|
|
2389
|
+
getTopUserIds(requestOptions) {
|
|
2390
|
+
const requestPath = "/1/clusters/mapping/top";
|
|
2391
|
+
const headers = {};
|
|
2392
|
+
const queryParameters = {};
|
|
2393
|
+
const request = {
|
|
2394
|
+
method: "GET",
|
|
2395
|
+
path: requestPath,
|
|
2396
|
+
queryParameters,
|
|
2397
|
+
headers
|
|
2398
|
+
};
|
|
2399
|
+
return transporter.request(request, requestOptions);
|
|
2400
|
+
},
|
|
2401
|
+
/**
|
|
2402
|
+
* 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.
|
|
2403
|
+
*
|
|
2404
|
+
* 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.
|
|
2405
|
+
*
|
|
2406
|
+
* Required API Key ACLs:
|
|
2407
|
+
* - admin
|
|
2408
|
+
*
|
|
2409
|
+
* @deprecated
|
|
2410
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2411
|
+
* @see getTopUserIds for the plain version.
|
|
2412
|
+
*/
|
|
2413
|
+
getTopUserIdsWithHTTPInfo(requestOptions) {
|
|
2414
|
+
const requestPath = "/1/clusters/mapping/top";
|
|
2415
|
+
const headers = {};
|
|
2416
|
+
const queryParameters = {};
|
|
2417
|
+
const request = {
|
|
2418
|
+
method: "GET",
|
|
2419
|
+
path: requestPath,
|
|
2420
|
+
queryParameters,
|
|
2421
|
+
headers
|
|
2422
|
+
};
|
|
2423
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1422
2424
|
},
|
|
1423
2425
|
/**
|
|
1424
2426
|
* 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.
|
|
@@ -1444,6 +2446,33 @@ function createSearchClient({
|
|
|
1444
2446
|
};
|
|
1445
2447
|
return transporter.request(request, requestOptions);
|
|
1446
2448
|
},
|
|
2449
|
+
/**
|
|
2450
|
+
* 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.
|
|
2451
|
+
*
|
|
2452
|
+
* 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.
|
|
2453
|
+
*
|
|
2454
|
+
* Required API Key ACLs:
|
|
2455
|
+
* - admin
|
|
2456
|
+
*
|
|
2457
|
+
* @deprecated
|
|
2458
|
+
* @param getUserId - The getUserId object.
|
|
2459
|
+
* @param getUserId.userID - Unique identifier of the user who makes the search request.
|
|
2460
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2461
|
+
* @see getUserId for the plain version.
|
|
2462
|
+
*/
|
|
2463
|
+
getUserIdWithHTTPInfo({ userID }, requestOptions) {
|
|
2464
|
+
validateRequired("userID", "getUserIdWithHTTPInfo", userID);
|
|
2465
|
+
const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
|
|
2466
|
+
const headers = {};
|
|
2467
|
+
const queryParameters = {};
|
|
2468
|
+
const request = {
|
|
2469
|
+
method: "GET",
|
|
2470
|
+
path: requestPath,
|
|
2471
|
+
queryParameters,
|
|
2472
|
+
headers
|
|
2473
|
+
};
|
|
2474
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2475
|
+
},
|
|
1447
2476
|
/**
|
|
1448
2477
|
* 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.
|
|
1449
2478
|
*
|
|
@@ -1470,6 +2499,35 @@ function createSearchClient({
|
|
|
1470
2499
|
};
|
|
1471
2500
|
return transporter.request(request, requestOptions);
|
|
1472
2501
|
},
|
|
2502
|
+
/**
|
|
2503
|
+
* 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.
|
|
2504
|
+
*
|
|
2505
|
+
* 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.
|
|
2506
|
+
*
|
|
2507
|
+
* Required API Key ACLs:
|
|
2508
|
+
* - admin
|
|
2509
|
+
*
|
|
2510
|
+
* @deprecated
|
|
2511
|
+
* @param hasPendingMappings - The hasPendingMappings object.
|
|
2512
|
+
* @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
|
|
2513
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2514
|
+
* @see hasPendingMappings for the plain version.
|
|
2515
|
+
*/
|
|
2516
|
+
hasPendingMappingsWithHTTPInfo({ getClusters } = {}, requestOptions = void 0) {
|
|
2517
|
+
const requestPath = "/1/clusters/mapping/pending";
|
|
2518
|
+
const headers = {};
|
|
2519
|
+
const queryParameters = {};
|
|
2520
|
+
if (getClusters !== void 0) {
|
|
2521
|
+
queryParameters["getClusters"] = getClusters.toString();
|
|
2522
|
+
}
|
|
2523
|
+
const request = {
|
|
2524
|
+
method: "GET",
|
|
2525
|
+
path: requestPath,
|
|
2526
|
+
queryParameters,
|
|
2527
|
+
headers
|
|
2528
|
+
};
|
|
2529
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2530
|
+
},
|
|
1473
2531
|
/**
|
|
1474
2532
|
* Lists all API keys associated with your Algolia application, including their permissions and restrictions.
|
|
1475
2533
|
*
|
|
@@ -1489,6 +2547,28 @@ function createSearchClient({
|
|
|
1489
2547
|
};
|
|
1490
2548
|
return transporter.request(request, requestOptions);
|
|
1491
2549
|
},
|
|
2550
|
+
/**
|
|
2551
|
+
* Lists all API keys associated with your Algolia application, including their permissions and restrictions.
|
|
2552
|
+
*
|
|
2553
|
+
* 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.
|
|
2554
|
+
*
|
|
2555
|
+
* Required API Key ACLs:
|
|
2556
|
+
* - admin
|
|
2557
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2558
|
+
* @see listApiKeys for the plain version.
|
|
2559
|
+
*/
|
|
2560
|
+
listApiKeysWithHTTPInfo(requestOptions) {
|
|
2561
|
+
const requestPath = "/1/keys";
|
|
2562
|
+
const headers = {};
|
|
2563
|
+
const queryParameters = {};
|
|
2564
|
+
const request = {
|
|
2565
|
+
method: "GET",
|
|
2566
|
+
path: requestPath,
|
|
2567
|
+
queryParameters,
|
|
2568
|
+
headers
|
|
2569
|
+
};
|
|
2570
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2571
|
+
},
|
|
1492
2572
|
/**
|
|
1493
2573
|
* Lists the available clusters in a multi-cluster setup.
|
|
1494
2574
|
*
|
|
@@ -1510,6 +2590,30 @@ function createSearchClient({
|
|
|
1510
2590
|
};
|
|
1511
2591
|
return transporter.request(request, requestOptions);
|
|
1512
2592
|
},
|
|
2593
|
+
/**
|
|
2594
|
+
* Lists the available clusters in a multi-cluster setup.
|
|
2595
|
+
*
|
|
2596
|
+
* 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.
|
|
2597
|
+
*
|
|
2598
|
+
* Required API Key ACLs:
|
|
2599
|
+
* - admin
|
|
2600
|
+
*
|
|
2601
|
+
* @deprecated
|
|
2602
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2603
|
+
* @see listClusters for the plain version.
|
|
2604
|
+
*/
|
|
2605
|
+
listClustersWithHTTPInfo(requestOptions) {
|
|
2606
|
+
const requestPath = "/1/clusters";
|
|
2607
|
+
const headers = {};
|
|
2608
|
+
const queryParameters = {};
|
|
2609
|
+
const request = {
|
|
2610
|
+
method: "GET",
|
|
2611
|
+
path: requestPath,
|
|
2612
|
+
queryParameters,
|
|
2613
|
+
headers
|
|
2614
|
+
};
|
|
2615
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2616
|
+
},
|
|
1513
2617
|
/**
|
|
1514
2618
|
* Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
|
|
1515
2619
|
*
|
|
@@ -1538,6 +2642,37 @@ function createSearchClient({
|
|
|
1538
2642
|
};
|
|
1539
2643
|
return transporter.request(request, requestOptions);
|
|
1540
2644
|
},
|
|
2645
|
+
/**
|
|
2646
|
+
* Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
|
|
2647
|
+
*
|
|
2648
|
+
* 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.
|
|
2649
|
+
*
|
|
2650
|
+
* Required API Key ACLs:
|
|
2651
|
+
* - listIndexes
|
|
2652
|
+
* @param listIndices - The listIndices object.
|
|
2653
|
+
* @param listIndices.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
2654
|
+
* @param listIndices.hitsPerPage - Number of hits per page.
|
|
2655
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2656
|
+
* @see listIndices for the plain version.
|
|
2657
|
+
*/
|
|
2658
|
+
listIndicesWithHTTPInfo({ page, hitsPerPage } = {}, requestOptions = void 0) {
|
|
2659
|
+
const requestPath = "/1/indexes";
|
|
2660
|
+
const headers = {};
|
|
2661
|
+
const queryParameters = {};
|
|
2662
|
+
if (page !== void 0) {
|
|
2663
|
+
queryParameters["page"] = page.toString();
|
|
2664
|
+
}
|
|
2665
|
+
if (hitsPerPage !== void 0) {
|
|
2666
|
+
queryParameters["hitsPerPage"] = hitsPerPage.toString();
|
|
2667
|
+
}
|
|
2668
|
+
const request = {
|
|
2669
|
+
method: "GET",
|
|
2670
|
+
path: requestPath,
|
|
2671
|
+
queryParameters,
|
|
2672
|
+
headers
|
|
2673
|
+
};
|
|
2674
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2675
|
+
},
|
|
1541
2676
|
/**
|
|
1542
2677
|
* 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.
|
|
1543
2678
|
*
|
|
@@ -1568,6 +2703,39 @@ function createSearchClient({
|
|
|
1568
2703
|
};
|
|
1569
2704
|
return transporter.request(request, requestOptions);
|
|
1570
2705
|
},
|
|
2706
|
+
/**
|
|
2707
|
+
* 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.
|
|
2708
|
+
*
|
|
2709
|
+
* 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.
|
|
2710
|
+
*
|
|
2711
|
+
* Required API Key ACLs:
|
|
2712
|
+
* - admin
|
|
2713
|
+
*
|
|
2714
|
+
* @deprecated
|
|
2715
|
+
* @param listUserIds - The listUserIds object.
|
|
2716
|
+
* @param listUserIds.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
2717
|
+
* @param listUserIds.hitsPerPage - Number of hits per page.
|
|
2718
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2719
|
+
* @see listUserIds for the plain version.
|
|
2720
|
+
*/
|
|
2721
|
+
listUserIdsWithHTTPInfo({ page, hitsPerPage } = {}, requestOptions = void 0) {
|
|
2722
|
+
const requestPath = "/1/clusters/mapping";
|
|
2723
|
+
const headers = {};
|
|
2724
|
+
const queryParameters = {};
|
|
2725
|
+
if (page !== void 0) {
|
|
2726
|
+
queryParameters["page"] = page.toString();
|
|
2727
|
+
}
|
|
2728
|
+
if (hitsPerPage !== void 0) {
|
|
2729
|
+
queryParameters["hitsPerPage"] = hitsPerPage.toString();
|
|
2730
|
+
}
|
|
2731
|
+
const request = {
|
|
2732
|
+
method: "GET",
|
|
2733
|
+
path: requestPath,
|
|
2734
|
+
queryParameters,
|
|
2735
|
+
headers
|
|
2736
|
+
};
|
|
2737
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2738
|
+
},
|
|
1571
2739
|
/**
|
|
1572
2740
|
* 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).
|
|
1573
2741
|
*
|
|
@@ -1591,6 +2759,32 @@ function createSearchClient({
|
|
|
1591
2759
|
};
|
|
1592
2760
|
return transporter.request(request, requestOptions);
|
|
1593
2761
|
},
|
|
2762
|
+
/**
|
|
2763
|
+
* 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).
|
|
2764
|
+
*
|
|
2765
|
+
* 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.
|
|
2766
|
+
*
|
|
2767
|
+
* Required API Key ACLs:
|
|
2768
|
+
* - addObject
|
|
2769
|
+
* @param batchParams - The batchParams object.
|
|
2770
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2771
|
+
* @see multipleBatch for the plain version.
|
|
2772
|
+
*/
|
|
2773
|
+
multipleBatchWithHTTPInfo(batchParams, requestOptions) {
|
|
2774
|
+
validateRequired("batchParams", "multipleBatchWithHTTPInfo", batchParams);
|
|
2775
|
+
validateRequired("batchParams.requests", "multipleBatchWithHTTPInfo", batchParams.requests);
|
|
2776
|
+
const requestPath = "/1/indexes/*/batch";
|
|
2777
|
+
const headers = {};
|
|
2778
|
+
const queryParameters = {};
|
|
2779
|
+
const request = {
|
|
2780
|
+
method: "POST",
|
|
2781
|
+
path: requestPath,
|
|
2782
|
+
queryParameters,
|
|
2783
|
+
headers,
|
|
2784
|
+
data: batchParams
|
|
2785
|
+
};
|
|
2786
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2787
|
+
},
|
|
1594
2788
|
/**
|
|
1595
2789
|
* 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).
|
|
1596
2790
|
*
|
|
@@ -1614,13 +2808,80 @@ function createSearchClient({
|
|
|
1614
2808
|
path: requestPath,
|
|
1615
2809
|
queryParameters,
|
|
1616
2810
|
headers,
|
|
1617
|
-
data: operationIndexParams
|
|
2811
|
+
data: operationIndexParams
|
|
2812
|
+
};
|
|
2813
|
+
return transporter.request(request, requestOptions);
|
|
2814
|
+
},
|
|
2815
|
+
/**
|
|
2816
|
+
* 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).
|
|
2817
|
+
*
|
|
2818
|
+
* 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.
|
|
2819
|
+
*
|
|
2820
|
+
* Required API Key ACLs:
|
|
2821
|
+
* - addObject
|
|
2822
|
+
* @param operationIndex - The operationIndex object.
|
|
2823
|
+
* @param operationIndex.indexName - Name of the index on which to perform the operation.
|
|
2824
|
+
* @param operationIndex.operationIndexParams - The operationIndexParams object.
|
|
2825
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2826
|
+
* @see operationIndex for the plain version.
|
|
2827
|
+
*/
|
|
2828
|
+
operationIndexWithHTTPInfo({ indexName, operationIndexParams }, requestOptions) {
|
|
2829
|
+
validateRequired("indexName", "operationIndexWithHTTPInfo", indexName);
|
|
2830
|
+
validateRequired("operationIndexParams", "operationIndexWithHTTPInfo", operationIndexParams);
|
|
2831
|
+
validateRequired("operationIndexParams.operation", "operationIndexWithHTTPInfo", operationIndexParams.operation);
|
|
2832
|
+
validateRequired(
|
|
2833
|
+
"operationIndexParams.destination",
|
|
2834
|
+
"operationIndexWithHTTPInfo",
|
|
2835
|
+
operationIndexParams.destination
|
|
2836
|
+
);
|
|
2837
|
+
const requestPath = "/1/indexes/{indexName}/operation".replace("{indexName}", encodeURIComponent(indexName));
|
|
2838
|
+
const headers = {};
|
|
2839
|
+
const queryParameters = {};
|
|
2840
|
+
const request = {
|
|
2841
|
+
method: "POST",
|
|
2842
|
+
path: requestPath,
|
|
2843
|
+
queryParameters,
|
|
2844
|
+
headers,
|
|
2845
|
+
data: operationIndexParams
|
|
2846
|
+
};
|
|
2847
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2848
|
+
},
|
|
2849
|
+
/**
|
|
2850
|
+
* 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).
|
|
2851
|
+
*
|
|
2852
|
+
* Required API Key ACLs:
|
|
2853
|
+
* - addObject
|
|
2854
|
+
* @param partialUpdateObject - The partialUpdateObject object.
|
|
2855
|
+
* @param partialUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
2856
|
+
* @param partialUpdateObject.objectID - Unique record identifier.
|
|
2857
|
+
* @param partialUpdateObject.attributesToUpdate - Attributes with their values.
|
|
2858
|
+
* @param partialUpdateObject.createIfNotExists - Whether to create a new record if it doesn\'t exist.
|
|
2859
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2860
|
+
*/
|
|
2861
|
+
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists }, requestOptions) {
|
|
2862
|
+
validateRequired("indexName", "partialUpdateObject", indexName);
|
|
2863
|
+
validateRequired("objectID", "partialUpdateObject", objectID);
|
|
2864
|
+
validateRequired("attributesToUpdate", "partialUpdateObject", attributesToUpdate);
|
|
2865
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2866
|
+
const headers = {};
|
|
2867
|
+
const queryParameters = {};
|
|
2868
|
+
if (createIfNotExists !== void 0) {
|
|
2869
|
+
queryParameters["createIfNotExists"] = createIfNotExists.toString();
|
|
2870
|
+
}
|
|
2871
|
+
const request = {
|
|
2872
|
+
method: "POST",
|
|
2873
|
+
path: requestPath,
|
|
2874
|
+
queryParameters,
|
|
2875
|
+
headers,
|
|
2876
|
+
data: attributesToUpdate
|
|
1618
2877
|
};
|
|
1619
2878
|
return transporter.request(request, requestOptions);
|
|
1620
2879
|
},
|
|
1621
2880
|
/**
|
|
1622
2881
|
* 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).
|
|
1623
2882
|
*
|
|
2883
|
+
* 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.
|
|
2884
|
+
*
|
|
1624
2885
|
* Required API Key ACLs:
|
|
1625
2886
|
* - addObject
|
|
1626
2887
|
* @param partialUpdateObject - The partialUpdateObject object.
|
|
@@ -1629,11 +2890,12 @@ function createSearchClient({
|
|
|
1629
2890
|
* @param partialUpdateObject.attributesToUpdate - Attributes with their values.
|
|
1630
2891
|
* @param partialUpdateObject.createIfNotExists - Whether to create a new record if it doesn\'t exist.
|
|
1631
2892
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2893
|
+
* @see partialUpdateObject for the plain version.
|
|
1632
2894
|
*/
|
|
1633
|
-
|
|
1634
|
-
validateRequired("indexName", "
|
|
1635
|
-
validateRequired("objectID", "
|
|
1636
|
-
validateRequired("attributesToUpdate", "
|
|
2895
|
+
partialUpdateObjectWithHTTPInfo({ indexName, objectID, attributesToUpdate, createIfNotExists }, requestOptions) {
|
|
2896
|
+
validateRequired("indexName", "partialUpdateObjectWithHTTPInfo", indexName);
|
|
2897
|
+
validateRequired("objectID", "partialUpdateObjectWithHTTPInfo", objectID);
|
|
2898
|
+
validateRequired("attributesToUpdate", "partialUpdateObjectWithHTTPInfo", attributesToUpdate);
|
|
1637
2899
|
const requestPath = "/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1638
2900
|
const headers = {};
|
|
1639
2901
|
const queryParameters = {};
|
|
@@ -1647,7 +2909,7 @@ function createSearchClient({
|
|
|
1647
2909
|
headers,
|
|
1648
2910
|
data: attributesToUpdate
|
|
1649
2911
|
};
|
|
1650
|
-
return transporter.
|
|
2912
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1651
2913
|
},
|
|
1652
2914
|
/**
|
|
1653
2915
|
* Deletes a user ID and its associated data from the clusters.
|
|
@@ -1673,6 +2935,33 @@ function createSearchClient({
|
|
|
1673
2935
|
};
|
|
1674
2936
|
return transporter.request(request, requestOptions);
|
|
1675
2937
|
},
|
|
2938
|
+
/**
|
|
2939
|
+
* Deletes a user ID and its associated data from the clusters.
|
|
2940
|
+
*
|
|
2941
|
+
* 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.
|
|
2942
|
+
*
|
|
2943
|
+
* Required API Key ACLs:
|
|
2944
|
+
* - admin
|
|
2945
|
+
*
|
|
2946
|
+
* @deprecated
|
|
2947
|
+
* @param removeUserId - The removeUserId object.
|
|
2948
|
+
* @param removeUserId.userID - Unique identifier of the user who makes the search request.
|
|
2949
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2950
|
+
* @see removeUserId for the plain version.
|
|
2951
|
+
*/
|
|
2952
|
+
removeUserIdWithHTTPInfo({ userID }, requestOptions) {
|
|
2953
|
+
validateRequired("userID", "removeUserIdWithHTTPInfo", userID);
|
|
2954
|
+
const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
|
|
2955
|
+
const headers = {};
|
|
2956
|
+
const queryParameters = {};
|
|
2957
|
+
const request = {
|
|
2958
|
+
method: "DELETE",
|
|
2959
|
+
path: requestPath,
|
|
2960
|
+
queryParameters,
|
|
2961
|
+
headers
|
|
2962
|
+
};
|
|
2963
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2964
|
+
},
|
|
1676
2965
|
/**
|
|
1677
2966
|
* Replaces the list of allowed sources.
|
|
1678
2967
|
*
|
|
@@ -1696,6 +2985,32 @@ function createSearchClient({
|
|
|
1696
2985
|
};
|
|
1697
2986
|
return transporter.request(request, requestOptions);
|
|
1698
2987
|
},
|
|
2988
|
+
/**
|
|
2989
|
+
* Replaces the list of allowed sources.
|
|
2990
|
+
*
|
|
2991
|
+
* 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.
|
|
2992
|
+
*
|
|
2993
|
+
* Required API Key ACLs:
|
|
2994
|
+
* - admin
|
|
2995
|
+
* @param replaceSources - The replaceSources object.
|
|
2996
|
+
* @param replaceSources.source - Allowed sources.
|
|
2997
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2998
|
+
* @see replaceSources for the plain version.
|
|
2999
|
+
*/
|
|
3000
|
+
replaceSourcesWithHTTPInfo({ source }, requestOptions) {
|
|
3001
|
+
validateRequired("source", "replaceSourcesWithHTTPInfo", source);
|
|
3002
|
+
const requestPath = "/1/security/sources";
|
|
3003
|
+
const headers = {};
|
|
3004
|
+
const queryParameters = {};
|
|
3005
|
+
const request = {
|
|
3006
|
+
method: "PUT",
|
|
3007
|
+
path: requestPath,
|
|
3008
|
+
queryParameters,
|
|
3009
|
+
headers,
|
|
3010
|
+
data: source
|
|
3011
|
+
};
|
|
3012
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3013
|
+
},
|
|
1699
3014
|
/**
|
|
1700
3015
|
* 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.
|
|
1701
3016
|
*
|
|
@@ -1718,6 +3033,31 @@ function createSearchClient({
|
|
|
1718
3033
|
};
|
|
1719
3034
|
return transporter.request(request, requestOptions);
|
|
1720
3035
|
},
|
|
3036
|
+
/**
|
|
3037
|
+
* 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.
|
|
3038
|
+
*
|
|
3039
|
+
* 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.
|
|
3040
|
+
*
|
|
3041
|
+
* Required API Key ACLs:
|
|
3042
|
+
* - admin
|
|
3043
|
+
* @param restoreApiKey - The restoreApiKey object.
|
|
3044
|
+
* @param restoreApiKey.key - API key.
|
|
3045
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3046
|
+
* @see restoreApiKey for the plain version.
|
|
3047
|
+
*/
|
|
3048
|
+
restoreApiKeyWithHTTPInfo({ key }, requestOptions) {
|
|
3049
|
+
validateRequired("key", "restoreApiKeyWithHTTPInfo", key);
|
|
3050
|
+
const requestPath = "/1/keys/{key}/restore".replace("{key}", encodeURIComponent(key));
|
|
3051
|
+
const headers = {};
|
|
3052
|
+
const queryParameters = {};
|
|
3053
|
+
const request = {
|
|
3054
|
+
method: "POST",
|
|
3055
|
+
path: requestPath,
|
|
3056
|
+
queryParameters,
|
|
3057
|
+
headers
|
|
3058
|
+
};
|
|
3059
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3060
|
+
},
|
|
1721
3061
|
/**
|
|
1722
3062
|
* 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).
|
|
1723
3063
|
*
|
|
@@ -1743,6 +3083,34 @@ function createSearchClient({
|
|
|
1743
3083
|
};
|
|
1744
3084
|
return transporter.request(request, requestOptions);
|
|
1745
3085
|
},
|
|
3086
|
+
/**
|
|
3087
|
+
* 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).
|
|
3088
|
+
*
|
|
3089
|
+
* 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.
|
|
3090
|
+
*
|
|
3091
|
+
* Required API Key ACLs:
|
|
3092
|
+
* - addObject
|
|
3093
|
+
* @param saveObject - The saveObject object.
|
|
3094
|
+
* @param saveObject.indexName - Name of the index on which to perform the operation.
|
|
3095
|
+
* @param saveObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
3096
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3097
|
+
* @see saveObject for the plain version.
|
|
3098
|
+
*/
|
|
3099
|
+
saveObjectWithHTTPInfo({ indexName, body }, requestOptions) {
|
|
3100
|
+
validateRequired("indexName", "saveObjectWithHTTPInfo", indexName);
|
|
3101
|
+
validateRequired("body", "saveObjectWithHTTPInfo", body);
|
|
3102
|
+
const requestPath = "/1/indexes/{indexName}".replace("{indexName}", encodeURIComponent(indexName));
|
|
3103
|
+
const headers = {};
|
|
3104
|
+
const queryParameters = {};
|
|
3105
|
+
const request = {
|
|
3106
|
+
method: "POST",
|
|
3107
|
+
path: requestPath,
|
|
3108
|
+
queryParameters,
|
|
3109
|
+
headers,
|
|
3110
|
+
data: body
|
|
3111
|
+
};
|
|
3112
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3113
|
+
},
|
|
1746
3114
|
/**
|
|
1747
3115
|
* 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).
|
|
1748
3116
|
*
|
|
@@ -1776,6 +3144,42 @@ function createSearchClient({
|
|
|
1776
3144
|
};
|
|
1777
3145
|
return transporter.request(request, requestOptions);
|
|
1778
3146
|
},
|
|
3147
|
+
/**
|
|
3148
|
+
* 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).
|
|
3149
|
+
*
|
|
3150
|
+
* 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.
|
|
3151
|
+
*
|
|
3152
|
+
* Required API Key ACLs:
|
|
3153
|
+
* - editSettings
|
|
3154
|
+
* @param saveRule - The saveRule object.
|
|
3155
|
+
* @param saveRule.indexName - Name of the index on which to perform the operation.
|
|
3156
|
+
* @param saveRule.objectID - Unique identifier of a rule object.
|
|
3157
|
+
* @param saveRule.rule - The rule object.
|
|
3158
|
+
* @param saveRule.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3159
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3160
|
+
* @see saveRule for the plain version.
|
|
3161
|
+
*/
|
|
3162
|
+
saveRuleWithHTTPInfo({ indexName, objectID, rule, forwardToReplicas }, requestOptions) {
|
|
3163
|
+
validateRequired("indexName", "saveRuleWithHTTPInfo", indexName);
|
|
3164
|
+
validateRequired("objectID", "saveRuleWithHTTPInfo", objectID);
|
|
3165
|
+
validateRequired("rule", "saveRuleWithHTTPInfo", rule);
|
|
3166
|
+
validateRequired("rule.objectID", "saveRuleWithHTTPInfo", rule.objectID);
|
|
3167
|
+
validateRequired("rule.consequence", "saveRuleWithHTTPInfo", rule.consequence);
|
|
3168
|
+
const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
3169
|
+
const headers = {};
|
|
3170
|
+
const queryParameters = {};
|
|
3171
|
+
if (forwardToReplicas !== void 0) {
|
|
3172
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3173
|
+
}
|
|
3174
|
+
const request = {
|
|
3175
|
+
method: "PUT",
|
|
3176
|
+
path: requestPath,
|
|
3177
|
+
queryParameters,
|
|
3178
|
+
headers,
|
|
3179
|
+
data: rule
|
|
3180
|
+
};
|
|
3181
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3182
|
+
},
|
|
1779
3183
|
/**
|
|
1780
3184
|
* 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).
|
|
1781
3185
|
*
|
|
@@ -1809,6 +3213,42 @@ function createSearchClient({
|
|
|
1809
3213
|
};
|
|
1810
3214
|
return transporter.request(request, requestOptions);
|
|
1811
3215
|
},
|
|
3216
|
+
/**
|
|
3217
|
+
* 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).
|
|
3218
|
+
*
|
|
3219
|
+
* 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.
|
|
3220
|
+
*
|
|
3221
|
+
* Required API Key ACLs:
|
|
3222
|
+
* - editSettings
|
|
3223
|
+
* @param saveRules - The saveRules object.
|
|
3224
|
+
* @param saveRules.indexName - Name of the index on which to perform the operation.
|
|
3225
|
+
* @param saveRules.rules - The rules object.
|
|
3226
|
+
* @param saveRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3227
|
+
* @param saveRules.clearExistingRules - Whether existing rules should be deleted before adding this batch.
|
|
3228
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3229
|
+
* @see saveRules for the plain version.
|
|
3230
|
+
*/
|
|
3231
|
+
saveRulesWithHTTPInfo({ indexName, rules, forwardToReplicas, clearExistingRules }, requestOptions) {
|
|
3232
|
+
validateRequired("indexName", "saveRulesWithHTTPInfo", indexName);
|
|
3233
|
+
validateRequired("rules", "saveRulesWithHTTPInfo", rules);
|
|
3234
|
+
const requestPath = "/1/indexes/{indexName}/rules/batch".replace("{indexName}", encodeURIComponent(indexName));
|
|
3235
|
+
const headers = {};
|
|
3236
|
+
const queryParameters = {};
|
|
3237
|
+
if (forwardToReplicas !== void 0) {
|
|
3238
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3239
|
+
}
|
|
3240
|
+
if (clearExistingRules !== void 0) {
|
|
3241
|
+
queryParameters["clearExistingRules"] = clearExistingRules.toString();
|
|
3242
|
+
}
|
|
3243
|
+
const request = {
|
|
3244
|
+
method: "POST",
|
|
3245
|
+
path: requestPath,
|
|
3246
|
+
queryParameters,
|
|
3247
|
+
headers,
|
|
3248
|
+
data: rules
|
|
3249
|
+
};
|
|
3250
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3251
|
+
},
|
|
1812
3252
|
/**
|
|
1813
3253
|
* 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).
|
|
1814
3254
|
*
|
|
@@ -1842,6 +3282,42 @@ function createSearchClient({
|
|
|
1842
3282
|
};
|
|
1843
3283
|
return transporter.request(request, requestOptions);
|
|
1844
3284
|
},
|
|
3285
|
+
/**
|
|
3286
|
+
* 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).
|
|
3287
|
+
*
|
|
3288
|
+
* 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.
|
|
3289
|
+
*
|
|
3290
|
+
* Required API Key ACLs:
|
|
3291
|
+
* - editSettings
|
|
3292
|
+
* @param saveSynonym - The saveSynonym object.
|
|
3293
|
+
* @param saveSynonym.indexName - Name of the index on which to perform the operation.
|
|
3294
|
+
* @param saveSynonym.objectID - Unique identifier of a synonym object.
|
|
3295
|
+
* @param saveSynonym.synonymHit - The synonymHit object.
|
|
3296
|
+
* @param saveSynonym.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3297
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3298
|
+
* @see saveSynonym for the plain version.
|
|
3299
|
+
*/
|
|
3300
|
+
saveSynonymWithHTTPInfo({ indexName, objectID, synonymHit, forwardToReplicas }, requestOptions) {
|
|
3301
|
+
validateRequired("indexName", "saveSynonymWithHTTPInfo", indexName);
|
|
3302
|
+
validateRequired("objectID", "saveSynonymWithHTTPInfo", objectID);
|
|
3303
|
+
validateRequired("synonymHit", "saveSynonymWithHTTPInfo", synonymHit);
|
|
3304
|
+
validateRequired("synonymHit.objectID", "saveSynonymWithHTTPInfo", synonymHit.objectID);
|
|
3305
|
+
validateRequired("synonymHit.type", "saveSynonymWithHTTPInfo", synonymHit.type);
|
|
3306
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
3307
|
+
const headers = {};
|
|
3308
|
+
const queryParameters = {};
|
|
3309
|
+
if (forwardToReplicas !== void 0) {
|
|
3310
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3311
|
+
}
|
|
3312
|
+
const request = {
|
|
3313
|
+
method: "PUT",
|
|
3314
|
+
path: requestPath,
|
|
3315
|
+
queryParameters,
|
|
3316
|
+
headers,
|
|
3317
|
+
data: synonymHit
|
|
3318
|
+
};
|
|
3319
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3320
|
+
},
|
|
1845
3321
|
/**
|
|
1846
3322
|
* 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).
|
|
1847
3323
|
*
|
|
@@ -1860,30 +3336,115 @@ function createSearchClient({
|
|
|
1860
3336
|
const requestPath = "/1/indexes/{indexName}/synonyms/batch".replace("{indexName}", encodeURIComponent(indexName));
|
|
1861
3337
|
const headers = {};
|
|
1862
3338
|
const queryParameters = {};
|
|
1863
|
-
if (forwardToReplicas !== void 0) {
|
|
1864
|
-
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1865
|
-
}
|
|
1866
|
-
if (replaceExistingSynonyms !== void 0) {
|
|
1867
|
-
queryParameters["replaceExistingSynonyms"] = replaceExistingSynonyms.toString();
|
|
1868
|
-
}
|
|
3339
|
+
if (forwardToReplicas !== void 0) {
|
|
3340
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3341
|
+
}
|
|
3342
|
+
if (replaceExistingSynonyms !== void 0) {
|
|
3343
|
+
queryParameters["replaceExistingSynonyms"] = replaceExistingSynonyms.toString();
|
|
3344
|
+
}
|
|
3345
|
+
const request = {
|
|
3346
|
+
method: "POST",
|
|
3347
|
+
path: requestPath,
|
|
3348
|
+
queryParameters,
|
|
3349
|
+
headers,
|
|
3350
|
+
data: synonymHit
|
|
3351
|
+
};
|
|
3352
|
+
return transporter.request(request, requestOptions);
|
|
3353
|
+
},
|
|
3354
|
+
/**
|
|
3355
|
+
* 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).
|
|
3356
|
+
*
|
|
3357
|
+
* 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.
|
|
3358
|
+
*
|
|
3359
|
+
* Required API Key ACLs:
|
|
3360
|
+
* - editSettings
|
|
3361
|
+
* @param saveSynonyms - The saveSynonyms object.
|
|
3362
|
+
* @param saveSynonyms.indexName - Name of the index on which to perform the operation.
|
|
3363
|
+
* @param saveSynonyms.synonymHit - The synonymHit object.
|
|
3364
|
+
* @param saveSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3365
|
+
* @param saveSynonyms.replaceExistingSynonyms - Whether to replace all synonyms in the index with the ones sent with this request.
|
|
3366
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3367
|
+
* @see saveSynonyms for the plain version.
|
|
3368
|
+
*/
|
|
3369
|
+
saveSynonymsWithHTTPInfo({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms }, requestOptions) {
|
|
3370
|
+
validateRequired("indexName", "saveSynonymsWithHTTPInfo", indexName);
|
|
3371
|
+
validateRequired("synonymHit", "saveSynonymsWithHTTPInfo", synonymHit);
|
|
3372
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/batch".replace("{indexName}", encodeURIComponent(indexName));
|
|
3373
|
+
const headers = {};
|
|
3374
|
+
const queryParameters = {};
|
|
3375
|
+
if (forwardToReplicas !== void 0) {
|
|
3376
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3377
|
+
}
|
|
3378
|
+
if (replaceExistingSynonyms !== void 0) {
|
|
3379
|
+
queryParameters["replaceExistingSynonyms"] = replaceExistingSynonyms.toString();
|
|
3380
|
+
}
|
|
3381
|
+
const request = {
|
|
3382
|
+
method: "POST",
|
|
3383
|
+
path: requestPath,
|
|
3384
|
+
queryParameters,
|
|
3385
|
+
headers,
|
|
3386
|
+
data: synonymHit
|
|
3387
|
+
};
|
|
3388
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3389
|
+
},
|
|
3390
|
+
/**
|
|
3391
|
+
* 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.
|
|
3392
|
+
*
|
|
3393
|
+
* Required API Key ACLs:
|
|
3394
|
+
* - search
|
|
3395
|
+
* @param searchMethodParams - Multi-query search request body. Results are returned in the same order as the requests.
|
|
3396
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3397
|
+
*/
|
|
3398
|
+
search(searchMethodParams, requestOptions) {
|
|
3399
|
+
if (searchMethodParams && Array.isArray(searchMethodParams)) {
|
|
3400
|
+
const newSignatureRequest = {
|
|
3401
|
+
requests: searchMethodParams.map(({ params, ...legacyRequest }) => {
|
|
3402
|
+
if (legacyRequest.type === "facet") {
|
|
3403
|
+
return {
|
|
3404
|
+
...legacyRequest,
|
|
3405
|
+
...params,
|
|
3406
|
+
type: "facet"
|
|
3407
|
+
};
|
|
3408
|
+
}
|
|
3409
|
+
return {
|
|
3410
|
+
...legacyRequest,
|
|
3411
|
+
...params,
|
|
3412
|
+
facet: void 0,
|
|
3413
|
+
maxFacetHits: void 0,
|
|
3414
|
+
facetQuery: void 0
|
|
3415
|
+
};
|
|
3416
|
+
})
|
|
3417
|
+
};
|
|
3418
|
+
searchMethodParams = newSignatureRequest;
|
|
3419
|
+
}
|
|
3420
|
+
validateRequired("searchMethodParams", "search", searchMethodParams);
|
|
3421
|
+
validateRequired("searchMethodParams.requests", "search", searchMethodParams.requests);
|
|
3422
|
+
const requestPath = "/1/indexes/*/queries";
|
|
3423
|
+
const headers = {};
|
|
3424
|
+
const queryParameters = {};
|
|
1869
3425
|
const request = {
|
|
1870
3426
|
method: "POST",
|
|
1871
3427
|
path: requestPath,
|
|
1872
3428
|
queryParameters,
|
|
1873
3429
|
headers,
|
|
1874
|
-
data:
|
|
3430
|
+
data: searchMethodParams,
|
|
3431
|
+
useReadTransporter: true,
|
|
3432
|
+
cacheable: true
|
|
1875
3433
|
};
|
|
1876
3434
|
return transporter.request(request, requestOptions);
|
|
1877
3435
|
},
|
|
1878
3436
|
/**
|
|
1879
3437
|
* 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.
|
|
1880
3438
|
*
|
|
3439
|
+
* 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.
|
|
3440
|
+
*
|
|
1881
3441
|
* Required API Key ACLs:
|
|
1882
3442
|
* - search
|
|
1883
3443
|
* @param searchMethodParams - Multi-query search request body. Results are returned in the same order as the requests.
|
|
1884
3444
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3445
|
+
* @see search for the plain version.
|
|
1885
3446
|
*/
|
|
1886
|
-
|
|
3447
|
+
searchWithHTTPInfo(searchMethodParams, requestOptions) {
|
|
1887
3448
|
if (searchMethodParams && Array.isArray(searchMethodParams)) {
|
|
1888
3449
|
const newSignatureRequest = {
|
|
1889
3450
|
requests: searchMethodParams.map(({ params, ...legacyRequest }) => {
|
|
@@ -1905,8 +3466,8 @@ function createSearchClient({
|
|
|
1905
3466
|
};
|
|
1906
3467
|
searchMethodParams = newSignatureRequest;
|
|
1907
3468
|
}
|
|
1908
|
-
validateRequired("searchMethodParams", "
|
|
1909
|
-
validateRequired("searchMethodParams.requests", "
|
|
3469
|
+
validateRequired("searchMethodParams", "searchWithHTTPInfo", searchMethodParams);
|
|
3470
|
+
validateRequired("searchMethodParams.requests", "searchWithHTTPInfo", searchMethodParams.requests);
|
|
1910
3471
|
const requestPath = "/1/indexes/*/queries";
|
|
1911
3472
|
const headers = {};
|
|
1912
3473
|
const queryParameters = {};
|
|
@@ -1919,7 +3480,7 @@ function createSearchClient({
|
|
|
1919
3480
|
useReadTransporter: true,
|
|
1920
3481
|
cacheable: true
|
|
1921
3482
|
};
|
|
1922
|
-
return transporter.
|
|
3483
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1923
3484
|
},
|
|
1924
3485
|
/**
|
|
1925
3486
|
* Searches for standard and custom dictionary entries.
|
|
@@ -1956,6 +3517,48 @@ function createSearchClient({
|
|
|
1956
3517
|
};
|
|
1957
3518
|
return transporter.request(request, requestOptions);
|
|
1958
3519
|
},
|
|
3520
|
+
/**
|
|
3521
|
+
* Searches for standard and custom dictionary entries.
|
|
3522
|
+
*
|
|
3523
|
+
* 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.
|
|
3524
|
+
*
|
|
3525
|
+
* Required API Key ACLs:
|
|
3526
|
+
* - settings
|
|
3527
|
+
* @param searchDictionaryEntries - The searchDictionaryEntries object.
|
|
3528
|
+
* @param searchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
3529
|
+
* @param searchDictionaryEntries.searchDictionaryEntriesParams - The searchDictionaryEntriesParams object.
|
|
3530
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3531
|
+
* @see searchDictionaryEntries for the plain version.
|
|
3532
|
+
*/
|
|
3533
|
+
searchDictionaryEntriesWithHTTPInfo({ dictionaryName, searchDictionaryEntriesParams }, requestOptions) {
|
|
3534
|
+
validateRequired("dictionaryName", "searchDictionaryEntriesWithHTTPInfo", dictionaryName);
|
|
3535
|
+
validateRequired(
|
|
3536
|
+
"searchDictionaryEntriesParams",
|
|
3537
|
+
"searchDictionaryEntriesWithHTTPInfo",
|
|
3538
|
+
searchDictionaryEntriesParams
|
|
3539
|
+
);
|
|
3540
|
+
validateRequired(
|
|
3541
|
+
"searchDictionaryEntriesParams.query",
|
|
3542
|
+
"searchDictionaryEntriesWithHTTPInfo",
|
|
3543
|
+
searchDictionaryEntriesParams.query
|
|
3544
|
+
);
|
|
3545
|
+
const requestPath = "/1/dictionaries/{dictionaryName}/search".replace(
|
|
3546
|
+
"{dictionaryName}",
|
|
3547
|
+
encodeURIComponent(dictionaryName)
|
|
3548
|
+
);
|
|
3549
|
+
const headers = {};
|
|
3550
|
+
const queryParameters = {};
|
|
3551
|
+
const request = {
|
|
3552
|
+
method: "POST",
|
|
3553
|
+
path: requestPath,
|
|
3554
|
+
queryParameters,
|
|
3555
|
+
headers,
|
|
3556
|
+
data: searchDictionaryEntriesParams,
|
|
3557
|
+
useReadTransporter: true,
|
|
3558
|
+
cacheable: true
|
|
3559
|
+
};
|
|
3560
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3561
|
+
},
|
|
1959
3562
|
/**
|
|
1960
3563
|
* 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**.
|
|
1961
3564
|
*
|
|
@@ -1984,6 +3587,37 @@ function createSearchClient({
|
|
|
1984
3587
|
};
|
|
1985
3588
|
return transporter.request(request, requestOptions);
|
|
1986
3589
|
},
|
|
3590
|
+
/**
|
|
3591
|
+
* 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**.
|
|
3592
|
+
*
|
|
3593
|
+
* 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.
|
|
3594
|
+
*
|
|
3595
|
+
* Required API Key ACLs:
|
|
3596
|
+
* - search
|
|
3597
|
+
* @param searchForFacetValues - The searchForFacetValues object.
|
|
3598
|
+
* @param searchForFacetValues.indexName - Name of the index on which to perform the operation.
|
|
3599
|
+
* @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.
|
|
3600
|
+
* @param searchForFacetValues.searchForFacetValuesRequest - The searchForFacetValuesRequest object.
|
|
3601
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3602
|
+
* @see searchForFacetValues for the plain version.
|
|
3603
|
+
*/
|
|
3604
|
+
searchForFacetValuesWithHTTPInfo({ indexName, facetName, searchForFacetValuesRequest }, requestOptions) {
|
|
3605
|
+
validateRequired("indexName", "searchForFacetValuesWithHTTPInfo", indexName);
|
|
3606
|
+
validateRequired("facetName", "searchForFacetValuesWithHTTPInfo", facetName);
|
|
3607
|
+
const requestPath = "/1/indexes/{indexName}/facets/{facetName}/query".replace("{indexName}", encodeURIComponent(indexName)).replace("{facetName}", encodeURIComponent(facetName));
|
|
3608
|
+
const headers = {};
|
|
3609
|
+
const queryParameters = {};
|
|
3610
|
+
const request = {
|
|
3611
|
+
method: "POST",
|
|
3612
|
+
path: requestPath,
|
|
3613
|
+
queryParameters,
|
|
3614
|
+
headers,
|
|
3615
|
+
data: searchForFacetValuesRequest ? searchForFacetValuesRequest : {},
|
|
3616
|
+
useReadTransporter: true,
|
|
3617
|
+
cacheable: true
|
|
3618
|
+
};
|
|
3619
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3620
|
+
},
|
|
1987
3621
|
/**
|
|
1988
3622
|
* Searches for rules in your index.
|
|
1989
3623
|
*
|
|
@@ -2010,6 +3644,35 @@ function createSearchClient({
|
|
|
2010
3644
|
};
|
|
2011
3645
|
return transporter.request(request, requestOptions);
|
|
2012
3646
|
},
|
|
3647
|
+
/**
|
|
3648
|
+
* Searches for rules in your index.
|
|
3649
|
+
*
|
|
3650
|
+
* 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.
|
|
3651
|
+
*
|
|
3652
|
+
* Required API Key ACLs:
|
|
3653
|
+
* - settings
|
|
3654
|
+
* @param searchRules - The searchRules object.
|
|
3655
|
+
* @param searchRules.indexName - Name of the index on which to perform the operation.
|
|
3656
|
+
* @param searchRules.searchRulesParams - The searchRulesParams object.
|
|
3657
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3658
|
+
* @see searchRules for the plain version.
|
|
3659
|
+
*/
|
|
3660
|
+
searchRulesWithHTTPInfo({ indexName, searchRulesParams }, requestOptions) {
|
|
3661
|
+
validateRequired("indexName", "searchRulesWithHTTPInfo", indexName);
|
|
3662
|
+
const requestPath = "/1/indexes/{indexName}/rules/search".replace("{indexName}", encodeURIComponent(indexName));
|
|
3663
|
+
const headers = {};
|
|
3664
|
+
const queryParameters = {};
|
|
3665
|
+
const request = {
|
|
3666
|
+
method: "POST",
|
|
3667
|
+
path: requestPath,
|
|
3668
|
+
queryParameters,
|
|
3669
|
+
headers,
|
|
3670
|
+
data: searchRulesParams ? searchRulesParams : {},
|
|
3671
|
+
useReadTransporter: true,
|
|
3672
|
+
cacheable: true
|
|
3673
|
+
};
|
|
3674
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3675
|
+
},
|
|
2013
3676
|
/**
|
|
2014
3677
|
* 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.
|
|
2015
3678
|
*
|
|
@@ -2036,6 +3699,35 @@ function createSearchClient({
|
|
|
2036
3699
|
};
|
|
2037
3700
|
return transporter.request(request, requestOptions);
|
|
2038
3701
|
},
|
|
3702
|
+
/**
|
|
3703
|
+
* 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.
|
|
3704
|
+
*
|
|
3705
|
+
* 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.
|
|
3706
|
+
*
|
|
3707
|
+
* Required API Key ACLs:
|
|
3708
|
+
* - search
|
|
3709
|
+
* @param searchSingleIndex - The searchSingleIndex object.
|
|
3710
|
+
* @param searchSingleIndex.indexName - Name of the index on which to perform the operation.
|
|
3711
|
+
* @param searchSingleIndex.searchParams - The searchParams object.
|
|
3712
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3713
|
+
* @see searchSingleIndex for the plain version.
|
|
3714
|
+
*/
|
|
3715
|
+
searchSingleIndexWithHTTPInfo({ indexName, searchParams }, requestOptions) {
|
|
3716
|
+
validateRequired("indexName", "searchSingleIndexWithHTTPInfo", indexName);
|
|
3717
|
+
const requestPath = "/1/indexes/{indexName}/query".replace("{indexName}", encodeURIComponent(indexName));
|
|
3718
|
+
const headers = {};
|
|
3719
|
+
const queryParameters = {};
|
|
3720
|
+
const request = {
|
|
3721
|
+
method: "POST",
|
|
3722
|
+
path: requestPath,
|
|
3723
|
+
queryParameters,
|
|
3724
|
+
headers,
|
|
3725
|
+
data: searchParams ? searchParams : {},
|
|
3726
|
+
useReadTransporter: true,
|
|
3727
|
+
cacheable: true
|
|
3728
|
+
};
|
|
3729
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3730
|
+
},
|
|
2039
3731
|
/**
|
|
2040
3732
|
* Searches for synonyms in your index.
|
|
2041
3733
|
*
|
|
@@ -2065,6 +3757,38 @@ function createSearchClient({
|
|
|
2065
3757
|
};
|
|
2066
3758
|
return transporter.request(request, requestOptions);
|
|
2067
3759
|
},
|
|
3760
|
+
/**
|
|
3761
|
+
* Searches for synonyms in your index.
|
|
3762
|
+
*
|
|
3763
|
+
* 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.
|
|
3764
|
+
*
|
|
3765
|
+
* Required API Key ACLs:
|
|
3766
|
+
* - settings
|
|
3767
|
+
* @param searchSynonyms - The searchSynonyms object.
|
|
3768
|
+
* @param searchSynonyms.indexName - Name of the index on which to perform the operation.
|
|
3769
|
+
* @param searchSynonyms.searchSynonymsParams - Body of the `searchSynonyms` operation.
|
|
3770
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3771
|
+
* @see searchSynonyms for the plain version.
|
|
3772
|
+
*/
|
|
3773
|
+
searchSynonymsWithHTTPInfo({ indexName, searchSynonymsParams }, requestOptions) {
|
|
3774
|
+
validateRequired("indexName", "searchSynonymsWithHTTPInfo", indexName);
|
|
3775
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/search".replace(
|
|
3776
|
+
"{indexName}",
|
|
3777
|
+
encodeURIComponent(indexName)
|
|
3778
|
+
);
|
|
3779
|
+
const headers = {};
|
|
3780
|
+
const queryParameters = {};
|
|
3781
|
+
const request = {
|
|
3782
|
+
method: "POST",
|
|
3783
|
+
path: requestPath,
|
|
3784
|
+
queryParameters,
|
|
3785
|
+
headers,
|
|
3786
|
+
data: searchSynonymsParams ? searchSynonymsParams : {},
|
|
3787
|
+
useReadTransporter: true,
|
|
3788
|
+
cacheable: true
|
|
3789
|
+
};
|
|
3790
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3791
|
+
},
|
|
2068
3792
|
/**
|
|
2069
3793
|
* 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).
|
|
2070
3794
|
*
|
|
@@ -2092,6 +3816,36 @@ function createSearchClient({
|
|
|
2092
3816
|
};
|
|
2093
3817
|
return transporter.request(request, requestOptions);
|
|
2094
3818
|
},
|
|
3819
|
+
/**
|
|
3820
|
+
* 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).
|
|
3821
|
+
*
|
|
3822
|
+
* 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.
|
|
3823
|
+
*
|
|
3824
|
+
* Required API Key ACLs:
|
|
3825
|
+
* - admin
|
|
3826
|
+
*
|
|
3827
|
+
* @deprecated
|
|
3828
|
+
* @param searchUserIdsParams - The searchUserIdsParams object.
|
|
3829
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3830
|
+
* @see searchUserIds for the plain version.
|
|
3831
|
+
*/
|
|
3832
|
+
searchUserIdsWithHTTPInfo(searchUserIdsParams, requestOptions) {
|
|
3833
|
+
validateRequired("searchUserIdsParams", "searchUserIdsWithHTTPInfo", searchUserIdsParams);
|
|
3834
|
+
validateRequired("searchUserIdsParams.query", "searchUserIdsWithHTTPInfo", searchUserIdsParams.query);
|
|
3835
|
+
const requestPath = "/1/clusters/mapping/search";
|
|
3836
|
+
const headers = {};
|
|
3837
|
+
const queryParameters = {};
|
|
3838
|
+
const request = {
|
|
3839
|
+
method: "POST",
|
|
3840
|
+
path: requestPath,
|
|
3841
|
+
queryParameters,
|
|
3842
|
+
headers,
|
|
3843
|
+
data: searchUserIdsParams,
|
|
3844
|
+
useReadTransporter: true,
|
|
3845
|
+
cacheable: true
|
|
3846
|
+
};
|
|
3847
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3848
|
+
},
|
|
2095
3849
|
/**
|
|
2096
3850
|
* Turns standard stop word dictionary entries on or off for a given language.
|
|
2097
3851
|
*
|
|
@@ -2119,6 +3873,36 @@ function createSearchClient({
|
|
|
2119
3873
|
};
|
|
2120
3874
|
return transporter.request(request, requestOptions);
|
|
2121
3875
|
},
|
|
3876
|
+
/**
|
|
3877
|
+
* Turns standard stop word dictionary entries on or off for a given language.
|
|
3878
|
+
*
|
|
3879
|
+
* 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.
|
|
3880
|
+
*
|
|
3881
|
+
* Required API Key ACLs:
|
|
3882
|
+
* - editSettings
|
|
3883
|
+
* @param dictionarySettingsParams - The dictionarySettingsParams object.
|
|
3884
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3885
|
+
* @see setDictionarySettings for the plain version.
|
|
3886
|
+
*/
|
|
3887
|
+
setDictionarySettingsWithHTTPInfo(dictionarySettingsParams, requestOptions) {
|
|
3888
|
+
validateRequired("dictionarySettingsParams", "setDictionarySettingsWithHTTPInfo", dictionarySettingsParams);
|
|
3889
|
+
validateRequired(
|
|
3890
|
+
"dictionarySettingsParams.disableStandardEntries",
|
|
3891
|
+
"setDictionarySettingsWithHTTPInfo",
|
|
3892
|
+
dictionarySettingsParams.disableStandardEntries
|
|
3893
|
+
);
|
|
3894
|
+
const requestPath = "/1/dictionaries/*/settings";
|
|
3895
|
+
const headers = {};
|
|
3896
|
+
const queryParameters = {};
|
|
3897
|
+
const request = {
|
|
3898
|
+
method: "PUT",
|
|
3899
|
+
path: requestPath,
|
|
3900
|
+
queryParameters,
|
|
3901
|
+
headers,
|
|
3902
|
+
data: dictionarySettingsParams
|
|
3903
|
+
};
|
|
3904
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3905
|
+
},
|
|
2122
3906
|
/**
|
|
2123
3907
|
* 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.
|
|
2124
3908
|
*
|
|
@@ -2148,6 +3932,38 @@ function createSearchClient({
|
|
|
2148
3932
|
};
|
|
2149
3933
|
return transporter.request(request, requestOptions);
|
|
2150
3934
|
},
|
|
3935
|
+
/**
|
|
3936
|
+
* 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.
|
|
3937
|
+
*
|
|
3938
|
+
* 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.
|
|
3939
|
+
*
|
|
3940
|
+
* Required API Key ACLs:
|
|
3941
|
+
* - editSettings
|
|
3942
|
+
* @param setSettings - The setSettings object.
|
|
3943
|
+
* @param setSettings.indexName - Name of the index on which to perform the operation.
|
|
3944
|
+
* @param setSettings.indexSettings - The indexSettings object.
|
|
3945
|
+
* @param setSettings.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3946
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3947
|
+
* @see setSettings for the plain version.
|
|
3948
|
+
*/
|
|
3949
|
+
setSettingsWithHTTPInfo({ indexName, indexSettings, forwardToReplicas }, requestOptions) {
|
|
3950
|
+
validateRequired("indexName", "setSettingsWithHTTPInfo", indexName);
|
|
3951
|
+
validateRequired("indexSettings", "setSettingsWithHTTPInfo", indexSettings);
|
|
3952
|
+
const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
|
|
3953
|
+
const headers = {};
|
|
3954
|
+
const queryParameters = {};
|
|
3955
|
+
if (forwardToReplicas !== void 0) {
|
|
3956
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3957
|
+
}
|
|
3958
|
+
const request = {
|
|
3959
|
+
method: "PUT",
|
|
3960
|
+
path: requestPath,
|
|
3961
|
+
queryParameters,
|
|
3962
|
+
headers,
|
|
3963
|
+
data: indexSettings
|
|
3964
|
+
};
|
|
3965
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3966
|
+
},
|
|
2151
3967
|
/**
|
|
2152
3968
|
* Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
|
|
2153
3969
|
*
|
|
@@ -2173,6 +3989,35 @@ function createSearchClient({
|
|
|
2173
3989
|
data: apiKey
|
|
2174
3990
|
};
|
|
2175
3991
|
return transporter.request(request, requestOptions);
|
|
3992
|
+
},
|
|
3993
|
+
/**
|
|
3994
|
+
* Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
|
|
3995
|
+
*
|
|
3996
|
+
* 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.
|
|
3997
|
+
*
|
|
3998
|
+
* Required API Key ACLs:
|
|
3999
|
+
* - admin
|
|
4000
|
+
* @param updateApiKey - The updateApiKey object.
|
|
4001
|
+
* @param updateApiKey.key - API key.
|
|
4002
|
+
* @param updateApiKey.apiKey - The apiKey object.
|
|
4003
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4004
|
+
* @see updateApiKey for the plain version.
|
|
4005
|
+
*/
|
|
4006
|
+
updateApiKeyWithHTTPInfo({ key, apiKey }, requestOptions) {
|
|
4007
|
+
validateRequired("key", "updateApiKeyWithHTTPInfo", key);
|
|
4008
|
+
validateRequired("apiKey", "updateApiKeyWithHTTPInfo", apiKey);
|
|
4009
|
+
validateRequired("apiKey.acl", "updateApiKeyWithHTTPInfo", apiKey.acl);
|
|
4010
|
+
const requestPath = "/1/keys/{key}".replace("{key}", encodeURIComponent(key));
|
|
4011
|
+
const headers = {};
|
|
4012
|
+
const queryParameters = {};
|
|
4013
|
+
const request = {
|
|
4014
|
+
method: "PUT",
|
|
4015
|
+
path: requestPath,
|
|
4016
|
+
queryParameters,
|
|
4017
|
+
headers,
|
|
4018
|
+
data: apiKey
|
|
4019
|
+
};
|
|
4020
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2176
4021
|
}
|
|
2177
4022
|
};
|
|
2178
4023
|
}
|
|
@@ -2198,6 +4043,7 @@ function searchClient(appId, apiKey, options) {
|
|
|
2198
4043
|
requester: createXhrRequester(),
|
|
2199
4044
|
algoliaAgents: [{ segment: "Browser" }],
|
|
2200
4045
|
authMode: "WithinQueryParameters",
|
|
4046
|
+
requestIdChannel: "queryParameters",
|
|
2201
4047
|
responsesCache: createMemoryCache(),
|
|
2202
4048
|
requestsCache: createMemoryCache({ serializable: false }),
|
|
2203
4049
|
hostsCache: createFallbackableCache({
|