@algolia/monitoring 1.0.0-alpha.26 → 1.0.0-alpha.28

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.
@@ -4,7 +4,7 @@ var clientCommon = require('@algolia/client-common');
4
4
  var requesterNodeHttp = require('@algolia/requester-node-http');
5
5
 
6
6
  // 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.
7
- const apiClientVersion = '1.0.0-alpha.26';
7
+ const apiClientVersion = '1.0.0-alpha.28';
8
8
  function getDefaultHosts() {
9
9
  return [
10
10
  { url: 'status.algolia.com', accept: 'readWrite', protocol: 'https' },
@@ -64,7 +64,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
64
64
  /**
65
65
  * This method allow you to send requests to the Algolia REST API.
66
66
  *
67
- * @summary Send requests to the Algolia REST API.
68
67
  * @param customDelete - The customDelete object.
69
68
  * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
70
69
  * @param customDelete.parameters - Query parameters to apply to the current query.
@@ -88,7 +87,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
88
87
  /**
89
88
  * This method allow you to send requests to the Algolia REST API.
90
89
  *
91
- * @summary Send requests to the Algolia REST API.
92
90
  * @param customGet - The customGet object.
93
91
  * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
94
92
  * @param customGet.parameters - Query parameters to apply to the current query.
@@ -112,7 +110,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
112
110
  /**
113
111
  * This method allow you to send requests to the Algolia REST API.
114
112
  *
115
- * @summary Send requests to the Algolia REST API.
116
113
  * @param customPost - The customPost object.
117
114
  * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
118
115
  * @param customPost.parameters - Query parameters to apply to the current query.
@@ -138,7 +135,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
138
135
  /**
139
136
  * This method allow you to send requests to the Algolia REST API.
140
137
  *
141
- * @summary Send requests to the Algolia REST API.
142
138
  * @param customPut - The customPut object.
143
139
  * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
144
140
  * @param customPut.parameters - Query parameters to apply to the current query.
@@ -164,7 +160,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
164
160
  /**
165
161
  * List known incidents for selected clusters.
166
162
  *
167
- * @summary List incidents for selected clusters.
168
163
  * @param getClusterIncidents - The getClusterIncidents object.
169
164
  * @param getClusterIncidents.clusters - Subset of clusters, separated by comma.
170
165
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -187,7 +182,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
187
182
  /**
188
183
  * Report whether a cluster is operational.
189
184
  *
190
- * @summary List statuses of selected clusters.
191
185
  * @param getClusterStatus - The getClusterStatus object.
192
186
  * @param getClusterStatus.clusters - Subset of clusters, separated by comma.
193
187
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -210,7 +204,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
210
204
  /**
211
205
  * List known incidents for all clusters.
212
206
  *
213
- * @summary List incidents.
214
207
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
215
208
  */
216
209
  getIncidents(requestOptions) {
@@ -228,7 +221,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
228
221
  /**
229
222
  * List the average times for indexing operations for selected clusters.
230
223
  *
231
- * @summary Get indexing times.
232
224
  * @param getIndexingTime - The getIndexingTime object.
233
225
  * @param getIndexingTime.clusters - Subset of clusters, separated by comma.
234
226
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -251,7 +243,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
251
243
  /**
252
244
  * List the servers belonging to clusters. The response depends on whether you authenticate your API request: - With authentication, the response lists the servers assigned to your Algolia application\'s cluster. - Without authentication, the response lists the servers for all Algolia clusters.
253
245
  *
254
- * @summary List servers.
255
246
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
256
247
  */
257
248
  getInventory(requestOptions) {
@@ -269,7 +260,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
269
260
  /**
270
261
  * List the average latency for search requests for selected clusters.
271
262
  *
272
- * @summary Get search latency times.
273
263
  * @param getLatency - The getLatency object.
274
264
  * @param getLatency.clusters - Subset of clusters, separated by comma.
275
265
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -292,7 +282,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
292
282
  /**
293
283
  * Report the aggregate value of a metric for a selected period of time.
294
284
  *
295
- * @summary Get metrics for a given period.
296
285
  * @param getMetrics - The getMetrics object.
297
286
  * @param getMetrics.metric - Metric to report. For more information about the individual metrics, see the response. To include all metrics, use `*` as the parameter.
298
287
  * @param getMetrics.period - Period over which to aggregate the metrics: - `minute`. Aggregate the last minute. 1 data point per 10 seconds. - `hour`. Aggregate the last hour. 1 data point per minute. - `day`. Aggregate the last day. 1 data point per 10 minutes. - `week`. Aggregate the last week. 1 data point per hour. - `month`. Aggregate the last month. 1 data point per day.
@@ -321,7 +310,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
321
310
  /**
322
311
  * Test whether clusters are reachable or not.
323
312
  *
324
- * @summary Test the reachability of clusters.
325
313
  * @param getReachability - The getReachability object.
326
314
  * @param getReachability.clusters - Subset of clusters, separated by comma.
327
315
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -344,7 +332,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
344
332
  /**
345
333
  * Report whether clusters are operational. The response depends on whether you authenticate your API request. - With authentication, the response includes the status of the cluster assigned to your Algolia application. - Without authentication, the response lists the statuses of all public Algolia clusters.
346
334
  *
347
- * @summary List cluster statuses.
348
335
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
349
336
  */
350
337
  getStatus(requestOptions) {
@@ -686,7 +686,7 @@ function createXhrRequester() {
686
686
  }
687
687
 
688
688
  // 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.
689
- const apiClientVersion = '1.0.0-alpha.26';
689
+ const apiClientVersion = '1.0.0-alpha.28';
690
690
  function getDefaultHosts() {
691
691
  return [
692
692
  { url: 'status.algolia.com', accept: 'readWrite', protocol: 'https' },
@@ -746,7 +746,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
746
746
  /**
747
747
  * This method allow you to send requests to the Algolia REST API.
748
748
  *
749
- * @summary Send requests to the Algolia REST API.
750
749
  * @param customDelete - The customDelete object.
751
750
  * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
752
751
  * @param customDelete.parameters - Query parameters to apply to the current query.
@@ -770,7 +769,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
770
769
  /**
771
770
  * This method allow you to send requests to the Algolia REST API.
772
771
  *
773
- * @summary Send requests to the Algolia REST API.
774
772
  * @param customGet - The customGet object.
775
773
  * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
776
774
  * @param customGet.parameters - Query parameters to apply to the current query.
@@ -794,7 +792,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
794
792
  /**
795
793
  * This method allow you to send requests to the Algolia REST API.
796
794
  *
797
- * @summary Send requests to the Algolia REST API.
798
795
  * @param customPost - The customPost object.
799
796
  * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
800
797
  * @param customPost.parameters - Query parameters to apply to the current query.
@@ -820,7 +817,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
820
817
  /**
821
818
  * This method allow you to send requests to the Algolia REST API.
822
819
  *
823
- * @summary Send requests to the Algolia REST API.
824
820
  * @param customPut - The customPut object.
825
821
  * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
826
822
  * @param customPut.parameters - Query parameters to apply to the current query.
@@ -846,7 +842,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
846
842
  /**
847
843
  * List known incidents for selected clusters.
848
844
  *
849
- * @summary List incidents for selected clusters.
850
845
  * @param getClusterIncidents - The getClusterIncidents object.
851
846
  * @param getClusterIncidents.clusters - Subset of clusters, separated by comma.
852
847
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -869,7 +864,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
869
864
  /**
870
865
  * Report whether a cluster is operational.
871
866
  *
872
- * @summary List statuses of selected clusters.
873
867
  * @param getClusterStatus - The getClusterStatus object.
874
868
  * @param getClusterStatus.clusters - Subset of clusters, separated by comma.
875
869
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -892,7 +886,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
892
886
  /**
893
887
  * List known incidents for all clusters.
894
888
  *
895
- * @summary List incidents.
896
889
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
897
890
  */
898
891
  getIncidents(requestOptions) {
@@ -910,7 +903,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
910
903
  /**
911
904
  * List the average times for indexing operations for selected clusters.
912
905
  *
913
- * @summary Get indexing times.
914
906
  * @param getIndexingTime - The getIndexingTime object.
915
907
  * @param getIndexingTime.clusters - Subset of clusters, separated by comma.
916
908
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -933,7 +925,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
933
925
  /**
934
926
  * List the servers belonging to clusters. The response depends on whether you authenticate your API request: - With authentication, the response lists the servers assigned to your Algolia application\'s cluster. - Without authentication, the response lists the servers for all Algolia clusters.
935
927
  *
936
- * @summary List servers.
937
928
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
938
929
  */
939
930
  getInventory(requestOptions) {
@@ -951,7 +942,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
951
942
  /**
952
943
  * List the average latency for search requests for selected clusters.
953
944
  *
954
- * @summary Get search latency times.
955
945
  * @param getLatency - The getLatency object.
956
946
  * @param getLatency.clusters - Subset of clusters, separated by comma.
957
947
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -974,7 +964,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
974
964
  /**
975
965
  * Report the aggregate value of a metric for a selected period of time.
976
966
  *
977
- * @summary Get metrics for a given period.
978
967
  * @param getMetrics - The getMetrics object.
979
968
  * @param getMetrics.metric - Metric to report. For more information about the individual metrics, see the response. To include all metrics, use `*` as the parameter.
980
969
  * @param getMetrics.period - Period over which to aggregate the metrics: - `minute`. Aggregate the last minute. 1 data point per 10 seconds. - `hour`. Aggregate the last hour. 1 data point per minute. - `day`. Aggregate the last day. 1 data point per 10 minutes. - `week`. Aggregate the last week. 1 data point per hour. - `month`. Aggregate the last month. 1 data point per day.
@@ -1003,7 +992,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
1003
992
  /**
1004
993
  * Test whether clusters are reachable or not.
1005
994
  *
1006
- * @summary Test the reachability of clusters.
1007
995
  * @param getReachability - The getReachability object.
1008
996
  * @param getReachability.clusters - Subset of clusters, separated by comma.
1009
997
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -1026,7 +1014,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
1026
1014
  /**
1027
1015
  * Report whether clusters are operational. The response depends on whether you authenticate your API request. - With authentication, the response includes the status of the cluster assigned to your Algolia application. - Without authentication, the response lists the statuses of all public Algolia clusters.
1028
1016
  *
1029
- * @summary List cluster statuses.
1030
1017
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1031
1018
  */
1032
1019
  getStatus(requestOptions) {
@@ -2,7 +2,7 @@ import { createAuth, createTransporter, getAlgoliaAgent, DEFAULT_CONNECT_TIMEOUT
2
2
  import { createHttpRequester } from '@algolia/requester-node-http';
3
3
 
4
4
  // 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.
5
- const apiClientVersion = '1.0.0-alpha.26';
5
+ const apiClientVersion = '1.0.0-alpha.28';
6
6
  function getDefaultHosts() {
7
7
  return [
8
8
  { url: 'status.algolia.com', accept: 'readWrite', protocol: 'https' },
@@ -62,7 +62,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
62
62
  /**
63
63
  * This method allow you to send requests to the Algolia REST API.
64
64
  *
65
- * @summary Send requests to the Algolia REST API.
66
65
  * @param customDelete - The customDelete object.
67
66
  * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
68
67
  * @param customDelete.parameters - Query parameters to apply to the current query.
@@ -86,7 +85,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
86
85
  /**
87
86
  * This method allow you to send requests to the Algolia REST API.
88
87
  *
89
- * @summary Send requests to the Algolia REST API.
90
88
  * @param customGet - The customGet object.
91
89
  * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
92
90
  * @param customGet.parameters - Query parameters to apply to the current query.
@@ -110,7 +108,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
110
108
  /**
111
109
  * This method allow you to send requests to the Algolia REST API.
112
110
  *
113
- * @summary Send requests to the Algolia REST API.
114
111
  * @param customPost - The customPost object.
115
112
  * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
116
113
  * @param customPost.parameters - Query parameters to apply to the current query.
@@ -136,7 +133,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
136
133
  /**
137
134
  * This method allow you to send requests to the Algolia REST API.
138
135
  *
139
- * @summary Send requests to the Algolia REST API.
140
136
  * @param customPut - The customPut object.
141
137
  * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
142
138
  * @param customPut.parameters - Query parameters to apply to the current query.
@@ -162,7 +158,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
162
158
  /**
163
159
  * List known incidents for selected clusters.
164
160
  *
165
- * @summary List incidents for selected clusters.
166
161
  * @param getClusterIncidents - The getClusterIncidents object.
167
162
  * @param getClusterIncidents.clusters - Subset of clusters, separated by comma.
168
163
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -185,7 +180,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
185
180
  /**
186
181
  * Report whether a cluster is operational.
187
182
  *
188
- * @summary List statuses of selected clusters.
189
183
  * @param getClusterStatus - The getClusterStatus object.
190
184
  * @param getClusterStatus.clusters - Subset of clusters, separated by comma.
191
185
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -208,7 +202,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
208
202
  /**
209
203
  * List known incidents for all clusters.
210
204
  *
211
- * @summary List incidents.
212
205
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
213
206
  */
214
207
  getIncidents(requestOptions) {
@@ -226,7 +219,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
226
219
  /**
227
220
  * List the average times for indexing operations for selected clusters.
228
221
  *
229
- * @summary Get indexing times.
230
222
  * @param getIndexingTime - The getIndexingTime object.
231
223
  * @param getIndexingTime.clusters - Subset of clusters, separated by comma.
232
224
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -249,7 +241,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
249
241
  /**
250
242
  * List the servers belonging to clusters. The response depends on whether you authenticate your API request: - With authentication, the response lists the servers assigned to your Algolia application\'s cluster. - Without authentication, the response lists the servers for all Algolia clusters.
251
243
  *
252
- * @summary List servers.
253
244
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
254
245
  */
255
246
  getInventory(requestOptions) {
@@ -267,7 +258,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
267
258
  /**
268
259
  * List the average latency for search requests for selected clusters.
269
260
  *
270
- * @summary Get search latency times.
271
261
  * @param getLatency - The getLatency object.
272
262
  * @param getLatency.clusters - Subset of clusters, separated by comma.
273
263
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -290,7 +280,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
290
280
  /**
291
281
  * Report the aggregate value of a metric for a selected period of time.
292
282
  *
293
- * @summary Get metrics for a given period.
294
283
  * @param getMetrics - The getMetrics object.
295
284
  * @param getMetrics.metric - Metric to report. For more information about the individual metrics, see the response. To include all metrics, use `*` as the parameter.
296
285
  * @param getMetrics.period - Period over which to aggregate the metrics: - `minute`. Aggregate the last minute. 1 data point per 10 seconds. - `hour`. Aggregate the last hour. 1 data point per minute. - `day`. Aggregate the last day. 1 data point per 10 minutes. - `week`. Aggregate the last week. 1 data point per hour. - `month`. Aggregate the last month. 1 data point per day.
@@ -319,7 +308,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
319
308
  /**
320
309
  * Test whether clusters are reachable or not.
321
310
  *
322
- * @summary Test the reachability of clusters.
323
311
  * @param getReachability - The getReachability object.
324
312
  * @param getReachability.clusters - Subset of clusters, separated by comma.
325
313
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -342,7 +330,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
342
330
  /**
343
331
  * Report whether clusters are operational. The response depends on whether you authenticate your API request. - With authentication, the response includes the status of the cluster assigned to your Algolia application. - Without authentication, the response lists the statuses of all public Algolia clusters.
344
332
  *
345
- * @summary List cluster statuses.
346
333
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
347
334
  */
348
335
  getStatus(requestOptions) {
@@ -1,2 +1,2 @@
1
- /*! monitoring.umd.js | 1.0.0-alpha.26 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
2
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/monitoring"]={})}(this,(function(e){"use strict";function t(e){let t;const r=`algolia-client-js-${e.key}`;function s(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function a(){return JSON.parse(s().getItem(r)||"{}")}function n(e){s().setItem(r,JSON.stringify(e))}return{get:(t,r,s={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>(function(){const t=e.timeToLive?1e3*e.timeToLive:null,r=a(),s=Object.fromEntries(Object.entries(r).filter((([,e])=>void 0!==e.timestamp)));if(n(s),!t)return;n(Object.fromEntries(Object.entries(s).filter((([,e])=>{const r=(new Date).getTime();return!(e.timestamp+t<r)}))))}(),a()[JSON.stringify(t)]))).then((e=>Promise.all([e?e.value:r(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||s.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const n=a();return n[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},s().setItem(r,JSON.stringify(n)),t})),delete:e=>Promise.resolve().then((()=>{const t=a();delete t[JSON.stringify(e)],s().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{s().removeItem(r)}))}}function r(e){const t=[...e.caches],s=t.shift();return void 0===s?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,a,n={miss:()=>Promise.resolve()})=>s.get(e,a,n).catch((()=>r({caches:t}).get(e,a,n))),set:(e,a)=>s.set(e,a).catch((()=>r({caches:t}).set(e,a))),delete:e=>s.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>s.clear().catch((()=>r({caches:t}).clear()))}}function s(e={serializable:!0}){let t={};return{get(r,s,a={miss:()=>Promise.resolve()}){const n=JSON.stringify(r);if(n in t)return Promise.resolve(e.serializable?JSON.parse(t[n]):t[n]);const o=s();return o.then((e=>a.miss(e))).then((()=>o))},set:(r,s)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(s):s,Promise.resolve(s)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const a=12e4;function n(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>a},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=a}}}function o(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function i(e,t,r){return(t=o(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class c extends Error{constructor(e,t){super(e),i(this,"name","AlgoliaError"),t&&(this.name=t)}}class u extends c{constructor(e,t,r){super(e,r),i(this,"stackTrace",void 0),this.stackTrace=t}}class l extends u{constructor(e){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.",e,"RetryError")}}class m extends u{constructor(e,t,r,s="ApiError"){super(e,r,s),i(this,"status",void 0),this.status=t}}class h extends c{constructor(e,t){super(e,"DeserializationError"),i(this,"response",void 0),this.response=t}}class d extends m{constructor(e,t,r,s){super(e,t,s,"DetailedApiError"),i(this,"error",void 0),this.error=r}}function p(e,t,r){const s=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${encodeURIComponent(t(e[r])?JSON.stringify(e[r]):e[r])}`)).join("&")}(r);let a=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return s.length&&(a+=`?${s}`),a}function g(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function f({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:s,algoliaAgent:a,timeouts:o,requester:i,requestsCache:c,responsesCache:u}){async function f(c,u,f=!0){const y=[],P=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(c,u),w=function(e,t,r){const s={Accept:"application/json",...e,...t,...r},a={};return Object.keys(s).forEach((e=>{const t=s[e];a[e.toLowerCase()]=t})),a}(r,c.headers,u.headers),q="GET"===c.method?{...c.data,...u.data}:{},v={...s,...c.queryParameters,...q};if(a.value&&(v["x-algolia-agent"]=a.value),u&&u.queryParameters)for(const e of Object.keys(u.queryParameters))u.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(u.queryParameters[e])?v[e]=u.queryParameters[e].toString():v[e]=u.queryParameters[e];let b=0;const T=async(e,r)=>{const s=e.pop();if(void 0===s)throw new l(function(e){return e.map((e=>g(e)))}(y));let a=u.timeout;void 0===a&&(a=f?o.read:o.write);const q={data:P,headers:w,method:c.method,url:p(s,c.path,v),connectTimeout:r(b,o.connect),responseTimeout:r(b,a)},O=t=>{const r={request:q,response:t,host:s,triesLeft:e.length};return y.push(r),r},E=await i.send(q);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&0==~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(E)){const a=O(E);return E.isTimedOut&&b++,console.log("Retryable failure",g(a)),await t.set(s,n(s,E.isTimedOut?"timed out":"down")),T(e,r)}if(function({status:e}){return 2==~~(e/100)}(E))return function(e){try{return JSON.parse(e.content)}catch(t){throw new h(t.message,e)}}(E);throw O(E),function({content:e,status:t},r){try{const s=JSON.parse(e);return"error"in s?new d(s.message,t,s.error,r):new m(s.message,t,r)}catch(e){}return new m(e,t,r)}(E,y)},O=e.filter((e=>"readWrite"===e.accept||(f?"read"===e.accept:"write"===e.accept))),E=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(n(e))))))),s=r.filter((e=>e.isUp())),a=r.filter((e=>e.isTimedOut())),o=[...s,...a];return{hosts:o.length>0?o:e,getTimeout:(e,t)=>(0===a.length&&0===e?1:a.length+3+e)*t}}(O);return T([...E.hosts].reverse(),E.getTimeout)}return{hostsCache:t,requester:i,timeouts:o,algoliaAgent:a,baseHeaders:r,baseQueryParameters:s,hosts:e,request:function(e,t={}){const a=e.useReadTransporter||"GET"===e.method;if(!a)return f(e,t,a);const n=()=>f(e,t);if(!0!==(t.cacheable||e.cacheable))return n();const o={request:e,requestOptions:t,transporter:{queryParameters:s,headers:r}};return u.get(o,(()=>c.get(o,(()=>c.set(o,n()).then((e=>Promise.all([c.delete(o),e])),(e=>Promise.all([c.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>u.set(o,e)})},requestsCache:c,responsesCache:u}}function y({algoliaAgents:e,client:t,version:r}){const s=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>s.add(e))),s}const P="1.0.0-alpha.26";e.apiClientVersion=P,e.monitoringClient=function(e,a,n){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!a||"string"!=typeof a)throw new Error("`apiKey` is missing.");return function({appId:e,apiKey:t,authMode:r,algoliaAgents:s,...a}){const n=function(e,t,r="WithinHeaders"){const s={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?s:{},queryParameters:()=>"WithinQueryParameters"===r?s:{}}}(e,t,r),o=f({hosts:[{url:"status.algolia.com",accept:"readWrite",protocol:"https"}],...a,algoliaAgent:y({algoliaAgents:s,client:"Monitoring",version:P}),baseHeaders:{"content-type":"text/plain",...n.headers(),...a.baseHeaders},baseQueryParameters:{...n.queryParameters(),...a.baseQueryParameters}});return{transporter:o,appId:e,clearCache:()=>Promise.all([o.requestsCache.clear(),o.responsesCache.clear()]).then((()=>{})),get _ua(){return o.algoliaAgent.value},addAlgoliaAgent(e,t){o.algoliaAgent.add({segment:e,version:t})},customDelete({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const s={method:"DELETE",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return o.request(s,r)},customGet({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const s={method:"GET",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return o.request(s,r)},customPost({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const a={method:"POST",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return o.request(a,s)},customPut({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const a={method:"PUT",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return o.request(a,s)},getClusterIncidents({clusters:e},t){if(!e)throw new Error("Parameter `clusters` is required when calling `getClusterIncidents`.");const r={method:"GET",path:"/1/incidents/{clusters}".replace("{clusters}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(r,t)},getClusterStatus({clusters:e},t){if(!e)throw new Error("Parameter `clusters` is required when calling `getClusterStatus`.");const r={method:"GET",path:"/1/status/{clusters}".replace("{clusters}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(r,t)},getIncidents(e){const t={method:"GET",path:"/1/incidents",queryParameters:{},headers:{}};return o.request(t,e)},getIndexingTime({clusters:e},t){if(!e)throw new Error("Parameter `clusters` is required when calling `getIndexingTime`.");const r={method:"GET",path:"/1/indexing/{clusters}".replace("{clusters}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(r,t)},getInventory(e){const t={method:"GET",path:"/1/inventory/servers",queryParameters:{},headers:{}};return o.request(t,e)},getLatency({clusters:e},t){if(!e)throw new Error("Parameter `clusters` is required when calling `getLatency`.");const r={method:"GET",path:"/1/latency/{clusters}".replace("{clusters}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(r,t)},getMetrics({metric:e,period:t},r){if(!e)throw new Error("Parameter `metric` is required when calling `getMetrics`.");if(!t)throw new Error("Parameter `period` is required when calling `getMetrics`.");const s={method:"GET",path:"/1/infrastructure/{metric}/period/{period}".replace("{metric}",encodeURIComponent(e)).replace("{period}",encodeURIComponent(t)),queryParameters:{},headers:{}};return o.request(s,r)},getReachability({clusters:e},t){if(!e)throw new Error("Parameter `clusters` is required when calling `getReachability`.");const r={method:"GET",path:"/1/reachability/{clusters}/probes".replace("{clusters}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(r,t)},getStatus(e){const t={method:"GET",path:"/1/status",queryParameters:{},headers:{}};return o.request(t,e)}}}({appId:e,apiKey:a,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const s=(e,s)=>setTimeout((()=>{r.abort(),t({status:0,content:s,isTimedOut:!0})}),e),a=s(e.connectTimeout,"Connection timeout");let n;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=s(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(a),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:s(),requestsCache:s({serializable:!1}),hostsCache:r({caches:[t({key:`${P}-${e}`}),s()]}),...n})}}));
1
+ /*! monitoring.umd.js | 1.0.0-alpha.28 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
2
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/monitoring"]={})}(this,(function(e){"use strict";function t(e){let t;const r=`algolia-client-js-${e.key}`;function s(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function a(){return JSON.parse(s().getItem(r)||"{}")}function n(e){s().setItem(r,JSON.stringify(e))}return{get:(t,r,s={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>(function(){const t=e.timeToLive?1e3*e.timeToLive:null,r=a(),s=Object.fromEntries(Object.entries(r).filter((([,e])=>void 0!==e.timestamp)));if(n(s),!t)return;n(Object.fromEntries(Object.entries(s).filter((([,e])=>{const r=(new Date).getTime();return!(e.timestamp+t<r)}))))}(),a()[JSON.stringify(t)]))).then((e=>Promise.all([e?e.value:r(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||s.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const n=a();return n[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},s().setItem(r,JSON.stringify(n)),t})),delete:e=>Promise.resolve().then((()=>{const t=a();delete t[JSON.stringify(e)],s().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{s().removeItem(r)}))}}function r(e){const t=[...e.caches],s=t.shift();return void 0===s?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,a,n={miss:()=>Promise.resolve()})=>s.get(e,a,n).catch((()=>r({caches:t}).get(e,a,n))),set:(e,a)=>s.set(e,a).catch((()=>r({caches:t}).set(e,a))),delete:e=>s.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>s.clear().catch((()=>r({caches:t}).clear()))}}function s(e={serializable:!0}){let t={};return{get(r,s,a={miss:()=>Promise.resolve()}){const n=JSON.stringify(r);if(n in t)return Promise.resolve(e.serializable?JSON.parse(t[n]):t[n]);const o=s();return o.then((e=>a.miss(e))).then((()=>o))},set:(r,s)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(s):s,Promise.resolve(s)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const a=12e4;function n(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>a},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=a}}}function o(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function i(e,t,r){return(t=o(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class c extends Error{constructor(e,t){super(e),i(this,"name","AlgoliaError"),t&&(this.name=t)}}class u extends c{constructor(e,t,r){super(e,r),i(this,"stackTrace",void 0),this.stackTrace=t}}class l extends u{constructor(e){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.",e,"RetryError")}}class m extends u{constructor(e,t,r,s="ApiError"){super(e,r,s),i(this,"status",void 0),this.status=t}}class h extends c{constructor(e,t){super(e,"DeserializationError"),i(this,"response",void 0),this.response=t}}class d extends m{constructor(e,t,r,s){super(e,t,s,"DetailedApiError"),i(this,"error",void 0),this.error=r}}function p(e,t,r){const s=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${encodeURIComponent(t(e[r])?JSON.stringify(e[r]):e[r])}`)).join("&")}(r);let a=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return s.length&&(a+=`?${s}`),a}function g(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function f({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:s,algoliaAgent:a,timeouts:o,requester:i,requestsCache:c,responsesCache:u}){async function f(c,u,f=!0){const y=[],P=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(c,u),w=function(e,t,r){const s={Accept:"application/json",...e,...t,...r},a={};return Object.keys(s).forEach((e=>{const t=s[e];a[e.toLowerCase()]=t})),a}(r,c.headers,u.headers),q="GET"===c.method?{...c.data,...u.data}:{},v={...s,...c.queryParameters,...q};if(a.value&&(v["x-algolia-agent"]=a.value),u&&u.queryParameters)for(const e of Object.keys(u.queryParameters))u.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(u.queryParameters[e])?v[e]=u.queryParameters[e].toString():v[e]=u.queryParameters[e];let b=0;const T=async(e,r)=>{const s=e.pop();if(void 0===s)throw new l(function(e){return e.map((e=>g(e)))}(y));let a=u.timeout;void 0===a&&(a=f?o.read:o.write);const q={data:P,headers:w,method:c.method,url:p(s,c.path,v),connectTimeout:r(b,o.connect),responseTimeout:r(b,a)},O=t=>{const r={request:q,response:t,host:s,triesLeft:e.length};return y.push(r),r},E=await i.send(q);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&0==~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(E)){const a=O(E);return E.isTimedOut&&b++,console.log("Retryable failure",g(a)),await t.set(s,n(s,E.isTimedOut?"timed out":"down")),T(e,r)}if(function({status:e}){return 2==~~(e/100)}(E))return function(e){try{return JSON.parse(e.content)}catch(t){throw new h(t.message,e)}}(E);throw O(E),function({content:e,status:t},r){try{const s=JSON.parse(e);return"error"in s?new d(s.message,t,s.error,r):new m(s.message,t,r)}catch(e){}return new m(e,t,r)}(E,y)},O=e.filter((e=>"readWrite"===e.accept||(f?"read"===e.accept:"write"===e.accept))),E=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(n(e))))))),s=r.filter((e=>e.isUp())),a=r.filter((e=>e.isTimedOut())),o=[...s,...a];return{hosts:o.length>0?o:e,getTimeout:(e,t)=>(0===a.length&&0===e?1:a.length+3+e)*t}}(O);return T([...E.hosts].reverse(),E.getTimeout)}return{hostsCache:t,requester:i,timeouts:o,algoliaAgent:a,baseHeaders:r,baseQueryParameters:s,hosts:e,request:function(e,t={}){const a=e.useReadTransporter||"GET"===e.method;if(!a)return f(e,t,a);const n=()=>f(e,t);if(!0!==(t.cacheable||e.cacheable))return n();const o={request:e,requestOptions:t,transporter:{queryParameters:s,headers:r}};return u.get(o,(()=>c.get(o,(()=>c.set(o,n()).then((e=>Promise.all([c.delete(o),e])),(e=>Promise.all([c.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>u.set(o,e)})},requestsCache:c,responsesCache:u}}function y({algoliaAgents:e,client:t,version:r}){const s=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>s.add(e))),s}const P="1.0.0-alpha.28";e.apiClientVersion=P,e.monitoringClient=function(e,a,n){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!a||"string"!=typeof a)throw new Error("`apiKey` is missing.");return function({appId:e,apiKey:t,authMode:r,algoliaAgents:s,...a}){const n=function(e,t,r="WithinHeaders"){const s={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?s:{},queryParameters:()=>"WithinQueryParameters"===r?s:{}}}(e,t,r),o=f({hosts:[{url:"status.algolia.com",accept:"readWrite",protocol:"https"}],...a,algoliaAgent:y({algoliaAgents:s,client:"Monitoring",version:P}),baseHeaders:{"content-type":"text/plain",...n.headers(),...a.baseHeaders},baseQueryParameters:{...n.queryParameters(),...a.baseQueryParameters}});return{transporter:o,appId:e,clearCache:()=>Promise.all([o.requestsCache.clear(),o.responsesCache.clear()]).then((()=>{})),get _ua(){return o.algoliaAgent.value},addAlgoliaAgent(e,t){o.algoliaAgent.add({segment:e,version:t})},customDelete({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const s={method:"DELETE",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return o.request(s,r)},customGet({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const s={method:"GET",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return o.request(s,r)},customPost({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const a={method:"POST",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return o.request(a,s)},customPut({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const a={method:"PUT",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return o.request(a,s)},getClusterIncidents({clusters:e},t){if(!e)throw new Error("Parameter `clusters` is required when calling `getClusterIncidents`.");const r={method:"GET",path:"/1/incidents/{clusters}".replace("{clusters}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(r,t)},getClusterStatus({clusters:e},t){if(!e)throw new Error("Parameter `clusters` is required when calling `getClusterStatus`.");const r={method:"GET",path:"/1/status/{clusters}".replace("{clusters}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(r,t)},getIncidents(e){const t={method:"GET",path:"/1/incidents",queryParameters:{},headers:{}};return o.request(t,e)},getIndexingTime({clusters:e},t){if(!e)throw new Error("Parameter `clusters` is required when calling `getIndexingTime`.");const r={method:"GET",path:"/1/indexing/{clusters}".replace("{clusters}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(r,t)},getInventory(e){const t={method:"GET",path:"/1/inventory/servers",queryParameters:{},headers:{}};return o.request(t,e)},getLatency({clusters:e},t){if(!e)throw new Error("Parameter `clusters` is required when calling `getLatency`.");const r={method:"GET",path:"/1/latency/{clusters}".replace("{clusters}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(r,t)},getMetrics({metric:e,period:t},r){if(!e)throw new Error("Parameter `metric` is required when calling `getMetrics`.");if(!t)throw new Error("Parameter `period` is required when calling `getMetrics`.");const s={method:"GET",path:"/1/infrastructure/{metric}/period/{period}".replace("{metric}",encodeURIComponent(e)).replace("{period}",encodeURIComponent(t)),queryParameters:{},headers:{}};return o.request(s,r)},getReachability({clusters:e},t){if(!e)throw new Error("Parameter `clusters` is required when calling `getReachability`.");const r={method:"GET",path:"/1/reachability/{clusters}/probes".replace("{clusters}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(r,t)},getStatus(e){const t={method:"GET",path:"/1/status",queryParameters:{},headers:{}};return o.request(t,e)}}}({appId:e,apiKey:a,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const s=(e,s)=>setTimeout((()=>{r.abort(),t({status:0,content:s,isTimedOut:!0})}),e),a=s(e.connectTimeout,"Connection timeout");let n;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=s(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(a),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:s(),requestsCache:s({serializable:!1}),hostsCache:r({caches:[t({key:`${P}-${e}`}),s()]}),...n})}}));
@@ -6,7 +6,7 @@ import type { InfrastructureResponse } from '../model/infrastructureResponse';
6
6
  import type { InventoryResponse } from '../model/inventoryResponse';
7
7
  import type { LatencyResponse } from '../model/latencyResponse';
8
8
  import type { StatusResponse } from '../model/statusResponse';
9
- export declare const apiClientVersion = "1.0.0-alpha.26";
9
+ export declare const apiClientVersion = "1.0.0-alpha.28";
10
10
  export declare function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
11
11
  transporter: import("@algolia/client-common").Transporter;
12
12
  /**
@@ -31,7 +31,6 @@ export declare function createMonitoringClient({ appId: appIdOption, apiKey: api
31
31
  /**
32
32
  * This method allow you to send requests to the Algolia REST API.
33
33
  *
34
- * @summary Send requests to the Algolia REST API.
35
34
  * @param customDelete - The customDelete object.
36
35
  * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
37
36
  * @param customDelete.parameters - Query parameters to apply to the current query.
@@ -41,7 +40,6 @@ export declare function createMonitoringClient({ appId: appIdOption, apiKey: api
41
40
  /**
42
41
  * This method allow you to send requests to the Algolia REST API.
43
42
  *
44
- * @summary Send requests to the Algolia REST API.
45
43
  * @param customGet - The customGet object.
46
44
  * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
47
45
  * @param customGet.parameters - Query parameters to apply to the current query.
@@ -51,7 +49,6 @@ export declare function createMonitoringClient({ appId: appIdOption, apiKey: api
51
49
  /**
52
50
  * This method allow you to send requests to the Algolia REST API.
53
51
  *
54
- * @summary Send requests to the Algolia REST API.
55
52
  * @param customPost - The customPost object.
56
53
  * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
57
54
  * @param customPost.parameters - Query parameters to apply to the current query.
@@ -62,7 +59,6 @@ export declare function createMonitoringClient({ appId: appIdOption, apiKey: api
62
59
  /**
63
60
  * This method allow you to send requests to the Algolia REST API.
64
61
  *
65
- * @summary Send requests to the Algolia REST API.
66
62
  * @param customPut - The customPut object.
67
63
  * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
68
64
  * @param customPut.parameters - Query parameters to apply to the current query.
@@ -73,7 +69,6 @@ export declare function createMonitoringClient({ appId: appIdOption, apiKey: api
73
69
  /**
74
70
  * List known incidents for selected clusters.
75
71
  *
76
- * @summary List incidents for selected clusters.
77
72
  * @param getClusterIncidents - The getClusterIncidents object.
78
73
  * @param getClusterIncidents.clusters - Subset of clusters, separated by comma.
79
74
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -82,7 +77,6 @@ export declare function createMonitoringClient({ appId: appIdOption, apiKey: api
82
77
  /**
83
78
  * Report whether a cluster is operational.
84
79
  *
85
- * @summary List statuses of selected clusters.
86
80
  * @param getClusterStatus - The getClusterStatus object.
87
81
  * @param getClusterStatus.clusters - Subset of clusters, separated by comma.
88
82
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -91,14 +85,12 @@ export declare function createMonitoringClient({ appId: appIdOption, apiKey: api
91
85
  /**
92
86
  * List known incidents for all clusters.
93
87
  *
94
- * @summary List incidents.
95
88
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
96
89
  */
97
90
  getIncidents(requestOptions?: RequestOptions): Promise<IncidentsResponse>;
98
91
  /**
99
92
  * List the average times for indexing operations for selected clusters.
100
93
  *
101
- * @summary Get indexing times.
102
94
  * @param getIndexingTime - The getIndexingTime object.
103
95
  * @param getIndexingTime.clusters - Subset of clusters, separated by comma.
104
96
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -107,14 +99,12 @@ export declare function createMonitoringClient({ appId: appIdOption, apiKey: api
107
99
  /**
108
100
  * List the servers belonging to clusters. The response depends on whether you authenticate your API request: - With authentication, the response lists the servers assigned to your Algolia application\'s cluster. - Without authentication, the response lists the servers for all Algolia clusters.
109
101
  *
110
- * @summary List servers.
111
102
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
112
103
  */
113
104
  getInventory(requestOptions?: RequestOptions): Promise<InventoryResponse>;
114
105
  /**
115
106
  * List the average latency for search requests for selected clusters.
116
107
  *
117
- * @summary Get search latency times.
118
108
  * @param getLatency - The getLatency object.
119
109
  * @param getLatency.clusters - Subset of clusters, separated by comma.
120
110
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -123,7 +113,6 @@ export declare function createMonitoringClient({ appId: appIdOption, apiKey: api
123
113
  /**
124
114
  * Report the aggregate value of a metric for a selected period of time.
125
115
  *
126
- * @summary Get metrics for a given period.
127
116
  * @param getMetrics - The getMetrics object.
128
117
  * @param getMetrics.metric - Metric to report. For more information about the individual metrics, see the response. To include all metrics, use `*` as the parameter.
129
118
  * @param getMetrics.period - Period over which to aggregate the metrics: - `minute`. Aggregate the last minute. 1 data point per 10 seconds. - `hour`. Aggregate the last hour. 1 data point per minute. - `day`. Aggregate the last day. 1 data point per 10 minutes. - `week`. Aggregate the last week. 1 data point per hour. - `month`. Aggregate the last month. 1 data point per day.
@@ -133,7 +122,6 @@ export declare function createMonitoringClient({ appId: appIdOption, apiKey: api
133
122
  /**
134
123
  * Test whether clusters are reachable or not.
135
124
  *
136
- * @summary Test the reachability of clusters.
137
125
  * @param getReachability - The getReachability object.
138
126
  * @param getReachability.clusters - Subset of clusters, separated by comma.
139
127
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -142,7 +130,6 @@ export declare function createMonitoringClient({ appId: appIdOption, apiKey: api
142
130
  /**
143
131
  * Report whether clusters are operational. The response depends on whether you authenticate your API request. - With authentication, the response includes the status of the cluster assigned to your Algolia application. - Without authentication, the response lists the statuses of all public Algolia clusters.
144
132
  *
145
- * @summary List cluster statuses.
146
133
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
147
134
  */
148
135
  getStatus(requestOptions?: RequestOptions): Promise<StatusResponse>;
@@ -1 +1 @@
1
- {"version":3,"file":"monitoringClient.d.ts","sourceRoot":"","sources":["../../src/monitoringClient.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,mBAAmB,EAInB,cAAc,EAEf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,cAAc,EACd,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,oBAAoB,EACrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,eAAO,MAAM,gBAAgB,mBAAmB,CAAC;AASjD,wBAAgB,sBAAsB,CAAC,EACrC,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,YAAY,EACpB,QAAQ,EACR,aAAa,EACb,GAAG,OAAO,EACX,EAAE,mBAAmB;;IAwBlB;;OAEG;;IAGH;;OAEG;kBACW,QAAQ,IAAI,CAAC;IAO3B;;OAEG;;IAKH;;;;;OAKG;6BACsB,MAAM,YAAY,MAAM,GAAG,IAAI;IAIxD;;;;;;;;OAQG;uCAEqB,iBAAiB,mBACtB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAqB/B;;;;;;;;OAQG;oCAEqB,cAAc,mBACnB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAqB/B;;;;;;;;;OASG;2CAE2B,eAAe,mBAC1B,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAsB/B;;;;;;;;;OASG;0CAE2B,cAAc,mBACzB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAsB/B;;;;;;;OAOG;sCAEa,wBAAwB,mBACrB,cAAc,GAC9B,QAAQ,iBAAiB,CAAC;IAwB7B;;;;;;;OAOG;mCAEa,qBAAqB,mBAClB,cAAc,GAC9B,QAAQ,cAAc,CAAC;IAwB1B;;;;;OAKG;kCAC2B,cAAc,GAAG,QAAQ,iBAAiB,CAAC;IAezE;;;;;;;OAOG;kCAEa,oBAAoB,mBACjB,cAAc,GAC9B,QAAQ,oBAAoB,CAAC;IAwBhC;;;;;OAKG;kCAC2B,cAAc,GAAG,QAAQ,iBAAiB,CAAC;IAezE;;;;;;;OAOG;6BAEa,eAAe,mBACZ,cAAc,GAC9B,QAAQ,eAAe,CAAC;IAwB3B;;;;;;;;OAQG;mCAEmB,eAAe,mBAClB,cAAc,GAC9B,QAAQ,sBAAsB,CAAC;IA6BlC;;;;;;;OAOG;kCAEa,oBAAoB,mBACjB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,OAAO,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAwBnD;;;;;OAKG;+BACwB,cAAc,GAAG,QAAQ,cAAc,CAAC;EAetE;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
1
+ {"version":3,"file":"monitoringClient.d.ts","sourceRoot":"","sources":["../../src/monitoringClient.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,mBAAmB,EAInB,cAAc,EAEf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,cAAc,EACd,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,oBAAoB,EACrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,eAAO,MAAM,gBAAgB,mBAAmB,CAAC;AASjD,wBAAgB,sBAAsB,CAAC,EACrC,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,YAAY,EACpB,QAAQ,EACR,aAAa,EACb,GAAG,OAAO,EACX,EAAE,mBAAmB;;IAwBlB;;OAEG;;IAGH;;OAEG;kBACW,QAAQ,IAAI,CAAC;IAO3B;;OAEG;;IAKH;;;;;OAKG;6BACsB,MAAM,YAAY,MAAM,GAAG,IAAI;IAIxD;;;;;;;OAOG;uCAEqB,iBAAiB,mBACtB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAqB/B;;;;;;;OAOG;oCAEqB,cAAc,mBACnB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAqB/B;;;;;;;;OAQG;2CAE2B,eAAe,mBAC1B,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAsB/B;;;;;;;;OAQG;0CAE2B,cAAc,mBACzB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAsB/B;;;;;;OAMG;sCAEa,wBAAwB,mBACrB,cAAc,GAC9B,QAAQ,iBAAiB,CAAC;IAwB7B;;;;;;OAMG;mCAEa,qBAAqB,mBAClB,cAAc,GAC9B,QAAQ,cAAc,CAAC;IAwB1B;;;;OAIG;kCAC2B,cAAc,GAAG,QAAQ,iBAAiB,CAAC;IAezE;;;;;;OAMG;kCAEa,oBAAoB,mBACjB,cAAc,GAC9B,QAAQ,oBAAoB,CAAC;IAwBhC;;;;OAIG;kCAC2B,cAAc,GAAG,QAAQ,iBAAiB,CAAC;IAezE;;;;;;OAMG;6BAEa,eAAe,mBACZ,cAAc,GAC9B,QAAQ,eAAe,CAAC;IAwB3B;;;;;;;OAOG;mCAEmB,eAAe,mBAClB,cAAc,GAC9B,QAAQ,sBAAsB,CAAC;IA6BlC;;;;;;OAMG;kCAEa,oBAAoB,mBACjB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,OAAO,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAwBnD;;;;OAIG;+BACwB,cAAc,GAAG,QAAQ,cAAc,CAAC;EAetE;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@algolia/monitoring",
3
- "version": "1.0.0-alpha.26",
3
+ "version": "1.0.0-alpha.28",
4
4
  "description": "JavaScript client for monitoring",
5
5
  "repository": "algolia/algoliasearch-client-javascript",
6
6
  "license": "MIT",
@@ -39,13 +39,13 @@
39
39
  "clean": "rm -rf ./dist || true"
40
40
  },
41
41
  "dependencies": {
42
- "@algolia/client-common": "5.0.0-alpha.99",
43
- "@algolia/requester-browser-xhr": "5.0.0-alpha.99",
44
- "@algolia/requester-node-http": "5.0.0-alpha.99"
42
+ "@algolia/client-common": "5.0.0-alpha.101",
43
+ "@algolia/requester-browser-xhr": "5.0.0-alpha.101",
44
+ "@algolia/requester-node-http": "5.0.0-alpha.101"
45
45
  },
46
46
  "devDependencies": {
47
- "@types/node": "20.11.5",
48
- "rollup": "4.9.5",
47
+ "@types/node": "20.11.0",
48
+ "rollup": "4.9.6",
49
49
  "typescript": "5.3.3"
50
50
  },
51
51
  "engines": {