@algolia/monitoring 1.0.0-alpha.19 → 1.0.0-alpha.26
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/model/clientMethodProps.d.ts +38 -38
- package/dist/model/clientMethodProps.d.ts.map +1 -1
- package/dist/monitoring.cjs +67 -92
- package/dist/monitoring.esm.browser.js +110 -122
- package/dist/monitoring.esm.node.js +68 -93
- package/dist/monitoring.umd.js +2 -2
- package/dist/src/monitoringClient.d.ts +32 -32
- package/dist/src/monitoringClient.d.ts.map +1 -1
- package/model/clientMethodProps.ts +40 -40
- package/package.json +7 -7
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Metric } from './metric';
|
|
2
2
|
import type { Period } from './period';
|
|
3
3
|
/**
|
|
4
|
-
* Properties for the `
|
|
4
|
+
* Properties for the `customDelete` method.
|
|
5
5
|
*/
|
|
6
|
-
export type
|
|
6
|
+
export type CustomDeleteProps = {
|
|
7
7
|
/**
|
|
8
8
|
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
9
9
|
*/
|
|
@@ -14,9 +14,9 @@ export type DelProps = {
|
|
|
14
14
|
parameters?: Record<string, any>;
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
|
-
* Properties for the `
|
|
17
|
+
* Properties for the `customGet` method.
|
|
18
18
|
*/
|
|
19
|
-
export type
|
|
19
|
+
export type CustomGetProps = {
|
|
20
20
|
/**
|
|
21
21
|
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
22
22
|
*/
|
|
@@ -26,6 +26,40 @@ export type GetProps = {
|
|
|
26
26
|
*/
|
|
27
27
|
parameters?: Record<string, any>;
|
|
28
28
|
};
|
|
29
|
+
/**
|
|
30
|
+
* Properties for the `customPost` method.
|
|
31
|
+
*/
|
|
32
|
+
export type CustomPostProps = {
|
|
33
|
+
/**
|
|
34
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
35
|
+
*/
|
|
36
|
+
path: string;
|
|
37
|
+
/**
|
|
38
|
+
* Query parameters to apply to the current query.
|
|
39
|
+
*/
|
|
40
|
+
parameters?: Record<string, any>;
|
|
41
|
+
/**
|
|
42
|
+
* Parameters to send with the custom request.
|
|
43
|
+
*/
|
|
44
|
+
body?: Record<string, any>;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Properties for the `customPut` method.
|
|
48
|
+
*/
|
|
49
|
+
export type CustomPutProps = {
|
|
50
|
+
/**
|
|
51
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
52
|
+
*/
|
|
53
|
+
path: string;
|
|
54
|
+
/**
|
|
55
|
+
* Query parameters to apply to the current query.
|
|
56
|
+
*/
|
|
57
|
+
parameters?: Record<string, any>;
|
|
58
|
+
/**
|
|
59
|
+
* Parameters to send with the custom request.
|
|
60
|
+
*/
|
|
61
|
+
body?: Record<string, any>;
|
|
62
|
+
};
|
|
29
63
|
/**
|
|
30
64
|
* Properties for the `getClusterIncidents` method.
|
|
31
65
|
*/
|
|
@@ -84,38 +118,4 @@ export type GetReachabilityProps = {
|
|
|
84
118
|
*/
|
|
85
119
|
clusters: string;
|
|
86
120
|
};
|
|
87
|
-
/**
|
|
88
|
-
* Properties for the `post` method.
|
|
89
|
-
*/
|
|
90
|
-
export type PostProps = {
|
|
91
|
-
/**
|
|
92
|
-
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
93
|
-
*/
|
|
94
|
-
path: string;
|
|
95
|
-
/**
|
|
96
|
-
* Query parameters to apply to the current query.
|
|
97
|
-
*/
|
|
98
|
-
parameters?: Record<string, any>;
|
|
99
|
-
/**
|
|
100
|
-
* Parameters to send with the custom request.
|
|
101
|
-
*/
|
|
102
|
-
body?: Record<string, any>;
|
|
103
|
-
};
|
|
104
|
-
/**
|
|
105
|
-
* Properties for the `put` method.
|
|
106
|
-
*/
|
|
107
|
-
export type PutProps = {
|
|
108
|
-
/**
|
|
109
|
-
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
110
|
-
*/
|
|
111
|
-
path: string;
|
|
112
|
-
/**
|
|
113
|
-
* Query parameters to apply to the current query.
|
|
114
|
-
*/
|
|
115
|
-
parameters?: Record<string, any>;
|
|
116
|
-
/**
|
|
117
|
-
* Parameters to send with the custom request.
|
|
118
|
-
*/
|
|
119
|
-
body?: Record<string, any>;
|
|
120
|
-
};
|
|
121
121
|
//# sourceMappingURL=clientMethodProps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientMethodProps.d.ts","sourceRoot":"","sources":["../../model/clientMethodProps.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"clientMethodProps.d.ts","sourceRoot":"","sources":["../../model/clientMethodProps.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
package/dist/monitoring.cjs
CHANGED
|
@@ -4,42 +4,17 @@ 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.
|
|
8
|
-
function getDefaultHosts(
|
|
7
|
+
const apiClientVersion = '1.0.0-alpha.26';
|
|
8
|
+
function getDefaultHosts() {
|
|
9
9
|
return [
|
|
10
|
-
{
|
|
11
|
-
|
|
12
|
-
accept: 'read',
|
|
13
|
-
protocol: 'https',
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
url: `${appId}.algolia.net`,
|
|
17
|
-
accept: 'write',
|
|
18
|
-
protocol: 'https',
|
|
19
|
-
},
|
|
20
|
-
].concat(clientCommon.shuffle([
|
|
21
|
-
{
|
|
22
|
-
url: `${appId}-1.algolianet.com`,
|
|
23
|
-
accept: 'readWrite',
|
|
24
|
-
protocol: 'https',
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
url: `${appId}-2.algolianet.com`,
|
|
28
|
-
accept: 'readWrite',
|
|
29
|
-
protocol: 'https',
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
url: `${appId}-3.algolianet.com`,
|
|
33
|
-
accept: 'readWrite',
|
|
34
|
-
protocol: 'https',
|
|
35
|
-
},
|
|
36
|
-
]));
|
|
10
|
+
{ url: 'status.algolia.com', accept: 'readWrite', protocol: 'https' },
|
|
11
|
+
];
|
|
37
12
|
}
|
|
38
13
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
39
14
|
function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }) {
|
|
40
15
|
const auth = clientCommon.createAuth(appIdOption, apiKeyOption, authMode);
|
|
41
16
|
const transporter = clientCommon.createTransporter({
|
|
42
|
-
hosts: getDefaultHosts(
|
|
17
|
+
hosts: getDefaultHosts(),
|
|
43
18
|
...options,
|
|
44
19
|
algoliaAgent: clientCommon.getAlgoliaAgent({
|
|
45
20
|
algoliaAgents,
|
|
@@ -90,14 +65,14 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
90
65
|
* This method allow you to send requests to the Algolia REST API.
|
|
91
66
|
*
|
|
92
67
|
* @summary Send requests to the Algolia REST API.
|
|
93
|
-
* @param
|
|
94
|
-
* @param
|
|
95
|
-
* @param
|
|
68
|
+
* @param customDelete - The customDelete object.
|
|
69
|
+
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
70
|
+
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
96
71
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
97
72
|
*/
|
|
98
|
-
|
|
73
|
+
customDelete({ path, parameters }, requestOptions) {
|
|
99
74
|
if (!path) {
|
|
100
|
-
throw new Error('Parameter `path` is required when calling `
|
|
75
|
+
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
101
76
|
}
|
|
102
77
|
const requestPath = '/1{path}'.replace('{path}', path);
|
|
103
78
|
const headers = {};
|
|
@@ -114,14 +89,14 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
114
89
|
* This method allow you to send requests to the Algolia REST API.
|
|
115
90
|
*
|
|
116
91
|
* @summary Send requests to the Algolia REST API.
|
|
117
|
-
* @param
|
|
118
|
-
* @param
|
|
119
|
-
* @param
|
|
92
|
+
* @param customGet - The customGet object.
|
|
93
|
+
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
94
|
+
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
120
95
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
121
96
|
*/
|
|
122
|
-
|
|
97
|
+
customGet({ path, parameters }, requestOptions) {
|
|
123
98
|
if (!path) {
|
|
124
|
-
throw new Error('Parameter `path` is required when calling `
|
|
99
|
+
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
125
100
|
}
|
|
126
101
|
const requestPath = '/1{path}'.replace('{path}', path);
|
|
127
102
|
const headers = {};
|
|
@@ -134,6 +109,58 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
134
109
|
};
|
|
135
110
|
return transporter.request(request, requestOptions);
|
|
136
111
|
},
|
|
112
|
+
/**
|
|
113
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
114
|
+
*
|
|
115
|
+
* @summary Send requests to the Algolia REST API.
|
|
116
|
+
* @param customPost - The customPost object.
|
|
117
|
+
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
118
|
+
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
119
|
+
* @param customPost.body - Parameters to send with the custom request.
|
|
120
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
121
|
+
*/
|
|
122
|
+
customPost({ path, parameters, body }, requestOptions) {
|
|
123
|
+
if (!path) {
|
|
124
|
+
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
125
|
+
}
|
|
126
|
+
const requestPath = '/1{path}'.replace('{path}', path);
|
|
127
|
+
const headers = {};
|
|
128
|
+
const queryParameters = parameters ? parameters : {};
|
|
129
|
+
const request = {
|
|
130
|
+
method: 'POST',
|
|
131
|
+
path: requestPath,
|
|
132
|
+
queryParameters,
|
|
133
|
+
headers,
|
|
134
|
+
data: body ? body : {},
|
|
135
|
+
};
|
|
136
|
+
return transporter.request(request, requestOptions);
|
|
137
|
+
},
|
|
138
|
+
/**
|
|
139
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
140
|
+
*
|
|
141
|
+
* @summary Send requests to the Algolia REST API.
|
|
142
|
+
* @param customPut - The customPut object.
|
|
143
|
+
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
144
|
+
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
145
|
+
* @param customPut.body - Parameters to send with the custom request.
|
|
146
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
147
|
+
*/
|
|
148
|
+
customPut({ path, parameters, body }, requestOptions) {
|
|
149
|
+
if (!path) {
|
|
150
|
+
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
151
|
+
}
|
|
152
|
+
const requestPath = '/1{path}'.replace('{path}', path);
|
|
153
|
+
const headers = {};
|
|
154
|
+
const queryParameters = parameters ? parameters : {};
|
|
155
|
+
const request = {
|
|
156
|
+
method: 'PUT',
|
|
157
|
+
path: requestPath,
|
|
158
|
+
queryParameters,
|
|
159
|
+
headers,
|
|
160
|
+
data: body ? body : {},
|
|
161
|
+
};
|
|
162
|
+
return transporter.request(request, requestOptions);
|
|
163
|
+
},
|
|
137
164
|
/**
|
|
138
165
|
* List known incidents for selected clusters.
|
|
139
166
|
*
|
|
@@ -332,58 +359,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
332
359
|
};
|
|
333
360
|
return transporter.request(request, requestOptions);
|
|
334
361
|
},
|
|
335
|
-
/**
|
|
336
|
-
* This method allow you to send requests to the Algolia REST API.
|
|
337
|
-
*
|
|
338
|
-
* @summary Send requests to the Algolia REST API.
|
|
339
|
-
* @param post - The post object.
|
|
340
|
-
* @param post.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
341
|
-
* @param post.parameters - Query parameters to apply to the current query.
|
|
342
|
-
* @param post.body - Parameters to send with the custom request.
|
|
343
|
-
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
344
|
-
*/
|
|
345
|
-
post({ path, parameters, body }, requestOptions) {
|
|
346
|
-
if (!path) {
|
|
347
|
-
throw new Error('Parameter `path` is required when calling `post`.');
|
|
348
|
-
}
|
|
349
|
-
const requestPath = '/1{path}'.replace('{path}', path);
|
|
350
|
-
const headers = {};
|
|
351
|
-
const queryParameters = parameters ? parameters : {};
|
|
352
|
-
const request = {
|
|
353
|
-
method: 'POST',
|
|
354
|
-
path: requestPath,
|
|
355
|
-
queryParameters,
|
|
356
|
-
headers,
|
|
357
|
-
data: body ? body : {},
|
|
358
|
-
};
|
|
359
|
-
return transporter.request(request, requestOptions);
|
|
360
|
-
},
|
|
361
|
-
/**
|
|
362
|
-
* This method allow you to send requests to the Algolia REST API.
|
|
363
|
-
*
|
|
364
|
-
* @summary Send requests to the Algolia REST API.
|
|
365
|
-
* @param put - The put object.
|
|
366
|
-
* @param put.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
367
|
-
* @param put.parameters - Query parameters to apply to the current query.
|
|
368
|
-
* @param put.body - Parameters to send with the custom request.
|
|
369
|
-
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
370
|
-
*/
|
|
371
|
-
put({ path, parameters, body }, requestOptions) {
|
|
372
|
-
if (!path) {
|
|
373
|
-
throw new Error('Parameter `path` is required when calling `put`.');
|
|
374
|
-
}
|
|
375
|
-
const requestPath = '/1{path}'.replace('{path}', path);
|
|
376
|
-
const headers = {};
|
|
377
|
-
const queryParameters = parameters ? parameters : {};
|
|
378
|
-
const request = {
|
|
379
|
-
method: 'PUT',
|
|
380
|
-
path: requestPath,
|
|
381
|
-
queryParameters,
|
|
382
|
-
headers,
|
|
383
|
-
data: body ? body : {},
|
|
384
|
-
};
|
|
385
|
-
return transporter.request(request, requestOptions);
|
|
386
|
-
},
|
|
387
362
|
};
|
|
388
363
|
}
|
|
389
364
|
|
|
@@ -26,14 +26,35 @@ function createBrowserLocalStorageCache(options) {
|
|
|
26
26
|
function getNamespace() {
|
|
27
27
|
return JSON.parse(getStorage().getItem(namespaceKey) || '{}');
|
|
28
28
|
}
|
|
29
|
+
function setNamespace(namespace) {
|
|
30
|
+
getStorage().setItem(namespaceKey, JSON.stringify(namespace));
|
|
31
|
+
}
|
|
32
|
+
function removeOutdatedCacheItems() {
|
|
33
|
+
const timeToLive = options.timeToLive ? options.timeToLive * 1000 : null;
|
|
34
|
+
const namespace = getNamespace();
|
|
35
|
+
const filteredNamespaceWithoutOldFormattedCacheItems = Object.fromEntries(Object.entries(namespace).filter(([, cacheItem]) => {
|
|
36
|
+
return cacheItem.timestamp !== undefined;
|
|
37
|
+
}));
|
|
38
|
+
setNamespace(filteredNamespaceWithoutOldFormattedCacheItems);
|
|
39
|
+
if (!timeToLive) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const filteredNamespaceWithoutExpiredItems = Object.fromEntries(Object.entries(filteredNamespaceWithoutOldFormattedCacheItems).filter(([, cacheItem]) => {
|
|
43
|
+
const currentTimestamp = new Date().getTime();
|
|
44
|
+
const isExpired = cacheItem.timestamp + timeToLive < currentTimestamp;
|
|
45
|
+
return !isExpired;
|
|
46
|
+
}));
|
|
47
|
+
setNamespace(filteredNamespaceWithoutExpiredItems);
|
|
48
|
+
}
|
|
29
49
|
return {
|
|
30
50
|
get(key, defaultValue, events = {
|
|
31
51
|
miss: () => Promise.resolve()
|
|
32
52
|
}) {
|
|
33
53
|
return Promise.resolve().then(() => {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
54
|
+
removeOutdatedCacheItems();
|
|
55
|
+
return getNamespace()[JSON.stringify(key)];
|
|
56
|
+
}).then(value => {
|
|
57
|
+
return Promise.all([value ? value.value : defaultValue(), value !== undefined]);
|
|
37
58
|
}).then(([value, exists]) => {
|
|
38
59
|
return Promise.all([value, exists || events.miss(value)]);
|
|
39
60
|
}).then(([value]) => value);
|
|
@@ -41,7 +62,10 @@ function createBrowserLocalStorageCache(options) {
|
|
|
41
62
|
set(key, value) {
|
|
42
63
|
return Promise.resolve().then(() => {
|
|
43
64
|
const namespace = getNamespace();
|
|
44
|
-
namespace[JSON.stringify(key)] =
|
|
65
|
+
namespace[JSON.stringify(key)] = {
|
|
66
|
+
timestamp: new Date().getTime(),
|
|
67
|
+
value
|
|
68
|
+
};
|
|
45
69
|
getStorage().setItem(namespaceKey, JSON.stringify(namespace));
|
|
46
70
|
return value;
|
|
47
71
|
});
|
|
@@ -171,6 +195,20 @@ function createStatefulHost(host, status = 'up') {
|
|
|
171
195
|
};
|
|
172
196
|
}
|
|
173
197
|
|
|
198
|
+
function _toPrimitive(t, r) {
|
|
199
|
+
if ("object" != typeof t || !t) return t;
|
|
200
|
+
var e = t[Symbol.toPrimitive];
|
|
201
|
+
if (void 0 !== e) {
|
|
202
|
+
var i = e.call(t, r || "default");
|
|
203
|
+
if ("object" != typeof i) return i;
|
|
204
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
205
|
+
}
|
|
206
|
+
return ("string" === r ? String : Number)(t);
|
|
207
|
+
}
|
|
208
|
+
function _toPropertyKey(t) {
|
|
209
|
+
var i = _toPrimitive(t, "string");
|
|
210
|
+
return "symbol" == typeof i ? i : String(i);
|
|
211
|
+
}
|
|
174
212
|
function _defineProperty(obj, key, value) {
|
|
175
213
|
key = _toPropertyKey(key);
|
|
176
214
|
if (key in obj) {
|
|
@@ -185,20 +223,6 @@ function _defineProperty(obj, key, value) {
|
|
|
185
223
|
}
|
|
186
224
|
return obj;
|
|
187
225
|
}
|
|
188
|
-
function _toPrimitive(input, hint) {
|
|
189
|
-
if (typeof input !== "object" || input === null) return input;
|
|
190
|
-
var prim = input[Symbol.toPrimitive];
|
|
191
|
-
if (prim !== undefined) {
|
|
192
|
-
var res = prim.call(input, hint || "default");
|
|
193
|
-
if (typeof res !== "object") return res;
|
|
194
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
195
|
-
}
|
|
196
|
-
return (hint === "string" ? String : Number)(input);
|
|
197
|
-
}
|
|
198
|
-
function _toPropertyKey(arg) {
|
|
199
|
-
var key = _toPrimitive(arg, "string");
|
|
200
|
-
return typeof key === "symbol" ? key : String(key);
|
|
201
|
-
}
|
|
202
226
|
|
|
203
227
|
class AlgoliaError extends Error {
|
|
204
228
|
constructor(message, name) {
|
|
@@ -219,7 +243,7 @@ class ErrorWithStackTrace extends AlgoliaError {
|
|
|
219
243
|
}
|
|
220
244
|
class RetryError extends ErrorWithStackTrace {
|
|
221
245
|
constructor(stackTrace) {
|
|
222
|
-
super('Unreachable hosts - your application id may be incorrect. If the error persists,
|
|
246
|
+
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.', stackTrace, 'RetryError');
|
|
223
247
|
}
|
|
224
248
|
}
|
|
225
249
|
class ApiError extends ErrorWithStackTrace {
|
|
@@ -244,17 +268,6 @@ class DetailedApiError extends ApiError {
|
|
|
244
268
|
this.error = error;
|
|
245
269
|
}
|
|
246
270
|
}
|
|
247
|
-
|
|
248
|
-
function shuffle(array) {
|
|
249
|
-
const shuffledArray = array;
|
|
250
|
-
for (let c = array.length - 1; c > 0; c--) {
|
|
251
|
-
const b = Math.floor(Math.random() * (c + 1));
|
|
252
|
-
const a = array[c];
|
|
253
|
-
shuffledArray[c] = array[b];
|
|
254
|
-
shuffledArray[b] = a;
|
|
255
|
-
}
|
|
256
|
-
return shuffledArray;
|
|
257
|
-
}
|
|
258
271
|
function serializeUrl(host, path, queryParameters) {
|
|
259
272
|
const queryParametersAsString = serializeQueryParameters(queryParameters);
|
|
260
273
|
let url = `${host.protocol}://${host.url}/${path.charAt(0) === '/' ? path.substr(1) : path}`;
|
|
@@ -673,42 +686,17 @@ function createXhrRequester() {
|
|
|
673
686
|
}
|
|
674
687
|
|
|
675
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.
|
|
676
|
-
const apiClientVersion = '1.0.0-alpha.
|
|
677
|
-
function getDefaultHosts(
|
|
689
|
+
const apiClientVersion = '1.0.0-alpha.26';
|
|
690
|
+
function getDefaultHosts() {
|
|
678
691
|
return [
|
|
679
|
-
{
|
|
680
|
-
|
|
681
|
-
accept: 'read',
|
|
682
|
-
protocol: 'https',
|
|
683
|
-
},
|
|
684
|
-
{
|
|
685
|
-
url: `${appId}.algolia.net`,
|
|
686
|
-
accept: 'write',
|
|
687
|
-
protocol: 'https',
|
|
688
|
-
},
|
|
689
|
-
].concat(shuffle([
|
|
690
|
-
{
|
|
691
|
-
url: `${appId}-1.algolianet.com`,
|
|
692
|
-
accept: 'readWrite',
|
|
693
|
-
protocol: 'https',
|
|
694
|
-
},
|
|
695
|
-
{
|
|
696
|
-
url: `${appId}-2.algolianet.com`,
|
|
697
|
-
accept: 'readWrite',
|
|
698
|
-
protocol: 'https',
|
|
699
|
-
},
|
|
700
|
-
{
|
|
701
|
-
url: `${appId}-3.algolianet.com`,
|
|
702
|
-
accept: 'readWrite',
|
|
703
|
-
protocol: 'https',
|
|
704
|
-
},
|
|
705
|
-
]));
|
|
692
|
+
{ url: 'status.algolia.com', accept: 'readWrite', protocol: 'https' },
|
|
693
|
+
];
|
|
706
694
|
}
|
|
707
695
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
708
696
|
function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }) {
|
|
709
697
|
const auth = createAuth(appIdOption, apiKeyOption, authMode);
|
|
710
698
|
const transporter = createTransporter({
|
|
711
|
-
hosts: getDefaultHosts(
|
|
699
|
+
hosts: getDefaultHosts(),
|
|
712
700
|
...options,
|
|
713
701
|
algoliaAgent: getAlgoliaAgent({
|
|
714
702
|
algoliaAgents,
|
|
@@ -759,14 +747,14 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
759
747
|
* This method allow you to send requests to the Algolia REST API.
|
|
760
748
|
*
|
|
761
749
|
* @summary Send requests to the Algolia REST API.
|
|
762
|
-
* @param
|
|
763
|
-
* @param
|
|
764
|
-
* @param
|
|
750
|
+
* @param customDelete - The customDelete object.
|
|
751
|
+
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
752
|
+
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
765
753
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
766
754
|
*/
|
|
767
|
-
|
|
755
|
+
customDelete({ path, parameters }, requestOptions) {
|
|
768
756
|
if (!path) {
|
|
769
|
-
throw new Error('Parameter `path` is required when calling `
|
|
757
|
+
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
770
758
|
}
|
|
771
759
|
const requestPath = '/1{path}'.replace('{path}', path);
|
|
772
760
|
const headers = {};
|
|
@@ -783,14 +771,14 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
783
771
|
* This method allow you to send requests to the Algolia REST API.
|
|
784
772
|
*
|
|
785
773
|
* @summary Send requests to the Algolia REST API.
|
|
786
|
-
* @param
|
|
787
|
-
* @param
|
|
788
|
-
* @param
|
|
774
|
+
* @param customGet - The customGet object.
|
|
775
|
+
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
776
|
+
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
789
777
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
790
778
|
*/
|
|
791
|
-
|
|
779
|
+
customGet({ path, parameters }, requestOptions) {
|
|
792
780
|
if (!path) {
|
|
793
|
-
throw new Error('Parameter `path` is required when calling `
|
|
781
|
+
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
794
782
|
}
|
|
795
783
|
const requestPath = '/1{path}'.replace('{path}', path);
|
|
796
784
|
const headers = {};
|
|
@@ -803,6 +791,58 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
803
791
|
};
|
|
804
792
|
return transporter.request(request, requestOptions);
|
|
805
793
|
},
|
|
794
|
+
/**
|
|
795
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
796
|
+
*
|
|
797
|
+
* @summary Send requests to the Algolia REST API.
|
|
798
|
+
* @param customPost - The customPost object.
|
|
799
|
+
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
800
|
+
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
801
|
+
* @param customPost.body - Parameters to send with the custom request.
|
|
802
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
803
|
+
*/
|
|
804
|
+
customPost({ path, parameters, body }, requestOptions) {
|
|
805
|
+
if (!path) {
|
|
806
|
+
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
807
|
+
}
|
|
808
|
+
const requestPath = '/1{path}'.replace('{path}', path);
|
|
809
|
+
const headers = {};
|
|
810
|
+
const queryParameters = parameters ? parameters : {};
|
|
811
|
+
const request = {
|
|
812
|
+
method: 'POST',
|
|
813
|
+
path: requestPath,
|
|
814
|
+
queryParameters,
|
|
815
|
+
headers,
|
|
816
|
+
data: body ? body : {},
|
|
817
|
+
};
|
|
818
|
+
return transporter.request(request, requestOptions);
|
|
819
|
+
},
|
|
820
|
+
/**
|
|
821
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
822
|
+
*
|
|
823
|
+
* @summary Send requests to the Algolia REST API.
|
|
824
|
+
* @param customPut - The customPut object.
|
|
825
|
+
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
826
|
+
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
827
|
+
* @param customPut.body - Parameters to send with the custom request.
|
|
828
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
829
|
+
*/
|
|
830
|
+
customPut({ path, parameters, body }, requestOptions) {
|
|
831
|
+
if (!path) {
|
|
832
|
+
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
833
|
+
}
|
|
834
|
+
const requestPath = '/1{path}'.replace('{path}', path);
|
|
835
|
+
const headers = {};
|
|
836
|
+
const queryParameters = parameters ? parameters : {};
|
|
837
|
+
const request = {
|
|
838
|
+
method: 'PUT',
|
|
839
|
+
path: requestPath,
|
|
840
|
+
queryParameters,
|
|
841
|
+
headers,
|
|
842
|
+
data: body ? body : {},
|
|
843
|
+
};
|
|
844
|
+
return transporter.request(request, requestOptions);
|
|
845
|
+
},
|
|
806
846
|
/**
|
|
807
847
|
* List known incidents for selected clusters.
|
|
808
848
|
*
|
|
@@ -1001,58 +1041,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
1001
1041
|
};
|
|
1002
1042
|
return transporter.request(request, requestOptions);
|
|
1003
1043
|
},
|
|
1004
|
-
/**
|
|
1005
|
-
* This method allow you to send requests to the Algolia REST API.
|
|
1006
|
-
*
|
|
1007
|
-
* @summary Send requests to the Algolia REST API.
|
|
1008
|
-
* @param post - The post object.
|
|
1009
|
-
* @param post.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
1010
|
-
* @param post.parameters - Query parameters to apply to the current query.
|
|
1011
|
-
* @param post.body - Parameters to send with the custom request.
|
|
1012
|
-
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1013
|
-
*/
|
|
1014
|
-
post({ path, parameters, body }, requestOptions) {
|
|
1015
|
-
if (!path) {
|
|
1016
|
-
throw new Error('Parameter `path` is required when calling `post`.');
|
|
1017
|
-
}
|
|
1018
|
-
const requestPath = '/1{path}'.replace('{path}', path);
|
|
1019
|
-
const headers = {};
|
|
1020
|
-
const queryParameters = parameters ? parameters : {};
|
|
1021
|
-
const request = {
|
|
1022
|
-
method: 'POST',
|
|
1023
|
-
path: requestPath,
|
|
1024
|
-
queryParameters,
|
|
1025
|
-
headers,
|
|
1026
|
-
data: body ? body : {},
|
|
1027
|
-
};
|
|
1028
|
-
return transporter.request(request, requestOptions);
|
|
1029
|
-
},
|
|
1030
|
-
/**
|
|
1031
|
-
* This method allow you to send requests to the Algolia REST API.
|
|
1032
|
-
*
|
|
1033
|
-
* @summary Send requests to the Algolia REST API.
|
|
1034
|
-
* @param put - The put object.
|
|
1035
|
-
* @param put.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
1036
|
-
* @param put.parameters - Query parameters to apply to the current query.
|
|
1037
|
-
* @param put.body - Parameters to send with the custom request.
|
|
1038
|
-
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1039
|
-
*/
|
|
1040
|
-
put({ path, parameters, body }, requestOptions) {
|
|
1041
|
-
if (!path) {
|
|
1042
|
-
throw new Error('Parameter `path` is required when calling `put`.');
|
|
1043
|
-
}
|
|
1044
|
-
const requestPath = '/1{path}'.replace('{path}', path);
|
|
1045
|
-
const headers = {};
|
|
1046
|
-
const queryParameters = parameters ? parameters : {};
|
|
1047
|
-
const request = {
|
|
1048
|
-
method: 'PUT',
|
|
1049
|
-
path: requestPath,
|
|
1050
|
-
queryParameters,
|
|
1051
|
-
headers,
|
|
1052
|
-
data: body ? body : {},
|
|
1053
|
-
};
|
|
1054
|
-
return transporter.request(request, requestOptions);
|
|
1055
|
-
},
|
|
1056
1044
|
};
|
|
1057
1045
|
}
|
|
1058
1046
|
|
|
@@ -1,43 +1,18 @@
|
|
|
1
|
-
import { createAuth, createTransporter, getAlgoliaAgent,
|
|
1
|
+
import { createAuth, createTransporter, getAlgoliaAgent, DEFAULT_CONNECT_TIMEOUT_NODE, DEFAULT_READ_TIMEOUT_NODE, DEFAULT_WRITE_TIMEOUT_NODE, createNullCache, createMemoryCache } from '@algolia/client-common';
|
|
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.
|
|
6
|
-
function getDefaultHosts(
|
|
5
|
+
const apiClientVersion = '1.0.0-alpha.26';
|
|
6
|
+
function getDefaultHosts() {
|
|
7
7
|
return [
|
|
8
|
-
{
|
|
9
|
-
|
|
10
|
-
accept: 'read',
|
|
11
|
-
protocol: 'https',
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
url: `${appId}.algolia.net`,
|
|
15
|
-
accept: 'write',
|
|
16
|
-
protocol: 'https',
|
|
17
|
-
},
|
|
18
|
-
].concat(shuffle([
|
|
19
|
-
{
|
|
20
|
-
url: `${appId}-1.algolianet.com`,
|
|
21
|
-
accept: 'readWrite',
|
|
22
|
-
protocol: 'https',
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
url: `${appId}-2.algolianet.com`,
|
|
26
|
-
accept: 'readWrite',
|
|
27
|
-
protocol: 'https',
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
url: `${appId}-3.algolianet.com`,
|
|
31
|
-
accept: 'readWrite',
|
|
32
|
-
protocol: 'https',
|
|
33
|
-
},
|
|
34
|
-
]));
|
|
8
|
+
{ url: 'status.algolia.com', accept: 'readWrite', protocol: 'https' },
|
|
9
|
+
];
|
|
35
10
|
}
|
|
36
11
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
37
12
|
function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }) {
|
|
38
13
|
const auth = createAuth(appIdOption, apiKeyOption, authMode);
|
|
39
14
|
const transporter = createTransporter({
|
|
40
|
-
hosts: getDefaultHosts(
|
|
15
|
+
hosts: getDefaultHosts(),
|
|
41
16
|
...options,
|
|
42
17
|
algoliaAgent: getAlgoliaAgent({
|
|
43
18
|
algoliaAgents,
|
|
@@ -88,14 +63,14 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
88
63
|
* This method allow you to send requests to the Algolia REST API.
|
|
89
64
|
*
|
|
90
65
|
* @summary Send requests to the Algolia REST API.
|
|
91
|
-
* @param
|
|
92
|
-
* @param
|
|
93
|
-
* @param
|
|
66
|
+
* @param customDelete - The customDelete object.
|
|
67
|
+
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
68
|
+
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
94
69
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
95
70
|
*/
|
|
96
|
-
|
|
71
|
+
customDelete({ path, parameters }, requestOptions) {
|
|
97
72
|
if (!path) {
|
|
98
|
-
throw new Error('Parameter `path` is required when calling `
|
|
73
|
+
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
99
74
|
}
|
|
100
75
|
const requestPath = '/1{path}'.replace('{path}', path);
|
|
101
76
|
const headers = {};
|
|
@@ -112,14 +87,14 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
112
87
|
* This method allow you to send requests to the Algolia REST API.
|
|
113
88
|
*
|
|
114
89
|
* @summary Send requests to the Algolia REST API.
|
|
115
|
-
* @param
|
|
116
|
-
* @param
|
|
117
|
-
* @param
|
|
90
|
+
* @param customGet - The customGet object.
|
|
91
|
+
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
92
|
+
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
118
93
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
119
94
|
*/
|
|
120
|
-
|
|
95
|
+
customGet({ path, parameters }, requestOptions) {
|
|
121
96
|
if (!path) {
|
|
122
|
-
throw new Error('Parameter `path` is required when calling `
|
|
97
|
+
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
123
98
|
}
|
|
124
99
|
const requestPath = '/1{path}'.replace('{path}', path);
|
|
125
100
|
const headers = {};
|
|
@@ -132,6 +107,58 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
132
107
|
};
|
|
133
108
|
return transporter.request(request, requestOptions);
|
|
134
109
|
},
|
|
110
|
+
/**
|
|
111
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
112
|
+
*
|
|
113
|
+
* @summary Send requests to the Algolia REST API.
|
|
114
|
+
* @param customPost - The customPost object.
|
|
115
|
+
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
116
|
+
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
117
|
+
* @param customPost.body - Parameters to send with the custom request.
|
|
118
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
119
|
+
*/
|
|
120
|
+
customPost({ path, parameters, body }, requestOptions) {
|
|
121
|
+
if (!path) {
|
|
122
|
+
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
123
|
+
}
|
|
124
|
+
const requestPath = '/1{path}'.replace('{path}', path);
|
|
125
|
+
const headers = {};
|
|
126
|
+
const queryParameters = parameters ? parameters : {};
|
|
127
|
+
const request = {
|
|
128
|
+
method: 'POST',
|
|
129
|
+
path: requestPath,
|
|
130
|
+
queryParameters,
|
|
131
|
+
headers,
|
|
132
|
+
data: body ? body : {},
|
|
133
|
+
};
|
|
134
|
+
return transporter.request(request, requestOptions);
|
|
135
|
+
},
|
|
136
|
+
/**
|
|
137
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
138
|
+
*
|
|
139
|
+
* @summary Send requests to the Algolia REST API.
|
|
140
|
+
* @param customPut - The customPut object.
|
|
141
|
+
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
142
|
+
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
143
|
+
* @param customPut.body - Parameters to send with the custom request.
|
|
144
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
145
|
+
*/
|
|
146
|
+
customPut({ path, parameters, body }, requestOptions) {
|
|
147
|
+
if (!path) {
|
|
148
|
+
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
149
|
+
}
|
|
150
|
+
const requestPath = '/1{path}'.replace('{path}', path);
|
|
151
|
+
const headers = {};
|
|
152
|
+
const queryParameters = parameters ? parameters : {};
|
|
153
|
+
const request = {
|
|
154
|
+
method: 'PUT',
|
|
155
|
+
path: requestPath,
|
|
156
|
+
queryParameters,
|
|
157
|
+
headers,
|
|
158
|
+
data: body ? body : {},
|
|
159
|
+
};
|
|
160
|
+
return transporter.request(request, requestOptions);
|
|
161
|
+
},
|
|
135
162
|
/**
|
|
136
163
|
* List known incidents for selected clusters.
|
|
137
164
|
*
|
|
@@ -330,58 +357,6 @@ function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, auth
|
|
|
330
357
|
};
|
|
331
358
|
return transporter.request(request, requestOptions);
|
|
332
359
|
},
|
|
333
|
-
/**
|
|
334
|
-
* This method allow you to send requests to the Algolia REST API.
|
|
335
|
-
*
|
|
336
|
-
* @summary Send requests to the Algolia REST API.
|
|
337
|
-
* @param post - The post object.
|
|
338
|
-
* @param post.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
339
|
-
* @param post.parameters - Query parameters to apply to the current query.
|
|
340
|
-
* @param post.body - Parameters to send with the custom request.
|
|
341
|
-
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
342
|
-
*/
|
|
343
|
-
post({ path, parameters, body }, requestOptions) {
|
|
344
|
-
if (!path) {
|
|
345
|
-
throw new Error('Parameter `path` is required when calling `post`.');
|
|
346
|
-
}
|
|
347
|
-
const requestPath = '/1{path}'.replace('{path}', path);
|
|
348
|
-
const headers = {};
|
|
349
|
-
const queryParameters = parameters ? parameters : {};
|
|
350
|
-
const request = {
|
|
351
|
-
method: 'POST',
|
|
352
|
-
path: requestPath,
|
|
353
|
-
queryParameters,
|
|
354
|
-
headers,
|
|
355
|
-
data: body ? body : {},
|
|
356
|
-
};
|
|
357
|
-
return transporter.request(request, requestOptions);
|
|
358
|
-
},
|
|
359
|
-
/**
|
|
360
|
-
* This method allow you to send requests to the Algolia REST API.
|
|
361
|
-
*
|
|
362
|
-
* @summary Send requests to the Algolia REST API.
|
|
363
|
-
* @param put - The put object.
|
|
364
|
-
* @param put.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
365
|
-
* @param put.parameters - Query parameters to apply to the current query.
|
|
366
|
-
* @param put.body - Parameters to send with the custom request.
|
|
367
|
-
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
368
|
-
*/
|
|
369
|
-
put({ path, parameters, body }, requestOptions) {
|
|
370
|
-
if (!path) {
|
|
371
|
-
throw new Error('Parameter `path` is required when calling `put`.');
|
|
372
|
-
}
|
|
373
|
-
const requestPath = '/1{path}'.replace('{path}', path);
|
|
374
|
-
const headers = {};
|
|
375
|
-
const queryParameters = parameters ? parameters : {};
|
|
376
|
-
const request = {
|
|
377
|
-
method: 'PUT',
|
|
378
|
-
path: requestPath,
|
|
379
|
-
queryParameters,
|
|
380
|
-
headers,
|
|
381
|
-
data: body ? body : {},
|
|
382
|
-
};
|
|
383
|
-
return transporter.request(request, requestOptions);
|
|
384
|
-
},
|
|
385
360
|
};
|
|
386
361
|
}
|
|
387
362
|
|
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)||"{}")}return{get:(e,t,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const r=JSON.stringify(e),s=a()[r];return Promise.all([s||t(),void 0!==s])})).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const n=a();return n[JSON.stringify(e)]=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,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===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)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class i extends Error{constructor(e,t){super(e),o(this,"name","AlgoliaError"),t&&(this.name=t)}}class c extends i{constructor(e,t,r){super(e,r),o(this,"stackTrace",void 0),this.stackTrace=t}}class u extends c{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class l extends c{constructor(e,t,r,s="ApiError"){super(e,r,s),o(this,"status",void 0),this.status=t}}class h extends i{constructor(e,t){super(e,"DeserializationError"),o(this,"response",void 0),this.response=t}}class d extends l{constructor(e,t,r,s){super(e,t,s,"DetailedApiError"),o(this,"error",void 0),this.error=r}}function m(e,t,r){const s=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${encodeURIComponent(t(e[r])?JSON.stringify(e[r]):e[r])}`)).join("&")}(r);let a=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return s.length&&(a+=`?${s}`),a}function p(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 g({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:s,algoliaAgent:a,timeouts:o,requester:i,requestsCache:c,responsesCache:g}){async function f(c,g,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,g),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,g.headers),q="GET"===c.method?{...c.data,...g.data}:{},v={...s,...c.queryParameters,...q};if(a.value&&(v["x-algolia-agent"]=a.value),g&&g.queryParameters)for(const e of Object.keys(g.queryParameters))g.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(g.queryParameters[e])?v[e]=g.queryParameters[e].toString():v[e]=g.queryParameters[e];let b=0;const T=async(e,r)=>{const s=e.pop();if(void 0===s)throw new u(function(e){return e.map((e=>p(e)))}(y));let a=g.timeout;void 0===a&&(a=f?o.read:o.write);const q={data:P,headers:w,method:c.method,url:m(s,c.path,v),connectTimeout:r(b,o.connect),responseTimeout:r(b,a)},E=t=>{const r={request:q,response:t,host:s,triesLeft:e.length};return y.push(r),r},O=await i.send(q);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&0==~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(O)){const a=E(O);return O.isTimedOut&&b++,console.log("Retryable failure",p(a)),await t.set(s,n(s,O.isTimedOut?"timed out":"down")),T(e,r)}if(function({status:e}){return 2==~~(e/100)}(O))return function(e){try{return JSON.parse(e.content)}catch(t){throw new h(t.message,e)}}(O);throw E(O),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 l(s.message,t,r)}catch(e){}return new l(e,t,r)}(O,y)},E=e.filter((e=>"readWrite"===e.accept||(f?"read"===e.accept:"write"===e.accept))),O=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}}(E);return T([...O.hosts].reverse(),O.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 g.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=>g.set(o,e)})},requestsCache:c,responsesCache:g}}function f({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 y="1.0.0-alpha.19";function P(e){return[{url:`${e}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${e}.algolia.net`,accept:"write",protocol:"https"}].concat(function(e){const t=e;for(let r=e.length-1;r>0;r--){const s=Math.floor(Math.random()*(r+1)),a=e[r];t[r]=e[s],t[s]=a}return t}([{url:`${e}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}e.apiClientVersion=y,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=g({hosts:P(e),...a,algoliaAgent:f({algoliaAgents:s,client:"Monitoring",version:y}),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})},del({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `del`.");const s={method:"DELETE",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return o.request(s,r)},get({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `get`.");const s={method:"GET",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return o.request(s,r)},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)},post({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `post`.");const a={method:"POST",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return o.request(a,s)},put({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `put`.");const a={method:"PUT",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return o.request(a,s)}}}({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:`${y}-${e}`}),s()]}),...n})}}));
|
|
1
|
+
/*! monitoring.umd.js | 1.0.0-alpha.26 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/monitoring"]={})}(this,(function(e){"use strict";function t(e){let t;const r=`algolia-client-js-${e.key}`;function s(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function a(){return JSON.parse(s().getItem(r)||"{}")}function n(e){s().setItem(r,JSON.stringify(e))}return{get:(t,r,s={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>(function(){const t=e.timeToLive?1e3*e.timeToLive:null,r=a(),s=Object.fromEntries(Object.entries(r).filter((([,e])=>void 0!==e.timestamp)));if(n(s),!t)return;n(Object.fromEntries(Object.entries(s).filter((([,e])=>{const r=(new Date).getTime();return!(e.timestamp+t<r)}))))}(),a()[JSON.stringify(t)]))).then((e=>Promise.all([e?e.value:r(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||s.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const n=a();return n[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},s().setItem(r,JSON.stringify(n)),t})),delete:e=>Promise.resolve().then((()=>{const t=a();delete t[JSON.stringify(e)],s().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{s().removeItem(r)}))}}function r(e){const t=[...e.caches],s=t.shift();return void 0===s?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,a,n={miss:()=>Promise.resolve()})=>s.get(e,a,n).catch((()=>r({caches:t}).get(e,a,n))),set:(e,a)=>s.set(e,a).catch((()=>r({caches:t}).set(e,a))),delete:e=>s.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>s.clear().catch((()=>r({caches:t}).clear()))}}function s(e={serializable:!0}){let t={};return{get(r,s,a={miss:()=>Promise.resolve()}){const n=JSON.stringify(r);if(n in t)return Promise.resolve(e.serializable?JSON.parse(t[n]):t[n]);const o=s();return o.then((e=>a.miss(e))).then((()=>o))},set:(r,s)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(s):s,Promise.resolve(s)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const a=12e4;function n(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>a},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=a}}}function o(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function i(e,t,r){return(t=o(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class c extends Error{constructor(e,t){super(e),i(this,"name","AlgoliaError"),t&&(this.name=t)}}class u extends c{constructor(e,t,r){super(e,r),i(this,"stackTrace",void 0),this.stackTrace=t}}class l extends u{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, please create a ticket at https://support.algolia.com/ sharing steps we can use to reproduce the issue.",e,"RetryError")}}class m extends u{constructor(e,t,r,s="ApiError"){super(e,r,s),i(this,"status",void 0),this.status=t}}class h extends c{constructor(e,t){super(e,"DeserializationError"),i(this,"response",void 0),this.response=t}}class d extends m{constructor(e,t,r,s){super(e,t,s,"DetailedApiError"),i(this,"error",void 0),this.error=r}}function p(e,t,r){const s=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${encodeURIComponent(t(e[r])?JSON.stringify(e[r]):e[r])}`)).join("&")}(r);let a=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return s.length&&(a+=`?${s}`),a}function g(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function f({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:s,algoliaAgent:a,timeouts:o,requester:i,requestsCache:c,responsesCache:u}){async function f(c,u,f=!0){const y=[],P=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(c,u),w=function(e,t,r){const s={Accept:"application/json",...e,...t,...r},a={};return Object.keys(s).forEach((e=>{const t=s[e];a[e.toLowerCase()]=t})),a}(r,c.headers,u.headers),q="GET"===c.method?{...c.data,...u.data}:{},v={...s,...c.queryParameters,...q};if(a.value&&(v["x-algolia-agent"]=a.value),u&&u.queryParameters)for(const e of Object.keys(u.queryParameters))u.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(u.queryParameters[e])?v[e]=u.queryParameters[e].toString():v[e]=u.queryParameters[e];let b=0;const T=async(e,r)=>{const s=e.pop();if(void 0===s)throw new l(function(e){return e.map((e=>g(e)))}(y));let a=u.timeout;void 0===a&&(a=f?o.read:o.write);const q={data:P,headers:w,method:c.method,url:p(s,c.path,v),connectTimeout:r(b,o.connect),responseTimeout:r(b,a)},O=t=>{const r={request:q,response:t,host:s,triesLeft:e.length};return y.push(r),r},E=await i.send(q);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&0==~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(E)){const a=O(E);return E.isTimedOut&&b++,console.log("Retryable failure",g(a)),await t.set(s,n(s,E.isTimedOut?"timed out":"down")),T(e,r)}if(function({status:e}){return 2==~~(e/100)}(E))return function(e){try{return JSON.parse(e.content)}catch(t){throw new h(t.message,e)}}(E);throw O(E),function({content:e,status:t},r){try{const s=JSON.parse(e);return"error"in s?new d(s.message,t,s.error,r):new m(s.message,t,r)}catch(e){}return new m(e,t,r)}(E,y)},O=e.filter((e=>"readWrite"===e.accept||(f?"read"===e.accept:"write"===e.accept))),E=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(n(e))))))),s=r.filter((e=>e.isUp())),a=r.filter((e=>e.isTimedOut())),o=[...s,...a];return{hosts:o.length>0?o:e,getTimeout:(e,t)=>(0===a.length&&0===e?1:a.length+3+e)*t}}(O);return T([...E.hosts].reverse(),E.getTimeout)}return{hostsCache:t,requester:i,timeouts:o,algoliaAgent:a,baseHeaders:r,baseQueryParameters:s,hosts:e,request:function(e,t={}){const a=e.useReadTransporter||"GET"===e.method;if(!a)return f(e,t,a);const n=()=>f(e,t);if(!0!==(t.cacheable||e.cacheable))return n();const o={request:e,requestOptions:t,transporter:{queryParameters:s,headers:r}};return u.get(o,(()=>c.get(o,(()=>c.set(o,n()).then((e=>Promise.all([c.delete(o),e])),(e=>Promise.all([c.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>u.set(o,e)})},requestsCache:c,responsesCache:u}}function y({algoliaAgents:e,client:t,version:r}){const s=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>s.add(e))),s}const P="1.0.0-alpha.26";e.apiClientVersion=P,e.monitoringClient=function(e,a,n){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!a||"string"!=typeof a)throw new Error("`apiKey` is missing.");return function({appId:e,apiKey:t,authMode:r,algoliaAgents:s,...a}){const n=function(e,t,r="WithinHeaders"){const s={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?s:{},queryParameters:()=>"WithinQueryParameters"===r?s:{}}}(e,t,r),o=f({hosts:[{url:"status.algolia.com",accept:"readWrite",protocol:"https"}],...a,algoliaAgent:y({algoliaAgents:s,client:"Monitoring",version:P}),baseHeaders:{"content-type":"text/plain",...n.headers(),...a.baseHeaders},baseQueryParameters:{...n.queryParameters(),...a.baseQueryParameters}});return{transporter:o,appId:e,clearCache:()=>Promise.all([o.requestsCache.clear(),o.responsesCache.clear()]).then((()=>{})),get _ua(){return o.algoliaAgent.value},addAlgoliaAgent(e,t){o.algoliaAgent.add({segment:e,version:t})},customDelete({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const s={method:"DELETE",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return o.request(s,r)},customGet({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const s={method:"GET",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return o.request(s,r)},customPost({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const a={method:"POST",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return o.request(a,s)},customPut({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const a={method:"PUT",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return o.request(a,s)},getClusterIncidents({clusters:e},t){if(!e)throw new Error("Parameter `clusters` is required when calling `getClusterIncidents`.");const r={method:"GET",path:"/1/incidents/{clusters}".replace("{clusters}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(r,t)},getClusterStatus({clusters:e},t){if(!e)throw new Error("Parameter `clusters` is required when calling `getClusterStatus`.");const r={method:"GET",path:"/1/status/{clusters}".replace("{clusters}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(r,t)},getIncidents(e){const t={method:"GET",path:"/1/incidents",queryParameters:{},headers:{}};return o.request(t,e)},getIndexingTime({clusters:e},t){if(!e)throw new Error("Parameter `clusters` is required when calling `getIndexingTime`.");const r={method:"GET",path:"/1/indexing/{clusters}".replace("{clusters}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(r,t)},getInventory(e){const t={method:"GET",path:"/1/inventory/servers",queryParameters:{},headers:{}};return o.request(t,e)},getLatency({clusters:e},t){if(!e)throw new Error("Parameter `clusters` is required when calling `getLatency`.");const r={method:"GET",path:"/1/latency/{clusters}".replace("{clusters}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(r,t)},getMetrics({metric:e,period:t},r){if(!e)throw new Error("Parameter `metric` is required when calling `getMetrics`.");if(!t)throw new Error("Parameter `period` is required when calling `getMetrics`.");const s={method:"GET",path:"/1/infrastructure/{metric}/period/{period}".replace("{metric}",encodeURIComponent(e)).replace("{period}",encodeURIComponent(t)),queryParameters:{},headers:{}};return o.request(s,r)},getReachability({clusters:e},t){if(!e)throw new Error("Parameter `clusters` is required when calling `getReachability`.");const r={method:"GET",path:"/1/reachability/{clusters}/probes".replace("{clusters}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(r,t)},getStatus(e){const t={method:"GET",path:"/1/status",queryParameters:{},headers:{}};return o.request(t,e)}}}({appId:e,apiKey:a,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const s=(e,s)=>setTimeout((()=>{r.abort(),t({status:0,content:s,isTimedOut:!0})}),e),a=s(e.connectTimeout,"Connection timeout");let n;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=s(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(a),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:s(),requestsCache:s({serializable:!1}),hostsCache:r({caches:[t({key:`${P}-${e}`}),s()]}),...n})}}));
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { CreateClientOptions, RequestOptions } from '@algolia/client-common';
|
|
2
|
-
import type {
|
|
2
|
+
import type { CustomDeleteProps, CustomGetProps, CustomPostProps, CustomPutProps, GetClusterIncidentsProps, GetClusterStatusProps, GetIndexingTimeProps, GetLatencyProps, GetMetricsProps, GetReachabilityProps } from '../model/clientMethodProps';
|
|
3
3
|
import type { IncidentsResponse } from '../model/incidentsResponse';
|
|
4
4
|
import type { IndexingTimeResponse } from '../model/indexingTimeResponse';
|
|
5
5
|
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.26";
|
|
10
10
|
export declare function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
|
|
11
11
|
transporter: import("@algolia/client-common").Transporter;
|
|
12
12
|
/**
|
|
@@ -32,22 +32,44 @@ export declare function createMonitoringClient({ appId: appIdOption, apiKey: api
|
|
|
32
32
|
* This method allow you to send requests to the Algolia REST API.
|
|
33
33
|
*
|
|
34
34
|
* @summary Send requests to the Algolia REST API.
|
|
35
|
-
* @param
|
|
36
|
-
* @param
|
|
37
|
-
* @param
|
|
35
|
+
* @param customDelete - The customDelete object.
|
|
36
|
+
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
37
|
+
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
38
38
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
39
39
|
*/
|
|
40
|
-
|
|
40
|
+
customDelete({ path, parameters }: CustomDeleteProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
|
|
41
41
|
/**
|
|
42
42
|
* This method allow you to send requests to the Algolia REST API.
|
|
43
43
|
*
|
|
44
44
|
* @summary Send requests to the Algolia REST API.
|
|
45
|
-
* @param
|
|
46
|
-
* @param
|
|
47
|
-
* @param
|
|
45
|
+
* @param customGet - The customGet object.
|
|
46
|
+
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
47
|
+
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
48
48
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
49
49
|
*/
|
|
50
|
-
|
|
50
|
+
customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
|
|
51
|
+
/**
|
|
52
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
53
|
+
*
|
|
54
|
+
* @summary Send requests to the Algolia REST API.
|
|
55
|
+
* @param customPost - The customPost object.
|
|
56
|
+
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
57
|
+
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
58
|
+
* @param customPost.body - Parameters to send with the custom request.
|
|
59
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
60
|
+
*/
|
|
61
|
+
customPost({ path, parameters, body }: CustomPostProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
|
|
62
|
+
/**
|
|
63
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
64
|
+
*
|
|
65
|
+
* @summary Send requests to the Algolia REST API.
|
|
66
|
+
* @param customPut - The customPut object.
|
|
67
|
+
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
68
|
+
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
69
|
+
* @param customPut.body - Parameters to send with the custom request.
|
|
70
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
71
|
+
*/
|
|
72
|
+
customPut({ path, parameters, body }: CustomPutProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
|
|
51
73
|
/**
|
|
52
74
|
* List known incidents for selected clusters.
|
|
53
75
|
*
|
|
@@ -124,28 +146,6 @@ export declare function createMonitoringClient({ appId: appIdOption, apiKey: api
|
|
|
124
146
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
125
147
|
*/
|
|
126
148
|
getStatus(requestOptions?: RequestOptions): Promise<StatusResponse>;
|
|
127
|
-
/**
|
|
128
|
-
* This method allow you to send requests to the Algolia REST API.
|
|
129
|
-
*
|
|
130
|
-
* @summary Send requests to the Algolia REST API.
|
|
131
|
-
* @param post - The post object.
|
|
132
|
-
* @param post.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
133
|
-
* @param post.parameters - Query parameters to apply to the current query.
|
|
134
|
-
* @param post.body - Parameters to send with the custom request.
|
|
135
|
-
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
136
|
-
*/
|
|
137
|
-
post({ path, parameters, body }: PostProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
|
|
138
|
-
/**
|
|
139
|
-
* This method allow you to send requests to the Algolia REST API.
|
|
140
|
-
*
|
|
141
|
-
* @summary Send requests to the Algolia REST API.
|
|
142
|
-
* @param put - The put object.
|
|
143
|
-
* @param put.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
144
|
-
* @param put.parameters - Query parameters to apply to the current query.
|
|
145
|
-
* @param put.body - Parameters to send with the custom request.
|
|
146
|
-
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
147
|
-
*/
|
|
148
|
-
put({ path, parameters, body }: PutProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
|
|
149
149
|
};
|
|
150
150
|
/**
|
|
151
151
|
* The client type.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monitoringClient.d.ts","sourceRoot":"","sources":["../../src/monitoringClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"monitoringClient.d.ts","sourceRoot":"","sources":["../../src/monitoringClient.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,mBAAmB,EAInB,cAAc,EAEf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,cAAc,EACd,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,oBAAoB,EACrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,eAAO,MAAM,gBAAgB,mBAAmB,CAAC;AASjD,wBAAgB,sBAAsB,CAAC,EACrC,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,YAAY,EACpB,QAAQ,EACR,aAAa,EACb,GAAG,OAAO,EACX,EAAE,mBAAmB;;IAwBlB;;OAEG;;IAGH;;OAEG;kBACW,QAAQ,IAAI,CAAC;IAO3B;;OAEG;;IAKH;;;;;OAKG;6BACsB,MAAM,YAAY,MAAM,GAAG,IAAI;IAIxD;;;;;;;;OAQG;uCAEqB,iBAAiB,mBACtB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAqB/B;;;;;;;;OAQG;oCAEqB,cAAc,mBACnB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAqB/B;;;;;;;;;OASG;2CAE2B,eAAe,mBAC1B,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAsB/B;;;;;;;;;OASG;0CAE2B,cAAc,mBACzB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAsB/B;;;;;;;OAOG;sCAEa,wBAAwB,mBACrB,cAAc,GAC9B,QAAQ,iBAAiB,CAAC;IAwB7B;;;;;;;OAOG;mCAEa,qBAAqB,mBAClB,cAAc,GAC9B,QAAQ,cAAc,CAAC;IAwB1B;;;;;OAKG;kCAC2B,cAAc,GAAG,QAAQ,iBAAiB,CAAC;IAezE;;;;;;;OAOG;kCAEa,oBAAoB,mBACjB,cAAc,GAC9B,QAAQ,oBAAoB,CAAC;IAwBhC;;;;;OAKG;kCAC2B,cAAc,GAAG,QAAQ,iBAAiB,CAAC;IAezE;;;;;;;OAOG;6BAEa,eAAe,mBACZ,cAAc,GAC9B,QAAQ,eAAe,CAAC;IAwB3B;;;;;;;;OAQG;mCAEmB,eAAe,mBAClB,cAAc,GAC9B,QAAQ,sBAAsB,CAAC;IA6BlC;;;;;;;OAOG;kCAEa,oBAAoB,mBACjB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,OAAO,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAwBnD;;;;;OAKG;+BACwB,cAAc,GAAG,QAAQ,cAAc,CAAC;EAetE;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -4,9 +4,9 @@ import type { Metric } from './metric';
|
|
|
4
4
|
import type { Period } from './period';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* Properties for the `
|
|
7
|
+
* Properties for the `customDelete` method.
|
|
8
8
|
*/
|
|
9
|
-
export type
|
|
9
|
+
export type CustomDeleteProps = {
|
|
10
10
|
/**
|
|
11
11
|
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
12
12
|
*/
|
|
@@ -18,9 +18,9 @@ export type DelProps = {
|
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
|
-
* Properties for the `
|
|
21
|
+
* Properties for the `customGet` method.
|
|
22
22
|
*/
|
|
23
|
-
export type
|
|
23
|
+
export type CustomGetProps = {
|
|
24
24
|
/**
|
|
25
25
|
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
26
26
|
*/
|
|
@@ -31,6 +31,42 @@ export type GetProps = {
|
|
|
31
31
|
parameters?: Record<string, any>;
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
+
/**
|
|
35
|
+
* Properties for the `customPost` method.
|
|
36
|
+
*/
|
|
37
|
+
export 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, any>;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Properties for the `customPut` method.
|
|
54
|
+
*/
|
|
55
|
+
export type CustomPutProps = {
|
|
56
|
+
/**
|
|
57
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
58
|
+
*/
|
|
59
|
+
path: string;
|
|
60
|
+
/**
|
|
61
|
+
* Query parameters to apply to the current query.
|
|
62
|
+
*/
|
|
63
|
+
parameters?: Record<string, any>;
|
|
64
|
+
/**
|
|
65
|
+
* Parameters to send with the custom request.
|
|
66
|
+
*/
|
|
67
|
+
body?: Record<string, any>;
|
|
68
|
+
};
|
|
69
|
+
|
|
34
70
|
/**
|
|
35
71
|
* Properties for the `getClusterIncidents` method.
|
|
36
72
|
*/
|
|
@@ -94,39 +130,3 @@ export type GetReachabilityProps = {
|
|
|
94
130
|
*/
|
|
95
131
|
clusters: string;
|
|
96
132
|
};
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Properties for the `post` method.
|
|
100
|
-
*/
|
|
101
|
-
export type PostProps = {
|
|
102
|
-
/**
|
|
103
|
-
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
104
|
-
*/
|
|
105
|
-
path: string;
|
|
106
|
-
/**
|
|
107
|
-
* Query parameters to apply to the current query.
|
|
108
|
-
*/
|
|
109
|
-
parameters?: Record<string, any>;
|
|
110
|
-
/**
|
|
111
|
-
* Parameters to send with the custom request.
|
|
112
|
-
*/
|
|
113
|
-
body?: Record<string, any>;
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* Properties for the `put` method.
|
|
118
|
-
*/
|
|
119
|
-
export type PutProps = {
|
|
120
|
-
/**
|
|
121
|
-
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
122
|
-
*/
|
|
123
|
-
path: string;
|
|
124
|
-
/**
|
|
125
|
-
* Query parameters to apply to the current query.
|
|
126
|
-
*/
|
|
127
|
-
parameters?: Record<string, any>;
|
|
128
|
-
/**
|
|
129
|
-
* Parameters to send with the custom request.
|
|
130
|
-
*/
|
|
131
|
-
body?: Record<string, any>;
|
|
132
|
-
};
|
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.26",
|
|
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.99",
|
|
43
|
+
"@algolia/requester-browser-xhr": "5.0.0-alpha.99",
|
|
44
|
+
"@algolia/requester-node-http": "5.0.0-alpha.99"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@types/node": "20.
|
|
48
|
-
"rollup": "4.
|
|
49
|
-
"typescript": "5.
|
|
47
|
+
"@types/node": "20.11.5",
|
|
48
|
+
"rollup": "4.9.5",
|
|
49
|
+
"typescript": "5.3.3"
|
|
50
50
|
},
|
|
51
51
|
"engines": {
|
|
52
52
|
"node": ">= 14.0.0"
|