@algolia/monitoring 1.2.5 → 1.3.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.
package/dist/browser.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.1";
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
- readonly _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 };
@@ -11,7 +11,7 @@ import { createXhrRequester } from "@algolia/requester-browser-xhr";
11
11
 
12
12
  // src/monitoringClient.ts
13
13
  import { createAuth, createTransporter, getAlgoliaAgent } from "@algolia/client-common";
14
- var apiClientVersion = "1.2.5";
14
+ var apiClientVersion = "1.3.1";
15
15
  function getDefaultHosts() {
16
16
  return [{ url: "status.algolia.com", accept: "readWrite", protocol: "https" }];
17
17
  }
@@ -23,26 +23,25 @@ function createMonitoringClient({
23
23
  ...options
24
24
  }) {
25
25
  const auth = createAuth(appIdOption, apiKeyOption, authMode);
26
- const transporter = createTransporter({
27
- hosts: getDefaultHosts(),
28
- ...options,
29
- algoliaAgent: getAlgoliaAgent({
30
- algoliaAgents,
31
- client: "Monitoring",
32
- version: apiClientVersion
33
- }),
34
- baseHeaders: {
35
- "content-type": "text/plain",
36
- ...auth.headers(),
37
- ...options.baseHeaders
38
- },
39
- baseQueryParameters: {
40
- ...auth.queryParameters(),
41
- ...options.baseQueryParameters
42
- }
43
- });
44
26
  return {
45
- transporter,
27
+ transporter: createTransporter({
28
+ hosts: getDefaultHosts(),
29
+ ...options,
30
+ algoliaAgent: getAlgoliaAgent({
31
+ algoliaAgents,
32
+ client: "Monitoring",
33
+ version: apiClientVersion
34
+ }),
35
+ baseHeaders: {
36
+ "content-type": "text/plain",
37
+ ...auth.headers(),
38
+ ...options.baseHeaders
39
+ },
40
+ baseQueryParameters: {
41
+ ...auth.queryParameters(),
42
+ ...options.baseQueryParameters
43
+ }
44
+ }),
46
45
  /**
47
46
  * The `appId` currently in use.
48
47
  */
@@ -51,13 +50,15 @@ function createMonitoringClient({
51
50
  * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
52
51
  */
53
52
  clearCache() {
54
- return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);
53
+ return Promise.all([this.transporter.requestsCache.clear(), this.transporter.responsesCache.clear()]).then(
54
+ () => void 0
55
+ );
55
56
  },
56
57
  /**
57
58
  * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
58
59
  */
59
60
  get _ua() {
60
- return transporter.algoliaAgent.value;
61
+ return this.transporter.algoliaAgent.value;
61
62
  },
62
63
  /**
63
64
  * Adds a `segment` to the `x-algolia-agent` sent with every requests.
@@ -66,7 +67,20 @@ function createMonitoringClient({
66
67
  * @param version - The version of the agent.
67
68
  */
68
69
  addAlgoliaAgent(segment, version) {
69
- transporter.algoliaAgent.add({ segment, version });
70
+ this.transporter.algoliaAgent.add({ segment, version });
71
+ },
72
+ /**
73
+ * Helper method to switch the API key used to authenticate the requests.
74
+ *
75
+ * @param params - Method params.
76
+ * @param params.apiKey - The new API Key to use.
77
+ */
78
+ setClientApiKey({ apiKey }) {
79
+ if (!authMode || authMode === "WithinHeaders") {
80
+ this.transporter.baseHeaders["x-algolia-api-key"] = apiKey;
81
+ } else {
82
+ this.transporter.baseQueryParameters["x-algolia-api-key"] = apiKey;
83
+ }
70
84
  },
71
85
  /**
72
86
  * This method allow you to send requests to the Algolia REST API.
@@ -89,7 +103,7 @@ function createMonitoringClient({
89
103
  queryParameters,
90
104
  headers
91
105
  };
92
- return transporter.request(request, requestOptions);
106
+ return this.transporter.request(request, requestOptions);
93
107
  },
94
108
  /**
95
109
  * This method allow you to send requests to the Algolia REST API.
@@ -112,7 +126,7 @@ function createMonitoringClient({
112
126
  queryParameters,
113
127
  headers
114
128
  };
115
- return transporter.request(request, requestOptions);
129
+ return this.transporter.request(request, requestOptions);
116
130
  },
117
131
  /**
118
132
  * This method allow you to send requests to the Algolia REST API.
@@ -137,7 +151,7 @@ function createMonitoringClient({
137
151
  headers,
138
152
  data: body ? body : {}
139
153
  };
140
- return transporter.request(request, requestOptions);
154
+ return this.transporter.request(request, requestOptions);
141
155
  },
142
156
  /**
143
157
  * This method allow you to send requests to the Algolia REST API.
@@ -162,7 +176,7 @@ function createMonitoringClient({
162
176
  headers,
163
177
  data: body ? body : {}
164
178
  };
165
- return transporter.request(request, requestOptions);
179
+ return this.transporter.request(request, requestOptions);
166
180
  },
167
181
  /**
168
182
  * Retrieves known incidents for the selected clusters.
@@ -184,7 +198,7 @@ function createMonitoringClient({
184
198
  queryParameters,
185
199
  headers
186
200
  };
187
- return transporter.request(request, requestOptions);
201
+ return this.transporter.request(request, requestOptions);
188
202
  },
189
203
  /**
190
204
  * Retrieves the status of selected clusters.
@@ -206,7 +220,7 @@ function createMonitoringClient({
206
220
  queryParameters,
207
221
  headers
208
222
  };
209
- return transporter.request(request, requestOptions);
223
+ return this.transporter.request(request, requestOptions);
210
224
  },
211
225
  /**
212
226
  * Retrieves known incidents for all clusters.
@@ -223,7 +237,7 @@ function createMonitoringClient({
223
237
  queryParameters,
224
238
  headers
225
239
  };
226
- return transporter.request(request, requestOptions);
240
+ return this.transporter.request(request, requestOptions);
227
241
  },
228
242
  /**
229
243
  * Retrieves average times for indexing operations for selected clusters.
@@ -245,7 +259,7 @@ function createMonitoringClient({
245
259
  queryParameters,
246
260
  headers
247
261
  };
248
- return transporter.request(request, requestOptions);
262
+ return this.transporter.request(request, requestOptions);
249
263
  },
250
264
  /**
251
265
  * Retrieves the average latency for search requests for selected clusters.
@@ -267,7 +281,7 @@ function createMonitoringClient({
267
281
  queryParameters,
268
282
  headers
269
283
  };
270
- return transporter.request(request, requestOptions);
284
+ return this.transporter.request(request, requestOptions);
271
285
  },
272
286
  /**
273
287
  * 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).
@@ -293,7 +307,7 @@ function createMonitoringClient({
293
307
  queryParameters,
294
308
  headers
295
309
  };
296
- return transporter.request(request, requestOptions);
310
+ return this.transporter.request(request, requestOptions);
297
311
  },
298
312
  /**
299
313
  * Test whether clusters are reachable or not.
@@ -315,7 +329,7 @@ function createMonitoringClient({
315
329
  queryParameters,
316
330
  headers
317
331
  };
318
- return transporter.request(request, requestOptions);
332
+ return this.transporter.request(request, requestOptions);
319
333
  },
320
334
  /**
321
335
  * 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.
@@ -332,7 +346,7 @@ function createMonitoringClient({
332
346
  queryParameters,
333
347
  headers
334
348
  };
335
- return transporter.request(request, requestOptions);
349
+ return this.transporter.request(request, requestOptions);
336
350
  },
337
351
  /**
338
352
  * Retrieves the status of all Algolia clusters and instances.
@@ -349,7 +363,7 @@ function createMonitoringClient({
349
363
  queryParameters,
350
364
  headers
351
365
  };
352
- return transporter.request(request, requestOptions);
366
+ return this.transporter.request(request, requestOptions);
353
367
  }
354
368
  };
355
369
  }