@algolia/monitoring 1.0.0-alpha.36 → 1.0.0-alpha.38
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/builds/browser.d.ts +1 -1
- package/dist/builds/node.d.ts +1 -1
- package/dist/model/clientMethodProps.d.ts +1 -1
- package/dist/model/getServers403Response.d.ts +4 -0
- package/dist/model/getServers403Response.d.ts.map +1 -0
- package/dist/model/index.d.ts +1 -1
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/region.d.ts +1 -1
- package/dist/model/server.d.ts +2 -2
- package/dist/monitoring.cjs +30 -30
- package/dist/monitoring.esm.browser.js +31 -31
- package/dist/monitoring.esm.node.js +30 -30
- package/dist/monitoring.umd.js +2 -2
- package/dist/src/monitoringClient.d.ts +15 -15
- package/dist/src/monitoringClient.d.ts.map +1 -1
- package/model/clientMethodProps.ts +1 -1
- package/model/{getInventory403Response.ts → getServers403Response.ts} +1 -1
- package/model/index.ts +1 -1
- package/model/region.ts +1 -1
- package/model/server.ts +2 -2
- package/package.json +7 -7
- package/dist/model/getInventory403Response.d.ts +0 -4
- package/dist/model/getInventory403Response.d.ts.map +0 -1
package/dist/builds/browser.d.ts
CHANGED
|
@@ -19,10 +19,10 @@ export declare function monitoringClient(appId: string, apiKey: string, options?
|
|
|
19
19
|
getClusterStatus({ clusters }: import("../model").GetClusterStatusProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").StatusResponse>;
|
|
20
20
|
getIncidents(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").IncidentsResponse>;
|
|
21
21
|
getIndexingTime({ clusters }: import("../model").GetIndexingTimeProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").IndexingTimeResponse>;
|
|
22
|
-
getInventory(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").InventoryResponse>;
|
|
23
22
|
getLatency({ clusters }: import("../model").GetLatencyProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").LatencyResponse>;
|
|
24
23
|
getMetrics({ metric, period }: import("../model").GetMetricsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").InfrastructureResponse>;
|
|
25
24
|
getReachability({ clusters }: import("../model").GetReachabilityProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, Record<string, boolean>>>;
|
|
25
|
+
getServers(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").InventoryResponse>;
|
|
26
26
|
getStatus(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").StatusResponse>;
|
|
27
27
|
};
|
|
28
28
|
//# sourceMappingURL=browser.d.ts.map
|
package/dist/builds/node.d.ts
CHANGED
|
@@ -19,10 +19,10 @@ export declare function monitoringClient(appId: string, apiKey: string, options?
|
|
|
19
19
|
getClusterStatus({ clusters }: import("../model").GetClusterStatusProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").StatusResponse>;
|
|
20
20
|
getIncidents(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").IncidentsResponse>;
|
|
21
21
|
getIndexingTime({ clusters }: import("../model").GetIndexingTimeProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").IndexingTimeResponse>;
|
|
22
|
-
getInventory(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").InventoryResponse>;
|
|
23
22
|
getLatency({ clusters }: import("../model").GetLatencyProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").LatencyResponse>;
|
|
24
23
|
getMetrics({ metric, period }: import("../model").GetMetricsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").InfrastructureResponse>;
|
|
25
24
|
getReachability({ clusters }: import("../model").GetReachabilityProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, Record<string, boolean>>>;
|
|
25
|
+
getServers(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").InventoryResponse>;
|
|
26
26
|
getStatus(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").StatusResponse>;
|
|
27
27
|
};
|
|
28
28
|
//# sourceMappingURL=node.d.ts.map
|
|
@@ -101,7 +101,7 @@ export type GetLatencyProps = {
|
|
|
101
101
|
*/
|
|
102
102
|
export type GetMetricsProps = {
|
|
103
103
|
/**
|
|
104
|
-
* Metric to report. For more information about the individual metrics, see the response. To include all metrics, use
|
|
104
|
+
* Metric to report. For more information about the individual metrics, see the description of the API response. To include all metrics, use `*`.
|
|
105
105
|
*/
|
|
106
106
|
metric: Metric;
|
|
107
107
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getServers403Response.d.ts","sourceRoot":"","sources":["../../model/getServers403Response.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
|
package/dist/model/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../model/index.ts"],"names":[],"mappings":"AAEA,cAAc,aAAa,CAAC;AAC5B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../model/index.ts"],"names":[],"mappings":"AAEA,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,qBAAqB,CAAC"}
|
package/dist/model/region.d.ts
CHANGED
package/dist/model/server.d.ts
CHANGED
|
@@ -8,11 +8,11 @@ export type Server = {
|
|
|
8
8
|
name?: string;
|
|
9
9
|
region?: Region;
|
|
10
10
|
/**
|
|
11
|
-
* Included to support legacy applications.
|
|
11
|
+
* Included to support legacy applications. Use `is_replica` instead.
|
|
12
12
|
*/
|
|
13
13
|
is_slave?: boolean;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Whether this server is a replica of another server.
|
|
16
16
|
*/
|
|
17
17
|
is_replica?: boolean;
|
|
18
18
|
/**
|
package/dist/monitoring.cjs
CHANGED
|
@@ -4,7 +4,7 @@ var clientCommon = require('@algolia/client-common');
|
|
|
4
4
|
var requesterNodeHttp = require('@algolia/requester-node-http');
|
|
5
5
|
|
|
6
6
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
7
|
-
const apiClientVersion = '1.0.0-alpha.
|
|
7
|
+
const apiClientVersion = '1.0.0-alpha.38';
|
|
8
8
|
function getDefaultHosts() {
|
|
9
9
|
return [
|
|
10
10
|
{ url: 'status.algolia.com', accept: 'readWrite', protocol: 'https' },
|
|
@@ -73,7 +73,7 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
73
73
|
if (!path) {
|
|
74
74
|
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
75
75
|
}
|
|
76
|
-
const requestPath = '/
|
|
76
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
77
77
|
const headers = {};
|
|
78
78
|
const queryParameters = parameters ? parameters : {};
|
|
79
79
|
const request = {
|
|
@@ -96,7 +96,7 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
96
96
|
if (!path) {
|
|
97
97
|
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
98
98
|
}
|
|
99
|
-
const requestPath = '/
|
|
99
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
100
100
|
const headers = {};
|
|
101
101
|
const queryParameters = parameters ? parameters : {};
|
|
102
102
|
const request = {
|
|
@@ -120,7 +120,7 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
120
120
|
if (!path) {
|
|
121
121
|
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
122
122
|
}
|
|
123
|
-
const requestPath = '/
|
|
123
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
124
124
|
const headers = {};
|
|
125
125
|
const queryParameters = parameters ? parameters : {};
|
|
126
126
|
const request = {
|
|
@@ -145,7 +145,7 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
145
145
|
if (!path) {
|
|
146
146
|
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
147
147
|
}
|
|
148
|
-
const requestPath = '/
|
|
148
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
149
149
|
const headers = {};
|
|
150
150
|
const queryParameters = parameters ? parameters : {};
|
|
151
151
|
const request = {
|
|
@@ -158,7 +158,7 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
158
158
|
return transporter.request(request, requestOptions);
|
|
159
159
|
},
|
|
160
160
|
/**
|
|
161
|
-
*
|
|
161
|
+
* Retrieves known incidents for the selected clusters.
|
|
162
162
|
*
|
|
163
163
|
* @param getClusterIncidents - The getClusterIncidents object.
|
|
164
164
|
* @param getClusterIncidents.clusters - Subset of clusters, separated by comma.
|
|
@@ -180,7 +180,7 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
180
180
|
return transporter.request(request, requestOptions);
|
|
181
181
|
},
|
|
182
182
|
/**
|
|
183
|
-
*
|
|
183
|
+
* Retrieves the status of selected clusters.
|
|
184
184
|
*
|
|
185
185
|
* @param getClusterStatus - The getClusterStatus object.
|
|
186
186
|
* @param getClusterStatus.clusters - Subset of clusters, separated by comma.
|
|
@@ -202,7 +202,7 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
202
202
|
return transporter.request(request, requestOptions);
|
|
203
203
|
},
|
|
204
204
|
/**
|
|
205
|
-
*
|
|
205
|
+
* Retrieves known incidents for all clusters.
|
|
206
206
|
*
|
|
207
207
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
208
208
|
*/
|
|
@@ -219,7 +219,7 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
219
219
|
return transporter.request(request, requestOptions);
|
|
220
220
|
},
|
|
221
221
|
/**
|
|
222
|
-
*
|
|
222
|
+
* Retrieves average times for indexing operations for selected clusters.
|
|
223
223
|
*
|
|
224
224
|
* @param getIndexingTime - The getIndexingTime object.
|
|
225
225
|
* @param getIndexingTime.clusters - Subset of clusters, separated by comma.
|
|
@@ -241,24 +241,7 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
241
241
|
return transporter.request(request, requestOptions);
|
|
242
242
|
},
|
|
243
243
|
/**
|
|
244
|
-
*
|
|
245
|
-
*
|
|
246
|
-
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
247
|
-
*/
|
|
248
|
-
getInventory(requestOptions) {
|
|
249
|
-
const requestPath = '/1/inventory/servers';
|
|
250
|
-
const headers = {};
|
|
251
|
-
const queryParameters = {};
|
|
252
|
-
const request = {
|
|
253
|
-
method: 'GET',
|
|
254
|
-
path: requestPath,
|
|
255
|
-
queryParameters,
|
|
256
|
-
headers,
|
|
257
|
-
};
|
|
258
|
-
return transporter.request(request, requestOptions);
|
|
259
|
-
},
|
|
260
|
-
/**
|
|
261
|
-
* List the average latency for search requests for selected clusters.
|
|
244
|
+
* Retrieves the average latency for search requests for selected clusters.
|
|
262
245
|
*
|
|
263
246
|
* @param getLatency - The getLatency object.
|
|
264
247
|
* @param getLatency.clusters - Subset of clusters, separated by comma.
|
|
@@ -280,10 +263,10 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
280
263
|
return transporter.request(request, requestOptions);
|
|
281
264
|
},
|
|
282
265
|
/**
|
|
283
|
-
*
|
|
266
|
+
* 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).
|
|
284
267
|
*
|
|
285
268
|
* @param getMetrics - The getMetrics object.
|
|
286
|
-
* @param getMetrics.metric - Metric to report. For more information about the individual metrics, see the response. To include all metrics, use
|
|
269
|
+
* @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 `*`.
|
|
287
270
|
* @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.
|
|
288
271
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
289
272
|
*/
|
|
@@ -330,7 +313,24 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
330
313
|
return transporter.request(request, requestOptions);
|
|
331
314
|
},
|
|
332
315
|
/**
|
|
333
|
-
*
|
|
316
|
+
* 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.
|
|
317
|
+
*
|
|
318
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
319
|
+
*/
|
|
320
|
+
getServers(requestOptions) {
|
|
321
|
+
const requestPath = '/1/inventory/servers';
|
|
322
|
+
const headers = {};
|
|
323
|
+
const queryParameters = {};
|
|
324
|
+
const request = {
|
|
325
|
+
method: 'GET',
|
|
326
|
+
path: requestPath,
|
|
327
|
+
queryParameters,
|
|
328
|
+
headers,
|
|
329
|
+
};
|
|
330
|
+
return transporter.request(request, requestOptions);
|
|
331
|
+
},
|
|
332
|
+
/**
|
|
333
|
+
* Retrieves the status of all Algolia clusters and instances.
|
|
334
334
|
*
|
|
335
335
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
336
336
|
*/
|
|
@@ -207,7 +207,7 @@ function _toPrimitive(t, r) {
|
|
|
207
207
|
}
|
|
208
208
|
function _toPropertyKey(t) {
|
|
209
209
|
var i = _toPrimitive(t, "string");
|
|
210
|
-
return "symbol" == typeof i ? i :
|
|
210
|
+
return "symbol" == typeof i ? i : i + "";
|
|
211
211
|
}
|
|
212
212
|
function _defineProperty(obj, key, value) {
|
|
213
213
|
key = _toPropertyKey(key);
|
|
@@ -686,7 +686,7 @@ function createXhrRequester() {
|
|
|
686
686
|
}
|
|
687
687
|
|
|
688
688
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
689
|
-
const apiClientVersion = '1.0.0-alpha.
|
|
689
|
+
const apiClientVersion = '1.0.0-alpha.38';
|
|
690
690
|
function getDefaultHosts() {
|
|
691
691
|
return [
|
|
692
692
|
{ url: 'status.algolia.com', accept: 'readWrite', protocol: 'https' },
|
|
@@ -755,7 +755,7 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
755
755
|
if (!path) {
|
|
756
756
|
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
757
757
|
}
|
|
758
|
-
const requestPath = '/
|
|
758
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
759
759
|
const headers = {};
|
|
760
760
|
const queryParameters = parameters ? parameters : {};
|
|
761
761
|
const request = {
|
|
@@ -778,7 +778,7 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
778
778
|
if (!path) {
|
|
779
779
|
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
780
780
|
}
|
|
781
|
-
const requestPath = '/
|
|
781
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
782
782
|
const headers = {};
|
|
783
783
|
const queryParameters = parameters ? parameters : {};
|
|
784
784
|
const request = {
|
|
@@ -802,7 +802,7 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
802
802
|
if (!path) {
|
|
803
803
|
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
804
804
|
}
|
|
805
|
-
const requestPath = '/
|
|
805
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
806
806
|
const headers = {};
|
|
807
807
|
const queryParameters = parameters ? parameters : {};
|
|
808
808
|
const request = {
|
|
@@ -827,7 +827,7 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
827
827
|
if (!path) {
|
|
828
828
|
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
829
829
|
}
|
|
830
|
-
const requestPath = '/
|
|
830
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
831
831
|
const headers = {};
|
|
832
832
|
const queryParameters = parameters ? parameters : {};
|
|
833
833
|
const request = {
|
|
@@ -840,7 +840,7 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
840
840
|
return transporter.request(request, requestOptions);
|
|
841
841
|
},
|
|
842
842
|
/**
|
|
843
|
-
*
|
|
843
|
+
* Retrieves known incidents for the selected clusters.
|
|
844
844
|
*
|
|
845
845
|
* @param getClusterIncidents - The getClusterIncidents object.
|
|
846
846
|
* @param getClusterIncidents.clusters - Subset of clusters, separated by comma.
|
|
@@ -862,7 +862,7 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
862
862
|
return transporter.request(request, requestOptions);
|
|
863
863
|
},
|
|
864
864
|
/**
|
|
865
|
-
*
|
|
865
|
+
* Retrieves the status of selected clusters.
|
|
866
866
|
*
|
|
867
867
|
* @param getClusterStatus - The getClusterStatus object.
|
|
868
868
|
* @param getClusterStatus.clusters - Subset of clusters, separated by comma.
|
|
@@ -884,7 +884,7 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
884
884
|
return transporter.request(request, requestOptions);
|
|
885
885
|
},
|
|
886
886
|
/**
|
|
887
|
-
*
|
|
887
|
+
* Retrieves known incidents for all clusters.
|
|
888
888
|
*
|
|
889
889
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
890
890
|
*/
|
|
@@ -901,7 +901,7 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
901
901
|
return transporter.request(request, requestOptions);
|
|
902
902
|
},
|
|
903
903
|
/**
|
|
904
|
-
*
|
|
904
|
+
* Retrieves average times for indexing operations for selected clusters.
|
|
905
905
|
*
|
|
906
906
|
* @param getIndexingTime - The getIndexingTime object.
|
|
907
907
|
* @param getIndexingTime.clusters - Subset of clusters, separated by comma.
|
|
@@ -923,24 +923,7 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
923
923
|
return transporter.request(request, requestOptions);
|
|
924
924
|
},
|
|
925
925
|
/**
|
|
926
|
-
*
|
|
927
|
-
*
|
|
928
|
-
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
929
|
-
*/
|
|
930
|
-
getInventory(requestOptions) {
|
|
931
|
-
const requestPath = '/1/inventory/servers';
|
|
932
|
-
const headers = {};
|
|
933
|
-
const queryParameters = {};
|
|
934
|
-
const request = {
|
|
935
|
-
method: 'GET',
|
|
936
|
-
path: requestPath,
|
|
937
|
-
queryParameters,
|
|
938
|
-
headers,
|
|
939
|
-
};
|
|
940
|
-
return transporter.request(request, requestOptions);
|
|
941
|
-
},
|
|
942
|
-
/**
|
|
943
|
-
* List the average latency for search requests for selected clusters.
|
|
926
|
+
* Retrieves the average latency for search requests for selected clusters.
|
|
944
927
|
*
|
|
945
928
|
* @param getLatency - The getLatency object.
|
|
946
929
|
* @param getLatency.clusters - Subset of clusters, separated by comma.
|
|
@@ -962,10 +945,10 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
962
945
|
return transporter.request(request, requestOptions);
|
|
963
946
|
},
|
|
964
947
|
/**
|
|
965
|
-
*
|
|
948
|
+
* 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).
|
|
966
949
|
*
|
|
967
950
|
* @param getMetrics - The getMetrics object.
|
|
968
|
-
* @param getMetrics.metric - Metric to report. For more information about the individual metrics, see the response. To include all metrics, use
|
|
951
|
+
* @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 `*`.
|
|
969
952
|
* @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.
|
|
970
953
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
971
954
|
*/
|
|
@@ -1012,7 +995,24 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
1012
995
|
return transporter.request(request, requestOptions);
|
|
1013
996
|
},
|
|
1014
997
|
/**
|
|
1015
|
-
*
|
|
998
|
+
* 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.
|
|
999
|
+
*
|
|
1000
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1001
|
+
*/
|
|
1002
|
+
getServers(requestOptions) {
|
|
1003
|
+
const requestPath = '/1/inventory/servers';
|
|
1004
|
+
const headers = {};
|
|
1005
|
+
const queryParameters = {};
|
|
1006
|
+
const request = {
|
|
1007
|
+
method: 'GET',
|
|
1008
|
+
path: requestPath,
|
|
1009
|
+
queryParameters,
|
|
1010
|
+
headers,
|
|
1011
|
+
};
|
|
1012
|
+
return transporter.request(request, requestOptions);
|
|
1013
|
+
},
|
|
1014
|
+
/**
|
|
1015
|
+
* Retrieves the status of all Algolia clusters and instances.
|
|
1016
1016
|
*
|
|
1017
1017
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1018
1018
|
*/
|
|
@@ -2,7 +2,7 @@ import { createAuth, createTransporter, getAlgoliaAgent, DEFAULT_CONNECT_TIMEOUT
|
|
|
2
2
|
import { createHttpRequester } from '@algolia/requester-node-http';
|
|
3
3
|
|
|
4
4
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
5
|
-
const apiClientVersion = '1.0.0-alpha.
|
|
5
|
+
const apiClientVersion = '1.0.0-alpha.38';
|
|
6
6
|
function getDefaultHosts() {
|
|
7
7
|
return [
|
|
8
8
|
{ url: 'status.algolia.com', accept: 'readWrite', protocol: 'https' },
|
|
@@ -71,7 +71,7 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
71
71
|
if (!path) {
|
|
72
72
|
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
73
73
|
}
|
|
74
|
-
const requestPath = '/
|
|
74
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
75
75
|
const headers = {};
|
|
76
76
|
const queryParameters = parameters ? parameters : {};
|
|
77
77
|
const request = {
|
|
@@ -94,7 +94,7 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
94
94
|
if (!path) {
|
|
95
95
|
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
96
96
|
}
|
|
97
|
-
const requestPath = '/
|
|
97
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
98
98
|
const headers = {};
|
|
99
99
|
const queryParameters = parameters ? parameters : {};
|
|
100
100
|
const request = {
|
|
@@ -118,7 +118,7 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
118
118
|
if (!path) {
|
|
119
119
|
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
120
120
|
}
|
|
121
|
-
const requestPath = '/
|
|
121
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
122
122
|
const headers = {};
|
|
123
123
|
const queryParameters = parameters ? parameters : {};
|
|
124
124
|
const request = {
|
|
@@ -143,7 +143,7 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
143
143
|
if (!path) {
|
|
144
144
|
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
145
145
|
}
|
|
146
|
-
const requestPath = '/
|
|
146
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
147
147
|
const headers = {};
|
|
148
148
|
const queryParameters = parameters ? parameters : {};
|
|
149
149
|
const request = {
|
|
@@ -156,7 +156,7 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
156
156
|
return transporter.request(request, requestOptions);
|
|
157
157
|
},
|
|
158
158
|
/**
|
|
159
|
-
*
|
|
159
|
+
* Retrieves known incidents for the selected clusters.
|
|
160
160
|
*
|
|
161
161
|
* @param getClusterIncidents - The getClusterIncidents object.
|
|
162
162
|
* @param getClusterIncidents.clusters - Subset of clusters, separated by comma.
|
|
@@ -178,7 +178,7 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
178
178
|
return transporter.request(request, requestOptions);
|
|
179
179
|
},
|
|
180
180
|
/**
|
|
181
|
-
*
|
|
181
|
+
* Retrieves the status of selected clusters.
|
|
182
182
|
*
|
|
183
183
|
* @param getClusterStatus - The getClusterStatus object.
|
|
184
184
|
* @param getClusterStatus.clusters - Subset of clusters, separated by comma.
|
|
@@ -200,7 +200,7 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
200
200
|
return transporter.request(request, requestOptions);
|
|
201
201
|
},
|
|
202
202
|
/**
|
|
203
|
-
*
|
|
203
|
+
* Retrieves known incidents for all clusters.
|
|
204
204
|
*
|
|
205
205
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
206
206
|
*/
|
|
@@ -217,7 +217,7 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
217
217
|
return transporter.request(request, requestOptions);
|
|
218
218
|
},
|
|
219
219
|
/**
|
|
220
|
-
*
|
|
220
|
+
* Retrieves average times for indexing operations for selected clusters.
|
|
221
221
|
*
|
|
222
222
|
* @param getIndexingTime - The getIndexingTime object.
|
|
223
223
|
* @param getIndexingTime.clusters - Subset of clusters, separated by comma.
|
|
@@ -239,24 +239,7 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
239
239
|
return transporter.request(request, requestOptions);
|
|
240
240
|
},
|
|
241
241
|
/**
|
|
242
|
-
*
|
|
243
|
-
*
|
|
244
|
-
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
245
|
-
*/
|
|
246
|
-
getInventory(requestOptions) {
|
|
247
|
-
const requestPath = '/1/inventory/servers';
|
|
248
|
-
const headers = {};
|
|
249
|
-
const queryParameters = {};
|
|
250
|
-
const request = {
|
|
251
|
-
method: 'GET',
|
|
252
|
-
path: requestPath,
|
|
253
|
-
queryParameters,
|
|
254
|
-
headers,
|
|
255
|
-
};
|
|
256
|
-
return transporter.request(request, requestOptions);
|
|
257
|
-
},
|
|
258
|
-
/**
|
|
259
|
-
* List the average latency for search requests for selected clusters.
|
|
242
|
+
* Retrieves the average latency for search requests for selected clusters.
|
|
260
243
|
*
|
|
261
244
|
* @param getLatency - The getLatency object.
|
|
262
245
|
* @param getLatency.clusters - Subset of clusters, separated by comma.
|
|
@@ -278,10 +261,10 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
278
261
|
return transporter.request(request, requestOptions);
|
|
279
262
|
},
|
|
280
263
|
/**
|
|
281
|
-
*
|
|
264
|
+
* 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).
|
|
282
265
|
*
|
|
283
266
|
* @param getMetrics - The getMetrics object.
|
|
284
|
-
* @param getMetrics.metric - Metric to report. For more information about the individual metrics, see the response. To include all metrics, use
|
|
267
|
+
* @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 `*`.
|
|
285
268
|
* @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.
|
|
286
269
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
287
270
|
*/
|
|
@@ -328,7 +311,24 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
328
311
|
return transporter.request(request, requestOptions);
|
|
329
312
|
},
|
|
330
313
|
/**
|
|
331
|
-
*
|
|
314
|
+
* 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.
|
|
315
|
+
*
|
|
316
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
317
|
+
*/
|
|
318
|
+
getServers(requestOptions) {
|
|
319
|
+
const requestPath = '/1/inventory/servers';
|
|
320
|
+
const headers = {};
|
|
321
|
+
const queryParameters = {};
|
|
322
|
+
const request = {
|
|
323
|
+
method: 'GET',
|
|
324
|
+
path: requestPath,
|
|
325
|
+
queryParameters,
|
|
326
|
+
headers,
|
|
327
|
+
};
|
|
328
|
+
return transporter.request(request, requestOptions);
|
|
329
|
+
},
|
|
330
|
+
/**
|
|
331
|
+
* Retrieves the status of all Algolia clusters and instances.
|
|
332
332
|
*
|
|
333
333
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
334
334
|
*/
|
package/dist/monitoring.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! monitoring.umd.js | 1.0.0-alpha.
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/monitoring"]={})}(this,(function(e){"use strict";function t(e){let t;const r=`algolia-client-js-${e.key}`;function s(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function a(){return JSON.parse(s().getItem(r)||"{}")}function n(e){s().setItem(r,JSON.stringify(e))}return{get:(t,r,s={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>(function(){const t=e.timeToLive?1e3*e.timeToLive:null,r=a(),s=Object.fromEntries(Object.entries(r).filter((([,e])=>void 0!==e.timestamp)));if(n(s),!t)return;n(Object.fromEntries(Object.entries(s).filter((([,e])=>{const r=(new Date).getTime();return!(e.timestamp+t<r)}))))}(),a()[JSON.stringify(t)]))).then((e=>Promise.all([e?e.value:r(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||s.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const n=a();return n[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},s().setItem(r,JSON.stringify(n)),t})),delete:e=>Promise.resolve().then((()=>{const t=a();delete t[JSON.stringify(e)],s().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{s().removeItem(r)}))}}function r(e){const t=[...e.caches],s=t.shift();return void 0===s?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,a,n={miss:()=>Promise.resolve()})=>s.get(e,a,n).catch((()=>r({caches:t}).get(e,a,n))),set:(e,a)=>s.set(e,a).catch((()=>r({caches:t}).set(e,a))),delete:e=>s.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>s.clear().catch((()=>r({caches:t}).clear()))}}function s(e={serializable:!0}){let t={};return{get(r,s,a={miss:()=>Promise.resolve()}){const n=JSON.stringify(r);if(n in t)return Promise.resolve(e.serializable?JSON.parse(t[n]):t[n]);const o=s();return o.then((e=>a.miss(e))).then((()=>o))},set:(r,s)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(s):s,Promise.resolve(s)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const a=12e4;function n(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>a},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=a}}}function o(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function i(e,t,r){return(t=o(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class c extends Error{constructor(e,t){super(e),i(this,"name","AlgoliaError"),t&&(this.name=t)}}class u extends c{constructor(e,t,r){super(e,r),i(this,"stackTrace",void 0),this.stackTrace=t}}class l extends u{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, please create a ticket at https://support.algolia.com/ sharing steps we can use to reproduce the issue.",e,"RetryError")}}class m extends u{constructor(e,t,r,s="ApiError"){super(e,r,s),i(this,"status",void 0),this.status=t}}class h extends c{constructor(e,t){super(e,"DeserializationError"),i(this,"response",void 0),this.response=t}}class d extends m{constructor(e,t,r,s){super(e,t,s,"DetailedApiError"),i(this,"error",void 0),this.error=r}}function p(e,t,r){const s=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${encodeURIComponent(t(e[r])?JSON.stringify(e[r]):e[r]).replaceAll("+","%20")}`)).join("&")}(r);let a=`${e.protocol}://${e.url}${e.port?`:${e.port}`:""}/${"/"===t.charAt(0)?t.substring(1):t}`;return s.length&&(a+=`?${s}`),a}function g(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function f({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:s,algoliaAgent:a,timeouts:o,requester:i,requestsCache:c,responsesCache:u}){async function f(c,u,f=!0){const y=[],P=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(c,u),w=function(e,t,r){const s={Accept:"application/json",...e,...t,...r},a={};return Object.keys(s).forEach((e=>{const t=s[e];a[e.toLowerCase()]=t})),a}(r,c.headers,u.headers),q="GET"===c.method?{...c.data,...u.data}:{},v={...s,...c.queryParameters,...q};if(a.value&&(v["x-algolia-agent"]=a.value),u&&u.queryParameters)for(const e of Object.keys(u.queryParameters))u.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(u.queryParameters[e])?v[e]=u.queryParameters[e].toString():v[e]=u.queryParameters[e];let b=0;const T=async(e,r)=>{const s=e.pop();if(void 0===s)throw new l(function(e){return e.map((e=>g(e)))}(y));let a=u.timeout;void 0===a&&(a=f?o.read:o.write);const q={data:P,headers:w,method:c.method,url:p(s,c.path,v),connectTimeout:r(b,o.connect),responseTimeout:r(b,a)},O=t=>{const r={request:q,response:t,host:s,triesLeft:e.length};return y.push(r),r},E=await i.send(q);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&!~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(E)){const a=O(E);return E.isTimedOut&&b++,console.log("Retryable failure",g(a)),await t.set(s,n(s,E.isTimedOut?"timed out":"down")),T(e,r)}if(function({status:e}){return 2==~~(e/100)}(E))return function(e){try{return JSON.parse(e.content)}catch(t){throw new h(t.message,e)}}(E);throw O(E),function({content:e,status:t},r){try{const s=JSON.parse(e);return"error"in s?new d(s.message,t,s.error,r):new m(s.message,t,r)}catch(e){}return new m(e,t,r)}(E,y)},O=e.filter((e=>"readWrite"===e.accept||(f?"read"===e.accept:"write"===e.accept))),E=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(n(e))))))),s=r.filter((e=>e.isUp())),a=r.filter((e=>e.isTimedOut())),o=[...s,...a];return{hosts:o.length>0?o:e,getTimeout:(e,t)=>(0===a.length&&0===e?1:a.length+3+e)*t}}(O);return T([...E.hosts].reverse(),E.getTimeout)}return{hostsCache:t,requester:i,timeouts:o,algoliaAgent:a,baseHeaders:r,baseQueryParameters:s,hosts:e,request:function(e,t={}){const a=e.useReadTransporter||"GET"===e.method;if(!a)return f(e,t,a);const n=()=>f(e,t);if(!0!==(t.cacheable||e.cacheable))return n();const o={request:e,requestOptions:t,transporter:{queryParameters:s,headers:r}};return u.get(o,(()=>c.get(o,(()=>c.set(o,n()).then((e=>Promise.all([c.delete(o),e])),(e=>Promise.all([c.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>u.set(o,e)})},requestsCache:c,responsesCache:u}}function y({algoliaAgents:e,client:t,version:r}){const s=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>s.add(e))),s}const P="1.0.0-alpha.36";e.apiClientVersion=P,e.monitoringClient=function(e,a,n){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!a||"string"!=typeof a)throw new Error("`apiKey` is missing.");return function({appId:e,apiKey:t,authMode:r,algoliaAgents:s,...a}){const n=function(e,t,r="WithinHeaders"){const s={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?s:{},queryParameters:()=>"WithinQueryParameters"===r?s:{}}}(e,t,r),o=f({hosts:[{url:"status.algolia.com",accept:"readWrite",protocol:"https"}],...a,algoliaAgent:y({algoliaAgents:s,client:"Monitoring",version:P}),baseHeaders:{"content-type":"text/plain",...n.headers(),...a.baseHeaders},baseQueryParameters:{...n.queryParameters(),...a.baseQueryParameters}});return{transporter:o,appId:e,clearCache:()=>Promise.all([o.requestsCache.clear(),o.responsesCache.clear()]).then((()=>{})),get _ua(){return o.algoliaAgent.value},addAlgoliaAgent(e,t){o.algoliaAgent.add({segment:e,version:t})},customDelete({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const s={method:"DELETE",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return o.request(s,r)},customGet({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const s={method:"GET",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return o.request(s,r)},customPost({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const a={method:"POST",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return o.request(a,s)},customPut({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const a={method:"PUT",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return o.request(a,s)},getClusterIncidents({clusters:e},t){if(!e)throw new Error("Parameter `clusters` is required when calling `getClusterIncidents`.");const r={method:"GET",path:"/1/incidents/{clusters}".replace("{clusters}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(r,t)},getClusterStatus({clusters:e},t){if(!e)throw new Error("Parameter `clusters` is required when calling `getClusterStatus`.");const r={method:"GET",path:"/1/status/{clusters}".replace("{clusters}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(r,t)},getIncidents(e){const t={method:"GET",path:"/1/incidents",queryParameters:{},headers:{}};return o.request(t,e)},getIndexingTime({clusters:e},t){if(!e)throw new Error("Parameter `clusters` is required when calling `getIndexingTime`.");const r={method:"GET",path:"/1/indexing/{clusters}".replace("{clusters}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(r,t)},getInventory(e){const t={method:"GET",path:"/1/inventory/servers",queryParameters:{},headers:{}};return o.request(t,e)},getLatency({clusters:e},t){if(!e)throw new Error("Parameter `clusters` is required when calling `getLatency`.");const r={method:"GET",path:"/1/latency/{clusters}".replace("{clusters}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(r,t)},getMetrics({metric:e,period:t},r){if(!e)throw new Error("Parameter `metric` is required when calling `getMetrics`.");if(!t)throw new Error("Parameter `period` is required when calling `getMetrics`.");const s={method:"GET",path:"/1/infrastructure/{metric}/period/{period}".replace("{metric}",encodeURIComponent(e)).replace("{period}",encodeURIComponent(t)),queryParameters:{},headers:{}};return o.request(s,r)},getReachability({clusters:e},t){if(!e)throw new Error("Parameter `clusters` is required when calling `getReachability`.");const r={method:"GET",path:"/1/reachability/{clusters}/probes".replace("{clusters}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(r,t)},getStatus(e){const t={method:"GET",path:"/1/status",queryParameters:{},headers:{}};return o.request(t,e)}}}({appId:e,apiKey:a,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const s=(e,s)=>setTimeout((()=>{r.abort(),t({status:0,content:s,isTimedOut:!0})}),e),a=s(e.connectTimeout,"Connection timeout");let n;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=s(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(a),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:s(),requestsCache:s({serializable:!1}),hostsCache:r({caches:[t({key:`${P}-${e}`}),s()]}),...n})}}));
|
|
1
|
+
/*! monitoring.umd.js | 1.0.0-alpha.38 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/monitoring"]={})}(this,(function(e){"use strict";function t(e){let t;const r=`algolia-client-js-${e.key}`;function s(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function a(){return JSON.parse(s().getItem(r)||"{}")}function n(e){s().setItem(r,JSON.stringify(e))}return{get:(t,r,s={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>(function(){const t=e.timeToLive?1e3*e.timeToLive:null,r=a(),s=Object.fromEntries(Object.entries(r).filter((([,e])=>void 0!==e.timestamp)));if(n(s),!t)return;n(Object.fromEntries(Object.entries(s).filter((([,e])=>{const r=(new Date).getTime();return!(e.timestamp+t<r)}))))}(),a()[JSON.stringify(t)]))).then((e=>Promise.all([e?e.value:r(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||s.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const n=a();return n[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},s().setItem(r,JSON.stringify(n)),t})),delete:e=>Promise.resolve().then((()=>{const t=a();delete t[JSON.stringify(e)],s().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{s().removeItem(r)}))}}function r(e){const t=[...e.caches],s=t.shift();return void 0===s?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,a,n={miss:()=>Promise.resolve()})=>s.get(e,a,n).catch((()=>r({caches:t}).get(e,a,n))),set:(e,a)=>s.set(e,a).catch((()=>r({caches:t}).set(e,a))),delete:e=>s.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>s.clear().catch((()=>r({caches:t}).clear()))}}function s(e={serializable:!0}){let t={};return{get(r,s,a={miss:()=>Promise.resolve()}){const n=JSON.stringify(r);if(n in t)return Promise.resolve(e.serializable?JSON.parse(t[n]):t[n]);const o=s();return o.then((e=>a.miss(e))).then((()=>o))},set:(r,s)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(s):s,Promise.resolve(s)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const a=12e4;function n(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>a},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=a}}}function o(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function i(e,t,r){return(t=o(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class c extends Error{constructor(e,t){super(e),i(this,"name","AlgoliaError"),t&&(this.name=t)}}class u extends c{constructor(e,t,r){super(e,r),i(this,"stackTrace",void 0),this.stackTrace=t}}class l extends u{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, please create a ticket at https://support.algolia.com/ sharing steps we can use to reproduce the issue.",e,"RetryError")}}class m extends u{constructor(e,t,r,s="ApiError"){super(e,r,s),i(this,"status",void 0),this.status=t}}class h extends c{constructor(e,t){super(e,"DeserializationError"),i(this,"response",void 0),this.response=t}}class d extends m{constructor(e,t,r,s){super(e,t,s,"DetailedApiError"),i(this,"error",void 0),this.error=r}}function p(e,t,r){const s=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${encodeURIComponent(t(e[r])?JSON.stringify(e[r]):e[r]).replaceAll("+","%20")}`)).join("&")}(r);let a=`${e.protocol}://${e.url}${e.port?`:${e.port}`:""}/${"/"===t.charAt(0)?t.substring(1):t}`;return s.length&&(a+=`?${s}`),a}function g(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function f({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:s,algoliaAgent:a,timeouts:o,requester:i,requestsCache:c,responsesCache:u}){async function f(c,u,f=!0){const y=[],P=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(c,u),w=function(e,t,r){const s={Accept:"application/json",...e,...t,...r},a={};return Object.keys(s).forEach((e=>{const t=s[e];a[e.toLowerCase()]=t})),a}(r,c.headers,u.headers),q="GET"===c.method?{...c.data,...u.data}:{},v={...s,...c.queryParameters,...q};if(a.value&&(v["x-algolia-agent"]=a.value),u&&u.queryParameters)for(const e of Object.keys(u.queryParameters))u.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(u.queryParameters[e])?v[e]=u.queryParameters[e].toString():v[e]=u.queryParameters[e];let b=0;const T=async(e,r)=>{const s=e.pop();if(void 0===s)throw new l(function(e){return e.map((e=>g(e)))}(y));let a=u.timeout;void 0===a&&(a=f?o.read:o.write);const q={data:P,headers:w,method:c.method,url:p(s,c.path,v),connectTimeout:r(b,o.connect),responseTimeout:r(b,a)},O=t=>{const r={request:q,response:t,host:s,triesLeft:e.length};return y.push(r),r},E=await i.send(q);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&!~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(E)){const a=O(E);return E.isTimedOut&&b++,console.log("Retryable failure",g(a)),await t.set(s,n(s,E.isTimedOut?"timed out":"down")),T(e,r)}if(function({status:e}){return 2==~~(e/100)}(E))return function(e){try{return JSON.parse(e.content)}catch(t){throw new h(t.message,e)}}(E);throw O(E),function({content:e,status:t},r){try{const s=JSON.parse(e);return"error"in s?new d(s.message,t,s.error,r):new m(s.message,t,r)}catch(e){}return new m(e,t,r)}(E,y)},O=e.filter((e=>"readWrite"===e.accept||(f?"read"===e.accept:"write"===e.accept))),E=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(n(e))))))),s=r.filter((e=>e.isUp())),a=r.filter((e=>e.isTimedOut())),o=[...s,...a];return{hosts:o.length>0?o:e,getTimeout:(e,t)=>(0===a.length&&0===e?1:a.length+3+e)*t}}(O);return T([...E.hosts].reverse(),E.getTimeout)}return{hostsCache:t,requester:i,timeouts:o,algoliaAgent:a,baseHeaders:r,baseQueryParameters:s,hosts:e,request:function(e,t={}){const a=e.useReadTransporter||"GET"===e.method;if(!a)return f(e,t,a);const n=()=>f(e,t);if(!0!==(t.cacheable||e.cacheable))return n();const o={request:e,requestOptions:t,transporter:{queryParameters:s,headers:r}};return u.get(o,(()=>c.get(o,(()=>c.set(o,n()).then((e=>Promise.all([c.delete(o),e])),(e=>Promise.all([c.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>u.set(o,e)})},requestsCache:c,responsesCache:u}}function y({algoliaAgents:e,client:t,version:r}){const s=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>s.add(e))),s}const P="1.0.0-alpha.38";e.apiClientVersion=P,e.monitoringClient=function(e,a,n){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!a||"string"!=typeof a)throw new Error("`apiKey` is missing.");return function({appId:e,apiKey:t,authMode:r,algoliaAgents:s,...a}){const n=function(e,t,r="WithinHeaders"){const s={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?s:{},queryParameters:()=>"WithinQueryParameters"===r?s:{}}}(e,t,r),o=f({hosts:[{url:"status.algolia.com",accept:"readWrite",protocol:"https"}],...a,algoliaAgent:y({algoliaAgents:s,client:"Monitoring",version:P}),baseHeaders:{"content-type":"text/plain",...n.headers(),...a.baseHeaders},baseQueryParameters:{...n.queryParameters(),...a.baseQueryParameters}});return{transporter:o,appId:e,clearCache:()=>Promise.all([o.requestsCache.clear(),o.responsesCache.clear()]).then((()=>{})),get _ua(){return o.algoliaAgent.value},addAlgoliaAgent(e,t){o.algoliaAgent.add({segment:e,version:t})},customDelete({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const s={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return o.request(s,r)},customGet({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const s={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return o.request(s,r)},customPost({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const a={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return o.request(a,s)},customPut({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const a={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return o.request(a,s)},getClusterIncidents({clusters:e},t){if(!e)throw new Error("Parameter `clusters` is required when calling `getClusterIncidents`.");const r={method:"GET",path:"/1/incidents/{clusters}".replace("{clusters}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(r,t)},getClusterStatus({clusters:e},t){if(!e)throw new Error("Parameter `clusters` is required when calling `getClusterStatus`.");const r={method:"GET",path:"/1/status/{clusters}".replace("{clusters}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(r,t)},getIncidents(e){const t={method:"GET",path:"/1/incidents",queryParameters:{},headers:{}};return o.request(t,e)},getIndexingTime({clusters:e},t){if(!e)throw new Error("Parameter `clusters` is required when calling `getIndexingTime`.");const r={method:"GET",path:"/1/indexing/{clusters}".replace("{clusters}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(r,t)},getLatency({clusters:e},t){if(!e)throw new Error("Parameter `clusters` is required when calling `getLatency`.");const r={method:"GET",path:"/1/latency/{clusters}".replace("{clusters}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(r,t)},getMetrics({metric:e,period:t},r){if(!e)throw new Error("Parameter `metric` is required when calling `getMetrics`.");if(!t)throw new Error("Parameter `period` is required when calling `getMetrics`.");const s={method:"GET",path:"/1/infrastructure/{metric}/period/{period}".replace("{metric}",encodeURIComponent(e)).replace("{period}",encodeURIComponent(t)),queryParameters:{},headers:{}};return o.request(s,r)},getReachability({clusters:e},t){if(!e)throw new Error("Parameter `clusters` is required when calling `getReachability`.");const r={method:"GET",path:"/1/reachability/{clusters}/probes".replace("{clusters}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(r,t)},getServers(e){const t={method:"GET",path:"/1/inventory/servers",queryParameters:{},headers:{}};return o.request(t,e)},getStatus(e){const t={method:"GET",path:"/1/status",queryParameters:{},headers:{}};return o.request(t,e)}}}({appId:e,apiKey:a,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const s=(e,s)=>setTimeout((()=>{r.abort(),t({status:0,content:s,isTimedOut:!0})}),e),a=s(e.connectTimeout,"Connection timeout");let n;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=s(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(a),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:s(),requestsCache:s({serializable:!1}),hostsCache:r({caches:[t({key:`${P}-${e}`}),s()]}),...n})}}));
|
|
@@ -6,7 +6,7 @@ import type { InfrastructureResponse } from '../model/infrastructureResponse';
|
|
|
6
6
|
import type { InventoryResponse } from '../model/inventoryResponse';
|
|
7
7
|
import type { LatencyResponse } from '../model/latencyResponse';
|
|
8
8
|
import type { StatusResponse } from '../model/statusResponse';
|
|
9
|
-
export declare const apiClientVersion = "1.0.0-alpha.
|
|
9
|
+
export declare const apiClientVersion = "1.0.0-alpha.38";
|
|
10
10
|
export declare function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
|
|
11
11
|
transporter: import("@algolia/client-common").Transporter;
|
|
12
12
|
/**
|
|
@@ -67,7 +67,7 @@ export declare function createMonitoringClient({ appId: appIdOption, apiKey: api
|
|
|
67
67
|
*/
|
|
68
68
|
customPut({ path, parameters, body }: CustomPutProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
|
|
69
69
|
/**
|
|
70
|
-
*
|
|
70
|
+
* Retrieves known incidents for the selected clusters.
|
|
71
71
|
*
|
|
72
72
|
* @param getClusterIncidents - The getClusterIncidents object.
|
|
73
73
|
* @param getClusterIncidents.clusters - Subset of clusters, separated by comma.
|
|
@@ -75,7 +75,7 @@ export declare function createMonitoringClient({ appId: appIdOption, apiKey: api
|
|
|
75
75
|
*/
|
|
76
76
|
getClusterIncidents({ clusters }: GetClusterIncidentsProps, requestOptions?: RequestOptions): Promise<IncidentsResponse>;
|
|
77
77
|
/**
|
|
78
|
-
*
|
|
78
|
+
* Retrieves the status of selected clusters.
|
|
79
79
|
*
|
|
80
80
|
* @param getClusterStatus - The getClusterStatus object.
|
|
81
81
|
* @param getClusterStatus.clusters - Subset of clusters, separated by comma.
|
|
@@ -83,13 +83,13 @@ export declare function createMonitoringClient({ appId: appIdOption, apiKey: api
|
|
|
83
83
|
*/
|
|
84
84
|
getClusterStatus({ clusters }: GetClusterStatusProps, requestOptions?: RequestOptions): Promise<StatusResponse>;
|
|
85
85
|
/**
|
|
86
|
-
*
|
|
86
|
+
* Retrieves known incidents for all clusters.
|
|
87
87
|
*
|
|
88
88
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
89
89
|
*/
|
|
90
90
|
getIncidents(requestOptions?: RequestOptions): Promise<IncidentsResponse>;
|
|
91
91
|
/**
|
|
92
|
-
*
|
|
92
|
+
* Retrieves average times for indexing operations for selected clusters.
|
|
93
93
|
*
|
|
94
94
|
* @param getIndexingTime - The getIndexingTime object.
|
|
95
95
|
* @param getIndexingTime.clusters - Subset of clusters, separated by comma.
|
|
@@ -97,13 +97,7 @@ export declare function createMonitoringClient({ appId: appIdOption, apiKey: api
|
|
|
97
97
|
*/
|
|
98
98
|
getIndexingTime({ clusters }: GetIndexingTimeProps, requestOptions?: RequestOptions): Promise<IndexingTimeResponse>;
|
|
99
99
|
/**
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
103
|
-
*/
|
|
104
|
-
getInventory(requestOptions?: RequestOptions): Promise<InventoryResponse>;
|
|
105
|
-
/**
|
|
106
|
-
* List the average latency for search requests for selected clusters.
|
|
100
|
+
* Retrieves the average latency for search requests for selected clusters.
|
|
107
101
|
*
|
|
108
102
|
* @param getLatency - The getLatency object.
|
|
109
103
|
* @param getLatency.clusters - Subset of clusters, separated by comma.
|
|
@@ -111,10 +105,10 @@ export declare function createMonitoringClient({ appId: appIdOption, apiKey: api
|
|
|
111
105
|
*/
|
|
112
106
|
getLatency({ clusters }: GetLatencyProps, requestOptions?: RequestOptions): Promise<LatencyResponse>;
|
|
113
107
|
/**
|
|
114
|
-
*
|
|
108
|
+
* 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).
|
|
115
109
|
*
|
|
116
110
|
* @param getMetrics - The getMetrics object.
|
|
117
|
-
* @param getMetrics.metric - Metric to report. For more information about the individual metrics, see the response. To include all metrics, use
|
|
111
|
+
* @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 `*`.
|
|
118
112
|
* @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.
|
|
119
113
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
120
114
|
*/
|
|
@@ -128,7 +122,13 @@ export declare function createMonitoringClient({ appId: appIdOption, apiKey: api
|
|
|
128
122
|
*/
|
|
129
123
|
getReachability({ clusters }: GetReachabilityProps, requestOptions?: RequestOptions): Promise<Record<string, Record<string, boolean>>>;
|
|
130
124
|
/**
|
|
131
|
-
*
|
|
125
|
+
* 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.
|
|
126
|
+
*
|
|
127
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
128
|
+
*/
|
|
129
|
+
getServers(requestOptions?: RequestOptions): Promise<InventoryResponse>;
|
|
130
|
+
/**
|
|
131
|
+
* Retrieves the status of all Algolia clusters and instances.
|
|
132
132
|
*
|
|
133
133
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
134
134
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monitoringClient.d.ts","sourceRoot":"","sources":["../../src/monitoringClient.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,mBAAmB,EAKnB,cAAc,EACf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,cAAc,EACd,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,oBAAoB,EACrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,eAAO,MAAM,gBAAgB,mBAAmB,CAAC;AASjD,wBAAgB,sBAAsB,CAAC,EACrC,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,YAAY,EACpB,QAAQ,EACR,aAAa,EACb,GAAG,OAAO,EACX,EAAE,mBAAmB;;IAwBlB;;OAEG;;IAGH;;OAEG;kBACW,QAAQ,IAAI,CAAC;IAO3B;;OAEG;;IAKH;;;;;OAKG;6BACsB,MAAM,YAAY,MAAM,GAAG,IAAI;IAIxD;;;;;;;OAOG;uCAEqB,iBAAiB,mBACtB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAqB/B;;;;;;;OAOG;oCAEqB,cAAc,mBACnB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAqB/B;;;;;;;;OAQG;2CAE2B,eAAe,mBAC1B,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAsB/B;;;;;;;;OAQG;0CAE2B,cAAc,mBACzB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAsB/B;;;;;;OAMG;sCAEa,wBAAwB,mBACrB,cAAc,GAC9B,QAAQ,iBAAiB,CAAC;IAwB7B;;;;;;OAMG;mCAEa,qBAAqB,mBAClB,cAAc,GAC9B,QAAQ,cAAc,CAAC;IAwB1B;;;;OAIG;kCAC2B,cAAc,GAAG,QAAQ,iBAAiB,CAAC;IAezE;;;;;;OAMG;kCAEa,oBAAoB,mBACjB,cAAc,GAC9B,QAAQ,oBAAoB,CAAC;IAwBhC
|
|
1
|
+
{"version":3,"file":"monitoringClient.d.ts","sourceRoot":"","sources":["../../src/monitoringClient.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,mBAAmB,EAKnB,cAAc,EACf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,cAAc,EACd,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,oBAAoB,EACrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,eAAO,MAAM,gBAAgB,mBAAmB,CAAC;AASjD,wBAAgB,sBAAsB,CAAC,EACrC,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,YAAY,EACpB,QAAQ,EACR,aAAa,EACb,GAAG,OAAO,EACX,EAAE,mBAAmB;;IAwBlB;;OAEG;;IAGH;;OAEG;kBACW,QAAQ,IAAI,CAAC;IAO3B;;OAEG;;IAKH;;;;;OAKG;6BACsB,MAAM,YAAY,MAAM,GAAG,IAAI;IAIxD;;;;;;;OAOG;uCAEqB,iBAAiB,mBACtB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAqB/B;;;;;;;OAOG;oCAEqB,cAAc,mBACnB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAqB/B;;;;;;;;OAQG;2CAE2B,eAAe,mBAC1B,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAsB/B;;;;;;;;OAQG;0CAE2B,cAAc,mBACzB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAsB/B;;;;;;OAMG;sCAEa,wBAAwB,mBACrB,cAAc,GAC9B,QAAQ,iBAAiB,CAAC;IAwB7B;;;;;;OAMG;mCAEa,qBAAqB,mBAClB,cAAc,GAC9B,QAAQ,cAAc,CAAC;IAwB1B;;;;OAIG;kCAC2B,cAAc,GAAG,QAAQ,iBAAiB,CAAC;IAezE;;;;;;OAMG;kCAEa,oBAAoB,mBACjB,cAAc,GAC9B,QAAQ,oBAAoB,CAAC;IAwBhC;;;;;;OAMG;6BAEa,eAAe,mBACZ,cAAc,GAC9B,QAAQ,eAAe,CAAC;IAwB3B;;;;;;;OAOG;mCAEmB,eAAe,mBAClB,cAAc,GAC9B,QAAQ,sBAAsB,CAAC;IA6BlC;;;;;;OAMG;kCAEa,oBAAoB,mBACjB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,OAAO,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAwBnD;;;;OAIG;gCACyB,cAAc,GAAG,QAAQ,iBAAiB,CAAC;IAevE;;;;OAIG;+BACwB,cAAc,GAAG,QAAQ,cAAc,CAAC;EAetE"}
|
|
@@ -112,7 +112,7 @@ export type GetLatencyProps = {
|
|
|
112
112
|
*/
|
|
113
113
|
export type GetMetricsProps = {
|
|
114
114
|
/**
|
|
115
|
-
* Metric to report. For more information about the individual metrics, see the response. To include all metrics, use
|
|
115
|
+
* Metric to report. For more information about the individual metrics, see the description of the API response. To include all metrics, use `*`.
|
|
116
116
|
*/
|
|
117
117
|
metric: Metric;
|
|
118
118
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// 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.
|
|
2
2
|
|
|
3
|
-
export type
|
|
3
|
+
export type GetServers403Response = {
|
|
4
4
|
reason?: string;
|
|
5
5
|
};
|
package/model/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// 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.
|
|
2
2
|
|
|
3
3
|
export * from './errorBase';
|
|
4
|
-
export * from './
|
|
4
|
+
export * from './getServers403Response';
|
|
5
5
|
export * from './incident';
|
|
6
6
|
export * from './incidentsInner';
|
|
7
7
|
export * from './incidentsResponse';
|
package/model/region.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// 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.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Region where the cluster is located.
|
|
5
5
|
*/
|
|
6
6
|
export type Region =
|
|
7
7
|
| 'au'
|
package/model/server.ts
CHANGED
|
@@ -13,12 +13,12 @@ export type Server = {
|
|
|
13
13
|
region?: Region;
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
|
-
* Included to support legacy applications.
|
|
16
|
+
* Included to support legacy applications. Use `is_replica` instead.
|
|
17
17
|
*/
|
|
18
18
|
is_slave?: boolean;
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* Whether this server is a replica of another server.
|
|
22
22
|
*/
|
|
23
23
|
is_replica?: boolean;
|
|
24
24
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@algolia/monitoring",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.38",
|
|
4
4
|
"description": "JavaScript client for monitoring",
|
|
5
5
|
"repository": "algolia/algoliasearch-client-javascript",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
"clean": "rm -rf ./dist || true"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@algolia/client-common": "5.0.0-alpha.
|
|
43
|
-
"@algolia/requester-browser-xhr": "5.0.0-alpha.
|
|
44
|
-
"@algolia/requester-node-http": "5.0.0-alpha.
|
|
42
|
+
"@algolia/client-common": "5.0.0-alpha.111",
|
|
43
|
+
"@algolia/requester-browser-xhr": "5.0.0-alpha.111",
|
|
44
|
+
"@algolia/requester-node-http": "5.0.0-alpha.111"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@types/node": "20.11.
|
|
48
|
-
"rollup": "4.13.
|
|
49
|
-
"typescript": "5.4.
|
|
47
|
+
"@types/node": "20.11.30",
|
|
48
|
+
"rollup": "4.13.2",
|
|
49
|
+
"typescript": "5.4.3"
|
|
50
50
|
},
|
|
51
51
|
"engines": {
|
|
52
52
|
"node": ">= 14.0.0"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getInventory403Response.d.ts","sourceRoot":"","sources":["../../model/getInventory403Response.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
|