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