@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/src/searchClient.js
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
shuffle,
|
|
10
10
|
validateRequired
|
|
11
11
|
} from "@algolia/client-common";
|
|
12
|
-
var apiClientVersion = "5.
|
|
12
|
+
var apiClientVersion = "5.56.0";
|
|
13
13
|
function getDefaultHosts(appId) {
|
|
14
14
|
return [
|
|
15
15
|
{
|
|
@@ -274,7 +274,7 @@ function createSearchClient({
|
|
|
274
274
|
browseRules({ indexName, searchRulesParams, ...browseRulesOptions }, requestOptions) {
|
|
275
275
|
const params = {
|
|
276
276
|
...searchRulesParams,
|
|
277
|
-
hitsPerPage: searchRulesParams
|
|
277
|
+
hitsPerPage: (searchRulesParams == null ? void 0 : searchRulesParams.hitsPerPage) || 1e3
|
|
278
278
|
};
|
|
279
279
|
return createIterablePromise({
|
|
280
280
|
func: (previousResponse) => {
|
|
@@ -311,7 +311,7 @@ function createSearchClient({
|
|
|
311
311
|
}, requestOptions) {
|
|
312
312
|
const params = {
|
|
313
313
|
...searchSynonymsParams,
|
|
314
|
-
page: searchSynonymsParams
|
|
314
|
+
page: (searchSynonymsParams == null ? void 0 : searchSynonymsParams.page) || 0,
|
|
315
315
|
hitsPerPage: 1e3
|
|
316
316
|
};
|
|
317
317
|
return createIterablePromise({
|
|
@@ -576,6 +576,32 @@ function createSearchClient({
|
|
|
576
576
|
};
|
|
577
577
|
return transporter.request(request, requestOptions);
|
|
578
578
|
},
|
|
579
|
+
/**
|
|
580
|
+
* Creates a new API key with specific permissions and restrictions.
|
|
581
|
+
*
|
|
582
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
583
|
+
*
|
|
584
|
+
* Required API Key ACLs:
|
|
585
|
+
* - admin
|
|
586
|
+
* @param apiKey - The apiKey object.
|
|
587
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
588
|
+
* @see addApiKey for the plain version.
|
|
589
|
+
*/
|
|
590
|
+
addApiKeyWithHTTPInfo(apiKey, requestOptions) {
|
|
591
|
+
validateRequired("apiKey", "addApiKeyWithHTTPInfo", apiKey);
|
|
592
|
+
validateRequired("apiKey.acl", "addApiKeyWithHTTPInfo", apiKey.acl);
|
|
593
|
+
const requestPath = "/1/keys";
|
|
594
|
+
const headers = {};
|
|
595
|
+
const queryParameters = {};
|
|
596
|
+
const request = {
|
|
597
|
+
method: "POST",
|
|
598
|
+
path: requestPath,
|
|
599
|
+
queryParameters,
|
|
600
|
+
headers,
|
|
601
|
+
data: apiKey
|
|
602
|
+
};
|
|
603
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
604
|
+
},
|
|
579
605
|
/**
|
|
580
606
|
* If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. If you want to use auto-generated object IDs, use the [`saveObject` operation](https://www.algolia.com/doc/rest-api/search/save-object). To update _some_ attributes of an existing record, use the [`partial` operation](https://www.algolia.com/doc/rest-api/search/partial-update-object) instead. To add, update, or replace multiple records, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch).
|
|
581
607
|
*
|
|
@@ -603,6 +629,36 @@ function createSearchClient({
|
|
|
603
629
|
};
|
|
604
630
|
return transporter.request(request, requestOptions);
|
|
605
631
|
},
|
|
632
|
+
/**
|
|
633
|
+
* If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. If you want to use auto-generated object IDs, use the [`saveObject` operation](https://www.algolia.com/doc/rest-api/search/save-object). To update _some_ attributes of an existing record, use the [`partial` operation](https://www.algolia.com/doc/rest-api/search/partial-update-object) instead. To add, update, or replace multiple records, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch).
|
|
634
|
+
*
|
|
635
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
636
|
+
*
|
|
637
|
+
* Required API Key ACLs:
|
|
638
|
+
* - addObject
|
|
639
|
+
* @param addOrUpdateObject - The addOrUpdateObject object.
|
|
640
|
+
* @param addOrUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
641
|
+
* @param addOrUpdateObject.objectID - Unique record identifier.
|
|
642
|
+
* @param addOrUpdateObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
643
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
644
|
+
* @see addOrUpdateObject for the plain version.
|
|
645
|
+
*/
|
|
646
|
+
addOrUpdateObjectWithHTTPInfo({ indexName, objectID, body }, requestOptions) {
|
|
647
|
+
validateRequired("indexName", "addOrUpdateObjectWithHTTPInfo", indexName);
|
|
648
|
+
validateRequired("objectID", "addOrUpdateObjectWithHTTPInfo", objectID);
|
|
649
|
+
validateRequired("body", "addOrUpdateObjectWithHTTPInfo", body);
|
|
650
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
651
|
+
const headers = {};
|
|
652
|
+
const queryParameters = {};
|
|
653
|
+
const request = {
|
|
654
|
+
method: "PUT",
|
|
655
|
+
path: requestPath,
|
|
656
|
+
queryParameters,
|
|
657
|
+
headers,
|
|
658
|
+
data: body
|
|
659
|
+
};
|
|
660
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
661
|
+
},
|
|
606
662
|
/**
|
|
607
663
|
* Adds a source to the list of allowed sources.
|
|
608
664
|
*
|
|
@@ -626,6 +682,32 @@ function createSearchClient({
|
|
|
626
682
|
};
|
|
627
683
|
return transporter.request(request, requestOptions);
|
|
628
684
|
},
|
|
685
|
+
/**
|
|
686
|
+
* Adds a source to the list of allowed sources.
|
|
687
|
+
*
|
|
688
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
689
|
+
*
|
|
690
|
+
* Required API Key ACLs:
|
|
691
|
+
* - admin
|
|
692
|
+
* @param source - Source to add.
|
|
693
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
694
|
+
* @see appendSource for the plain version.
|
|
695
|
+
*/
|
|
696
|
+
appendSourceWithHTTPInfo(source, requestOptions) {
|
|
697
|
+
validateRequired("source", "appendSourceWithHTTPInfo", source);
|
|
698
|
+
validateRequired("source.source", "appendSourceWithHTTPInfo", source.source);
|
|
699
|
+
const requestPath = "/1/security/sources/append";
|
|
700
|
+
const headers = {};
|
|
701
|
+
const queryParameters = {};
|
|
702
|
+
const request = {
|
|
703
|
+
method: "POST",
|
|
704
|
+
path: requestPath,
|
|
705
|
+
queryParameters,
|
|
706
|
+
headers,
|
|
707
|
+
data: source
|
|
708
|
+
};
|
|
709
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
710
|
+
},
|
|
629
711
|
/**
|
|
630
712
|
* Assigns or moves a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID.
|
|
631
713
|
*
|
|
@@ -657,6 +739,40 @@ function createSearchClient({
|
|
|
657
739
|
};
|
|
658
740
|
return transporter.request(request, requestOptions);
|
|
659
741
|
},
|
|
742
|
+
/**
|
|
743
|
+
* Assigns or moves a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID.
|
|
744
|
+
*
|
|
745
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
746
|
+
*
|
|
747
|
+
* Required API Key ACLs:
|
|
748
|
+
* - admin
|
|
749
|
+
*
|
|
750
|
+
* @deprecated
|
|
751
|
+
* @param assignUserId - The assignUserId object.
|
|
752
|
+
* @param assignUserId.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
753
|
+
* @param assignUserId.assignUserIdParams - The assignUserIdParams object.
|
|
754
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
755
|
+
* @see assignUserId for the plain version.
|
|
756
|
+
*/
|
|
757
|
+
assignUserIdWithHTTPInfo({ xAlgoliaUserID, assignUserIdParams }, requestOptions) {
|
|
758
|
+
validateRequired("xAlgoliaUserID", "assignUserIdWithHTTPInfo", xAlgoliaUserID);
|
|
759
|
+
validateRequired("assignUserIdParams", "assignUserIdWithHTTPInfo", assignUserIdParams);
|
|
760
|
+
validateRequired("assignUserIdParams.cluster", "assignUserIdWithHTTPInfo", assignUserIdParams.cluster);
|
|
761
|
+
const requestPath = "/1/clusters/mapping";
|
|
762
|
+
const headers = {};
|
|
763
|
+
const queryParameters = {};
|
|
764
|
+
if (xAlgoliaUserID !== void 0) {
|
|
765
|
+
headers["X-Algolia-User-ID"] = xAlgoliaUserID.toString();
|
|
766
|
+
}
|
|
767
|
+
const request = {
|
|
768
|
+
method: "POST",
|
|
769
|
+
path: requestPath,
|
|
770
|
+
queryParameters,
|
|
771
|
+
headers,
|
|
772
|
+
data: assignUserIdParams
|
|
773
|
+
};
|
|
774
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
775
|
+
},
|
|
660
776
|
/**
|
|
661
777
|
* Adds, updates, or deletes records in one index with a single API request. Batching index updates reduces latency and increases data integrity. - Actions are applied in the order they\'re specified. - Actions are equivalent to the individual API requests of the same name. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
662
778
|
*
|
|
@@ -683,6 +799,35 @@ function createSearchClient({
|
|
|
683
799
|
};
|
|
684
800
|
return transporter.request(request, requestOptions);
|
|
685
801
|
},
|
|
802
|
+
/**
|
|
803
|
+
* 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).
|
|
804
|
+
*
|
|
805
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
806
|
+
*
|
|
807
|
+
* Required API Key ACLs:
|
|
808
|
+
* - addObject
|
|
809
|
+
* @param batch - The batch object.
|
|
810
|
+
* @param batch.indexName - Name of the index on which to perform the operation.
|
|
811
|
+
* @param batch.batchWriteParams - The batchWriteParams object.
|
|
812
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
813
|
+
* @see batch for the plain version.
|
|
814
|
+
*/
|
|
815
|
+
batchWithHTTPInfo({ indexName, batchWriteParams }, requestOptions) {
|
|
816
|
+
validateRequired("indexName", "batchWithHTTPInfo", indexName);
|
|
817
|
+
validateRequired("batchWriteParams", "batchWithHTTPInfo", batchWriteParams);
|
|
818
|
+
validateRequired("batchWriteParams.requests", "batchWithHTTPInfo", batchWriteParams.requests);
|
|
819
|
+
const requestPath = "/1/indexes/{indexName}/batch".replace("{indexName}", encodeURIComponent(indexName));
|
|
820
|
+
const headers = {};
|
|
821
|
+
const queryParameters = {};
|
|
822
|
+
const request = {
|
|
823
|
+
method: "POST",
|
|
824
|
+
path: requestPath,
|
|
825
|
+
queryParameters,
|
|
826
|
+
headers,
|
|
827
|
+
data: batchWriteParams
|
|
828
|
+
};
|
|
829
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
830
|
+
},
|
|
686
831
|
/**
|
|
687
832
|
* Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
|
|
688
833
|
*
|
|
@@ -715,6 +860,49 @@ function createSearchClient({
|
|
|
715
860
|
};
|
|
716
861
|
return transporter.request(request, requestOptions);
|
|
717
862
|
},
|
|
863
|
+
/**
|
|
864
|
+
* Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
|
|
865
|
+
*
|
|
866
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
867
|
+
*
|
|
868
|
+
* Required API Key ACLs:
|
|
869
|
+
* - admin
|
|
870
|
+
*
|
|
871
|
+
* @deprecated
|
|
872
|
+
* @param batchAssignUserIds - The batchAssignUserIds object.
|
|
873
|
+
* @param batchAssignUserIds.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
874
|
+
* @param batchAssignUserIds.batchAssignUserIdsParams - The batchAssignUserIdsParams object.
|
|
875
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
876
|
+
* @see batchAssignUserIds for the plain version.
|
|
877
|
+
*/
|
|
878
|
+
batchAssignUserIdsWithHTTPInfo({ xAlgoliaUserID, batchAssignUserIdsParams }, requestOptions) {
|
|
879
|
+
validateRequired("xAlgoliaUserID", "batchAssignUserIdsWithHTTPInfo", xAlgoliaUserID);
|
|
880
|
+
validateRequired("batchAssignUserIdsParams", "batchAssignUserIdsWithHTTPInfo", batchAssignUserIdsParams);
|
|
881
|
+
validateRequired(
|
|
882
|
+
"batchAssignUserIdsParams.cluster",
|
|
883
|
+
"batchAssignUserIdsWithHTTPInfo",
|
|
884
|
+
batchAssignUserIdsParams.cluster
|
|
885
|
+
);
|
|
886
|
+
validateRequired(
|
|
887
|
+
"batchAssignUserIdsParams.users",
|
|
888
|
+
"batchAssignUserIdsWithHTTPInfo",
|
|
889
|
+
batchAssignUserIdsParams.users
|
|
890
|
+
);
|
|
891
|
+
const requestPath = "/1/clusters/mapping/batch";
|
|
892
|
+
const headers = {};
|
|
893
|
+
const queryParameters = {};
|
|
894
|
+
if (xAlgoliaUserID !== void 0) {
|
|
895
|
+
headers["X-Algolia-User-ID"] = xAlgoliaUserID.toString();
|
|
896
|
+
}
|
|
897
|
+
const request = {
|
|
898
|
+
method: "POST",
|
|
899
|
+
path: requestPath,
|
|
900
|
+
queryParameters,
|
|
901
|
+
headers,
|
|
902
|
+
data: batchAssignUserIdsParams
|
|
903
|
+
};
|
|
904
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
905
|
+
},
|
|
718
906
|
/**
|
|
719
907
|
* Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
|
|
720
908
|
*
|
|
@@ -748,6 +936,46 @@ function createSearchClient({
|
|
|
748
936
|
};
|
|
749
937
|
return transporter.request(request, requestOptions);
|
|
750
938
|
},
|
|
939
|
+
/**
|
|
940
|
+
* Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
|
|
941
|
+
*
|
|
942
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
943
|
+
*
|
|
944
|
+
* Required API Key ACLs:
|
|
945
|
+
* - editSettings
|
|
946
|
+
* @param batchDictionaryEntries - The batchDictionaryEntries object.
|
|
947
|
+
* @param batchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
948
|
+
* @param batchDictionaryEntries.batchDictionaryEntriesParams - The batchDictionaryEntriesParams object.
|
|
949
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
950
|
+
* @see batchDictionaryEntries for the plain version.
|
|
951
|
+
*/
|
|
952
|
+
batchDictionaryEntriesWithHTTPInfo({ dictionaryName, batchDictionaryEntriesParams }, requestOptions) {
|
|
953
|
+
validateRequired("dictionaryName", "batchDictionaryEntriesWithHTTPInfo", dictionaryName);
|
|
954
|
+
validateRequired(
|
|
955
|
+
"batchDictionaryEntriesParams",
|
|
956
|
+
"batchDictionaryEntriesWithHTTPInfo",
|
|
957
|
+
batchDictionaryEntriesParams
|
|
958
|
+
);
|
|
959
|
+
validateRequired(
|
|
960
|
+
"batchDictionaryEntriesParams.requests",
|
|
961
|
+
"batchDictionaryEntriesWithHTTPInfo",
|
|
962
|
+
batchDictionaryEntriesParams.requests
|
|
963
|
+
);
|
|
964
|
+
const requestPath = "/1/dictionaries/{dictionaryName}/batch".replace(
|
|
965
|
+
"{dictionaryName}",
|
|
966
|
+
encodeURIComponent(dictionaryName)
|
|
967
|
+
);
|
|
968
|
+
const headers = {};
|
|
969
|
+
const queryParameters = {};
|
|
970
|
+
const request = {
|
|
971
|
+
method: "POST",
|
|
972
|
+
path: requestPath,
|
|
973
|
+
queryParameters,
|
|
974
|
+
headers,
|
|
975
|
+
data: batchDictionaryEntriesParams
|
|
976
|
+
};
|
|
977
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
978
|
+
},
|
|
751
979
|
/**
|
|
752
980
|
* Retrieves records from an index, up to 1,000 per request. Searching returns _hits_ (records augmented with highlighting and ranking details). Browsing returns matching records only. Use browse to export your indices. - The Analytics API doesn\'t collect data when using `browse`. - Records are ranked by attributes and custom ranking. - There\'s no ranking for typo tolerance, number of matched words, proximity, or geo distance. Browse requests automatically apply these settings: - `advancedSyntax`: `false` - `attributesToHighlight`: `[]` - `attributesToSnippet`: `[]` - `distinct`: `false` - `enablePersonalization`: `false` - `enableRules`: `false` - `facets`: `[]` - `getRankingInfo`: `false` - `ignorePlurals`: `false` - `optionalFilters`: `[]` - `typoTolerance`: `true` or `false` (`min` and `strict` evaluate to `true`) If you send these parameters with your browse requests, they\'re ignored.
|
|
753
981
|
*
|
|
@@ -773,6 +1001,34 @@ function createSearchClient({
|
|
|
773
1001
|
};
|
|
774
1002
|
return transporter.request(request, requestOptions);
|
|
775
1003
|
},
|
|
1004
|
+
/**
|
|
1005
|
+
* 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.
|
|
1006
|
+
*
|
|
1007
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1008
|
+
*
|
|
1009
|
+
* Required API Key ACLs:
|
|
1010
|
+
* - browse
|
|
1011
|
+
* @param browse - The browse object.
|
|
1012
|
+
* @param browse.indexName - Name of the index on which to perform the operation.
|
|
1013
|
+
* @param browse.browseParams - The browseParams object.
|
|
1014
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1015
|
+
* @see browse for the plain version.
|
|
1016
|
+
*/
|
|
1017
|
+
browseWithHTTPInfo({ indexName, browseParams }, requestOptions) {
|
|
1018
|
+
validateRequired("indexName", "browseWithHTTPInfo", indexName);
|
|
1019
|
+
const requestPath = "/1/indexes/{indexName}/browse".replace("{indexName}", encodeURIComponent(indexName));
|
|
1020
|
+
const headers = {};
|
|
1021
|
+
const queryParameters = {};
|
|
1022
|
+
const request = {
|
|
1023
|
+
method: "POST",
|
|
1024
|
+
path: requestPath,
|
|
1025
|
+
queryParameters,
|
|
1026
|
+
headers,
|
|
1027
|
+
data: browseParams ? browseParams : {},
|
|
1028
|
+
useReadTransporter: true
|
|
1029
|
+
};
|
|
1030
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1031
|
+
},
|
|
776
1032
|
/**
|
|
777
1033
|
* Deletes only the records from an index while keeping settings, synonyms, and rules. This operation is resource-intensive and subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
778
1034
|
*
|
|
@@ -795,6 +1051,31 @@ function createSearchClient({
|
|
|
795
1051
|
};
|
|
796
1052
|
return transporter.request(request, requestOptions);
|
|
797
1053
|
},
|
|
1054
|
+
/**
|
|
1055
|
+
* 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).
|
|
1056
|
+
*
|
|
1057
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1058
|
+
*
|
|
1059
|
+
* Required API Key ACLs:
|
|
1060
|
+
* - deleteIndex
|
|
1061
|
+
* @param clearObjects - The clearObjects object.
|
|
1062
|
+
* @param clearObjects.indexName - Name of the index on which to perform the operation.
|
|
1063
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1064
|
+
* @see clearObjects for the plain version.
|
|
1065
|
+
*/
|
|
1066
|
+
clearObjectsWithHTTPInfo({ indexName }, requestOptions) {
|
|
1067
|
+
validateRequired("indexName", "clearObjectsWithHTTPInfo", indexName);
|
|
1068
|
+
const requestPath = "/1/indexes/{indexName}/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
1069
|
+
const headers = {};
|
|
1070
|
+
const queryParameters = {};
|
|
1071
|
+
const request = {
|
|
1072
|
+
method: "POST",
|
|
1073
|
+
path: requestPath,
|
|
1074
|
+
queryParameters,
|
|
1075
|
+
headers
|
|
1076
|
+
};
|
|
1077
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1078
|
+
},
|
|
798
1079
|
/**
|
|
799
1080
|
* Deletes all rules from the index.
|
|
800
1081
|
*
|
|
@@ -822,18 +1103,21 @@ function createSearchClient({
|
|
|
822
1103
|
return transporter.request(request, requestOptions);
|
|
823
1104
|
},
|
|
824
1105
|
/**
|
|
825
|
-
* Deletes all
|
|
1106
|
+
* Deletes all rules from the index.
|
|
1107
|
+
*
|
|
1108
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
826
1109
|
*
|
|
827
1110
|
* Required API Key ACLs:
|
|
828
1111
|
* - editSettings
|
|
829
|
-
* @param
|
|
830
|
-
* @param
|
|
831
|
-
* @param
|
|
1112
|
+
* @param clearRules - The clearRules object.
|
|
1113
|
+
* @param clearRules.indexName - Name of the index on which to perform the operation.
|
|
1114
|
+
* @param clearRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
832
1115
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1116
|
+
* @see clearRules for the plain version.
|
|
833
1117
|
*/
|
|
834
|
-
|
|
835
|
-
validateRequired("indexName", "
|
|
836
|
-
const requestPath = "/1/indexes/{indexName}/
|
|
1118
|
+
clearRulesWithHTTPInfo({ indexName, forwardToReplicas }, requestOptions) {
|
|
1119
|
+
validateRequired("indexName", "clearRulesWithHTTPInfo", indexName);
|
|
1120
|
+
const requestPath = "/1/indexes/{indexName}/rules/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
837
1121
|
const headers = {};
|
|
838
1122
|
const queryParameters = {};
|
|
839
1123
|
if (forwardToReplicas !== void 0) {
|
|
@@ -845,22 +1129,28 @@ function createSearchClient({
|
|
|
845
1129
|
queryParameters,
|
|
846
1130
|
headers
|
|
847
1131
|
};
|
|
848
|
-
return transporter.
|
|
1132
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
849
1133
|
},
|
|
850
1134
|
/**
|
|
851
|
-
*
|
|
852
|
-
*
|
|
853
|
-
*
|
|
854
|
-
*
|
|
1135
|
+
* Deletes all synonyms from the index.
|
|
1136
|
+
*
|
|
1137
|
+
* Required API Key ACLs:
|
|
1138
|
+
* - editSettings
|
|
1139
|
+
* @param clearSynonyms - The clearSynonyms object.
|
|
1140
|
+
* @param clearSynonyms.indexName - Name of the index on which to perform the operation.
|
|
1141
|
+
* @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
855
1142
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
856
1143
|
*/
|
|
857
|
-
|
|
858
|
-
validateRequired("
|
|
859
|
-
const requestPath = "/{
|
|
1144
|
+
clearSynonyms({ indexName, forwardToReplicas }, requestOptions) {
|
|
1145
|
+
validateRequired("indexName", "clearSynonyms", indexName);
|
|
1146
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
860
1147
|
const headers = {};
|
|
861
|
-
const queryParameters =
|
|
1148
|
+
const queryParameters = {};
|
|
1149
|
+
if (forwardToReplicas !== void 0) {
|
|
1150
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1151
|
+
}
|
|
862
1152
|
const request = {
|
|
863
|
-
method: "
|
|
1153
|
+
method: "POST",
|
|
864
1154
|
path: requestPath,
|
|
865
1155
|
queryParameters,
|
|
866
1156
|
headers
|
|
@@ -868,7 +1158,79 @@ function createSearchClient({
|
|
|
868
1158
|
return transporter.request(request, requestOptions);
|
|
869
1159
|
},
|
|
870
1160
|
/**
|
|
871
|
-
*
|
|
1161
|
+
* Deletes all synonyms from the index.
|
|
1162
|
+
*
|
|
1163
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1164
|
+
*
|
|
1165
|
+
* Required API Key ACLs:
|
|
1166
|
+
* - editSettings
|
|
1167
|
+
* @param clearSynonyms - The clearSynonyms object.
|
|
1168
|
+
* @param clearSynonyms.indexName - Name of the index on which to perform the operation.
|
|
1169
|
+
* @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1170
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1171
|
+
* @see clearSynonyms for the plain version.
|
|
1172
|
+
*/
|
|
1173
|
+
clearSynonymsWithHTTPInfo({ indexName, forwardToReplicas }, requestOptions) {
|
|
1174
|
+
validateRequired("indexName", "clearSynonymsWithHTTPInfo", indexName);
|
|
1175
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
1176
|
+
const headers = {};
|
|
1177
|
+
const queryParameters = {};
|
|
1178
|
+
if (forwardToReplicas !== void 0) {
|
|
1179
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1180
|
+
}
|
|
1181
|
+
const request = {
|
|
1182
|
+
method: "POST",
|
|
1183
|
+
path: requestPath,
|
|
1184
|
+
queryParameters,
|
|
1185
|
+
headers
|
|
1186
|
+
};
|
|
1187
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1188
|
+
},
|
|
1189
|
+
/**
|
|
1190
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1191
|
+
* @param customDelete - The customDelete object.
|
|
1192
|
+
* @param customDelete.path - Path of the endpoint, for example `1/newFeature`.
|
|
1193
|
+
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
1194
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1195
|
+
*/
|
|
1196
|
+
customDelete({ path, parameters }, requestOptions) {
|
|
1197
|
+
validateRequired("path", "customDelete", path);
|
|
1198
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1199
|
+
const headers = {};
|
|
1200
|
+
const queryParameters = parameters ? parameters : {};
|
|
1201
|
+
const request = {
|
|
1202
|
+
method: "DELETE",
|
|
1203
|
+
path: requestPath,
|
|
1204
|
+
queryParameters,
|
|
1205
|
+
headers
|
|
1206
|
+
};
|
|
1207
|
+
return transporter.request(request, requestOptions);
|
|
1208
|
+
},
|
|
1209
|
+
/**
|
|
1210
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1211
|
+
*
|
|
1212
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1213
|
+
* @param customDelete - The customDelete object.
|
|
1214
|
+
* @param customDelete.path - Path of the endpoint, for example `1/newFeature`.
|
|
1215
|
+
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
1216
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1217
|
+
* @see customDelete for the plain version.
|
|
1218
|
+
*/
|
|
1219
|
+
customDeleteWithHTTPInfo({ path, parameters }, requestOptions) {
|
|
1220
|
+
validateRequired("path", "customDeleteWithHTTPInfo", path);
|
|
1221
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1222
|
+
const headers = {};
|
|
1223
|
+
const queryParameters = parameters ? parameters : {};
|
|
1224
|
+
const request = {
|
|
1225
|
+
method: "DELETE",
|
|
1226
|
+
path: requestPath,
|
|
1227
|
+
queryParameters,
|
|
1228
|
+
headers
|
|
1229
|
+
};
|
|
1230
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1231
|
+
},
|
|
1232
|
+
/**
|
|
1233
|
+
* This method lets you send requests to the Algolia REST API.
|
|
872
1234
|
* @param customGet - The customGet object.
|
|
873
1235
|
* @param customGet.path - Path of the endpoint, for example `1/newFeature`.
|
|
874
1236
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -887,6 +1249,29 @@ function createSearchClient({
|
|
|
887
1249
|
};
|
|
888
1250
|
return transporter.request(request, requestOptions);
|
|
889
1251
|
},
|
|
1252
|
+
/**
|
|
1253
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1254
|
+
*
|
|
1255
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1256
|
+
* @param customGet - The customGet object.
|
|
1257
|
+
* @param customGet.path - Path of the endpoint, for example `1/newFeature`.
|
|
1258
|
+
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
1259
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1260
|
+
* @see customGet for the plain version.
|
|
1261
|
+
*/
|
|
1262
|
+
customGetWithHTTPInfo({ path, parameters }, requestOptions) {
|
|
1263
|
+
validateRequired("path", "customGetWithHTTPInfo", path);
|
|
1264
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1265
|
+
const headers = {};
|
|
1266
|
+
const queryParameters = parameters ? parameters : {};
|
|
1267
|
+
const request = {
|
|
1268
|
+
method: "GET",
|
|
1269
|
+
path: requestPath,
|
|
1270
|
+
queryParameters,
|
|
1271
|
+
headers
|
|
1272
|
+
};
|
|
1273
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1274
|
+
},
|
|
890
1275
|
/**
|
|
891
1276
|
* This method lets you send requests to the Algolia REST API.
|
|
892
1277
|
* @param customPost - The customPost object.
|
|
@@ -909,6 +1294,31 @@ function createSearchClient({
|
|
|
909
1294
|
};
|
|
910
1295
|
return transporter.request(request, requestOptions);
|
|
911
1296
|
},
|
|
1297
|
+
/**
|
|
1298
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1299
|
+
*
|
|
1300
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1301
|
+
* @param customPost - The customPost object.
|
|
1302
|
+
* @param customPost.path - Path of the endpoint, for example `1/newFeature`.
|
|
1303
|
+
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
1304
|
+
* @param customPost.body - Parameters to send with the custom request.
|
|
1305
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1306
|
+
* @see customPost for the plain version.
|
|
1307
|
+
*/
|
|
1308
|
+
customPostWithHTTPInfo({ path, parameters, body }, requestOptions) {
|
|
1309
|
+
validateRequired("path", "customPostWithHTTPInfo", path);
|
|
1310
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1311
|
+
const headers = {};
|
|
1312
|
+
const queryParameters = parameters ? parameters : {};
|
|
1313
|
+
const request = {
|
|
1314
|
+
method: "POST",
|
|
1315
|
+
path: requestPath,
|
|
1316
|
+
queryParameters,
|
|
1317
|
+
headers,
|
|
1318
|
+
data: body ? body : {}
|
|
1319
|
+
};
|
|
1320
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1321
|
+
},
|
|
912
1322
|
/**
|
|
913
1323
|
* This method lets you send requests to the Algolia REST API.
|
|
914
1324
|
* @param customPut - The customPut object.
|
|
@@ -931,6 +1341,31 @@ function createSearchClient({
|
|
|
931
1341
|
};
|
|
932
1342
|
return transporter.request(request, requestOptions);
|
|
933
1343
|
},
|
|
1344
|
+
/**
|
|
1345
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1346
|
+
*
|
|
1347
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1348
|
+
* @param customPut - The customPut object.
|
|
1349
|
+
* @param customPut.path - Path of the endpoint, for example `1/newFeature`.
|
|
1350
|
+
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
1351
|
+
* @param customPut.body - Parameters to send with the custom request.
|
|
1352
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1353
|
+
* @see customPut for the plain version.
|
|
1354
|
+
*/
|
|
1355
|
+
customPutWithHTTPInfo({ path, parameters, body }, requestOptions) {
|
|
1356
|
+
validateRequired("path", "customPutWithHTTPInfo", path);
|
|
1357
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1358
|
+
const headers = {};
|
|
1359
|
+
const queryParameters = parameters ? parameters : {};
|
|
1360
|
+
const request = {
|
|
1361
|
+
method: "PUT",
|
|
1362
|
+
path: requestPath,
|
|
1363
|
+
queryParameters,
|
|
1364
|
+
headers,
|
|
1365
|
+
data: body ? body : {}
|
|
1366
|
+
};
|
|
1367
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1368
|
+
},
|
|
934
1369
|
/**
|
|
935
1370
|
* Deletes the API key.
|
|
936
1371
|
*
|
|
@@ -953,6 +1388,31 @@ function createSearchClient({
|
|
|
953
1388
|
};
|
|
954
1389
|
return transporter.request(request, requestOptions);
|
|
955
1390
|
},
|
|
1391
|
+
/**
|
|
1392
|
+
* Deletes the API key.
|
|
1393
|
+
*
|
|
1394
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1395
|
+
*
|
|
1396
|
+
* Required API Key ACLs:
|
|
1397
|
+
* - admin
|
|
1398
|
+
* @param deleteApiKey - The deleteApiKey object.
|
|
1399
|
+
* @param deleteApiKey.key - API key.
|
|
1400
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1401
|
+
* @see deleteApiKey for the plain version.
|
|
1402
|
+
*/
|
|
1403
|
+
deleteApiKeyWithHTTPInfo({ key }, requestOptions) {
|
|
1404
|
+
validateRequired("key", "deleteApiKeyWithHTTPInfo", key);
|
|
1405
|
+
const requestPath = "/1/keys/{key}".replace("{key}", encodeURIComponent(key));
|
|
1406
|
+
const headers = {};
|
|
1407
|
+
const queryParameters = {};
|
|
1408
|
+
const request = {
|
|
1409
|
+
method: "DELETE",
|
|
1410
|
+
path: requestPath,
|
|
1411
|
+
queryParameters,
|
|
1412
|
+
headers
|
|
1413
|
+
};
|
|
1414
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1415
|
+
},
|
|
956
1416
|
/**
|
|
957
1417
|
* This operation doesn\'t accept empty filters. This operation is resource-intensive. Use it only if you can\'t get the object IDs of the records you want to delete. It\'s more efficient to get a list of object IDs with the [`browse` operation](https://www.algolia.com/doc/rest-api/search/browse), and then delete the records using the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch). This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
958
1418
|
*
|
|
@@ -978,6 +1438,34 @@ function createSearchClient({
|
|
|
978
1438
|
};
|
|
979
1439
|
return transporter.request(request, requestOptions);
|
|
980
1440
|
},
|
|
1441
|
+
/**
|
|
1442
|
+
* 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).
|
|
1443
|
+
*
|
|
1444
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1445
|
+
*
|
|
1446
|
+
* Required API Key ACLs:
|
|
1447
|
+
* - deleteIndex
|
|
1448
|
+
* @param deleteBy - The deleteBy object.
|
|
1449
|
+
* @param deleteBy.indexName - Name of the index on which to perform the operation.
|
|
1450
|
+
* @param deleteBy.deleteByParams - The deleteByParams object.
|
|
1451
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1452
|
+
* @see deleteBy for the plain version.
|
|
1453
|
+
*/
|
|
1454
|
+
deleteByWithHTTPInfo({ indexName, deleteByParams }, requestOptions) {
|
|
1455
|
+
validateRequired("indexName", "deleteByWithHTTPInfo", indexName);
|
|
1456
|
+
validateRequired("deleteByParams", "deleteByWithHTTPInfo", deleteByParams);
|
|
1457
|
+
const requestPath = "/1/indexes/{indexName}/deleteByQuery".replace("{indexName}", encodeURIComponent(indexName));
|
|
1458
|
+
const headers = {};
|
|
1459
|
+
const queryParameters = {};
|
|
1460
|
+
const request = {
|
|
1461
|
+
method: "POST",
|
|
1462
|
+
path: requestPath,
|
|
1463
|
+
queryParameters,
|
|
1464
|
+
headers,
|
|
1465
|
+
data: deleteByParams
|
|
1466
|
+
};
|
|
1467
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1468
|
+
},
|
|
981
1469
|
/**
|
|
982
1470
|
* Deletes an index and all its settings. - Deleting an index doesn\'t delete its analytics data. - If you try to delete a non-existing index, the operation is ignored without warning. - If the index you want to delete has replica indices, the replicas become independent indices. - If the index you want to delete is a replica index, you must first unlink it from its primary index before you can delete it. For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas).
|
|
983
1471
|
*
|
|
@@ -1000,6 +1488,31 @@ function createSearchClient({
|
|
|
1000
1488
|
};
|
|
1001
1489
|
return transporter.request(request, requestOptions);
|
|
1002
1490
|
},
|
|
1491
|
+
/**
|
|
1492
|
+
* 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).
|
|
1493
|
+
*
|
|
1494
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1495
|
+
*
|
|
1496
|
+
* Required API Key ACLs:
|
|
1497
|
+
* - deleteIndex
|
|
1498
|
+
* @param deleteIndex - The deleteIndex object.
|
|
1499
|
+
* @param deleteIndex.indexName - Name of the index on which to perform the operation.
|
|
1500
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1501
|
+
* @see deleteIndex for the plain version.
|
|
1502
|
+
*/
|
|
1503
|
+
deleteIndexWithHTTPInfo({ indexName }, requestOptions) {
|
|
1504
|
+
validateRequired("indexName", "deleteIndexWithHTTPInfo", indexName);
|
|
1505
|
+
const requestPath = "/1/indexes/{indexName}".replace("{indexName}", encodeURIComponent(indexName));
|
|
1506
|
+
const headers = {};
|
|
1507
|
+
const queryParameters = {};
|
|
1508
|
+
const request = {
|
|
1509
|
+
method: "DELETE",
|
|
1510
|
+
path: requestPath,
|
|
1511
|
+
queryParameters,
|
|
1512
|
+
headers
|
|
1513
|
+
};
|
|
1514
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1515
|
+
},
|
|
1003
1516
|
/**
|
|
1004
1517
|
* Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch). To delete records matching a query, use the [`deleteBy` operation](https://www.algolia.com/doc/rest-api/search/delete-by).
|
|
1005
1518
|
*
|
|
@@ -1024,6 +1537,33 @@ function createSearchClient({
|
|
|
1024
1537
|
};
|
|
1025
1538
|
return transporter.request(request, requestOptions);
|
|
1026
1539
|
},
|
|
1540
|
+
/**
|
|
1541
|
+
* 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).
|
|
1542
|
+
*
|
|
1543
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1544
|
+
*
|
|
1545
|
+
* Required API Key ACLs:
|
|
1546
|
+
* - deleteObject
|
|
1547
|
+
* @param deleteObject - The deleteObject object.
|
|
1548
|
+
* @param deleteObject.indexName - Name of the index on which to perform the operation.
|
|
1549
|
+
* @param deleteObject.objectID - Unique record identifier.
|
|
1550
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1551
|
+
* @see deleteObject for the plain version.
|
|
1552
|
+
*/
|
|
1553
|
+
deleteObjectWithHTTPInfo({ indexName, objectID }, requestOptions) {
|
|
1554
|
+
validateRequired("indexName", "deleteObjectWithHTTPInfo", indexName);
|
|
1555
|
+
validateRequired("objectID", "deleteObjectWithHTTPInfo", objectID);
|
|
1556
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1557
|
+
const headers = {};
|
|
1558
|
+
const queryParameters = {};
|
|
1559
|
+
const request = {
|
|
1560
|
+
method: "DELETE",
|
|
1561
|
+
path: requestPath,
|
|
1562
|
+
queryParameters,
|
|
1563
|
+
headers
|
|
1564
|
+
};
|
|
1565
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1566
|
+
},
|
|
1027
1567
|
/**
|
|
1028
1568
|
* Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-rules).
|
|
1029
1569
|
*
|
|
@@ -1052,6 +1592,37 @@ function createSearchClient({
|
|
|
1052
1592
|
};
|
|
1053
1593
|
return transporter.request(request, requestOptions);
|
|
1054
1594
|
},
|
|
1595
|
+
/**
|
|
1596
|
+
* 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).
|
|
1597
|
+
*
|
|
1598
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1599
|
+
*
|
|
1600
|
+
* Required API Key ACLs:
|
|
1601
|
+
* - editSettings
|
|
1602
|
+
* @param deleteRule - The deleteRule object.
|
|
1603
|
+
* @param deleteRule.indexName - Name of the index on which to perform the operation.
|
|
1604
|
+
* @param deleteRule.objectID - Unique identifier of a rule object.
|
|
1605
|
+
* @param deleteRule.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1606
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1607
|
+
* @see deleteRule for the plain version.
|
|
1608
|
+
*/
|
|
1609
|
+
deleteRuleWithHTTPInfo({ indexName, objectID, forwardToReplicas }, requestOptions) {
|
|
1610
|
+
validateRequired("indexName", "deleteRuleWithHTTPInfo", indexName);
|
|
1611
|
+
validateRequired("objectID", "deleteRuleWithHTTPInfo", objectID);
|
|
1612
|
+
const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1613
|
+
const headers = {};
|
|
1614
|
+
const queryParameters = {};
|
|
1615
|
+
if (forwardToReplicas !== void 0) {
|
|
1616
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1617
|
+
}
|
|
1618
|
+
const request = {
|
|
1619
|
+
method: "DELETE",
|
|
1620
|
+
path: requestPath,
|
|
1621
|
+
queryParameters,
|
|
1622
|
+
headers
|
|
1623
|
+
};
|
|
1624
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1625
|
+
},
|
|
1055
1626
|
/**
|
|
1056
1627
|
* Deletes a source from the list of allowed sources.
|
|
1057
1628
|
*
|
|
@@ -1074,6 +1645,31 @@ function createSearchClient({
|
|
|
1074
1645
|
};
|
|
1075
1646
|
return transporter.request(request, requestOptions);
|
|
1076
1647
|
},
|
|
1648
|
+
/**
|
|
1649
|
+
* Deletes a source from the list of allowed sources.
|
|
1650
|
+
*
|
|
1651
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1652
|
+
*
|
|
1653
|
+
* Required API Key ACLs:
|
|
1654
|
+
* - admin
|
|
1655
|
+
* @param deleteSource - The deleteSource object.
|
|
1656
|
+
* @param deleteSource.source - IP address range of the source.
|
|
1657
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1658
|
+
* @see deleteSource for the plain version.
|
|
1659
|
+
*/
|
|
1660
|
+
deleteSourceWithHTTPInfo({ source }, requestOptions) {
|
|
1661
|
+
validateRequired("source", "deleteSourceWithHTTPInfo", source);
|
|
1662
|
+
const requestPath = "/1/security/sources/{source}".replace("{source}", encodeURIComponent(source));
|
|
1663
|
+
const headers = {};
|
|
1664
|
+
const queryParameters = {};
|
|
1665
|
+
const request = {
|
|
1666
|
+
method: "DELETE",
|
|
1667
|
+
path: requestPath,
|
|
1668
|
+
queryParameters,
|
|
1669
|
+
headers
|
|
1670
|
+
};
|
|
1671
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1672
|
+
},
|
|
1077
1673
|
/**
|
|
1078
1674
|
* Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-synonyms).
|
|
1079
1675
|
*
|
|
@@ -1103,13 +1699,44 @@ function createSearchClient({
|
|
|
1103
1699
|
return transporter.request(request, requestOptions);
|
|
1104
1700
|
},
|
|
1105
1701
|
/**
|
|
1106
|
-
*
|
|
1702
|
+
* 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).
|
|
1703
|
+
*
|
|
1704
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1107
1705
|
*
|
|
1108
1706
|
* Required API Key ACLs:
|
|
1109
|
-
* -
|
|
1110
|
-
* @param
|
|
1111
|
-
* @param
|
|
1112
|
-
* @param
|
|
1707
|
+
* - editSettings
|
|
1708
|
+
* @param deleteSynonym - The deleteSynonym object.
|
|
1709
|
+
* @param deleteSynonym.indexName - Name of the index on which to perform the operation.
|
|
1710
|
+
* @param deleteSynonym.objectID - Unique identifier of a synonym object.
|
|
1711
|
+
* @param deleteSynonym.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1712
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1713
|
+
* @see deleteSynonym for the plain version.
|
|
1714
|
+
*/
|
|
1715
|
+
deleteSynonymWithHTTPInfo({ indexName, objectID, forwardToReplicas }, requestOptions) {
|
|
1716
|
+
validateRequired("indexName", "deleteSynonymWithHTTPInfo", indexName);
|
|
1717
|
+
validateRequired("objectID", "deleteSynonymWithHTTPInfo", objectID);
|
|
1718
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1719
|
+
const headers = {};
|
|
1720
|
+
const queryParameters = {};
|
|
1721
|
+
if (forwardToReplicas !== void 0) {
|
|
1722
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1723
|
+
}
|
|
1724
|
+
const request = {
|
|
1725
|
+
method: "DELETE",
|
|
1726
|
+
path: requestPath,
|
|
1727
|
+
queryParameters,
|
|
1728
|
+
headers
|
|
1729
|
+
};
|
|
1730
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1731
|
+
},
|
|
1732
|
+
/**
|
|
1733
|
+
* 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>`.
|
|
1734
|
+
*
|
|
1735
|
+
* Required API Key ACLs:
|
|
1736
|
+
* - search
|
|
1737
|
+
* @param getApiKey - The getApiKey object.
|
|
1738
|
+
* @param getApiKey.key - API key.
|
|
1739
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1113
1740
|
*/
|
|
1114
1741
|
getApiKey({ key }, requestOptions) {
|
|
1115
1742
|
validateRequired("key", "getApiKey", key);
|
|
@@ -1124,6 +1751,31 @@ function createSearchClient({
|
|
|
1124
1751
|
};
|
|
1125
1752
|
return transporter.request(request, requestOptions);
|
|
1126
1753
|
},
|
|
1754
|
+
/**
|
|
1755
|
+
* 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>`.
|
|
1756
|
+
*
|
|
1757
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1758
|
+
*
|
|
1759
|
+
* Required API Key ACLs:
|
|
1760
|
+
* - search
|
|
1761
|
+
* @param getApiKey - The getApiKey object.
|
|
1762
|
+
* @param getApiKey.key - API key.
|
|
1763
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1764
|
+
* @see getApiKey for the plain version.
|
|
1765
|
+
*/
|
|
1766
|
+
getApiKeyWithHTTPInfo({ key }, requestOptions) {
|
|
1767
|
+
validateRequired("key", "getApiKeyWithHTTPInfo", key);
|
|
1768
|
+
const requestPath = "/1/keys/{key}".replace("{key}", encodeURIComponent(key));
|
|
1769
|
+
const headers = {};
|
|
1770
|
+
const queryParameters = {};
|
|
1771
|
+
const request = {
|
|
1772
|
+
method: "GET",
|
|
1773
|
+
path: requestPath,
|
|
1774
|
+
queryParameters,
|
|
1775
|
+
headers
|
|
1776
|
+
};
|
|
1777
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1778
|
+
},
|
|
1127
1779
|
/**
|
|
1128
1780
|
* Checks the status of a given application task.
|
|
1129
1781
|
*
|
|
@@ -1146,6 +1798,31 @@ function createSearchClient({
|
|
|
1146
1798
|
};
|
|
1147
1799
|
return transporter.request(request, requestOptions);
|
|
1148
1800
|
},
|
|
1801
|
+
/**
|
|
1802
|
+
* Checks the status of a given application task.
|
|
1803
|
+
*
|
|
1804
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1805
|
+
*
|
|
1806
|
+
* Required API Key ACLs:
|
|
1807
|
+
* - editSettings
|
|
1808
|
+
* @param getAppTask - The getAppTask object.
|
|
1809
|
+
* @param getAppTask.taskID - Unique task identifier.
|
|
1810
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1811
|
+
* @see getAppTask for the plain version.
|
|
1812
|
+
*/
|
|
1813
|
+
getAppTaskWithHTTPInfo({ taskID }, requestOptions) {
|
|
1814
|
+
validateRequired("taskID", "getAppTaskWithHTTPInfo", taskID);
|
|
1815
|
+
const requestPath = "/1/task/{taskID}".replace("{taskID}", encodeURIComponent(taskID));
|
|
1816
|
+
const headers = {};
|
|
1817
|
+
const queryParameters = {};
|
|
1818
|
+
const request = {
|
|
1819
|
+
method: "GET",
|
|
1820
|
+
path: requestPath,
|
|
1821
|
+
queryParameters,
|
|
1822
|
+
headers
|
|
1823
|
+
};
|
|
1824
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1825
|
+
},
|
|
1149
1826
|
/**
|
|
1150
1827
|
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
1151
1828
|
*
|
|
@@ -1165,6 +1842,28 @@ function createSearchClient({
|
|
|
1165
1842
|
};
|
|
1166
1843
|
return transporter.request(request, requestOptions);
|
|
1167
1844
|
},
|
|
1845
|
+
/**
|
|
1846
|
+
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
1847
|
+
*
|
|
1848
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1849
|
+
*
|
|
1850
|
+
* Required API Key ACLs:
|
|
1851
|
+
* - settings
|
|
1852
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1853
|
+
* @see getDictionaryLanguages for the plain version.
|
|
1854
|
+
*/
|
|
1855
|
+
getDictionaryLanguagesWithHTTPInfo(requestOptions) {
|
|
1856
|
+
const requestPath = "/1/dictionaries/*/languages";
|
|
1857
|
+
const headers = {};
|
|
1858
|
+
const queryParameters = {};
|
|
1859
|
+
const request = {
|
|
1860
|
+
method: "GET",
|
|
1861
|
+
path: requestPath,
|
|
1862
|
+
queryParameters,
|
|
1863
|
+
headers
|
|
1864
|
+
};
|
|
1865
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1866
|
+
},
|
|
1168
1867
|
/**
|
|
1169
1868
|
* Retrieves the languages for which standard dictionary entries are turned off.
|
|
1170
1869
|
*
|
|
@@ -1184,6 +1883,28 @@ function createSearchClient({
|
|
|
1184
1883
|
};
|
|
1185
1884
|
return transporter.request(request, requestOptions);
|
|
1186
1885
|
},
|
|
1886
|
+
/**
|
|
1887
|
+
* Retrieves the languages for which standard dictionary entries are turned off.
|
|
1888
|
+
*
|
|
1889
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1890
|
+
*
|
|
1891
|
+
* Required API Key ACLs:
|
|
1892
|
+
* - settings
|
|
1893
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1894
|
+
* @see getDictionarySettings for the plain version.
|
|
1895
|
+
*/
|
|
1896
|
+
getDictionarySettingsWithHTTPInfo(requestOptions) {
|
|
1897
|
+
const requestPath = "/1/dictionaries/*/settings";
|
|
1898
|
+
const headers = {};
|
|
1899
|
+
const queryParameters = {};
|
|
1900
|
+
const request = {
|
|
1901
|
+
method: "GET",
|
|
1902
|
+
path: requestPath,
|
|
1903
|
+
queryParameters,
|
|
1904
|
+
headers
|
|
1905
|
+
};
|
|
1906
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1907
|
+
},
|
|
1187
1908
|
/**
|
|
1188
1909
|
* The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last seven days. - Up to 1,000 API requests per server are logged. - This request counts towards your [operations quota](https://support.algolia.com/hc/articles/17245378392977-How-does-Algolia-count-records-and-operations) but doesn\'t appear in the logs itself.
|
|
1189
1910
|
*
|
|
@@ -1220,6 +1941,45 @@ function createSearchClient({
|
|
|
1220
1941
|
};
|
|
1221
1942
|
return transporter.request(request, requestOptions);
|
|
1222
1943
|
},
|
|
1944
|
+
/**
|
|
1945
|
+
* The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last seven days. - Up to 1,000 API requests per server are logged. - This request counts towards your [operations quota](https://support.algolia.com/hc/articles/17245378392977-How-does-Algolia-count-records-and-operations) but doesn\'t appear in the logs itself.
|
|
1946
|
+
*
|
|
1947
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1948
|
+
*
|
|
1949
|
+
* Required API Key ACLs:
|
|
1950
|
+
* - logs
|
|
1951
|
+
* @param getLogs - The getLogs object.
|
|
1952
|
+
* @param getLogs.offset - First log entry to retrieve. The most recent entries are listed first.
|
|
1953
|
+
* @param getLogs.length - Maximum number of entries to retrieve.
|
|
1954
|
+
* @param getLogs.indexName - Index for which to retrieve log entries. By default, log entries are retrieved for all indices.
|
|
1955
|
+
* @param getLogs.type - Type of log entries to retrieve. By default, all log entries are retrieved.
|
|
1956
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1957
|
+
* @see getLogs for the plain version.
|
|
1958
|
+
*/
|
|
1959
|
+
getLogsWithHTTPInfo({ offset, length, indexName, type } = {}, requestOptions = void 0) {
|
|
1960
|
+
const requestPath = "/1/logs";
|
|
1961
|
+
const headers = {};
|
|
1962
|
+
const queryParameters = {};
|
|
1963
|
+
if (offset !== void 0) {
|
|
1964
|
+
queryParameters["offset"] = offset.toString();
|
|
1965
|
+
}
|
|
1966
|
+
if (length !== void 0) {
|
|
1967
|
+
queryParameters["length"] = length.toString();
|
|
1968
|
+
}
|
|
1969
|
+
if (indexName !== void 0) {
|
|
1970
|
+
queryParameters["indexName"] = indexName.toString();
|
|
1971
|
+
}
|
|
1972
|
+
if (type !== void 0) {
|
|
1973
|
+
queryParameters["type"] = type.toString();
|
|
1974
|
+
}
|
|
1975
|
+
const request = {
|
|
1976
|
+
method: "GET",
|
|
1977
|
+
path: requestPath,
|
|
1978
|
+
queryParameters,
|
|
1979
|
+
headers
|
|
1980
|
+
};
|
|
1981
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1982
|
+
},
|
|
1223
1983
|
/**
|
|
1224
1984
|
* Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](https://www.algolia.com/doc/rest-api/search/get-objects).
|
|
1225
1985
|
*
|
|
@@ -1248,6 +2008,37 @@ function createSearchClient({
|
|
|
1248
2008
|
};
|
|
1249
2009
|
return transporter.request(request, requestOptions);
|
|
1250
2010
|
},
|
|
2011
|
+
/**
|
|
2012
|
+
* 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).
|
|
2013
|
+
*
|
|
2014
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2015
|
+
*
|
|
2016
|
+
* Required API Key ACLs:
|
|
2017
|
+
* - search
|
|
2018
|
+
* @param getObject - The getObject object.
|
|
2019
|
+
* @param getObject.indexName - Name of the index on which to perform the operation.
|
|
2020
|
+
* @param getObject.objectID - Unique record identifier.
|
|
2021
|
+
* @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.
|
|
2022
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2023
|
+
* @see getObject for the plain version.
|
|
2024
|
+
*/
|
|
2025
|
+
getObjectWithHTTPInfo({ indexName, objectID, attributesToRetrieve }, requestOptions) {
|
|
2026
|
+
validateRequired("indexName", "getObjectWithHTTPInfo", indexName);
|
|
2027
|
+
validateRequired("objectID", "getObjectWithHTTPInfo", objectID);
|
|
2028
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2029
|
+
const headers = {};
|
|
2030
|
+
const queryParameters = {};
|
|
2031
|
+
if (attributesToRetrieve !== void 0) {
|
|
2032
|
+
queryParameters["attributesToRetrieve"] = attributesToRetrieve.toString();
|
|
2033
|
+
}
|
|
2034
|
+
const request = {
|
|
2035
|
+
method: "GET",
|
|
2036
|
+
path: requestPath,
|
|
2037
|
+
queryParameters,
|
|
2038
|
+
headers
|
|
2039
|
+
};
|
|
2040
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2041
|
+
},
|
|
1251
2042
|
/**
|
|
1252
2043
|
* Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
|
|
1253
2044
|
*
|
|
@@ -1273,20 +2064,246 @@ function createSearchClient({
|
|
|
1273
2064
|
};
|
|
1274
2065
|
return transporter.request(request, requestOptions);
|
|
1275
2066
|
},
|
|
2067
|
+
/**
|
|
2068
|
+
* Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
|
|
2069
|
+
*
|
|
2070
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2071
|
+
*
|
|
2072
|
+
* Required API Key ACLs:
|
|
2073
|
+
* - search
|
|
2074
|
+
* @param getObjectsParams - Request object.
|
|
2075
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2076
|
+
* @see getObjects for the plain version.
|
|
2077
|
+
*/
|
|
2078
|
+
getObjectsWithHTTPInfo(getObjectsParams, requestOptions) {
|
|
2079
|
+
validateRequired("getObjectsParams", "getObjectsWithHTTPInfo", getObjectsParams);
|
|
2080
|
+
validateRequired("getObjectsParams.requests", "getObjectsWithHTTPInfo", getObjectsParams.requests);
|
|
2081
|
+
const requestPath = "/1/indexes/*/objects";
|
|
2082
|
+
const headers = {};
|
|
2083
|
+
const queryParameters = {};
|
|
2084
|
+
const request = {
|
|
2085
|
+
method: "POST",
|
|
2086
|
+
path: requestPath,
|
|
2087
|
+
queryParameters,
|
|
2088
|
+
headers,
|
|
2089
|
+
data: getObjectsParams,
|
|
2090
|
+
useReadTransporter: true,
|
|
2091
|
+
cacheable: true
|
|
2092
|
+
};
|
|
2093
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2094
|
+
},
|
|
2095
|
+
/**
|
|
2096
|
+
* 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).
|
|
2097
|
+
*
|
|
2098
|
+
* Required API Key ACLs:
|
|
2099
|
+
* - settings
|
|
2100
|
+
* @param getRule - The getRule object.
|
|
2101
|
+
* @param getRule.indexName - Name of the index on which to perform the operation.
|
|
2102
|
+
* @param getRule.objectID - Unique identifier of a rule object.
|
|
2103
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2104
|
+
*/
|
|
2105
|
+
getRule({ indexName, objectID }, requestOptions) {
|
|
2106
|
+
validateRequired("indexName", "getRule", indexName);
|
|
2107
|
+
validateRequired("objectID", "getRule", objectID);
|
|
2108
|
+
const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2109
|
+
const headers = {};
|
|
2110
|
+
const queryParameters = {};
|
|
2111
|
+
const request = {
|
|
2112
|
+
method: "GET",
|
|
2113
|
+
path: requestPath,
|
|
2114
|
+
queryParameters,
|
|
2115
|
+
headers
|
|
2116
|
+
};
|
|
2117
|
+
return transporter.request(request, requestOptions);
|
|
2118
|
+
},
|
|
1276
2119
|
/**
|
|
1277
2120
|
* Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-rules).
|
|
1278
2121
|
*
|
|
2122
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2123
|
+
*
|
|
1279
2124
|
* Required API Key ACLs:
|
|
1280
2125
|
* - settings
|
|
1281
2126
|
* @param getRule - The getRule object.
|
|
1282
2127
|
* @param getRule.indexName - Name of the index on which to perform the operation.
|
|
1283
2128
|
* @param getRule.objectID - Unique identifier of a rule object.
|
|
1284
2129
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2130
|
+
* @see getRule for the plain version.
|
|
2131
|
+
*/
|
|
2132
|
+
getRuleWithHTTPInfo({ indexName, objectID }, requestOptions) {
|
|
2133
|
+
validateRequired("indexName", "getRuleWithHTTPInfo", indexName);
|
|
2134
|
+
validateRequired("objectID", "getRuleWithHTTPInfo", objectID);
|
|
2135
|
+
const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2136
|
+
const headers = {};
|
|
2137
|
+
const queryParameters = {};
|
|
2138
|
+
const request = {
|
|
2139
|
+
method: "GET",
|
|
2140
|
+
path: requestPath,
|
|
2141
|
+
queryParameters,
|
|
2142
|
+
headers
|
|
2143
|
+
};
|
|
2144
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2145
|
+
},
|
|
2146
|
+
/**
|
|
2147
|
+
* Retrieves an object with non-null index settings.
|
|
2148
|
+
*
|
|
2149
|
+
* Required API Key ACLs:
|
|
2150
|
+
* - settings
|
|
2151
|
+
* @param getSettings - The getSettings object.
|
|
2152
|
+
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
2153
|
+
* @param getSettings.getVersion - When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.
|
|
2154
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2155
|
+
*/
|
|
2156
|
+
getSettings({ indexName, getVersion }, requestOptions) {
|
|
2157
|
+
validateRequired("indexName", "getSettings", indexName);
|
|
2158
|
+
const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
|
|
2159
|
+
const headers = {};
|
|
2160
|
+
const queryParameters = {};
|
|
2161
|
+
if (getVersion !== void 0) {
|
|
2162
|
+
queryParameters["getVersion"] = getVersion.toString();
|
|
2163
|
+
}
|
|
2164
|
+
const request = {
|
|
2165
|
+
method: "GET",
|
|
2166
|
+
path: requestPath,
|
|
2167
|
+
queryParameters,
|
|
2168
|
+
headers
|
|
2169
|
+
};
|
|
2170
|
+
return transporter.request(request, requestOptions);
|
|
2171
|
+
},
|
|
2172
|
+
/**
|
|
2173
|
+
* Retrieves an object with non-null index settings.
|
|
2174
|
+
*
|
|
2175
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2176
|
+
*
|
|
2177
|
+
* Required API Key ACLs:
|
|
2178
|
+
* - settings
|
|
2179
|
+
* @param getSettings - The getSettings object.
|
|
2180
|
+
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
2181
|
+
* @param getSettings.getVersion - When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.
|
|
2182
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2183
|
+
* @see getSettings for the plain version.
|
|
2184
|
+
*/
|
|
2185
|
+
getSettingsWithHTTPInfo({ indexName, getVersion }, requestOptions) {
|
|
2186
|
+
validateRequired("indexName", "getSettingsWithHTTPInfo", indexName);
|
|
2187
|
+
const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
|
|
2188
|
+
const headers = {};
|
|
2189
|
+
const queryParameters = {};
|
|
2190
|
+
if (getVersion !== void 0) {
|
|
2191
|
+
queryParameters["getVersion"] = getVersion.toString();
|
|
2192
|
+
}
|
|
2193
|
+
const request = {
|
|
2194
|
+
method: "GET",
|
|
2195
|
+
path: requestPath,
|
|
2196
|
+
queryParameters,
|
|
2197
|
+
headers
|
|
2198
|
+
};
|
|
2199
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2200
|
+
},
|
|
2201
|
+
/**
|
|
2202
|
+
* Retrieves all allowed IP addresses with access to your application.
|
|
2203
|
+
*
|
|
2204
|
+
* Required API Key ACLs:
|
|
2205
|
+
* - admin
|
|
2206
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2207
|
+
*/
|
|
2208
|
+
getSources(requestOptions) {
|
|
2209
|
+
const requestPath = "/1/security/sources";
|
|
2210
|
+
const headers = {};
|
|
2211
|
+
const queryParameters = {};
|
|
2212
|
+
const request = {
|
|
2213
|
+
method: "GET",
|
|
2214
|
+
path: requestPath,
|
|
2215
|
+
queryParameters,
|
|
2216
|
+
headers
|
|
2217
|
+
};
|
|
2218
|
+
return transporter.request(request, requestOptions);
|
|
2219
|
+
},
|
|
2220
|
+
/**
|
|
2221
|
+
* Retrieves all allowed IP addresses with access to your application.
|
|
2222
|
+
*
|
|
2223
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2224
|
+
*
|
|
2225
|
+
* Required API Key ACLs:
|
|
2226
|
+
* - admin
|
|
2227
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2228
|
+
* @see getSources for the plain version.
|
|
2229
|
+
*/
|
|
2230
|
+
getSourcesWithHTTPInfo(requestOptions) {
|
|
2231
|
+
const requestPath = "/1/security/sources";
|
|
2232
|
+
const headers = {};
|
|
2233
|
+
const queryParameters = {};
|
|
2234
|
+
const request = {
|
|
2235
|
+
method: "GET",
|
|
2236
|
+
path: requestPath,
|
|
2237
|
+
queryParameters,
|
|
2238
|
+
headers
|
|
2239
|
+
};
|
|
2240
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2241
|
+
},
|
|
2242
|
+
/**
|
|
2243
|
+
* 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).
|
|
2244
|
+
*
|
|
2245
|
+
* Required API Key ACLs:
|
|
2246
|
+
* - settings
|
|
2247
|
+
* @param getSynonym - The getSynonym object.
|
|
2248
|
+
* @param getSynonym.indexName - Name of the index on which to perform the operation.
|
|
2249
|
+
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
2250
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2251
|
+
*/
|
|
2252
|
+
getSynonym({ indexName, objectID }, requestOptions) {
|
|
2253
|
+
validateRequired("indexName", "getSynonym", indexName);
|
|
2254
|
+
validateRequired("objectID", "getSynonym", objectID);
|
|
2255
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2256
|
+
const headers = {};
|
|
2257
|
+
const queryParameters = {};
|
|
2258
|
+
const request = {
|
|
2259
|
+
method: "GET",
|
|
2260
|
+
path: requestPath,
|
|
2261
|
+
queryParameters,
|
|
2262
|
+
headers
|
|
2263
|
+
};
|
|
2264
|
+
return transporter.request(request, requestOptions);
|
|
2265
|
+
},
|
|
2266
|
+
/**
|
|
2267
|
+
* 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).
|
|
2268
|
+
*
|
|
2269
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2270
|
+
*
|
|
2271
|
+
* Required API Key ACLs:
|
|
2272
|
+
* - settings
|
|
2273
|
+
* @param getSynonym - The getSynonym object.
|
|
2274
|
+
* @param getSynonym.indexName - Name of the index on which to perform the operation.
|
|
2275
|
+
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
2276
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2277
|
+
* @see getSynonym for the plain version.
|
|
2278
|
+
*/
|
|
2279
|
+
getSynonymWithHTTPInfo({ indexName, objectID }, requestOptions) {
|
|
2280
|
+
validateRequired("indexName", "getSynonymWithHTTPInfo", indexName);
|
|
2281
|
+
validateRequired("objectID", "getSynonymWithHTTPInfo", objectID);
|
|
2282
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2283
|
+
const headers = {};
|
|
2284
|
+
const queryParameters = {};
|
|
2285
|
+
const request = {
|
|
2286
|
+
method: "GET",
|
|
2287
|
+
path: requestPath,
|
|
2288
|
+
queryParameters,
|
|
2289
|
+
headers
|
|
2290
|
+
};
|
|
2291
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2292
|
+
},
|
|
2293
|
+
/**
|
|
2294
|
+
* 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.
|
|
2295
|
+
*
|
|
2296
|
+
* Required API Key ACLs:
|
|
2297
|
+
* - addObject
|
|
2298
|
+
* @param getTask - The getTask object.
|
|
2299
|
+
* @param getTask.indexName - Name of the index on which to perform the operation.
|
|
2300
|
+
* @param getTask.taskID - Unique task identifier.
|
|
2301
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1285
2302
|
*/
|
|
1286
|
-
|
|
1287
|
-
validateRequired("indexName", "
|
|
1288
|
-
validateRequired("
|
|
1289
|
-
const requestPath = "/1/indexes/{indexName}/
|
|
2303
|
+
getTask({ indexName, taskID }, requestOptions) {
|
|
2304
|
+
validateRequired("indexName", "getTask", indexName);
|
|
2305
|
+
validateRequired("taskID", "getTask", taskID);
|
|
2306
|
+
const requestPath = "/1/indexes/{indexName}/task/{taskID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{taskID}", encodeURIComponent(taskID));
|
|
1290
2307
|
const headers = {};
|
|
1291
2308
|
const queryParameters = {};
|
|
1292
2309
|
const request = {
|
|
@@ -1298,40 +2315,43 @@ function createSearchClient({
|
|
|
1298
2315
|
return transporter.request(request, requestOptions);
|
|
1299
2316
|
},
|
|
1300
2317
|
/**
|
|
1301
|
-
*
|
|
2318
|
+
* 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.
|
|
2319
|
+
*
|
|
2320
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1302
2321
|
*
|
|
1303
2322
|
* Required API Key ACLs:
|
|
1304
|
-
* -
|
|
1305
|
-
* @param
|
|
1306
|
-
* @param
|
|
1307
|
-
* @param
|
|
2323
|
+
* - addObject
|
|
2324
|
+
* @param getTask - The getTask object.
|
|
2325
|
+
* @param getTask.indexName - Name of the index on which to perform the operation.
|
|
2326
|
+
* @param getTask.taskID - Unique task identifier.
|
|
1308
2327
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2328
|
+
* @see getTask for the plain version.
|
|
1309
2329
|
*/
|
|
1310
|
-
|
|
1311
|
-
validateRequired("indexName", "
|
|
1312
|
-
|
|
2330
|
+
getTaskWithHTTPInfo({ indexName, taskID }, requestOptions) {
|
|
2331
|
+
validateRequired("indexName", "getTaskWithHTTPInfo", indexName);
|
|
2332
|
+
validateRequired("taskID", "getTaskWithHTTPInfo", taskID);
|
|
2333
|
+
const requestPath = "/1/indexes/{indexName}/task/{taskID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{taskID}", encodeURIComponent(taskID));
|
|
1313
2334
|
const headers = {};
|
|
1314
2335
|
const queryParameters = {};
|
|
1315
|
-
if (getVersion !== void 0) {
|
|
1316
|
-
queryParameters["getVersion"] = getVersion.toString();
|
|
1317
|
-
}
|
|
1318
2336
|
const request = {
|
|
1319
2337
|
method: "GET",
|
|
1320
2338
|
path: requestPath,
|
|
1321
2339
|
queryParameters,
|
|
1322
2340
|
headers
|
|
1323
2341
|
};
|
|
1324
|
-
return transporter.
|
|
2342
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1325
2343
|
},
|
|
1326
2344
|
/**
|
|
1327
|
-
*
|
|
2345
|
+
* 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.
|
|
1328
2346
|
*
|
|
1329
2347
|
* Required API Key ACLs:
|
|
1330
2348
|
* - admin
|
|
2349
|
+
*
|
|
2350
|
+
* @deprecated
|
|
1331
2351
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1332
2352
|
*/
|
|
1333
|
-
|
|
1334
|
-
const requestPath = "/1/
|
|
2353
|
+
getTopUserIds(requestOptions) {
|
|
2354
|
+
const requestPath = "/1/clusters/mapping/top";
|
|
1335
2355
|
const headers = {};
|
|
1336
2356
|
const queryParameters = {};
|
|
1337
2357
|
const request = {
|
|
@@ -1343,19 +2363,19 @@ function createSearchClient({
|
|
|
1343
2363
|
return transporter.request(request, requestOptions);
|
|
1344
2364
|
},
|
|
1345
2365
|
/**
|
|
1346
|
-
*
|
|
2366
|
+
* 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.
|
|
2367
|
+
*
|
|
2368
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1347
2369
|
*
|
|
1348
2370
|
* Required API Key ACLs:
|
|
1349
|
-
* -
|
|
1350
|
-
*
|
|
1351
|
-
* @
|
|
1352
|
-
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
2371
|
+
* - admin
|
|
2372
|
+
*
|
|
2373
|
+
* @deprecated
|
|
1353
2374
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2375
|
+
* @see getTopUserIds for the plain version.
|
|
1354
2376
|
*/
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
validateRequired("objectID", "getSynonym", objectID);
|
|
1358
|
-
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2377
|
+
getTopUserIdsWithHTTPInfo(requestOptions) {
|
|
2378
|
+
const requestPath = "/1/clusters/mapping/top";
|
|
1359
2379
|
const headers = {};
|
|
1360
2380
|
const queryParameters = {};
|
|
1361
2381
|
const request = {
|
|
@@ -1364,22 +2384,22 @@ function createSearchClient({
|
|
|
1364
2384
|
queryParameters,
|
|
1365
2385
|
headers
|
|
1366
2386
|
};
|
|
1367
|
-
return transporter.
|
|
2387
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1368
2388
|
},
|
|
1369
2389
|
/**
|
|
1370
|
-
*
|
|
2390
|
+
* 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.
|
|
1371
2391
|
*
|
|
1372
2392
|
* Required API Key ACLs:
|
|
1373
|
-
* -
|
|
1374
|
-
*
|
|
1375
|
-
* @
|
|
1376
|
-
* @param
|
|
2393
|
+
* - admin
|
|
2394
|
+
*
|
|
2395
|
+
* @deprecated
|
|
2396
|
+
* @param getUserId - The getUserId object.
|
|
2397
|
+
* @param getUserId.userID - Unique identifier of the user who makes the search request.
|
|
1377
2398
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1378
2399
|
*/
|
|
1379
|
-
|
|
1380
|
-
validateRequired("
|
|
1381
|
-
|
|
1382
|
-
const requestPath = "/1/indexes/{indexName}/task/{taskID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{taskID}", encodeURIComponent(taskID));
|
|
2400
|
+
getUserId({ userID }, requestOptions) {
|
|
2401
|
+
validateRequired("userID", "getUserId", userID);
|
|
2402
|
+
const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
|
|
1383
2403
|
const headers = {};
|
|
1384
2404
|
const queryParameters = {};
|
|
1385
2405
|
const request = {
|
|
@@ -1391,16 +2411,22 @@ function createSearchClient({
|
|
|
1391
2411
|
return transporter.request(request, requestOptions);
|
|
1392
2412
|
},
|
|
1393
2413
|
/**
|
|
1394
|
-
*
|
|
2414
|
+
* 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.
|
|
2415
|
+
*
|
|
2416
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
1395
2417
|
*
|
|
1396
2418
|
* Required API Key ACLs:
|
|
1397
2419
|
* - admin
|
|
1398
2420
|
*
|
|
1399
2421
|
* @deprecated
|
|
2422
|
+
* @param getUserId - The getUserId object.
|
|
2423
|
+
* @param getUserId.userID - Unique identifier of the user who makes the search request.
|
|
1400
2424
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2425
|
+
* @see getUserId for the plain version.
|
|
1401
2426
|
*/
|
|
1402
|
-
|
|
1403
|
-
|
|
2427
|
+
getUserIdWithHTTPInfo({ userID }, requestOptions) {
|
|
2428
|
+
validateRequired("userID", "getUserIdWithHTTPInfo", userID);
|
|
2429
|
+
const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
|
|
1404
2430
|
const headers = {};
|
|
1405
2431
|
const queryParameters = {};
|
|
1406
2432
|
const request = {
|
|
@@ -1409,24 +2435,26 @@ function createSearchClient({
|
|
|
1409
2435
|
queryParameters,
|
|
1410
2436
|
headers
|
|
1411
2437
|
};
|
|
1412
|
-
return transporter.
|
|
2438
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1413
2439
|
},
|
|
1414
2440
|
/**
|
|
1415
|
-
*
|
|
2441
|
+
* 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.
|
|
1416
2442
|
*
|
|
1417
2443
|
* Required API Key ACLs:
|
|
1418
2444
|
* - admin
|
|
1419
2445
|
*
|
|
1420
2446
|
* @deprecated
|
|
1421
|
-
* @param
|
|
1422
|
-
* @param
|
|
2447
|
+
* @param hasPendingMappings - The hasPendingMappings object.
|
|
2448
|
+
* @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
|
|
1423
2449
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1424
2450
|
*/
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
|
|
2451
|
+
hasPendingMappings({ getClusters } = {}, requestOptions = void 0) {
|
|
2452
|
+
const requestPath = "/1/clusters/mapping/pending";
|
|
1428
2453
|
const headers = {};
|
|
1429
2454
|
const queryParameters = {};
|
|
2455
|
+
if (getClusters !== void 0) {
|
|
2456
|
+
queryParameters["getClusters"] = getClusters.toString();
|
|
2457
|
+
}
|
|
1430
2458
|
const request = {
|
|
1431
2459
|
method: "GET",
|
|
1432
2460
|
path: requestPath,
|
|
@@ -1438,6 +2466,8 @@ function createSearchClient({
|
|
|
1438
2466
|
/**
|
|
1439
2467
|
* To determine when the time-consuming process of creating a large batch of users or migrating users from one cluster to another is complete, this operation retrieves the status of the process.
|
|
1440
2468
|
*
|
|
2469
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2470
|
+
*
|
|
1441
2471
|
* Required API Key ACLs:
|
|
1442
2472
|
* - admin
|
|
1443
2473
|
*
|
|
@@ -1445,8 +2475,9 @@ function createSearchClient({
|
|
|
1445
2475
|
* @param hasPendingMappings - The hasPendingMappings object.
|
|
1446
2476
|
* @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
|
|
1447
2477
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2478
|
+
* @see hasPendingMappings for the plain version.
|
|
1448
2479
|
*/
|
|
1449
|
-
|
|
2480
|
+
hasPendingMappingsWithHTTPInfo({ getClusters } = {}, requestOptions = void 0) {
|
|
1450
2481
|
const requestPath = "/1/clusters/mapping/pending";
|
|
1451
2482
|
const headers = {};
|
|
1452
2483
|
const queryParameters = {};
|
|
@@ -1459,7 +2490,7 @@ function createSearchClient({
|
|
|
1459
2490
|
queryParameters,
|
|
1460
2491
|
headers
|
|
1461
2492
|
};
|
|
1462
|
-
return transporter.
|
|
2493
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1463
2494
|
},
|
|
1464
2495
|
/**
|
|
1465
2496
|
* Lists all API keys associated with your Algolia application, including their permissions and restrictions.
|
|
@@ -1480,6 +2511,28 @@ function createSearchClient({
|
|
|
1480
2511
|
};
|
|
1481
2512
|
return transporter.request(request, requestOptions);
|
|
1482
2513
|
},
|
|
2514
|
+
/**
|
|
2515
|
+
* Lists all API keys associated with your Algolia application, including their permissions and restrictions.
|
|
2516
|
+
*
|
|
2517
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2518
|
+
*
|
|
2519
|
+
* Required API Key ACLs:
|
|
2520
|
+
* - admin
|
|
2521
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2522
|
+
* @see listApiKeys for the plain version.
|
|
2523
|
+
*/
|
|
2524
|
+
listApiKeysWithHTTPInfo(requestOptions) {
|
|
2525
|
+
const requestPath = "/1/keys";
|
|
2526
|
+
const headers = {};
|
|
2527
|
+
const queryParameters = {};
|
|
2528
|
+
const request = {
|
|
2529
|
+
method: "GET",
|
|
2530
|
+
path: requestPath,
|
|
2531
|
+
queryParameters,
|
|
2532
|
+
headers
|
|
2533
|
+
};
|
|
2534
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2535
|
+
},
|
|
1483
2536
|
/**
|
|
1484
2537
|
* Lists the available clusters in a multi-cluster setup.
|
|
1485
2538
|
*
|
|
@@ -1501,6 +2554,30 @@ function createSearchClient({
|
|
|
1501
2554
|
};
|
|
1502
2555
|
return transporter.request(request, requestOptions);
|
|
1503
2556
|
},
|
|
2557
|
+
/**
|
|
2558
|
+
* Lists the available clusters in a multi-cluster setup.
|
|
2559
|
+
*
|
|
2560
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2561
|
+
*
|
|
2562
|
+
* Required API Key ACLs:
|
|
2563
|
+
* - admin
|
|
2564
|
+
*
|
|
2565
|
+
* @deprecated
|
|
2566
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2567
|
+
* @see listClusters for the plain version.
|
|
2568
|
+
*/
|
|
2569
|
+
listClustersWithHTTPInfo(requestOptions) {
|
|
2570
|
+
const requestPath = "/1/clusters";
|
|
2571
|
+
const headers = {};
|
|
2572
|
+
const queryParameters = {};
|
|
2573
|
+
const request = {
|
|
2574
|
+
method: "GET",
|
|
2575
|
+
path: requestPath,
|
|
2576
|
+
queryParameters,
|
|
2577
|
+
headers
|
|
2578
|
+
};
|
|
2579
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2580
|
+
},
|
|
1504
2581
|
/**
|
|
1505
2582
|
* Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
|
|
1506
2583
|
*
|
|
@@ -1529,6 +2606,37 @@ function createSearchClient({
|
|
|
1529
2606
|
};
|
|
1530
2607
|
return transporter.request(request, requestOptions);
|
|
1531
2608
|
},
|
|
2609
|
+
/**
|
|
2610
|
+
* Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
|
|
2611
|
+
*
|
|
2612
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2613
|
+
*
|
|
2614
|
+
* Required API Key ACLs:
|
|
2615
|
+
* - listIndexes
|
|
2616
|
+
* @param listIndices - The listIndices object.
|
|
2617
|
+
* @param listIndices.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
2618
|
+
* @param listIndices.hitsPerPage - Number of hits per page.
|
|
2619
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2620
|
+
* @see listIndices for the plain version.
|
|
2621
|
+
*/
|
|
2622
|
+
listIndicesWithHTTPInfo({ page, hitsPerPage } = {}, requestOptions = void 0) {
|
|
2623
|
+
const requestPath = "/1/indexes";
|
|
2624
|
+
const headers = {};
|
|
2625
|
+
const queryParameters = {};
|
|
2626
|
+
if (page !== void 0) {
|
|
2627
|
+
queryParameters["page"] = page.toString();
|
|
2628
|
+
}
|
|
2629
|
+
if (hitsPerPage !== void 0) {
|
|
2630
|
+
queryParameters["hitsPerPage"] = hitsPerPage.toString();
|
|
2631
|
+
}
|
|
2632
|
+
const request = {
|
|
2633
|
+
method: "GET",
|
|
2634
|
+
path: requestPath,
|
|
2635
|
+
queryParameters,
|
|
2636
|
+
headers
|
|
2637
|
+
};
|
|
2638
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2639
|
+
},
|
|
1532
2640
|
/**
|
|
1533
2641
|
* Lists the userIDs assigned to a multi-cluster application. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time.
|
|
1534
2642
|
*
|
|
@@ -1559,6 +2667,39 @@ function createSearchClient({
|
|
|
1559
2667
|
};
|
|
1560
2668
|
return transporter.request(request, requestOptions);
|
|
1561
2669
|
},
|
|
2670
|
+
/**
|
|
2671
|
+
* 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.
|
|
2672
|
+
*
|
|
2673
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2674
|
+
*
|
|
2675
|
+
* Required API Key ACLs:
|
|
2676
|
+
* - admin
|
|
2677
|
+
*
|
|
2678
|
+
* @deprecated
|
|
2679
|
+
* @param listUserIds - The listUserIds object.
|
|
2680
|
+
* @param listUserIds.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
2681
|
+
* @param listUserIds.hitsPerPage - Number of hits per page.
|
|
2682
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2683
|
+
* @see listUserIds for the plain version.
|
|
2684
|
+
*/
|
|
2685
|
+
listUserIdsWithHTTPInfo({ page, hitsPerPage } = {}, requestOptions = void 0) {
|
|
2686
|
+
const requestPath = "/1/clusters/mapping";
|
|
2687
|
+
const headers = {};
|
|
2688
|
+
const queryParameters = {};
|
|
2689
|
+
if (page !== void 0) {
|
|
2690
|
+
queryParameters["page"] = page.toString();
|
|
2691
|
+
}
|
|
2692
|
+
if (hitsPerPage !== void 0) {
|
|
2693
|
+
queryParameters["hitsPerPage"] = hitsPerPage.toString();
|
|
2694
|
+
}
|
|
2695
|
+
const request = {
|
|
2696
|
+
method: "GET",
|
|
2697
|
+
path: requestPath,
|
|
2698
|
+
queryParameters,
|
|
2699
|
+
headers
|
|
2700
|
+
};
|
|
2701
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2702
|
+
},
|
|
1562
2703
|
/**
|
|
1563
2704
|
* Adds, updates, or deletes records in multiple indices with a single API request. - Actions are applied in the order they are specified. - Actions are equivalent to the individual API requests of the same name. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
1564
2705
|
*
|
|
@@ -1582,6 +2723,32 @@ function createSearchClient({
|
|
|
1582
2723
|
};
|
|
1583
2724
|
return transporter.request(request, requestOptions);
|
|
1584
2725
|
},
|
|
2726
|
+
/**
|
|
2727
|
+
* 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).
|
|
2728
|
+
*
|
|
2729
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2730
|
+
*
|
|
2731
|
+
* Required API Key ACLs:
|
|
2732
|
+
* - addObject
|
|
2733
|
+
* @param batchParams - The batchParams object.
|
|
2734
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2735
|
+
* @see multipleBatch for the plain version.
|
|
2736
|
+
*/
|
|
2737
|
+
multipleBatchWithHTTPInfo(batchParams, requestOptions) {
|
|
2738
|
+
validateRequired("batchParams", "multipleBatchWithHTTPInfo", batchParams);
|
|
2739
|
+
validateRequired("batchParams.requests", "multipleBatchWithHTTPInfo", batchParams.requests);
|
|
2740
|
+
const requestPath = "/1/indexes/*/batch";
|
|
2741
|
+
const headers = {};
|
|
2742
|
+
const queryParameters = {};
|
|
2743
|
+
const request = {
|
|
2744
|
+
method: "POST",
|
|
2745
|
+
path: requestPath,
|
|
2746
|
+
queryParameters,
|
|
2747
|
+
headers,
|
|
2748
|
+
data: batchParams
|
|
2749
|
+
};
|
|
2750
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2751
|
+
},
|
|
1585
2752
|
/**
|
|
1586
2753
|
* Copies or moves (renames) an index within the same Algolia application. Notes: - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn\'t exist yet, it\'s created. - This operation is resource-intensive. **Copy** - If the source index doesn\'t exist, copying creates a new index with 0 records and default settings. - API keys from the source index are merged with the existing keys in the destination index. - You can\'t copy the `enableReRanking`, `mode`, and `replicas` settings. - You can\'t copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - For more information, see [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices). **Move** - If the source index doesn\'t exist, moving is ignored without returning an error. - When moving an index, the analytics data keeps its original name, and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - For more information, see [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices). This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
1587
2754
|
*
|
|
@@ -1605,13 +2772,80 @@ function createSearchClient({
|
|
|
1605
2772
|
path: requestPath,
|
|
1606
2773
|
queryParameters,
|
|
1607
2774
|
headers,
|
|
1608
|
-
data: operationIndexParams
|
|
2775
|
+
data: operationIndexParams
|
|
2776
|
+
};
|
|
2777
|
+
return transporter.request(request, requestOptions);
|
|
2778
|
+
},
|
|
2779
|
+
/**
|
|
2780
|
+
* Copies or moves (renames) an index within the same Algolia application. Notes: - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn\'t exist yet, it\'s created. - This operation is resource-intensive. **Copy** - If the source index doesn\'t exist, copying creates a new index with 0 records and default settings. - API keys from the source index are merged with the existing keys in the destination index. - You can\'t copy the `enableReRanking`, `mode`, and `replicas` settings. - You can\'t copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - For more information, see [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices). **Move** - If the source index doesn\'t exist, moving is ignored without returning an error. - When moving an index, the analytics data keeps its original name, and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - For more information, see [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices). This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
2781
|
+
*
|
|
2782
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2783
|
+
*
|
|
2784
|
+
* Required API Key ACLs:
|
|
2785
|
+
* - addObject
|
|
2786
|
+
* @param operationIndex - The operationIndex object.
|
|
2787
|
+
* @param operationIndex.indexName - Name of the index on which to perform the operation.
|
|
2788
|
+
* @param operationIndex.operationIndexParams - The operationIndexParams object.
|
|
2789
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2790
|
+
* @see operationIndex for the plain version.
|
|
2791
|
+
*/
|
|
2792
|
+
operationIndexWithHTTPInfo({ indexName, operationIndexParams }, requestOptions) {
|
|
2793
|
+
validateRequired("indexName", "operationIndexWithHTTPInfo", indexName);
|
|
2794
|
+
validateRequired("operationIndexParams", "operationIndexWithHTTPInfo", operationIndexParams);
|
|
2795
|
+
validateRequired("operationIndexParams.operation", "operationIndexWithHTTPInfo", operationIndexParams.operation);
|
|
2796
|
+
validateRequired(
|
|
2797
|
+
"operationIndexParams.destination",
|
|
2798
|
+
"operationIndexWithHTTPInfo",
|
|
2799
|
+
operationIndexParams.destination
|
|
2800
|
+
);
|
|
2801
|
+
const requestPath = "/1/indexes/{indexName}/operation".replace("{indexName}", encodeURIComponent(indexName));
|
|
2802
|
+
const headers = {};
|
|
2803
|
+
const queryParameters = {};
|
|
2804
|
+
const request = {
|
|
2805
|
+
method: "POST",
|
|
2806
|
+
path: requestPath,
|
|
2807
|
+
queryParameters,
|
|
2808
|
+
headers,
|
|
2809
|
+
data: operationIndexParams
|
|
2810
|
+
};
|
|
2811
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2812
|
+
},
|
|
2813
|
+
/**
|
|
2814
|
+
* 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).
|
|
2815
|
+
*
|
|
2816
|
+
* Required API Key ACLs:
|
|
2817
|
+
* - addObject
|
|
2818
|
+
* @param partialUpdateObject - The partialUpdateObject object.
|
|
2819
|
+
* @param partialUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
2820
|
+
* @param partialUpdateObject.objectID - Unique record identifier.
|
|
2821
|
+
* @param partialUpdateObject.attributesToUpdate - Attributes with their values.
|
|
2822
|
+
* @param partialUpdateObject.createIfNotExists - Whether to create a new record if it doesn\'t exist.
|
|
2823
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2824
|
+
*/
|
|
2825
|
+
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists }, requestOptions) {
|
|
2826
|
+
validateRequired("indexName", "partialUpdateObject", indexName);
|
|
2827
|
+
validateRequired("objectID", "partialUpdateObject", objectID);
|
|
2828
|
+
validateRequired("attributesToUpdate", "partialUpdateObject", attributesToUpdate);
|
|
2829
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2830
|
+
const headers = {};
|
|
2831
|
+
const queryParameters = {};
|
|
2832
|
+
if (createIfNotExists !== void 0) {
|
|
2833
|
+
queryParameters["createIfNotExists"] = createIfNotExists.toString();
|
|
2834
|
+
}
|
|
2835
|
+
const request = {
|
|
2836
|
+
method: "POST",
|
|
2837
|
+
path: requestPath,
|
|
2838
|
+
queryParameters,
|
|
2839
|
+
headers,
|
|
2840
|
+
data: attributesToUpdate
|
|
1609
2841
|
};
|
|
1610
2842
|
return transporter.request(request, requestOptions);
|
|
1611
2843
|
},
|
|
1612
2844
|
/**
|
|
1613
2845
|
* Adds new attributes to a record, or updates existing ones. - If a record with the specified object ID doesn\'t exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn\'t exist yet, this method creates a new index. - Use first-level attributes only. Nested attributes aren\'t supported. If you specify a nested attribute, this operation replaces its first-level ancestor. To update attributes without replacing the full record, use these built-in operations. These operations are useful when the initial data isn\'t available. - `Increment`: increment a numeric attribute. - `Decrement`: decrement a numeric attribute. - `Add`: append a number or string element to an array attribute. - `Remove`: remove all matching number or string elements from an array attribute made of numbers or strings. - `AddUnique`: add a number or string element to an array attribute made of numbers or strings only if it\'s not already present. - `IncrementFrom`: increment a numeric integer attribute only if the provided value matches the current value. Otherwise, the update is ignored. Example: If you pass an `IncrementFrom` value of 2 for the `version` attribute but the current value is 1, the API ignores the update. If the object doesn\'t exist, the API only creates it if you pass an `IncrementFrom` value of 0. - `IncrementSet`: increment a numeric integer attribute only if the provided value is greater than the current value. Otherwise, the update is ignored. Example: If you pass an `IncrementSet` value of 2 for the `version` attribute and the current value is 1, the API updates the object. If the object doesn\'t exist yet, the API only creates it if you pass an `IncrementSet` value greater than 0. Specify an operation by providing an object with the attribute to update as the key and its value as an object with these properties: - `_operation`: the operation to apply on the attribute. - `value`: the right-hand side argument to the operation, for example, increment or decrement step, or a value to add or remove. When updating multiple attributes or using multiple operations targeting the same record, use a single partial update for faster processing. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
1614
2846
|
*
|
|
2847
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2848
|
+
*
|
|
1615
2849
|
* Required API Key ACLs:
|
|
1616
2850
|
* - addObject
|
|
1617
2851
|
* @param partialUpdateObject - The partialUpdateObject object.
|
|
@@ -1620,11 +2854,12 @@ function createSearchClient({
|
|
|
1620
2854
|
* @param partialUpdateObject.attributesToUpdate - Attributes with their values.
|
|
1621
2855
|
* @param partialUpdateObject.createIfNotExists - Whether to create a new record if it doesn\'t exist.
|
|
1622
2856
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2857
|
+
* @see partialUpdateObject for the plain version.
|
|
1623
2858
|
*/
|
|
1624
|
-
|
|
1625
|
-
validateRequired("indexName", "
|
|
1626
|
-
validateRequired("objectID", "
|
|
1627
|
-
validateRequired("attributesToUpdate", "
|
|
2859
|
+
partialUpdateObjectWithHTTPInfo({ indexName, objectID, attributesToUpdate, createIfNotExists }, requestOptions) {
|
|
2860
|
+
validateRequired("indexName", "partialUpdateObjectWithHTTPInfo", indexName);
|
|
2861
|
+
validateRequired("objectID", "partialUpdateObjectWithHTTPInfo", objectID);
|
|
2862
|
+
validateRequired("attributesToUpdate", "partialUpdateObjectWithHTTPInfo", attributesToUpdate);
|
|
1628
2863
|
const requestPath = "/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1629
2864
|
const headers = {};
|
|
1630
2865
|
const queryParameters = {};
|
|
@@ -1638,7 +2873,7 @@ function createSearchClient({
|
|
|
1638
2873
|
headers,
|
|
1639
2874
|
data: attributesToUpdate
|
|
1640
2875
|
};
|
|
1641
|
-
return transporter.
|
|
2876
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1642
2877
|
},
|
|
1643
2878
|
/**
|
|
1644
2879
|
* Deletes a user ID and its associated data from the clusters.
|
|
@@ -1664,6 +2899,33 @@ function createSearchClient({
|
|
|
1664
2899
|
};
|
|
1665
2900
|
return transporter.request(request, requestOptions);
|
|
1666
2901
|
},
|
|
2902
|
+
/**
|
|
2903
|
+
* Deletes a user ID and its associated data from the clusters.
|
|
2904
|
+
*
|
|
2905
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2906
|
+
*
|
|
2907
|
+
* Required API Key ACLs:
|
|
2908
|
+
* - admin
|
|
2909
|
+
*
|
|
2910
|
+
* @deprecated
|
|
2911
|
+
* @param removeUserId - The removeUserId object.
|
|
2912
|
+
* @param removeUserId.userID - Unique identifier of the user who makes the search request.
|
|
2913
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2914
|
+
* @see removeUserId for the plain version.
|
|
2915
|
+
*/
|
|
2916
|
+
removeUserIdWithHTTPInfo({ userID }, requestOptions) {
|
|
2917
|
+
validateRequired("userID", "removeUserIdWithHTTPInfo", userID);
|
|
2918
|
+
const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
|
|
2919
|
+
const headers = {};
|
|
2920
|
+
const queryParameters = {};
|
|
2921
|
+
const request = {
|
|
2922
|
+
method: "DELETE",
|
|
2923
|
+
path: requestPath,
|
|
2924
|
+
queryParameters,
|
|
2925
|
+
headers
|
|
2926
|
+
};
|
|
2927
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2928
|
+
},
|
|
1667
2929
|
/**
|
|
1668
2930
|
* Replaces the list of allowed sources.
|
|
1669
2931
|
*
|
|
@@ -1687,6 +2949,32 @@ function createSearchClient({
|
|
|
1687
2949
|
};
|
|
1688
2950
|
return transporter.request(request, requestOptions);
|
|
1689
2951
|
},
|
|
2952
|
+
/**
|
|
2953
|
+
* Replaces the list of allowed sources.
|
|
2954
|
+
*
|
|
2955
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
2956
|
+
*
|
|
2957
|
+
* Required API Key ACLs:
|
|
2958
|
+
* - admin
|
|
2959
|
+
* @param replaceSources - The replaceSources object.
|
|
2960
|
+
* @param replaceSources.source - Allowed sources.
|
|
2961
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2962
|
+
* @see replaceSources for the plain version.
|
|
2963
|
+
*/
|
|
2964
|
+
replaceSourcesWithHTTPInfo({ source }, requestOptions) {
|
|
2965
|
+
validateRequired("source", "replaceSourcesWithHTTPInfo", source);
|
|
2966
|
+
const requestPath = "/1/security/sources";
|
|
2967
|
+
const headers = {};
|
|
2968
|
+
const queryParameters = {};
|
|
2969
|
+
const request = {
|
|
2970
|
+
method: "PUT",
|
|
2971
|
+
path: requestPath,
|
|
2972
|
+
queryParameters,
|
|
2973
|
+
headers,
|
|
2974
|
+
data: source
|
|
2975
|
+
};
|
|
2976
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2977
|
+
},
|
|
1690
2978
|
/**
|
|
1691
2979
|
* Restores a deleted API key. Restoring resets the `validity` attribute to `0`. Algolia stores up to 1,000 API keys per application. If you create more, the oldest API keys are deleted and can\'t be restored.
|
|
1692
2980
|
*
|
|
@@ -1709,6 +2997,31 @@ function createSearchClient({
|
|
|
1709
2997
|
};
|
|
1710
2998
|
return transporter.request(request, requestOptions);
|
|
1711
2999
|
},
|
|
3000
|
+
/**
|
|
3001
|
+
* 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.
|
|
3002
|
+
*
|
|
3003
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3004
|
+
*
|
|
3005
|
+
* Required API Key ACLs:
|
|
3006
|
+
* - admin
|
|
3007
|
+
* @param restoreApiKey - The restoreApiKey object.
|
|
3008
|
+
* @param restoreApiKey.key - API key.
|
|
3009
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3010
|
+
* @see restoreApiKey for the plain version.
|
|
3011
|
+
*/
|
|
3012
|
+
restoreApiKeyWithHTTPInfo({ key }, requestOptions) {
|
|
3013
|
+
validateRequired("key", "restoreApiKeyWithHTTPInfo", key);
|
|
3014
|
+
const requestPath = "/1/keys/{key}/restore".replace("{key}", encodeURIComponent(key));
|
|
3015
|
+
const headers = {};
|
|
3016
|
+
const queryParameters = {};
|
|
3017
|
+
const request = {
|
|
3018
|
+
method: "POST",
|
|
3019
|
+
path: requestPath,
|
|
3020
|
+
queryParameters,
|
|
3021
|
+
headers
|
|
3022
|
+
};
|
|
3023
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3024
|
+
},
|
|
1712
3025
|
/**
|
|
1713
3026
|
* Adds a record to an index or replaces it. - If the record doesn\'t have an object ID, a new record with an auto-generated object ID is added to your index. - If a record with the specified object ID exists, the existing record is replaced. - If a record with the specified object ID doesn\'t exist, a new record is added to your index. - If you add a record to an index that doesn\'t exist yet, a new index is created. To update _some_ attributes of a record, use the [`partial` operation](https://www.algolia.com/doc/rest-api/search/partial-update-object). To add, update, or replace multiple records, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch). This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
1714
3027
|
*
|
|
@@ -1734,6 +3047,34 @@ function createSearchClient({
|
|
|
1734
3047
|
};
|
|
1735
3048
|
return transporter.request(request, requestOptions);
|
|
1736
3049
|
},
|
|
3050
|
+
/**
|
|
3051
|
+
* 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).
|
|
3052
|
+
*
|
|
3053
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3054
|
+
*
|
|
3055
|
+
* Required API Key ACLs:
|
|
3056
|
+
* - addObject
|
|
3057
|
+
* @param saveObject - The saveObject object.
|
|
3058
|
+
* @param saveObject.indexName - Name of the index on which to perform the operation.
|
|
3059
|
+
* @param saveObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
3060
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3061
|
+
* @see saveObject for the plain version.
|
|
3062
|
+
*/
|
|
3063
|
+
saveObjectWithHTTPInfo({ indexName, body }, requestOptions) {
|
|
3064
|
+
validateRequired("indexName", "saveObjectWithHTTPInfo", indexName);
|
|
3065
|
+
validateRequired("body", "saveObjectWithHTTPInfo", body);
|
|
3066
|
+
const requestPath = "/1/indexes/{indexName}".replace("{indexName}", encodeURIComponent(indexName));
|
|
3067
|
+
const headers = {};
|
|
3068
|
+
const queryParameters = {};
|
|
3069
|
+
const request = {
|
|
3070
|
+
method: "POST",
|
|
3071
|
+
path: requestPath,
|
|
3072
|
+
queryParameters,
|
|
3073
|
+
headers,
|
|
3074
|
+
data: body
|
|
3075
|
+
};
|
|
3076
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3077
|
+
},
|
|
1737
3078
|
/**
|
|
1738
3079
|
* If a rule with the specified object ID doesn\'t exist, it\'s created. Otherwise, the existing rule is replaced. To create or update more than one rule, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/save-rules).
|
|
1739
3080
|
*
|
|
@@ -1767,6 +3108,42 @@ function createSearchClient({
|
|
|
1767
3108
|
};
|
|
1768
3109
|
return transporter.request(request, requestOptions);
|
|
1769
3110
|
},
|
|
3111
|
+
/**
|
|
3112
|
+
* 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).
|
|
3113
|
+
*
|
|
3114
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3115
|
+
*
|
|
3116
|
+
* Required API Key ACLs:
|
|
3117
|
+
* - editSettings
|
|
3118
|
+
* @param saveRule - The saveRule object.
|
|
3119
|
+
* @param saveRule.indexName - Name of the index on which to perform the operation.
|
|
3120
|
+
* @param saveRule.objectID - Unique identifier of a rule object.
|
|
3121
|
+
* @param saveRule.rule - The rule object.
|
|
3122
|
+
* @param saveRule.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3123
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3124
|
+
* @see saveRule for the plain version.
|
|
3125
|
+
*/
|
|
3126
|
+
saveRuleWithHTTPInfo({ indexName, objectID, rule, forwardToReplicas }, requestOptions) {
|
|
3127
|
+
validateRequired("indexName", "saveRuleWithHTTPInfo", indexName);
|
|
3128
|
+
validateRequired("objectID", "saveRuleWithHTTPInfo", objectID);
|
|
3129
|
+
validateRequired("rule", "saveRuleWithHTTPInfo", rule);
|
|
3130
|
+
validateRequired("rule.objectID", "saveRuleWithHTTPInfo", rule.objectID);
|
|
3131
|
+
validateRequired("rule.consequence", "saveRuleWithHTTPInfo", rule.consequence);
|
|
3132
|
+
const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
3133
|
+
const headers = {};
|
|
3134
|
+
const queryParameters = {};
|
|
3135
|
+
if (forwardToReplicas !== void 0) {
|
|
3136
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3137
|
+
}
|
|
3138
|
+
const request = {
|
|
3139
|
+
method: "PUT",
|
|
3140
|
+
path: requestPath,
|
|
3141
|
+
queryParameters,
|
|
3142
|
+
headers,
|
|
3143
|
+
data: rule
|
|
3144
|
+
};
|
|
3145
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3146
|
+
},
|
|
1770
3147
|
/**
|
|
1771
3148
|
* Create or update multiple rules. If a rule with the specified object ID doesn\'t exist, Algolia creates a new one. Otherwise, existing rules are replaced. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
1772
3149
|
*
|
|
@@ -1800,6 +3177,42 @@ function createSearchClient({
|
|
|
1800
3177
|
};
|
|
1801
3178
|
return transporter.request(request, requestOptions);
|
|
1802
3179
|
},
|
|
3180
|
+
/**
|
|
3181
|
+
* 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).
|
|
3182
|
+
*
|
|
3183
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3184
|
+
*
|
|
3185
|
+
* Required API Key ACLs:
|
|
3186
|
+
* - editSettings
|
|
3187
|
+
* @param saveRules - The saveRules object.
|
|
3188
|
+
* @param saveRules.indexName - Name of the index on which to perform the operation.
|
|
3189
|
+
* @param saveRules.rules - The rules object.
|
|
3190
|
+
* @param saveRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3191
|
+
* @param saveRules.clearExistingRules - Whether existing rules should be deleted before adding this batch.
|
|
3192
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3193
|
+
* @see saveRules for the plain version.
|
|
3194
|
+
*/
|
|
3195
|
+
saveRulesWithHTTPInfo({ indexName, rules, forwardToReplicas, clearExistingRules }, requestOptions) {
|
|
3196
|
+
validateRequired("indexName", "saveRulesWithHTTPInfo", indexName);
|
|
3197
|
+
validateRequired("rules", "saveRulesWithHTTPInfo", rules);
|
|
3198
|
+
const requestPath = "/1/indexes/{indexName}/rules/batch".replace("{indexName}", encodeURIComponent(indexName));
|
|
3199
|
+
const headers = {};
|
|
3200
|
+
const queryParameters = {};
|
|
3201
|
+
if (forwardToReplicas !== void 0) {
|
|
3202
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3203
|
+
}
|
|
3204
|
+
if (clearExistingRules !== void 0) {
|
|
3205
|
+
queryParameters["clearExistingRules"] = clearExistingRules.toString();
|
|
3206
|
+
}
|
|
3207
|
+
const request = {
|
|
3208
|
+
method: "POST",
|
|
3209
|
+
path: requestPath,
|
|
3210
|
+
queryParameters,
|
|
3211
|
+
headers,
|
|
3212
|
+
data: rules
|
|
3213
|
+
};
|
|
3214
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3215
|
+
},
|
|
1803
3216
|
/**
|
|
1804
3217
|
* If a synonym with the specified object ID doesn\'t exist, Algolia adds a new one. Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/save-synonyms).
|
|
1805
3218
|
*
|
|
@@ -1833,6 +3246,42 @@ function createSearchClient({
|
|
|
1833
3246
|
};
|
|
1834
3247
|
return transporter.request(request, requestOptions);
|
|
1835
3248
|
},
|
|
3249
|
+
/**
|
|
3250
|
+
* 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).
|
|
3251
|
+
*
|
|
3252
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3253
|
+
*
|
|
3254
|
+
* Required API Key ACLs:
|
|
3255
|
+
* - editSettings
|
|
3256
|
+
* @param saveSynonym - The saveSynonym object.
|
|
3257
|
+
* @param saveSynonym.indexName - Name of the index on which to perform the operation.
|
|
3258
|
+
* @param saveSynonym.objectID - Unique identifier of a synonym object.
|
|
3259
|
+
* @param saveSynonym.synonymHit - The synonymHit object.
|
|
3260
|
+
* @param saveSynonym.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3261
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3262
|
+
* @see saveSynonym for the plain version.
|
|
3263
|
+
*/
|
|
3264
|
+
saveSynonymWithHTTPInfo({ indexName, objectID, synonymHit, forwardToReplicas }, requestOptions) {
|
|
3265
|
+
validateRequired("indexName", "saveSynonymWithHTTPInfo", indexName);
|
|
3266
|
+
validateRequired("objectID", "saveSynonymWithHTTPInfo", objectID);
|
|
3267
|
+
validateRequired("synonymHit", "saveSynonymWithHTTPInfo", synonymHit);
|
|
3268
|
+
validateRequired("synonymHit.objectID", "saveSynonymWithHTTPInfo", synonymHit.objectID);
|
|
3269
|
+
validateRequired("synonymHit.type", "saveSynonymWithHTTPInfo", synonymHit.type);
|
|
3270
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
3271
|
+
const headers = {};
|
|
3272
|
+
const queryParameters = {};
|
|
3273
|
+
if (forwardToReplicas !== void 0) {
|
|
3274
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3275
|
+
}
|
|
3276
|
+
const request = {
|
|
3277
|
+
method: "PUT",
|
|
3278
|
+
path: requestPath,
|
|
3279
|
+
queryParameters,
|
|
3280
|
+
headers,
|
|
3281
|
+
data: synonymHit
|
|
3282
|
+
};
|
|
3283
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3284
|
+
},
|
|
1836
3285
|
/**
|
|
1837
3286
|
* If a synonym with the `objectID` doesn\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
|
|
1838
3287
|
*
|
|
@@ -1851,30 +3300,115 @@ function createSearchClient({
|
|
|
1851
3300
|
const requestPath = "/1/indexes/{indexName}/synonyms/batch".replace("{indexName}", encodeURIComponent(indexName));
|
|
1852
3301
|
const headers = {};
|
|
1853
3302
|
const queryParameters = {};
|
|
1854
|
-
if (forwardToReplicas !== void 0) {
|
|
1855
|
-
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1856
|
-
}
|
|
1857
|
-
if (replaceExistingSynonyms !== void 0) {
|
|
1858
|
-
queryParameters["replaceExistingSynonyms"] = replaceExistingSynonyms.toString();
|
|
1859
|
-
}
|
|
3303
|
+
if (forwardToReplicas !== void 0) {
|
|
3304
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3305
|
+
}
|
|
3306
|
+
if (replaceExistingSynonyms !== void 0) {
|
|
3307
|
+
queryParameters["replaceExistingSynonyms"] = replaceExistingSynonyms.toString();
|
|
3308
|
+
}
|
|
3309
|
+
const request = {
|
|
3310
|
+
method: "POST",
|
|
3311
|
+
path: requestPath,
|
|
3312
|
+
queryParameters,
|
|
3313
|
+
headers,
|
|
3314
|
+
data: synonymHit
|
|
3315
|
+
};
|
|
3316
|
+
return transporter.request(request, requestOptions);
|
|
3317
|
+
},
|
|
3318
|
+
/**
|
|
3319
|
+
* 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).
|
|
3320
|
+
*
|
|
3321
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3322
|
+
*
|
|
3323
|
+
* Required API Key ACLs:
|
|
3324
|
+
* - editSettings
|
|
3325
|
+
* @param saveSynonyms - The saveSynonyms object.
|
|
3326
|
+
* @param saveSynonyms.indexName - Name of the index on which to perform the operation.
|
|
3327
|
+
* @param saveSynonyms.synonymHit - The synonymHit object.
|
|
3328
|
+
* @param saveSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3329
|
+
* @param saveSynonyms.replaceExistingSynonyms - Whether to replace all synonyms in the index with the ones sent with this request.
|
|
3330
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3331
|
+
* @see saveSynonyms for the plain version.
|
|
3332
|
+
*/
|
|
3333
|
+
saveSynonymsWithHTTPInfo({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms }, requestOptions) {
|
|
3334
|
+
validateRequired("indexName", "saveSynonymsWithHTTPInfo", indexName);
|
|
3335
|
+
validateRequired("synonymHit", "saveSynonymsWithHTTPInfo", synonymHit);
|
|
3336
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/batch".replace("{indexName}", encodeURIComponent(indexName));
|
|
3337
|
+
const headers = {};
|
|
3338
|
+
const queryParameters = {};
|
|
3339
|
+
if (forwardToReplicas !== void 0) {
|
|
3340
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3341
|
+
}
|
|
3342
|
+
if (replaceExistingSynonyms !== void 0) {
|
|
3343
|
+
queryParameters["replaceExistingSynonyms"] = replaceExistingSynonyms.toString();
|
|
3344
|
+
}
|
|
3345
|
+
const request = {
|
|
3346
|
+
method: "POST",
|
|
3347
|
+
path: requestPath,
|
|
3348
|
+
queryParameters,
|
|
3349
|
+
headers,
|
|
3350
|
+
data: synonymHit
|
|
3351
|
+
};
|
|
3352
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3353
|
+
},
|
|
3354
|
+
/**
|
|
3355
|
+
* 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.
|
|
3356
|
+
*
|
|
3357
|
+
* Required API Key ACLs:
|
|
3358
|
+
* - search
|
|
3359
|
+
* @param searchMethodParams - Multi-query search request body. Results are returned in the same order as the requests.
|
|
3360
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3361
|
+
*/
|
|
3362
|
+
search(searchMethodParams, requestOptions) {
|
|
3363
|
+
if (searchMethodParams && Array.isArray(searchMethodParams)) {
|
|
3364
|
+
const newSignatureRequest = {
|
|
3365
|
+
requests: searchMethodParams.map(({ params, ...legacyRequest }) => {
|
|
3366
|
+
if (legacyRequest.type === "facet") {
|
|
3367
|
+
return {
|
|
3368
|
+
...legacyRequest,
|
|
3369
|
+
...params,
|
|
3370
|
+
type: "facet"
|
|
3371
|
+
};
|
|
3372
|
+
}
|
|
3373
|
+
return {
|
|
3374
|
+
...legacyRequest,
|
|
3375
|
+
...params,
|
|
3376
|
+
facet: void 0,
|
|
3377
|
+
maxFacetHits: void 0,
|
|
3378
|
+
facetQuery: void 0
|
|
3379
|
+
};
|
|
3380
|
+
})
|
|
3381
|
+
};
|
|
3382
|
+
searchMethodParams = newSignatureRequest;
|
|
3383
|
+
}
|
|
3384
|
+
validateRequired("searchMethodParams", "search", searchMethodParams);
|
|
3385
|
+
validateRequired("searchMethodParams.requests", "search", searchMethodParams.requests);
|
|
3386
|
+
const requestPath = "/1/indexes/*/queries";
|
|
3387
|
+
const headers = {};
|
|
3388
|
+
const queryParameters = {};
|
|
1860
3389
|
const request = {
|
|
1861
3390
|
method: "POST",
|
|
1862
3391
|
path: requestPath,
|
|
1863
3392
|
queryParameters,
|
|
1864
3393
|
headers,
|
|
1865
|
-
data:
|
|
3394
|
+
data: searchMethodParams,
|
|
3395
|
+
useReadTransporter: true,
|
|
3396
|
+
cacheable: true
|
|
1866
3397
|
};
|
|
1867
3398
|
return transporter.request(request, requestOptions);
|
|
1868
3399
|
},
|
|
1869
3400
|
/**
|
|
1870
3401
|
* Runs multiple search queries against one or more indices in a single API request. Use cases include: - Searching different indices, such as products and marketing content. - Run multiple queries on the same index with different parameters or filters. If you know the expected result type, use the `searchForHits` or `searchForFacets` helper to simplify the response format.
|
|
1871
3402
|
*
|
|
3403
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3404
|
+
*
|
|
1872
3405
|
* Required API Key ACLs:
|
|
1873
3406
|
* - search
|
|
1874
3407
|
* @param searchMethodParams - Multi-query search request body. Results are returned in the same order as the requests.
|
|
1875
3408
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3409
|
+
* @see search for the plain version.
|
|
1876
3410
|
*/
|
|
1877
|
-
|
|
3411
|
+
searchWithHTTPInfo(searchMethodParams, requestOptions) {
|
|
1878
3412
|
if (searchMethodParams && Array.isArray(searchMethodParams)) {
|
|
1879
3413
|
const newSignatureRequest = {
|
|
1880
3414
|
requests: searchMethodParams.map(({ params, ...legacyRequest }) => {
|
|
@@ -1896,8 +3430,8 @@ function createSearchClient({
|
|
|
1896
3430
|
};
|
|
1897
3431
|
searchMethodParams = newSignatureRequest;
|
|
1898
3432
|
}
|
|
1899
|
-
validateRequired("searchMethodParams", "
|
|
1900
|
-
validateRequired("searchMethodParams.requests", "
|
|
3433
|
+
validateRequired("searchMethodParams", "searchWithHTTPInfo", searchMethodParams);
|
|
3434
|
+
validateRequired("searchMethodParams.requests", "searchWithHTTPInfo", searchMethodParams.requests);
|
|
1901
3435
|
const requestPath = "/1/indexes/*/queries";
|
|
1902
3436
|
const headers = {};
|
|
1903
3437
|
const queryParameters = {};
|
|
@@ -1910,7 +3444,7 @@ function createSearchClient({
|
|
|
1910
3444
|
useReadTransporter: true,
|
|
1911
3445
|
cacheable: true
|
|
1912
3446
|
};
|
|
1913
|
-
return transporter.
|
|
3447
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1914
3448
|
},
|
|
1915
3449
|
/**
|
|
1916
3450
|
* Searches for standard and custom dictionary entries.
|
|
@@ -1947,6 +3481,48 @@ function createSearchClient({
|
|
|
1947
3481
|
};
|
|
1948
3482
|
return transporter.request(request, requestOptions);
|
|
1949
3483
|
},
|
|
3484
|
+
/**
|
|
3485
|
+
* Searches for standard and custom dictionary entries.
|
|
3486
|
+
*
|
|
3487
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3488
|
+
*
|
|
3489
|
+
* Required API Key ACLs:
|
|
3490
|
+
* - settings
|
|
3491
|
+
* @param searchDictionaryEntries - The searchDictionaryEntries object.
|
|
3492
|
+
* @param searchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
3493
|
+
* @param searchDictionaryEntries.searchDictionaryEntriesParams - The searchDictionaryEntriesParams object.
|
|
3494
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3495
|
+
* @see searchDictionaryEntries for the plain version.
|
|
3496
|
+
*/
|
|
3497
|
+
searchDictionaryEntriesWithHTTPInfo({ dictionaryName, searchDictionaryEntriesParams }, requestOptions) {
|
|
3498
|
+
validateRequired("dictionaryName", "searchDictionaryEntriesWithHTTPInfo", dictionaryName);
|
|
3499
|
+
validateRequired(
|
|
3500
|
+
"searchDictionaryEntriesParams",
|
|
3501
|
+
"searchDictionaryEntriesWithHTTPInfo",
|
|
3502
|
+
searchDictionaryEntriesParams
|
|
3503
|
+
);
|
|
3504
|
+
validateRequired(
|
|
3505
|
+
"searchDictionaryEntriesParams.query",
|
|
3506
|
+
"searchDictionaryEntriesWithHTTPInfo",
|
|
3507
|
+
searchDictionaryEntriesParams.query
|
|
3508
|
+
);
|
|
3509
|
+
const requestPath = "/1/dictionaries/{dictionaryName}/search".replace(
|
|
3510
|
+
"{dictionaryName}",
|
|
3511
|
+
encodeURIComponent(dictionaryName)
|
|
3512
|
+
);
|
|
3513
|
+
const headers = {};
|
|
3514
|
+
const queryParameters = {};
|
|
3515
|
+
const request = {
|
|
3516
|
+
method: "POST",
|
|
3517
|
+
path: requestPath,
|
|
3518
|
+
queryParameters,
|
|
3519
|
+
headers,
|
|
3520
|
+
data: searchDictionaryEntriesParams,
|
|
3521
|
+
useReadTransporter: true,
|
|
3522
|
+
cacheable: true
|
|
3523
|
+
};
|
|
3524
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3525
|
+
},
|
|
1950
3526
|
/**
|
|
1951
3527
|
* Searches for values of a specified facet attribute. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn\'t work if you have **more than 65 searchable facets and searchable attributes combined**.
|
|
1952
3528
|
*
|
|
@@ -1975,6 +3551,37 @@ function createSearchClient({
|
|
|
1975
3551
|
};
|
|
1976
3552
|
return transporter.request(request, requestOptions);
|
|
1977
3553
|
},
|
|
3554
|
+
/**
|
|
3555
|
+
* 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**.
|
|
3556
|
+
*
|
|
3557
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3558
|
+
*
|
|
3559
|
+
* Required API Key ACLs:
|
|
3560
|
+
* - search
|
|
3561
|
+
* @param searchForFacetValues - The searchForFacetValues object.
|
|
3562
|
+
* @param searchForFacetValues.indexName - Name of the index on which to perform the operation.
|
|
3563
|
+
* @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.
|
|
3564
|
+
* @param searchForFacetValues.searchForFacetValuesRequest - The searchForFacetValuesRequest object.
|
|
3565
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3566
|
+
* @see searchForFacetValues for the plain version.
|
|
3567
|
+
*/
|
|
3568
|
+
searchForFacetValuesWithHTTPInfo({ indexName, facetName, searchForFacetValuesRequest }, requestOptions) {
|
|
3569
|
+
validateRequired("indexName", "searchForFacetValuesWithHTTPInfo", indexName);
|
|
3570
|
+
validateRequired("facetName", "searchForFacetValuesWithHTTPInfo", facetName);
|
|
3571
|
+
const requestPath = "/1/indexes/{indexName}/facets/{facetName}/query".replace("{indexName}", encodeURIComponent(indexName)).replace("{facetName}", encodeURIComponent(facetName));
|
|
3572
|
+
const headers = {};
|
|
3573
|
+
const queryParameters = {};
|
|
3574
|
+
const request = {
|
|
3575
|
+
method: "POST",
|
|
3576
|
+
path: requestPath,
|
|
3577
|
+
queryParameters,
|
|
3578
|
+
headers,
|
|
3579
|
+
data: searchForFacetValuesRequest ? searchForFacetValuesRequest : {},
|
|
3580
|
+
useReadTransporter: true,
|
|
3581
|
+
cacheable: true
|
|
3582
|
+
};
|
|
3583
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3584
|
+
},
|
|
1978
3585
|
/**
|
|
1979
3586
|
* Searches for rules in your index.
|
|
1980
3587
|
*
|
|
@@ -2001,6 +3608,35 @@ function createSearchClient({
|
|
|
2001
3608
|
};
|
|
2002
3609
|
return transporter.request(request, requestOptions);
|
|
2003
3610
|
},
|
|
3611
|
+
/**
|
|
3612
|
+
* Searches for rules in your index.
|
|
3613
|
+
*
|
|
3614
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3615
|
+
*
|
|
3616
|
+
* Required API Key ACLs:
|
|
3617
|
+
* - settings
|
|
3618
|
+
* @param searchRules - The searchRules object.
|
|
3619
|
+
* @param searchRules.indexName - Name of the index on which to perform the operation.
|
|
3620
|
+
* @param searchRules.searchRulesParams - The searchRulesParams object.
|
|
3621
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3622
|
+
* @see searchRules for the plain version.
|
|
3623
|
+
*/
|
|
3624
|
+
searchRulesWithHTTPInfo({ indexName, searchRulesParams }, requestOptions) {
|
|
3625
|
+
validateRequired("indexName", "searchRulesWithHTTPInfo", indexName);
|
|
3626
|
+
const requestPath = "/1/indexes/{indexName}/rules/search".replace("{indexName}", encodeURIComponent(indexName));
|
|
3627
|
+
const headers = {};
|
|
3628
|
+
const queryParameters = {};
|
|
3629
|
+
const request = {
|
|
3630
|
+
method: "POST",
|
|
3631
|
+
path: requestPath,
|
|
3632
|
+
queryParameters,
|
|
3633
|
+
headers,
|
|
3634
|
+
data: searchRulesParams ? searchRulesParams : {},
|
|
3635
|
+
useReadTransporter: true,
|
|
3636
|
+
cacheable: true
|
|
3637
|
+
};
|
|
3638
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3639
|
+
},
|
|
2004
3640
|
/**
|
|
2005
3641
|
* Searches a single index and returns matching search results as hits. This method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` operation](https://www.algolia.com/doc/rest-api/search/browse) or increase the `paginatedLimitedTo` index setting.
|
|
2006
3642
|
*
|
|
@@ -2027,6 +3663,35 @@ function createSearchClient({
|
|
|
2027
3663
|
};
|
|
2028
3664
|
return transporter.request(request, requestOptions);
|
|
2029
3665
|
},
|
|
3666
|
+
/**
|
|
3667
|
+
* 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.
|
|
3668
|
+
*
|
|
3669
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3670
|
+
*
|
|
3671
|
+
* Required API Key ACLs:
|
|
3672
|
+
* - search
|
|
3673
|
+
* @param searchSingleIndex - The searchSingleIndex object.
|
|
3674
|
+
* @param searchSingleIndex.indexName - Name of the index on which to perform the operation.
|
|
3675
|
+
* @param searchSingleIndex.searchParams - The searchParams object.
|
|
3676
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3677
|
+
* @see searchSingleIndex for the plain version.
|
|
3678
|
+
*/
|
|
3679
|
+
searchSingleIndexWithHTTPInfo({ indexName, searchParams }, requestOptions) {
|
|
3680
|
+
validateRequired("indexName", "searchSingleIndexWithHTTPInfo", indexName);
|
|
3681
|
+
const requestPath = "/1/indexes/{indexName}/query".replace("{indexName}", encodeURIComponent(indexName));
|
|
3682
|
+
const headers = {};
|
|
3683
|
+
const queryParameters = {};
|
|
3684
|
+
const request = {
|
|
3685
|
+
method: "POST",
|
|
3686
|
+
path: requestPath,
|
|
3687
|
+
queryParameters,
|
|
3688
|
+
headers,
|
|
3689
|
+
data: searchParams ? searchParams : {},
|
|
3690
|
+
useReadTransporter: true,
|
|
3691
|
+
cacheable: true
|
|
3692
|
+
};
|
|
3693
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3694
|
+
},
|
|
2030
3695
|
/**
|
|
2031
3696
|
* Searches for synonyms in your index.
|
|
2032
3697
|
*
|
|
@@ -2056,6 +3721,38 @@ function createSearchClient({
|
|
|
2056
3721
|
};
|
|
2057
3722
|
return transporter.request(request, requestOptions);
|
|
2058
3723
|
},
|
|
3724
|
+
/**
|
|
3725
|
+
* Searches for synonyms in your index.
|
|
3726
|
+
*
|
|
3727
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3728
|
+
*
|
|
3729
|
+
* Required API Key ACLs:
|
|
3730
|
+
* - settings
|
|
3731
|
+
* @param searchSynonyms - The searchSynonyms object.
|
|
3732
|
+
* @param searchSynonyms.indexName - Name of the index on which to perform the operation.
|
|
3733
|
+
* @param searchSynonyms.searchSynonymsParams - Body of the `searchSynonyms` operation.
|
|
3734
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3735
|
+
* @see searchSynonyms for the plain version.
|
|
3736
|
+
*/
|
|
3737
|
+
searchSynonymsWithHTTPInfo({ indexName, searchSynonymsParams }, requestOptions) {
|
|
3738
|
+
validateRequired("indexName", "searchSynonymsWithHTTPInfo", indexName);
|
|
3739
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/search".replace(
|
|
3740
|
+
"{indexName}",
|
|
3741
|
+
encodeURIComponent(indexName)
|
|
3742
|
+
);
|
|
3743
|
+
const headers = {};
|
|
3744
|
+
const queryParameters = {};
|
|
3745
|
+
const request = {
|
|
3746
|
+
method: "POST",
|
|
3747
|
+
path: requestPath,
|
|
3748
|
+
queryParameters,
|
|
3749
|
+
headers,
|
|
3750
|
+
data: searchSynonymsParams ? searchSynonymsParams : {},
|
|
3751
|
+
useReadTransporter: true,
|
|
3752
|
+
cacheable: true
|
|
3753
|
+
};
|
|
3754
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3755
|
+
},
|
|
2059
3756
|
/**
|
|
2060
3757
|
* Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time. To ensure rapid updates, the user IDs index isn\'t built at the same time as the mapping. Instead, it\'s built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours).
|
|
2061
3758
|
*
|
|
@@ -2083,6 +3780,36 @@ function createSearchClient({
|
|
|
2083
3780
|
};
|
|
2084
3781
|
return transporter.request(request, requestOptions);
|
|
2085
3782
|
},
|
|
3783
|
+
/**
|
|
3784
|
+
* Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time. To ensure rapid updates, the user IDs index isn\'t built at the same time as the mapping. Instead, it\'s built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours).
|
|
3785
|
+
*
|
|
3786
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3787
|
+
*
|
|
3788
|
+
* Required API Key ACLs:
|
|
3789
|
+
* - admin
|
|
3790
|
+
*
|
|
3791
|
+
* @deprecated
|
|
3792
|
+
* @param searchUserIdsParams - The searchUserIdsParams object.
|
|
3793
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3794
|
+
* @see searchUserIds for the plain version.
|
|
3795
|
+
*/
|
|
3796
|
+
searchUserIdsWithHTTPInfo(searchUserIdsParams, requestOptions) {
|
|
3797
|
+
validateRequired("searchUserIdsParams", "searchUserIdsWithHTTPInfo", searchUserIdsParams);
|
|
3798
|
+
validateRequired("searchUserIdsParams.query", "searchUserIdsWithHTTPInfo", searchUserIdsParams.query);
|
|
3799
|
+
const requestPath = "/1/clusters/mapping/search";
|
|
3800
|
+
const headers = {};
|
|
3801
|
+
const queryParameters = {};
|
|
3802
|
+
const request = {
|
|
3803
|
+
method: "POST",
|
|
3804
|
+
path: requestPath,
|
|
3805
|
+
queryParameters,
|
|
3806
|
+
headers,
|
|
3807
|
+
data: searchUserIdsParams,
|
|
3808
|
+
useReadTransporter: true,
|
|
3809
|
+
cacheable: true
|
|
3810
|
+
};
|
|
3811
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3812
|
+
},
|
|
2086
3813
|
/**
|
|
2087
3814
|
* Turns standard stop word dictionary entries on or off for a given language.
|
|
2088
3815
|
*
|
|
@@ -2110,6 +3837,36 @@ function createSearchClient({
|
|
|
2110
3837
|
};
|
|
2111
3838
|
return transporter.request(request, requestOptions);
|
|
2112
3839
|
},
|
|
3840
|
+
/**
|
|
3841
|
+
* Turns standard stop word dictionary entries on or off for a given language.
|
|
3842
|
+
*
|
|
3843
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3844
|
+
*
|
|
3845
|
+
* Required API Key ACLs:
|
|
3846
|
+
* - editSettings
|
|
3847
|
+
* @param dictionarySettingsParams - The dictionarySettingsParams object.
|
|
3848
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3849
|
+
* @see setDictionarySettings for the plain version.
|
|
3850
|
+
*/
|
|
3851
|
+
setDictionarySettingsWithHTTPInfo(dictionarySettingsParams, requestOptions) {
|
|
3852
|
+
validateRequired("dictionarySettingsParams", "setDictionarySettingsWithHTTPInfo", dictionarySettingsParams);
|
|
3853
|
+
validateRequired(
|
|
3854
|
+
"dictionarySettingsParams.disableStandardEntries",
|
|
3855
|
+
"setDictionarySettingsWithHTTPInfo",
|
|
3856
|
+
dictionarySettingsParams.disableStandardEntries
|
|
3857
|
+
);
|
|
3858
|
+
const requestPath = "/1/dictionaries/*/settings";
|
|
3859
|
+
const headers = {};
|
|
3860
|
+
const queryParameters = {};
|
|
3861
|
+
const request = {
|
|
3862
|
+
method: "PUT",
|
|
3863
|
+
path: requestPath,
|
|
3864
|
+
queryParameters,
|
|
3865
|
+
headers,
|
|
3866
|
+
data: dictionarySettingsParams
|
|
3867
|
+
};
|
|
3868
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3869
|
+
},
|
|
2113
3870
|
/**
|
|
2114
3871
|
* Update the specified index settings. Index settings that you don\'t specify are left unchanged. Specify `null` to reset a setting to its default value. For best performance, update the index settings before you add new records to your index.
|
|
2115
3872
|
*
|
|
@@ -2139,6 +3896,38 @@ function createSearchClient({
|
|
|
2139
3896
|
};
|
|
2140
3897
|
return transporter.request(request, requestOptions);
|
|
2141
3898
|
},
|
|
3899
|
+
/**
|
|
3900
|
+
* 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.
|
|
3901
|
+
*
|
|
3902
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3903
|
+
*
|
|
3904
|
+
* Required API Key ACLs:
|
|
3905
|
+
* - editSettings
|
|
3906
|
+
* @param setSettings - The setSettings object.
|
|
3907
|
+
* @param setSettings.indexName - Name of the index on which to perform the operation.
|
|
3908
|
+
* @param setSettings.indexSettings - The indexSettings object.
|
|
3909
|
+
* @param setSettings.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3910
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3911
|
+
* @see setSettings for the plain version.
|
|
3912
|
+
*/
|
|
3913
|
+
setSettingsWithHTTPInfo({ indexName, indexSettings, forwardToReplicas }, requestOptions) {
|
|
3914
|
+
validateRequired("indexName", "setSettingsWithHTTPInfo", indexName);
|
|
3915
|
+
validateRequired("indexSettings", "setSettingsWithHTTPInfo", indexSettings);
|
|
3916
|
+
const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
|
|
3917
|
+
const headers = {};
|
|
3918
|
+
const queryParameters = {};
|
|
3919
|
+
if (forwardToReplicas !== void 0) {
|
|
3920
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3921
|
+
}
|
|
3922
|
+
const request = {
|
|
3923
|
+
method: "PUT",
|
|
3924
|
+
path: requestPath,
|
|
3925
|
+
queryParameters,
|
|
3926
|
+
headers,
|
|
3927
|
+
data: indexSettings
|
|
3928
|
+
};
|
|
3929
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3930
|
+
},
|
|
2142
3931
|
/**
|
|
2143
3932
|
* Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
|
|
2144
3933
|
*
|
|
@@ -2164,6 +3953,35 @@ function createSearchClient({
|
|
|
2164
3953
|
data: apiKey
|
|
2165
3954
|
};
|
|
2166
3955
|
return transporter.request(request, requestOptions);
|
|
3956
|
+
},
|
|
3957
|
+
/**
|
|
3958
|
+
* Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
|
|
3959
|
+
*
|
|
3960
|
+
* Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
|
|
3961
|
+
*
|
|
3962
|
+
* Required API Key ACLs:
|
|
3963
|
+
* - admin
|
|
3964
|
+
* @param updateApiKey - The updateApiKey object.
|
|
3965
|
+
* @param updateApiKey.key - API key.
|
|
3966
|
+
* @param updateApiKey.apiKey - The apiKey object.
|
|
3967
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3968
|
+
* @see updateApiKey for the plain version.
|
|
3969
|
+
*/
|
|
3970
|
+
updateApiKeyWithHTTPInfo({ key, apiKey }, requestOptions) {
|
|
3971
|
+
validateRequired("key", "updateApiKeyWithHTTPInfo", key);
|
|
3972
|
+
validateRequired("apiKey", "updateApiKeyWithHTTPInfo", apiKey);
|
|
3973
|
+
validateRequired("apiKey.acl", "updateApiKeyWithHTTPInfo", apiKey.acl);
|
|
3974
|
+
const requestPath = "/1/keys/{key}".replace("{key}", encodeURIComponent(key));
|
|
3975
|
+
const headers = {};
|
|
3976
|
+
const queryParameters = {};
|
|
3977
|
+
const request = {
|
|
3978
|
+
method: "PUT",
|
|
3979
|
+
path: requestPath,
|
|
3980
|
+
queryParameters,
|
|
3981
|
+
headers,
|
|
3982
|
+
data: apiKey
|
|
3983
|
+
};
|
|
3984
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2167
3985
|
}
|
|
2168
3986
|
};
|
|
2169
3987
|
}
|
|
@@ -2171,7 +3989,4 @@ export {
|
|
|
2171
3989
|
apiClientVersion,
|
|
2172
3990
|
createSearchClient
|
|
2173
3991
|
};
|
|
2174
|
-
//# sourceMappingURL=searchClient.js.mapClientVersion,
|
|
2175
|
-
createSearchClient
|
|
2176
|
-
};
|
|
2177
3992
|
//# sourceMappingURL=searchClient.js.map
|