@algolia/monitoring 1.2.5 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/node.d.ts CHANGED
@@ -1,19 +1,127 @@
1
1
  import * as _algolia_client_common from '@algolia/client-common';
2
- import { ClientOptions } from '@algolia/client-common';
2
+ import { CreateClientOptions, RequestOptions, ClientOptions } from '@algolia/client-common';
3
3
 
4
- type BadRequest = {
5
- reason?: string;
6
- };
4
+ type Metric = '*' | 'avg_build_time' | 'cpu_usage' | 'ram_indexing_usage' | 'ram_search_usage' | 'ssd_usage';
5
+
6
+ type Period = 'day' | 'hour' | 'minute' | 'month' | 'week';
7
7
 
8
8
  /**
9
- * Error.
9
+ * Properties for the `customDelete` method.
10
10
  */
11
- type ErrorBase = Record<string, any> & {
12
- message?: string;
11
+ type CustomDeleteProps = {
12
+ /**
13
+ * Path of the endpoint, anything after \"/1\" must be specified.
14
+ */
15
+ path: string;
16
+ /**
17
+ * Query parameters to apply to the current query.
18
+ */
19
+ parameters?: Record<string, any>;
13
20
  };
14
-
15
- type Forbidden = {
16
- reason?: string;
21
+ /**
22
+ * Properties for the `customGet` method.
23
+ */
24
+ type CustomGetProps = {
25
+ /**
26
+ * Path of the endpoint, anything after \"/1\" must be specified.
27
+ */
28
+ path: string;
29
+ /**
30
+ * Query parameters to apply to the current query.
31
+ */
32
+ parameters?: Record<string, any>;
33
+ };
34
+ /**
35
+ * Properties for the `customPost` method.
36
+ */
37
+ type CustomPostProps = {
38
+ /**
39
+ * Path of the endpoint, anything after \"/1\" must be specified.
40
+ */
41
+ path: string;
42
+ /**
43
+ * Query parameters to apply to the current query.
44
+ */
45
+ parameters?: Record<string, any>;
46
+ /**
47
+ * Parameters to send with the custom request.
48
+ */
49
+ body?: Record<string, unknown>;
50
+ };
51
+ /**
52
+ * Properties for the `customPut` method.
53
+ */
54
+ type CustomPutProps = {
55
+ /**
56
+ * Path of the endpoint, anything after \"/1\" must be specified.
57
+ */
58
+ path: string;
59
+ /**
60
+ * Query parameters to apply to the current query.
61
+ */
62
+ parameters?: Record<string, any>;
63
+ /**
64
+ * Parameters to send with the custom request.
65
+ */
66
+ body?: Record<string, unknown>;
67
+ };
68
+ /**
69
+ * Properties for the `getClusterIncidents` method.
70
+ */
71
+ type GetClusterIncidentsProps = {
72
+ /**
73
+ * Subset of clusters, separated by comma.
74
+ */
75
+ clusters: string;
76
+ };
77
+ /**
78
+ * Properties for the `getClusterStatus` method.
79
+ */
80
+ type GetClusterStatusProps = {
81
+ /**
82
+ * Subset of clusters, separated by comma.
83
+ */
84
+ clusters: string;
85
+ };
86
+ /**
87
+ * Properties for the `getIndexingTime` method.
88
+ */
89
+ type GetIndexingTimeProps = {
90
+ /**
91
+ * Subset of clusters, separated by comma.
92
+ */
93
+ clusters: string;
94
+ };
95
+ /**
96
+ * Properties for the `getLatency` method.
97
+ */
98
+ type GetLatencyProps = {
99
+ /**
100
+ * Subset of clusters, separated by comma.
101
+ */
102
+ clusters: string;
103
+ };
104
+ /**
105
+ * Properties for the `getMetrics` method.
106
+ */
107
+ type GetMetricsProps = {
108
+ /**
109
+ * Metric to report. For more information about the individual metrics, see the description of the API response. To include all metrics, use `*`.
110
+ */
111
+ metric: Metric;
112
+ /**
113
+ * 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.
114
+ */
115
+ period: Period;
116
+ };
117
+ /**
118
+ * Properties for the `getReachability` method.
119
+ */
120
+ type GetReachabilityProps = {
121
+ /**
122
+ * Subset of clusters, separated by comma.
123
+ */
124
+ clusters: string;
17
125
  };
18
126
 
19
127
  /**
@@ -144,162 +252,169 @@ type LatencyResponse = {
144
252
  metrics?: LatencyMetric;
145
253
  };
146
254
 
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
255
  type StatusResponse = {
152
256
  status?: Record<string, Status>;
153
257
  };
154
258
 
155
- type Unauthorized = {
156
- reason?: string;
157
- };
158
-
159
- /**
160
- * Properties for the `customDelete` method.
161
- */
162
- type CustomDeleteProps = {
259
+ declare const apiClientVersion = "1.3.0";
260
+ declare function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
261
+ transporter: _algolia_client_common.Transporter;
163
262
  /**
164
- * Path of the endpoint, anything after \"/1\" must be specified.
263
+ * The `appId` currently in use.
165
264
  */
166
- path: string;
265
+ appId: string;
167
266
  /**
168
- * Query parameters to apply to the current query.
267
+ * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
169
268
  */
170
- parameters?: Record<string, any>;
171
- };
172
- /**
173
- * Properties for the `customGet` method.
174
- */
175
- type CustomGetProps = {
269
+ clearCache(): Promise<void>;
176
270
  /**
177
- * Path of the endpoint, anything after \"/1\" must be specified.
271
+ * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
178
272
  */
179
- path: string;
273
+ readonly _ua: string;
180
274
  /**
181
- * Query parameters to apply to the current query.
275
+ * Adds a `segment` to the `x-algolia-agent` sent with every requests.
276
+ *
277
+ * @param segment - The algolia agent (user-agent) segment to add.
278
+ * @param version - The version of the agent.
182
279
  */
183
- parameters?: Record<string, any>;
184
- };
185
- /**
186
- * Properties for the `customPost` method.
187
- */
188
- type CustomPostProps = {
280
+ addAlgoliaAgent(segment: string, version?: string): void;
189
281
  /**
190
- * Path of the endpoint, anything after \"/1\" must be specified.
191
- */
192
- path: string;
282
+ * Helper method to switch the API key used to authenticate the requests.
283
+ *
284
+ * @param params - Method params.
285
+ * @param params.apiKey - The new API Key to use.
286
+ */
287
+ setClientApiKey({ apiKey }: {
288
+ apiKey: string;
289
+ }): void;
193
290
  /**
194
- * Query parameters to apply to the current query.
291
+ * This method allow you to send requests to the Algolia REST API.
292
+ *
293
+ * @param customDelete - The customDelete object.
294
+ * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
295
+ * @param customDelete.parameters - Query parameters to apply to the current query.
296
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
195
297
  */
196
- parameters?: Record<string, any>;
298
+ customDelete({ path, parameters }: CustomDeleteProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
197
299
  /**
198
- * Parameters to send with the custom request.
300
+ * This method allow you to send requests to the Algolia REST API.
301
+ *
302
+ * @param customGet - The customGet object.
303
+ * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
304
+ * @param customGet.parameters - Query parameters to apply to the current query.
305
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
199
306
  */
200
- body?: Record<string, unknown>;
201
- };
202
- /**
203
- * Properties for the `customPut` method.
204
- */
205
- type CustomPutProps = {
307
+ customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
206
308
  /**
207
- * Path of the endpoint, anything after \"/1\" must be specified.
309
+ * This method allow you to send requests to the Algolia REST API.
310
+ *
311
+ * @param customPost - The customPost object.
312
+ * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
313
+ * @param customPost.parameters - Query parameters to apply to the current query.
314
+ * @param customPost.body - Parameters to send with the custom request.
315
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
208
316
  */
209
- path: string;
317
+ customPost({ path, parameters, body }: CustomPostProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
210
318
  /**
211
- * Query parameters to apply to the current query.
319
+ * This method allow you to send requests to the Algolia REST API.
320
+ *
321
+ * @param customPut - The customPut object.
322
+ * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
323
+ * @param customPut.parameters - Query parameters to apply to the current query.
324
+ * @param customPut.body - Parameters to send with the custom request.
325
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
212
326
  */
213
- parameters?: Record<string, any>;
327
+ customPut({ path, parameters, body }: CustomPutProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
214
328
  /**
215
- * Parameters to send with the custom request.
329
+ * Retrieves known incidents for the selected clusters.
330
+ *
331
+ * @param getClusterIncidents - The getClusterIncidents object.
332
+ * @param getClusterIncidents.clusters - Subset of clusters, separated by comma.
333
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
216
334
  */
217
- body?: Record<string, unknown>;
218
- };
219
- /**
220
- * Properties for the `getClusterIncidents` method.
221
- */
222
- type GetClusterIncidentsProps = {
335
+ getClusterIncidents({ clusters }: GetClusterIncidentsProps, requestOptions?: RequestOptions): Promise<IncidentsResponse>;
223
336
  /**
224
- * Subset of clusters, separated by comma.
337
+ * Retrieves the status of selected clusters.
338
+ *
339
+ * @param getClusterStatus - The getClusterStatus object.
340
+ * @param getClusterStatus.clusters - Subset of clusters, separated by comma.
341
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
225
342
  */
226
- clusters: string;
227
- };
228
- /**
229
- * Properties for the `getClusterStatus` method.
230
- */
231
- type GetClusterStatusProps = {
343
+ getClusterStatus({ clusters }: GetClusterStatusProps, requestOptions?: RequestOptions): Promise<StatusResponse>;
232
344
  /**
233
- * Subset of clusters, separated by comma.
345
+ * Retrieves known incidents for all clusters.
346
+ *
347
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
234
348
  */
235
- clusters: string;
236
- };
237
- /**
238
- * Properties for the `getIndexingTime` method.
239
- */
240
- type GetIndexingTimeProps = {
349
+ getIncidents(requestOptions?: RequestOptions): Promise<IncidentsResponse>;
241
350
  /**
242
- * Subset of clusters, separated by comma.
351
+ * Retrieves average times for indexing operations for selected clusters.
352
+ *
353
+ * @param getIndexingTime - The getIndexingTime object.
354
+ * @param getIndexingTime.clusters - Subset of clusters, separated by comma.
355
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
243
356
  */
244
- clusters: string;
245
- };
246
- /**
247
- * Properties for the `getLatency` method.
248
- */
249
- type GetLatencyProps = {
357
+ getIndexingTime({ clusters }: GetIndexingTimeProps, requestOptions?: RequestOptions): Promise<IndexingTimeResponse>;
250
358
  /**
251
- * Subset of clusters, separated by comma.
359
+ * Retrieves the average latency for search requests for selected clusters.
360
+ *
361
+ * @param getLatency - The getLatency object.
362
+ * @param getLatency.clusters - Subset of clusters, separated by comma.
363
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
252
364
  */
253
- clusters: string;
254
- };
255
- /**
256
- * Properties for the `getMetrics` method.
257
- */
258
- type GetMetricsProps = {
365
+ getLatency({ clusters }: GetLatencyProps, requestOptions?: RequestOptions): Promise<LatencyResponse>;
259
366
  /**
260
- * Metric to report. For more information about the individual metrics, see the description of the API response. To include all metrics, use `*`.
367
+ * 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).
368
+ *
369
+ * @param getMetrics - The getMetrics object.
370
+ * @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 `*`.
371
+ * @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.
372
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
261
373
  */
262
- metric: Metric;
374
+ getMetrics({ metric, period }: GetMetricsProps, requestOptions?: RequestOptions): Promise<InfrastructureResponse>;
263
375
  /**
264
- * 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.
376
+ * Test whether clusters are reachable or not.
377
+ *
378
+ * @param getReachability - The getReachability object.
379
+ * @param getReachability.clusters - Subset of clusters, separated by comma.
380
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
265
381
  */
266
- period: Period;
267
- };
268
- /**
269
- * Properties for the `getReachability` method.
270
- */
271
- type GetReachabilityProps = {
382
+ getReachability({ clusters }: GetReachabilityProps, requestOptions?: RequestOptions): Promise<Record<string, Record<string, boolean>>>;
383
+ /**
384
+ * 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.
385
+ *
386
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
387
+ */
388
+ getServers(requestOptions?: RequestOptions): Promise<InventoryResponse>;
272
389
  /**
273
- * Subset of clusters, separated by comma.
390
+ * Retrieves the status of all Algolia clusters and instances.
391
+ *
392
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
274
393
  */
275
- clusters: string;
394
+ getStatus(requestOptions?: RequestOptions): Promise<StatusResponse>;
276
395
  };
277
396
 
278
- declare const apiClientVersion = "1.2.5";
397
+ type BadRequest = {
398
+ reason?: string;
399
+ };
279
400
 
280
401
  /**
281
- * The client type.
402
+ * Error.
282
403
  */
283
- type MonitoringClient = ReturnType<typeof monitoringClient>;
284
- declare function monitoringClient(appId: string, apiKey: string, options?: ClientOptions): {
285
- transporter: _algolia_client_common.Transporter;
286
- appId: string;
287
- clearCache(): Promise<void>;
288
- _ua: string;
289
- 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>;
404
+ type ErrorBase = Record<string, any> & {
405
+ message?: string;
303
406
  };
304
407
 
408
+ type Forbidden = {
409
+ reason?: string;
410
+ };
411
+
412
+ type Unauthorized = {
413
+ reason?: string;
414
+ };
415
+
416
+ type MonitoringClient = ReturnType<typeof createMonitoringClient>;
417
+
418
+ declare function monitoringClient(appId: string, apiKey: string, options?: ClientOptions): MonitoringClient;
419
+
305
420
  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.5";
28
+ var apiClientVersion = "1.3.0";
29
29
  function getDefaultHosts() {
30
30
  return [{ url: "status.algolia.com", accept: "readWrite", protocol: "https" }];
31
31
  }
@@ -37,26 +37,25 @@ function createMonitoringClient({
37
37
  ...options
38
38
  }) {
39
39
  const auth = (0, import_client_common.createAuth)(appIdOption, apiKeyOption, authMode);
40
- const transporter = (0, import_client_common.createTransporter)({
41
- hosts: getDefaultHosts(),
42
- ...options,
43
- algoliaAgent: (0, import_client_common.getAlgoliaAgent)({
44
- algoliaAgents,
45
- client: "Monitoring",
46
- version: apiClientVersion
47
- }),
48
- baseHeaders: {
49
- "content-type": "text/plain",
50
- ...auth.headers(),
51
- ...options.baseHeaders
52
- },
53
- baseQueryParameters: {
54
- ...auth.queryParameters(),
55
- ...options.baseQueryParameters
56
- }
57
- });
58
40
  return {
59
- transporter,
41
+ transporter: (0, import_client_common.createTransporter)({
42
+ hosts: getDefaultHosts(),
43
+ ...options,
44
+ algoliaAgent: (0, import_client_common.getAlgoliaAgent)({
45
+ algoliaAgents,
46
+ client: "Monitoring",
47
+ version: apiClientVersion
48
+ }),
49
+ baseHeaders: {
50
+ "content-type": "text/plain",
51
+ ...auth.headers(),
52
+ ...options.baseHeaders
53
+ },
54
+ baseQueryParameters: {
55
+ ...auth.queryParameters(),
56
+ ...options.baseQueryParameters
57
+ }
58
+ }),
60
59
  /**
61
60
  * The `appId` currently in use.
62
61
  */
@@ -65,13 +64,15 @@ function createMonitoringClient({
65
64
  * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
66
65
  */
67
66
  clearCache() {
68
- return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);
67
+ return Promise.all([this.transporter.requestsCache.clear(), this.transporter.responsesCache.clear()]).then(
68
+ () => void 0
69
+ );
69
70
  },
70
71
  /**
71
72
  * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
72
73
  */
73
74
  get _ua() {
74
- return transporter.algoliaAgent.value;
75
+ return this.transporter.algoliaAgent.value;
75
76
  },
76
77
  /**
77
78
  * Adds a `segment` to the `x-algolia-agent` sent with every requests.
@@ -80,7 +81,16 @@ function createMonitoringClient({
80
81
  * @param version - The version of the agent.
81
82
  */
82
83
  addAlgoliaAgent(segment, version) {
83
- transporter.algoliaAgent.add({ segment, version });
84
+ this.transporter.algoliaAgent.add({ segment, version });
85
+ },
86
+ /**
87
+ * Helper method to switch the API key used to authenticate the requests.
88
+ *
89
+ * @param params - Method params.
90
+ * @param params.apiKey - The new API Key to use.
91
+ */
92
+ setClientApiKey({ apiKey }) {
93
+ this.transporter.baseHeaders["x-algolia-api-key"] = apiKey;
84
94
  },
85
95
  /**
86
96
  * This method allow you to send requests to the Algolia REST API.
@@ -103,7 +113,7 @@ function createMonitoringClient({
103
113
  queryParameters,
104
114
  headers
105
115
  };
106
- return transporter.request(request, requestOptions);
116
+ return this.transporter.request(request, requestOptions);
107
117
  },
108
118
  /**
109
119
  * This method allow you to send requests to the Algolia REST API.
@@ -126,7 +136,7 @@ function createMonitoringClient({
126
136
  queryParameters,
127
137
  headers
128
138
  };
129
- return transporter.request(request, requestOptions);
139
+ return this.transporter.request(request, requestOptions);
130
140
  },
131
141
  /**
132
142
  * This method allow you to send requests to the Algolia REST API.
@@ -151,7 +161,7 @@ function createMonitoringClient({
151
161
  headers,
152
162
  data: body ? body : {}
153
163
  };
154
- return transporter.request(request, requestOptions);
164
+ return this.transporter.request(request, requestOptions);
155
165
  },
156
166
  /**
157
167
  * This method allow you to send requests to the Algolia REST API.
@@ -176,7 +186,7 @@ function createMonitoringClient({
176
186
  headers,
177
187
  data: body ? body : {}
178
188
  };
179
- return transporter.request(request, requestOptions);
189
+ return this.transporter.request(request, requestOptions);
180
190
  },
181
191
  /**
182
192
  * Retrieves known incidents for the selected clusters.
@@ -198,7 +208,7 @@ function createMonitoringClient({
198
208
  queryParameters,
199
209
  headers
200
210
  };
201
- return transporter.request(request, requestOptions);
211
+ return this.transporter.request(request, requestOptions);
202
212
  },
203
213
  /**
204
214
  * Retrieves the status of selected clusters.
@@ -220,7 +230,7 @@ function createMonitoringClient({
220
230
  queryParameters,
221
231
  headers
222
232
  };
223
- return transporter.request(request, requestOptions);
233
+ return this.transporter.request(request, requestOptions);
224
234
  },
225
235
  /**
226
236
  * Retrieves known incidents for all clusters.
@@ -237,7 +247,7 @@ function createMonitoringClient({
237
247
  queryParameters,
238
248
  headers
239
249
  };
240
- return transporter.request(request, requestOptions);
250
+ return this.transporter.request(request, requestOptions);
241
251
  },
242
252
  /**
243
253
  * Retrieves average times for indexing operations for selected clusters.
@@ -259,7 +269,7 @@ function createMonitoringClient({
259
269
  queryParameters,
260
270
  headers
261
271
  };
262
- return transporter.request(request, requestOptions);
272
+ return this.transporter.request(request, requestOptions);
263
273
  },
264
274
  /**
265
275
  * Retrieves the average latency for search requests for selected clusters.
@@ -281,7 +291,7 @@ function createMonitoringClient({
281
291
  queryParameters,
282
292
  headers
283
293
  };
284
- return transporter.request(request, requestOptions);
294
+ return this.transporter.request(request, requestOptions);
285
295
  },
286
296
  /**
287
297
  * 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).
@@ -307,7 +317,7 @@ function createMonitoringClient({
307
317
  queryParameters,
308
318
  headers
309
319
  };
310
- return transporter.request(request, requestOptions);
320
+ return this.transporter.request(request, requestOptions);
311
321
  },
312
322
  /**
313
323
  * Test whether clusters are reachable or not.
@@ -329,7 +339,7 @@ function createMonitoringClient({
329
339
  queryParameters,
330
340
  headers
331
341
  };
332
- return transporter.request(request, requestOptions);
342
+ return this.transporter.request(request, requestOptions);
333
343
  },
334
344
  /**
335
345
  * 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.
@@ -346,7 +356,7 @@ function createMonitoringClient({
346
356
  queryParameters,
347
357
  headers
348
358
  };
349
- return transporter.request(request, requestOptions);
359
+ return this.transporter.request(request, requestOptions);
350
360
  },
351
361
  /**
352
362
  * Retrieves the status of all Algolia clusters and instances.
@@ -363,7 +373,7 @@ function createMonitoringClient({
363
373
  queryParameters,
364
374
  headers
365
375
  };
366
- return transporter.request(request, requestOptions);
376
+ return this.transporter.request(request, requestOptions);
367
377
  }
368
378
  };
369
379
  }