@algolia/monitoring 5.2.4-beta.5 → 5.10.0-beta.1

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 (49) hide show
  1. package/README.md +15 -7
  2. package/dist/browser.d.ts +194 -63
  3. package/dist/builds/browser.js +24 -22
  4. package/dist/builds/browser.js.map +1 -1
  5. package/dist/builds/browser.min.js +1 -1
  6. package/dist/builds/browser.min.js.map +1 -1
  7. package/dist/builds/browser.umd.js +4 -4
  8. package/dist/builds/fetch.js +388 -0
  9. package/dist/builds/fetch.js.map +1 -0
  10. package/dist/builds/node.cjs +21 -20
  11. package/dist/builds/node.cjs.map +1 -1
  12. package/dist/builds/node.js +22 -20
  13. package/dist/builds/node.js.map +1 -1
  14. package/dist/fetch.d.ts +437 -0
  15. package/dist/node.d.cts +196 -64
  16. package/dist/node.d.ts +196 -64
  17. package/dist/src/monitoringClient.cjs +19 -19
  18. package/dist/src/monitoringClient.cjs.map +1 -1
  19. package/dist/src/monitoringClient.js +19 -19
  20. package/dist/src/monitoringClient.js.map +1 -1
  21. package/index.d.ts +0 -1
  22. package/index.js +1 -2
  23. package/package.json +16 -11
  24. package/model/badRequest.ts +0 -5
  25. package/model/clientMethodProps.ts +0 -132
  26. package/model/errorBase.ts +0 -8
  27. package/model/forbidden.ts +0 -5
  28. package/model/incident.ts +0 -15
  29. package/model/incidentEntry.ts +0 -12
  30. package/model/incidentsResponse.ts +0 -7
  31. package/model/index.ts +0 -27
  32. package/model/indexingMetric.ts +0 -7
  33. package/model/indexingTimeResponse.ts +0 -7
  34. package/model/infrastructureResponse.ts +0 -7
  35. package/model/inventoryResponse.ts +0 -7
  36. package/model/latencyMetric.ts +0 -7
  37. package/model/latencyResponse.ts +0 -7
  38. package/model/metric.ts +0 -3
  39. package/model/metrics.ts +0 -30
  40. package/model/period.ts +0 -3
  41. package/model/probesMetric.ts +0 -13
  42. package/model/region.ts +0 -21
  43. package/model/server.ts +0 -33
  44. package/model/serverStatus.ts +0 -3
  45. package/model/status.ts +0 -6
  46. package/model/statusResponse.ts +0 -7
  47. package/model/timeEntry.ts +0 -13
  48. package/model/type.ts +0 -3
  49. package/model/unauthorized.ts +0 -5
package/dist/node.d.ts CHANGED
@@ -1,25 +1,10 @@
1
1
  import * as _algolia_client_common from '@algolia/client-common';
2
- import { ClientOptions } from '@algolia/client-common';
3
-
4
- type BadRequest = {
5
- reason?: string;
6
- };
7
-
8
- /**
9
- * Error.
10
- */
11
- type ErrorBase = Record<string, any> & {
12
- message?: string;
13
- };
14
-
15
- type Forbidden = {
16
- reason?: string;
17
- };
2
+ import { CreateClientOptions, RequestOptions, ClientOptions } from '@algolia/client-common';
18
3
 
19
4
  /**
20
5
  * Status of the cluster.
21
6
  */
22
- type Status = 'degraded_performance' | 'major_outage' | 'operational' | 'partial_outage';
7
+ type Status = 'operational' | 'degraded_performance' | 'partial_outage' | 'major_outage';
23
8
 
24
9
  /**
25
10
  * Incident details.
@@ -41,7 +26,9 @@ type IncidentEntry = {
41
26
  };
42
27
 
43
28
  type IncidentsResponse = {
44
- incidents?: Record<string, IncidentEntry[]>;
29
+ incidents?: {
30
+ [key: string]: Array<IncidentEntry>;
31
+ };
45
32
  };
46
33
 
47
34
  type TimeEntry = {
@@ -56,7 +43,9 @@ type TimeEntry = {
56
43
  };
57
44
 
58
45
  type IndexingMetric = {
59
- indexing?: Record<string, TimeEntry[]>;
46
+ indexing?: {
47
+ [key: string]: Array<TimeEntry>;
48
+ };
60
49
  };
61
50
 
62
51
  type IndexingTimeResponse = {
@@ -78,23 +67,33 @@ type Metrics = {
78
67
  /**
79
68
  * CPU idleness in %.
80
69
  */
81
- cpu_usage?: Record<string, ProbesMetric[]>;
70
+ cpu_usage?: {
71
+ [key: string]: Array<ProbesMetric>;
72
+ };
82
73
  /**
83
74
  * RAM used for indexing in MB.
84
75
  */
85
- ram_indexing_usage?: Record<string, ProbesMetric[]>;
76
+ ram_indexing_usage?: {
77
+ [key: string]: Array<ProbesMetric>;
78
+ };
86
79
  /**
87
80
  * RAM used for search in MB.
88
81
  */
89
- ram_search_usage?: Record<string, ProbesMetric[]>;
82
+ ram_search_usage?: {
83
+ [key: string]: Array<ProbesMetric>;
84
+ };
90
85
  /**
91
86
  * Solid-state disk (SSD) usage expressed as % of RAM. 0% means no SSD usage. A value of 50% indicates 32&nbsp;GB SSD usage for a machine with 64&nbsp;RAM.
92
87
  */
