@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/src/searchClient.js
CHANGED
|
@@ -6,10 +6,12 @@ import {
|
|
|
6
6
|
createIterablePromise,
|
|
7
7
|
createTransporter,
|
|
8
8
|
getAlgoliaAgent,
|
|
9
|
+
logWarning,
|
|
9
10
|
shuffle,
|
|
10
|
-
validateRequired
|
|
11
|
+
validateRequired,
|
|
12
|
+
withRequestId
|
|
11
13
|
} from "@algolia/client-common";
|
|
12
|
-
var apiClientVersion = "5.
|
|
14
|
+
var apiClientVersion = "5.57.0";
|
|
13
15
|
function getDefaultHosts(appId) {
|
|
14
16
|
return [
|
|
15
17
|
{
|
|
@@ -129,6 +131,7 @@ function createSearchClient({
|
|
|
129
131
|
maxRetries = 100,
|
|
130
132
|
timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
|
|
131
133
|
}, requestOptions) {
|
|
134
|
+
requestOptions = withRequestId(transporter, requestOptions);
|
|
132
135
|
let retryCount = 0;
|
|
133
136
|
return createIterablePromise({
|
|
134
137
|
func: () => this.getTask({ indexName, taskID }, requestOptions),
|
|
@@ -156,6 +159,7 @@ function createSearchClient({
|
|
|
156
159
|
maxRetries = 100,
|
|
157
160
|
timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
|
|
158
161
|
}, requestOptions) {
|
|
162
|
+
requestOptions = withRequestId(transporter, requestOptions);
|
|
159
163
|
let retryCount = 0;
|
|
160
164
|
return createIterablePromise({
|
|
161
165
|
func: () => this.getAppTask({ taskID }, requestOptions),
|
|
@@ -187,6 +191,7 @@ function createSearchClient({
|
|
|
187
191
|
maxRetries = 100,
|
|
188
192
|
timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
|
|
189
193
|
}, requestOptions) {
|
|
194
|
+
requestOptions = withRequestId(transporter, requestOptions);
|
|
190
195
|
let retryCount = 0;
|
|
191
196
|
const baseIteratorOptions = {
|
|
192
197
|
aggregator: () => retryCount += 1,
|
|
@@ -242,6 +247,7 @@ function createSearchClient({
|
|
|
242
247
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `browse` method and merged with the transporter requestOptions.
|
|
243
248
|
*/
|
|
244
249
|
browseObjects({ indexName, browseParams, ...browseObjectsOptions }, requestOptions) {
|
|
250
|
+
requestOptions = withRequestId(transporter, requestOptions);
|
|
245
251
|
return createIterablePromise({
|
|
246
252
|
func: (previousResponse) => {
|
|
247
253
|
return this.browse(
|
|
@@ -272,6 +278,7 @@ function createSearchClient({
|
|
|
272
278
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchRules` method and merged with the transporter requestOptions.
|
|
273
279
|
*/
|
|
274
280
|
browseRules({ indexName, searchRulesParams, ...browseRulesOptions }, requestOptions) {
|
|
281
|
+
requestOptions = withRequestId(transporter, requestOptions);
|
|
275
282
|
const params = {
|
|
276
283
|
...searchRulesParams,
|
|
277
284
|
hitsPerPage: searchRulesParams?.hitsPerPage || 1e3
|
|
@@ -309,6 +316,7 @@ function createSearchClient({
|
|
|
309
316
|
searchSynonymsParams,
|
|
310
317
|
...browseSynonymsOptions
|
|
311
318
|
}, requestOptions) {
|
|
319
|
+
requestOptions = withRequestId(transporter, requestOptions);
|
|
312
320
|
const params = {
|
|
313
321
|
...searchSynonymsParams,
|
|
314
322
|
page: searchSynonymsParams?.page || 0,
|
|
@@ -354,6 +362,7 @@ function createSearchClient({
|
|
|
354
362
|
batchSize = 1e3,
|
|
355
363
|
maxRetries = 100
|
|
356
364
|
}, requestOptions) {
|
|
365
|
+
requestOptions = withRequestId(transporter, requestOptions);
|
|
357
366
|
let requests = [];
|
|
358
367
|
const responses = [];
|
|
359
368
|
const objectEntries = objects.entries();
|
|
@@ -366,7 +375,7 @@ function createSearchClient({
|
|
|
366
375
|
}
|
|
367
376
|
if (waitForTasks) {
|
|
368
377
|
for (const resp of responses) {
|
|
369
|
-
await this.waitForTask({ indexName, taskID: resp.taskID, maxRetries });
|
|
378
|
+
await this.waitForTask({ indexName, taskID: resp.taskID, maxRetries }, requestOptions);
|
|
370
379
|
}
|
|
371
380
|
}
|
|
372
381
|
return responses;
|
|
@@ -444,6 +453,8 @@ function createSearchClient({
|
|
|
444
453
|
* 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.
|
|
445
454
|
* See https://api-clients-automation.netlify.app/docs/custom-helpers/#replaceallobjects for implementation details.
|
|
446
455
|
*
|
|
456
|
+
* Warning: calling this method with an empty `objects` list replaces the index with an empty one, deleting all existing records.
|
|
457
|
+
*
|
|
447
458
|
* @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.
|
|
448
459
|
* @param replaceAllObjects - The `replaceAllObjects` object.
|
|
449
460
|
* @param replaceAllObjects.indexName - The `indexName` to replace `objects` in.
|
|
@@ -460,6 +471,13 @@ function createSearchClient({
|
|
|
460
471
|
scopes,
|
|
461
472
|
maxRetries = DEFAULT_REPLACE_ALL_OBJECTS_MAX_RETRIES
|
|
462
473
|
}, requestOptions) {
|
|
474
|
+
requestOptions = withRequestId(transporter, requestOptions);
|
|
475
|
+
if (objects.length === 0) {
|
|
476
|
+
logWarning(
|
|
477
|
+
transporter.logger,
|
|
478
|
+
`replaceAllObjects was called with an empty list of objects, which will delete all records currently in the "${indexName}" index.`
|
|
479
|
+
);
|
|
480
|
+
}
|
|
463
481
|
const randomSuffix = Math.floor(Math.random() * 1e6) + 1e5;
|
|
464
482
|
const tmpIndexName = `${indexName}_tmp_${randomSuffix}`;
|
|
465
483
|
if (scopes === void 0) {
|
|
@@ -481,11 +499,14 @@ function createSearchClient({
|
|
|
481
499
|
{ indexName: tmpIndexName, objects, waitForTasks: true, batchSize, maxRetries },
|
|
482
500
|
requestOptions
|
|
483
501
|
);
|
|
484
|
-
await this.waitForTask(
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
502
|
+
await this.waitForTask(
|
|
503
|
+
{
|
|
504
|
+
indexName: tmpIndexName,
|
|
505
|
+
taskID: copyOperationResponse.taskID,
|
|
506
|
+
maxRetries
|
|
507
|
+
},
|
|
508
|
+
requestOptions
|
|
509
|
+
);
|
|
489
510
|
copyOperationResponse = await this.operationIndex(
|
|
490
511
|
{
|
|
491
512
|
indexName,
|
|
@@ -497,11 +518,14 @@ function createSearchClient({
|
|
|
497
518
|
},
|
|
498
519
|
requestOptions
|
|
499
520
|
);
|
|
500
|
-
await this.waitForTask(
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
521
|
+
await this.waitForTask(
|
|
522
|
+
{
|
|
523
|
+
indexName: tmpIndexName,
|
|
524
|
+
taskID: copyOperationResponse.taskID,
|
|
525
|
+
maxRetries
|
|
526
|
+
},
|
|
527
|
+
requestOptions
|
|
528
|
+
);
|
|
505
529
|
const moveOperationResponse = await this.operationIndex(
|
|
506
530
|
{
|
|
507
531
|
indexName: tmpIndexName,
|
|
@@ -509,20 +533,23 @@ function createSearchClient({
|
|
|
509
533
|
},
|
|
510
534
|
requestOptions
|
|
511
535
|
);
|
|
512
|
-
await this.waitForTask(
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
536
|
+
await this.waitForTask(
|
|
537
|
+
{
|
|
538
|
+
indexName: tmpIndexName,
|
|
539
|
+
taskID: moveOperationResponse.taskID,
|
|
540
|
+
maxRetries
|
|
541
|
+
},
|
|
542
|
+
requestOptions
|
|
543
|
+
);
|
|
517
544
|
return { copyOperationResponse, batchResponses, moveOperationResponse };
|
|
518
545
|
} catch (error) {
|
|
519
|
-
await this.deleteIndex({ indexName: tmpIndexName });
|
|
546
|
+
await this.deleteIndex({ indexName: tmpIndexName }, requestOptions);
|
|
520
547
|
throw error;
|
|
521
548
|
}
|
|
522
549
|
},
|
|
523
|
-
async indexExists({ indexName }) {
|
|
550
|
+
async indexExists({ indexName }, requestOptions) {
|
|
524
551
|
try {
|
|
525
|
-
await this.getSettings({ indexName });
|
|
552
|
+
await this.getSettings({ indexName }, requestOptions);
|
|
526
553
|
} catch (error) {
|
|
527
554
|
if (error instanceof ApiError && error.status === 404) {
|
|
528
555
|
return false;
|
|
@@ -576,6 +603,32 @@ function createSearchClient({
|
|
|
576
603
|
};
|
|
577
604
|
return transporter.request(request, requestOptions);
|
|
578
605
|
},
|
|
606
|
+
/**
|
|
607
|
+
* Creates a new API key with specific permissions and restrictions.
|
|
608
|
+
*
|
|
609
|
+
* 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.
|
|
610
|
+
*
|
|
611
|
+
* Required API Key ACLs:
|
|
612
|
+
* - admin
|
|
613
|
+
* @param apiKey - The apiKey object.
|
|
614
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
615
|
+
* @see addApiKey for the plain version.
|
|
616
|
+
*/
|
|
617
|
+
addApiKeyWithHTTPInfo(apiKey, requestOptions) {
|
|
618
|
+
validateRequired("apiKey", "addApiKeyWithHTTPInfo", apiKey);
|
|
619
|
+
validateRequired("apiKey.acl", "addApiKeyWithHTTPInfo", apiKey.acl);
|
|
620
|
+
const requestPath = "/1/keys";
|
|
621
|
+
const headers = {};
|
|
622
|
+
const queryParameters = {};
|
|
623
|
+
const request = {
|
|
624
|
+
method: "POST",
|
|
625
|
+
path: requestPath,
|
|
626
|
+
queryParameters,
|
|
627
|
+
headers,
|
|
628
|
+
data: apiKey
|
|
629
|
+
};
|
|
630
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
631
|
+
},
|
|
579
632
|
/**
|
|
580
633
|
* 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).
|
|
581
634
|
*
|
|
@@ -603,6 +656,36 @@ function createSearchClient({
|
|
|
603
656
|
};
|
|
604
657
|
return transporter.request(request, requestOptions);
|
|
605
658
|
},
|
|
659
|
+
/**
|
|
660
|
+
* 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).
|
|
661
|
+
*
|
|
662
|
+
* 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.
|
|
663
|
+
*
|
|
664
|
+
* Required API Key ACLs:
|
|
665
|
+
* - addObject
|
|
666
|
+
* @param addOrUpdateObject - The addOrUpdateObject object.
|
|
667
|
+
* @param addOrUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
668
|
+
* @param addOrUpdateObject.objectID - Unique record identifier.
|
|
669
|
+
* @param addOrUpdateObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
670
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
671
|
+
* @see addOrUpdateObject for the plain version.
|
|
672
|
+
*/
|
|
673
|
+
addOrUpdateObjectWithHTTPInfo({ indexName, objectID, body }, requestOptions) {
|
|
674
|
+
validateRequired("indexName", "addOrUpdateObjectWithHTTPInfo", indexName);
|
|
675
|
+
validateRequired("objectID", "addOrUpdateObjectWithHTTPInfo", objectID);
|
|
676
|
+
validateRequired("body", "addOrUpdateObjectWithHTTPInfo", body);
|
|
677
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
678
|
+
const headers = {};
|
|
679
|
+
const queryParameters = {};
|
|
680
|
+
const request = {
|
|
681
|
+
method: "PUT",
|
|
682
|
+
path: requestPath,
|
|
683
|
+
queryParameters,
|
|
684
|
+
headers,
|
|
685
|
+
data: body
|
|
686
|
+
};
|
|
687
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
688
|
+
},
|
|
606
689
|
/**
|
|
607
690
|
* Adds a source to the list of allowed sources.
|
|
608
691
|
*
|
|
@@ -626,6 +709,32 @@ function createSearchClient({
|
|
|
626
709
|
};
|
|
627
710
|
return transporter.request(request, requestOptions);
|
|
628
711
|
},
|
|
712
|
+
/**
|
|
713
|
+
* Adds a source to the list of allowed sources.
|
|
714
|
+
*
|
|
715
|
+
* 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.
|
|
716
|
+
*
|
|
717
|
+
* Required API Key ACLs:
|
|
718
|
+
* - admin
|
|
719
|
+
* @param source - Source to add.
|
|
720
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
721
|
+
* @see appendSource for the plain version.
|
|
722
|
+
*/
|
|
723
|
+
appendSourceWithHTTPInfo(source, requestOptions) {
|
|
724
|
+
validateRequired("source", "appendSourceWithHTTPInfo", source);
|
|
725
|
+
validateRequired("source.source", "appendSourceWithHTTPInfo", source.source);
|
|
726
|
+
const requestPath = "/1/security/sources/append";
|
|
727
|
+
const headers = {};
|
|
728
|
+
const queryParameters = {};
|
|
729
|
+
const request = {
|
|
730
|
+
method: "POST",
|
|
731
|
+
path: requestPath,
|
|
732
|
+
queryParameters,
|
|
733
|
+
headers,
|
|
734
|
+
data: source
|
|
735
|
+
};
|
|
736
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
737
|
+
},
|
|
629
738
|
/**
|
|
630
739
|
* 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.
|
|
631
740
|
*
|
|
@@ -657,6 +766,40 @@ function createSearchClient({
|
|
|
657
766
|
};
|
|
658
767
|
return transporter.request(request, requestOptions);
|
|
659
768
|
},
|
|
769
|
+
/**
|
|
770
|
+
* 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.
|
|
771
|
+
*
|
|
772
|
+
* 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.
|
|
773
|
+
*
|
|
774
|
+
* Required API Key ACLs:
|
|
775
|
+
* - admin
|
|
776
|
+
*
|
|
777
|
+
* @deprecated
|
|
778
|
+
* @param assignUserId - The assignUserId object.
|
|
779
|
+
* @param assignUserId.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
780
|
+
* @param assignUserId.assignUserIdParams - The assignUserIdParams object.
|
|
781
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
782
|
+
* @see assignUserId for the plain version.
|
|
783
|
+
*/
|
|
784
|
+
assignUserIdWithHTTPInfo({ xAlgoliaUserID, assignUserIdParams }, requestOptions) {
|
|
785
|
+
validateRequired("xAlgoliaUserID", "assignUserIdWithHTTPInfo", xAlgoliaUserID);
|
|
786
|
+
validateRequired("assignUserIdParams", "assignUserIdWithHTTPInfo", assignUserIdParams);
|
|
787
|
+
validateRequired("assignUserIdParams.cluster", "assignUserIdWithHTTPInfo", assignUserIdParams.cluster);
|
|
788
|
+
const requestPath = "/1/clusters/mapping";
|
|
789
|
+
const headers = {};
|
|
790
|
+
const queryParameters = {};
|
|
791
|
+
if (xAlgoliaUserID !== void 0) {
|
|
792
|
+
headers["X-Algolia-User-ID"] = xAlgoliaUserID.toString();
|
|
793
|
+
}
|
|
794
|
+
const request = {
|
|
795
|
+
method: "POST",
|
|
796
|
+
path: requestPath,
|
|
797
|
+
queryParameters,
|
|
798
|
+
headers,
|
|
799
|
+
data: assignUserIdParams
|
|
800
|
+
};
|
|
801
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
802
|
+
},
|
|
660
803
|
/**
|
|
661
804
|
* 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).
|
|
662
805
|
*
|
|
@@ -683,6 +826,35 @@ function createSearchClient({
|
|
|
683
826
|
};
|
|
684
827
|
return transporter.request(request, requestOptions);
|
|
685
828
|
},
|
|
829
|
+
/**
|
|
830
|
+
* 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).
|
|
831
|
+
*
|
|
832
|
+
* 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.
|
|
833
|
+
*
|
|
834
|
+
* Required API Key ACLs:
|
|
835
|
+
* - addObject
|
|
836
|
+
* @param batch - The batch object.
|
|
837
|
+
* @param batch.indexName - Name of the index on which to perform the operation.
|
|
838
|
+
* @param batch.batchWriteParams - The batchWriteParams object.
|
|
839
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
840
|
+
* @see batch for the plain version.
|
|
841
|
+
*/
|
|
842
|
+
batchWithHTTPInfo({ indexName, batchWriteParams }, requestOptions) {
|
|
843
|
+
validateRequired("indexName", "batchWithHTTPInfo", indexName);
|
|
844
|
+
validateRequired("batchWriteParams", "batchWithHTTPInfo", batchWriteParams);
|
|
845
|
+
validateRequired("batchWriteParams.requests", "batchWithHTTPInfo", batchWriteParams.requests);
|
|
846
|
+
const requestPath = "/1/indexes/{indexName}/batch".replace("{indexName}", encodeURIComponent(indexName));
|
|
847
|
+
const headers = {};
|
|
848
|
+
const queryParameters = {};
|
|
849
|
+
const request = {
|
|
850
|
+
method: "POST",
|
|
851
|
+
path: requestPath,
|
|
852
|
+
queryParameters,
|
|
853
|
+
headers,
|
|
854
|
+
data: batchWriteParams
|
|
855
|
+
};
|
|
856
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
857
|
+
},
|
|
686
858
|
/**
|
|
687
859
|
* Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
|
|
688
860
|
*
|
|
@@ -715,6 +887,49 @@ function createSearchClient({
|
|
|
715
887
|
};
|
|
716
888
|
return transporter.request(request, requestOptions);
|
|
717
889
|
},
|
|
890
|
+
/**
|
|
891
|
+
* Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
|
|
892
|
+
*
|
|
893
|
+
* 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.
|
|
894
|
+
*
|
|
895
|
+
* Required API Key ACLs:
|
|
896
|
+
* - admin
|
|
897
|
+
*
|
|
898
|
+
* @deprecated
|
|
899
|
+
* @param batchAssignUserIds - The batchAssignUserIds object.
|
|
900
|
+
* @param batchAssignUserIds.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
901
|
+
* @param batchAssignUserIds.batchAssignUserIdsParams - The batchAssignUserIdsParams object.
|
|
902
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
903
|
+
* @see batchAssignUserIds for the plain version.
|
|
904
|
+
*/
|
|
905
|
+
batchAssignUserIdsWithHTTPInfo({ xAlgoliaUserID, batchAssignUserIdsParams }, requestOptions) {
|
|
906
|
+
validateRequired("xAlgoliaUserID", "batchAssignUserIdsWithHTTPInfo", xAlgoliaUserID);
|
|
907
|
+
validateRequired("batchAssignUserIdsParams", "batchAssignUserIdsWithHTTPInfo", batchAssignUserIdsParams);
|
|
908
|
+
validateRequired(
|
|
909
|
+
"batchAssignUserIdsParams.cluster",
|
|
910
|
+
"batchAssignUserIdsWithHTTPInfo",
|
|
911
|
+
batchAssignUserIdsParams.cluster
|
|
912
|
+
);
|
|
913
|
+
validateRequired(
|
|
914
|
+
"batchAssignUserIdsParams.users",
|
|
915
|
+
"batchAssignUserIdsWithHTTPInfo",
|
|
916
|
+
batchAssignUserIdsParams.users
|
|
917
|
+
);
|
|
918
|
+
const requestPath = "/1/clusters/mapping/batch";
|
|
919
|
+
const headers = {};
|
|
920
|
+
const queryParameters = {};
|
|
921
|
+
if (xAlgoliaUserID !== void 0) {
|
|
922
|
+
headers["X-Algolia-User-ID"] = xAlgoliaUserID.toString();
|
|
923
|
+
}
|
|
924
|
+
const request = {
|
|
925
|
+
method: "POST",
|
|
926
|
+
path: requestPath,
|
|
927
|
+
queryParameters,
|
|
928
|
+
headers,
|
|
929
|
+
data: batchAssignUserIdsParams
|
|
930
|
+
};
|
|
931
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
932
|
+
},
|
|
718
933
|
/**
|
|
719
934
|
* Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
|
|
720
935
|
*
|
|
@@ -748,6 +963,46 @@ function createSearchClient({
|
|
|
748
963
|
};
|
|
749
964
|
return transporter.request(request, requestOptions);
|
|
750
965
|
},
|
|
966
|
+
/**
|
|
967
|
+
* Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
|
|
968
|
+
*
|
|
969
|
+
* 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.
|
|
970
|
+
*
|
|
971
|
+
* Required API Key ACLs:
|
|
972
|
+
* - editSettings
|
|
973
|
+
* @param batchDictionaryEntries - The batchDictionaryEntries object.
|
|
974
|
+
* @param batchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
975
|
+
* @param batchDictionaryEntries.batchDictionaryEntriesParams - The batchDictionaryEntriesParams object.
|
|
976
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
977
|
+
* @see batchDictionaryEntries for the plain version.
|
|
978
|
+
*/
|
|
979
|
+
batchDictionaryEntriesWithHTTPInfo({ dictionaryName, batchDictionaryEntriesParams }, requestOptions) {
|
|
980
|
+
validateRequired("dictionaryName", "batchDictionaryEntriesWithHTTPInfo", dictionaryName);
|
|
981
|
+
validateRequired(
|
|
982
|
+
"batchDictionaryEntriesParams",
|
|
983
|
+
"batchDictionaryEntriesWithHTTPInfo",
|
|
984
|
+
batchDictionaryEntriesParams
|
|
985
|
+
);
|
|
986
|
+
validateRequired(
|
|
987
|
+
"batchDictionaryEntriesParams.requests",
|
|
988
|
+
"batchDictionaryEntriesWithHTTPInfo",
|
|
989
|
+
batchDictionaryEntriesParams.requests
|
|
990
|
+
);
|
|
991
|
+
const requestPath = "/1/dictionaries/{dictionaryName}/batch".replace(
|
|
992
|
+
"{dictionaryName}",
|
|
993
|
+
encodeURIComponent(dictionaryName)
|
|
994
|
+
);
|
|
995
|
+
const headers = {};
|
|
996
|
+
const queryParameters = {};
|
|
997
|
+
const request = {
|
|
998
|
+
method: "POST",
|
|
999
|
+
path: requestPath,
|
|
1000
|
+
queryParameters,
|
|
1001
|
+
headers,
|
|
1002
|
+
data: batchDictionaryEntriesParams
|
|
1003
|
+
};
|
|
1004
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1005
|
+
},
|
|
751
1006
|
/**
|
|
752
1007
|
* 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.
|
|
753
1008
|
*
|
|
@@ -773,6 +1028,34 @@ function createSearchClient({
|
|
|
773
1028
|
};
|
|
774
1029
|
return transporter.request(request, requestOptions);
|
|
775
1030
|
},
|
|
1031
|
+
/**
|
|
1032
|
+
* 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.
|
|
1033
|
+
*
|
|
1034
|
+
* 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.
|
|
1035
|
+
*
|
|
1036
|
+
* Required API Key ACLs:
|
|
1037
|
+
* - browse
|
|
1038
|
+
* @param browse - The browse object.
|
|
1039
|
+
* @param browse.indexName - Name of the index on which to perform the operation.
|
|
1040
|
+
* @param browse.browseParams - The browseParams object.
|
|
1041
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1042
|
+
* @see browse for the plain version.
|
|
1043
|
+
*/
|
|
1044
|
+
browseWithHTTPInfo({ indexName, browseParams }, requestOptions) {
|
|
1045
|
+
validateRequired("indexName", "browseWithHTTPInfo", indexName);
|
|
1046
|
+
const requestPath = "/1/indexes/{indexName}/browse".replace("{indexName}", encodeURIComponent(indexName));
|
|
1047
|
+
const headers = {};
|
|
1048
|
+
const queryParameters = {};
|
|
1049
|
+
const request = {
|
|
1050
|
+
method: "POST",
|
|
1051
|
+
path: requestPath,
|
|
1052
|
+
queryParameters,
|
|
1053
|
+
headers,
|
|
1054
|
+
data: browseParams ? browseParams : {},
|
|
1055
|
+
useReadTransporter: true
|
|
1056
|
+
};
|
|
1057
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1058
|
+
},
|
|
776
1059
|
/**
|
|
777
1060
|
* 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).
|
|
778
1061
|
*
|
|
@@ -795,6 +1078,31 @@ function createSearchClient({
|
|
|
795
1078
|
};
|
|
796
1079
|
return transporter.request(request, requestOptions);
|
|
797
1080
|
},
|
|
1081
|
+
/**
|
|
1082
|
+
* 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).
|
|
1083
|
+
*
|
|
1084
|
+
* 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.
|
|
1085
|
+
*
|
|
1086
|
+
* Required API Key ACLs:
|
|
1087
|
+
* - deleteIndex
|
|
1088
|
+
* @param clearObjects - The clearObjects object.
|
|
1089
|
+
* @param clearObjects.indexName - Name of the index on which to perform the operation.
|
|
1090
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1091
|
+
* @see clearObjects for the plain version.
|
|
1092
|
+
*/
|
|
1093
|
+
clearObjectsWithHTTPInfo({ indexName }, requestOptions) {
|
|
1094
|
+
validateRequired("indexName", "clearObjectsWithHTTPInfo", indexName);
|
|
1095
|
+
const requestPath = "/1/indexes/{indexName}/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
1096
|
+
const headers = {};
|
|
1097
|
+
const queryParameters = {};
|
|
1098
|
+
const request = {
|
|
1099
|
+
method: "POST",
|
|
1100
|
+
path: requestPath,
|
|
1101
|
+
queryParameters,
|
|
1102
|
+
headers
|
|
1103
|
+
};
|
|
1104
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1105
|
+
},
|
|
798
1106
|
/**
|
|
799
1107
|
* Deletes all rules from the index.
|
|
800
1108
|
*
|
|
@@ -822,18 +1130,21 @@ function createSearchClient({
|
|
|
822
1130
|
return transporter.request(request, requestOptions);
|
|
823
1131
|
},
|
|
824
1132
|
/**
|
|
825
|
-
* Deletes all
|
|
1133
|
+
* Deletes all rules from the index.
|
|
1134
|
+
*
|
|
1135
|
+
* 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.
|
|
826
1136
|
*
|
|
827
1137
|
* Required API Key ACLs:
|
|
828
1138
|
* - editSettings
|
|
829
|
-
* @param
|
|
830
|
-
* @param
|
|
831
|
-
* @param
|
|
1139
|
+
* @param clearRules - The clearRules object.
|
|
1140
|
+
* @param clearRules.indexName - Name of the index on which to perform the operation.
|
|
1141
|
+
* @param clearRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
832
1142
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1143
|
+
* @see clearRules for the plain version.
|
|
833
1144
|
*/
|
|
834
|
-
|
|
835
|
-
validateRequired("indexName", "
|
|
836
|
-
const requestPath = "/1/indexes/{indexName}/
|
|
1145
|
+
clearRulesWithHTTPInfo({ indexName, forwardToReplicas }, requestOptions) {
|
|
1146
|
+
validateRequired("indexName", "clearRulesWithHTTPInfo", indexName);
|
|
1147
|
+
const requestPath = "/1/indexes/{indexName}/rules/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
837
1148
|
const headers = {};
|
|
838
1149
|
const queryParameters = {};
|
|
839
1150
|
if (forwardToReplicas !== void 0) {
|
|
@@ -845,10 +1156,65 @@ function createSearchClient({
|
|
|
845
1156
|
queryParameters,
|
|
846
1157
|
headers
|
|
847
1158
|
};
|
|
848
|
-
return transporter.
|
|
1159
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
849
1160
|
},
|
|
850
1161
|
/**
|
|
851
|
-
*
|
|
1162
|
+
* Deletes all synonyms from the index.
|
|
1163
|
+
*
|
|
1164
|
+
* Required API Key ACLs:
|
|
1165
|
+
* - editSettings
|
|
1166
|
+
* @param clearSynonyms - The clearSynonyms object.
|
|
1167
|
+
* @param clearSynonyms.indexName - Name of the index on which to perform the operation.
|
|
1168
|
+
* @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1169
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1170
|
+
*/
|
|
1171
|
+
clearSynonyms({ indexName, forwardToReplicas }, requestOptions) {
|
|
1172
|
+
validateRequired("indexName", "clearSynonyms", indexName);
|
|
1173
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
1174
|
+
const headers = {};
|
|
1175
|
+
const queryParameters = {};
|
|
1176
|
+
if (forwardToReplicas !== void 0) {
|
|
1177
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1178
|
+
}
|
|
1179
|
+
const request = {
|
|
1180
|
+
method: "POST",
|
|
1181
|
+
path: requestPath,
|
|
1182
|
+
queryParameters,
|
|
1183
|
+
headers
|
|
1184
|
+
};
|
|
1185
|
+
return transporter.request(request, requestOptions);
|
|
1186
|
+
},
|
|
1187
|
+
/**
|
|
1188
|
+
* Deletes all synonyms from the index.
|
|
1189
|
+
*
|
|
1190
|
+
* 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.
|
|
1191
|
+
*
|
|
1192
|
+
* Required API Key ACLs:
|
|
1193
|
+
* - editSettings
|
|
1194
|
+
* @param clearSynonyms - The clearSynonyms object.
|
|
1195
|
+
* @param clearSynonyms.indexName - Name of the index on which to perform the operation.
|
|
1196
|
+
* @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1197
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1198
|
+
* @see clearSynonyms for the plain version.
|
|
1199
|
+
*/
|
|
1200
|
+
clearSynonymsWithHTTPInfo({ indexName, forwardToReplicas }, requestOptions) {
|
|
1201
|
+
validateRequired("indexName", "clearSynonymsWithHTTPInfo", indexName);
|
|
1202
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
1203
|
+
const headers = {};
|
|
1204
|
+
const queryParameters = {};
|
|
1205
|
+
if (forwardToReplicas !== void 0) {
|
|
1206
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1207
|
+
}
|
|
1208
|
+
const request = {
|
|
1209
|
+
method: "POST",
|
|
1210
|
+
path: requestPath,
|
|
1211
|
+
queryParameters,
|
|
1212
|
+
headers
|
|
1213
|
+
};
|
|
1214
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1215
|
+
},
|
|
1216
|
+
/**
|
|
1217
|
+
* This method lets you send requests to the Algolia REST API.
|
|
852
1218
|
* @param customDelete - The customDelete object.
|
|
853
1219
|
* @param customDelete.path - Path of the endpoint, for example `1/newFeature`.
|
|
854
1220
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -867,6 +1233,29 @@ function createSearchClient({
|
|
|
867
1233
|
};
|
|
868
1234
|
return transporter.request(request, requestOptions);
|
|
869
1235
|
},
|
|
1236
|
+
/**
|
|
1237
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1238
|
+
*
|
|
1239
|
+
* 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.
|
|
1240
|
+
* @param customDelete - The customDelete object.
|
|
1241
|
+
* @param customDelete.path - Path of the endpoint, for example `1/newFeature`.
|
|
1242
|
+
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
1243
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1244
|
+
* @see customDelete for the plain version.
|
|
1245
|
+
*/
|
|
1246
|
+
customDeleteWithHTTPInfo({ path, parameters }, requestOptions) {
|
|
1247
|
+
validateRequired("path", "customDeleteWithHTTPInfo", path);
|
|
1248
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1249
|
+
const headers = {};
|
|
1250
|
+
const queryParameters = parameters ? parameters : {};
|
|
1251
|
+
const request = {
|
|
1252
|
+
method: "DELETE",
|
|
1253
|
+
path: requestPath,
|
|
1254
|
+
queryParameters,
|
|
1255
|
+
headers
|
|
1256
|
+
};
|
|
1257
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1258
|
+
},
|
|
870
1259
|
/**
|
|
871
1260
|
* This method lets you send requests to the Algolia REST API.
|
|
872
1261
|
* @param customGet - The customGet object.
|
|
@@ -887,6 +1276,29 @@ function createSearchClient({
|
|
|
887
1276
|
};
|
|
888
1277
|
return transporter.request(request, requestOptions);
|
|
889
1278
|
},
|
|
1279
|
+
/**
|
|
1280
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1281
|
+
*
|
|
1282
|
+
* 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.
|
|
1283
|
+
* @param customGet - The customGet object.
|
|
1284
|
+
* @param customGet.path - Path of the endpoint, for example `1/newFeature`.
|
|
1285
|
+
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
1286
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1287
|
+
* @see customGet for the plain version.
|
|
1288
|
+
*/
|
|
1289
|
+
customGetWithHTTPInfo({ path, parameters }, requestOptions) {
|
|
1290
|
+
validateRequired("path", "customGetWithHTTPInfo", path);
|
|
1291
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1292
|
+
const headers = {};
|
|
1293
|
+
const queryParameters = parameters ? parameters : {};
|
|
1294
|
+
const request = {
|
|
1295
|
+
method: "GET",
|
|
1296
|
+
path: requestPath,
|
|
1297
|
+
queryParameters,
|
|
1298
|
+
headers
|
|
1299
|
+
};
|
|
1300
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1301
|
+
},
|
|
890
1302
|
/**
|
|
891
1303
|
* This method lets you send requests to the Algolia REST API.
|
|
892
1304
|
* @param customPost - The customPost object.
|
|
@@ -909,6 +1321,31 @@ function createSearchClient({
|
|
|
909
1321
|
};
|
|
910
1322
|
return transporter.request(request, requestOptions);
|
|
911
1323
|
},
|
|
1324
|
+
/**
|
|
1325
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1326
|
+
*
|
|
1327
|
+
* 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.
|
|
1328
|
+
* @param customPost - The customPost object.
|
|
1329
|
+
* @param customPost.path - Path of the endpoint, for example `1/newFeature`.
|
|
1330
|
+
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
1331
|
+
* @param customPost.body - Parameters to send with the custom request.
|
|
1332
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1333
|
+
* @see customPost for the plain version.
|
|
1334
|
+
*/
|
|
1335
|
+
customPostWithHTTPInfo({ path, parameters, body }, requestOptions) {
|
|
1336
|
+
validateRequired("path", "customPostWithHTTPInfo", path);
|
|
1337
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1338
|
+
const headers = {};
|
|
1339
|
+
const queryParameters = parameters ? parameters : {};
|
|
1340
|
+
const request = {
|
|
1341
|
+
method: "POST",
|
|
1342
|
+
path: requestPath,
|
|
1343
|
+
queryParameters,
|
|
1344
|
+
headers,
|
|
1345
|
+
data: body ? body : {}
|
|
1346
|
+
};
|
|
1347
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1348
|
+
},
|
|
912
1349
|
/**
|
|
913
1350
|
* This method lets you send requests to the Algolia REST API.
|
|
914
1351
|
* @param customPut - The customPut object.
|
|
@@ -931,6 +1368,31 @@ function createSearchClient({
|
|
|
931
1368
|
};
|
|
932
1369
|
return transporter.request(request, requestOptions);
|
|
933
1370
|
},
|
|
1371
|
+
/**
|
|
1372
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1373
|
+
*
|
|
1374
|
+
* 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.
|
|
1375
|
+
* @param customPut - The customPut object.
|
|
1376
|
+
* @param customPut.path - Path of the endpoint, for example `1/newFeature`.
|
|
1377
|
+
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
1378
|
+
* @param customPut.body - Parameters to send with the custom request.
|
|
1379
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1380
|
+
* @see customPut for the plain version.
|
|
1381
|
+
*/
|
|
1382
|
+
customPutWithHTTPInfo({ path, parameters, body }, requestOptions) {
|
|
1383
|
+
validateRequired("path", "customPutWithHTTPInfo", path);
|
|
1384
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1385
|
+
const headers = {};
|
|
1386
|
+
const queryParameters = parameters ? parameters : {};
|
|
1387
|
+
const request = {
|
|
1388
|
+
method: "PUT",
|
|
1389
|
+
path: requestPath,
|
|
1390
|
+
queryParameters,
|
|
1391
|
+
headers,
|
|
1392
|
+
data: body ? body : {}
|
|
1393
|
+
};
|
|
1394
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1395
|
+
},
|
|
934
1396
|
/**
|
|
935
1397
|
* Deletes the API key.
|
|
936
1398
|
*
|
|
@@ -953,6 +1415,31 @@ function createSearchClient({
|
|
|
953
1415
|
};
|
|
954
1416
|
return transporter.request(request, requestOptions);
|
|
955
1417
|
},
|
|
1418
|
+
/**
|
|
1419
|
+
* Deletes the API key.
|
|
1420
|
+
*
|
|
1421
|
+
* 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.
|
|
1422
|
+
*
|
|
1423
|
+
* Required API Key ACLs:
|
|
1424
|
+
* - admin
|
|
1425
|
+
* @param deleteApiKey - The deleteApiKey object.
|
|
1426
|
+
* @param deleteApiKey.key - API key.
|
|
1427
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1428
|
+
* @see deleteApiKey for the plain version.
|
|
1429
|
+
*/
|
|
1430
|
+
deleteApiKeyWithHTTPInfo({ key }, requestOptions) {
|
|
1431
|
+
validateRequired("key", "deleteApiKeyWithHTTPInfo", key);
|
|
1432
|
+
const requestPath = "/1/keys/{key}".replace("{key}", encodeURIComponent(key));
|
|
1433
|
+
const headers = {};
|
|
1434
|
+
const queryParameters = {};
|
|
1435
|
+
const request = {
|
|
1436
|
+
method: "DELETE",
|
|
1437
|
+
path: requestPath,
|
|
1438
|
+
queryParameters,
|
|
1439
|
+
headers
|
|
1440
|
+
};
|
|
1441
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1442
|
+
},
|
|
956
1443
|
/**
|
|
957
1444
|
* 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).
|
|
958
1445
|
*
|
|
@@ -978,6 +1465,34 @@ function createSearchClient({
|
|
|
978
1465
|
};
|
|
979
1466
|
return transporter.request(request, requestOptions);
|
|
980
1467
|
},
|
|
1468
|
+
/**
|
|
1469
|
+
* 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).
|
|
1470
|
+
*
|
|
1471
|
+
* 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.
|
|
1472
|
+
*
|
|
1473
|
+
* Required API Key ACLs:
|
|
1474
|
+
* - deleteIndex
|
|
1475
|
+
* @param deleteBy - The deleteBy object.
|
|
1476
|
+
* @param deleteBy.indexName - Name of the index on which to perform the operation.
|
|
1477
|
+
* @param deleteBy.deleteByParams - The deleteByParams object.
|
|
1478
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1479
|
+
* @see deleteBy for the plain version.
|
|
1480
|
+
*/
|
|
1481
|
+
deleteByWithHTTPInfo({ indexName, deleteByParams }, requestOptions) {
|
|
1482
|
+
validateRequired("indexName", "deleteByWithHTTPInfo", indexName);
|
|
1483
|
+
validateRequired("deleteByParams", "deleteByWithHTTPInfo", deleteByParams);
|
|
1484
|
+
const requestPath = "/1/indexes/{indexName}/deleteByQuery".replace("{indexName}", encodeURIComponent(indexName));
|
|
1485
|
+
const headers = {};
|
|
1486
|
+
const queryParameters = {};
|
|
1487
|
+
const request = {
|
|
1488
|
+
method: "POST",
|
|
1489
|
+
path: requestPath,
|
|
1490
|
+
queryParameters,
|
|
1491
|
+
headers,
|
|
1492
|
+
data: deleteByParams
|
|
1493
|
+
};
|
|
1494
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1495
|
+
},
|
|
981
1496
|
/**
|
|
982
1497
|
* 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).
|
|
983
1498
|
*
|
|
@@ -1000,6 +1515,31 @@ function createSearchClient({
|
|
|
1000
1515
|
};
|
|
1001
1516
|
return transporter.request(request, requestOptions);
|
|
1002
1517
|
},
|
|
1518
|
+
/**
|
|
1519
|
+
* 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).
|
|
1520
|
+
*
|
|
1521
|
+
* 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.
|
|
1522
|
+
*
|
|
1523
|
+
* Required API Key ACLs:
|
|
1524
|
+
* - deleteIndex
|
|
1525
|
+
* @param deleteIndex - The deleteIndex object.
|
|
1526
|
+
* @param deleteIndex.indexName - Name of the index on which to perform the operation.
|
|
1527
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1528
|
+
* @see deleteIndex for the plain version.
|
|
1529
|
+
*/
|
|
1530
|
+
deleteIndexWithHTTPInfo({ indexName }, requestOptions) {
|
|
1531
|
+
validateRequired("indexName", "deleteIndexWithHTTPInfo", indexName);
|
|
1532
|
+
const requestPath = "/1/indexes/{indexName}".replace("{indexName}", encodeURIComponent(indexName));
|
|
1533
|
+
const headers = {};
|
|
1534
|
+
const queryParameters = {};
|
|
1535
|
+
const request = {
|
|
1536
|
+
method: "DELETE",
|
|
1537
|
+
path: requestPath,
|
|
1538
|
+
queryParameters,
|
|
1539
|
+
headers
|
|
1540
|
+
};
|
|
1541
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1542
|
+
},
|
|
1003
1543
|
/**
|
|
1004
1544
|
* 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).
|
|
1005
1545
|
*
|
|
@@ -1024,6 +1564,33 @@ function createSearchClient({
|
|
|
1024
1564
|
};
|
|
1025
1565
|
return transporter.request(request, requestOptions);
|
|
1026
1566
|
},
|
|
1567
|
+
/**
|
|
1568
|
+
* 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).
|
|
1569
|
+
*
|
|
1570
|
+
* 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.
|
|
1571
|
+
*
|
|
1572
|
+
* Required API Key ACLs:
|
|
1573
|
+
* - deleteObject
|
|
1574
|
+
* @param deleteObject - The deleteObject object.
|
|
1575
|
+
* @param deleteObject.indexName - Name of the index on which to perform the operation.
|
|
1576
|
+
* @param deleteObject.objectID - Unique record identifier.
|
|
1577
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1578
|
+
* @see deleteObject for the plain version.
|
|
1579
|
+
*/
|
|
1580
|
+
deleteObjectWithHTTPInfo({ indexName, objectID }, requestOptions) {
|
|
1581
|
+
validateRequired("indexName", "deleteObjectWithHTTPInfo", indexName);
|
|
1582
|
+
validateRequired("objectID", "deleteObjectWithHTTPInfo", objectID);
|
|
1583
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1584
|
+
const headers = {};
|
|
1585
|
+
const queryParameters = {};
|
|
1586
|
+
const request = {
|
|
1587
|
+
method: "DELETE",
|
|
1588
|
+
path: requestPath,
|
|
1589
|
+
queryParameters,
|
|
1590
|
+
headers
|
|
1591
|
+
};
|
|
1592
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1593
|
+
},
|
|
1027
1594
|
/**
|
|
1028
1595
|
* 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).
|
|
1029
1596
|
*
|
|
@@ -1052,6 +1619,37 @@ function createSearchClient({
|
|
|
1052
1619
|
};
|
|
1053
1620
|
return transporter.request(request, requestOptions);
|
|
1054
1621
|
},
|
|
1622
|
+
/**
|
|
1623
|
+
* 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).
|
|
1624
|
+
*
|
|
1625
|
+
* 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.
|
|
1626
|
+
*
|
|
1627
|
+
* Required API Key ACLs:
|
|
1628
|
+
* - editSettings
|
|
1629
|
+
* @param deleteRule - The deleteRule object.
|
|
1630
|
+
* @param deleteRule.indexName - Name of the index on which to perform the operation.
|
|
1631
|
+
* @param deleteRule.objectID - Unique identifier of a rule object.
|
|
1632
|
+
* @param deleteRule.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1633
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1634
|
+
* @see deleteRule for the plain version.
|
|
1635
|
+
*/
|
|
1636
|
+
deleteRuleWithHTTPInfo({ indexName, objectID, forwardToReplicas }, requestOptions) {
|
|
1637
|
+
validateRequired("indexName", "deleteRuleWithHTTPInfo", indexName);
|
|
1638
|
+
validateRequired("objectID", "deleteRuleWithHTTPInfo", objectID);
|
|
1639
|
+
const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1640
|
+
const headers = {};
|
|
1641
|
+
const queryParameters = {};
|
|
1642
|
+
if (forwardToReplicas !== void 0) {
|
|
1643
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1644
|
+
}
|
|
1645
|
+
const request = {
|
|
1646
|
+
method: "DELETE",
|
|
1647
|
+
path: requestPath,
|
|
1648
|
+
queryParameters,
|
|
1649
|
+
headers
|
|
1650
|
+
};
|
|
1651
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1652
|
+
},
|
|
1055
1653
|
/**
|
|
1056
1654
|
* Deletes a source from the list of allowed sources.
|
|
1057
1655
|
*
|
|
@@ -1074,6 +1672,31 @@ function createSearchClient({
|
|
|
1074
1672
|
};
|
|
1075
1673
|
return transporter.request(request, requestOptions);
|
|
1076
1674
|
},
|
|
1675
|
+
/**
|
|
1676
|
+
* Deletes a source from the list of allowed sources.
|
|
1677
|
+
*
|
|
1678
|
+
* 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.
|
|
1679
|
+
*
|
|
1680
|
+
* Required API Key ACLs:
|
|
1681
|
+
* - admin
|
|
1682
|
+
* @param deleteSource - The deleteSource object.
|
|
1683
|
+
* @param deleteSource.source - IP address range of the source.
|
|
1684
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1685
|
+
* @see deleteSource for the plain version.
|
|
1686
|
+
*/
|
|
1687
|
+
deleteSourceWithHTTPInfo({ source }, requestOptions) {
|
|
1688
|
+
validateRequired("source", "deleteSourceWithHTTPInfo", source);
|
|
1689
|
+
const requestPath = "/1/security/sources/{source}".replace("{source}", encodeURIComponent(source));
|
|
1690
|
+
const headers = {};
|
|
1691
|
+
const queryParameters = {};
|
|
1692
|
+
const request = {
|
|
1693
|
+
method: "DELETE",
|
|
1694
|
+
path: requestPath,
|
|
1695
|
+
queryParameters,
|
|
1696
|
+
headers
|
|
1697
|
+
};
|
|
1698
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1699
|
+
},
|
|
1077
1700
|
/**
|
|
1078
1701
|
* 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).
|
|
1079
1702
|
*
|
|
@@ -1103,7 +1726,38 @@ function createSearchClient({
|
|
|
1103
1726
|
return transporter.request(request, requestOptions);
|
|
1104
1727
|
},
|
|
1105
1728
|
/**
|
|
1106
|
-
*
|
|
1729
|
+
* 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).
|
|
1730
|
+
*
|
|
1731
|
+
* 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.
|
|
1732
|
+
*
|
|
1733
|
+
* Required API Key ACLs:
|
|
1734
|
+
* - editSettings
|
|
1735
|
+
* @param deleteSynonym - The deleteSynonym object.
|
|
1736
|
+
* @param deleteSynonym.indexName - Name of the index on which to perform the operation.
|
|
1737
|
+
* @param deleteSynonym.objectID - Unique identifier of a synonym object.
|
|
1738
|
+
* @param deleteSynonym.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1739
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1740
|
+
* @see deleteSynonym for the plain version.
|
|
1741
|
+
*/
|
|
1742
|
+
deleteSynonymWithHTTPInfo({ indexName, objectID, forwardToReplicas }, requestOptions) {
|
|
1743
|
+
validateRequired("indexName", "deleteSynonymWithHTTPInfo", indexName);
|
|
1744
|
+
validateRequired("objectID", "deleteSynonymWithHTTPInfo", objectID);
|
|
1745
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1746
|
+
const headers = {};
|
|
1747
|
+
const queryParameters = {};
|
|
1748
|
+
if (forwardToReplicas !== void 0) {
|
|
1749
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1750
|
+
}
|
|
1751
|
+
const request = {
|
|
1752
|
+
method: "DELETE",
|
|
1753
|
+
path: requestPath,
|
|
1754
|
+
queryParameters,
|
|
1755
|
+
headers
|
|
1756
|
+
};
|
|
1757
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1758
|
+
},
|
|
1759
|
+
/**
|
|
1760
|
+
* 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>`.
|
|
1107
1761
|
*
|
|
1108
1762
|
* Required API Key ACLs:
|
|
1109
1763
|
* - search
|
|
@@ -1124,6 +1778,31 @@ function createSearchClient({
|
|
|
1124
1778
|
};
|
|
1125
1779
|
return transporter.request(request, requestOptions);
|
|
1126
1780
|
},
|
|
1781
|
+
/**
|
|
1782
|
+
* 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>`.
|
|
1783
|
+
*
|
|
1784
|
+
* 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.
|
|
1785
|
+
*
|
|
1786
|
+
* Required API Key ACLs:
|
|
1787
|
+
* - search
|
|
1788
|
+
* @param getApiKey - The getApiKey object.
|
|
1789
|
+
* @param getApiKey.key - API key.
|
|
1790
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1791
|
+
* @see getApiKey for the plain version.
|
|
1792
|
+
*/
|
|
1793
|
+
getApiKeyWithHTTPInfo({ key }, requestOptions) {
|
|
1794
|
+
validateRequired("key", "getApiKeyWithHTTPInfo", key);
|
|
1795
|
+
const requestPath = "/1/keys/{key}".replace("{key}", encodeURIComponent(key));
|
|
1796
|
+
const headers = {};
|
|
1797
|
+
const queryParameters = {};
|
|
1798
|
+
const request = {
|
|
1799
|
+
method: "GET",
|
|
1800
|
+
path: requestPath,
|
|
1801
|
+
queryParameters,
|
|
1802
|
+
headers
|
|
1803
|
+
};
|
|
1804
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1805
|
+
},
|
|
1127
1806
|
/**
|
|
1128
1807
|
* Checks the status of a given application task.
|
|
1129
1808
|
*
|
|
@@ -1146,6 +1825,31 @@ function createSearchClient({
|
|
|
1146
1825
|
};
|
|
1147
1826
|
return transporter.request(request, requestOptions);
|
|
1148
1827
|
},
|
|
1828
|
+
/**
|
|
1829
|
+
* Checks the status of a given application task.
|
|
1830
|
+
*
|
|
1831
|
+
* 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.
|
|
1832
|
+
*
|
|
1833
|
+
* Required API Key ACLs:
|
|
1834
|
+
* - editSettings
|
|
1835
|
+
* @param getAppTask - The getAppTask object.
|
|
1836
|
+
* @param getAppTask.taskID - Unique task identifier.
|
|
1837
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1838
|
+
* @see getAppTask for the plain version.
|
|
1839
|
+
*/
|
|
1840
|
+
getAppTaskWithHTTPInfo({ taskID }, requestOptions) {
|
|
1841
|
+
validateRequired("taskID", "getAppTaskWithHTTPInfo", taskID);
|
|
1842
|
+
const requestPath = "/1/task/{taskID}".replace("{taskID}", encodeURIComponent(taskID));
|
|
1843
|
+
const headers = {};
|
|
1844
|
+
const queryParameters = {};
|
|
1845
|
+
const request = {
|
|
1846
|
+
method: "GET",
|
|
1847
|
+
path: requestPath,
|
|
1848
|
+
queryParameters,
|
|
1849
|
+
headers
|
|
1850
|
+
};
|
|
1851
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1852
|
+
},
|
|
1149
1853
|
/**
|
|
1150
1854
|
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
1151
1855
|
*
|
|
@@ -1165,6 +1869,28 @@ function createSearchClient({
|
|
|
1165
1869
|
};
|
|
1166
1870
|
return transporter.request(request, requestOptions);
|
|
1167
1871
|
},
|
|
1872
|
+
/**
|
|
1873
|
+
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
1874
|
+
*
|
|
1875
|
+
* 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.
|
|
1876
|
+
*
|
|
1877
|
+
* Required API Key ACLs:
|
|
1878
|
+
* - settings
|
|
1879
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1880
|
+
* @see getDictionaryLanguages for the plain version.
|
|
1881
|
+
*/
|
|
1882
|
+
getDictionaryLanguagesWithHTTPInfo(requestOptions) {
|
|
1883
|
+
const requestPath = "/1/dictionaries/*/languages";
|
|
1884
|
+
const headers = {};
|
|
1885
|
+
const queryParameters = {};
|
|
1886
|
+
const request = {
|
|
1887
|
+
method: "GET",
|
|
1888
|
+
path: requestPath,
|
|
1889
|
+
queryParameters,
|
|
1890
|
+
headers
|
|
1891
|
+
};
|
|
1892
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1893
|
+
},
|
|
1168
1894
|
/**
|
|
1169
1895
|
* Retrieves the languages for which standard dictionary entries are turned off.
|
|
1170
1896
|
*
|
|
@@ -1184,6 +1910,28 @@ function createSearchClient({
|
|
|
1184
1910
|
};
|
|
1185
1911
|
return transporter.request(request, requestOptions);
|
|
1186
1912
|
},
|
|
1913
|
+
/**
|
|
1914
|
+
* Retrieves the languages for which standard dictionary entries are turned off.
|
|
1915
|
+
*
|
|
1916
|
+
* 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.
|
|
1917
|
+
*
|
|
1918
|
+
* Required API Key ACLs:
|
|
1919
|
+
* - settings
|
|
1920
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1921
|
+
* @see getDictionarySettings for the plain version.
|
|
1922
|
+
*/
|
|
1923
|
+
getDictionarySettingsWithHTTPInfo(requestOptions) {
|
|
1924
|
+
const requestPath = "/1/dictionaries/*/settings";
|
|
1925
|
+
const headers = {};
|
|
1926
|
+
const queryParameters = {};
|
|
1927
|
+
const request = {
|
|
1928
|
+
method: "GET",
|
|
1929
|
+
path: requestPath,
|
|
1930
|
+
queryParameters,
|
|
1931
|
+
headers
|
|
1932
|
+
};
|
|
1933
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1934
|
+
},
|
|
1187
1935
|
/**
|
|
1188
1936
|
* 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.
|
|
1189
1937
|
*
|
|
@@ -1220,6 +1968,45 @@ function createSearchClient({
|
|
|
1220
1968
|
};
|
|
1221
1969
|
return transporter.request(request, requestOptions);
|
|
1222
1970
|
},
|
|
1971
|
+
/**
|
|
1972
|
+
* 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.
|
|
1973
|
+
*
|
|
1974
|
+
* 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.
|
|
1975
|
+
*
|
|
1976
|
+
* Required API Key ACLs:
|
|
1977
|
+
* - logs
|
|
1978
|
+
* @param getLogs - The getLogs object.
|
|
1979
|
+
* @param getLogs.offset - First log entry to retrieve. The most recent entries are listed first.
|
|
1980
|
+
* @param getLogs.length - Maximum number of entries to retrieve.
|
|
1981
|
+
* @param getLogs.indexName - Index for which to retrieve log entries. By default, log entries are retrieved for all indices.
|
|
1982
|
+
* @param getLogs.type - Type of log entries to retrieve. By default, all log entries are retrieved.
|
|
1983
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1984
|
+
* @see getLogs for the plain version.
|
|
1985
|
+
*/
|
|
1986
|
+
getLogsWithHTTPInfo({ offset, length, indexName, type } = {}, requestOptions = void 0) {
|
|
1987
|
+
const requestPath = "/1/logs";
|
|
1988
|
+
const headers = {};
|
|
1989
|
+
const queryParameters = {};
|
|
1990
|
+
if (offset !== void 0) {
|
|
1991
|
+
queryParameters["offset"] = offset.toString();
|
|
1992
|
+
}
|
|
1993
|
+
if (length !== void 0) {
|
|
1994
|
+
queryParameters["length"] = length.toString();
|
|
1995
|
+
}
|
|
1996
|
+
if (indexName !== void 0) {
|
|
1997
|
+
queryParameters["indexName"] = indexName.toString();
|
|
1998
|
+
}
|
|
1999
|
+
if (type !== void 0) {
|
|
2000
|
+
queryParameters["type"] = type.toString();
|
|
2001
|
+
}
|
|
2002
|
+
const request = {
|
|
2003
|
+
method: "GET",
|
|
2004
|
+
path: requestPath,
|
|
2005
|
+
queryParameters,
|
|
2006
|
+
headers
|
|
2007
|
+
};
|
|
2008
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2009
|
+
},
|
|
1223
2010
|
/**
|
|
1224
2011
|
* 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).
|
|
1225
2012
|
*
|
|
@@ -1248,6 +2035,37 @@ function createSearchClient({
|
|
|
1248
2035
|
};
|
|
1249
2036
|
return transporter.request(request, requestOptions);
|
|
1250
2037
|
},
|
|
2038
|
+
/**
|
|
2039
|
+
* 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).
|
|
2040
|
+
*
|
|
2041
|
+
* 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.
|
|
2042
|
+
*
|
|
2043
|
+
* Required API Key ACLs:
|
|
2044
|
+
* - search
|
|
2045
|
+
* @param getObject - The getObject object.
|
|
2046
|
+
* @param getObject.indexName - Name of the index on which to perform the operation.
|
|
2047
|
+
* @param getObject.objectID - Unique record identifier.
|
|
2048
|
+
* @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.
|
|
2049
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2050
|
+
* @see getObject for the plain version.
|
|
2051
|
+
*/
|
|
2052
|
+
getObjectWithHTTPInfo({ indexName, objectID, attributesToRetrieve }, requestOptions) {
|
|
2053
|
+
validateRequired("indexName", "getObjectWithHTTPInfo", indexName);
|
|
2054
|
+
validateRequired("objectID", "getObjectWithHTTPInfo", objectID);
|
|
2055
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2056
|
+
const headers = {};
|
|
2057
|
+
const queryParameters = {};
|
|
2058
|
+
if (attributesToRetrieve !== void 0) {
|
|
2059
|
+
queryParameters["attributesToRetrieve"] = attributesToRetrieve.toString();
|
|
2060
|
+
}
|
|
2061
|
+
const request = {
|
|
2062
|
+
method: "GET",
|
|
2063
|
+
path: requestPath,
|
|
2064
|
+
queryParameters,
|
|
2065
|
+
headers
|
|
2066
|
+
};
|
|
2067
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2068
|
+
},
|
|
1251
2069
|
/**
|
|
1252
2070
|
* Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
|
|
1253
2071
|
*
|
|
@@ -1273,6 +2091,34 @@ function createSearchClient({
|
|
|
1273
2091
|
};
|
|
1274
2092
|
return transporter.request(request, requestOptions);
|
|
1275
2093
|
},
|
|
2094
|
+
/**
|
|
2095
|
+
* Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
|
|
2096
|
+
*
|
|
2097
|
+
* 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.
|
|
2098
|
+
*
|
|
2099
|
+
* Required API Key ACLs:
|
|
2100
|
+
* - search
|
|
2101
|
+
* @param getObjectsParams - Request object.
|
|
2102
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2103
|
+
* @see getObjects for the plain version.
|
|
2104
|
+
*/
|
|
2105
|
+
getObjectsWithHTTPInfo(getObjectsParams, requestOptions) {
|
|
2106
|
+
validateRequired("getObjectsParams", "getObjectsWithHTTPInfo", getObjectsParams);
|
|
2107
|
+
validateRequired("getObjectsParams.requests", "getObjectsWithHTTPInfo", getObjectsParams.requests);
|
|
2108
|
+
const requestPath = "/1/indexes/*/objects";
|
|
2109
|
+
const headers = {};
|
|
2110
|
+
const queryParameters = {};
|
|
2111
|
+
const request = {
|
|
2112
|
+
method: "POST",
|
|
2113
|
+
path: requestPath,
|
|
2114
|
+
queryParameters,
|
|
2115
|
+
headers,
|
|
2116
|
+
data: getObjectsParams,
|
|
2117
|
+
useReadTransporter: true,
|
|
2118
|
+
cacheable: true
|
|
2119
|
+
};
|
|
2120
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2121
|
+
},
|
|
1276
2122
|
/**
|
|
1277
2123
|
* 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).
|
|
1278
2124
|
*
|
|
@@ -1298,42 +2144,50 @@ function createSearchClient({
|
|
|
1298
2144
|
return transporter.request(request, requestOptions);
|
|
1299
2145
|
},
|
|
1300
2146
|
/**
|
|
1301
|
-
* Retrieves
|
|
2147
|
+
* 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).
|
|
2148
|
+
*
|
|
2149
|
+
* 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.
|
|
1302
2150
|
*
|
|
1303
2151
|
* Required API Key ACLs:
|
|
1304
2152
|
* - settings
|
|
1305
|
-
* @param
|
|
1306
|
-
* @param
|
|
1307
|
-
* @param
|
|
2153
|
+
* @param getRule - The getRule object.
|
|
2154
|
+
* @param getRule.indexName - Name of the index on which to perform the operation.
|
|
2155
|
+
* @param getRule.objectID - Unique identifier of a rule object.
|
|
1308
2156
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2157
|
+
* @see getRule for the plain version.
|
|
1309
2158
|
*/
|
|
1310
|
-
|
|
1311
|
-
validateRequired("indexName", "
|
|
1312
|
-
|
|
2159
|
+
getRuleWithHTTPInfo({ indexName, objectID }, requestOptions) {
|
|
2160
|
+
validateRequired("indexName", "getRuleWithHTTPInfo", indexName);
|
|
2161
|
+
validateRequired("objectID", "getRuleWithHTTPInfo", objectID);
|
|
2162
|
+
const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1313
2163
|
const headers = {};
|
|
1314
2164
|
const queryParameters = {};
|
|
1315
|
-
if (getVersion !== void 0) {
|
|
1316
|
-
queryParameters["getVersion"] = getVersion.toString();
|
|
1317
|
-
}
|
|
1318
2165
|
const request = {
|
|
1319
2166
|
method: "GET",
|
|
1320
2167
|
path: requestPath,
|
|
1321
2168
|
queryParameters,
|
|
1322
2169
|
headers
|
|
1323
2170
|
};
|
|
1324
|
-
return transporter.
|
|
2171
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1325
2172
|
},
|
|
1326
2173
|
/**
|
|
1327
|
-
* Retrieves
|
|
2174
|
+
* Retrieves an object with non-null index settings.
|
|
1328
2175
|
*
|
|
1329
2176
|
* Required API Key ACLs:
|
|
1330
|
-
* -
|
|
2177
|
+
* - settings
|
|
2178
|
+
* @param getSettings - The getSettings object.
|
|
2179
|
+
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
2180
|
+
* @param getSettings.getVersion - When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.
|
|
1331
2181
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1332
2182
|
*/
|
|
1333
|
-
|
|
1334
|
-
|
|
2183
|
+
getSettings({ indexName, getVersion }, requestOptions) {
|
|
2184
|
+
validateRequired("indexName", "getSettings", indexName);
|
|
2185
|
+
const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
|
|
1335
2186
|
const headers = {};
|
|
1336
2187
|
const queryParameters = {};
|
|
2188
|
+
if (getVersion !== void 0) {
|
|
2189
|
+
queryParameters["getVersion"] = getVersion.toString();
|
|
2190
|
+
}
|
|
1337
2191
|
const request = {
|
|
1338
2192
|
method: "GET",
|
|
1339
2193
|
path: requestPath,
|
|
@@ -1343,43 +2197,43 @@ function createSearchClient({
|
|
|
1343
2197
|
return transporter.request(request, requestOptions);
|
|
1344
2198
|
},
|
|
1345
2199
|
/**
|
|
1346
|
-
* Retrieves
|
|
2200
|
+
* Retrieves an object with non-null index settings.
|
|
2201
|
+
*
|
|
2202
|
+
* 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.
|
|
1347
2203
|
*
|
|
1348
2204
|
* Required API Key ACLs:
|
|
1349
2205
|
* - settings
|
|
1350
|
-
* @param
|
|
1351
|
-
* @param
|
|
1352
|
-
* @param
|
|
2206
|
+
* @param getSettings - The getSettings object.
|
|
2207
|
+
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
2208
|
+
* @param getSettings.getVersion - When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.
|
|
1353
2209
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2210
|
+
* @see getSettings for the plain version.
|
|
1354
2211
|
*/
|
|
1355
|
-
|
|
1356
|
-
validateRequired("indexName", "
|
|
1357
|
-
|
|
1358
|
-
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2212
|
+
getSettingsWithHTTPInfo({ indexName, getVersion }, requestOptions) {
|
|
2213
|
+
validateRequired("indexName", "getSettingsWithHTTPInfo", indexName);
|
|
2214
|
+
const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
|
|
1359
2215
|
const headers = {};
|
|
1360
2216
|
const queryParameters = {};
|
|
2217
|
+
if (getVersion !== void 0) {
|
|
2218
|
+
queryParameters["getVersion"] = getVersion.toString();
|
|
2219
|
+
}
|
|
1361
2220
|
const request = {
|
|
1362
2221
|
method: "GET",
|
|
1363
2222
|
path: requestPath,
|
|
1364
2223
|
queryParameters,
|
|
1365
2224
|
headers
|
|
1366
2225
|
};
|
|
1367
|
-
return transporter.
|
|
2226
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1368
2227
|
},
|
|
1369
2228
|
/**
|
|
1370
|
-
*
|
|
2229
|
+
* Retrieves all allowed IP addresses with access to your application.
|
|
1371
2230
|
*
|
|
1372
2231
|
* Required API Key ACLs:
|
|
1373
|
-
* -
|
|
1374
|
-
* @param getTask - The getTask object.
|
|
1375
|
-
* @param getTask.indexName - Name of the index on which to perform the operation.
|
|
1376
|
-
* @param getTask.taskID - Unique task identifier.
|
|
2232
|
+
* - admin
|
|
1377
2233
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1378
2234
|
*/
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
validateRequired("taskID", "getTask", taskID);
|
|
1382
|
-
const requestPath = "/1/indexes/{indexName}/task/{taskID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{taskID}", encodeURIComponent(taskID));
|
|
2235
|
+
getSources(requestOptions) {
|
|
2236
|
+
const requestPath = "/1/security/sources";
|
|
1383
2237
|
const headers = {};
|
|
1384
2238
|
const queryParameters = {};
|
|
1385
2239
|
const request = {
|
|
@@ -1391,16 +2245,17 @@ function createSearchClient({
|
|
|
1391
2245
|
return transporter.request(request, requestOptions);
|
|
1392
2246
|
},
|
|
1393
2247
|
/**
|
|
1394
|
-
*
|
|
2248
|
+
* Retrieves all allowed IP addresses with access to your application.
|
|
2249
|
+
*
|
|
2250
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1395
2251
|
*
|
|
1396
2252
|
* Required API Key ACLs:
|
|
1397
2253
|
* - admin
|
|
1398
|
-
*
|
|
1399
|
-
* @deprecated
|
|
1400
2254
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2255
|
+
* @see getSources for the plain version.
|
|
1401
2256
|
*/
|
|
1402
|
-
|
|
1403
|
-
const requestPath = "/1/
|
|
2257
|
+
getSourcesWithHTTPInfo(requestOptions) {
|
|
2258
|
+
const requestPath = "/1/security/sources";
|
|
1404
2259
|
const headers = {};
|
|
1405
2260
|
const queryParameters = {};
|
|
1406
2261
|
const request = {
|
|
@@ -1409,7 +2264,154 @@ function createSearchClient({
|
|
|
1409
2264
|
queryParameters,
|
|
1410
2265
|
headers
|
|
1411
2266
|
};
|
|
1412
|
-
return transporter.
|
|
2267
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2268
|
+
},
|
|
2269
|
+
/**
|
|
2270
|
+
* 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).
|
|
2271
|
+
*
|
|
2272
|
+
* Required API Key ACLs:
|
|
2273
|
+
* - settings
|
|
2274
|
+
* @param getSynonym - The getSynonym object.
|
|
2275
|
+
* @param getSynonym.indexName - Name of the index on which to perform the operation.
|
|
2276
|
+
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
2277
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2278
|
+
*/
|
|
2279
|
+
getSynonym({ indexName, objectID }, requestOptions) {
|
|
2280
|
+
validateRequired("indexName", "getSynonym", indexName);
|
|
2281
|
+
validateRequired("objectID", "getSynonym", objectID);
|
|
2282
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2283
|
+
const headers = {};
|
|
2284
|
+
const queryParameters = {};
|
|
2285
|
+
const request = {
|
|
2286
|
+
method: "GET",
|
|
2287
|
+
path: requestPath,
|
|
2288
|
+
queryParameters,
|
|
2289
|
+
headers
|
|
2290
|
+
};
|
|
2291
|
+
return transporter.request(request, requestOptions);
|
|
2292
|
+
},
|
|
2293
|
+
/**
|
|
2294
|
+
* 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).
|
|
2295
|
+
*
|
|
2296
|
+
* 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.
|
|
2297
|
+
*
|
|
2298
|
+
* Required API Key ACLs:
|
|
2299
|
+
* - settings
|
|
2300
|
+
* @param getSynonym - The getSynonym object.
|
|
2301
|
+
* @param getSynonym.indexName - Name of the index on which to perform the operation.
|
|
2302
|
+
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
2303
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2304
|
+
* @see getSynonym for the plain version.
|
|
2305
|
+
*/
|
|
2306
|
+
getSynonymWithHTTPInfo({ indexName, objectID }, requestOptions) {
|
|
2307
|
+
validateRequired("indexName", "getSynonymWithHTTPInfo", indexName);
|
|
2308
|
+
validateRequired("objectID", "getSynonymWithHTTPInfo", objectID);
|
|
2309
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2310
|
+
const headers = {};
|
|
2311
|
+
const queryParameters = {};
|
|
2312
|
+
const request = {
|
|
2313
|
+
method: "GET",
|
|
2314
|
+
path: requestPath,
|
|
2315
|
+
queryParameters,
|
|
2316
|
+
headers
|
|
2317
|
+
};
|
|
2318
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2319
|
+
},
|
|
2320
|
+
/**
|
|
2321
|
+
* 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.
|
|
2322
|
+
*
|
|
2323
|
+
* Required API Key ACLs:
|
|
2324
|
+
* - addObject
|
|
2325
|
+
* @param getTask - The getTask object.
|
|
2326
|
+
* @param getTask.indexName - Name of the index on which to perform the operation.
|
|
2327
|
+
* @param getTask.taskID - Unique task identifier.
|
|
2328
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2329
|
+
*/
|
|
2330
|
+
getTask({ indexName, taskID }, requestOptions) {
|
|
2331
|
+
validateRequired("indexName", "getTask", indexName);
|
|
2332
|
+
validateRequired("taskID", "getTask", taskID);
|
|
2333
|
+
const requestPath = "/1/indexes/{indexName}/task/{taskID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{taskID}", encodeURIComponent(taskID));
|
|
2334
|
+
const headers = {};
|
|
2335
|
+
const queryParameters = {};
|
|
2336
|
+
const request = {
|
|
2337
|
+
method: "GET",
|
|
2338
|
+
path: requestPath,
|
|
2339
|
+
queryParameters,
|
|
2340
|
+
headers
|
|
2341
|
+
};
|
|
2342
|
+
return transporter.request(request, requestOptions);
|
|
2343
|
+
},
|
|
2344
|
+
/**
|
|
2345
|
+
* 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.
|
|
2346
|
+
*
|
|
2347
|
+
* 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.
|
|
2348
|
+
*
|
|
2349
|
+
* Required API Key ACLs:
|
|
2350
|
+
* - addObject
|
|
2351
|
+
* @param getTask - The getTask object.
|
|
2352
|
+
* @param getTask.indexName - Name of the index on which to perform the operation.
|
|
2353
|
+
* @param getTask.taskID - Unique task identifier.
|
|
2354
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2355
|
+
* @see getTask for the plain version.
|
|
2356
|
+
*/
|
|
2357
|
+
getTaskWithHTTPInfo({ indexName, taskID }, requestOptions) {
|
|
2358
|
+
validateRequired("indexName", "getTaskWithHTTPInfo", indexName);
|
|
2359
|
+
validateRequired("taskID", "getTaskWithHTTPInfo", taskID);
|
|
2360
|
+
const requestPath = "/1/indexes/{indexName}/task/{taskID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{taskID}", encodeURIComponent(taskID));
|
|
2361
|
+
const headers = {};
|
|
2362
|
+
const queryParameters = {};
|
|
2363
|
+
const request = {
|
|
2364
|
+
method: "GET",
|
|
2365
|
+
path: requestPath,
|
|
2366
|
+
queryParameters,
|
|
2367
|
+
headers
|
|
2368
|
+
};
|
|
2369
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2370
|
+
},
|
|
2371
|
+
/**
|
|
2372
|
+
* 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.
|
|
2373
|
+
*
|
|
2374
|
+
* Required API Key ACLs:
|
|
2375
|
+
* - admin
|
|
2376
|
+
*
|
|
2377
|
+
* @deprecated
|
|
2378
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2379
|
+
*/
|
|
2380
|
+
getTopUserIds(requestOptions) {
|
|
2381
|
+
const requestPath = "/1/clusters/mapping/top";
|
|
2382
|
+
const headers = {};
|
|
2383
|
+
const queryParameters = {};
|
|
2384
|
+
const request = {
|
|
2385
|
+
method: "GET",
|
|
2386
|
+
path: requestPath,
|
|
2387
|
+
queryParameters,
|
|
2388
|
+
headers
|
|
2389
|
+
};
|
|
2390
|
+
return transporter.request(request, requestOptions);
|
|
2391
|
+
},
|
|
2392
|
+
/**
|
|
2393
|
+
* 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.
|
|
2394
|
+
*
|
|
2395
|
+
* 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.
|
|
2396
|
+
*
|
|
2397
|
+
* Required API Key ACLs:
|
|
2398
|
+
* - admin
|
|
2399
|
+
*
|
|
2400
|
+
* @deprecated
|
|
2401
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2402
|
+
* @see getTopUserIds for the plain version.
|
|
2403
|
+
*/
|
|
2404
|
+
getTopUserIdsWithHTTPInfo(requestOptions) {
|
|
2405
|
+
const requestPath = "/1/clusters/mapping/top";
|
|
2406
|
+
const headers = {};
|
|
2407
|
+
const queryParameters = {};
|
|
2408
|
+
const request = {
|
|
2409
|
+
method: "GET",
|
|
2410
|
+
path: requestPath,
|
|
2411
|
+
queryParameters,
|
|
2412
|
+
headers
|
|
2413
|
+
};
|
|
2414
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1413
2415
|
},
|
|
1414
2416
|
/**
|
|
1415
2417
|
* 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.
|
|
@@ -1435,6 +2437,33 @@ function createSearchClient({
|
|
|
1435
2437
|
};
|
|
1436
2438
|
return transporter.request(request, requestOptions);
|
|
1437
2439
|
},
|
|
2440
|
+
/**
|
|
2441
|
+
* 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.
|
|
2442
|
+
*
|
|
2443
|
+
* 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.
|
|
2444
|
+
*
|
|
2445
|
+
* Required API Key ACLs:
|
|
2446
|
+
* - admin
|
|
2447
|
+
*
|
|
2448
|
+
* @deprecated
|
|
2449
|
+
* @param getUserId - The getUserId object.
|
|
2450
|
+
* @param getUserId.userID - Unique identifier of the user who makes the search request.
|
|
2451
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2452
|
+
* @see getUserId for the plain version.
|
|
2453
|
+
*/
|
|
2454
|
+
getUserIdWithHTTPInfo({ userID }, requestOptions) {
|
|
2455
|
+
validateRequired("userID", "getUserIdWithHTTPInfo", userID);
|
|
2456
|
+
const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
|
|
2457
|
+
const headers = {};
|
|
2458
|
+
const queryParameters = {};
|
|
2459
|
+
const request = {
|
|
2460
|
+
method: "GET",
|
|
2461
|
+
path: requestPath,
|
|
2462
|
+
queryParameters,
|
|
2463
|
+
headers
|
|
2464
|
+
};
|
|
2465
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2466
|
+
},
|
|
1438
2467
|
/**
|
|
1439
2468
|
* 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.
|
|
1440
2469
|
*
|
|
@@ -1461,6 +2490,35 @@ function createSearchClient({
|
|
|
1461
2490
|
};
|
|
1462
2491
|
return transporter.request(request, requestOptions);
|
|
1463
2492
|
},
|
|
2493
|
+
/**
|
|
2494
|
+
* 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.
|
|
2495
|
+
*
|
|
2496
|
+
* 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.
|
|
2497
|
+
*
|
|
2498
|
+
* Required API Key ACLs:
|
|
2499
|
+
* - admin
|
|
2500
|
+
*
|
|
2501
|
+
* @deprecated
|
|
2502
|
+
* @param hasPendingMappings - The hasPendingMappings object.
|
|
2503
|
+
* @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
|
|
2504
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2505
|
+
* @see hasPendingMappings for the plain version.
|
|
2506
|
+
*/
|
|
2507
|
+
hasPendingMappingsWithHTTPInfo({ getClusters } = {}, requestOptions = void 0) {
|
|
2508
|
+
const requestPath = "/1/clusters/mapping/pending";
|
|
2509
|
+
const headers = {};
|
|
2510
|
+
const queryParameters = {};
|
|
2511
|
+
if (getClusters !== void 0) {
|
|
2512
|
+
queryParameters["getClusters"] = getClusters.toString();
|
|
2513
|
+
}
|
|
2514
|
+
const request = {
|
|
2515
|
+
method: "GET",
|
|
2516
|
+
path: requestPath,
|
|
2517
|
+
queryParameters,
|
|
2518
|
+
headers
|
|
2519
|
+
};
|
|
2520
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2521
|
+
},
|
|
1464
2522
|
/**
|
|
1465
2523
|
* Lists all API keys associated with your Algolia application, including their permissions and restrictions.
|
|
1466
2524
|
*
|
|
@@ -1480,6 +2538,28 @@ function createSearchClient({
|
|
|
1480
2538
|
};
|
|
1481
2539
|
return transporter.request(request, requestOptions);
|
|
1482
2540
|
},
|
|
2541
|
+
/**
|
|
2542
|
+
* Lists all API keys associated with your Algolia application, including their permissions and restrictions.
|
|
2543
|
+
*
|
|
2544
|
+
* 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.
|
|
2545
|
+
*
|
|
2546
|
+
* Required API Key ACLs:
|
|
2547
|
+
* - admin
|
|
2548
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2549
|
+
* @see listApiKeys for the plain version.
|
|
2550
|
+
*/
|
|
2551
|
+
listApiKeysWithHTTPInfo(requestOptions) {
|
|
2552
|
+
const requestPath = "/1/keys";
|
|
2553
|
+
const headers = {};
|
|
2554
|
+
const queryParameters = {};
|
|
2555
|
+
const request = {
|
|
2556
|
+
method: "GET",
|
|
2557
|
+
path: requestPath,
|
|
2558
|
+
queryParameters,
|
|
2559
|
+
headers
|
|
2560
|
+
};
|
|
2561
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2562
|
+
},
|
|
1483
2563
|
/**
|
|
1484
2564
|
* Lists the available clusters in a multi-cluster setup.
|
|
1485
2565
|
*
|
|
@@ -1501,6 +2581,30 @@ function createSearchClient({
|
|
|
1501
2581
|
};
|
|
1502
2582
|
return transporter.request(request, requestOptions);
|
|
1503
2583
|
},
|
|
2584
|
+
/**
|
|
2585
|
+
* Lists the available clusters in a multi-cluster setup.
|
|
2586
|
+
*
|
|
2587
|
+
* 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.
|
|
2588
|
+
*
|
|
2589
|
+
* Required API Key ACLs:
|
|
2590
|
+
* - admin
|
|
2591
|
+
*
|
|
2592
|
+
* @deprecated
|
|
2593
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2594
|
+
* @see listClusters for the plain version.
|
|
2595
|
+
*/
|
|
2596
|
+
listClustersWithHTTPInfo(requestOptions) {
|
|
2597
|
+
const requestPath = "/1/clusters";
|
|
2598
|
+
const headers = {};
|
|
2599
|
+
const queryParameters = {};
|
|
2600
|
+
const request = {
|
|
2601
|
+
method: "GET",
|
|
2602
|
+
path: requestPath,
|
|
2603
|
+
queryParameters,
|
|
2604
|
+
headers
|
|
2605
|
+
};
|
|
2606
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2607
|
+
},
|
|
1504
2608
|
/**
|
|
1505
2609
|
* Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
|
|
1506
2610
|
*
|
|
@@ -1529,6 +2633,37 @@ function createSearchClient({
|
|
|
1529
2633
|
};
|
|
1530
2634
|
return transporter.request(request, requestOptions);
|
|
1531
2635
|
},
|
|
2636
|
+
/**
|
|
2637
|
+
* Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
|
|
2638
|
+
*
|
|
2639
|
+
* 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.
|
|
2640
|
+
*
|
|
2641
|
+
* Required API Key ACLs:
|
|
2642
|
+
* - listIndexes
|
|
2643
|
+
* @param listIndices - The listIndices object.
|
|
2644
|
+
* @param listIndices.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
2645
|
+
* @param listIndices.hitsPerPage - Number of hits per page.
|
|
2646
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2647
|
+
* @see listIndices for the plain version.
|
|
2648
|
+
*/
|
|
2649
|
+
listIndicesWithHTTPInfo({ page, hitsPerPage } = {}, requestOptions = void 0) {
|
|
2650
|
+
const requestPath = "/1/indexes";
|
|
2651
|
+
const headers = {};
|
|
2652
|
+
const queryParameters = {};
|
|
2653
|
+
if (page !== void 0) {
|
|
2654
|
+
queryParameters["page"] = page.toString();
|
|
2655
|
+
}
|
|
2656
|
+
if (hitsPerPage !== void 0) {
|
|
2657
|
+
queryParameters["hitsPerPage"] = hitsPerPage.toString();
|
|
2658
|
+
}
|
|
2659
|
+
const request = {
|
|
2660
|
+
method: "GET",
|
|
2661
|
+
path: requestPath,
|
|
2662
|
+
queryParameters,
|
|
2663
|
+
headers
|
|
2664
|
+
};
|
|
2665
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2666
|
+
},
|
|
1532
2667
|
/**
|
|
1533
2668
|
* 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.
|
|
1534
2669
|
*
|
|
@@ -1559,6 +2694,39 @@ function createSearchClient({
|
|
|
1559
2694
|
};
|
|
1560
2695
|
return transporter.request(request, requestOptions);
|
|
1561
2696
|
},
|
|
2697
|
+
/**
|
|
2698
|
+
* 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.
|
|
2699
|
+
*
|
|
2700
|
+
* 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.
|
|
2701
|
+
*
|
|
2702
|
+
* Required API Key ACLs:
|
|
2703
|
+
* - admin
|
|
2704
|
+
*
|
|
2705
|
+
* @deprecated
|
|
2706
|
+
* @param listUserIds - The listUserIds object.
|
|
2707
|
+
* @param listUserIds.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
2708
|
+
* @param listUserIds.hitsPerPage - Number of hits per page.
|
|
2709
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2710
|
+
* @see listUserIds for the plain version.
|
|
2711
|
+
*/
|
|
2712
|
+
listUserIdsWithHTTPInfo({ page, hitsPerPage } = {}, requestOptions = void 0) {
|
|
2713
|
+
const requestPath = "/1/clusters/mapping";
|
|
2714
|
+
const headers = {};
|
|
2715
|
+
const queryParameters = {};
|
|
2716
|
+
if (page !== void 0) {
|
|
2717
|
+
queryParameters["page"] = page.toString();
|
|
2718
|
+
}
|
|
2719
|
+
if (hitsPerPage !== void 0) {
|
|
2720
|
+
queryParameters["hitsPerPage"] = hitsPerPage.toString();
|
|
2721
|
+
}
|
|
2722
|
+
const request = {
|
|
2723
|
+
method: "GET",
|
|
2724
|
+
path: requestPath,
|
|
2725
|
+
queryParameters,
|
|
2726
|
+
headers
|
|
2727
|
+
};
|
|
2728
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2729
|
+
},
|
|
1562
2730
|
/**
|
|
1563
2731
|
* 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).
|
|
1564
2732
|
*
|
|
@@ -1582,6 +2750,32 @@ function createSearchClient({
|
|
|
1582
2750
|
};
|
|
1583
2751
|
return transporter.request(request, requestOptions);
|
|
1584
2752
|
},
|
|
2753
|
+
/**
|
|
2754
|
+
* 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).
|
|
2755
|
+
*
|
|
2756
|
+
* 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.
|
|
2757
|
+
*
|
|
2758
|
+
* Required API Key ACLs:
|
|
2759
|
+
* - addObject
|
|
2760
|
+
* @param batchParams - The batchParams object.
|
|
2761
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2762
|
+
* @see multipleBatch for the plain version.
|
|
2763
|
+
*/
|
|
2764
|
+
multipleBatchWithHTTPInfo(batchParams, requestOptions) {
|
|
2765
|
+
validateRequired("batchParams", "multipleBatchWithHTTPInfo", batchParams);
|
|
2766
|
+
validateRequired("batchParams.requests", "multipleBatchWithHTTPInfo", batchParams.requests);
|
|
2767
|
+
const requestPath = "/1/indexes/*/batch";
|
|
2768
|
+
const headers = {};
|
|
2769
|
+
const queryParameters = {};
|
|
2770
|
+
const request = {
|
|
2771
|
+
method: "POST",
|
|
2772
|
+
path: requestPath,
|
|
2773
|
+
queryParameters,
|
|
2774
|
+
headers,
|
|
2775
|
+
data: batchParams
|
|
2776
|
+
};
|
|
2777
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2778
|
+
},
|
|
1585
2779
|
/**
|
|
1586
2780
|
* 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).
|
|
1587
2781
|
*
|
|
@@ -1605,13 +2799,80 @@ function createSearchClient({
|
|
|
1605
2799
|
path: requestPath,
|
|
1606
2800
|
queryParameters,
|
|
1607
2801
|
headers,
|
|
1608
|
-
data: operationIndexParams
|
|
2802
|
+
data: operationIndexParams
|
|
2803
|
+
};
|
|
2804
|
+
return transporter.request(request, requestOptions);
|
|
2805
|
+
},
|
|
2806
|
+
/**
|
|
2807
|
+
* 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).
|
|
2808
|
+
*
|
|
2809
|
+
* 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.
|
|
2810
|
+
*
|
|
2811
|
+
* Required API Key ACLs:
|
|
2812
|
+
* - addObject
|
|
2813
|
+
* @param operationIndex - The operationIndex object.
|
|
2814
|
+
* @param operationIndex.indexName - Name of the index on which to perform the operation.
|
|
2815
|
+
* @param operationIndex.operationIndexParams - The operationIndexParams object.
|
|
2816
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2817
|
+
* @see operationIndex for the plain version.
|
|
2818
|
+
*/
|
|
2819
|
+
operationIndexWithHTTPInfo({ indexName, operationIndexParams }, requestOptions) {
|
|
2820
|
+
validateRequired("indexName", "operationIndexWithHTTPInfo", indexName);
|
|
2821
|
+
validateRequired("operationIndexParams", "operationIndexWithHTTPInfo", operationIndexParams);
|
|
2822
|
+
validateRequired("operationIndexParams.operation", "operationIndexWithHTTPInfo", operationIndexParams.operation);
|
|
2823
|
+
validateRequired(
|
|
2824
|
+
"operationIndexParams.destination",
|
|
2825
|
+
"operationIndexWithHTTPInfo",
|
|
2826
|
+
operationIndexParams.destination
|
|
2827
|
+
);
|
|
2828
|
+
const requestPath = "/1/indexes/{indexName}/operation".replace("{indexName}", encodeURIComponent(indexName));
|
|
2829
|
+
const headers = {};
|
|
2830
|
+
const queryParameters = {};
|
|
2831
|
+
const request = {
|
|
2832
|
+
method: "POST",
|
|
2833
|
+
path: requestPath,
|
|
2834
|
+
queryParameters,
|
|
2835
|
+
headers,
|
|
2836
|
+
data: operationIndexParams
|
|
2837
|
+
};
|
|
2838
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2839
|
+
},
|
|
2840
|
+
/**
|
|
2841
|
+
* 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).
|
|
2842
|
+
*
|
|
2843
|
+
* Required API Key ACLs:
|
|
2844
|
+
* - addObject
|
|
2845
|
+
* @param partialUpdateObject - The partialUpdateObject object.
|
|
2846
|
+
* @param partialUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
2847
|
+
* @param partialUpdateObject.objectID - Unique record identifier.
|
|
2848
|
+
* @param partialUpdateObject.attributesToUpdate - Attributes with their values.
|
|
2849
|
+
* @param partialUpdateObject.createIfNotExists - Whether to create a new record if it doesn\'t exist.
|
|
2850
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2851
|
+
*/
|
|
2852
|
+
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists }, requestOptions) {
|
|
2853
|
+
validateRequired("indexName", "partialUpdateObject", indexName);
|
|
2854
|
+
validateRequired("objectID", "partialUpdateObject", objectID);
|
|
2855
|
+
validateRequired("attributesToUpdate", "partialUpdateObject", attributesToUpdate);
|
|
2856
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2857
|
+
const headers = {};
|
|
2858
|
+
const queryParameters = {};
|
|
2859
|
+
if (createIfNotExists !== void 0) {
|
|
2860
|
+
queryParameters["createIfNotExists"] = createIfNotExists.toString();
|
|
2861
|
+
}
|
|
2862
|
+
const request = {
|
|
2863
|
+
method: "POST",
|
|
2864
|
+
path: requestPath,
|
|
2865
|
+
queryParameters,
|
|
2866
|
+
headers,
|
|
2867
|
+
data: attributesToUpdate
|
|
1609
2868
|
};
|
|
1610
2869
|
return transporter.request(request, requestOptions);
|
|
1611
2870
|
},
|
|
1612
2871
|
/**
|
|
1613
2872
|
* 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).
|
|
1614
2873
|
*
|
|
2874
|
+
* 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.
|
|
2875
|
+
*
|
|
1615
2876
|
* Required API Key ACLs:
|
|
1616
2877
|
* - addObject
|
|
1617
2878
|
* @param partialUpdateObject - The partialUpdateObject object.
|
|
@@ -1620,11 +2881,12 @@ function createSearchClient({
|
|
|
1620
2881
|
* @param partialUpdateObject.attributesToUpdate - Attributes with their values.
|
|
1621
2882
|
* @param partialUpdateObject.createIfNotExists - Whether to create a new record if it doesn\'t exist.
|
|
1622
2883
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2884
|
+
* @see partialUpdateObject for the plain version.
|
|
1623
2885
|
*/
|
|
1624
|
-
|
|
1625
|
-
validateRequired("indexName", "
|
|
1626
|
-
validateRequired("objectID", "
|
|
1627
|
-
validateRequired("attributesToUpdate", "
|
|
2886
|
+
partialUpdateObjectWithHTTPInfo({ indexName, objectID, attributesToUpdate, createIfNotExists }, requestOptions) {
|
|
2887
|
+
validateRequired("indexName", "partialUpdateObjectWithHTTPInfo", indexName);
|
|
2888
|
+
validateRequired("objectID", "partialUpdateObjectWithHTTPInfo", objectID);
|
|
2889
|
+
validateRequired("attributesToUpdate", "partialUpdateObjectWithHTTPInfo", attributesToUpdate);
|
|
1628
2890
|
const requestPath = "/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1629
2891
|
const headers = {};
|
|
1630
2892
|
const queryParameters = {};
|
|
@@ -1638,7 +2900,7 @@ function createSearchClient({
|
|
|
1638
2900
|
headers,
|
|
1639
2901
|
data: attributesToUpdate
|
|
1640
2902
|
};
|
|
1641
|
-
return transporter.
|
|
2903
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1642
2904
|
},
|
|
1643
2905
|
/**
|
|
1644
2906
|
* Deletes a user ID and its associated data from the clusters.
|
|
@@ -1664,6 +2926,33 @@ function createSearchClient({
|
|
|
1664
2926
|
};
|
|
1665
2927
|
return transporter.request(request, requestOptions);
|
|
1666
2928
|
},
|
|
2929
|
+
/**
|
|
2930
|
+
* Deletes a user ID and its associated data from the clusters.
|
|
2931
|
+
*
|
|
2932
|
+
* 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.
|
|
2933
|
+
*
|
|
2934
|
+
* Required API Key ACLs:
|
|
2935
|
+
* - admin
|
|
2936
|
+
*
|
|
2937
|
+
* @deprecated
|
|
2938
|
+
* @param removeUserId - The removeUserId object.
|
|
2939
|
+
* @param removeUserId.userID - Unique identifier of the user who makes the search request.
|
|
2940
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2941
|
+
* @see removeUserId for the plain version.
|
|
2942
|
+
*/
|
|
2943
|
+
removeUserIdWithHTTPInfo({ userID }, requestOptions) {
|
|
2944
|
+
validateRequired("userID", "removeUserIdWithHTTPInfo", userID);
|
|
2945
|
+
const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
|
|
2946
|
+
const headers = {};
|
|
2947
|
+
const queryParameters = {};
|
|
2948
|
+
const request = {
|
|
2949
|
+
method: "DELETE",
|
|
2950
|
+
path: requestPath,
|
|
2951
|
+
queryParameters,
|
|
2952
|
+
headers
|
|
2953
|
+
};
|
|
2954
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2955
|
+
},
|
|
1667
2956
|
/**
|
|
1668
2957
|
* Replaces the list of allowed sources.
|
|
1669
2958
|
*
|
|
@@ -1687,6 +2976,32 @@ function createSearchClient({
|
|
|
1687
2976
|
};
|
|
1688
2977
|
return transporter.request(request, requestOptions);
|
|
1689
2978
|
},
|
|
2979
|
+
/**
|
|
2980
|
+
* Replaces the list of allowed sources.
|
|
2981
|
+
*
|
|
2982
|
+
* 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.
|
|
2983
|
+
*
|
|
2984
|
+
* Required API Key ACLs:
|
|
2985
|
+
* - admin
|
|
2986
|
+
* @param replaceSources - The replaceSources object.
|
|
2987
|
+
* @param replaceSources.source - Allowed sources.
|
|
2988
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2989
|
+
* @see replaceSources for the plain version.
|
|
2990
|
+
*/
|
|
2991
|
+
replaceSourcesWithHTTPInfo({ source }, requestOptions) {
|
|
2992
|
+
validateRequired("source", "replaceSourcesWithHTTPInfo", source);
|
|
2993
|
+
const requestPath = "/1/security/sources";
|
|
2994
|
+
const headers = {};
|
|
2995
|
+
const queryParameters = {};
|
|
2996
|
+
const request = {
|
|
2997
|
+
method: "PUT",
|
|
2998
|
+
path: requestPath,
|
|
2999
|
+
queryParameters,
|
|
3000
|
+
headers,
|
|
3001
|
+
data: source
|
|
3002
|
+
};
|
|
3003
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3004
|
+
},
|
|
1690
3005
|
/**
|
|
1691
3006
|
* 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.
|
|
1692
3007
|
*
|
|
@@ -1709,6 +3024,31 @@ function createSearchClient({
|
|
|
1709
3024
|
};
|
|
1710
3025
|
return transporter.request(request, requestOptions);
|
|
1711
3026
|
},
|
|
3027
|
+
/**
|
|
3028
|
+
* 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.
|
|
3029
|
+
*
|
|
3030
|
+
* 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.
|
|
3031
|
+
*
|
|
3032
|
+
* Required API Key ACLs:
|
|
3033
|
+
* - admin
|
|
3034
|
+
* @param restoreApiKey - The restoreApiKey object.
|
|
3035
|
+
* @param restoreApiKey.key - API key.
|
|
3036
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3037
|
+
* @see restoreApiKey for the plain version.
|
|
3038
|
+
*/
|
|
3039
|
+
restoreApiKeyWithHTTPInfo({ key }, requestOptions) {
|
|
3040
|
+
validateRequired("key", "restoreApiKeyWithHTTPInfo", key);
|
|
3041
|
+
const requestPath = "/1/keys/{key}/restore".replace("{key}", encodeURIComponent(key));
|
|
3042
|
+
const headers = {};
|
|
3043
|
+
const queryParameters = {};
|
|
3044
|
+
const request = {
|
|
3045
|
+
method: "POST",
|
|
3046
|
+
path: requestPath,
|
|
3047
|
+
queryParameters,
|
|
3048
|
+
headers
|
|
3049
|
+
};
|
|
3050
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3051
|
+
},
|
|
1712
3052
|
/**
|
|
1713
3053
|
* 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).
|
|
1714
3054
|
*
|
|
@@ -1734,6 +3074,34 @@ function createSearchClient({
|
|
|
1734
3074
|
};
|
|
1735
3075
|
return transporter.request(request, requestOptions);
|
|
1736
3076
|
},
|
|
3077
|
+
/**
|
|
3078
|
+
* 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).
|
|
3079
|
+
*
|
|
3080
|
+
* 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.
|
|
3081
|
+
*
|
|
3082
|
+
* Required API Key ACLs:
|
|
3083
|
+
* - addObject
|
|
3084
|
+
* @param saveObject - The saveObject object.
|
|
3085
|
+
* @param saveObject.indexName - Name of the index on which to perform the operation.
|
|
3086
|
+
* @param saveObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
3087
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3088
|
+
* @see saveObject for the plain version.
|
|
3089
|
+
*/
|
|
3090
|
+
saveObjectWithHTTPInfo({ indexName, body }, requestOptions) {
|
|
3091
|
+
validateRequired("indexName", "saveObjectWithHTTPInfo", indexName);
|
|
3092
|
+
validateRequired("body", "saveObjectWithHTTPInfo", body);
|
|
3093
|
+
const requestPath = "/1/indexes/{indexName}".replace("{indexName}", encodeURIComponent(indexName));
|
|
3094
|
+
const headers = {};
|
|
3095
|
+
const queryParameters = {};
|
|
3096
|
+
const request = {
|
|
3097
|
+
method: "POST",
|
|
3098
|
+
path: requestPath,
|
|
3099
|
+
queryParameters,
|
|
3100
|
+
headers,
|
|
3101
|
+
data: body
|
|
3102
|
+
};
|
|
3103
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3104
|
+
},
|
|
1737
3105
|
/**
|
|
1738
3106
|
* 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).
|
|
1739
3107
|
*
|
|
@@ -1767,6 +3135,42 @@ function createSearchClient({
|
|
|
1767
3135
|
};
|
|
1768
3136
|
return transporter.request(request, requestOptions);
|
|
1769
3137
|
},
|
|
3138
|
+
/**
|
|
3139
|
+
* 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).
|
|
3140
|
+
*
|
|
3141
|
+
* 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.
|
|
3142
|
+
*
|
|
3143
|
+
* Required API Key ACLs:
|
|
3144
|
+
* - editSettings
|
|
3145
|
+
* @param saveRule - The saveRule object.
|
|
3146
|
+
* @param saveRule.indexName - Name of the index on which to perform the operation.
|
|
3147
|
+
* @param saveRule.objectID - Unique identifier of a rule object.
|
|
3148
|
+
* @param saveRule.rule - The rule object.
|
|
3149
|
+
* @param saveRule.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3150
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3151
|
+
* @see saveRule for the plain version.
|
|
3152
|
+
*/
|
|
3153
|
+
saveRuleWithHTTPInfo({ indexName, objectID, rule, forwardToReplicas }, requestOptions) {
|
|
3154
|
+
validateRequired("indexName", "saveRuleWithHTTPInfo", indexName);
|
|
3155
|
+
validateRequired("objectID", "saveRuleWithHTTPInfo", objectID);
|
|
3156
|
+
validateRequired("rule", "saveRuleWithHTTPInfo", rule);
|
|
3157
|
+
validateRequired("rule.objectID", "saveRuleWithHTTPInfo", rule.objectID);
|
|
3158
|
+
validateRequired("rule.consequence", "saveRuleWithHTTPInfo", rule.consequence);
|
|
3159
|
+
const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
3160
|
+
const headers = {};
|
|
3161
|
+
const queryParameters = {};
|
|
3162
|
+
if (forwardToReplicas !== void 0) {
|
|
3163
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3164
|
+
}
|
|
3165
|
+
const request = {
|
|
3166
|
+
method: "PUT",
|
|
3167
|
+
path: requestPath,
|
|
3168
|
+
queryParameters,
|
|
3169
|
+
headers,
|
|
3170
|
+
data: rule
|
|
3171
|
+
};
|
|
3172
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3173
|
+
},
|
|
1770
3174
|
/**
|
|
1771
3175
|
* 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).
|
|
1772
3176
|
*
|
|
@@ -1800,6 +3204,42 @@ function createSearchClient({
|
|
|
1800
3204
|
};
|
|
1801
3205
|
return transporter.request(request, requestOptions);
|
|
1802
3206
|
},
|
|
3207
|
+
/**
|
|
3208
|
+
* 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).
|
|
3209
|
+
*
|
|
3210
|
+
* 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.
|
|
3211
|
+
*
|
|
3212
|
+
* Required API Key ACLs:
|
|
3213
|
+
* - editSettings
|
|
3214
|
+
* @param saveRules - The saveRules object.
|
|
3215
|
+
* @param saveRules.indexName - Name of the index on which to perform the operation.
|
|
3216
|
+
* @param saveRules.rules - The rules object.
|
|
3217
|
+
* @param saveRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3218
|
+
* @param saveRules.clearExistingRules - Whether existing rules should be deleted before adding this batch.
|
|
3219
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3220
|
+
* @see saveRules for the plain version.
|
|
3221
|
+
*/
|
|
3222
|
+
saveRulesWithHTTPInfo({ indexName, rules, forwardToReplicas, clearExistingRules }, requestOptions) {
|
|
3223
|
+
validateRequired("indexName", "saveRulesWithHTTPInfo", indexName);
|
|
3224
|
+
validateRequired("rules", "saveRulesWithHTTPInfo", rules);
|
|
3225
|
+
const requestPath = "/1/indexes/{indexName}/rules/batch".replace("{indexName}", encodeURIComponent(indexName));
|
|
3226
|
+
const headers = {};
|
|
3227
|
+
const queryParameters = {};
|
|
3228
|
+
if (forwardToReplicas !== void 0) {
|
|
3229
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3230
|
+
}
|
|
3231
|
+
if (clearExistingRules !== void 0) {
|
|
3232
|
+
queryParameters["clearExistingRules"] = clearExistingRules.toString();
|
|
3233
|
+
}
|
|
3234
|
+
const request = {
|
|
3235
|
+
method: "POST",
|
|
3236
|
+
path: requestPath,
|
|
3237
|
+
queryParameters,
|
|
3238
|
+
headers,
|
|
3239
|
+
data: rules
|
|
3240
|
+
};
|
|
3241
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3242
|
+
},
|
|
1803
3243
|
/**
|
|
1804
3244
|
* 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).
|
|
1805
3245
|
*
|
|
@@ -1833,6 +3273,42 @@ function createSearchClient({
|
|
|
1833
3273
|
};
|
|
1834
3274
|
return transporter.request(request, requestOptions);
|
|
1835
3275
|
},
|
|
3276
|
+
/**
|
|
3277
|
+
* 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).
|
|
3278
|
+
*
|
|
3279
|
+
* 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.
|
|
3280
|
+
*
|
|
3281
|
+
* Required API Key ACLs:
|
|
3282
|
+
* - editSettings
|
|
3283
|
+
* @param saveSynonym - The saveSynonym object.
|
|
3284
|
+
* @param saveSynonym.indexName - Name of the index on which to perform the operation.
|
|
3285
|
+
* @param saveSynonym.objectID - Unique identifier of a synonym object.
|
|
3286
|
+
* @param saveSynonym.synonymHit - The synonymHit object.
|
|
3287
|
+
* @param saveSynonym.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3288
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3289
|
+
* @see saveSynonym for the plain version.
|
|
3290
|
+
*/
|
|
3291
|
+
saveSynonymWithHTTPInfo({ indexName, objectID, synonymHit, forwardToReplicas }, requestOptions) {
|
|
3292
|
+
validateRequired("indexName", "saveSynonymWithHTTPInfo", indexName);
|
|
3293
|
+
validateRequired("objectID", "saveSynonymWithHTTPInfo", objectID);
|
|
3294
|
+
validateRequired("synonymHit", "saveSynonymWithHTTPInfo", synonymHit);
|
|
3295
|
+
validateRequired("synonymHit.objectID", "saveSynonymWithHTTPInfo", synonymHit.objectID);
|
|
3296
|
+
validateRequired("synonymHit.type", "saveSynonymWithHTTPInfo", synonymHit.type);
|
|
3297
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
3298
|
+
const headers = {};
|
|
3299
|
+
const queryParameters = {};
|
|
3300
|
+
if (forwardToReplicas !== void 0) {
|
|
3301
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3302
|
+
}
|
|
3303
|
+
const request = {
|
|
3304
|
+
method: "PUT",
|
|
3305
|
+
path: requestPath,
|
|
3306
|
+
queryParameters,
|
|
3307
|
+
headers,
|
|
3308
|
+
data: synonymHit
|
|
3309
|
+
};
|
|
3310
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3311
|
+
},
|
|
1836
3312
|
/**
|
|
1837
3313
|
* 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).
|
|
1838
3314
|
*
|
|
@@ -1851,30 +3327,115 @@ function createSearchClient({
|
|
|
1851
3327
|
const requestPath = "/1/indexes/{indexName}/synonyms/batch".replace("{indexName}", encodeURIComponent(indexName));
|
|
1852
3328
|
const headers = {};
|
|
1853
3329
|
const queryParameters = {};
|
|
1854
|
-
if (forwardToReplicas !== void 0) {
|
|
1855
|
-
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1856
|
-
}
|
|
1857
|
-
if (replaceExistingSynonyms !== void 0) {
|
|
1858
|
-
queryParameters["replaceExistingSynonyms"] = replaceExistingSynonyms.toString();
|
|
1859
|
-
}
|
|
3330
|
+
if (forwardToReplicas !== void 0) {
|
|
3331
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3332
|
+
}
|
|
3333
|
+
if (replaceExistingSynonyms !== void 0) {
|
|
3334
|
+
queryParameters["replaceExistingSynonyms"] = replaceExistingSynonyms.toString();
|
|
3335
|
+
}
|
|
3336
|
+
const request = {
|
|
3337
|
+
method: "POST",
|
|
3338
|
+
path: requestPath,
|
|
3339
|
+
queryParameters,
|
|
3340
|
+
headers,
|
|
3341
|
+
data: synonymHit
|
|
3342
|
+
};
|
|
3343
|
+
return transporter.request(request, requestOptions);
|
|
3344
|
+
},
|
|
3345
|
+
/**
|
|
3346
|
+
* 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).
|
|
3347
|
+
*
|
|
3348
|
+
* 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.
|
|
3349
|
+
*
|
|
3350
|
+
* Required API Key ACLs:
|
|
3351
|
+
* - editSettings
|
|
3352
|
+
* @param saveSynonyms - The saveSynonyms object.
|
|
3353
|
+
* @param saveSynonyms.indexName - Name of the index on which to perform the operation.
|
|
3354
|
+
* @param saveSynonyms.synonymHit - The synonymHit object.
|
|
3355
|
+
* @param saveSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3356
|
+
* @param saveSynonyms.replaceExistingSynonyms - Whether to replace all synonyms in the index with the ones sent with this request.
|
|
3357
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3358
|
+
* @see saveSynonyms for the plain version.
|
|
3359
|
+
*/
|
|
3360
|
+
saveSynonymsWithHTTPInfo({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms }, requestOptions) {
|
|
3361
|
+
validateRequired("indexName", "saveSynonymsWithHTTPInfo", indexName);
|
|
3362
|
+
validateRequired("synonymHit", "saveSynonymsWithHTTPInfo", synonymHit);
|
|
3363
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/batch".replace("{indexName}", encodeURIComponent(indexName));
|
|
3364
|
+
const headers = {};
|
|
3365
|
+
const queryParameters = {};
|
|
3366
|
+
if (forwardToReplicas !== void 0) {
|
|
3367
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3368
|
+
}
|
|
3369
|
+
if (replaceExistingSynonyms !== void 0) {
|
|
3370
|
+
queryParameters["replaceExistingSynonyms"] = replaceExistingSynonyms.toString();
|
|
3371
|
+
}
|
|
3372
|
+
const request = {
|
|
3373
|
+
method: "POST",
|
|
3374
|
+
path: requestPath,
|
|
3375
|
+
queryParameters,
|
|
3376
|
+
headers,
|
|
3377
|
+
data: synonymHit
|
|
3378
|
+
};
|
|
3379
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3380
|
+
},
|
|
3381
|
+
/**
|
|
3382
|
+
* 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.
|
|
3383
|
+
*
|
|
3384
|
+
* Required API Key ACLs:
|
|
3385
|
+
* - search
|
|
3386
|
+
* @param searchMethodParams - Multi-query search request body. Results are returned in the same order as the requests.
|
|
3387
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3388
|
+
*/
|
|
3389
|
+
search(searchMethodParams, requestOptions) {
|
|
3390
|
+
if (searchMethodParams && Array.isArray(searchMethodParams)) {
|
|
3391
|
+
const newSignatureRequest = {
|
|
3392
|
+
requests: searchMethodParams.map(({ params, ...legacyRequest }) => {
|
|
3393
|
+
if (legacyRequest.type === "facet") {
|
|
3394
|
+
return {
|
|
3395
|
+
...legacyRequest,
|
|
3396
|
+
...params,
|
|
3397
|
+
type: "facet"
|
|
3398
|
+
};
|
|
3399
|
+
}
|
|
3400
|
+
return {
|
|
3401
|
+
...legacyRequest,
|
|
3402
|
+
...params,
|
|
3403
|
+
facet: void 0,
|
|
3404
|
+
maxFacetHits: void 0,
|
|
3405
|
+
facetQuery: void 0
|
|
3406
|
+
};
|
|
3407
|
+
})
|
|
3408
|
+
};
|
|
3409
|
+
searchMethodParams = newSignatureRequest;
|
|
3410
|
+
}
|
|
3411
|
+
validateRequired("searchMethodParams", "search", searchMethodParams);
|
|
3412
|
+
validateRequired("searchMethodParams.requests", "search", searchMethodParams.requests);
|
|
3413
|
+
const requestPath = "/1/indexes/*/queries";
|
|
3414
|
+
const headers = {};
|
|
3415
|
+
const queryParameters = {};
|
|
1860
3416
|
const request = {
|
|
1861
3417
|
method: "POST",
|
|
1862
3418
|
path: requestPath,
|
|
1863
3419
|
queryParameters,
|
|
1864
3420
|
headers,
|
|
1865
|
-
data:
|
|
3421
|
+
data: searchMethodParams,
|
|
3422
|
+
useReadTransporter: true,
|
|
3423
|
+
cacheable: true
|
|
1866
3424
|
};
|
|
1867
3425
|
return transporter.request(request, requestOptions);
|
|
1868
3426
|
},
|
|
1869
3427
|
/**
|
|
1870
3428
|
* 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.
|
|
1871
3429
|
*
|
|
3430
|
+
* 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.
|
|
3431
|
+
*
|
|
1872
3432
|
* Required API Key ACLs:
|
|
1873
3433
|
* - search
|
|
1874
3434
|
* @param searchMethodParams - Multi-query search request body. Results are returned in the same order as the requests.
|
|
1875
3435
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3436
|
+
* @see search for the plain version.
|
|
1876
3437
|
*/
|
|
1877
|
-
|
|
3438
|
+
searchWithHTTPInfo(searchMethodParams, requestOptions) {
|
|
1878
3439
|
if (searchMethodParams && Array.isArray(searchMethodParams)) {
|
|
1879
3440
|
const newSignatureRequest = {
|
|
1880
3441
|
requests: searchMethodParams.map(({ params, ...legacyRequest }) => {
|
|
@@ -1896,8 +3457,8 @@ function createSearchClient({
|
|
|
1896
3457
|
};
|
|
1897
3458
|
searchMethodParams = newSignatureRequest;
|
|
1898
3459
|
}
|
|
1899
|
-
validateRequired("searchMethodParams", "
|
|
1900
|
-
validateRequired("searchMethodParams.requests", "
|
|
3460
|
+
validateRequired("searchMethodParams", "searchWithHTTPInfo", searchMethodParams);
|
|
3461
|
+
validateRequired("searchMethodParams.requests", "searchWithHTTPInfo", searchMethodParams.requests);
|
|
1901
3462
|
const requestPath = "/1/indexes/*/queries";
|
|
1902
3463
|
const headers = {};
|
|
1903
3464
|
const queryParameters = {};
|
|
@@ -1910,7 +3471,7 @@ function createSearchClient({
|
|
|
1910
3471
|
useReadTransporter: true,
|
|
1911
3472
|
cacheable: true
|
|
1912
3473
|
};
|
|
1913
|
-
return transporter.
|
|
3474
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1914
3475
|
},
|
|
1915
3476
|
/**
|
|
1916
3477
|
* Searches for standard and custom dictionary entries.
|
|
@@ -1947,6 +3508,48 @@ function createSearchClient({
|
|
|
1947
3508
|
};
|
|
1948
3509
|
return transporter.request(request, requestOptions);
|
|
1949
3510
|
},
|
|
3511
|
+
/**
|
|
3512
|
+
* Searches for standard and custom dictionary entries.
|
|
3513
|
+
*
|
|
3514
|
+
* 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.
|
|
3515
|
+
*
|
|
3516
|
+
* Required API Key ACLs:
|
|
3517
|
+
* - settings
|
|
3518
|
+
* @param searchDictionaryEntries - The searchDictionaryEntries object.
|
|
3519
|
+
* @param searchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
3520
|
+
* @param searchDictionaryEntries.searchDictionaryEntriesParams - The searchDictionaryEntriesParams object.
|
|
3521
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3522
|
+
* @see searchDictionaryEntries for the plain version.
|
|
3523
|
+
*/
|
|
3524
|
+
searchDictionaryEntriesWithHTTPInfo({ dictionaryName, searchDictionaryEntriesParams }, requestOptions) {
|
|
3525
|
+
validateRequired("dictionaryName", "searchDictionaryEntriesWithHTTPInfo", dictionaryName);
|
|
3526
|
+
validateRequired(
|
|
3527
|
+
"searchDictionaryEntriesParams",
|
|
3528
|
+
"searchDictionaryEntriesWithHTTPInfo",
|
|
3529
|
+
searchDictionaryEntriesParams
|
|
3530
|
+
);
|
|
3531
|
+
validateRequired(
|
|
3532
|
+
"searchDictionaryEntriesParams.query",
|
|
3533
|
+
"searchDictionaryEntriesWithHTTPInfo",
|
|
3534
|
+
searchDictionaryEntriesParams.query
|
|
3535
|
+
);
|
|
3536
|
+
const requestPath = "/1/dictionaries/{dictionaryName}/search".replace(
|
|
3537
|
+
"{dictionaryName}",
|
|
3538
|
+
encodeURIComponent(dictionaryName)
|
|
3539
|
+
);
|
|
3540
|
+
const headers = {};
|
|
3541
|
+
const queryParameters = {};
|
|
3542
|
+
const request = {
|
|
3543
|
+
method: "POST",
|
|
3544
|
+
path: requestPath,
|
|
3545
|
+
queryParameters,
|
|
3546
|
+
headers,
|
|
3547
|
+
data: searchDictionaryEntriesParams,
|
|
3548
|
+
useReadTransporter: true,
|
|
3549
|
+
cacheable: true
|
|
3550
|
+
};
|
|
3551
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3552
|
+
},
|
|
1950
3553
|
/**
|
|
1951
3554
|
* 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**.
|
|
1952
3555
|
*
|
|
@@ -1975,6 +3578,37 @@ function createSearchClient({
|
|
|
1975
3578
|
};
|
|
1976
3579
|
return transporter.request(request, requestOptions);
|
|
1977
3580
|
},
|
|
3581
|
+
/**
|
|
3582
|
+
* 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**.
|
|
3583
|
+
*
|
|
3584
|
+
* 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.
|
|
3585
|
+
*
|
|
3586
|
+
* Required API Key ACLs:
|
|
3587
|
+
* - search
|
|
3588
|
+
* @param searchForFacetValues - The searchForFacetValues object.
|
|
3589
|
+
* @param searchForFacetValues.indexName - Name of the index on which to perform the operation.
|
|
3590
|
+
* @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.
|
|
3591
|
+
* @param searchForFacetValues.searchForFacetValuesRequest - The searchForFacetValuesRequest object.
|
|
3592
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3593
|
+
* @see searchForFacetValues for the plain version.
|
|
3594
|
+
*/
|
|
3595
|
+
searchForFacetValuesWithHTTPInfo({ indexName, facetName, searchForFacetValuesRequest }, requestOptions) {
|
|
3596
|
+
validateRequired("indexName", "searchForFacetValuesWithHTTPInfo", indexName);
|
|
3597
|
+
validateRequired("facetName", "searchForFacetValuesWithHTTPInfo", facetName);
|
|
3598
|
+
const requestPath = "/1/indexes/{indexName}/facets/{facetName}/query".replace("{indexName}", encodeURIComponent(indexName)).replace("{facetName}", encodeURIComponent(facetName));
|
|
3599
|
+
const headers = {};
|
|
3600
|
+
const queryParameters = {};
|
|
3601
|
+
const request = {
|
|
3602
|
+
method: "POST",
|
|
3603
|
+
path: requestPath,
|
|
3604
|
+
queryParameters,
|
|
3605
|
+
headers,
|
|
3606
|
+
data: searchForFacetValuesRequest ? searchForFacetValuesRequest : {},
|
|
3607
|
+
useReadTransporter: true,
|
|
3608
|
+
cacheable: true
|
|
3609
|
+
};
|
|
3610
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3611
|
+
},
|
|
1978
3612
|
/**
|
|
1979
3613
|
* Searches for rules in your index.
|
|
1980
3614
|
*
|
|
@@ -2001,6 +3635,35 @@ function createSearchClient({
|
|
|
2001
3635
|
};
|
|
2002
3636
|
return transporter.request(request, requestOptions);
|
|
2003
3637
|
},
|
|
3638
|
+
/**
|
|
3639
|
+
* Searches for rules in your index.
|
|
3640
|
+
*
|
|
3641
|
+
* 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.
|
|
3642
|
+
*
|
|
3643
|
+
* Required API Key ACLs:
|
|
3644
|
+
* - settings
|
|
3645
|
+
* @param searchRules - The searchRules object.
|
|
3646
|
+
* @param searchRules.indexName - Name of the index on which to perform the operation.
|
|
3647
|
+
* @param searchRules.searchRulesParams - The searchRulesParams object.
|
|
3648
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3649
|
+
* @see searchRules for the plain version.
|
|
3650
|
+
*/
|
|
3651
|
+
searchRulesWithHTTPInfo({ indexName, searchRulesParams }, requestOptions) {
|
|
3652
|
+
validateRequired("indexName", "searchRulesWithHTTPInfo", indexName);
|
|
3653
|
+
const requestPath = "/1/indexes/{indexName}/rules/search".replace("{indexName}", encodeURIComponent(indexName));
|
|
3654
|
+
const headers = {};
|
|
3655
|
+
const queryParameters = {};
|
|
3656
|
+
const request = {
|
|
3657
|
+
method: "POST",
|
|
3658
|
+
path: requestPath,
|
|
3659
|
+
queryParameters,
|
|
3660
|
+
headers,
|
|
3661
|
+
data: searchRulesParams ? searchRulesParams : {},
|
|
3662
|
+
useReadTransporter: true,
|
|
3663
|
+
cacheable: true
|
|
3664
|
+
};
|
|
3665
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3666
|
+
},
|
|
2004
3667
|
/**
|
|
2005
3668
|
* 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.
|
|
2006
3669
|
*
|
|
@@ -2027,6 +3690,35 @@ function createSearchClient({
|
|
|
2027
3690
|
};
|
|
2028
3691
|
return transporter.request(request, requestOptions);
|
|
2029
3692
|
},
|
|
3693
|
+
/**
|
|
3694
|
+
* 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.
|
|
3695
|
+
*
|
|
3696
|
+
* 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.
|
|
3697
|
+
*
|
|
3698
|
+
* Required API Key ACLs:
|
|
3699
|
+
* - search
|
|
3700
|
+
* @param searchSingleIndex - The searchSingleIndex object.
|
|
3701
|
+
* @param searchSingleIndex.indexName - Name of the index on which to perform the operation.
|
|
3702
|
+
* @param searchSingleIndex.searchParams - The searchParams object.
|
|
3703
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3704
|
+
* @see searchSingleIndex for the plain version.
|
|
3705
|
+
*/
|
|
3706
|
+
searchSingleIndexWithHTTPInfo({ indexName, searchParams }, requestOptions) {
|
|
3707
|
+
validateRequired("indexName", "searchSingleIndexWithHTTPInfo", indexName);
|
|
3708
|
+
const requestPath = "/1/indexes/{indexName}/query".replace("{indexName}", encodeURIComponent(indexName));
|
|
3709
|
+
const headers = {};
|
|
3710
|
+
const queryParameters = {};
|
|
3711
|
+
const request = {
|
|
3712
|
+
method: "POST",
|
|
3713
|
+
path: requestPath,
|
|
3714
|
+
queryParameters,
|
|
3715
|
+
headers,
|
|
3716
|
+
data: searchParams ? searchParams : {},
|
|
3717
|
+
useReadTransporter: true,
|
|
3718
|
+
cacheable: true
|
|
3719
|
+
};
|
|
3720
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3721
|
+
},
|
|
2030
3722
|
/**
|
|
2031
3723
|
* Searches for synonyms in your index.
|
|
2032
3724
|
*
|
|
@@ -2056,6 +3748,38 @@ function createSearchClient({
|
|
|
2056
3748
|
};
|
|
2057
3749
|
return transporter.request(request, requestOptions);
|
|
2058
3750
|
},
|
|
3751
|
+
/**
|
|
3752
|
+
* Searches for synonyms in your index.
|
|
3753
|
+
*
|
|
3754
|
+
* 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.
|
|
3755
|
+
*
|
|
3756
|
+
* Required API Key ACLs:
|
|
3757
|
+
* - settings
|
|
3758
|
+
* @param searchSynonyms - The searchSynonyms object.
|
|
3759
|
+
* @param searchSynonyms.indexName - Name of the index on which to perform the operation.
|
|
3760
|
+
* @param searchSynonyms.searchSynonymsParams - Body of the `searchSynonyms` operation.
|
|
3761
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3762
|
+
* @see searchSynonyms for the plain version.
|
|
3763
|
+
*/
|
|
3764
|
+
searchSynonymsWithHTTPInfo({ indexName, searchSynonymsParams }, requestOptions) {
|
|
3765
|
+
validateRequired("indexName", "searchSynonymsWithHTTPInfo", indexName);
|
|
3766
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/search".replace(
|
|
3767
|
+
"{indexName}",
|
|
3768
|
+
encodeURIComponent(indexName)
|
|
3769
|
+
);
|
|
3770
|
+
const headers = {};
|
|
3771
|
+
const queryParameters = {};
|
|
3772
|
+
const request = {
|
|
3773
|
+
method: "POST",
|
|
3774
|
+
path: requestPath,
|
|
3775
|
+
queryParameters,
|
|
3776
|
+
headers,
|
|
3777
|
+
data: searchSynonymsParams ? searchSynonymsParams : {},
|
|
3778
|
+
useReadTransporter: true,
|
|
3779
|
+
cacheable: true
|
|
3780
|
+
};
|
|
3781
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3782
|
+
},
|
|
2059
3783
|
/**
|
|
2060
3784
|
* 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).
|
|
2061
3785
|
*
|
|
@@ -2083,6 +3807,36 @@ function createSearchClient({
|
|
|
2083
3807
|
};
|
|
2084
3808
|
return transporter.request(request, requestOptions);
|
|
2085
3809
|
},
|
|
3810
|
+
/**
|
|
3811
|
+
* 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).
|
|
3812
|
+
*
|
|
3813
|
+
* 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.
|
|
3814
|
+
*
|
|
3815
|
+
* Required API Key ACLs:
|
|
3816
|
+
* - admin
|
|
3817
|
+
*
|
|
3818
|
+
* @deprecated
|
|
3819
|
+
* @param searchUserIdsParams - The searchUserIdsParams object.
|
|
3820
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3821
|
+
* @see searchUserIds for the plain version.
|
|
3822
|
+
*/
|
|
3823
|
+
searchUserIdsWithHTTPInfo(searchUserIdsParams, requestOptions) {
|
|
3824
|
+
validateRequired("searchUserIdsParams", "searchUserIdsWithHTTPInfo", searchUserIdsParams);
|
|
3825
|
+
validateRequired("searchUserIdsParams.query", "searchUserIdsWithHTTPInfo", searchUserIdsParams.query);
|
|
3826
|
+
const requestPath = "/1/clusters/mapping/search";
|
|
3827
|
+
const headers = {};
|
|
3828
|
+
const queryParameters = {};
|
|
3829
|
+
const request = {
|
|
3830
|
+
method: "POST",
|
|
3831
|
+
path: requestPath,
|
|
3832
|
+
queryParameters,
|
|
3833
|
+
headers,
|
|
3834
|
+
data: searchUserIdsParams,
|
|
3835
|
+
useReadTransporter: true,
|
|
3836
|
+
cacheable: true
|
|
3837
|
+
};
|
|
3838
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3839
|
+
},
|
|
2086
3840
|
/**
|
|
2087
3841
|
* Turns standard stop word dictionary entries on or off for a given language.
|
|
2088
3842
|
*
|
|
@@ -2110,6 +3864,36 @@ function createSearchClient({
|
|
|
2110
3864
|
};
|
|
2111
3865
|
return transporter.request(request, requestOptions);
|
|
2112
3866
|
},
|
|
3867
|
+
/**
|
|
3868
|
+
* Turns standard stop word dictionary entries on or off for a given language.
|
|
3869
|
+
*
|
|
3870
|
+
* 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.
|
|
3871
|
+
*
|
|
3872
|
+
* Required API Key ACLs:
|
|
3873
|
+
* - editSettings
|
|
3874
|
+
* @param dictionarySettingsParams - The dictionarySettingsParams object.
|
|
3875
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3876
|
+
* @see setDictionarySettings for the plain version.
|
|
3877
|
+
*/
|
|
3878
|
+
setDictionarySettingsWithHTTPInfo(dictionarySettingsParams, requestOptions) {
|
|
3879
|
+
validateRequired("dictionarySettingsParams", "setDictionarySettingsWithHTTPInfo", dictionarySettingsParams);
|
|
3880
|
+
validateRequired(
|
|
3881
|
+
"dictionarySettingsParams.disableStandardEntries",
|
|
3882
|
+
"setDictionarySettingsWithHTTPInfo",
|
|
3883
|
+
dictionarySettingsParams.disableStandardEntries
|
|
3884
|
+
);
|
|
3885
|
+
const requestPath = "/1/dictionaries/*/settings";
|
|
3886
|
+
const headers = {};
|
|
3887
|
+
const queryParameters = {};
|
|
3888
|
+
const request = {
|
|
3889
|
+
method: "PUT",
|
|
3890
|
+
path: requestPath,
|
|
3891
|
+
queryParameters,
|
|
3892
|
+
headers,
|
|
3893
|
+
data: dictionarySettingsParams
|
|
3894
|
+
};
|
|
3895
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3896
|
+
},
|
|
2113
3897
|
/**
|
|
2114
3898
|
* 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.
|
|
2115
3899
|
*
|
|
@@ -2139,6 +3923,38 @@ function createSearchClient({
|
|
|
2139
3923
|
};
|
|
2140
3924
|
return transporter.request(request, requestOptions);
|
|
2141
3925
|
},
|
|
3926
|
+
/**
|
|
3927
|
+
* 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.
|
|
3928
|
+
*
|
|
3929
|
+
* 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.
|
|
3930
|
+
*
|
|
3931
|
+
* Required API Key ACLs:
|
|
3932
|
+
* - editSettings
|
|
3933
|
+
* @param setSettings - The setSettings object.
|
|
3934
|
+
* @param setSettings.indexName - Name of the index on which to perform the operation.
|
|
3935
|
+
* @param setSettings.indexSettings - The indexSettings object.
|
|
3936
|
+
* @param setSettings.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3937
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3938
|
+
* @see setSettings for the plain version.
|
|
3939
|
+
*/
|
|
3940
|
+
setSettingsWithHTTPInfo({ indexName, indexSettings, forwardToReplicas }, requestOptions) {
|
|
3941
|
+
validateRequired("indexName", "setSettingsWithHTTPInfo", indexName);
|
|
3942
|
+
validateRequired("indexSettings", "setSettingsWithHTTPInfo", indexSettings);
|
|
3943
|
+
const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
|
|
3944
|
+
const headers = {};
|
|
3945
|
+
const queryParameters = {};
|
|
3946
|
+
if (forwardToReplicas !== void 0) {
|
|
3947
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3948
|
+
}
|
|
3949
|
+
const request = {
|
|
3950
|
+
method: "PUT",
|
|
3951
|
+
path: requestPath,
|
|
3952
|
+
queryParameters,
|
|
3953
|
+
headers,
|
|
3954
|
+
data: indexSettings
|
|
3955
|
+
};
|
|
3956
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3957
|
+
},
|
|
2142
3958
|
/**
|
|
2143
3959
|
* Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
|
|
2144
3960
|
*
|
|
@@ -2164,6 +3980,35 @@ function createSearchClient({
|
|
|
2164
3980
|
data: apiKey
|
|
2165
3981
|
};
|
|
2166
3982
|
return transporter.request(request, requestOptions);
|
|
3983
|
+
},
|
|
3984
|
+
/**
|
|
3985
|
+
* Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
|
|
3986
|
+
*
|
|
3987
|
+
* 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.
|
|
3988
|
+
*
|
|
3989
|
+
* Required API Key ACLs:
|
|
3990
|
+
* - admin
|
|
3991
|
+
* @param updateApiKey - The updateApiKey object.
|
|
3992
|
+
* @param updateApiKey.key - API key.
|
|
3993
|
+
* @param updateApiKey.apiKey - The apiKey object.
|
|
3994
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3995
|
+
* @see updateApiKey for the plain version.
|
|
3996
|
+
*/
|
|
3997
|
+
updateApiKeyWithHTTPInfo({ key, apiKey }, requestOptions) {
|
|
3998
|
+
validateRequired("key", "updateApiKeyWithHTTPInfo", key);
|
|
3999
|
+
validateRequired("apiKey", "updateApiKeyWithHTTPInfo", apiKey);
|
|
4000
|
+
validateRequired("apiKey.acl", "updateApiKeyWithHTTPInfo", apiKey.acl);
|
|
4001
|
+
const requestPath = "/1/keys/{key}".replace("{key}", encodeURIComponent(key));
|
|
4002
|
+
const headers = {};
|
|
4003
|
+
const queryParameters = {};
|
|
4004
|
+
const request = {
|
|
4005
|
+
method: "PUT",
|
|
4006
|
+
path: requestPath,
|
|
4007
|
+
queryParameters,
|
|
4008
|
+
headers,
|
|
4009
|
+
data: apiKey
|
|
4010
|
+
};
|
|
4011
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2167
4012
|
}
|
|
2168
4013
|
};
|
|
2169
4014
|
}
|