algoliasearch 5.0.0-alpha.91 → 5.0.0-alpha.97

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.
Files changed (67) hide show
  1. package/builds/browser.ts +3 -9
  2. package/builds/models.ts +11 -5
  3. package/builds/node.ts +3 -9
  4. package/dist/algoliasearch/builds/browser.d.ts +7 -7
  5. package/dist/algoliasearch/builds/browser.d.ts.map +1 -1
  6. package/dist/algoliasearch/builds/models.d.ts +2 -2
  7. package/dist/algoliasearch/builds/models.d.ts.map +1 -1
  8. package/dist/algoliasearch/builds/node.d.ts +7 -7
  9. package/dist/algoliasearch/builds/node.d.ts.map +1 -1
  10. package/dist/algoliasearch.cjs +282 -282
  11. package/dist/algoliasearch.esm.browser.js +325 -301
  12. package/dist/algoliasearch.esm.node.js +282 -282
  13. package/dist/algoliasearch.umd.js +2 -2
  14. package/dist/client-abtesting/model/clientMethodProps.d.ts +42 -42
  15. package/dist/client-abtesting/model/clientMethodProps.d.ts.map +1 -1
  16. package/dist/client-abtesting/src/abtestingClient.d.ts +37 -37
  17. package/dist/client-abtesting/src/abtestingClient.d.ts.map +1 -1
  18. package/dist/client-analytics/model/clientMethodProps.d.ts +38 -38
  19. package/dist/client-analytics/model/clientMethodProps.d.ts.map +1 -1
  20. package/dist/client-analytics/src/analyticsClient.d.ts +32 -32
  21. package/dist/client-analytics/src/analyticsClient.d.ts.map +1 -1
  22. package/dist/client-personalization/model/clientMethodProps.d.ts +26 -26
  23. package/dist/client-personalization/model/clientMethodProps.d.ts.map +1 -1
  24. package/dist/client-personalization/src/personalizationClient.d.ts +37 -37
  25. package/dist/client-personalization/src/personalizationClient.d.ts.map +1 -1
  26. package/dist/client-search/model/clientMethodProps.d.ts +49 -49
  27. package/dist/client-search/model/clientMethodProps.d.ts.map +1 -1
  28. package/dist/client-search/model/highlightResult.d.ts +1 -1
  29. package/dist/client-search/model/highlightResult.d.ts.map +1 -1
  30. package/dist/client-search/model/searchForFacetValuesResponse.d.ts +8 -0
  31. package/dist/client-search/model/searchForFacetValuesResponse.d.ts.map +1 -1
  32. package/dist/client-search/model/searchResponses.d.ts +2 -2
  33. package/dist/client-search/model/searchResponses.d.ts.map +1 -1
  34. package/dist/client-search/model/searchResult.d.ts +1 -1
  35. package/dist/client-search/model/searchResult.d.ts.map +1 -1
  36. package/dist/client-search/model/snippetResult.d.ts +1 -1
  37. package/dist/client-search/model/snippetResult.d.ts.map +1 -1
  38. package/dist/client-search/model/userHighlightResult.d.ts +2 -8
  39. package/dist/client-search/model/userHighlightResult.d.ts.map +1 -1
  40. package/dist/client-search/src/searchClient.d.ts +40 -40
  41. package/dist/client-search/src/searchClient.d.ts.map +1 -1
  42. package/dist/lite/lite.cjs +7 -7
  43. package/dist/lite/lite.esm.browser.js +50 -26
  44. package/dist/lite/lite.esm.node.js +7 -7
  45. package/dist/lite/lite.umd.js +2 -2
  46. package/dist/lite/model/clientMethodProps.d.ts +2 -2
  47. package/dist/lite/model/clientMethodProps.d.ts.map +1 -1
  48. package/dist/lite/model/highlightResult.d.ts +1 -1
  49. package/dist/lite/model/highlightResult.d.ts.map +1 -1
  50. package/dist/lite/model/searchForFacetValuesResponse.d.ts +8 -0
  51. package/dist/lite/model/searchForFacetValuesResponse.d.ts.map +1 -1
  52. package/dist/lite/model/searchResponses.d.ts +2 -2
  53. package/dist/lite/model/searchResponses.d.ts.map +1 -1
  54. package/dist/lite/model/searchResult.d.ts +1 -1
  55. package/dist/lite/model/searchResult.d.ts.map +1 -1
  56. package/dist/lite/model/snippetResult.d.ts +1 -1
  57. package/dist/lite/model/snippetResult.d.ts.map +1 -1
  58. package/dist/lite/src/liteClient.d.ts +8 -8
  59. package/dist/lite/src/liteClient.d.ts.map +1 -1
  60. package/lite/model/clientMethodProps.ts +2 -2
  61. package/lite/model/highlightResult.ts +3 -1
  62. package/lite/model/searchForFacetValuesResponse.ts +10 -0
  63. package/lite/model/searchResponses.ts +2 -2
  64. package/lite/model/searchResult.ts +3 -1
  65. package/lite/model/snippetResult.ts +3 -1
  66. package/lite/src/liteClient.ts +13 -11
  67. package/package.json +13 -13