93
- ssd_usage?: Record<string, ProbesMetric[]>;
88
+ ssd_usage?: {
89
+ [key: string]: Array<ProbesMetric>;
90
+ };
94
91
  /**
95
92
  * Average build time of the indices in seconds.
96
93
  */
97
- avg_build_time?: Record<string, ProbesMetric[]>;
94
+ avg_build_time?: {
95
+ [key: string]: Array<ProbesMetric>;
96
+ };
98
97
  };
99
98
 
100
99
  type InfrastructureResponse = {
@@ -133,28 +132,28 @@ type Server = {
133
132
  };
134
133
 
135
134
  type InventoryResponse = {
136
- inventory?: Server[];
135
+ inventory?: Array<Server>;
137
136
  };
138
137
 
139
138
  type LatencyMetric = {
140
- latency?: Record<string, TimeEntry[]>;
139
+ latency?: {
140
+ [key: string]: Array<TimeEntry>;
141
+ };
141
142
  };
142
143
 
143
144
  type LatencyResponse = {
144
145
  metrics?: LatencyMetric;
145
146
  };
146
147
 
147
- type Metric = '*' | 'avg_build_time' | 'cpu_usage' | 'ram_indexing_usage' | 'ram_search_usage' | 'ssd_usage';
148
-
149
- type Period = 'day' | 'hour' | 'minute' | 'month' | 'week';
150
-
151
148
  type StatusResponse = {
152
- status?: Record<string, Status>;
149
+ status?: {
150
+ [key: string]: Status;
151
+ };
153
152
  };
154
153
 
155
- type Unauthorized = {
156
- reason?: string;
157
- };
154
+ type Metric = 'avg_build_time' | 'ssd_usage' | 'ram_search_usage' | 'ram_indexing_usage' | 'cpu_usage' | '*';
155
+
156
+ type Period = 'minute' | 'hour' | 'day' | 'week' | 'month';
158
157
 
159
158
  /**
160
159
  * Properties for the `customDelete` method.
@@ -167,7 +166,9 @@ type CustomDeleteProps = {
167
166
  /**
168
167
  * Query parameters to apply to the current query.
169
168
  */
170
- parameters?: Record<string, any>;
169
+ parameters?: {
170
+ [key: string]: any;
171
+ };
171
172
  };
172
173
  /**
173
174
  * Properties for the `customGet` method.
@@ -180,7 +181,9 @@ type CustomGetProps = {
180
181
  /**
181
182
  * Query parameters to apply to the current query.
182
183
  */
183
- parameters?: Record<string, any>;
184
+ parameters?: {
185
+ [key: string]: any;
186
+ };
184
187
  };
185
188
  /**
186
189
  * Properties for the `customPost` method.
@@ -193,7 +196,9 @@ type CustomPostProps = {
193
196
  /**
194
197
  * Query parameters to apply to the current query.
195
198
  */
196
- parameters?: Record<string, any>;
199
+ parameters?: {
200
+ [key: string]: any;
201
+ };
197
202
  /**
198
203
  * Parameters to send with the custom request.
199
204
  */
