@algolia/client-search 5.55.2 → 5.56.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 +858 -5
- package/dist/builds/browser.js +1909 -91
- package/dist/builds/browser.js.map +1 -1
- package/dist/builds/browser.min.js +4 -4
- package/dist/builds/browser.min.js.map +1 -1
- package/dist/builds/browser.umd.js +6 -6
- package/dist/builds/fetch.js +1909 -91
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +1909 -91
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +1909 -91
- package/dist/builds/node.js.map +1 -1
- package/dist/builds/worker.js +1909 -91
- package/dist/builds/worker.js.map +1 -1
- package/dist/fetch.d.ts +858 -5
- package/dist/node.d.cts +858 -5
- package/dist/node.d.ts +858 -5
- package/dist/src/searchClient.cjs +1909 -91
- package/dist/src/searchClient.cjs.map +1 -1
- package/dist/src/searchClient.js +1911 -96
- package/dist/src/searchClient.js.map +1 -1
- package/dist/worker.d.ts +858 -5
- package/package.json +8 -8
package/dist/builds/browser.js
CHANGED
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
shuffle,
|
|
19
19
|
validateRequired
|
|
20
20
|
} from "@algolia/client-common";
|
|
21
|
-
var apiClientVersion = "5.
|
|
21
|
+
var apiClientVersion = "5.56.0";
|
|
22
22
|
function getDefaultHosts(appId) {
|
|
23
23
|
return [
|
|
24
24
|
{
|
|
@@ -585,6 +585,32 @@ function createSearchClient({
|
|
|
585
585
|
};
|
|
586
586
|
return transporter.request(request, requestOptions);
|
|
587
587
|
},
|
|
588
|
+
/**
|
|
589
|
+
* Creates a new API key with specific permissions and restrictions.
|
|
590
|
+
*
|
|
591
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
592
|
+
*
|
|
593
|
+
* Required API Key ACLs:
|
|
594
|
+
* - admin
|
|
595
|
+
* @param apiKey - The apiKey object.
|
|
596
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
597
|
+
* @see addApiKey for the plain version.
|
|
598
|
+
*/
|
|
599
|
+
addApiKeyWithHTTPInfo(apiKey, requestOptions) {
|
|
600
|
+
validateRequired("apiKey", "addApiKeyWithHTTPInfo", apiKey);
|
|
601
|
+
validateRequired("apiKey.acl", "addApiKeyWithHTTPInfo", apiKey.acl);
|
|
602
|
+
const requestPath = "/1/keys";
|
|
603
|
+
const headers = {};
|
|
604
|
+
const queryParameters = {};
|
|
605
|
+
const request = {
|
|
606
|
+
method: "POST",
|
|
607
|
+
path: requestPath,
|
|
608
|
+
queryParameters,
|
|
609
|
+
headers,
|
|
610
|
+
data: apiKey
|
|
611
|
+
};
|
|
612
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
613
|
+
},
|
|
588
614
|
/**
|
|
589
615
|
* If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. If you want to use auto-generated object IDs, use the [`saveObject` operation](https://www.algolia.com/doc/rest-api/search/save-object). To update _some_ attributes of an existing record, use the [`partial` operation](https://www.algolia.com/doc/rest-api/search/partial-update-object) instead. To add, update, or replace multiple records, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch).
|
|
590
616
|
*
|
|
@@ -612,6 +638,36 @@ function createSearchClient({
|
|
|
612
638
|
};
|
|
613
639
|
return transporter.request(request, requestOptions);
|
|
614
640
|
},
|
|
641
|
+
/**
|
|
642
|
+
* If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. If you want to use auto-generated object IDs, use the [`saveObject` operation](https://www.algolia.com/doc/rest-api/search/save-object). To update _some_ attributes of an existing record, use the [`partial` operation](https://www.algolia.com/doc/rest-api/search/partial-update-object) instead. To add, update, or replace multiple records, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch).
|
|
643
|
+
*
|
|
644
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
645
|
+
*
|
|
646
|
+
* Required API Key ACLs:
|
|
647
|
+
* - addObject
|
|
648
|
+
* @param addOrUpdateObject - The addOrUpdateObject object.
|
|
649
|
+
* @param addOrUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
650
|
+
* @param addOrUpdateObject.objectID - Unique record identifier.
|
|
651
|
+
* @param addOrUpdateObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
652
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
653
|
+
* @see addOrUpdateObject for the plain version.
|
|
654
|
+
*/
|
|
655
|
+
addOrUpdateObjectWithHTTPInfo({ indexName, objectID, body }, requestOptions) {
|
|
656
|
+
validateRequired("indexName", "addOrUpdateObjectWithHTTPInfo", indexName);
|
|
657
|
+
validateRequired("objectID", "addOrUpdateObjectWithHTTPInfo", objectID);
|
|
658
|
+
validateRequired("body", "addOrUpdateObjectWithHTTPInfo", body);
|
|
659
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
660
|
+
const headers = {};
|
|
661
|
+
const queryParameters = {};
|
|
662
|
+
const request = {
|
|
663
|
+
method: "PUT",
|
|
664
|
+
path: requestPath,
|
|
665
|
+
queryParameters,
|
|
666
|
+
headers,
|
|
667
|
+
data: body
|
|
668
|
+
};
|
|
669
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
670
|
+
},
|
|
615
671
|
/**
|
|
616
672
|
* Adds a source to the list of allowed sources.
|
|
617
673
|
*
|
|
@@ -635,6 +691,32 @@ function createSearchClient({
|
|
|
635
691
|
};
|
|
636
692
|
return transporter.request(request, requestOptions);
|
|
637
693
|
},
|
|
694
|
+
/**
|
|
695
|
+
* Adds a source to the list of allowed sources.
|
|
696
|
+
*
|
|
697
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
698
|
+
*
|
|
699
|
+
* Required API Key ACLs:
|
|
700
|
+
* - admin
|
|
701
|
+
* @param source - Source to add.
|
|
702
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
703
|
+
* @see appendSource for the plain version.
|
|
704
|
+
*/
|
|
705
|
+
appendSourceWithHTTPInfo(source, requestOptions) {
|
|
706
|
+
validateRequired("source", "appendSourceWithHTTPInfo", source);
|
|
707
|
+
validateRequired("source.source", "appendSourceWithHTTPInfo", source.source);
|
|
708
|
+
const requestPath = "/1/security/sources/append";
|
|
709
|
+
const headers = {};
|
|
710
|
+
const queryParameters = {};
|
|
711
|
+
const request = {
|
|
712
|
+
method: "POST",
|
|
713
|
+
path: requestPath,
|
|
714
|
+
queryParameters,
|
|
715
|
+
headers,
|
|
716
|
+
data: source
|
|
717
|
+
};
|
|
718
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
719
|
+
},
|
|
638
720
|
/**
|
|
639
721
|
* Assigns or moves a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID.
|
|
640
722
|
*
|
|
@@ -666,6 +748,40 @@ function createSearchClient({
|
|
|
666
748
|
};
|
|
667
749
|
return transporter.request(request, requestOptions);
|
|
668
750
|
},
|
|
751
|
+
/**
|
|
752
|
+
* 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.
|
|
753
|
+
*
|
|
754
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
755
|
+
*
|
|
756
|
+
* Required API Key ACLs:
|
|
757
|
+
* - admin
|
|
758
|
+
*
|
|
759
|
+
* @deprecated
|
|
760
|
+
* @param assignUserId - The assignUserId object.
|
|
761
|
+
* @param assignUserId.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
762
|
+
* @param assignUserId.assignUserIdParams - The assignUserIdParams object.
|
|
763
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
764
|
+
* @see assignUserId for the plain version.
|
|
765
|
+
*/
|
|
766
|
+
assignUserIdWithHTTPInfo({ xAlgoliaUserID, assignUserIdParams }, requestOptions) {
|
|
767
|
+
validateRequired("xAlgoliaUserID", "assignUserIdWithHTTPInfo", xAlgoliaUserID);
|
|
768
|
+
validateRequired("assignUserIdParams", "assignUserIdWithHTTPInfo", assignUserIdParams);
|
|
769
|
+
validateRequired("assignUserIdParams.cluster", "assignUserIdWithHTTPInfo", assignUserIdParams.cluster);
|
|
770
|
+
const requestPath = "/1/clusters/mapping";
|
|
771
|
+
const headers = {};
|
|
772
|
+
const queryParameters = {};
|
|
773
|
+
if (xAlgoliaUserID !== void 0) {
|
|
774
|
+
headers["X-Algolia-User-ID"] = xAlgoliaUserID.toString();
|
|
775
|
+
}
|
|
776
|
+
const request = {
|
|
777
|
+
method: "POST",
|
|
778
|
+
path: requestPath,
|
|
779
|
+
queryParameters,
|
|
780
|
+
headers,
|
|
781
|
+
data: assignUserIdParams
|
|
782
|
+
};
|
|
783
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
784
|
+
},
|
|
669
785
|
/**
|
|
670
786
|
* Adds, updates, or deletes records in one index with a single API request. Batching index updates reduces latency and increases data integrity. - Actions are applied in the order they\'re specified. - Actions are equivalent to the individual API requests of the same name. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
671
787
|
*
|
|
@@ -692,6 +808,35 @@ function createSearchClient({
|
|
|
692
808
|
};
|
|
693
809
|
return transporter.request(request, requestOptions);
|
|
694
810
|
},
|
|
811
|
+
/**
|
|
812
|
+
* 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).
|
|
813
|
+
*
|
|
814
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
815
|
+
*
|
|
816
|
+
* Required API Key ACLs:
|
|
817
|
+
* - addObject
|
|
818
|
+
* @param batch - The batch object.
|
|
819
|
+
* @param batch.indexName - Name of the index on which to perform the operation.
|
|
820
|
+
* @param batch.batchWriteParams - The batchWriteParams object.
|
|
821
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
822
|
+
* @see batch for the plain version.
|
|
823
|
+
*/
|
|
824
|
+
batchWithHTTPInfo({ indexName, batchWriteParams }, requestOptions) {
|
|
825
|
+
validateRequired("indexName", "batchWithHTTPInfo", indexName);
|
|
826
|
+
validateRequired("batchWriteParams", "batchWithHTTPInfo", batchWriteParams);
|
|
827
|
+
validateRequired("batchWriteParams.requests", "batchWithHTTPInfo", batchWriteParams.requests);
|
|
828
|
+
const requestPath = "/1/indexes/{indexName}/batch".replace("{indexName}", encodeURIComponent(indexName));
|
|
829
|
+
const headers = {};
|
|
830
|
+
const queryParameters = {};
|
|
831
|
+
const request = {
|
|
832
|
+
method: "POST",
|
|
833
|
+
path: requestPath,
|
|
834
|
+
queryParameters,
|
|
835
|
+
headers,
|
|
836
|
+
data: batchWriteParams
|
|
837
|
+
};
|
|
838
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
839
|
+
},
|
|
695
840
|
/**
|
|
696
841
|
* Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
|
|
697
842
|
*
|
|
@@ -724,6 +869,49 @@ function createSearchClient({
|
|
|
724
869
|
};
|
|
725
870
|
return transporter.request(request, requestOptions);
|
|
726
871
|
},
|
|
872
|
+
/**
|
|
873
|
+
* Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
|
|
874
|
+
*
|
|
875
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
876
|
+
*
|
|
877
|
+
* Required API Key ACLs:
|
|
878
|
+
* - admin
|
|
879
|
+
*
|
|
880
|
+
* @deprecated
|
|
881
|
+
* @param batchAssignUserIds - The batchAssignUserIds object.
|
|
882
|
+
* @param batchAssignUserIds.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
883
|
+
* @param batchAssignUserIds.batchAssignUserIdsParams - The batchAssignUserIdsParams object.
|
|
884
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
885
|
+
* @see batchAssignUserIds for the plain version.
|
|
886
|
+
*/
|
|
887
|
+
batchAssignUserIdsWithHTTPInfo({ xAlgoliaUserID, batchAssignUserIdsParams }, requestOptions) {
|
|
888
|
+
validateRequired("xAlgoliaUserID", "batchAssignUserIdsWithHTTPInfo", xAlgoliaUserID);
|
|
889
|
+
validateRequired("batchAssignUserIdsParams", "batchAssignUserIdsWithHTTPInfo", batchAssignUserIdsParams);
|
|
890
|
+
validateRequired(
|
|
891
|
+
"batchAssignUserIdsParams.cluster",
|
|
892
|
+
"batchAssignUserIdsWithHTTPInfo",
|
|
893
|
+
batchAssignUserIdsParams.cluster
|
|
894
|
+
);
|
|
895
|
+
validateRequired(
|
|
896
|
+
"batchAssignUserIdsParams.users",
|
|
897
|
+
"batchAssignUserIdsWithHTTPInfo",
|
|
898
|
+
batchAssignUserIdsParams.users
|
|
899
|
+
);
|
|
900
|
+
const requestPath = "/1/clusters/mapping/batch";
|
|
901
|
+
const headers = {};
|
|
902
|
+
const queryParameters = {};
|
|
903
|
+
if (xAlgoliaUserID !== void 0) {
|
|
904
|
+
headers["X-Algolia-User-ID"] = xAlgoliaUserID.toString();
|
|
905
|
+
}
|
|
906
|
+
const request = {
|
|
907
|
+
method: "POST",
|
|
908
|
+
path: requestPath,
|
|
909
|
+
queryParameters,
|
|
910
|
+
headers,
|
|
911
|
+
data: batchAssignUserIdsParams
|
|
912
|
+
};
|
|
913
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
914
|
+
},
|
|
727
915
|
/**
|
|
728
916
|
* Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
|
|
729
917
|
*
|
|
@@ -757,6 +945,46 @@ function createSearchClient({
|
|
|
757
945
|
};
|
|
758
946
|
return transporter.request(request, requestOptions);
|
|
759
947
|
},
|
|
948
|
+
/**
|
|
949
|
+
* Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
|
|
950
|
+
*
|
|
951
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
952
|
+
*
|
|
953
|
+
* Required API Key ACLs:
|
|
954
|
+
* - editSettings
|
|
955
|
+
* @param batchDictionaryEntries - The batchDictionaryEntries object.
|
|
956
|
+
* @param batchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
957
|
+
* @param batchDictionaryEntries.batchDictionaryEntriesParams - The batchDictionaryEntriesParams object.
|
|
958
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
959
|
+
* @see batchDictionaryEntries for the plain version.
|
|
960
|
+
*/
|
|
961
|
+
batchDictionaryEntriesWithHTTPInfo({ dictionaryName, batchDictionaryEntriesParams }, requestOptions) {
|
|
962
|
+
validateRequired("dictionaryName", "batchDictionaryEntriesWithHTTPInfo", dictionaryName);
|
|
963
|
+
validateRequired(
|
|
964
|
+
"batchDictionaryEntriesParams",
|
|
965
|
+
"batchDictionaryEntriesWithHTTPInfo",
|
|
966
|
+
batchDictionaryEntriesParams
|
|
967
|
+
);
|
|
968
|
+
validateRequired(
|
|
969
|
+
"batchDictionaryEntriesParams.requests",
|
|
970
|
+
"batchDictionaryEntriesWithHTTPInfo",
|
|
971
|
+
batchDictionaryEntriesParams.requests
|
|
972
|
+
);
|
|
973
|
+
const requestPath = "/1/dictionaries/{dictionaryName}/batch".replace(
|
|
974
|
+
"{dictionaryName}",
|
|
975
|
+
encodeURIComponent(dictionaryName)
|
|
976
|
+
);
|
|
977
|
+
const headers = {};
|
|
978
|
+
const queryParameters = {};
|
|
979
|
+
const request = {
|
|
980
|
+
method: "POST",
|
|
981
|
+
path: requestPath,
|
|
982
|
+
queryParameters,
|
|
983
|
+
headers,
|
|
984
|
+
data: batchDictionaryEntriesParams
|
|
985
|
+
};
|
|
986
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
987
|
+
},
|
|
760
988
|
/**
|
|
761
989
|
* Retrieves records from an index, up to 1,000 per request. Searching returns _hits_ (records augmented with highlighting and ranking details). Browsing returns matching records only. Use browse to export your indices. - The Analytics API doesn\'t collect data when using `browse`. - Records are ranked by attributes and custom ranking. - There\'s no ranking for typo tolerance, number of matched words, proximity, or geo distance. Browse requests automatically apply these settings: - `advancedSyntax`: `false` - `attributesToHighlight`: `[]` - `attributesToSnippet`: `[]` - `distinct`: `false` - `enablePersonalization`: `false` - `enableRules`: `false` - `facets`: `[]` - `getRankingInfo`: `false` - `ignorePlurals`: `false` - `optionalFilters`: `[]` - `typoTolerance`: `true` or `false` (`min` and `strict` evaluate to `true`) If you send these parameters with your browse requests, they\'re ignored.
|
|
762
990
|
*
|
|
@@ -782,6 +1010,34 @@ function createSearchClient({
|
|
|
782
1010
|
};
|
|
783
1011
|
return transporter.request(request, requestOptions);
|
|
784
1012
|
},
|
|
1013
|
+
/**
|
|
1014
|
+
* 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.
|
|
1015
|
+
*
|
|
1016
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1017
|
+
*
|
|
1018
|
+
* Required API Key ACLs:
|
|
1019
|
+
* - browse
|
|
1020
|
+
* @param browse - The browse object.
|
|
1021
|
+
* @param browse.indexName - Name of the index on which to perform the operation.
|
|
1022
|
+
* @param browse.browseParams - The browseParams object.
|
|
1023
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1024
|
+
* @see browse for the plain version.
|
|
1025
|
+
*/
|
|
1026
|
+
browseWithHTTPInfo({ indexName, browseParams }, requestOptions) {
|
|
1027
|
+
validateRequired("indexName", "browseWithHTTPInfo", indexName);
|
|
1028
|
+
const requestPath = "/1/indexes/{indexName}/browse".replace("{indexName}", encodeURIComponent(indexName));
|
|
1029
|
+
const headers = {};
|
|
1030
|
+
const queryParameters = {};
|
|
1031
|
+
const request = {
|
|
1032
|
+
method: "POST",
|
|
1033
|
+
path: requestPath,
|
|
1034
|
+
queryParameters,
|
|
1035
|
+
headers,
|
|
1036
|
+
data: browseParams ? browseParams : {},
|
|
1037
|
+
useReadTransporter: true
|
|
1038
|
+
};
|
|
1039
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1040
|
+
},
|
|
785
1041
|
/**
|
|
786
1042
|
* Deletes only the records from an index while keeping settings, synonyms, and rules. This operation is resource-intensive and subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
787
1043
|
*
|
|
@@ -804,6 +1060,31 @@ function createSearchClient({
|
|
|
804
1060
|
};
|
|
805
1061
|
return transporter.request(request, requestOptions);
|
|
806
1062
|
},
|
|
1063
|
+
/**
|
|
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).
|
|
1065
|
+
*
|
|
1066
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1067
|
+
*
|
|
1068
|
+
* Required API Key ACLs:
|
|
1069
|
+
* - deleteIndex
|
|
1070
|
+
* @param clearObjects - The clearObjects object.
|
|
1071
|
+
* @param clearObjects.indexName - Name of the index on which to perform the operation.
|
|
1072
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1073
|
+
* @see clearObjects for the plain version.
|
|
1074
|
+
*/
|
|
1075
|
+
clearObjectsWithHTTPInfo({ indexName }, requestOptions) {
|
|
1076
|
+
validateRequired("indexName", "clearObjectsWithHTTPInfo", indexName);
|
|
1077
|
+
const requestPath = "/1/indexes/{indexName}/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
1078
|
+
const headers = {};
|
|
1079
|
+
const queryParameters = {};
|
|
1080
|
+
const request = {
|
|
1081
|
+
method: "POST",
|
|
1082
|
+
path: requestPath,
|
|
1083
|
+
queryParameters,
|
|
1084
|
+
headers
|
|
1085
|
+
};
|
|
1086
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1087
|
+
},
|
|
807
1088
|
/**
|
|
808
1089
|
* Deletes all rules from the index.
|
|
809
1090
|
*
|
|
@@ -831,18 +1112,21 @@ function createSearchClient({
|
|
|
831
1112
|
return transporter.request(request, requestOptions);
|
|
832
1113
|
},
|
|
833
1114
|
/**
|
|
834
|
-
* Deletes all
|
|
1115
|
+
* Deletes all rules from the index.
|
|
1116
|
+
*
|
|
1117
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
835
1118
|
*
|
|
836
1119
|
* Required API Key ACLs:
|
|
837
1120
|
* - editSettings
|
|
838
|
-
* @param
|
|
839
|
-
* @param
|
|
840
|
-
* @param
|
|
1121
|
+
* @param clearRules - The clearRules object.
|
|
1122
|
+
* @param clearRules.indexName - Name of the index on which to perform the operation.
|
|
1123
|
+
* @param clearRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
841
1124
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1125
|
+
* @see clearRules for the plain version.
|
|
842
1126
|
*/
|
|
843
|
-
|
|
844
|
-
validateRequired("indexName", "
|
|
845
|
-
const requestPath = "/1/indexes/{indexName}/
|
|
1127
|
+
clearRulesWithHTTPInfo({ indexName, forwardToReplicas }, requestOptions) {
|
|
1128
|
+
validateRequired("indexName", "clearRulesWithHTTPInfo", indexName);
|
|
1129
|
+
const requestPath = "/1/indexes/{indexName}/rules/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
846
1130
|
const headers = {};
|
|
847
1131
|
const queryParameters = {};
|
|
848
1132
|
if (forwardToReplicas !== void 0) {
|
|
@@ -854,22 +1138,28 @@ function createSearchClient({
|
|
|
854
1138
|
queryParameters,
|
|
855
1139
|
headers
|
|
856
1140
|
};
|
|
857
|
-
return transporter.
|
|
1141
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
858
1142
|
},
|
|
859
1143
|
/**
|
|
860
|
-
*
|
|
861
|
-
*
|
|
862
|
-
*
|
|
863
|
-
*
|
|
1144
|
+
* Deletes all synonyms from the index.
|
|
1145
|
+
*
|
|
1146
|
+
* Required API Key ACLs:
|
|
1147
|
+
* - editSettings
|
|
1148
|
+
* @param clearSynonyms - The clearSynonyms object.
|
|
1149
|
+
* @param clearSynonyms.indexName - Name of the index on which to perform the operation.
|
|
1150
|
+
* @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
864
1151
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
865
1152
|
*/
|
|
866
|
-
|
|
867
|
-
validateRequired("
|
|
868
|
-
const requestPath = "/{
|
|
1153
|
+
clearSynonyms({ indexName, forwardToReplicas }, requestOptions) {
|
|
1154
|
+
validateRequired("indexName", "clearSynonyms", indexName);
|
|
1155
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
869
1156
|
const headers = {};
|
|
870
|
-
const queryParameters =
|
|
1157
|
+
const queryParameters = {};
|
|
1158
|
+
if (forwardToReplicas !== void 0) {
|
|
1159
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1160
|
+
}
|
|
871
1161
|
const request = {
|
|
872
|
-
method: "
|
|
1162
|
+
method: "POST",
|
|
873
1163
|
path: requestPath,
|
|
874
1164
|
queryParameters,
|
|
875
1165
|
headers
|
|
@@ -877,7 +1167,79 @@ function createSearchClient({
|
|
|
877
1167
|
return transporter.request(request, requestOptions);
|
|
878
1168
|
},
|
|
879
1169
|
/**
|
|
880
|
-
*
|
|
1170
|
+
* Deletes all synonyms from the index.
|
|
1171
|
+
*
|
|
1172
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1173
|
+
*
|
|
1174
|
+
* Required API Key ACLs:
|
|
1175
|
+
* - editSettings
|
|
1176
|
+
* @param clearSynonyms - The clearSynonyms object.
|
|
1177
|
+
* @param clearSynonyms.indexName - Name of the index on which to perform the operation.
|
|
1178
|
+
* @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1179
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1180
|
+
* @see clearSynonyms for the plain version.
|
|
1181
|
+
*/
|
|
1182
|
+
clearSynonymsWithHTTPInfo({ indexName, forwardToReplicas }, requestOptions) {
|
|
1183
|
+
validateRequired("indexName", "clearSynonymsWithHTTPInfo", indexName);
|
|
1184
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
1185
|
+
const headers = {};
|
|
1186
|
+
const queryParameters = {};
|
|
1187
|
+
if (forwardToReplicas !== void 0) {
|
|
1188
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1189
|
+
}
|
|
1190
|
+
const request = {
|
|
1191
|
+
method: "POST",
|
|
1192
|
+
path: requestPath,
|
|
1193
|
+
queryParameters,
|
|
1194
|
+
headers
|
|
1195
|
+
};
|
|
1196
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1197
|
+
},
|
|
1198
|
+
/**
|
|
1199
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1200
|
+
* @param customDelete - The customDelete object.
|
|
1201
|
+
* @param customDelete.path - Path of the endpoint, for example `1/newFeature`.
|
|
1202
|
+
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
1203
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1204
|
+
*/
|
|
1205
|
+
customDelete({ path, parameters }, requestOptions) {
|
|
1206
|
+
validateRequired("path", "customDelete", path);
|
|
1207
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1208
|
+
const headers = {};
|
|
1209
|
+
const queryParameters = parameters ? parameters : {};
|
|
1210
|
+
const request = {
|
|
1211
|
+
method: "DELETE",
|
|
1212
|
+
path: requestPath,
|
|
1213
|
+
queryParameters,
|
|
1214
|
+
headers
|
|
1215
|
+
};
|
|
1216
|
+
return transporter.request(request, requestOptions);
|
|
1217
|
+
},
|
|
1218
|
+
/**
|
|
1219
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1220
|
+
*
|
|
1221
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1222
|
+
* @param customDelete - The customDelete object.
|
|
1223
|
+
* @param customDelete.path - Path of the endpoint, for example `1/newFeature`.
|
|
1224
|
+
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
1225
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1226
|
+
* @see customDelete for the plain version.
|
|
1227
|
+
*/
|
|
1228
|
+
customDeleteWithHTTPInfo({ path, parameters }, requestOptions) {
|
|
1229
|
+
validateRequired("path", "customDeleteWithHTTPInfo", path);
|
|
1230
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1231
|
+
const headers = {};
|
|
1232
|
+
const queryParameters = parameters ? parameters : {};
|
|
1233
|
+
const request = {
|
|
1234
|
+
method: "DELETE",
|
|
1235
|
+
path: requestPath,
|
|
1236
|
+
queryParameters,
|
|
1237
|
+
headers
|
|
1238
|
+
};
|
|
1239
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1240
|
+
},
|
|
1241
|
+
/**
|
|
1242
|
+
* This method lets you send requests to the Algolia REST API.
|
|
881
1243
|
* @param customGet - The customGet object.
|
|
882
1244
|
* @param customGet.path - Path of the endpoint, for example `1/newFeature`.
|
|
883
1245
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -896,6 +1258,29 @@ function createSearchClient({
|
|
|
896
1258
|
};
|
|
897
1259
|
return transporter.request(request, requestOptions);
|
|
898
1260
|
},
|
|
1261
|
+
/**
|
|
1262
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1263
|
+
*
|
|
1264
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1265
|
+
* @param customGet - The customGet object.
|
|
1266
|
+
* @param customGet.path - Path of the endpoint, for example `1/newFeature`.
|
|
1267
|
+
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
1268
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1269
|
+
* @see customGet for the plain version.
|
|
1270
|
+
*/
|
|
1271
|
+
customGetWithHTTPInfo({ path, parameters }, requestOptions) {
|
|
1272
|
+
validateRequired("path", "customGetWithHTTPInfo", path);
|
|
1273
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1274
|
+
const headers = {};
|
|
1275
|
+
const queryParameters = parameters ? parameters : {};
|
|
1276
|
+
const request = {
|
|
1277
|
+
method: "GET",
|
|
1278
|
+
path: requestPath,
|
|
1279
|
+
queryParameters,
|
|
1280
|
+
headers
|
|
1281
|
+
};
|
|
1282
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1283
|
+
},
|
|
899
1284
|
/**
|
|
900
1285
|
* This method lets you send requests to the Algolia REST API.
|
|
901
1286
|
* @param customPost - The customPost object.
|
|
@@ -918,6 +1303,31 @@ function createSearchClient({
|
|
|
918
1303
|
};
|
|
919
1304
|
return transporter.request(request, requestOptions);
|
|
920
1305
|
},
|
|
1306
|
+
/**
|
|
1307
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1308
|
+
*
|
|
1309
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1310
|
+
* @param customPost - The customPost object.
|
|
1311
|
+
* @param customPost.path - Path of the endpoint, for example `1/newFeature`.
|
|
1312
|
+
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
1313
|
+
* @param customPost.body - Parameters to send with the custom request.
|
|
1314
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1315
|
+
* @see customPost for the plain version.
|
|
1316
|
+
*/
|
|
1317
|
+
customPostWithHTTPInfo({ path, parameters, body }, requestOptions) {
|
|
1318
|
+
validateRequired("path", "customPostWithHTTPInfo", path);
|
|
1319
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1320
|
+
const headers = {};
|
|
1321
|
+
const queryParameters = parameters ? parameters : {};
|
|
1322
|
+
const request = {
|
|
1323
|
+
method: "POST",
|
|
1324
|
+
path: requestPath,
|
|
1325
|
+
queryParameters,
|
|
1326
|
+
headers,
|
|
1327
|
+
data: body ? body : {}
|
|
1328
|
+
};
|
|
1329
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1330
|
+
},
|
|
921
1331
|
/**
|
|
922
1332
|
* This method lets you send requests to the Algolia REST API.
|
|
923
1333
|
* @param customPut - The customPut object.
|
|
@@ -940,6 +1350,31 @@ function createSearchClient({
|
|
|
940
1350
|
};
|
|
941
1351
|
return transporter.request(request, requestOptions);
|
|
942
1352
|
},
|
|
1353
|
+
/**
|
|
1354
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1355
|
+
*
|
|
1356
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1357
|
+
* @param customPut - The customPut object.
|
|
1358
|
+
* @param customPut.path - Path of the endpoint, for example `1/newFeature`.
|
|
1359
|
+
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
1360
|
+
* @param customPut.body - Parameters to send with the custom request.
|
|
1361
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1362
|
+
* @see customPut for the plain version.
|
|
1363
|
+
*/
|
|
1364
|
+
customPutWithHTTPInfo({ path, parameters, body }, requestOptions) {
|
|
1365
|
+
validateRequired("path", "customPutWithHTTPInfo", path);
|
|
1366
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1367
|
+
const headers = {};
|
|
1368
|
+
const queryParameters = parameters ? parameters : {};
|
|
1369
|
+
const request = {
|
|
1370
|
+
method: "PUT",
|
|
1371
|
+
path: requestPath,
|
|
1372
|
+
queryParameters,
|
|
1373
|
+
headers,
|
|
1374
|
+
data: body ? body : {}
|
|
1375
|
+
};
|
|
1376
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1377
|
+
},
|
|
943
1378
|
/**
|
|
944
1379
|
* Deletes the API key.
|
|
945
1380
|
*
|
|
@@ -962,6 +1397,31 @@ function createSearchClient({
|
|
|
962
1397
|
};
|
|
963
1398
|
return transporter.request(request, requestOptions);
|
|
964
1399
|
},
|
|
1400
|
+
/**
|
|
1401
|
+
* Deletes the API key.
|
|
1402
|
+
*
|
|
1403
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1404
|
+
*
|
|
1405
|
+
* Required API Key ACLs:
|
|
1406
|
+
* - admin
|
|
1407
|
+
* @param deleteApiKey - The deleteApiKey object.
|
|
1408
|
+
* @param deleteApiKey.key - API key.
|
|
1409
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1410
|
+
* @see deleteApiKey for the plain version.
|
|
1411
|
+
*/
|
|
1412
|
+
deleteApiKeyWithHTTPInfo({ key }, requestOptions) {
|
|
1413
|
+
validateRequired("key", "deleteApiKeyWithHTTPInfo", key);
|
|
1414
|
+
const requestPath = "/1/keys/{key}".replace("{key}", encodeURIComponent(key));
|
|
1415
|
+
const headers = {};
|
|
1416
|
+
const queryParameters = {};
|
|
1417
|
+
const request = {
|
|
1418
|
+
method: "DELETE",
|
|
1419
|
+
path: requestPath,
|
|
1420
|
+
queryParameters,
|
|
1421
|
+
headers
|
|
1422
|
+
};
|
|
1423
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1424
|
+
},
|
|
965
1425
|
/**
|
|
966
1426
|
* This operation doesn\'t accept empty filters. This operation is resource-intensive. Use it only if you can\'t get the object IDs of the records you want to delete. It\'s more efficient to get a list of object IDs with the [`browse` operation](https://www.algolia.com/doc/rest-api/search/browse), and then delete the records using the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch). This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
967
1427
|
*
|
|
@@ -987,6 +1447,34 @@ function createSearchClient({
|
|
|
987
1447
|
};
|
|
988
1448
|
return transporter.request(request, requestOptions);
|
|
989
1449
|
},
|
|
1450
|
+
/**
|
|
1451
|
+
* 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).
|
|
1452
|
+
*
|
|
1453
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1454
|
+
*
|
|
1455
|
+
* Required API Key ACLs:
|
|
1456
|
+
* - deleteIndex
|
|
1457
|
+
* @param deleteBy - The deleteBy object.
|
|
1458
|
+
* @param deleteBy.indexName - Name of the index on which to perform the operation.
|
|
1459
|
+
* @param deleteBy.deleteByParams - The deleteByParams object.
|
|
1460
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1461
|
+
* @see deleteBy for the plain version.
|
|
1462
|
+
*/
|
|
1463
|
+
deleteByWithHTTPInfo({ indexName, deleteByParams }, requestOptions) {
|
|
1464
|
+
validateRequired("indexName", "deleteByWithHTTPInfo", indexName);
|
|
1465
|
+
validateRequired("deleteByParams", "deleteByWithHTTPInfo", deleteByParams);
|
|
1466
|
+
const requestPath = "/1/indexes/{indexName}/deleteByQuery".replace("{indexName}", encodeURIComponent(indexName));
|
|
1467
|
+
const headers = {};
|
|
1468
|
+
const queryParameters = {};
|
|
1469
|
+
const request = {
|
|
1470
|
+
method: "POST",
|
|
1471
|
+
path: requestPath,
|
|
1472
|
+
queryParameters,
|
|
1473
|
+
headers,
|
|
1474
|
+
data: deleteByParams
|
|
1475
|
+
};
|
|
1476
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1477
|
+
},
|
|
990
1478
|
/**
|
|
991
1479
|
* Deletes an index and all its settings. - Deleting an index doesn\'t delete its analytics data. - If you try to delete a non-existing index, the operation is ignored without warning. - If the index you want to delete has replica indices, the replicas become independent indices. - If the index you want to delete is a replica index, you must first unlink it from its primary index before you can delete it. For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas).
|
|
992
1480
|
*
|
|
@@ -1009,6 +1497,31 @@ function createSearchClient({
|
|
|
1009
1497
|
};
|
|
1010
1498
|
return transporter.request(request, requestOptions);
|
|
1011
1499
|
},
|
|
1500
|
+
/**
|
|
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).
|
|
1502
|
+
*
|
|
1503
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1504
|
+
*
|
|
1505
|
+
* Required API Key ACLs:
|
|
1506
|
+
* - deleteIndex
|
|
1507
|
+
* @param deleteIndex - The deleteIndex object.
|
|
1508
|
+
* @param deleteIndex.indexName - Name of the index on which to perform the operation.
|
|
1509
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1510
|
+
* @see deleteIndex for the plain version.
|
|
1511
|
+
*/
|
|
1512
|
+
deleteIndexWithHTTPInfo({ indexName }, requestOptions) {
|
|
1513
|
+
validateRequired("indexName", "deleteIndexWithHTTPInfo", indexName);
|
|
1514
|
+
const requestPath = "/1/indexes/{indexName}".replace("{indexName}", encodeURIComponent(indexName));
|
|
1515
|
+
const headers = {};
|
|
1516
|
+
const queryParameters = {};
|
|
1517
|
+
const request = {
|
|
1518
|
+
method: "DELETE",
|
|
1519
|
+
path: requestPath,
|
|
1520
|
+
queryParameters,
|
|
1521
|
+
headers
|
|
1522
|
+
};
|
|
1523
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1524
|
+
},
|
|
1012
1525
|
/**
|
|
1013
1526
|
* Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch). To delete records matching a query, use the [`deleteBy` operation](https://www.algolia.com/doc/rest-api/search/delete-by).
|
|
1014
1527
|
*
|
|
@@ -1033,6 +1546,33 @@ function createSearchClient({
|
|
|
1033
1546
|
};
|
|
1034
1547
|
return transporter.request(request, requestOptions);
|
|
1035
1548
|
},
|
|
1549
|
+
/**
|
|
1550
|
+
* 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).
|
|
1551
|
+
*
|
|
1552
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1553
|
+
*
|
|
1554
|
+
* Required API Key ACLs:
|
|
1555
|
+
* - deleteObject
|
|
1556
|
+
* @param deleteObject - The deleteObject object.
|
|
1557
|
+
* @param deleteObject.indexName - Name of the index on which to perform the operation.
|
|
1558
|
+
* @param deleteObject.objectID - Unique record identifier.
|
|
1559
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1560
|
+
* @see deleteObject for the plain version.
|
|
1561
|
+
*/
|
|
1562
|
+
deleteObjectWithHTTPInfo({ indexName, objectID }, requestOptions) {
|
|
1563
|
+
validateRequired("indexName", "deleteObjectWithHTTPInfo", indexName);
|
|
1564
|
+
validateRequired("objectID", "deleteObjectWithHTTPInfo", objectID);
|
|
1565
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1566
|
+
const headers = {};
|
|
1567
|
+
const queryParameters = {};
|
|
1568
|
+
const request = {
|
|
1569
|
+
method: "DELETE",
|
|
1570
|
+
path: requestPath,
|
|
1571
|
+
queryParameters,
|
|
1572
|
+
headers
|
|
1573
|
+
};
|
|
1574
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1575
|
+
},
|
|
1036
1576
|
/**
|
|
1037
1577
|
* Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-rules).
|
|
1038
1578
|
*
|
|
@@ -1061,6 +1601,37 @@ function createSearchClient({
|
|
|
1061
1601
|
};
|
|
1062
1602
|
return transporter.request(request, requestOptions);
|
|
1063
1603
|
},
|
|
1604
|
+
/**
|
|
1605
|
+
* 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).
|
|
1606
|
+
*
|
|
1607
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1608
|
+
*
|
|
1609
|
+
* Required API Key ACLs:
|
|
1610
|
+
* - editSettings
|
|
1611
|
+
* @param deleteRule - The deleteRule object.
|
|
1612
|
+
* @param deleteRule.indexName - Name of the index on which to perform the operation.
|
|
1613
|
+
* @param deleteRule.objectID - Unique identifier of a rule object.
|
|
1614
|
+
* @param deleteRule.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1615
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1616
|
+
* @see deleteRule for the plain version.
|
|
1617
|
+
*/
|
|
1618
|
+
deleteRuleWithHTTPInfo({ indexName, objectID, forwardToReplicas }, requestOptions) {
|
|
1619
|
+
validateRequired("indexName", "deleteRuleWithHTTPInfo", indexName);
|
|
1620
|
+
validateRequired("objectID", "deleteRuleWithHTTPInfo", objectID);
|
|
1621
|
+
const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1622
|
+
const headers = {};
|
|
1623
|
+
const queryParameters = {};
|
|
1624
|
+
if (forwardToReplicas !== void 0) {
|
|
1625
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1626
|
+
}
|
|
1627
|
+
const request = {
|
|
1628
|
+
method: "DELETE",
|
|
1629
|
+
path: requestPath,
|
|
1630
|
+
queryParameters,
|
|
1631
|
+
headers
|
|
1632
|
+
};
|
|
1633
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1634
|
+
},
|
|
1064
1635
|
/**
|
|
1065
1636
|
* Deletes a source from the list of allowed sources.
|
|
1066
1637
|
*
|
|
@@ -1083,6 +1654,31 @@ function createSearchClient({
|
|
|
1083
1654
|
};
|
|
1084
1655
|
return transporter.request(request, requestOptions);
|
|
1085
1656
|
},
|
|
1657
|
+
/**
|
|
1658
|
+
* Deletes a source from the list of allowed sources.
|
|
1659
|
+
*
|
|
1660
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1661
|
+
*
|
|
1662
|
+
* Required API Key ACLs:
|
|
1663
|
+
* - admin
|
|
1664
|
+
* @param deleteSource - The deleteSource object.
|
|
1665
|
+
* @param deleteSource.source - IP address range of the source.
|
|
1666
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1667
|
+
* @see deleteSource for the plain version.
|
|
1668
|
+
*/
|
|
1669
|
+
deleteSourceWithHTTPInfo({ source }, requestOptions) {
|
|
1670
|
+
validateRequired("source", "deleteSourceWithHTTPInfo", source);
|
|
1671
|
+
const requestPath = "/1/security/sources/{source}".replace("{source}", encodeURIComponent(source));
|
|
1672
|
+
const headers = {};
|
|
1673
|
+
const queryParameters = {};
|
|
1674
|
+
const request = {
|
|
1675
|
+
method: "DELETE",
|
|
1676
|
+
path: requestPath,
|
|
1677
|
+
queryParameters,
|
|
1678
|
+
headers
|
|
1679
|
+
};
|
|
1680
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1681
|
+
},
|
|
1086
1682
|
/**
|
|
1087
1683
|
* Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-synonyms).
|
|
1088
1684
|
*
|
|
@@ -1112,13 +1708,44 @@ function createSearchClient({
|
|
|
1112
1708
|
return transporter.request(request, requestOptions);
|
|
1113
1709
|
},
|
|
1114
1710
|
/**
|
|
1115
|
-
*
|
|
1711
|
+
* 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).
|
|
1712
|
+
*
|
|
1713
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1116
1714
|
*
|
|
1117
1715
|
* Required API Key ACLs:
|
|
1118
|
-
* -
|
|
1119
|
-
* @param
|
|
1120
|
-
* @param
|
|
1121
|
-
* @param
|
|
1716
|
+
* - editSettings
|
|
1717
|
+
* @param deleteSynonym - The deleteSynonym object.
|
|
1718
|
+
* @param deleteSynonym.indexName - Name of the index on which to perform the operation.
|
|
1719
|
+
* @param deleteSynonym.objectID - Unique identifier of a synonym object.
|
|
1720
|
+
* @param deleteSynonym.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1721
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1722
|
+
* @see deleteSynonym for the plain version.
|
|
1723
|
+
*/
|
|
1724
|
+
deleteSynonymWithHTTPInfo({ indexName, objectID, forwardToReplicas }, requestOptions) {
|
|
1725
|
+
validateRequired("indexName", "deleteSynonymWithHTTPInfo", indexName);
|
|
1726
|
+
validateRequired("objectID", "deleteSynonymWithHTTPInfo", objectID);
|
|
1727
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1728
|
+
const headers = {};
|
|
1729
|
+
const queryParameters = {};
|
|
1730
|
+
if (forwardToReplicas !== void 0) {
|
|
1731
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1732
|
+
}
|
|
1733
|
+
const request = {
|
|
1734
|
+
method: "DELETE",
|
|
1735
|
+
path: requestPath,
|
|
1736
|
+
queryParameters,
|
|
1737
|
+
headers
|
|
1738
|
+
};
|
|
1739
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1740
|
+
},
|
|
1741
|
+
/**
|
|
1742
|
+
* 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>`.
|
|
1743
|
+
*
|
|
1744
|
+
* Required API Key ACLs:
|
|
1745
|
+
* - search
|
|
1746
|
+
* @param getApiKey - The getApiKey object.
|
|
1747
|
+
* @param getApiKey.key - API key.
|
|
1748
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1122
1749
|
*/
|
|
1123
1750
|
getApiKey({ key }, requestOptions) {
|
|
1124
1751
|
validateRequired("key", "getApiKey", key);
|
|
@@ -1133,6 +1760,31 @@ function createSearchClient({
|
|
|
1133
1760
|
};
|
|
1134
1761
|
return transporter.request(request, requestOptions);
|
|
1135
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>`.
|
|
1765
|
+
*
|
|
1766
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1767
|
+
*
|
|
1768
|
+
* Required API Key ACLs:
|
|
1769
|
+
* - search
|
|
1770
|
+
* @param getApiKey - The getApiKey object.
|
|
1771
|
+
* @param getApiKey.key - API key.
|
|
1772
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1773
|
+
* @see getApiKey for the plain version.
|
|
1774
|
+
*/
|
|
1775
|
+
getApiKeyWithHTTPInfo({ key }, requestOptions) {
|
|
1776
|
+
validateRequired("key", "getApiKeyWithHTTPInfo", key);
|
|
1777
|
+
const requestPath = "/1/keys/{key}".replace("{key}", encodeURIComponent(key));
|
|
1778
|
+
const headers = {};
|
|
1779
|
+
const queryParameters = {};
|
|
1780
|
+
const request = {
|
|
1781
|
+
method: "GET",
|
|
1782
|
+
path: requestPath,
|
|
1783
|
+
queryParameters,
|
|
1784
|
+
headers
|
|
1785
|
+
};
|
|
1786
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1787
|
+
},
|
|
1136
1788
|
/**
|
|
1137
1789
|
* Checks the status of a given application task.
|
|
1138
1790
|
*
|
|
@@ -1155,6 +1807,31 @@ function createSearchClient({
|
|
|
1155
1807
|
};
|
|
1156
1808
|
return transporter.request(request, requestOptions);
|
|
1157
1809
|
},
|
|
1810
|
+
/**
|
|
1811
|
+
* Checks the status of a given application task.
|
|
1812
|
+
*
|
|
1813
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1814
|
+
*
|
|
1815
|
+
* Required API Key ACLs:
|
|
1816
|
+
* - editSettings
|
|
1817
|
+
* @param getAppTask - The getAppTask object.
|
|
1818
|
+
* @param getAppTask.taskID - Unique task identifier.
|
|
1819
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1820
|
+
* @see getAppTask for the plain version.
|
|
1821
|
+
*/
|
|
1822
|
+
getAppTaskWithHTTPInfo({ taskID }, requestOptions) {
|
|
1823
|
+
validateRequired("taskID", "getAppTaskWithHTTPInfo", taskID);
|
|
1824
|
+
const requestPath = "/1/task/{taskID}".replace("{taskID}", encodeURIComponent(taskID));
|
|
1825
|
+
const headers = {};
|
|
1826
|
+
const queryParameters = {};
|
|
1827
|
+
const request = {
|
|
1828
|
+
method: "GET",
|
|
1829
|
+
path: requestPath,
|
|
1830
|
+
queryParameters,
|
|
1831
|
+
headers
|
|
1832
|
+
};
|
|
1833
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1834
|
+
},
|
|
1158
1835
|
/**
|
|
1159
1836
|
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
1160
1837
|
*
|
|
@@ -1174,6 +1851,28 @@ function createSearchClient({
|
|
|
1174
1851
|
};
|
|
1175
1852
|
return transporter.request(request, requestOptions);
|
|
1176
1853
|
},
|
|
1854
|
+
/**
|
|
1855
|
+
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
1856
|
+
*
|
|
1857
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1858
|
+
*
|
|
1859
|
+
* Required API Key ACLs:
|
|
1860
|
+
* - settings
|
|
1861
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1862
|
+
* @see getDictionaryLanguages for the plain version.
|
|
1863
|
+
*/
|
|
1864
|
+
getDictionaryLanguagesWithHTTPInfo(requestOptions) {
|
|
1865
|
+
const requestPath = "/1/dictionaries/*/languages";
|
|
1866
|
+
const headers = {};
|
|
1867
|
+
const queryParameters = {};
|
|
1868
|
+
const request = {
|
|
1869
|
+
method: "GET",
|
|
1870
|
+
path: requestPath,
|
|
1871
|
+
queryParameters,
|
|
1872
|
+
headers
|
|
1873
|
+
};
|
|
1874
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1875
|
+
},
|
|
1177
1876
|
/**
|
|
1178
1877
|
* Retrieves the languages for which standard dictionary entries are turned off.
|
|
1179
1878
|
*
|
|
@@ -1193,6 +1892,28 @@ function createSearchClient({
|
|
|
1193
1892
|
};
|
|
1194
1893
|
return transporter.request(request, requestOptions);
|
|
1195
1894
|
},
|
|
1895
|
+
/**
|
|
1896
|
+
* Retrieves the languages for which standard dictionary entries are turned off.
|
|
1897
|
+
*
|
|
1898
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1899
|
+
*
|
|
1900
|
+
* Required API Key ACLs:
|
|
1901
|
+
* - settings
|
|
1902
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1903
|
+
* @see getDictionarySettings for the plain version.
|
|
1904
|
+
*/
|
|
1905
|
+
getDictionarySettingsWithHTTPInfo(requestOptions) {
|
|
1906
|
+
const requestPath = "/1/dictionaries/*/settings";
|
|
1907
|
+
const headers = {};
|
|
1908
|
+
const queryParameters = {};
|
|
1909
|
+
const request = {
|
|
1910
|
+
method: "GET",
|
|
1911
|
+
path: requestPath,
|
|
1912
|
+
queryParameters,
|
|
1913
|
+
headers
|
|
1914
|
+
};
|
|
1915
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1916
|
+
},
|
|
1196
1917
|
/**
|
|
1197
1918
|
* The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last seven days. - Up to 1,000 API requests per server are logged. - This request counts towards your [operations quota](https://support.algolia.com/hc/articles/17245378392977-How-does-Algolia-count-records-and-operations) but doesn\'t appear in the logs itself.
|
|
1198
1919
|
*
|
|
@@ -1229,6 +1950,45 @@ function createSearchClient({
|
|
|
1229
1950
|
};
|
|
1230
1951
|
return transporter.request(request, requestOptions);
|
|
1231
1952
|
},
|
|
1953
|
+
/**
|
|
1954
|
+
* 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.
|
|
1955
|
+
*
|
|
1956
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1957
|
+
*
|
|
1958
|
+
* Required API Key ACLs:
|
|
1959
|
+
* - logs
|
|
1960
|
+
* @param getLogs - The getLogs object.
|
|
1961
|
+
* @param getLogs.offset - First log entry to retrieve. The most recent entries are listed first.
|
|
1962
|
+
* @param getLogs.length - Maximum number of entries to retrieve.
|
|
1963
|
+
* @param getLogs.indexName - Index for which to retrieve log entries. By default, log entries are retrieved for all indices.
|
|
1964
|
+
* @param getLogs.type - Type of log entries to retrieve. By default, all log entries are retrieved.
|
|
1965
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1966
|
+
* @see getLogs for the plain version.
|
|
1967
|
+
*/
|
|
1968
|
+
getLogsWithHTTPInfo({ offset, length, indexName, type } = {}, requestOptions = void 0) {
|
|
1969
|
+
const requestPath = "/1/logs";
|
|
1970
|
+
const headers = {};
|
|
1971
|
+
const queryParameters = {};
|
|
1972
|
+
if (offset !== void 0) {
|
|
1973
|
+
queryParameters["offset"] = offset.toString();
|
|
1974
|
+
}
|
|
1975
|
+
if (length !== void 0) {
|
|
1976
|
+
queryParameters["length"] = length.toString();
|
|
1977
|
+
}
|
|
1978
|
+
if (indexName !== void 0) {
|
|
1979
|
+
queryParameters["indexName"] = indexName.toString();
|
|
1980
|
+
}
|
|
1981
|
+
if (type !== void 0) {
|
|
1982
|
+
queryParameters["type"] = type.toString();
|
|
1983
|
+
}
|
|
1984
|
+
const request = {
|
|
1985
|
+
method: "GET",
|
|
1986
|
+
path: requestPath,
|
|
1987
|
+
queryParameters,
|
|
1988
|
+
headers
|
|
1989
|
+
};
|
|
1990
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1991
|
+
},
|
|
1232
1992
|
/**
|
|
1233
1993
|
* Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](https://www.algolia.com/doc/rest-api/search/get-objects).
|
|
1234
1994
|
*
|
|
@@ -1257,6 +2017,37 @@ function createSearchClient({
|
|
|
1257
2017
|
};
|
|
1258
2018
|
return transporter.request(request, requestOptions);
|
|
1259
2019
|
},
|
|
2020
|
+
/**
|
|
2021
|
+
* 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).
|
|
2022
|
+
*
|
|
2023
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2024
|
+
*
|
|
2025
|
+
* Required API Key ACLs:
|
|
2026
|
+
* - search
|
|
2027
|
+
* @param getObject - The getObject object.
|
|
2028
|
+
* @param getObject.indexName - Name of the index on which to perform the operation.
|
|
2029
|
+
* @param getObject.objectID - Unique record identifier.
|
|
2030
|
+
* @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.
|
|
2031
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2032
|
+
* @see getObject for the plain version.
|
|
2033
|
+
*/
|
|
2034
|
+
getObjectWithHTTPInfo({ indexName, objectID, attributesToRetrieve }, requestOptions) {
|
|
2035
|
+
validateRequired("indexName", "getObjectWithHTTPInfo", indexName);
|
|
2036
|
+
validateRequired("objectID", "getObjectWithHTTPInfo", objectID);
|
|
2037
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2038
|
+
const headers = {};
|
|
2039
|
+
const queryParameters = {};
|
|
2040
|
+
if (attributesToRetrieve !== void 0) {
|
|
2041
|
+
queryParameters["attributesToRetrieve"] = attributesToRetrieve.toString();
|
|
2042
|
+
}
|
|
2043
|
+
const request = {
|
|
2044
|
+
method: "GET",
|
|
2045
|
+
path: requestPath,
|
|
2046
|
+
queryParameters,
|
|
2047
|
+
headers
|
|
2048
|
+
};
|
|
2049
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2050
|
+
},
|
|
1260
2051
|
/**
|
|
1261
2052
|
* Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
|
|
1262
2053
|
*
|
|
@@ -1282,20 +2073,246 @@ function createSearchClient({
|
|
|
1282
2073
|
};
|
|
1283
2074
|
return transporter.request(request, requestOptions);
|
|
1284
2075
|
},
|
|
2076
|
+
/**
|
|
2077
|
+
* Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
|
|
2078
|
+
*
|
|
2079
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2080
|
+
*
|
|
2081
|
+
* Required API Key ACLs:
|
|
2082
|
+
* - search
|
|
2083
|
+
* @param getObjectsParams - Request object.
|
|
2084
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2085
|
+
* @see getObjects for the plain version.
|
|
2086
|
+
*/
|
|
2087
|
+
getObjectsWithHTTPInfo(getObjectsParams, requestOptions) {
|
|
2088
|
+
validateRequired("getObjectsParams", "getObjectsWithHTTPInfo", getObjectsParams);
|
|
2089
|
+
validateRequired("getObjectsParams.requests", "getObjectsWithHTTPInfo", getObjectsParams.requests);
|
|
2090
|
+
const requestPath = "/1/indexes/*/objects";
|
|
2091
|
+
const headers = {};
|
|
2092
|
+
const queryParameters = {};
|
|
2093
|
+
const request = {
|
|
2094
|
+
method: "POST",
|
|
2095
|
+
path: requestPath,
|
|
2096
|
+
queryParameters,
|
|
2097
|
+
headers,
|
|
2098
|
+
data: getObjectsParams,
|
|
2099
|
+
useReadTransporter: true,
|
|
2100
|
+
cacheable: true
|
|
2101
|
+
};
|
|
2102
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2103
|
+
},
|
|
2104
|
+
/**
|
|
2105
|
+
* 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).
|
|
2106
|
+
*
|
|
2107
|
+
* Required API Key ACLs:
|
|
2108
|
+
* - settings
|
|
2109
|
+
* @param getRule - The getRule object.
|
|
2110
|
+
* @param getRule.indexName - Name of the index on which to perform the operation.
|
|
2111
|
+
* @param getRule.objectID - Unique identifier of a rule object.
|
|
2112
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2113
|
+
*/
|
|
2114
|
+
getRule({ indexName, objectID }, requestOptions) {
|
|
2115
|
+
validateRequired("indexName", "getRule", indexName);
|
|
2116
|
+
validateRequired("objectID", "getRule", objectID);
|
|
2117
|
+
const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2118
|
+
const headers = {};
|
|
2119
|
+
const queryParameters = {};
|
|
2120
|
+
const request = {
|
|
2121
|
+
method: "GET",
|
|
2122
|
+
path: requestPath,
|
|
2123
|
+
queryParameters,
|
|
2124
|
+
headers
|
|
2125
|
+
};
|
|
2126
|
+
return transporter.request(request, requestOptions);
|
|
2127
|
+
},
|
|
1285
2128
|
/**
|
|
1286
2129
|
* Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-rules).
|
|
1287
2130
|
*
|
|
2131
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2132
|
+
*
|
|
1288
2133
|
* Required API Key ACLs:
|
|
1289
2134
|
* - settings
|
|
1290
2135
|
* @param getRule - The getRule object.
|
|
1291
2136
|
* @param getRule.indexName - Name of the index on which to perform the operation.
|
|
1292
2137
|
* @param getRule.objectID - Unique identifier of a rule object.
|
|
1293
2138
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2139
|
+
* @see getRule for the plain version.
|
|
2140
|
+
*/
|
|
2141
|
+
getRuleWithHTTPInfo({ indexName, objectID }, requestOptions) {
|
|
2142
|
+
validateRequired("indexName", "getRuleWithHTTPInfo", indexName);
|
|
2143
|
+
validateRequired("objectID", "getRuleWithHTTPInfo", objectID);
|
|
2144
|
+
const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2145
|
+
const headers = {};
|
|
2146
|
+
const queryParameters = {};
|
|
2147
|
+
const request = {
|
|
2148
|
+
method: "GET",
|
|
2149
|
+
path: requestPath,
|
|
2150
|
+
queryParameters,
|
|
2151
|
+
headers
|
|
2152
|
+
};
|
|
2153
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2154
|
+
},
|
|
2155
|
+
/**
|
|
2156
|
+
* Retrieves an object with non-null index settings.
|
|
2157
|
+
*
|
|
2158
|
+
* Required API Key ACLs:
|
|
2159
|
+
* - settings
|
|
2160
|
+
* @param getSettings - The getSettings object.
|
|
2161
|
+
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
2162
|
+
* @param getSettings.getVersion - When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.
|
|
2163
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2164
|
+
*/
|
|
2165
|
+
getSettings({ indexName, getVersion }, requestOptions) {
|
|
2166
|
+
validateRequired("indexName", "getSettings", indexName);
|
|
2167
|
+
const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
|
|
2168
|
+
const headers = {};
|
|
2169
|
+
const queryParameters = {};
|
|
2170
|
+
if (getVersion !== void 0) {
|
|
2171
|
+
queryParameters["getVersion"] = getVersion.toString();
|
|
2172
|
+
}
|
|
2173
|
+
const request = {
|
|
2174
|
+
method: "GET",
|
|
2175
|
+
path: requestPath,
|
|
2176
|
+
queryParameters,
|
|
2177
|
+
headers
|
|
2178
|
+
};
|
|
2179
|
+
return transporter.request(request, requestOptions);
|
|
2180
|
+
},
|
|
2181
|
+
/**
|
|
2182
|
+
* Retrieves an object with non-null index settings.
|
|
2183
|
+
*
|
|
2184
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2185
|
+
*
|
|
2186
|
+
* Required API Key ACLs:
|
|
2187
|
+
* - settings
|
|
2188
|
+
* @param getSettings - The getSettings object.
|
|
2189
|
+
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
2190
|
+
* @param getSettings.getVersion - When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.
|
|
2191
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2192
|
+
* @see getSettings for the plain version.
|
|
2193
|
+
*/
|
|
2194
|
+
getSettingsWithHTTPInfo({ indexName, getVersion }, requestOptions) {
|
|
2195
|
+
validateRequired("indexName", "getSettingsWithHTTPInfo", indexName);
|
|
2196
|
+
const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
|
|
2197
|
+
const headers = {};
|
|
2198
|
+
const queryParameters = {};
|
|
2199
|
+
if (getVersion !== void 0) {
|
|
2200
|
+
queryParameters["getVersion"] = getVersion.toString();
|
|
2201
|
+
}
|
|
2202
|
+
const request = {
|
|
2203
|
+
method: "GET",
|
|
2204
|
+
path: requestPath,
|
|
2205
|
+
queryParameters,
|
|
2206
|
+
headers
|
|
2207
|
+
};
|
|
2208
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2209
|
+
},
|
|
2210
|
+
/**
|
|
2211
|
+
* Retrieves all allowed IP addresses with access to your application.
|
|
2212
|
+
*
|
|
2213
|
+
* Required API Key ACLs:
|
|
2214
|
+
* - admin
|
|
2215
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2216
|
+
*/
|
|
2217
|
+
getSources(requestOptions) {
|
|
2218
|
+
const requestPath = "/1/security/sources";
|
|
2219
|
+
const headers = {};
|
|
2220
|
+
const queryParameters = {};
|
|
2221
|
+
const request = {
|
|
2222
|
+
method: "GET",
|
|
2223
|
+
path: requestPath,
|
|
2224
|
+
queryParameters,
|
|
2225
|
+
headers
|
|
2226
|
+
};
|
|
2227
|
+
return transporter.request(request, requestOptions);
|
|
2228
|
+
},
|
|
2229
|
+
/**
|
|
2230
|
+
* Retrieves all allowed IP addresses with access to your application.
|
|
2231
|
+
*
|
|
2232
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2233
|
+
*
|
|
2234
|
+
* Required API Key ACLs:
|
|
2235
|
+
* - admin
|
|
2236
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2237
|
+
* @see getSources for the plain version.
|
|
2238
|
+
*/
|
|
2239
|
+
getSourcesWithHTTPInfo(requestOptions) {
|
|
2240
|
+
const requestPath = "/1/security/sources";
|
|
2241
|
+
const headers = {};
|
|
2242
|
+
const queryParameters = {};
|
|
2243
|
+
const request = {
|
|
2244
|
+
method: "GET",
|
|
2245
|
+
path: requestPath,
|
|
2246
|
+
queryParameters,
|
|
2247
|
+
headers
|
|
2248
|
+
};
|
|
2249
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2250
|
+
},
|
|
2251
|
+
/**
|
|
2252
|
+
* 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).
|
|
2253
|
+
*
|
|
2254
|
+
* Required API Key ACLs:
|
|
2255
|
+
* - settings
|
|
2256
|
+
* @param getSynonym - The getSynonym object.
|
|
2257
|
+
* @param getSynonym.indexName - Name of the index on which to perform the operation.
|
|
2258
|
+
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
2259
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2260
|
+
*/
|
|
2261
|
+
getSynonym({ indexName, objectID }, requestOptions) {
|
|
2262
|
+
validateRequired("indexName", "getSynonym", indexName);
|
|
2263
|
+
validateRequired("objectID", "getSynonym", objectID);
|
|
2264
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2265
|
+
const headers = {};
|
|
2266
|
+
const queryParameters = {};
|
|
2267
|
+
const request = {
|
|
2268
|
+
method: "GET",
|
|
2269
|
+
path: requestPath,
|
|
2270
|
+
queryParameters,
|
|
2271
|
+
headers
|
|
2272
|
+
};
|
|
2273
|
+
return transporter.request(request, requestOptions);
|
|
2274
|
+
},
|
|
2275
|
+
/**
|
|
2276
|
+
* 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).
|
|
2277
|
+
*
|
|
2278
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2279
|
+
*
|
|
2280
|
+
* Required API Key ACLs:
|
|
2281
|
+
* - settings
|
|
2282
|
+
* @param getSynonym - The getSynonym object.
|
|
2283
|
+
* @param getSynonym.indexName - Name of the index on which to perform the operation.
|
|
2284
|
+
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
2285
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2286
|
+
* @see getSynonym for the plain version.
|
|
2287
|
+
*/
|
|
2288
|
+
getSynonymWithHTTPInfo({ indexName, objectID }, requestOptions) {
|
|
2289
|
+
validateRequired("indexName", "getSynonymWithHTTPInfo", indexName);
|
|
2290
|
+
validateRequired("objectID", "getSynonymWithHTTPInfo", objectID);
|
|
2291
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2292
|
+
const headers = {};
|
|
2293
|
+
const queryParameters = {};
|
|
2294
|
+
const request = {
|
|
2295
|
+
method: "GET",
|
|
2296
|
+
path: requestPath,
|
|
2297
|
+
queryParameters,
|
|
2298
|
+
headers
|
|
2299
|
+
};
|
|
2300
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2301
|
+
},
|
|
2302
|
+
/**
|
|
2303
|
+
* 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.
|
|
2304
|
+
*
|
|
2305
|
+
* Required API Key ACLs:
|
|
2306
|
+
* - addObject
|
|
2307
|
+
* @param getTask - The getTask object.
|
|
2308
|
+
* @param getTask.indexName - Name of the index on which to perform the operation.
|
|
2309
|
+
* @param getTask.taskID - Unique task identifier.
|
|
2310
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1294
2311
|
*/
|
|
1295
|
-
|
|
1296
|
-
validateRequired("indexName", "
|
|
1297
|
-
validateRequired("
|
|
1298
|
-
const requestPath = "/1/indexes/{indexName}/
|
|
2312
|
+
getTask({ indexName, taskID }, requestOptions) {
|
|
2313
|
+
validateRequired("indexName", "getTask", indexName);
|
|
2314
|
+
validateRequired("taskID", "getTask", taskID);
|
|
2315
|
+
const requestPath = "/1/indexes/{indexName}/task/{taskID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{taskID}", encodeURIComponent(taskID));
|
|
1299
2316
|
const headers = {};
|
|
1300
2317
|
const queryParameters = {};
|
|
1301
2318
|
const request = {
|
|
@@ -1307,40 +2324,43 @@ function createSearchClient({
|
|
|
1307
2324
|
return transporter.request(request, requestOptions);
|
|
1308
2325
|
},
|
|
1309
2326
|
/**
|
|
1310
|
-
*
|
|
2327
|
+
* 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.
|
|
2328
|
+
*
|
|
2329
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1311
2330
|
*
|
|
1312
2331
|
* Required API Key ACLs:
|
|
1313
|
-
* -
|
|
1314
|
-
* @param
|
|
1315
|
-
* @param
|
|
1316
|
-
* @param
|
|
2332
|
+
* - addObject
|
|
2333
|
+
* @param getTask - The getTask object.
|
|
2334
|
+
* @param getTask.indexName - Name of the index on which to perform the operation.
|
|
2335
|
+
* @param getTask.taskID - Unique task identifier.
|
|
1317
2336
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2337
|
+
* @see getTask for the plain version.
|
|
1318
2338
|
*/
|
|
1319
|
-
|
|
1320
|
-
validateRequired("indexName", "
|
|
1321
|
-
|
|
2339
|
+
getTaskWithHTTPInfo({ indexName, taskID }, requestOptions) {
|
|
2340
|
+
validateRequired("indexName", "getTaskWithHTTPInfo", indexName);
|
|
2341
|
+
validateRequired("taskID", "getTaskWithHTTPInfo", taskID);
|
|
2342
|
+
const requestPath = "/1/indexes/{indexName}/task/{taskID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{taskID}", encodeURIComponent(taskID));
|
|
1322
2343
|
const headers = {};
|
|
1323
2344
|
const queryParameters = {};
|
|
1324
|
-
if (getVersion !== void 0) {
|
|
1325
|
-
queryParameters["getVersion"] = getVersion.toString();
|
|
1326
|
-
}
|
|
1327
2345
|
const request = {
|
|
1328
2346
|
method: "GET",
|
|
1329
2347
|
path: requestPath,
|
|
1330
2348
|
queryParameters,
|
|
1331
2349
|
headers
|
|
1332
2350
|
};
|
|
1333
|
-
return transporter.
|
|
2351
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1334
2352
|
},
|
|
1335
2353
|
/**
|
|
1336
|
-
*
|
|
2354
|
+
* 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.
|
|
1337
2355
|
*
|
|
1338
2356
|
* Required API Key ACLs:
|
|
1339
2357
|
* - admin
|
|
2358
|
+
*
|
|
2359
|
+
* @deprecated
|
|
1340
2360
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1341
2361
|
*/
|
|
1342
|
-
|
|
1343
|
-
const requestPath = "/1/
|
|
2362
|
+
getTopUserIds(requestOptions) {
|
|
2363
|
+
const requestPath = "/1/clusters/mapping/top";
|
|
1344
2364
|
const headers = {};
|
|
1345
2365
|
const queryParameters = {};
|
|
1346
2366
|
const request = {
|
|
@@ -1352,19 +2372,19 @@ function createSearchClient({
|
|
|
1352
2372
|
return transporter.request(request, requestOptions);
|
|
1353
2373
|
},
|
|
1354
2374
|
/**
|
|
1355
|
-
*
|
|
2375
|
+
* 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.
|
|
2376
|
+
*
|
|
2377
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1356
2378
|
*
|
|
1357
2379
|
* Required API Key ACLs:
|
|
1358
|
-
* -
|
|
1359
|
-
*
|
|
1360
|
-
* @
|
|
1361
|
-
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
2380
|
+
* - admin
|
|
2381
|
+
*
|
|
2382
|
+
* @deprecated
|
|
1362
2383
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2384
|
+
* @see getTopUserIds for the plain version.
|
|
1363
2385
|
*/
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
validateRequired("objectID", "getSynonym", objectID);
|
|
1367
|
-
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2386
|
+
getTopUserIdsWithHTTPInfo(requestOptions) {
|
|
2387
|
+
const requestPath = "/1/clusters/mapping/top";
|
|
1368
2388
|
const headers = {};
|
|
1369
2389
|
const queryParameters = {};
|
|
1370
2390
|
const request = {
|
|
@@ -1373,22 +2393,22 @@ function createSearchClient({
|
|
|
1373
2393
|
queryParameters,
|
|
1374
2394
|
headers
|
|
1375
2395
|
};
|
|
1376
|
-
return transporter.
|
|
2396
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1377
2397
|
},
|
|
1378
2398
|
/**
|
|
1379
|
-
*
|
|
2399
|
+
* 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.
|
|
1380
2400
|
*
|
|
1381
2401
|
* Required API Key ACLs:
|
|
1382
|
-
* -
|
|
1383
|
-
*
|
|
1384
|
-
* @
|
|
1385
|
-
* @param
|
|
2402
|
+
* - admin
|
|
2403
|
+
*
|
|
2404
|
+
* @deprecated
|
|
2405
|
+
* @param getUserId - The getUserId object.
|
|
2406
|
+
* @param getUserId.userID - Unique identifier of the user who makes the search request.
|
|
1386
2407
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1387
2408
|
*/
|
|
1388
|
-
|
|
1389
|
-
validateRequired("
|
|
1390
|
-
|
|
1391
|
-
const requestPath = "/1/indexes/{indexName}/task/{taskID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{taskID}", encodeURIComponent(taskID));
|
|
2409
|
+
getUserId({ userID }, requestOptions) {
|
|
2410
|
+
validateRequired("userID", "getUserId", userID);
|
|
2411
|
+
const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
|
|
1392
2412
|
const headers = {};
|
|
1393
2413
|
const queryParameters = {};
|
|
1394
2414
|
const request = {
|
|
@@ -1400,16 +2420,22 @@ function createSearchClient({
|
|
|
1400
2420
|
return transporter.request(request, requestOptions);
|
|
1401
2421
|
},
|
|
1402
2422
|
/**
|
|
1403
|
-
*
|
|
2423
|
+
* 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.
|
|
2424
|
+
*
|
|
2425
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1404
2426
|
*
|
|
1405
2427
|
* Required API Key ACLs:
|
|
1406
2428
|
* - admin
|
|
1407
2429
|
*
|
|
1408
2430
|
* @deprecated
|
|
2431
|
+
* @param getUserId - The getUserId object.
|
|
2432
|
+
* @param getUserId.userID - Unique identifier of the user who makes the search request.
|
|
1409
2433
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2434
|
+
* @see getUserId for the plain version.
|
|
1410
2435
|
*/
|
|
1411
|
-
|
|
1412
|
-
|
|
2436
|
+
getUserIdWithHTTPInfo({ userID }, requestOptions) {
|
|
2437
|
+
validateRequired("userID", "getUserIdWithHTTPInfo", userID);
|
|
2438
|
+
const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
|
|
1413
2439
|
const headers = {};
|
|
1414
2440
|
const queryParameters = {};
|
|
1415
2441
|
const request = {
|
|
@@ -1418,24 +2444,26 @@ function createSearchClient({
|
|
|
1418
2444
|
queryParameters,
|
|
1419
2445
|
headers
|
|
1420
2446
|
};
|
|
1421
|
-
return transporter.
|
|
2447
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1422
2448
|
},
|
|
1423
2449
|
/**
|
|
1424
|
-
*
|
|
2450
|
+
* 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.
|
|
1425
2451
|
*
|
|
1426
2452
|
* Required API Key ACLs:
|
|
1427
2453
|
* - admin
|
|
1428
2454
|
*
|
|
1429
2455
|
* @deprecated
|
|
1430
|
-
* @param
|
|
1431
|
-
* @param
|
|
2456
|
+
* @param hasPendingMappings - The hasPendingMappings object.
|
|
2457
|
+
* @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
|
|
1432
2458
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1433
2459
|
*/
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
|
|
2460
|
+
hasPendingMappings({ getClusters } = {}, requestOptions = void 0) {
|
|
2461
|
+
const requestPath = "/1/clusters/mapping/pending";
|
|
1437
2462
|
const headers = {};
|
|
1438
2463
|
const queryParameters = {};
|
|
2464
|
+
if (getClusters !== void 0) {
|
|
2465
|
+
queryParameters["getClusters"] = getClusters.toString();
|
|
2466
|
+
}
|
|
1439
2467
|
const request = {
|
|
1440
2468
|
method: "GET",
|
|
1441
2469
|
path: requestPath,
|
|
@@ -1447,6 +2475,8 @@ function createSearchClient({
|
|
|
1447
2475
|
/**
|
|
1448
2476
|
* To determine when the time-consuming process of creating a large batch of users or migrating users from one cluster to another is complete, this operation retrieves the status of the process.
|
|
1449
2477
|
*
|
|
2478
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2479
|
+
*
|
|
1450
2480
|
* Required API Key ACLs:
|
|
1451
2481
|
* - admin
|
|
1452
2482
|
*
|
|
@@ -1454,8 +2484,9 @@ function createSearchClient({
|
|
|
1454
2484
|
* @param hasPendingMappings - The hasPendingMappings object.
|
|
1455
2485
|
* @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
|
|
1456
2486
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2487
|
+
* @see hasPendingMappings for the plain version.
|
|
1457
2488
|
*/
|
|
1458
|
-
|
|
2489
|
+
hasPendingMappingsWithHTTPInfo({ getClusters } = {}, requestOptions = void 0) {
|
|
1459
2490
|
const requestPath = "/1/clusters/mapping/pending";
|
|
1460
2491
|
const headers = {};
|
|
1461
2492
|
const queryParameters = {};
|
|
@@ -1468,7 +2499,7 @@ function createSearchClient({
|
|
|
1468
2499
|
queryParameters,
|
|
1469
2500
|
headers
|
|
1470
2501
|
};
|
|
1471
|
-
return transporter.
|
|
2502
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1472
2503
|
},
|
|
1473
2504
|
/**
|
|
1474
2505
|
* Lists all API keys associated with your Algolia application, including their permissions and restrictions.
|
|
@@ -1489,6 +2520,28 @@ function createSearchClient({
|
|
|
1489
2520
|
};
|
|
1490
2521
|
return transporter.request(request, requestOptions);
|
|
1491
2522
|
},
|
|
2523
|
+
/**
|
|
2524
|
+
* Lists all API keys associated with your Algolia application, including their permissions and restrictions.
|
|
2525
|
+
*
|
|
2526
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2527
|
+
*
|
|
2528
|
+
* Required API Key ACLs:
|
|
2529
|
+
* - admin
|
|
2530
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2531
|
+
* @see listApiKeys for the plain version.
|
|
2532
|
+
*/
|
|
2533
|
+
listApiKeysWithHTTPInfo(requestOptions) {
|
|
2534
|
+
const requestPath = "/1/keys";
|
|
2535
|
+
const headers = {};
|
|
2536
|
+
const queryParameters = {};
|
|
2537
|
+
const request = {
|
|
2538
|
+
method: "GET",
|
|
2539
|
+
path: requestPath,
|
|
2540
|
+
queryParameters,
|
|
2541
|
+
headers
|
|
2542
|
+
};
|
|
2543
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2544
|
+
},
|
|
1492
2545
|
/**
|
|
1493
2546
|
* Lists the available clusters in a multi-cluster setup.
|
|
1494
2547
|
*
|
|
@@ -1510,6 +2563,30 @@ function createSearchClient({
|
|
|
1510
2563
|
};
|
|
1511
2564
|
return transporter.request(request, requestOptions);
|
|
1512
2565
|
},
|
|
2566
|
+
/**
|
|
2567
|
+
* Lists the available clusters in a multi-cluster setup.
|
|
2568
|
+
*
|
|
2569
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2570
|
+
*
|
|
2571
|
+
* Required API Key ACLs:
|
|
2572
|
+
* - admin
|
|
2573
|
+
*
|
|
2574
|
+
* @deprecated
|
|
2575
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2576
|
+
* @see listClusters for the plain version.
|
|
2577
|
+
*/
|
|
2578
|
+
listClustersWithHTTPInfo(requestOptions) {
|
|
2579
|
+
const requestPath = "/1/clusters";
|
|
2580
|
+
const headers = {};
|
|
2581
|
+
const queryParameters = {};
|
|
2582
|
+
const request = {
|
|
2583
|
+
method: "GET",
|
|
2584
|
+
path: requestPath,
|
|
2585
|
+
queryParameters,
|
|
2586
|
+
headers
|
|
2587
|
+
};
|
|
2588
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2589
|
+
},
|
|
1513
2590
|
/**
|
|
1514
2591
|
* Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
|
|
1515
2592
|
*
|
|
@@ -1538,6 +2615,37 @@ function createSearchClient({
|
|
|
1538
2615
|
};
|
|
1539
2616
|
return transporter.request(request, requestOptions);
|
|
1540
2617
|
},
|
|
2618
|
+
/**
|
|
2619
|
+
* Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
|
|
2620
|
+
*
|
|
2621
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2622
|
+
*
|
|
2623
|
+
* Required API Key ACLs:
|
|
2624
|
+
* - listIndexes
|
|
2625
|
+
* @param listIndices - The listIndices object.
|
|
2626
|
+
* @param listIndices.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
2627
|
+
* @param listIndices.hitsPerPage - Number of hits per page.
|
|
2628
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2629
|
+
* @see listIndices for the plain version.
|
|
2630
|
+
*/
|
|
2631
|
+
listIndicesWithHTTPInfo({ page, hitsPerPage } = {}, requestOptions = void 0) {
|
|
2632
|
+
const requestPath = "/1/indexes";
|
|
2633
|
+
const headers = {};
|
|
2634
|
+
const queryParameters = {};
|
|
2635
|
+
if (page !== void 0) {
|
|
2636
|
+
queryParameters["page"] = page.toString();
|
|
2637
|
+
}
|
|
2638
|
+
if (hitsPerPage !== void 0) {
|
|
2639
|
+
queryParameters["hitsPerPage"] = hitsPerPage.toString();
|
|
2640
|
+
}
|
|
2641
|
+
const request = {
|
|
2642
|
+
method: "GET",
|
|
2643
|
+
path: requestPath,
|
|
2644
|
+
queryParameters,
|
|
2645
|
+
headers
|
|
2646
|
+
};
|
|
2647
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2648
|
+
},
|
|
1541
2649
|
/**
|
|
1542
2650
|
* Lists the userIDs assigned to a multi-cluster application. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time.
|
|
1543
2651
|
*
|
|
@@ -1568,6 +2676,39 @@ function createSearchClient({
|
|
|
1568
2676
|
};
|
|
1569
2677
|
return transporter.request(request, requestOptions);
|
|
1570
2678
|
},
|
|
2679
|
+
/**
|
|
2680
|
+
* 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.
|
|
2681
|
+
*
|
|
2682
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2683
|
+
*
|
|
2684
|
+
* Required API Key ACLs:
|
|
2685
|
+
* - admin
|
|
2686
|
+
*
|
|
2687
|
+
* @deprecated
|
|
2688
|
+
* @param listUserIds - The listUserIds object.
|
|
2689
|
+
* @param listUserIds.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
2690
|
+
* @param listUserIds.hitsPerPage - Number of hits per page.
|
|
2691
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2692
|
+
* @see listUserIds for the plain version.
|
|
2693
|
+
*/
|
|
2694
|
+
listUserIdsWithHTTPInfo({ page, hitsPerPage } = {}, requestOptions = void 0) {
|
|
2695
|
+
const requestPath = "/1/clusters/mapping";
|
|
2696
|
+
const headers = {};
|
|
2697
|
+
const queryParameters = {};
|
|
2698
|
+
if (page !== void 0) {
|
|
2699
|
+
queryParameters["page"] = page.toString();
|
|
2700
|
+
}
|
|
2701
|
+
if (hitsPerPage !== void 0) {
|
|
2702
|
+
queryParameters["hitsPerPage"] = hitsPerPage.toString();
|
|
2703
|
+
}
|
|
2704
|
+
const request = {
|
|
2705
|
+
method: "GET",
|
|
2706
|
+
path: requestPath,
|
|
2707
|
+
queryParameters,
|
|
2708
|
+
headers
|
|
2709
|
+
};
|
|
2710
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2711
|
+
},
|
|
1571
2712
|
/**
|
|
1572
2713
|
* Adds, updates, or deletes records in multiple indices with a single API request. - Actions are applied in the order they are specified. - Actions are equivalent to the individual API requests of the same name. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
1573
2714
|
*
|
|
@@ -1591,6 +2732,32 @@ function createSearchClient({
|
|
|
1591
2732
|
};
|
|
1592
2733
|
return transporter.request(request, requestOptions);
|
|
1593
2734
|
},
|
|
2735
|
+
/**
|
|
2736
|
+
* 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).
|
|
2737
|
+
*
|
|
2738
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2739
|
+
*
|
|
2740
|
+
* Required API Key ACLs:
|
|
2741
|
+
* - addObject
|
|
2742
|
+
* @param batchParams - The batchParams object.
|
|
2743
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2744
|
+
* @see multipleBatch for the plain version.
|
|
2745
|
+
*/
|
|
2746
|
+
multipleBatchWithHTTPInfo(batchParams, requestOptions) {
|
|
2747
|
+
validateRequired("batchParams", "multipleBatchWithHTTPInfo", batchParams);
|
|
2748
|
+
validateRequired("batchParams.requests", "multipleBatchWithHTTPInfo", batchParams.requests);
|
|
2749
|
+
const requestPath = "/1/indexes/*/batch";
|
|
2750
|
+
const headers = {};
|
|
2751
|
+
const queryParameters = {};
|
|
2752
|
+
const request = {
|
|
2753
|
+
method: "POST",
|
|
2754
|
+
path: requestPath,
|
|
2755
|
+
queryParameters,
|
|
2756
|
+
headers,
|
|
2757
|
+
data: batchParams
|
|
2758
|
+
};
|
|
2759
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2760
|
+
},
|
|
1594
2761
|
/**
|
|
1595
2762
|
* Copies or moves (renames) an index within the same Algolia application. Notes: - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn\'t exist yet, it\'s created. - This operation is resource-intensive. **Copy** - If the source index doesn\'t exist, copying creates a new index with 0 records and default settings. - API keys from the source index are merged with the existing keys in the destination index. - You can\'t copy the `enableReRanking`, `mode`, and `replicas` settings. - You can\'t copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - For more information, see [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices). **Move** - If the source index doesn\'t exist, moving is ignored without returning an error. - When moving an index, the analytics data keeps its original name, and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - For more information, see [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices). This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
1596
2763
|
*
|
|
@@ -1614,13 +2781,80 @@ function createSearchClient({
|
|
|
1614
2781
|
path: requestPath,
|
|
1615
2782
|
queryParameters,
|
|
1616
2783
|
headers,
|
|
1617
|
-
data: operationIndexParams
|
|
2784
|
+
data: operationIndexParams
|
|
2785
|
+
};
|
|
2786
|
+
return transporter.request(request, requestOptions);
|
|
2787
|
+
},
|
|
2788
|
+
/**
|
|
2789
|
+
* Copies or moves (renames) an index within the same Algolia application. Notes: - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn\'t exist yet, it\'s created. - This operation is resource-intensive. **Copy** - If the source index doesn\'t exist, copying creates a new index with 0 records and default settings. - API keys from the source index are merged with the existing keys in the destination index. - You can\'t copy the `enableReRanking`, `mode`, and `replicas` settings. - You can\'t copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - For more information, see [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices). **Move** - If the source index doesn\'t exist, moving is ignored without returning an error. - When moving an index, the analytics data keeps its original name, and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - For more information, see [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices). This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
2790
|
+
*
|
|
2791
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2792
|
+
*
|
|
2793
|
+
* Required API Key ACLs:
|
|
2794
|
+
* - addObject
|
|
2795
|
+
* @param operationIndex - The operationIndex object.
|
|
2796
|
+
* @param operationIndex.indexName - Name of the index on which to perform the operation.
|
|
2797
|
+
* @param operationIndex.operationIndexParams - The operationIndexParams object.
|
|
2798
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2799
|
+
* @see operationIndex for the plain version.
|
|
2800
|
+
*/
|
|
2801
|
+
operationIndexWithHTTPInfo({ indexName, operationIndexParams }, requestOptions) {
|
|
2802
|
+
validateRequired("indexName", "operationIndexWithHTTPInfo", indexName);
|
|
2803
|
+
validateRequired("operationIndexParams", "operationIndexWithHTTPInfo", operationIndexParams);
|
|
2804
|
+
validateRequired("operationIndexParams.operation", "operationIndexWithHTTPInfo", operationIndexParams.operation);
|
|
2805
|
+
validateRequired(
|
|
2806
|
+
"operationIndexParams.destination",
|
|
2807
|
+
"operationIndexWithHTTPInfo",
|
|
2808
|
+
operationIndexParams.destination
|
|
2809
|
+
);
|
|
2810
|
+
const requestPath = "/1/indexes/{indexName}/operation".replace("{indexName}", encodeURIComponent(indexName));
|
|
2811
|
+
const headers = {};
|
|
2812
|
+
const queryParameters = {};
|
|
2813
|
+
const request = {
|
|
2814
|
+
method: "POST",
|
|
2815
|
+
path: requestPath,
|
|
2816
|
+
queryParameters,
|
|
2817
|
+
headers,
|
|
2818
|
+
data: operationIndexParams
|
|
2819
|
+
};
|
|
2820
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2821
|
+
},
|
|
2822
|
+
/**
|
|
2823
|
+
* 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).
|
|
2824
|
+
*
|
|
2825
|
+
* Required API Key ACLs:
|
|
2826
|
+
* - addObject
|
|
2827
|
+
* @param partialUpdateObject - The partialUpdateObject object.
|
|
2828
|
+
* @param partialUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
2829
|
+
* @param partialUpdateObject.objectID - Unique record identifier.
|
|
2830
|
+
* @param partialUpdateObject.attributesToUpdate - Attributes with their values.
|
|
2831
|
+
* @param partialUpdateObject.createIfNotExists - Whether to create a new record if it doesn\'t exist.
|
|
2832
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2833
|
+
*/
|
|
2834
|
+
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists }, requestOptions) {
|
|
2835
|
+
validateRequired("indexName", "partialUpdateObject", indexName);
|
|
2836
|
+
validateRequired("objectID", "partialUpdateObject", objectID);
|
|
2837
|
+
validateRequired("attributesToUpdate", "partialUpdateObject", attributesToUpdate);
|
|
2838
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2839
|
+
const headers = {};
|
|
2840
|
+
const queryParameters = {};
|
|
2841
|
+
if (createIfNotExists !== void 0) {
|
|
2842
|
+
queryParameters["createIfNotExists"] = createIfNotExists.toString();
|
|
2843
|
+
}
|
|
2844
|
+
const request = {
|
|
2845
|
+
method: "POST",
|
|
2846
|
+
path: requestPath,
|
|
2847
|
+
queryParameters,
|
|
2848
|
+
headers,
|
|
2849
|
+
data: attributesToUpdate
|
|
1618
2850
|
};
|
|
1619
2851
|
return transporter.request(request, requestOptions);
|
|
1620
2852
|
},
|
|
1621
2853
|
/**
|
|
1622
2854
|
* Adds new attributes to a record, or updates existing ones. - If a record with the specified object ID doesn\'t exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn\'t exist yet, this method creates a new index. - Use first-level attributes only. Nested attributes aren\'t supported. If you specify a nested attribute, this operation replaces its first-level ancestor. To update attributes without replacing the full record, use these built-in operations. These operations are useful when the initial data isn\'t available. - `Increment`: increment a numeric attribute. - `Decrement`: decrement a numeric attribute. - `Add`: append a number or string element to an array attribute. - `Remove`: remove all matching number or string elements from an array attribute made of numbers or strings. - `AddUnique`: add a number or string element to an array attribute made of numbers or strings only if it\'s not already present. - `IncrementFrom`: increment a numeric integer attribute only if the provided value matches the current value. Otherwise, the update is ignored. Example: If you pass an `IncrementFrom` value of 2 for the `version` attribute but the current value is 1, the API ignores the update. If the object doesn\'t exist, the API only creates it if you pass an `IncrementFrom` value of 0. - `IncrementSet`: increment a numeric integer attribute only if the provided value is greater than the current value. Otherwise, the update is ignored. Example: If you pass an `IncrementSet` value of 2 for the `version` attribute and the current value is 1, the API updates the object. If the object doesn\'t exist yet, the API only creates it if you pass an `IncrementSet` value greater than 0. Specify an operation by providing an object with the attribute to update as the key and its value as an object with these properties: - `_operation`: the operation to apply on the attribute. - `value`: the right-hand side argument to the operation, for example, increment or decrement step, or a value to add or remove. When updating multiple attributes or using multiple operations targeting the same record, use a single partial update for faster processing. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
1623
2855
|
*
|
|
2856
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2857
|
+
*
|
|
1624
2858
|
* Required API Key ACLs:
|
|
1625
2859
|
* - addObject
|
|
1626
2860
|
* @param partialUpdateObject - The partialUpdateObject object.
|
|
@@ -1629,11 +2863,12 @@ function createSearchClient({
|
|
|
1629
2863
|
* @param partialUpdateObject.attributesToUpdate - Attributes with their values.
|
|
1630
2864
|
* @param partialUpdateObject.createIfNotExists - Whether to create a new record if it doesn\'t exist.
|
|
1631
2865
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2866
|
+
* @see partialUpdateObject for the plain version.
|
|
1632
2867
|
*/
|
|
1633
|
-
|
|
1634
|
-
validateRequired("indexName", "
|
|
1635
|
-
validateRequired("objectID", "
|
|
1636
|
-
validateRequired("attributesToUpdate", "
|
|
2868
|
+
partialUpdateObjectWithHTTPInfo({ indexName, objectID, attributesToUpdate, createIfNotExists }, requestOptions) {
|
|
2869
|
+
validateRequired("indexName", "partialUpdateObjectWithHTTPInfo", indexName);
|
|
2870
|
+
validateRequired("objectID", "partialUpdateObjectWithHTTPInfo", objectID);
|
|
2871
|
+
validateRequired("attributesToUpdate", "partialUpdateObjectWithHTTPInfo", attributesToUpdate);
|
|
1637
2872
|
const requestPath = "/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1638
2873
|
const headers = {};
|
|
1639
2874
|
const queryParameters = {};
|
|
@@ -1647,7 +2882,7 @@ function createSearchClient({
|
|
|
1647
2882
|
headers,
|
|
1648
2883
|
data: attributesToUpdate
|
|
1649
2884
|
};
|
|
1650
|
-
return transporter.
|
|
2885
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1651
2886
|
},
|
|
1652
2887
|
/**
|
|
1653
2888
|
* Deletes a user ID and its associated data from the clusters.
|
|
@@ -1673,6 +2908,33 @@ function createSearchClient({
|
|
|
1673
2908
|
};
|
|
1674
2909
|
return transporter.request(request, requestOptions);
|
|
1675
2910
|
},
|
|
2911
|
+
/**
|
|
2912
|
+
* Deletes a user ID and its associated data from the clusters.
|
|
2913
|
+
*
|
|
2914
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2915
|
+
*
|
|
2916
|
+
* Required API Key ACLs:
|
|
2917
|
+
* - admin
|
|
2918
|
+
*
|
|
2919
|
+
* @deprecated
|
|
2920
|
+
* @param removeUserId - The removeUserId object.
|
|
2921
|
+
* @param removeUserId.userID - Unique identifier of the user who makes the search request.
|
|
2922
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2923
|
+
* @see removeUserId for the plain version.
|
|
2924
|
+
*/
|
|
2925
|
+
removeUserIdWithHTTPInfo({ userID }, requestOptions) {
|
|
2926
|
+
validateRequired("userID", "removeUserIdWithHTTPInfo", userID);
|
|
2927
|
+
const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
|
|
2928
|
+
const headers = {};
|
|
2929
|
+
const queryParameters = {};
|
|
2930
|
+
const request = {
|
|
2931
|
+
method: "DELETE",
|
|
2932
|
+
path: requestPath,
|
|
2933
|
+
queryParameters,
|
|
2934
|
+
headers
|
|
2935
|
+
};
|
|
2936
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2937
|
+
},
|
|
1676
2938
|
/**
|
|
1677
2939
|
* Replaces the list of allowed sources.
|
|
1678
2940
|
*
|
|
@@ -1696,6 +2958,32 @@ function createSearchClient({
|
|
|
1696
2958
|
};
|
|
1697
2959
|
return transporter.request(request, requestOptions);
|
|
1698
2960
|
},
|
|
2961
|
+
/**
|
|
2962
|
+
* Replaces the list of allowed sources.
|
|
2963
|
+
*
|
|
2964
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2965
|
+
*
|
|
2966
|
+
* Required API Key ACLs:
|
|
2967
|
+
* - admin
|
|
2968
|
+
* @param replaceSources - The replaceSources object.
|
|
2969
|
+
* @param replaceSources.source - Allowed sources.
|
|
2970
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2971
|
+
* @see replaceSources for the plain version.
|
|
2972
|
+
*/
|
|
2973
|
+
replaceSourcesWithHTTPInfo({ source }, requestOptions) {
|
|
2974
|
+
validateRequired("source", "replaceSourcesWithHTTPInfo", source);
|
|
2975
|
+
const requestPath = "/1/security/sources";
|
|
2976
|
+
const headers = {};
|
|
2977
|
+
const queryParameters = {};
|
|
2978
|
+
const request = {
|
|
2979
|
+
method: "PUT",
|
|
2980
|
+
path: requestPath,
|
|
2981
|
+
queryParameters,
|
|
2982
|
+
headers,
|
|
2983
|
+
data: source
|
|
2984
|
+
};
|
|
2985
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2986
|
+
},
|
|
1699
2987
|
/**
|
|
1700
2988
|
* Restores a deleted API key. Restoring resets the `validity` attribute to `0`. Algolia stores up to 1,000 API keys per application. If you create more, the oldest API keys are deleted and can\'t be restored.
|
|
1701
2989
|
*
|
|
@@ -1718,6 +3006,31 @@ function createSearchClient({
|
|
|
1718
3006
|
};
|
|
1719
3007
|
return transporter.request(request, requestOptions);
|
|
1720
3008
|
},
|
|
3009
|
+
/**
|
|
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.
|
|
3011
|
+
*
|
|
3012
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3013
|
+
*
|
|
3014
|
+
* Required API Key ACLs:
|
|
3015
|
+
* - admin
|
|
3016
|
+
* @param restoreApiKey - The restoreApiKey object.
|
|
3017
|
+
* @param restoreApiKey.key - API key.
|
|
3018
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3019
|
+
* @see restoreApiKey for the plain version.
|
|
3020
|
+
*/
|
|
3021
|
+
restoreApiKeyWithHTTPInfo({ key }, requestOptions) {
|
|
3022
|
+
validateRequired("key", "restoreApiKeyWithHTTPInfo", key);
|
|
3023
|
+
const requestPath = "/1/keys/{key}/restore".replace("{key}", encodeURIComponent(key));
|
|
3024
|
+
const headers = {};
|
|
3025
|
+
const queryParameters = {};
|
|
3026
|
+
const request = {
|
|
3027
|
+
method: "POST",
|
|
3028
|
+
path: requestPath,
|
|
3029
|
+
queryParameters,
|
|
3030
|
+
headers
|
|
3031
|
+
};
|
|
3032
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3033
|
+
},
|
|
1721
3034
|
/**
|
|
1722
3035
|
* Adds a record to an index or replaces it. - If the record doesn\'t have an object ID, a new record with an auto-generated object ID is added to your index. - If a record with the specified object ID exists, the existing record is replaced. - If a record with the specified object ID doesn\'t exist, a new record is added to your index. - If you add a record to an index that doesn\'t exist yet, a new index is created. To update _some_ attributes of a record, use the [`partial` operation](https://www.algolia.com/doc/rest-api/search/partial-update-object). To add, update, or replace multiple records, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch). This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
1723
3036
|
*
|
|
@@ -1743,6 +3056,34 @@ function createSearchClient({
|
|
|
1743
3056
|
};
|
|
1744
3057
|
return transporter.request(request, requestOptions);
|
|
1745
3058
|
},
|
|
3059
|
+
/**
|
|
3060
|
+
* 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).
|
|
3061
|
+
*
|
|
3062
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3063
|
+
*
|
|
3064
|
+
* Required API Key ACLs:
|
|
3065
|
+
* - addObject
|
|
3066
|
+
* @param saveObject - The saveObject object.
|
|
3067
|
+
* @param saveObject.indexName - Name of the index on which to perform the operation.
|
|
3068
|
+
* @param saveObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
3069
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3070
|
+
* @see saveObject for the plain version.
|
|
3071
|
+
*/
|
|
3072
|
+
saveObjectWithHTTPInfo({ indexName, body }, requestOptions) {
|
|
3073
|
+
validateRequired("indexName", "saveObjectWithHTTPInfo", indexName);
|
|
3074
|
+
validateRequired("body", "saveObjectWithHTTPInfo", body);
|
|
3075
|
+
const requestPath = "/1/indexes/{indexName}".replace("{indexName}", encodeURIComponent(indexName));
|
|
3076
|
+
const headers = {};
|
|
3077
|
+
const queryParameters = {};
|
|
3078
|
+
const request = {
|
|
3079
|
+
method: "POST",
|
|
3080
|
+
path: requestPath,
|
|
3081
|
+
queryParameters,
|
|
3082
|
+
headers,
|
|
3083
|
+
data: body
|
|
3084
|
+
};
|
|
3085
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3086
|
+
},
|
|
1746
3087
|
/**
|
|
1747
3088
|
* If a rule with the specified object ID doesn\'t exist, it\'s created. Otherwise, the existing rule is replaced. To create or update more than one rule, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/save-rules).
|
|
1748
3089
|
*
|
|
@@ -1776,6 +3117,42 @@ function createSearchClient({
|
|
|
1776
3117
|
};
|
|
1777
3118
|
return transporter.request(request, requestOptions);
|
|
1778
3119
|
},
|
|
3120
|
+
/**
|
|
3121
|
+
* 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).
|
|
3122
|
+
*
|
|
3123
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3124
|
+
*
|
|
3125
|
+
* Required API Key ACLs:
|
|
3126
|
+
* - editSettings
|
|
3127
|
+
* @param saveRule - The saveRule object.
|
|
3128
|
+
* @param saveRule.indexName - Name of the index on which to perform the operation.
|
|
3129
|
+
* @param saveRule.objectID - Unique identifier of a rule object.
|
|
3130
|
+
* @param saveRule.rule - The rule object.
|
|
3131
|
+
* @param saveRule.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3132
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3133
|
+
* @see saveRule for the plain version.
|
|
3134
|
+
*/
|
|
3135
|
+
saveRuleWithHTTPInfo({ indexName, objectID, rule, forwardToReplicas }, requestOptions) {
|
|
3136
|
+
validateRequired("indexName", "saveRuleWithHTTPInfo", indexName);
|
|
3137
|
+
validateRequired("objectID", "saveRuleWithHTTPInfo", objectID);
|
|
3138
|
+
validateRequired("rule", "saveRuleWithHTTPInfo", rule);
|
|
3139
|
+
validateRequired("rule.objectID", "saveRuleWithHTTPInfo", rule.objectID);
|
|
3140
|
+
validateRequired("rule.consequence", "saveRuleWithHTTPInfo", rule.consequence);
|
|
3141
|
+
const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
3142
|
+
const headers = {};
|
|
3143
|
+
const queryParameters = {};
|
|
3144
|
+
if (forwardToReplicas !== void 0) {
|
|
3145
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3146
|
+
}
|
|
3147
|
+
const request = {
|
|
3148
|
+
method: "PUT",
|
|
3149
|
+
path: requestPath,
|
|
3150
|
+
queryParameters,
|
|
3151
|
+
headers,
|
|
3152
|
+
data: rule
|
|
3153
|
+
};
|
|
3154
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3155
|
+
},
|
|
1779
3156
|
/**
|
|
1780
3157
|
* Create or update multiple rules. If a rule with the specified object ID doesn\'t exist, Algolia creates a new one. Otherwise, existing rules are replaced. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
1781
3158
|
*
|
|
@@ -1809,6 +3186,42 @@ function createSearchClient({
|
|
|
1809
3186
|
};
|
|
1810
3187
|
return transporter.request(request, requestOptions);
|
|
1811
3188
|
},
|
|
3189
|
+
/**
|
|
3190
|
+
* 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).
|
|
3191
|
+
*
|
|
3192
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3193
|
+
*
|
|
3194
|
+
* Required API Key ACLs:
|
|
3195
|
+
* - editSettings
|
|
3196
|
+
* @param saveRules - The saveRules object.
|
|
3197
|
+
* @param saveRules.indexName - Name of the index on which to perform the operation.
|
|
3198
|
+
* @param saveRules.rules - The rules object.
|
|
3199
|
+
* @param saveRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3200
|
+
* @param saveRules.clearExistingRules - Whether existing rules should be deleted before adding this batch.
|
|
3201
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3202
|
+
* @see saveRules for the plain version.
|
|
3203
|
+
*/
|
|
3204
|
+
saveRulesWithHTTPInfo({ indexName, rules, forwardToReplicas, clearExistingRules }, requestOptions) {
|
|
3205
|
+
validateRequired("indexName", "saveRulesWithHTTPInfo", indexName);
|
|
3206
|
+
validateRequired("rules", "saveRulesWithHTTPInfo", rules);
|
|
3207
|
+
const requestPath = "/1/indexes/{indexName}/rules/batch".replace("{indexName}", encodeURIComponent(indexName));
|
|
3208
|
+
const headers = {};
|
|
3209
|
+
const queryParameters = {};
|
|
3210
|
+
if (forwardToReplicas !== void 0) {
|
|
3211
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3212
|
+
}
|
|
3213
|
+
if (clearExistingRules !== void 0) {
|
|
3214
|
+
queryParameters["clearExistingRules"] = clearExistingRules.toString();
|
|
3215
|
+
}
|
|
3216
|
+
const request = {
|
|
3217
|
+
method: "POST",
|
|
3218
|
+
path: requestPath,
|
|
3219
|
+
queryParameters,
|
|
3220
|
+
headers,
|
|
3221
|
+
data: rules
|
|
3222
|
+
};
|
|
3223
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3224
|
+
},
|
|
1812
3225
|
/**
|
|
1813
3226
|
* If a synonym with the specified object ID doesn\'t exist, Algolia adds a new one. Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/save-synonyms).
|
|
1814
3227
|
*
|
|
@@ -1842,6 +3255,42 @@ function createSearchClient({
|
|
|
1842
3255
|
};
|
|
1843
3256
|
return transporter.request(request, requestOptions);
|
|
1844
3257
|
},
|
|
3258
|
+
/**
|
|
3259
|
+
* 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).
|
|
3260
|
+
*
|
|
3261
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3262
|
+
*
|
|
3263
|
+
* Required API Key ACLs:
|
|
3264
|
+
* - editSettings
|
|
3265
|
+
* @param saveSynonym - The saveSynonym object.
|
|
3266
|
+
* @param saveSynonym.indexName - Name of the index on which to perform the operation.
|
|
3267
|
+
* @param saveSynonym.objectID - Unique identifier of a synonym object.
|
|
3268
|
+
* @param saveSynonym.synonymHit - The synonymHit object.
|
|
3269
|
+
* @param saveSynonym.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3270
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3271
|
+
* @see saveSynonym for the plain version.
|
|
3272
|
+
*/
|
|
3273
|
+
saveSynonymWithHTTPInfo({ indexName, objectID, synonymHit, forwardToReplicas }, requestOptions) {
|
|
3274
|
+
validateRequired("indexName", "saveSynonymWithHTTPInfo", indexName);
|
|
3275
|
+
validateRequired("objectID", "saveSynonymWithHTTPInfo", objectID);
|
|
3276
|
+
validateRequired("synonymHit", "saveSynonymWithHTTPInfo", synonymHit);
|
|
3277
|
+
validateRequired("synonymHit.objectID", "saveSynonymWithHTTPInfo", synonymHit.objectID);
|
|
3278
|
+
validateRequired("synonymHit.type", "saveSynonymWithHTTPInfo", synonymHit.type);
|
|
3279
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
3280
|
+
const headers = {};
|
|
3281
|
+
const queryParameters = {};
|
|
3282
|
+
if (forwardToReplicas !== void 0) {
|
|
3283
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3284
|
+
}
|
|
3285
|
+
const request = {
|
|
3286
|
+
method: "PUT",
|
|
3287
|
+
path: requestPath,
|
|
3288
|
+
queryParameters,
|
|
3289
|
+
headers,
|
|
3290
|
+
data: synonymHit
|
|
3291
|
+
};
|
|
3292
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3293
|
+
},
|
|
1845
3294
|
/**
|
|
1846
3295
|
* If a synonym with the `objectID` doesn\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
1847
3296
|
*
|
|
@@ -1860,30 +3309,115 @@ function createSearchClient({
|
|
|
1860
3309
|
const requestPath = "/1/indexes/{indexName}/synonyms/batch".replace("{indexName}", encodeURIComponent(indexName));
|
|
1861
3310
|
const headers = {};
|
|
1862
3311
|
const queryParameters = {};
|
|
1863
|
-
if (forwardToReplicas !== void 0) {
|
|
1864
|
-
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1865
|
-
}
|
|
1866
|
-
if (replaceExistingSynonyms !== void 0) {
|
|
1867
|
-
queryParameters["replaceExistingSynonyms"] = replaceExistingSynonyms.toString();
|
|
1868
|
-
}
|
|
3312
|
+
if (forwardToReplicas !== void 0) {
|
|
3313
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3314
|
+
}
|
|
3315
|
+
if (replaceExistingSynonyms !== void 0) {
|
|
3316
|
+
queryParameters["replaceExistingSynonyms"] = replaceExistingSynonyms.toString();
|
|
3317
|
+
}
|
|
3318
|
+
const request = {
|
|
3319
|
+
method: "POST",
|
|
3320
|
+
path: requestPath,
|
|
3321
|
+
queryParameters,
|
|
3322
|
+
headers,
|
|
3323
|
+
data: synonymHit
|
|
3324
|
+
};
|
|
3325
|
+
return transporter.request(request, requestOptions);
|
|
3326
|
+
},
|
|
3327
|
+
/**
|
|
3328
|
+
* 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).
|
|
3329
|
+
*
|
|
3330
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3331
|
+
*
|
|
3332
|
+
* Required API Key ACLs:
|
|
3333
|
+
* - editSettings
|
|
3334
|
+
* @param saveSynonyms - The saveSynonyms object.
|
|
3335
|
+
* @param saveSynonyms.indexName - Name of the index on which to perform the operation.
|
|
3336
|
+
* @param saveSynonyms.synonymHit - The synonymHit object.
|
|
3337
|
+
* @param saveSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3338
|
+
* @param saveSynonyms.replaceExistingSynonyms - Whether to replace all synonyms in the index with the ones sent with this request.
|
|
3339
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3340
|
+
* @see saveSynonyms for the plain version.
|
|
3341
|
+
*/
|
|
3342
|
+
saveSynonymsWithHTTPInfo({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms }, requestOptions) {
|
|
3343
|
+
validateRequired("indexName", "saveSynonymsWithHTTPInfo", indexName);
|
|
3344
|
+
validateRequired("synonymHit", "saveSynonymsWithHTTPInfo", synonymHit);
|
|
3345
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/batch".replace("{indexName}", encodeURIComponent(indexName));
|
|
3346
|
+
const headers = {};
|
|
3347
|
+
const queryParameters = {};
|
|
3348
|
+
if (forwardToReplicas !== void 0) {
|
|
3349
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3350
|
+
}
|
|
3351
|
+
if (replaceExistingSynonyms !== void 0) {
|
|
3352
|
+
queryParameters["replaceExistingSynonyms"] = replaceExistingSynonyms.toString();
|
|
3353
|
+
}
|
|
3354
|
+
const request = {
|
|
3355
|
+
method: "POST",
|
|
3356
|
+
path: requestPath,
|
|
3357
|
+
queryParameters,
|
|
3358
|
+
headers,
|
|
3359
|
+
data: synonymHit
|
|
3360
|
+
};
|
|
3361
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3362
|
+
},
|
|
3363
|
+
/**
|
|
3364
|
+
* 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.
|
|
3365
|
+
*
|
|
3366
|
+
* Required API Key ACLs:
|
|
3367
|
+
* - search
|
|
3368
|
+
* @param searchMethodParams - Multi-query search request body. Results are returned in the same order as the requests.
|
|
3369
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3370
|
+
*/
|
|
3371
|
+
search(searchMethodParams, requestOptions) {
|
|
3372
|
+
if (searchMethodParams && Array.isArray(searchMethodParams)) {
|
|
3373
|
+
const newSignatureRequest = {
|
|
3374
|
+
requests: searchMethodParams.map(({ params, ...legacyRequest }) => {
|
|
3375
|
+
if (legacyRequest.type === "facet") {
|
|
3376
|
+
return {
|
|
3377
|
+
...legacyRequest,
|
|
3378
|
+
...params,
|
|
3379
|
+
type: "facet"
|
|
3380
|
+
};
|
|
3381
|
+
}
|
|
3382
|
+
return {
|
|
3383
|
+
...legacyRequest,
|
|
3384
|
+
...params,
|
|
3385
|
+
facet: void 0,
|
|
3386
|
+
maxFacetHits: void 0,
|
|
3387
|
+
facetQuery: void 0
|
|
3388
|
+
};
|
|
3389
|
+
})
|
|
3390
|
+
};
|
|
3391
|
+
searchMethodParams = newSignatureRequest;
|
|
3392
|
+
}
|
|
3393
|
+
validateRequired("searchMethodParams", "search", searchMethodParams);
|
|
3394
|
+
validateRequired("searchMethodParams.requests", "search", searchMethodParams.requests);
|
|
3395
|
+
const requestPath = "/1/indexes/*/queries";
|
|
3396
|
+
const headers = {};
|
|
3397
|
+
const queryParameters = {};
|
|
1869
3398
|
const request = {
|
|
1870
3399
|
method: "POST",
|
|
1871
3400
|
path: requestPath,
|
|
1872
3401
|
queryParameters,
|
|
1873
3402
|
headers,
|
|
1874
|
-
data:
|
|
3403
|
+
data: searchMethodParams,
|
|
3404
|
+
useReadTransporter: true,
|
|
3405
|
+
cacheable: true
|
|
1875
3406
|
};
|
|
1876
3407
|
return transporter.request(request, requestOptions);
|
|
1877
3408
|
},
|
|
1878
3409
|
/**
|
|
1879
3410
|
* Runs multiple search queries against one or more indices in a single API request. Use cases include: - Searching different indices, such as products and marketing content. - Run multiple queries on the same index with different parameters or filters. If you know the expected result type, use the `searchForHits` or `searchForFacets` helper to simplify the response format.
|
|
1880
3411
|
*
|
|
3412
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3413
|
+
*
|
|
1881
3414
|
* Required API Key ACLs:
|
|
1882
3415
|
* - search
|
|
1883
3416
|
* @param searchMethodParams - Multi-query search request body. Results are returned in the same order as the requests.
|
|
1884
3417
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3418
|
+
* @see search for the plain version.
|
|
1885
3419
|
*/
|
|
1886
|
-
|
|
3420
|
+
searchWithHTTPInfo(searchMethodParams, requestOptions) {
|
|
1887
3421
|
if (searchMethodParams && Array.isArray(searchMethodParams)) {
|
|
1888
3422
|
const newSignatureRequest = {
|
|
1889
3423
|
requests: searchMethodParams.map(({ params, ...legacyRequest }) => {
|
|
@@ -1905,8 +3439,8 @@ function createSearchClient({
|
|
|
1905
3439
|
};
|
|
1906
3440
|
searchMethodParams = newSignatureRequest;
|
|
1907
3441
|
}
|
|
1908
|
-
validateRequired("searchMethodParams", "
|
|
1909
|
-
validateRequired("searchMethodParams.requests", "
|
|
3442
|
+
validateRequired("searchMethodParams", "searchWithHTTPInfo", searchMethodParams);
|
|
3443
|
+
validateRequired("searchMethodParams.requests", "searchWithHTTPInfo", searchMethodParams.requests);
|
|
1910
3444
|
const requestPath = "/1/indexes/*/queries";
|
|
1911
3445
|
const headers = {};
|
|
1912
3446
|
const queryParameters = {};
|
|
@@ -1919,7 +3453,7 @@ function createSearchClient({
|
|
|
1919
3453
|
useReadTransporter: true,
|
|
1920
3454
|
cacheable: true
|
|
1921
3455
|
};
|
|
1922
|
-
return transporter.
|
|
3456
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1923
3457
|
},
|
|
1924
3458
|
/**
|
|
1925
3459
|
* Searches for standard and custom dictionary entries.
|
|
@@ -1956,6 +3490,48 @@ function createSearchClient({
|
|
|
1956
3490
|
};
|
|
1957
3491
|
return transporter.request(request, requestOptions);
|
|
1958
3492
|
},
|
|
3493
|
+
/**
|
|
3494
|
+
* Searches for standard and custom dictionary entries.
|
|
3495
|
+
*
|
|
3496
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3497
|
+
*
|
|
3498
|
+
* Required API Key ACLs:
|
|
3499
|
+
* - settings
|
|
3500
|
+
* @param searchDictionaryEntries - The searchDictionaryEntries object.
|
|
3501
|
+
* @param searchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
3502
|
+
* @param searchDictionaryEntries.searchDictionaryEntriesParams - The searchDictionaryEntriesParams object.
|
|
3503
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3504
|
+
* @see searchDictionaryEntries for the plain version.
|
|
3505
|
+
*/
|
|
3506
|
+
searchDictionaryEntriesWithHTTPInfo({ dictionaryName, searchDictionaryEntriesParams }, requestOptions) {
|
|
3507
|
+
validateRequired("dictionaryName", "searchDictionaryEntriesWithHTTPInfo", dictionaryName);
|
|
3508
|
+
validateRequired(
|
|
3509
|
+
"searchDictionaryEntriesParams",
|
|
3510
|
+
"searchDictionaryEntriesWithHTTPInfo",
|
|
3511
|
+
searchDictionaryEntriesParams
|
|
3512
|
+
);
|
|
3513
|
+
validateRequired(
|
|
3514
|
+
"searchDictionaryEntriesParams.query",
|
|
3515
|
+
"searchDictionaryEntriesWithHTTPInfo",
|
|
3516
|
+
searchDictionaryEntriesParams.query
|
|
3517
|
+
);
|
|
3518
|
+
const requestPath = "/1/dictionaries/{dictionaryName}/search".replace(
|
|
3519
|
+
"{dictionaryName}",
|
|
3520
|
+
encodeURIComponent(dictionaryName)
|
|
3521
|
+
);
|
|
3522
|
+
const headers = {};
|
|
3523
|
+
const queryParameters = {};
|
|
3524
|
+
const request = {
|
|
3525
|
+
method: "POST",
|
|
3526
|
+
path: requestPath,
|
|
3527
|
+
queryParameters,
|
|
3528
|
+
headers,
|
|
3529
|
+
data: searchDictionaryEntriesParams,
|
|
3530
|
+
useReadTransporter: true,
|
|
3531
|
+
cacheable: true
|
|
3532
|
+
};
|
|
3533
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3534
|
+
},
|
|
1959
3535
|
/**
|
|
1960
3536
|
* Searches for values of a specified facet attribute. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn\'t work if you have **more than 65 searchable facets and searchable attributes combined**.
|
|
1961
3537
|
*
|
|
@@ -1984,6 +3560,37 @@ function createSearchClient({
|
|
|
1984
3560
|
};
|
|
1985
3561
|
return transporter.request(request, requestOptions);
|
|
1986
3562
|
},
|
|
3563
|
+
/**
|
|
3564
|
+
* 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**.
|
|
3565
|
+
*
|
|
3566
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3567
|
+
*
|
|
3568
|
+
* Required API Key ACLs:
|
|
3569
|
+
* - search
|
|
3570
|
+
* @param searchForFacetValues - The searchForFacetValues object.
|
|
3571
|
+
* @param searchForFacetValues.indexName - Name of the index on which to perform the operation.
|
|
3572
|
+
* @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.
|
|
3573
|
+
* @param searchForFacetValues.searchForFacetValuesRequest - The searchForFacetValuesRequest object.
|
|
3574
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3575
|
+
* @see searchForFacetValues for the plain version.
|
|
3576
|
+
*/
|
|
3577
|
+
searchForFacetValuesWithHTTPInfo({ indexName, facetName, searchForFacetValuesRequest }, requestOptions) {
|
|
3578
|
+
validateRequired("indexName", "searchForFacetValuesWithHTTPInfo", indexName);
|
|
3579
|
+
validateRequired("facetName", "searchForFacetValuesWithHTTPInfo", facetName);
|
|
3580
|
+
const requestPath = "/1/indexes/{indexName}/facets/{facetName}/query".replace("{indexName}", encodeURIComponent(indexName)).replace("{facetName}", encodeURIComponent(facetName));
|
|
3581
|
+
const headers = {};
|
|
3582
|
+
const queryParameters = {};
|
|
3583
|
+
const request = {
|
|
3584
|
+
method: "POST",
|
|
3585
|
+
path: requestPath,
|
|
3586
|
+
queryParameters,
|
|
3587
|
+
headers,
|
|
3588
|
+
data: searchForFacetValuesRequest ? searchForFacetValuesRequest : {},
|
|
3589
|
+
useReadTransporter: true,
|
|
3590
|
+
cacheable: true
|
|
3591
|
+
};
|
|
3592
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3593
|
+
},
|
|
1987
3594
|
/**
|
|
1988
3595
|
* Searches for rules in your index.
|
|
1989
3596
|
*
|
|
@@ -2010,6 +3617,35 @@ function createSearchClient({
|
|
|
2010
3617
|
};
|
|
2011
3618
|
return transporter.request(request, requestOptions);
|
|
2012
3619
|
},
|
|
3620
|
+
/**
|
|
3621
|
+
* Searches for rules in your index.
|
|
3622
|
+
*
|
|
3623
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3624
|
+
*
|
|
3625
|
+
* Required API Key ACLs:
|
|
3626
|
+
* - settings
|
|
3627
|
+
* @param searchRules - The searchRules object.
|
|
3628
|
+
* @param searchRules.indexName - Name of the index on which to perform the operation.
|
|
3629
|
+
* @param searchRules.searchRulesParams - The searchRulesParams object.
|
|
3630
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3631
|
+
* @see searchRules for the plain version.
|
|
3632
|
+
*/
|
|
3633
|
+
searchRulesWithHTTPInfo({ indexName, searchRulesParams }, requestOptions) {
|
|
3634
|
+
validateRequired("indexName", "searchRulesWithHTTPInfo", indexName);
|
|
3635
|
+
const requestPath = "/1/indexes/{indexName}/rules/search".replace("{indexName}", encodeURIComponent(indexName));
|
|
3636
|
+
const headers = {};
|
|
3637
|
+
const queryParameters = {};
|
|
3638
|
+
const request = {
|
|
3639
|
+
method: "POST",
|
|
3640
|
+
path: requestPath,
|
|
3641
|
+
queryParameters,
|
|
3642
|
+
headers,
|
|
3643
|
+
data: searchRulesParams ? searchRulesParams : {},
|
|
3644
|
+
useReadTransporter: true,
|
|
3645
|
+
cacheable: true
|
|
3646
|
+
};
|
|
3647
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3648
|
+
},
|
|
2013
3649
|
/**
|
|
2014
3650
|
* Searches a single index and returns matching search results as hits. This method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` operation](https://www.algolia.com/doc/rest-api/search/browse) or increase the `paginatedLimitedTo` index setting.
|
|
2015
3651
|
*
|
|
@@ -2036,6 +3672,35 @@ function createSearchClient({
|
|
|
2036
3672
|
};
|
|
2037
3673
|
return transporter.request(request, requestOptions);
|
|
2038
3674
|
},
|
|
3675
|
+
/**
|
|
3676
|
+
* 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.
|
|
3677
|
+
*
|
|
3678
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3679
|
+
*
|
|
3680
|
+
* Required API Key ACLs:
|
|
3681
|
+
* - search
|
|
3682
|
+
* @param searchSingleIndex - The searchSingleIndex object.
|
|
3683
|
+
* @param searchSingleIndex.indexName - Name of the index on which to perform the operation.
|
|
3684
|
+
* @param searchSingleIndex.searchParams - The searchParams object.
|
|
3685
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3686
|
+
* @see searchSingleIndex for the plain version.
|
|
3687
|
+
*/
|
|
3688
|
+
searchSingleIndexWithHTTPInfo({ indexName, searchParams }, requestOptions) {
|
|
3689
|
+
validateRequired("indexName", "searchSingleIndexWithHTTPInfo", indexName);
|
|
3690
|
+
const requestPath = "/1/indexes/{indexName}/query".replace("{indexName}", encodeURIComponent(indexName));
|
|
3691
|
+
const headers = {};
|
|
3692
|
+
const queryParameters = {};
|
|
3693
|
+
const request = {
|
|
3694
|
+
method: "POST",
|
|
3695
|
+
path: requestPath,
|
|
3696
|
+
queryParameters,
|
|
3697
|
+
headers,
|
|
3698
|
+
data: searchParams ? searchParams : {},
|
|
3699
|
+
useReadTransporter: true,
|
|
3700
|
+
cacheable: true
|
|
3701
|
+
};
|
|
3702
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3703
|
+
},
|
|
2039
3704
|
/**
|
|
2040
3705
|
* Searches for synonyms in your index.
|
|
2041
3706
|
*
|
|
@@ -2065,6 +3730,38 @@ function createSearchClient({
|
|
|
2065
3730
|
};
|
|
2066
3731
|
return transporter.request(request, requestOptions);
|
|
2067
3732
|
},
|
|
3733
|
+
/**
|
|
3734
|
+
* Searches for synonyms in your index.
|
|
3735
|
+
*
|
|
3736
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3737
|
+
*
|
|
3738
|
+
* Required API Key ACLs:
|
|
3739
|
+
* - settings
|
|
3740
|
+
* @param searchSynonyms - The searchSynonyms object.
|
|
3741
|
+
* @param searchSynonyms.indexName - Name of the index on which to perform the operation.
|
|
3742
|
+
* @param searchSynonyms.searchSynonymsParams - Body of the `searchSynonyms` operation.
|
|
3743
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3744
|
+
* @see searchSynonyms for the plain version.
|
|
3745
|
+
*/
|
|
3746
|
+
searchSynonymsWithHTTPInfo({ indexName, searchSynonymsParams }, requestOptions) {
|
|
3747
|
+
validateRequired("indexName", "searchSynonymsWithHTTPInfo", indexName);
|
|
3748
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/search".replace(
|
|
3749
|
+
"{indexName}",
|
|
3750
|
+
encodeURIComponent(indexName)
|
|
3751
|
+
);
|
|
3752
|
+
const headers = {};
|
|
3753
|
+
const queryParameters = {};
|
|
3754
|
+
const request = {
|
|
3755
|
+
method: "POST",
|
|
3756
|
+
path: requestPath,
|
|
3757
|
+
queryParameters,
|
|
3758
|
+
headers,
|
|
3759
|
+
data: searchSynonymsParams ? searchSynonymsParams : {},
|
|
3760
|
+
useReadTransporter: true,
|
|
3761
|
+
cacheable: true
|
|
3762
|
+
};
|
|
3763
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3764
|
+
},
|
|
2068
3765
|
/**
|
|
2069
3766
|
* Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time. To ensure rapid updates, the user IDs index isn\'t built at the same time as the mapping. Instead, it\'s built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours).
|
|
2070
3767
|
*
|
|
@@ -2092,6 +3789,36 @@ function createSearchClient({
|
|
|
2092
3789
|
};
|
|
2093
3790
|
return transporter.request(request, requestOptions);
|
|
2094
3791
|
},
|
|
3792
|
+
/**
|
|
3793
|
+
* Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time. To ensure rapid updates, the user IDs index isn\'t built at the same time as the mapping. Instead, it\'s built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours).
|
|
3794
|
+
*
|
|
3795
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3796
|
+
*
|
|
3797
|
+
* Required API Key ACLs:
|
|
3798
|
+
* - admin
|
|
3799
|
+
*
|
|
3800
|
+
* @deprecated
|
|
3801
|
+
* @param searchUserIdsParams - The searchUserIdsParams object.
|
|
3802
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3803
|
+
* @see searchUserIds for the plain version.
|
|
3804
|
+
*/
|
|
3805
|
+
searchUserIdsWithHTTPInfo(searchUserIdsParams, requestOptions) {
|
|
3806
|
+
validateRequired("searchUserIdsParams", "searchUserIdsWithHTTPInfo", searchUserIdsParams);
|
|
3807
|
+
validateRequired("searchUserIdsParams.query", "searchUserIdsWithHTTPInfo", searchUserIdsParams.query);
|
|
3808
|
+
const requestPath = "/1/clusters/mapping/search";
|
|
3809
|
+
const headers = {};
|
|
3810
|
+
const queryParameters = {};
|
|
3811
|
+
const request = {
|
|
3812
|
+
method: "POST",
|
|
3813
|
+
path: requestPath,
|
|
3814
|
+
queryParameters,
|
|
3815
|
+
headers,
|
|
3816
|
+
data: searchUserIdsParams,
|
|
3817
|
+
useReadTransporter: true,
|
|
3818
|
+
cacheable: true
|
|
3819
|
+
};
|
|
3820
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3821
|
+
},
|
|
2095
3822
|
/**
|
|
2096
3823
|
* Turns standard stop word dictionary entries on or off for a given language.
|
|
2097
3824
|
*
|
|
@@ -2119,6 +3846,36 @@ function createSearchClient({
|
|
|
2119
3846
|
};
|
|
2120
3847
|
return transporter.request(request, requestOptions);
|
|
2121
3848
|
},
|
|
3849
|
+
/**
|
|
3850
|
+
* Turns standard stop word dictionary entries on or off for a given language.
|
|
3851
|
+
*
|
|
3852
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3853
|
+
*
|
|
3854
|
+
* Required API Key ACLs:
|
|
3855
|
+
* - editSettings
|
|
3856
|
+
* @param dictionarySettingsParams - The dictionarySettingsParams object.
|
|
3857
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3858
|
+
* @see setDictionarySettings for the plain version.
|
|
3859
|
+
*/
|
|
3860
|
+
setDictionarySettingsWithHTTPInfo(dictionarySettingsParams, requestOptions) {
|
|
3861
|
+
validateRequired("dictionarySettingsParams", "setDictionarySettingsWithHTTPInfo", dictionarySettingsParams);
|
|
3862
|
+
validateRequired(
|
|
3863
|
+
"dictionarySettingsParams.disableStandardEntries",
|
|
3864
|
+
"setDictionarySettingsWithHTTPInfo",
|
|
3865
|
+
dictionarySettingsParams.disableStandardEntries
|
|
3866
|
+
);
|
|
3867
|
+
const requestPath = "/1/dictionaries/*/settings";
|
|
3868
|
+
const headers = {};
|
|
3869
|
+
const queryParameters = {};
|
|
3870
|
+
const request = {
|
|
3871
|
+
method: "PUT",
|
|
3872
|
+
path: requestPath,
|
|
3873
|
+
queryParameters,
|
|
3874
|
+
headers,
|
|
3875
|
+
data: dictionarySettingsParams
|
|
3876
|
+
};
|
|
3877
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3878
|
+
},
|
|
2122
3879
|
/**
|
|
2123
3880
|
* Update the specified index settings. Index settings that you don\'t specify are left unchanged. Specify `null` to reset a setting to its default value. For best performance, update the index settings before you add new records to your index.
|
|
2124
3881
|
*
|
|
@@ -2148,6 +3905,38 @@ function createSearchClient({
|
|
|
2148
3905
|
};
|
|
2149
3906
|
return transporter.request(request, requestOptions);
|
|
2150
3907
|
},
|
|
3908
|
+
/**
|
|
3909
|
+
* 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.
|
|
3910
|
+
*
|
|
3911
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3912
|
+
*
|
|
3913
|
+
* Required API Key ACLs:
|
|
3914
|
+
* - editSettings
|
|
3915
|
+
* @param setSettings - The setSettings object.
|
|
3916
|
+
* @param setSettings.indexName - Name of the index on which to perform the operation.
|
|
3917
|
+
* @param setSettings.indexSettings - The indexSettings object.
|
|
3918
|
+
* @param setSettings.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3919
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3920
|
+
* @see setSettings for the plain version.
|
|
3921
|
+
*/
|
|
3922
|
+
setSettingsWithHTTPInfo({ indexName, indexSettings, forwardToReplicas }, requestOptions) {
|
|
3923
|
+
validateRequired("indexName", "setSettingsWithHTTPInfo", indexName);
|
|
3924
|
+
validateRequired("indexSettings", "setSettingsWithHTTPInfo", indexSettings);
|
|
3925
|
+
const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
|
|
3926
|
+
const headers = {};
|
|
3927
|
+
const queryParameters = {};
|
|
3928
|
+
if (forwardToReplicas !== void 0) {
|
|
3929
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3930
|
+
}
|
|
3931
|
+
const request = {
|
|
3932
|
+
method: "PUT",
|
|
3933
|
+
path: requestPath,
|
|
3934
|
+
queryParameters,
|
|
3935
|
+
headers,
|
|
3936
|
+
data: indexSettings
|
|
3937
|
+
};
|
|
3938
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3939
|
+
},
|
|
2151
3940
|
/**
|
|
2152
3941
|
* Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
|
|
2153
3942
|
*
|
|
@@ -2173,6 +3962,35 @@ function createSearchClient({
|
|
|
2173
3962
|
data: apiKey
|
|
2174
3963
|
};
|
|
2175
3964
|
return transporter.request(request, requestOptions);
|
|
3965
|
+
},
|
|
3966
|
+
/**
|
|
3967
|
+
* Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
|
|
3968
|
+
*
|
|
3969
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3970
|
+
*
|
|
3971
|
+
* Required API Key ACLs:
|
|
3972
|
+
* - admin
|
|
3973
|
+
* @param updateApiKey - The updateApiKey object.
|
|
3974
|
+
* @param updateApiKey.key - API key.
|
|
3975
|
+
* @param updateApiKey.apiKey - The apiKey object.
|
|
3976
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3977
|
+
* @see updateApiKey for the plain version.
|
|
3978
|
+
*/
|
|
3979
|
+
updateApiKeyWithHTTPInfo({ key, apiKey }, requestOptions) {
|
|
3980
|
+
validateRequired("key", "updateApiKeyWithHTTPInfo", key);
|
|
3981
|
+
validateRequired("apiKey", "updateApiKeyWithHTTPInfo", apiKey);
|
|
3982
|
+
validateRequired("apiKey.acl", "updateApiKeyWithHTTPInfo", apiKey.acl);
|
|
3983
|
+
const requestPath = "/1/keys/{key}".replace("{key}", encodeURIComponent(key));
|
|
3984
|
+
const headers = {};
|
|
3985
|
+
const queryParameters = {};
|
|
3986
|
+
const request = {
|
|
3987
|
+
method: "PUT",
|
|
3988
|
+
path: requestPath,
|
|
3989
|
+
queryParameters,
|
|
3990
|
+
headers,
|
|
3991
|
+
data: apiKey
|
|
3992
|
+
};
|
|
3993
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2176
3994
|
}
|
|
2177
3995
|
};
|
|
2178
3996
|
}
|