@@ -66,14 +66,35 @@ function createBrowserLocalStorageCache(options) {
66
66
  function getNamespace() {
67
67
  return JSON.parse(getStorage().getItem(namespaceKey) || '{}');
68
68
  }
69
+ function setNamespace(namespace) {
70
+ getStorage().setItem(namespaceKey, JSON.stringify(namespace));
71
+ }
72
+ function removeOutdatedCacheItems() {
73
+ const timeToLive = options.timeToLive ? options.timeToLive * 1000 : null;
74
+ const namespace = getNamespace();
75
+ const filteredNamespaceWithoutOldFormattedCacheItems = Object.fromEntries(Object.entries(namespace).filter(([, cacheItem]) => {
76
+ return cacheItem.timestamp !== undefined;
77
+ }));
78
+ setNamespace(filteredNamespaceWithoutOldFormattedCacheItems);
79
+ if (!timeToLive) {
80
+ return;
81
+ }
82
+ const filteredNamespaceWithoutExpiredItems = Object.fromEntries(Object.entries(filteredNamespaceWithoutOldFormattedCacheItems).filter(([, cacheItem]) => {
83
+ const currentTimestamp = new Date().getTime();
84
+ const isExpired = cacheItem.timestamp + timeToLive < currentTimestamp;
85
+ return !isExpired;
86
+ }));
87
+ setNamespace(filteredNamespaceWithoutExpiredItems);
88
+ }
69
89
  return {
70
90
  get(key, defaultValue, events = {
71
91
  miss: () => Promise.resolve()
72
92
  }) {
73
93
  return Promise.resolve().then(() => {
74
- const keyAsString = JSON.stringify(key);
75
- const value = getNamespace()[keyAsString];
76
- return Promise.all([value || defaultValue(), value !== undefined]);
94
+ removeOutdatedCacheItems();
95
+ return getNamespace()[JSON.stringify(key)];
96
+ }).then(value => {
97
+ return Promise.all([value ? value.value : defaultValue(), value !== undefined]);
77
98
  }).then(([value, exists]) => {
78
99
  return Promise.all([value, exists || events.miss(value)]);
79
100
  }).then(([value]) => value);
@@ -81,7 +102,10 @@ function createBrowserLocalStorageCache(options) {
81
102
  set(key, value) {
82
103
  return Promise.resolve().then(() => {
83
104
  const namespace = getNamespace();
84
- namespace[JSON.stringify(key)] = value;
105
+ namespace[JSON.stringify(key)] = {
106
+ timestamp: new Date().getTime(),
107
+ value
108
+ };
85
109
  getStorage().setItem(namespaceKey, JSON.stringify(namespace));
86
110
  return value;
87
111
  });
@@ -211,6 +235,20 @@ function createStatefulHost(host, status = 'up') {
211
235
  };
212
236
  }
213
237
 
238
+ function _toPrimitive(t, r) {
239
+ if ("object" != typeof t || !t) return t;
240
+ var e = t[Symbol.toPrimitive];
241
+ if (void 0 !== e) {
242
+ var i = e.call(t, r || "default");
243
+ if ("object" != typeof i) return i;
244
+ throw new TypeError("@@toPrimitive must return a primitive value.");
245
+ }
246
+ return ("string" === r ? String : Number)(t);
247
+ }
248
+ function _toPropertyKey(t) {
249
+ var i = _toPrimitive(t, "string");
250
+ return "symbol" == typeof i ? i : String(i);
251
+ }
214
252
  function _defineProperty(obj, key, value) {
215
253
  key = _toPropertyKey(key);
216
254
  if (key in obj) {
@@ -225,20 +263,6 @@ function _defineProperty(obj, key, value) {
225
263
  }
226
264
  return obj;
227
265
  }
228
- function _toPrimitive(input, hint) {
229
- if (typeof input !== "object" || input === null) return input;
230
- var prim = input[Symbol.toPrimitive];
231
- if (prim !== undefined) {
232
- var res = prim.call(input, hint || "default");
233
- if (typeof res !== "object") return res;
234
- throw new TypeError("@@toPrimitive must return a primitive value.");
235
- }
236
- return (hint === "string" ? String : Number)(input);
237
- }
238
- function _toPropertyKey(arg) {
239
- var key = _toPrimitive(arg, "string");
240
- return typeof key === "symbol" ? key : String(key);
241
- }
242
266
 
243
267
  class AlgoliaError extends Error {
244
268
  constructor(message, name) {
@@ -259,7 +283,7 @@ class ErrorWithStackTrace extends AlgoliaError {
259
283
  }
260
284
  class RetryError extends ErrorWithStackTrace {
261
285
  constructor(stackTrace) {
262
- super('Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.', stackTrace, 'RetryError');
286
+ super('Unreachable hosts - your application id may be incorrect. If the error persists, please create a ticket at https://support.algolia.com/ sharing steps we can use to reproduce the issue.', stackTrace, 'RetryError');
263
287
  }
264
288
  }
265
289
  class ApiError extends ErrorWithStackTrace {
@@ -661,7 +685,7 @@ const DEFAULT_READ_TIMEOUT_BROWSER = 2000;
661
685
  const DEFAULT_WRITE_TIMEOUT_BROWSER = 30000;
662
686
 
663
687
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
664
- const apiClientVersion$4 = '5.0.0-alpha.91';
688
+ const apiClientVersion$4 = '5.0.0-alpha.97';
665
689
  const REGIONS$2 = ['de', 'us'];
666
690
  function getDefaultHosts$3(region) {
667
691
  const url = !region
@@ -756,14 +780,14 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
756
780
  * This method allow you to send requests to the Algolia REST API.
757
781
  *
758
782
  * @summary Send requests to the Algolia REST API.
759
- * @param del - The del object.
760
- * @param del.path - Path of the endpoint, anything after \"/1\" must be specified.
761
- * @param del.parameters - Query parameters to apply to the current query.
783
+ * @param customDelete - The customDelete object.
784
+ * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
785
+ * @param customDelete.parameters - Query parameters to apply to the current query.
762
786
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
763
787
  */
764
- del({ path, parameters }, requestOptions) {
788
+ customDelete({ path, parameters }, requestOptions) {
765
789
  if (!path) {
766
- throw new Error('Parameter `path` is required when calling `del`.');
790
+ throw new Error('Parameter `path` is required when calling `customDelete`.');
767
791
  }
768
792
  const requestPath = '/1{path}'.replace('{path}', path);
769
793
  const headers = {};
@@ -777,22 +801,23 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
777
801
  return transporter.request(request, requestOptions);
778
802
  },
779
803
  /**
780
- * Delete an A/B test. To determine the `id` for an A/B test, use the [`listABTests` operation](#tag/abtest/operation/listABTests).
804
+ * This method allow you to send requests to the Algolia REST API.
781
805
  *
782
- * @summary Delete an A/B test.
783
- * @param deleteABTest - The deleteABTest object.
784
- * @param deleteABTest.id - Unique A/B test ID.
806
+ * @summary Send requests to the Algolia REST API.
807
+ * @param customGet - The customGet object.
808
+ * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
809
+ * @param customGet.parameters - Query parameters to apply to the current query.
785
810
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
786
811
  */
787
- deleteABTest({ id }, requestOptions) {
788
- if (!id) {
789
- throw new Error('Parameter `id` is required when calling `deleteABTest`.');
812
+ customGet({ path, parameters }, requestOptions) {
813
+ if (!path) {
814
+ throw new Error('Parameter `path` is required when calling `customGet`.');
790
815
  }
791
- const requestPath = '/2/abtests/{id}'.replace('{id}', encodeURIComponent(id));
816
+ const requestPath = '/1{path}'.replace('{path}', path);
792
817
  const headers = {};
793
- const queryParameters = {};
818
+ const queryParameters = parameters ? parameters : {};
794
819
  const request = {
795
- method: 'DELETE',
820
+ method: 'GET',
796
821
  path: requestPath,
797
822
  queryParameters,
798
823
  headers,
@@ -803,20 +828,71 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
803
828
  * This method allow you to send requests to the Algolia REST API.
804
829
  *
805
830
  * @summary Send requests to the Algolia REST API.
806
- * @param get - The get object.
807
- * @param get.path - Path of the endpoint, anything after \"/1\" must be specified.
808
- * @param get.parameters - Query parameters to apply to the current query.
831
+ * @param customPost - The customPost object.
832
+ * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
833
+ * @param customPost.parameters - Query parameters to apply to the current query.
834
+ * @param customPost.body - Parameters to send with the custom request.
809
835
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
810
836
  */
811
- get({ path, parameters }, requestOptions) {
837
+ customPost({ path, parameters, body }, requestOptions) {
812
838
  if (!path) {
813
- throw new Error('Parameter `path` is required when calling `get`.');
839
+ throw new Error('Parameter `path` is required when calling `customPost`.');
814
840
  }
815
841
  const requestPath = '/1{path}'.replace('{path}', path);
816
842
  const headers = {};
817
843
  const queryParameters = parameters ? parameters : {};
818
844
  const request = {
819
- method: 'GET',
845
+ method: 'POST',
846
+ path: requestPath,
847
+ queryParameters,
848
+ headers,
849
+ data: body ? body : {},
850
+ };
851
+ return transporter.request(request, requestOptions);
852
+ },
853
+ /**
854
+ * This method allow you to send requests to the Algolia REST API.
855
+ *
856
+ * @summary Send requests to the Algolia REST API.
857
+ * @param customPut - The customPut object.
858
+ * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
859
+ * @param customPut.parameters - Query parameters to apply to the current query.
860
+ * @param customPut.body - Parameters to send with the custom request.
861
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
862
+ */
863
+ customPut({ path, parameters, body }, requestOptions) {
864
+ if (!path) {
865
+ throw new Error('Parameter `path` is required when calling `customPut`.');
866
+ }
867
+ const requestPath = '/1{path}'.replace('{path}', path);
868
+ const headers = {};
869
+ const queryParameters = parameters ? parameters : {};
870
+ const request = {
871
+ method: 'PUT',
872
+ path: requestPath,
873
+ queryParameters,
874
+ headers,
875
+ data: body ? body : {},
876
+ };
877
+ return transporter.request(request, requestOptions);
878
+ },
879
+ /**
880
+ * Delete an A/B test. To determine the `id` for an A/B test, use the [`listABTests` operation](#tag/abtest/operation/listABTests).
881
+ *
882
+ * @summary Delete an A/B test.
883
+ * @param deleteABTest - The deleteABTest object.
884
+ * @param deleteABTest.id - Unique A/B test ID.
885
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
886
+ */
887
+ deleteABTest({ id }, requestOptions) {
888
+ if (!id) {
889
+ throw new Error('Parameter `id` is required when calling `deleteABTest`.');
890
+ }
891
+ const requestPath = '/2/abtests/{id}'.replace('{id}', encodeURIComponent(id));
892
+ const headers = {};
893
+ const queryParameters = {};
894
+ const request = {
895
+ method: 'DELETE',
820
896
  path: requestPath,
821
897
  queryParameters,
822
898
  headers,
@@ -881,58 +957,6 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
881
957
  };
882
958
  return transporter.request(request, requestOptions);
883
959
  },
884
- /**
885
- * This method allow you to send requests to the Algolia REST API.
886
- *
887
- * @summary Send requests to the Algolia REST API.
888
- * @param post - The post object.
889
- * @param post.path - Path of the endpoint, anything after \"/1\" must be specified.
890
- * @param post.parameters - Query parameters to apply to the current query.
891
- * @param post.body - Parameters to send with the custom request.
892
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
893
- */
894
- post({ path, parameters, body }, requestOptions) {
895
- if (!path) {
896
- throw new Error('Parameter `path` is required when calling `post`.');
897
- }
898
- const requestPath = '/1{path}'.replace('{path}', path);
899
- const headers = {};
900
- const queryParameters = parameters ? parameters : {};
901
- const request = {
902
- method: 'POST',
903
- path: requestPath,
904
- queryParameters,
905
- headers,
906
- data: body ? body : {},
907
- };
908
- return transporter.request(request, requestOptions);
909
- },
910
- /**
911
- * This method allow you to send requests to the Algolia REST API.
912
- *
913
- * @summary Send requests to the Algolia REST API.
914
- * @param put - The put object.
915
- * @param put.path - Path of the endpoint, anything after \"/1\" must be specified.
916
- * @param put.parameters - Query parameters to apply to the current query.
917
- * @param put.body - Parameters to send with the custom request.
918
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
919
- */
920
- put({ path, parameters, body }, requestOptions) {
921
- if (!path) {
922
- throw new Error('Parameter `path` is required when calling `put`.');
923
- }
924
- const requestPath = '/1{path}'.replace('{path}', path);
925
- const headers = {};
926
- const queryParameters = parameters ? parameters : {};
927
- const request = {
928
- method: 'PUT',
929
- path: requestPath,
930
- queryParameters,
931
- headers,
932
- data: body ? body : {},
933
- };
934
- return transporter.request(request, requestOptions);
935
- },
936
960
  /**
937
961
  * If stopped, the test is over and can\'t be restarted. There is now only one index, receiving 100% of all search requests. The data gathered for stopped A/B tests is retained. To determine the `id` for an A/B test, use the [`listABTests` operation](#tag/abtest/operation/listABTests).
938
962
  *
@@ -960,7 +984,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
960
984
  }
961
985
 
962
986
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
963
- const apiClientVersion$3 = '5.0.0-alpha.91';
987
+ const apiClientVersion$3 = '5.0.0-alpha.97';
964
988
  const REGIONS$1 = ['de', 'us'];
965
989
  function getDefaultHosts$2(region) {
966
990
  const url = !region
@@ -1023,14 +1047,14 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1023
1047
  * This method allow you to send requests to the Algolia REST API.
1024
1048
  *
1025
1049
  * @summary Send requests to the Algolia REST API.
1026
- * @param del - The del object.
1027
- * @param del.path - Path of the endpoint, anything after \"/1\" must be specified.
1028
- * @param del.parameters - Query parameters to apply to the current query.
1050
+ * @param customDelete - The customDelete object.
1051
+ * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
1052
+ * @param customDelete.parameters - Query parameters to apply to the current query.
1029
1053
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1030
1054
  */
1031
- del({ path, parameters }, requestOptions) {
1055
+ customDelete({ path, parameters }, requestOptions) {
1032
1056
  if (!path) {
1033
- throw new Error('Parameter `path` is required when calling `del`.');
1057
+ throw new Error('Parameter `path` is required when calling `customDelete`.');
1034
1058
  }
1035
1059
  const requestPath = '/1{path}'.replace('{path}', path);
1036
1060
  const headers = {};
@@ -1047,14 +1071,14 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1047
1071
  * This method allow you to send requests to the Algolia REST API.
1048
1072
  *
1049
1073
  * @summary Send requests to the Algolia REST API.
1050
- * @param get - The get object.
1051
- * @param get.path - Path of the endpoint, anything after \"/1\" must be specified.
1052
- * @param get.parameters - Query parameters to apply to the current query.
1074
+ * @param customGet - The customGet object.
1075
+ * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
1076
+ * @param customGet.parameters - Query parameters to apply to the current query.
1053
1077
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1054
1078
  */
1055
- get({ path, parameters }, requestOptions) {
1079
+ customGet({ path, parameters }, requestOptions) {
1056
1080
  if (!path) {
1057
- throw new Error('Parameter `path` is required when calling `get`.');
1081
+ throw new Error('Parameter `path` is required when calling `customGet`.');
1058
1082
  }
1059
1083
  const requestPath = '/1{path}'.replace('{path}', path);
1060
1084
  const headers = {};
@@ -1067,6 +1091,58 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1067
1091
  };
1068
1092
  return transporter.request(request, requestOptions);
1069
1093
  },
1094
+ /**
1095
+ * This method allow you to send requests to the Algolia REST API.
1096
+ *
1097
+ * @summary Send requests to the Algolia REST API.
1098
+ * @param customPost - The customPost object.
1099
+ * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
1100
+ * @param customPost.parameters - Query parameters to apply to the current query.
1101
+ * @param customPost.body - Parameters to send with the custom request.
1102
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1103
+ */
1104
+ customPost({ path, parameters, body }, requestOptions) {
1105
+ if (!path) {
1106
+ throw new Error('Parameter `path` is required when calling `customPost`.');
1107
+ }
1108
+ const requestPath = '/1{path}'.replace('{path}', path);
1109
+ const headers = {};
1110
+ const queryParameters = parameters ? parameters : {};
1111
+ const request = {
1112
+ method: 'POST',
1113
+ path: requestPath,
1114
+ queryParameters,
1115
+ headers,
1116
+ data: body ? body : {},
1117
+ };
1118
+ return transporter.request(request, requestOptions);
1119
+ },
1120
+ /**
1121
+ * This method allow you to send requests to the Algolia REST API.
1122
+ *
1123
+ * @summary Send requests to the Algolia REST API.
1124
+ * @param customPut - The customPut object.
1125
+ * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
1126
+ * @param customPut.parameters - Query parameters to apply to the current query.
1127
+ * @param customPut.body - Parameters to send with the custom request.
1128
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1129
+ */
1130
+ customPut({ path, parameters, body }, requestOptions) {
1131
+ if (!path) {
1132
+ throw new Error('Parameter `path` is required when calling `customPut`.');
1133
+ }
1134
+ const requestPath = '/1{path}'.replace('{path}', path);
1135
+ const headers = {};
1136
+ const queryParameters = parameters ? parameters : {};
1137
+ const request = {
1138
+ method: 'PUT',
1139
+ path: requestPath,
1140
+ queryParameters,
1141
+ headers,
1142
+ data: body ? body : {},
1143
+ };
1144
+ return transporter.request(request, requestOptions);
1145
+ },
1070
1146
  /**
1071
1147
  * Return the average click position for the complete time range and for individual days. > **Note**: If all `positions` have a `clickCount` of `0` or `null`, it means Algolia didn\'t receive any click events for tracked searches. A _tracked_ search is a search request where the `clickAnalytics` parameter is `true`.
1072
1148
  *
@@ -1801,63 +1877,11 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1801
1877
  };
1802
1878
  return transporter.request(request, requestOptions);
1803
1879
  },
1804
- /**
1805
- * This method allow you to send requests to the Algolia REST API.
1806
- *
1807
- * @summary Send requests to the Algolia REST API.
1808
- * @param post - The post object.
1809
- * @param post.path - Path of the endpoint, anything after \"/1\" must be specified.
1810
- * @param post.parameters - Query parameters to apply to the current query.
1811
- * @param post.body - Parameters to send with the custom request.
1812
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1813
- */
1814
- post({ path, parameters, body }, requestOptions) {
1815
- if (!path) {
1816
- throw new Error('Parameter `path` is required when calling `post`.');
1817
- }
1818
- const requestPath = '/1{path}'.replace('{path}', path);
1819
- const headers = {};
1820
- const queryParameters = parameters ? parameters : {};
1821
- const request = {
1822
- method: 'POST',
1823
- path: requestPath,
1824
- queryParameters,
1825
- headers,
1826
- data: body ? body : {},
1827
- };
1828
- return transporter.request(request, requestOptions);
1829
- },
1830
- /**
1831
- * This method allow you to send requests to the Algolia REST API.
1832
- *
1833
- * @summary Send requests to the Algolia REST API.
1834
- * @param put - The put object.
1835
- * @param put.path - Path of the endpoint, anything after \"/1\" must be specified.
1836
- * @param put.parameters - Query parameters to apply to the current query.
1837
- * @param put.body - Parameters to send with the custom request.
1838
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1839
- */
1840
- put({ path, parameters, body }, requestOptions) {
1841
- if (!path) {
1842
- throw new Error('Parameter `path` is required when calling `put`.');
1843
- }
1844
- const requestPath = '/1{path}'.replace('{path}', path);
1845
- const headers = {};
1846
- const queryParameters = parameters ? parameters : {};
1847
- const request = {
1848
- method: 'PUT',
1849
- path: requestPath,
1850
- queryParameters,
1851
- headers,
1852
- data: body ? body : {},
1853
- };
1854
- return transporter.request(request, requestOptions);
1855
- },
1856
1880
  };
1857
1881
  }
1858
1882
 
1859
1883
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
1860
- const apiClientVersion$2 = '5.0.0-alpha.91';
1884
+ const apiClientVersion$2 = '5.0.0-alpha.97';
1861
1885
  const REGIONS = ['eu', 'us'];
1862
1886
  function getDefaultHosts$1(region) {
1863
1887
  const url = 'personalization.{region}.algolia.com'.replace('{region}', region);
@@ -1918,14 +1942,14 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1918
1942
  * This method allow you to send requests to the Algolia REST API.
1919
1943
  *
1920
1944
  * @summary Send requests to the Algolia REST API.
1921
- * @param del - The del object.
1922
- * @param del.path - Path of the endpoint, anything after \"/1\" must be specified.
1923
- * @param del.parameters - Query parameters to apply to the current query.
1945
+ * @param customDelete - The customDelete object.
1946
+ * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
1947
+ * @param customDelete.parameters - Query parameters to apply to the current query.
1924
1948
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1925
1949
  */
1926
- del({ path, parameters }, requestOptions) {
1950
+ customDelete({ path, parameters }, requestOptions) {
1927
1951
  if (!path) {
1928
- throw new Error('Parameter `path` is required when calling `del`.');
1952
+ throw new Error('Parameter `path` is required when calling `customDelete`.');
1929
1953
  }
1930
1954
  const requestPath = '/1{path}'.replace('{path}', path);
1931
1955
  const headers = {};
@@ -1939,22 +1963,23 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1939
1963
  return transporter.request(request, requestOptions);
1940
1964
  },
1941
1965
  /**
1942
- * Delete the user profile and all its associated data. Returns, as part of the response, a date until which the data can safely be considered as deleted for the given user. This means if you send events for the given user before this date, they will be ignored. Any data received after the deletedUntil date will start building a new user profile. It might take a couple hours for the deletion request to be fully processed.
1966
+ * This method allow you to send requests to the Algolia REST API.
1943
1967
  *
1944
- * @summary Delete a user profile.
1945
- * @param deleteUserProfile - The deleteUserProfile object.
1946
- * @param deleteUserProfile.userToken - UserToken representing the user for which to fetch the Personalization profile.
1968
+ * @summary Send requests to the Algolia REST API.
1969
+ * @param customGet - The customGet object.
1970
+ * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
1971
+ * @param customGet.parameters - Query parameters to apply to the current query.
1947
1972
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1948
1973
  */
1949
- deleteUserProfile({ userToken }, requestOptions) {
1950
- if (!userToken) {
1951
- throw new Error('Parameter `userToken` is required when calling `deleteUserProfile`.');
1974
+ customGet({ path, parameters }, requestOptions) {
1975
+ if (!path) {
1976
+ throw new Error('Parameter `path` is required when calling `customGet`.');
1952
1977
  }
1953
- const requestPath = '/1/profiles/{userToken}'.replace('{userToken}', encodeURIComponent(userToken));
1978
+ const requestPath = '/1{path}'.replace('{path}', path);
1954
1979
  const headers = {};
1955
- const queryParameters = {};
1980
+ const queryParameters = parameters ? parameters : {};
1956
1981
  const request = {
1957
- method: 'DELETE',
1982
+ method: 'GET',
1958
1983
  path: requestPath,
1959
1984
  queryParameters,
1960
1985
  headers,
@@ -1965,61 +1990,71 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1965
1990
  * This method allow you to send requests to the Algolia REST API.
1966
1991
  *
1967
1992
  * @summary Send requests to the Algolia REST API.
1968
- * @param get - The get object.
1969
- * @param get.path - Path of the endpoint, anything after \"/1\" must be specified.
1970
- * @param get.parameters - Query parameters to apply to the current query.
1993
+ * @param customPost - The customPost object.
1994
+ * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
1995
+ * @param customPost.parameters - Query parameters to apply to the current query.
1996
+ * @param customPost.body - Parameters to send with the custom request.
1971
1997
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1972
1998
  */
1973
- get({ path, parameters }, requestOptions) {
1999
+ customPost({ path, parameters, body }, requestOptions) {
1974
2000
  if (!path) {
1975
- throw new Error('Parameter `path` is required when calling `get`.');
2001
+ throw new Error('Parameter `path` is required when calling `customPost`.');
1976
2002
  }
1977
2003
  const requestPath = '/1{path}'.replace('{path}', path);
1978
2004
  const headers = {};
1979
2005
  const queryParameters = parameters ? parameters : {};
1980
2006
  const request = {
1981
- method: 'GET',
2007
+ method: 'POST',
1982
2008
  path: requestPath,
1983
2009
  queryParameters,
1984
2010
  headers,
2011
+ data: body ? body : {},
1985
2012
  };
1986
2013
  return transporter.request(request, requestOptions);
1987
2014
  },
1988
2015
  /**
1989
- * The strategy contains information on the events and facets that impact user profiles and personalized search results.
2016
+ * This method allow you to send requests to the Algolia REST API.
1990
2017
  *
1991
- * @summary Get the current strategy.
2018
+ * @summary Send requests to the Algolia REST API.
2019
+ * @param customPut - The customPut object.
2020
+ * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
2021
+ * @param customPut.parameters - Query parameters to apply to the current query.
2022
+ * @param customPut.body - Parameters to send with the custom request.
1992
2023
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1993
2024
  */
1994
- getPersonalizationStrategy(requestOptions) {
1995
- const requestPath = '/1/strategies/personalization';
2025
+ customPut({ path, parameters, body }, requestOptions) {
2026
+ if (!path) {
2027
+ throw new Error('Parameter `path` is required when calling `customPut`.');
2028
+ }
2029
+ const requestPath = '/1{path}'.replace('{path}', path);
1996
2030
  const headers = {};
1997
- const queryParameters = {};
2031
+ const queryParameters = parameters ? parameters : {};
1998
2032
  const request = {
1999
- method: 'GET',
2033
+ method: 'PUT',
2000
2034
  path: requestPath,
2001
2035
  queryParameters,
2002
2036
  headers,
2037
+ data: body ? body : {},
2003
2038
  };
2004
2039
  return transporter.request(request, requestOptions);
2005
2040
  },
2006
2041
  /**
2007
- * Get the user profile built from Personalization strategy. The profile is structured by facet name used in the strategy. Each facet value is mapped to its score. Each score represents the user affinity for a specific facet value given the userToken past events and the Personalization strategy defined. Scores are bounded to 20. The last processed event timestamp is provided using the ISO 8601 format for debugging purposes.
2042
+ * Delete the user profile and all its associated data. Returns, as part of the response, a date until which the data can safely be considered as deleted for the given user. This means if you send events for the given user before this date, they will be ignored. Any data received after the deletedUntil date will start building a new user profile. It might take a couple hours for the deletion request to be fully processed.
2008
2043
  *
2009
- * @summary Get a user profile.
2010
- * @param getUserTokenProfile - The getUserTokenProfile object.
2011
- * @param getUserTokenProfile.userToken - UserToken representing the user for which to fetch the Personalization profile.
2044
+ * @summary Delete a user profile.
2045
+ * @param deleteUserProfile - The deleteUserProfile object.
2046
+ * @param deleteUserProfile.userToken - UserToken representing the user for which to fetch the Personalization profile.
2012
2047
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2013
2048
  */
2014
- getUserTokenProfile({ userToken }, requestOptions) {
2049
+ deleteUserProfile({ userToken }, requestOptions) {
2015
2050
  if (!userToken) {
2016
- throw new Error('Parameter `userToken` is required when calling `getUserTokenProfile`.');
2051
+ throw new Error('Parameter `userToken` is required when calling `deleteUserProfile`.');
2017
2052
  }
2018
- const requestPath = '/1/profiles/personalization/{userToken}'.replace('{userToken}', encodeURIComponent(userToken));
2053
+ const requestPath = '/1/profiles/{userToken}'.replace('{userToken}', encodeURIComponent(userToken));
2019
2054
  const headers = {};
2020
2055
  const queryParameters = {};
2021
2056
  const request = {
2022
- method: 'GET',
2057
+ method: 'DELETE',
2023
2058
  path: requestPath,
2024
2059
  queryParameters,
2025
2060
  headers,
@@ -2027,54 +2062,43 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
2027
2062
  return transporter.request(request, requestOptions);
2028
2063
  },
2029
2064
  /**
2030
- * This method allow you to send requests to the Algolia REST API.
2065
+ * The strategy contains information on the events and facets that impact user profiles and personalized search results.
2031
2066
  *
2032
- * @summary Send requests to the Algolia REST API.
2033
- * @param post - The post object.
2034
- * @param post.path - Path of the endpoint, anything after \"/1\" must be specified.
2035
- * @param post.parameters - Query parameters to apply to the current query.
2036
- * @param post.body - Parameters to send with the custom request.
2067
+ * @summary Get the current strategy.
2037
2068
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2038
2069
  */
2039
- post({ path, parameters, body }, requestOptions) {
2040
- if (!path) {
2041
- throw new Error('Parameter `path` is required when calling `post`.');
2042
- }
2043
- const requestPath = '/1{path}'.replace('{path}', path);
2070
+ getPersonalizationStrategy(requestOptions) {
2071
+ const requestPath = '/1/strategies/personalization';
2044
2072
  const headers = {};
2045
- const queryParameters = parameters ? parameters : {};
2073
+ const queryParameters = {};
2046
2074
  const request = {
2047
- method: 'POST',
2075
+ method: 'GET',
2048
2076
  path: requestPath,
2049
2077
  queryParameters,
2050
2078
  headers,
2051
- data: body ? body : {},
2052
2079
  };
2053
2080
  return transporter.request(request, requestOptions);
2054
2081
  },
2055
2082
  /**
2056
- * This method allow you to send requests to the Algolia REST API.
2083
+ * Get the user profile built from Personalization strategy. The profile is structured by facet name used in the strategy. Each facet value is mapped to its score. Each score represents the user affinity for a specific facet value given the userToken past events and the Personalization strategy defined. Scores are bounded to 20. The last processed event timestamp is provided using the ISO 8601 format for debugging purposes.
2057
2084
  *
2058
- * @summary Send requests to the Algolia REST API.
2059
- * @param put - The put object.
2060
- * @param put.path - Path of the endpoint, anything after \"/1\" must be specified.
2061
- * @param put.parameters - Query parameters to apply to the current query.
2062
- * @param put.body - Parameters to send with the custom request.
2085
+ * @summary Get a user profile.
2086
+ * @param getUserTokenProfile - The getUserTokenProfile object.
2087
+ * @param getUserTokenProfile.userToken - UserToken representing the user for which to fetch the Personalization profile.
2063
2088
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2064
2089
  */
2065
- put({ path, parameters, body }, requestOptions) {
2066
- if (!path) {
2067
- throw new Error('Parameter `path` is required when calling `put`.');
2090
+ getUserTokenProfile({ userToken }, requestOptions) {
2091
+ if (!userToken) {
2092
+ throw new Error('Parameter `userToken` is required when calling `getUserTokenProfile`.');
2068
2093
  }
2069
- const requestPath = '/1{path}'.replace('{path}', path);
2094
+ const requestPath = '/1/profiles/personalization/{userToken}'.replace('{userToken}', encodeURIComponent(userToken));
2070
2095
  const headers = {};
2071
- const queryParameters = parameters ? parameters : {};
2096
+ const queryParameters = {};
2072
2097
  const request = {
2073
- method: 'PUT',
2098
+ method: 'GET',
2074
2099
  path: requestPath,
2075
2100
  queryParameters,
2076
2101
  headers,
2077
- data: body ? body : {},
2078
2102
  };
2079
2103
  return transporter.request(request, requestOptions);
2080
2104
  },
@@ -2114,7 +2138,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
2114
2138
  }
2115
2139
 
2116
2140
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2117
- const apiClientVersion$1 = '5.0.0-alpha.91';
2141
+ const apiClientVersion$1 = '5.0.0-alpha.97';
2118
2142
  function getDefaultHosts(appId) {
2119
2143
  return [
2120
2144
  {
@@ -2707,14 +2731,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2707
2731
  * This method allow you to send requests to the Algolia REST API.
2708
2732
  *
2709
2733
  * @summary Send requests to the Algolia REST API.
2710
- * @param del - The del object.
2711
- * @param del.path - Path of the endpoint, anything after \"/1\" must be specified.
2712
- * @param del.parameters - Query parameters to apply to the current query.
2734
+ * @param customDelete - The customDelete object.
2735
+ * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
2736
+ * @param customDelete.parameters - Query parameters to apply to the current query.
2713
2737
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2714
2738
  */
2715
- del({ path, parameters }, requestOptions) {
2739
+ customDelete({ path, parameters }, requestOptions) {
2716
2740
  if (!path) {
2717
- throw new Error('Parameter `path` is required when calling `del`.');
2741
+ throw new Error('Parameter `path` is required when calling `customDelete`.');
2718
2742
  }
2719
2743
  const requestPath = '/1{path}'.replace('{path}', path);
2720
2744
  const headers = {};
@@ -2727,6 +2751,82 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2727
2751
  };
2728
2752
  return transporter.request(request, requestOptions);
2729
2753
  },
2754
+ /**
2755
+ * This method allow you to send requests to the Algolia REST API.
2756
+ *
2757
+ * @summary Send requests to the Algolia REST API.
2758
+ * @param customGet - The customGet object.
2759
+ * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
2760
+ * @param customGet.parameters - Query parameters to apply to the current query.
2761
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2762
+ */
2763
+ customGet({ path, parameters }, requestOptions) {
2764
+ if (!path) {
2765
+ throw new Error('Parameter `path` is required when calling `customGet`.');
2766
+ }
2767
+ const requestPath = '/1{path}'.replace('{path}', path);
2768
+ const headers = {};
2769
+ const queryParameters = parameters ? parameters : {};
2770
+ const request = {
2771
+ method: 'GET',
2772
+ path: requestPath,
2773
+ queryParameters,
2774
+ headers,
2775
+ };
2776
+ return transporter.request(request, requestOptions);
2777
+ },
2778
+ /**
2779
+ * This method allow you to send requests to the Algolia REST API.
2780
+ *
2781
+ * @summary Send requests to the Algolia REST API.
2782
+ * @param customPost - The customPost object.
2783
+ * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
2784
+ * @param customPost.parameters - Query parameters to apply to the current query.
2785
+ * @param customPost.body - Parameters to send with the custom request.
2786
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2787
+ */
2788
+ customPost({ path, parameters, body }, requestOptions) {
2789
+ if (!path) {
2790
+ throw new Error('Parameter `path` is required when calling `customPost`.');
2791
+ }
2792
+ const requestPath = '/1{path}'.replace('{path}', path);
2793
+ const headers = {};
2794
+ const queryParameters = parameters ? parameters : {};
2795
+ const request = {
2796
+ method: 'POST',
2797
+ path: requestPath,
2798
+ queryParameters,
2799
+ headers,
2800
+ data: body ? body : {},
2801
+ };
2802
+ return transporter.request(request, requestOptions);
2803
+ },
2804
+ /**
2805
+ * This method allow you to send requests to the Algolia REST API.
2806
+ *
2807
+ * @summary Send requests to the Algolia REST API.
2808
+ * @param customPut - The customPut object.
2809
+ * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
2810
+ * @param customPut.parameters - Query parameters to apply to the current query.
2811
+ * @param customPut.body - Parameters to send with the custom request.
2812
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2813
+ */
2814
+ customPut({ path, parameters, body }, requestOptions) {
2815
+ if (!path) {
2816
+ throw new Error('Parameter `path` is required when calling `customPut`.');
2817
+ }
2818
+ const requestPath = '/1{path}'.replace('{path}', path);
2819
+ const headers = {};
2820
+ const queryParameters = parameters ? parameters : {};
2821
+ const request = {
2822
+ method: 'PUT',
2823
+ path: requestPath,
2824
+ queryParameters,
2825
+ headers,
2826
+ data: body ? body : {},
2827
+ };
2828
+ return transporter.request(request, requestOptions);
2829
+ },
2730
2830
  /**
2731
2831
  * Delete an existing API key. The request must be authenticated with the admin API key.
2732
2832
  *
@@ -2919,30 +3019,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2919
3019
  };
2920
3020
  return transporter.request(request, requestOptions);
2921
3021
  },
2922
- /**
2923
- * This method allow you to send requests to the Algolia REST API.
2924
- *
2925
- * @summary Send requests to the Algolia REST API.
2926
- * @param get - The get object.
2927
- * @param get.path - Path of the endpoint, anything after \"/1\" must be specified.
2928
- * @param get.parameters - Query parameters to apply to the current query.
2929
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2930
- */
2931
- get({ path, parameters }, requestOptions) {
2932
- if (!path) {
2933
- throw new Error('Parameter `path` is required when calling `get`.');
2934
- }
2935
- const requestPath = '/1{path}'.replace('{path}', path);
2936
- const headers = {};
2937
- const queryParameters = parameters ? parameters : {};
2938
- const request = {
2939
- method: 'GET',
2940
- path: requestPath,
2941
- queryParameters,
2942
- headers,
2943
- };
2944
- return transporter.request(request, requestOptions);
2945
- },
2946
3022
  /**
2947
3023
  * Get the permissions and restrictions of a specific 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.
2948
3024
  *
@@ -3478,58 +3554,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
3478
3554
  };
3479
3555
  return transporter.request(request, requestOptions);
3480
3556
  },
3481
- /**
3482
- * This method allow you to send requests to the Algolia REST API.
3483
- *
3484
- * @summary Send requests to the Algolia REST API.
3485
- * @param post - The post object.
3486
- * @param post.path - Path of the endpoint, anything after \"/1\" must be specified.
3487
- * @param post.parameters - Query parameters to apply to the current query.
3488
- * @param post.body - Parameters to send with the custom request.
3489
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3490
- */
3491
- post({ path, parameters, body }, requestOptions) {
3492
- if (!path) {
3493
- throw new Error('Parameter `path` is required when calling `post`.');
3494
- }
3495
- const requestPath = '/1{path}'.replace('{path}', path);
3496
- const headers = {};
3497
- const queryParameters = parameters ? parameters : {};
3498
- const request = {
3499
- method: 'POST',
3500
- path: requestPath,
3501
- queryParameters,
3502
- headers,
3503
- data: body ? body : {},
3504
- };
3505
- return transporter.request(request, requestOptions);
3506
- },
3507
- /**
3508
- * This method allow you to send requests to the Algolia REST API.
3509
- *
3510
- * @summary Send requests to the Algolia REST API.
3511
- * @param put - The put object.
3512
- * @param put.path - Path of the endpoint, anything after \"/1\" must be specified.
3513
- * @param put.parameters - Query parameters to apply to the current query.
3514
- * @param put.body - Parameters to send with the custom request.
3515
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3516
- */
3517
- put({ path, parameters, body }, requestOptions) {
3518
- if (!path) {
3519
- throw new Error('Parameter `path` is required when calling `put`.');
3520
- }
3521
- const requestPath = '/1{path}'.replace('{path}', path);
3522
- const headers = {};
3523
- const queryParameters = parameters ? parameters : {};
3524
- const request = {
3525
- method: 'PUT',
3526
- path: requestPath,
3527
- queryParameters,
3528
- headers,
3529
- data: body ? body : {},
3530
- };
3531
- return transporter.request(request, requestOptions);
3532
- },
3533
3557
  /**
3534
3558
  * Remove a userID and its associated data from the multi-clusters.
3535
3559
  *