@@ -210,7 +215,9 @@ type CustomPutProps = {
210
215
  /**
211
216
  * Query parameters to apply to the current query.
212
217
  */
213
- parameters?: Record<string, any>;
218
+ parameters?: {
219
+ [key: string]: any;
220
+ };
214
221
  /**
215
222
  * Parameters to send with the custom request.
216
223
  */
@@ -221,7 +228,7 @@ type CustomPutProps = {
221
228
  */
222
229
  type GetClusterIncidentsProps = {
223
230
  /**
224
- * Subset of clusters, separated by comma.
231
+ * Subset of clusters, separated by commas.
225
232
  */
226
233
  clusters: string;
227
234
  };
@@ -230,7 +237,7 @@ type GetClusterIncidentsProps = {
230
237
  */
231
238
  type GetClusterStatusProps = {
232
239
  /**
233
- * Subset of clusters, separated by comma.
240
+ * Subset of clusters, separated by commas.
234
241
  */
235
242
  clusters: string;
236
243
  };
@@ -239,7 +246,7 @@ type GetClusterStatusProps = {
239
246
  */
240
247
  type GetIndexingTimeProps = {
241
248
  /**
242
- * Subset of clusters, separated by comma.
249
+ * Subset of clusters, separated by commas.
243
250
  */
244
251
  clusters: string;
245
252
  };
@@ -248,7 +255,7 @@ type GetIndexingTimeProps = {
248
255
  */
249
256
  type GetLatencyProps = {
250
257
  /**
251
- * Subset of clusters, separated by comma.
258
+ * Subset of clusters, separated by commas.
252
259
  */
253
260
  clusters: string;
254
261
  };
@@ -270,36 +277,161 @@ type GetMetricsProps = {
270
277
  */
271
278
  type GetReachabilityProps = {
272
279
  /**
273
- * Subset of clusters, separated by comma.
280
+ * Subset of clusters, separated by commas.
274
281
  */
275
282
  clusters: string;
276
283
  };
277
284
 
278
- declare const apiClientVersion = "1.2.4";
279
-
280
- /**
281
- * The client type.
282
- */
283
- type MonitoringClient = ReturnType<typeof monitoringClient>;
284
- declare function monitoringClient(appId: string, apiKey: string, options?: ClientOptions): {
285
+ declare const apiClientVersion = "1.10.0";
286
+ declare function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
285
287
  transporter: _algolia_client_common.Transporter;
288
+ /**
289
+ * The `appId` currently in use.
290
+ */
286
291
  appId: string;
292
+ /**
293
+ * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
294
+ */
287
295
  clearCache(): Promise<void>;
288
- _ua: string;
296
+ /**
297
+ * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
298
+ */
299
+ readonly _ua: string;
300
+ /**
301
+ * Adds a `segment` to the `x-algolia-agent` sent with every requests.
302
+ *
303
+ * @param segment - The algolia agent (user-agent) segment to add.
304
+ * @param version - The version of the agent.
305
+ */
289
306
  addAlgoliaAgent(segment: string, version?: string): void;
290
- customDelete({ path, parameters }: CustomDeleteProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<Record<string, unknown>>;
291
- customGet({ path, parameters }: CustomGetProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<Record<string, unknown>>;
292
- customPost({ path, parameters, body }: CustomPostProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<Record<string, unknown>>;
293
- customPut({ path, parameters, body }: CustomPutProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<Record<string, unknown>>;
294
- getClusterIncidents({ clusters }: GetClusterIncidentsProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<IncidentsResponse>;
295
- getClusterStatus({ clusters }: GetClusterStatusProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<StatusResponse>;
296
- getIncidents(requestOptions?: _algolia_client_common.RequestOptions): Promise<IncidentsResponse>;
297
- getIndexingTime({ clusters }: GetIndexingTimeProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<IndexingTimeResponse>;
298
- getLatency({ clusters }: GetLatencyProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<LatencyResponse>;
299
- getMetrics({ metric, period }: GetMetricsProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<InfrastructureResponse>;
300
- getReachability({ clusters }: GetReachabilityProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<Record<string, Record<string, boolean>>>;
301
- getServers(requestOptions?: _algolia_client_common.RequestOptions): Promise<InventoryResponse>;
302
- getStatus(requestOptions?: _algolia_client_common.RequestOptions): Promise<StatusResponse>;
307
+ /**
308
+ * Helper method to switch the API key used to authenticate the requests.
309
+ *
310
+ * @param params - Method params.
311
+ * @param params.apiKey - The new API Key to use.
312
+ */
313
+ setClientApiKey({ apiKey }: {
314
+ apiKey: string;
315
+ }): void;
316
+ /**
317
+ * This method allow you to send requests to the Algolia REST API.
318
+ * @param customDelete - The customDelete object.
319
+ * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
320
+ * @param customDelete.parameters - Query parameters to apply to the current query.
321
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
322
+ */
323
+ customDelete({ path, parameters }: CustomDeleteProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
324
+ /**
325
+ * This method allow you to send requests to the Algolia REST API.
326
+ * @param customGet - The customGet object.
327
+ * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
328
+ * @param customGet.parameters - Query parameters to apply to the current query.
329
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
330
+ */
331
+ customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
332
+ /**
333
+ * This method allow you to send requests to the Algolia REST API.
334
+ * @param customPost - The customPost object.
335
+ * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
336
+ * @param customPost.parameters - Query parameters to apply to the current query.
337
+ * @param customPost.body - Parameters to send with the custom request.
338
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
339
+ */
340
+ customPost({ path, parameters, body }: CustomPostProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
341
+ /**
342
+ * This method allow you to send requests to the Algolia REST API.
343
+ * @param customPut - The customPut object.
344
+ * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
345
+ * @param customPut.parameters - Query parameters to apply to the current query.
346
+ * @param customPut.body - Parameters to send with the custom request.
347
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
348
+ */
349
+ customPut({ path, parameters, body }: CustomPutProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
350
+ /**
351
+ * Retrieves known incidents for the selected clusters.
352
+ * @param getClusterIncidents - The getClusterIncidents object.
353
+ * @param getClusterIncidents.clusters - Subset of clusters, separated by commas.
354
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
355
+ */
356
+ getClusterIncidents({ clusters }: GetClusterIncidentsProps, requestOptions?: RequestOptions): Promise<IncidentsResponse>;
357
+ /**
358
+ * Retrieves the status of selected clusters.
359
+ * @param getClusterStatus - The getClusterStatus object.
360
+ * @param getClusterStatus.clusters - Subset of clusters, separated by commas.
361
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
362
+ */
363
+ getClusterStatus({ clusters }: GetClusterStatusProps, requestOptions?: RequestOptions): Promise<StatusResponse>;
364
+ /**
365
+ * Retrieves known incidents for all clusters.
366
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
367
+ */
368
+ getIncidents(requestOptions?: RequestOptions): Promise<IncidentsResponse>;
369
+ /**
370
+ * Retrieves average times for indexing operations for selected clusters.
371
+ * @param getIndexingTime - The getIndexingTime object.
372
+ * @param getIndexingTime.clusters - Subset of clusters, separated by commas.
373
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
374
+ */
375
+ getIndexingTime({ clusters }: GetIndexingTimeProps, requestOptions?: RequestOptions): Promise<IndexingTimeResponse>;
376
+ /**
377
+ * Retrieves the average latency for search requests for selected clusters.
378
+ * @param getLatency - The getLatency object.
379
+ * @param getLatency.clusters - Subset of clusters, separated by commas.
380
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
381
+ */
382
+ getLatency({ clusters }: GetLatencyProps, requestOptions?: RequestOptions): Promise<LatencyResponse>;
383
+ /**
384
+ * Retrieves metrics related to your Algolia infrastructure, aggregated over a selected time window. Access to this API is available as part of the [Premium or Elevate plans](https://www.algolia.com/pricing). You must authenticate requests with the `x-algolia-application-id` and `x-algolia-api-key` headers (using the Monitoring API key).
385
+ * @param getMetrics - The getMetrics object.
386
+ * @param getMetrics.metric - Metric to report. For more information about the individual metrics, see the description of the API response. To include all metrics, use `*`.
387
+ * @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.
388
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
389
+ */
390
+ getMetrics({ metric, period }: GetMetricsProps, requestOptions?: RequestOptions): Promise<InfrastructureResponse>;
391
+ /**
392
+ * Test whether clusters are reachable or not.
393
+ * @param getReachability - The getReachability object.
394
+ * @param getReachability.clusters - Subset of clusters, separated by commas.
395
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
396
+ */
397
+ getReachability({ clusters }: GetReachabilityProps, requestOptions?: RequestOptions): Promise<{
398
+ [key: string]: {
399
+ [key: string]: boolean;
400
+ };
401
+ }>;
402
+ /**
403
+ * Retrieves the servers that belong 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.
404
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
405
+ */
406
+ getServers(requestOptions?: RequestOptions): Promise<InventoryResponse>;
407
+ /**
408
+ * Retrieves the status of all Algolia clusters and instances.
409
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
410
+ */
411
+ getStatus(requestOptions?: RequestOptions): Promise<StatusResponse>;
412
+ };
413
+
414
+ type BadRequest = {
415
+ reason?: string;
416
+ };
417
+
418
+ /**
419
+ * Error.
420
+ */
421
+ type ErrorBase = Record<string, any> & {
422
+ message?: string;
303
423
  };
304
424
 
425
+ type Forbidden = {
426
+ reason?: string;
427
+ };
428
+
429
+ type Unauthorized = {
430
+ reason?: string;
431
+ };
432
+
433
+ type MonitoringClient = ReturnType<typeof createMonitoringClient>;
434
+
435
+ declare function monitoringClient(appId: string, apiKey: string, options?: ClientOptions): MonitoringClient;
436
+
305
437
  export { type BadRequest, type CustomDeleteProps, type CustomGetProps, type CustomPostProps, type CustomPutProps, type ErrorBase, type Forbidden, type GetClusterIncidentsProps, type GetClusterStatusProps, type GetIndexingTimeProps, type GetLatencyProps, type GetMetricsProps, type GetReachabilityProps, type Incident, type IncidentEntry, type IncidentsResponse, type IndexingMetric, type IndexingTimeResponse, type InfrastructureResponse, type InventoryResponse, type LatencyMetric, type LatencyResponse, type Metric, type Metrics, type MonitoringClient, type Period, type ProbesMetric, type Region, type Server, type ServerStatus, type Status, type StatusResponse, type TimeEntry, type Type, type Unauthorized, apiClientVersion, monitoringClient };
@@ -25,7 +25,7 @@ __export(monitoringClient_exports, {
25
25
  });
26
26
  module.exports = __toCommonJS(monitoringClient_exports);
27
27
  var import_client_common = require("@algolia/client-common");
28
- var apiClientVersion = "1.2.4";
28
+ var apiClientVersion = "1.10.0";
29
29
  function getDefaultHosts() {
30
30
  return [{ url: "status.algolia.com", accept: "readWrite", protocol: "https" }];
31
31
  }
@@ -83,8 +83,20 @@ function createMonitoringClient({
83
83
  transporter.algoliaAgent.add({ segment, version });
84
84
  },
85
85
  /**
86
- * This method allow you to send requests to the Algolia REST API.
86
+ * Helper method to switch the API key used to authenticate the requests.
87
87
  *
88
+ * @param params - Method params.
89
+ * @param params.apiKey - The new API Key to use.
90
+ */
91
+ setClientApiKey({ apiKey }) {
92
+ if (!authMode || authMode === "WithinHeaders") {
93
+ transporter.baseHeaders["x-algolia-api-key"] = apiKey;
94
+ } else {
95
+ transporter.baseQueryParameters["x-algolia-api-key"] = apiKey;
96
+ }
97
+ },
98
+ /**
99
+ * This method allow you to send requests to the Algolia REST API.
88
100
  * @param customDelete - The customDelete object.
89
101
  * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
90
102
  * @param customDelete.parameters - Query parameters to apply to the current query.
@@ -107,7 +119,6 @@ function createMonitoringClient({
107
119
  },
108
120
  /**
109
121
  * This method allow you to send requests to the Algolia REST API.
110
- *
111
122
  * @param customGet - The customGet object.
112
123
  * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
113
124
  * @param customGet.parameters - Query parameters to apply to the current query.
@@ -130,7 +141,6 @@ function createMonitoringClient({
130
141
  },
131
142
  /**
132
143
  * This method allow you to send requests to the Algolia REST API.
133
- *
134
144
  * @param customPost - The customPost object.
135
145
  * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
136
146
  * @param customPost.parameters - Query parameters to apply to the current query.
@@ -155,7 +165,6 @@ function createMonitoringClient({
155
165
  },
156
166
  /**
157
167
  * This method allow you to send requests to the Algolia REST API.
158
- *
159
168
  * @param customPut - The customPut object.
160
169
  * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
161
170
  * @param customPut.parameters - Query parameters to apply to the current query.
@@ -180,9 +189,8 @@ function createMonitoringClient({
180
189
  },
181
190
  /**
182
191
  * Retrieves known incidents for the selected clusters.
183
- *
184
192
  * @param getClusterIncidents - The getClusterIncidents object.
185
- * @param getClusterIncidents.clusters - Subset of clusters, separated by comma.
193
+ * @param getClusterIncidents.clusters - Subset of clusters, separated by commas.
186
194
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
187
195
  */
188
196
  getClusterIncidents({ clusters }, requestOptions) {
@@ -202,9 +210,8 @@ function createMonitoringClient({
202
210
  },
203
211
  /**
204
212
  * Retrieves the status of selected clusters.
205
- *
206
213
  * @param getClusterStatus - The getClusterStatus object.
207
- * @param getClusterStatus.clusters - Subset of clusters, separated by comma.
214
+ * @param getClusterStatus.clusters - Subset of clusters, separated by commas.
208
215
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
209
216
  */
210
217
  getClusterStatus({ clusters }, requestOptions) {
@@ -224,7 +231,6 @@ function createMonitoringClient({
224
231
  },
225
232
  /**
226
233
  * Retrieves known incidents for all clusters.
227
- *
228
234
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
229
235
  */
230
236
  getIncidents(requestOptions) {
@@ -241,9 +247,8 @@ function createMonitoringClient({
241
247
  },
242
248
  /**
243
249
  * Retrieves average times for indexing operations for selected clusters.
244
- *
245
250
  * @param getIndexingTime - The getIndexingTime object.
246
- * @param getIndexingTime.clusters - Subset of clusters, separated by comma.
251
+ * @param getIndexingTime.clusters - Subset of clusters, separated by commas.
247
252
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
248
253
  */
249
254
  getIndexingTime({ clusters }, requestOptions) {
@@ -263,9 +268,8 @@ function createMonitoringClient({
263
268
  },
264
269
  /**
265
270
  * Retrieves the average latency for search requests for selected clusters.
266
- *
267
271
  * @param getLatency - The getLatency object.
268
- * @param getLatency.clusters - Subset of clusters, separated by comma.
272
+ * @param getLatency.clusters - Subset of clusters, separated by commas.
269
273
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
270
274
  */
271
275
  getLatency({ clusters }, requestOptions) {
@@ -285,7 +289,6 @@ function createMonitoringClient({
285
289
  },
286
290
  /**
287
291
  * Retrieves metrics related to your Algolia infrastructure, aggregated over a selected time window. Access to this API is available as part of the [Premium or Elevate plans](https://www.algolia.com/pricing). You must authenticate requests with the `x-algolia-application-id` and `x-algolia-api-key` headers (using the Monitoring API key).
288
- *
289
292
  * @param getMetrics - The getMetrics object.
290
293
  * @param getMetrics.metric - Metric to report. For more information about the individual metrics, see the description of the API response. To include all metrics, use `*`.
291
294
  * @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.
@@ -311,9 +314,8 @@ function createMonitoringClient({
311
314
  },
312
315
  /**
313
316
  * Test whether clusters are reachable or not.
314
- *
315
317
  * @param getReachability - The getReachability object.
316
- * @param getReachability.clusters - Subset of clusters, separated by comma.
318
+ * @param getReachability.clusters - Subset of clusters, separated by commas.
317
319
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
318
320
  */
319
321
  getReachability({ clusters }, requestOptions) {
@@ -333,7 +335,6 @@ function createMonitoringClient({
333
335
  },
334
336
  /**
335
337
  * Retrieves the servers that belong 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.
336
- *
337
338
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
338
339
  */
339
340
  getServers(requestOptions) {
@@ -350,7 +351,6 @@ function createMonitoringClient({
350
351
  },
351
352
  /**
352
353
  * Retrieves the status of all Algolia clusters and instances.
353
- *
354
354
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
355
355
  */
356
356
  getStatus(requestOptions) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/monitoringClient.ts"],"sourcesContent":["// 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.\n\nimport { createAuth, createTransporter, getAlgoliaAgent } from '@algolia/client-common';\nimport type {\n CreateClientOptions,\n Headers,\n Host,\n QueryParameters,\n Request,\n RequestOptions,\n} from '@algolia/client-common';\n\nimport type {\n CustomDeleteProps,\n CustomGetProps,\n CustomPostProps,\n CustomPutProps,\n GetClusterIncidentsProps,\n GetClusterStatusProps,\n GetIndexingTimeProps,\n GetLatencyProps,\n GetMetricsProps,\n GetReachabilityProps,\n} from '../model/clientMethodProps';\nimport type { IncidentsResponse } from '../model/incidentsResponse';\nimport type { IndexingTimeResponse } from '../model/indexingTimeResponse';\nimport type { InfrastructureResponse } from '../model/infrastructureResponse';\nimport type { InventoryResponse } from '../model/inventoryResponse';\nimport type { LatencyResponse } from '../model/latencyResponse';\nimport type { StatusResponse } from '../model/statusResponse';\n\nexport const apiClientVersion = '1.2.4';\n\nfunction getDefaultHosts(): Host[] {\n return [{ url: 'status.algolia.com', accept: 'readWrite', protocol: 'https' }];\n}\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nexport function createMonitoringClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n ...options\n}: CreateClientOptions) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: 'Monitoring',\n version: apiClientVersion,\n }),\n baseHeaders: {\n 'content-type': 'text/plain',\n ...auth.headers(),\n ...options.baseHeaders,\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters,\n },\n });\n\n return {\n transporter,\n\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache(): Promise<void> {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => undefined);\n },\n\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua(): string {\n return transporter.algoliaAgent.value;\n },\n\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment: string, version?: string): void {\n transporter.algoliaAgent.add({ segment, version });\n },\n\n /**\n * This method allow you to send requests to the Algolia REST API.\n *\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, anything after \\\"/1\\\" must be specified.\n * @param customDelete.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customDelete(\n { path, parameters }: CustomDeleteProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, unknown>> {\n if (!path) {\n throw new Error('Parameter `path` is required when calling `customDelete`.');\n }\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'DELETE',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * This method allow you to send requests to the Algolia REST API.\n *\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, anything after \\\"/1\\\" must be specified.\n * @param customGet.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>> {\n if (!path) {\n throw new Error('Parameter `path` is required when calling `customGet`.');\n }\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * This method allow you to send requests to the Algolia REST API.\n *\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, anything after \\\"/1\\\" must be specified.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost(\n { path, parameters, body }: CustomPostProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, unknown>> {\n if (!path) {\n throw new Error('Parameter `path` is required when calling `customPost`.');\n }\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {},\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * This method allow you to send requests to the Algolia REST API.\n *\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, anything after \\\"/1\\\" must be specified.\n * @param customPut.parameters - Query parameters to apply to the current query.\n * @param customPut.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPut(\n { path, parameters, body }: CustomPutProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, unknown>> {\n if (!path) {\n throw new Error('Parameter `path` is required when calling `customPut`.');\n }\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'PUT',\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {},\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves known incidents for the selected clusters.\n *\n * @param getClusterIncidents - The getClusterIncidents object.\n * @param getClusterIncidents.clusters - Subset of clusters, separated by comma.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getClusterIncidents(\n { clusters }: GetClusterIncidentsProps,\n requestOptions?: RequestOptions,\n ): Promise<IncidentsResponse> {\n if (!clusters) {\n throw new Error('Parameter `clusters` is required when calling `getClusterIncidents`.');\n }\n\n const requestPath = '/1/incidents/{clusters}'.replace('{clusters}', encodeURIComponent(clusters));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the status of selected clusters.\n *\n * @param getClusterStatus - The getClusterStatus object.\n * @param getClusterStatus.clusters - Subset of clusters, separated by comma.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getClusterStatus({ clusters }: GetClusterStatusProps, requestOptions?: RequestOptions): Promise<StatusResponse> {\n if (!clusters) {\n throw new Error('Parameter `clusters` is required when calling `getClusterStatus`.');\n }\n\n const requestPath = '/1/status/{clusters}'.replace('{clusters}', encodeURIComponent(clusters));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves known incidents for all clusters.\n *\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getIncidents(requestOptions?: RequestOptions): Promise<IncidentsResponse> {\n const requestPath = '/1/incidents';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves average times for indexing operations for selected clusters.\n *\n * @param getIndexingTime - The getIndexingTime object.\n * @param getIndexingTime.clusters - Subset of clusters, separated by comma.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getIndexingTime(\n { clusters }: GetIndexingTimeProps,\n requestOptions?: RequestOptions,\n ): Promise<IndexingTimeResponse> {\n if (!clusters) {\n throw new Error('Parameter `clusters` is required when calling `getIndexingTime`.');\n }\n\n const requestPath = '/1/indexing/{clusters}'.replace('{clusters}', encodeURIComponent(clusters));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the average latency for search requests for selected clusters.\n *\n * @param getLatency - The getLatency object.\n * @param getLatency.clusters - Subset of clusters, separated by comma.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getLatency({ clusters }: GetLatencyProps, requestOptions?: RequestOptions): Promise<LatencyResponse> {\n if (!clusters) {\n throw new Error('Parameter `clusters` is required when calling `getLatency`.');\n }\n\n const requestPath = '/1/latency/{clusters}'.replace('{clusters}', encodeURIComponent(clusters));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves metrics related to your Algolia infrastructure, aggregated over a selected time window. Access to this API is available as part of the [Premium or Elevate plans](https://www.algolia.com/pricing). You must authenticate requests with the `x-algolia-application-id` and `x-algolia-api-key` headers (using the Monitoring API key).\n *\n * @param getMetrics - The getMetrics object.\n * @param getMetrics.metric - Metric to report. For more information about the individual metrics, see the description of the API response. To include all metrics, use `*`.\n * @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.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getMetrics({ metric, period }: GetMetricsProps, requestOptions?: RequestOptions): Promise<InfrastructureResponse> {\n if (!metric) {\n throw new Error('Parameter `metric` is required when calling `getMetrics`.');\n }\n\n if (!period) {\n throw new Error('Parameter `period` is required when calling `getMetrics`.');\n }\n\n const requestPath = '/1/infrastructure/{metric}/period/{period}'\n .replace('{metric}', encodeURIComponent(metric))\n .replace('{period}', encodeURIComponent(period));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Test whether clusters are reachable or not.\n *\n * @param getReachability - The getReachability object.\n * @param getReachability.clusters - Subset of clusters, separated by comma.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getReachability(\n { clusters }: GetReachabilityProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, Record<string, boolean>>> {\n if (!clusters) {\n throw new Error('Parameter `clusters` is required when calling `getReachability`.');\n }\n\n const requestPath = '/1/reachability/{clusters}/probes'.replace('{clusters}', encodeURIComponent(clusters));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the servers that belong 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.\n *\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getServers(requestOptions?: RequestOptions): Promise<InventoryResponse> {\n const requestPath = '/1/inventory/servers';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the status of all Algolia clusters and instances.\n *\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getStatus(requestOptions?: RequestOptions): Promise<StatusResponse> {\n const requestPath = '/1/status';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,2BAA+D;AA6BxD,IAAM,mBAAmB;AAEhC,SAAS,kBAA0B;AACjC,SAAO,CAAC,EAAE,KAAK,sBAAsB,QAAQ,aAAa,UAAU,QAAQ,CAAC;AAC/E;AAGO,SAAS,uBAAuB;AAAA,EACrC,OAAO;AAAA,EACP,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAwB;AACtB,QAAM,WAAO,iCAAW,aAAa,cAAc,QAAQ;AAC3D,QAAM,kBAAc,wCAAkB;AAAA,IACpC,OAAO,gBAAgB;AAAA,IACvB,GAAG;AAAA,IACH,kBAAc,sCAAgB;AAAA,MAC5B;AAAA,MACA,QAAQ;AAAA,MACR,SAAS;AAAA,IACX,CAAC;AAAA,IACD,aAAa;AAAA,MACX,gBAAgB;AAAA,MAChB,GAAG,KAAK,QAAQ;AAAA,MAChB,GAAG,QAAQ;AAAA,IACb;AAAA,IACA,qBAAqB;AAAA,MACnB,GAAG,KAAK,gBAAgB;AAAA,MACxB,GAAG,QAAQ;AAAA,IACb;AAAA,EACF,CAAC;AAED,SAAO;AAAA,IACL;AAAA;AAAA;AAAA;AAAA,IAKA,OAAO;AAAA;AAAA;AAAA;AAAA,IAKP,aAA4B;AAC1B,aAAO,QAAQ,IAAI,CAAC,YAAY,cAAc,MAAM,GAAG,YAAY,eAAe,MAAM,CAAC,CAAC,EAAE,KAAK,MAAM,MAAS;AAAA,IAClH;AAAA;AAAA;AAAA;AAAA,IAKA,IAAI,MAAc;AAChB,aAAO,YAAY,aAAa;AAAA,IAClC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,gBAAgB,SAAiB,SAAwB;AACvD,kBAAY,aAAa,IAAI,EAAE,SAA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D;AAClE,YAAM,cAAc;AACpB,YAAM,UAAmB,CAAC;AAC1B,YAAM,kBAAmC,CAAC;AAE1C,YAAM,UAAmB;AAAA,QACvB,QAAQ;AAAA,QACR,MAAM;AAAA,QACN;AAAA,QACA;AAAA,MACF;AAEA,aAAO,YAAY,QAAQ,SAAS,cAAc;AAAA,IACpD;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/monitoringClient.ts"],"sourcesContent":["// 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.\n\nimport type {\n CreateClientOptions,\n Headers,\n Host,\n QueryParameters,\n Request,\n RequestOptions,\n} from '@algolia/client-common';\nimport { createAuth, createTransporter, getAlgoliaAgent } from '@algolia/client-common';\n\nimport type { IncidentsResponse } from '../model/incidentsResponse';\nimport type { IndexingTimeResponse } from '../model/indexingTimeResponse';\nimport type { InfrastructureResponse } from '../model/infrastructureResponse';\nimport type { InventoryResponse } from '../model/inventoryResponse';\nimport type { LatencyResponse } from '../model/latencyResponse';\n\nimport type { StatusResponse } from '../model/statusResponse';\n\nimport type {\n CustomDeleteProps,\n CustomGetProps,\n CustomPostProps,\n CustomPutProps,\n GetClusterIncidentsProps,\n GetClusterStatusProps,\n GetIndexingTimeProps,\n GetLatencyProps,\n GetMetricsProps,\n GetReachabilityProps,\n} from '../model/clientMethodProps';\n\nexport const apiClientVersion = '1.10.0';\n\nfunction getDefaultHosts(): Host[] {\n return [{ url: 'status.algolia.com', accept: 'readWrite', protocol: 'https' }];\n}\n\nexport function createMonitoringClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n ...options\n}: CreateClientOptions) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: 'Monitoring',\n version: apiClientVersion,\n }),\n baseHeaders: {\n 'content-type': 'text/plain',\n ...auth.headers(),\n ...options.baseHeaders,\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters,\n },\n });\n\n return {\n transporter,\n\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache(): Promise<void> {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => undefined);\n },\n\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua(): string {\n return transporter.algoliaAgent.value;\n },\n\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment: string, version?: string): void {\n transporter.algoliaAgent.add({ segment, version });\n },\n\n /**\n * Helper method to switch the API key used to authenticate the requests.\n *\n * @param params - Method params.\n * @param params.apiKey - The new API Key to use.\n */\n setClientApiKey({ apiKey }: { apiKey: string }): void {\n if (!authMode || authMode === 'WithinHeaders') {\n transporter.baseHeaders['x-algolia-api-key'] = apiKey;\n } else {\n transporter.baseQueryParameters['x-algolia-api-key'] = apiKey;\n }\n },\n\n /**\n * This method allow you to send requests to the Algolia REST API.\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, anything after \\\"/1\\\" must be specified.\n * @param customDelete.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customDelete(\n { path, parameters }: CustomDeleteProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, unknown>> {\n if (!path) {\n throw new Error('Parameter `path` is required when calling `customDelete`.');\n }\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'DELETE',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * This method allow you to send requests to the Algolia REST API.\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, anything after \\\"/1\\\" must be specified.\n * @param customGet.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>> {\n if (!path) {\n throw new Error('Parameter `path` is required when calling `customGet`.');\n }\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * This method allow you to send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, anything after \\\"/1\\\" must be specified.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost(\n { path, parameters, body }: CustomPostProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, unknown>> {\n if (!path) {\n throw new Error('Parameter `path` is required when calling `customPost`.');\n }\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {},\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * This method allow you to send requests to the Algolia REST API.\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, anything after \\\"/1\\\" must be specified.\n * @param customPut.parameters - Query parameters to apply to the current query.\n * @param customPut.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPut(\n { path, parameters, body }: CustomPutProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, unknown>> {\n if (!path) {\n throw new Error('Parameter `path` is required when calling `customPut`.');\n }\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'PUT',\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {},\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves known incidents for the selected clusters.\n * @param getClusterIncidents - The getClusterIncidents object.\n * @param getClusterIncidents.clusters - Subset of clusters, separated by commas.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getClusterIncidents(\n { clusters }: GetClusterIncidentsProps,\n requestOptions?: RequestOptions,\n ): Promise<IncidentsResponse> {\n if (!clusters) {\n throw new Error('Parameter `clusters` is required when calling `getClusterIncidents`.');\n }\n\n const requestPath = '/1/incidents/{clusters}'.replace('{clusters}', encodeURIComponent(clusters));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the status of selected clusters.\n * @param getClusterStatus - The getClusterStatus object.\n * @param getClusterStatus.clusters - Subset of clusters, separated by commas.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getClusterStatus({ clusters }: GetClusterStatusProps, requestOptions?: RequestOptions): Promise<StatusResponse> {\n if (!clusters) {\n throw new Error('Parameter `clusters` is required when calling `getClusterStatus`.');\n }\n\n const requestPath = '/1/status/{clusters}'.replace('{clusters}', encodeURIComponent(clusters));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves known incidents for all clusters.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getIncidents(requestOptions?: RequestOptions): Promise<IncidentsResponse> {\n const requestPath = '/1/incidents';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves average times for indexing operations for selected clusters.\n * @param getIndexingTime - The getIndexingTime object.\n * @param getIndexingTime.clusters - Subset of clusters, separated by commas.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getIndexingTime(\n { clusters }: GetIndexingTimeProps,\n requestOptions?: RequestOptions,\n ): Promise<IndexingTimeResponse> {\n if (!clusters) {\n throw new Error('Parameter `clusters` is required when calling `getIndexingTime`.');\n }\n\n const requestPath = '/1/indexing/{clusters}'.replace('{clusters}', encodeURIComponent(clusters));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the average latency for search requests for selected clusters.\n * @param getLatency - The getLatency object.\n * @param getLatency.clusters - Subset of clusters, separated by commas.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getLatency({ clusters }: GetLatencyProps, requestOptions?: RequestOptions): Promise<LatencyResponse> {\n if (!clusters) {\n throw new Error('Parameter `clusters` is required when calling `getLatency`.');\n }\n\n const requestPath = '/1/latency/{clusters}'.replace('{clusters}', encodeURIComponent(clusters));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves metrics related to your Algolia infrastructure, aggregated over a selected time window. Access to this API is available as part of the [Premium or Elevate plans](https://www.algolia.com/pricing). You must authenticate requests with the `x-algolia-application-id` and `x-algolia-api-key` headers (using the Monitoring API key).\n * @param getMetrics - The getMetrics object.\n * @param getMetrics.metric - Metric to report. For more information about the individual metrics, see the description of the API response. To include all metrics, use `*`.\n * @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.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getMetrics({ metric, period }: GetMetricsProps, requestOptions?: RequestOptions): Promise<InfrastructureResponse> {\n if (!metric) {\n throw new Error('Parameter `metric` is required when calling `getMetrics`.');\n }\n\n if (!period) {\n throw new Error('Parameter `period` is required when calling `getMetrics`.');\n }\n\n const requestPath = '/1/infrastructure/{metric}/period/{period}'\n .replace('{metric}', encodeURIComponent(metric))\n .replace('{period}', encodeURIComponent(period));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Test whether clusters are reachable or not.\n * @param getReachability - The getReachability object.\n * @param getReachability.clusters - Subset of clusters, separated by commas.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getReachability(\n { clusters }: GetReachabilityProps,\n requestOptions?: RequestOptions,\n ): Promise<{ [key: string]: { [key: string]: boolean } }> {\n if (!clusters) {\n throw new Error('Parameter `clusters` is required when calling `getReachability`.');\n }\n\n const requestPath = '/1/reachability/{clusters}/probes'.replace('{clusters}', encodeURIComponent(clusters));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the servers that belong 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.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getServers(requestOptions?: RequestOptions): Promise<InventoryResponse> {\n const requestPath = '/1/inventory/servers';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the status of all Algolia clusters and instances.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getStatus(requestOptions?: RequestOptions): Promise<StatusResponse> {\n const requestPath = '/1/status';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,2BAA+D;AAuBxD,IAAM,mBAAmB;AAEhC,SAAS,kBAA0B;AACjC,SAAO,CAAC,EAAE,KAAK,sBAAsB,QAAQ,aAAa,UAAU,QAAQ,CAAC;AAC/E;AAEO,SAAS,uBAAuB;AAAA,EACrC,OAAO;AAAA,EACP,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAwB;AACtB,QAAM,WAAO,iCAAW,aAAa,cAAc,QAAQ;AAC3D,QAAM,kBAAc,wCAAkB;AAAA,IACpC,OAAO,gBAAgB;AAAA,IACvB,GAAG;AAAA,IACH,kBAAc,sCAAgB;AAAA,MAC5B;AAAA,MACA,QAAQ;AAAA,MACR,SAAS;AAAA,IACX,CAAC;AAAA,IACD,aAAa;AAAA,MACX,gBAAgB;AAAA,MAChB,GAAG,KAAK,QAAQ;AAAA,MAChB,GAAG,QAAQ;AAAA,IACb;AAAA,IACA,qBAAqB;AAAA,MACnB,GAAG,KAAK,gBAAgB;AAAA,MACxB,GAAG,QAAQ;AAAA,IACb;AAAA,EACF,CAAC;AAED,SAAO;AAAA,IACL;AAAA;AAAA;AAAA;AAAA,IAK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