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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +15 -7
  2. package/dist/browser.d.ts +194 -63
  3. package/dist/builds/browser.js +24 -22
  4. package/dist/builds/browser.js.map +1 -1
  5. package/dist/builds/browser.min.js +1 -1
  6. package/dist/builds/browser.min.js.map +1 -1
  7. package/dist/builds/browser.umd.js +4 -4
  8. package/dist/builds/fetch.js +388 -0
  9. package/dist/builds/fetch.js.map +1 -0
  10. package/dist/builds/node.cjs +21 -20
  11. package/dist/builds/node.cjs.map +1 -1
  12. package/dist/builds/node.js +22 -20
  13. package/dist/builds/node.js.map +1 -1
  14. package/dist/fetch.d.ts +437 -0
  15. package/dist/node.d.cts +196 -64
  16. package/dist/node.d.ts +196 -64
  17. package/dist/src/monitoringClient.cjs +19 -19
  18. package/dist/src/monitoringClient.cjs.map +1 -1
  19. package/dist/src/monitoringClient.js +19 -19
  20. package/dist/src/monitoringClient.js.map +1 -1
  21. package/index.d.ts +0 -1
  22. package/index.js +1 -2
  23. package/package.json +16 -11
  24. package/model/badRequest.ts +0 -5
  25. package/model/clientMethodProps.ts +0 -132
  26. package/model/errorBase.ts +0 -8
  27. package/model/forbidden.ts +0 -5
  28. package/model/incident.ts +0 -15
  29. package/model/incidentEntry.ts +0 -12
  30. package/model/incidentsResponse.ts +0 -7
  31. package/model/index.ts +0 -27
  32. package/model/indexingMetric.ts +0 -7
  33. package/model/indexingTimeResponse.ts +0 -7
  34. package/model/infrastructureResponse.ts +0 -7
  35. package/model/inventoryResponse.ts +0 -7
  36. package/model/latencyMetric.ts +0 -7
  37. package/model/latencyResponse.ts +0 -7
  38. package/model/metric.ts +0 -3
  39. package/model/metrics.ts +0 -30
  40. package/model/period.ts +0 -3
  41. package/model/probesMetric.ts +0 -13
  42. package/model/region.ts +0 -21
  43. package/model/server.ts +0 -33
  44. package/model/serverStatus.ts +0 -3
  45. package/model/status.ts +0 -6
  46. package/model/statusResponse.ts +0 -7
  47. package/model/timeEntry.ts +0 -13
  48. package/model/type.ts +0 -3
  49. package/model/unauthorized.ts +0 -5
@@ -1,6 +1,6 @@
1
1
  // src/monitoringClient.ts
2
2
  import { createAuth, createTransporter, getAlgoliaAgent } from "@algolia/client-common";
3
- var apiClientVersion = "1.2.4";
3
+ var apiClientVersion = "1.10.0";
4
4
  function getDefaultHosts() {
5
5
  return [{ url: "status.algolia.com", accept: "readWrite", protocol: "https" }];
6
6
  }
@@ -58,8 +58,20 @@ function createMonitoringClient({
58
58
  transporter.algoliaAgent.add({ segment, version });
59
59
  },
60
60
  /**
61
- * This method allow you to send requests to the Algolia REST API.
61
+ * Helper method to switch the API key used to authenticate the requests.
62
62
  *
63
+ * @param params - Method params.
64
+ * @param params.apiKey - The new API Key to use.
65
+ */
66
+ setClientApiKey({ apiKey }) {
67
+ if (!authMode || authMode === "WithinHeaders") {
68
+ transporter.baseHeaders["x-algolia-api-key"] = apiKey;
69
+ } else {
70
+ transporter.baseQueryParameters["x-algolia-api-key"] = apiKey;
71
+ }
72
+ },
73
+ /**
74
+ * This method allow you to send requests to the Algolia REST API.
63
75
  * @param customDelete - The customDelete object.
64
76
  * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
65
77
  * @param customDelete.parameters - Query parameters to apply to the current query.
@@ -82,7 +94,6 @@ function createMonitoringClient({
82
94
  },
83
95
  /**
84
96
  * This method allow you to send requests to the Algolia REST API.
85
- *
86
97
  * @param customGet - The customGet object.
87
98
  * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
88
99
  * @param customGet.parameters - Query parameters to apply to the current query.
@@ -105,7 +116,6 @@ function createMonitoringClient({
105
116
  },
106
117
  /**
107
118
  * This method allow you to send requests to the Algolia REST API.
108
- *
109
119
  * @param customPost - The customPost object.
110
120
  * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
111
121
  * @param customPost.parameters - Query parameters to apply to the current query.
@@ -130,7 +140,6 @@ function createMonitoringClient({
130
140
  },
131
141
  /**
132
142
  * This method allow you to send requests to the Algolia REST API.
133
- *
134
143
  * @param customPut - The customPut object.
135
144
  * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
136
145
  * @param customPut.parameters - Query parameters to apply to the current query.
@@ -155,9 +164,8 @@ function createMonitoringClient({
155
164
  },
156
165
  /**
157
166
  * Retrieves known incidents for the selected clusters.
158
- *
159
167
  * @param getClusterIncidents - The getClusterIncidents object.
160
- * @param getClusterIncidents.clusters - Subset of clusters, separated by comma.
168
+ * @param getClusterIncidents.clusters - Subset of clusters, separated by commas.
161
169
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
162
170
  */
163
171
  getClusterIncidents({ clusters }, requestOptions) {
@@ -177,9 +185,8 @@ function createMonitoringClient({
177
185
  },
178
186
  /**
179
187
  * Retrieves the status of selected clusters.
180
- *
181
188
  * @param getClusterStatus - The getClusterStatus object.
182
- * @param getClusterStatus.clusters - Subset of clusters, separated by comma.
189
+ * @param getClusterStatus.clusters - Subset of clusters, separated by commas.
183
190
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
184
191
  */
185
192
  getClusterStatus({ clusters }, requestOptions) {
@@ -199,7 +206,6 @@ function createMonitoringClient({
199
206
  },
200
207
  /**
201
208
  * Retrieves known incidents for all clusters.
202
- *
203
209
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
204
210
  */
205
211
  getIncidents(requestOptions) {
@@ -216,9 +222,8 @@ function createMonitoringClient({
216
222
  },
217
223
  /**
218
224
  * Retrieves average times for indexing operations for selected clusters.
219
- *
220
225
  * @param getIndexingTime - The getIndexingTime object.
221
- * @param getIndexingTime.clusters - Subset of clusters, separated by comma.
226
+ * @param getIndexingTime.clusters - Subset of clusters, separated by commas.
222
227
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
223
228
  */
224
229
  getIndexingTime({ clusters }, requestOptions) {
@@ -238,9 +243,8 @@ function createMonitoringClient({
238
243
  },
239
244
  /**
240
245
  * Retrieves the average latency for search requests for selected clusters.
241
- *
242
246
  * @param getLatency - The getLatency object.
243
- * @param getLatency.clusters - Subset of clusters, separated by comma.
247
+ * @param getLatency.clusters - Subset of clusters, separated by commas.
244
248
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
245
249
  */
246
250
  getLatency({ clusters }, requestOptions) {
@@ -260,7 +264,6 @@ function createMonitoringClient({
260
264
  },
261
265
  /**
262
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).
263
- *
264
267
  * @param getMetrics - The getMetrics object.
265
268
  * @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 `*`.
266
269
  * @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,9 +289,8 @@ function createMonitoringClient({
286
289
  },
287
290
  /**
288
291
  * Test whether clusters are reachable or not.
289
- *
290
292
  * @param getReachability - The getReachability object.
291
- * @param getReachability.clusters - Subset of clusters, separated by comma.
293
+ * @param getReachability.clusters - Subset of clusters, separated by commas.
292
294
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
293
295
  */
294
296
  getReachability({ clusters }, requestOptions) {
@@ -308,7 +310,6 @@ function createMonitoringClient({
308
310
  },
309
311
  /**
310
312
  * 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.
311
- *
312
313
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
313
314
  */
314
315
  getServers(requestOptions) {
@@ -325,7 +326,6 @@ function createMonitoringClient({
325
326
  },
326
327
  /**
327
328
  * Retrieves the status of all Algolia clusters and instances.
328
- *
329
329
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
330
330
  */
331
331
  getStatus(requestOptions) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/monitoringClient.ts"],"sourcesContent":["// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.\n\nimport { createAuth, createTransporter, getAlgoliaAgent } from '@algolia/client-common';\nimport type {\n CreateClientOptions,\n Headers,\n Host,\n QueryParameters,\n Request,\n RequestOptions,\n} from '@algolia/client-common';\n\nimport type {\n CustomDeleteProps,\n CustomGetProps,\n CustomPostProps,\n CustomPutProps,\n GetClusterIncidentsProps,\n GetClusterStatusProps,\n GetIndexingTimeProps,\n GetLatencyProps,\n GetMetricsProps,\n GetReachabilityProps,\n} from '../model/clientMethodProps';\nimport type { IncidentsResponse } from '../model/incidentsResponse';\nimport type { IndexingTimeResponse } from '../model/indexingTimeResponse';\nimport type { InfrastructureResponse } from '../model/infrastructureResponse';\nimport type { InventoryResponse } from '../model/inventoryResponse';\nimport type { LatencyResponse } from '../model/latencyResponse';\nimport type { StatusResponse } from '../model/statusResponse';\n\nexport const apiClientVersion = '1.2.4';\n\nfunction getDefaultHosts(): Host[] {\n return [{ url: 'status.algolia.com', accept: 'readWrite', protocol: 'https' }];\n}\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nexport function createMonitoringClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n ...options\n}: CreateClientOptions) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: 'Monitoring',\n version: apiClientVersion,\n }),\n baseHeaders: {\n 'content-type': 'text/plain',\n ...auth.headers(),\n ...options.baseHeaders,\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters,\n },\n });\n\n return {\n transporter,\n\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache(): Promise<void> {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => undefined);\n },\n\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua(): string {\n return transporter.algoliaAgent.value;\n },\n\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment: string, version?: string): void {\n transporter.algoliaAgent.add({ segment, version });\n },\n\n /**\n * This method allow you to send requests to the Algolia REST API.\n *\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, anything after \\\"/1\\\" must be specified.\n * @param customDelete.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customDelete(\n { path, parameters }: CustomDeleteProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, unknown>> {\n if (!path) {\n throw new Error('Parameter `path` is required when calling `customDelete`.');\n }\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'DELETE',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * This method allow you to send requests to the Algolia REST API.\n *\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, anything after \\\"/1\\\" must be specified.\n * @param customGet.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>> {\n if (!path) {\n throw new Error('Parameter `path` is required when calling `customGet`.');\n }\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * This method allow you to send requests to the Algolia REST API.\n *\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, anything after \\\"/1\\\" must be specified.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost(\n { path, parameters, body }: CustomPostProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, unknown>> {\n if (!path) {\n throw new Error('Parameter `path` is required when calling `customPost`.');\n }\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {},\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * This method allow you to send requests to the Algolia REST API.\n *\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, anything after \\\"/1\\\" must be specified.\n * @param customPut.parameters - Query parameters to apply to the current query.\n * @param customPut.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPut(\n { path, parameters, body }: CustomPutProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, unknown>> {\n if (!path) {\n throw new Error('Parameter `path` is required when calling `customPut`.');\n }\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'PUT',\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {},\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves known incidents for the selected clusters.\n *\n * @param getClusterIncidents - The getClusterIncidents object.\n * @param getClusterIncidents.clusters - Subset of clusters, separated by comma.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getClusterIncidents(\n { clusters }: GetClusterIncidentsProps,\n requestOptions?: RequestOptions,\n ): Promise<IncidentsResponse> {\n if (!clusters) {\n throw new Error('Parameter `clusters` is required when calling `getClusterIncidents`.');\n }\n\n const requestPath = '/1/incidents/{clusters}'.replace('{clusters}', encodeURIComponent(clusters));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the status of selected clusters.\n *\n * @param getClusterStatus - The getClusterStatus object.\n * @param getClusterStatus.clusters - Subset of clusters, separated by comma.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getClusterStatus({ clusters }: GetClusterStatusProps, requestOptions?: RequestOptions): Promise<StatusResponse> {\n if (!clusters) {\n throw new Error('Parameter `clusters` is required when calling `getClusterStatus`.');\n }\n\n const requestPath = '/1/status/{clusters}'.replace('{clusters}', encodeURIComponent(clusters));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves known incidents for all clusters.\n *\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getIncidents(requestOptions?: RequestOptions): Promise<IncidentsResponse> {\n const requestPath = '/1/incidents';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves average times for indexing operations for selected clusters.\n *\n * @param getIndexingTime - The getIndexingTime object.\n * @param getIndexingTime.clusters - Subset of clusters, separated by comma.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getIndexingTime(\n { clusters }: GetIndexingTimeProps,\n requestOptions?: RequestOptions,\n ): Promise<IndexingTimeResponse> {\n if (!clusters) {\n throw new Error('Parameter `clusters` is required when calling `getIndexingTime`.');\n }\n\n const requestPath = '/1/indexing/{clusters}'.replace('{clusters}', encodeURIComponent(clusters));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the average latency for search requests for selected clusters.\n *\n * @param getLatency - The getLatency object.\n * @param getLatency.clusters - Subset of clusters, separated by comma.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getLatency({ clusters }: GetLatencyProps, requestOptions?: RequestOptions): Promise<LatencyResponse> {\n if (!clusters) {\n throw new Error('Parameter `clusters` is required when calling `getLatency`.');\n }\n\n const requestPath = '/1/latency/{clusters}'.replace('{clusters}', encodeURIComponent(clusters));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves metrics related to your Algolia infrastructure, aggregated over a selected time window. Access to this API is available as part of the [Premium or Elevate plans](https://www.algolia.com/pricing). You must authenticate requests with the `x-algolia-application-id` and `x-algolia-api-key` headers (using the Monitoring API key).\n *\n * @param getMetrics - The getMetrics object.\n * @param getMetrics.metric - Metric to report. For more information about the individual metrics, see the description of the API response. To include all metrics, use `*`.\n * @param getMetrics.period - Period over which to aggregate the metrics: - `minute`. Aggregate the last minute. 1 data point per 10 seconds. - `hour`. Aggregate the last hour. 1 data point per minute. - `day`. Aggregate the last day. 1 data point per 10 minutes. - `week`. Aggregate the last week. 1 data point per hour. - `month`. Aggregate the last month. 1 data point per day.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getMetrics({ metric, period }: GetMetricsProps, requestOptions?: RequestOptions): Promise<InfrastructureResponse> {\n if (!metric) {\n throw new Error('Parameter `metric` is required when calling `getMetrics`.');\n }\n\n if (!period) {\n throw new Error('Parameter `period` is required when calling `getMetrics`.');\n }\n\n const requestPath = '/1/infrastructure/{metric}/period/{period}'\n .replace('{metric}', encodeURIComponent(metric))\n .replace('{period}', encodeURIComponent(period));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Test whether clusters are reachable or not.\n *\n * @param getReachability - The getReachability object.\n * @param getReachability.clusters - Subset of clusters, separated by comma.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getReachability(\n { clusters }: GetReachabilityProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, Record<string, boolean>>> {\n if (!clusters) {\n throw new Error('Parameter `clusters` is required when calling `getReachability`.');\n }\n\n const requestPath = '/1/reachability/{clusters}/probes'.replace('{clusters}', encodeURIComponent(clusters));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the servers that belong to clusters. The response depends on whether you authenticate your API request: - With authentication, the response lists the servers assigned to your Algolia application\\'s cluster. - Without authentication, the response lists the servers for all Algolia clusters.\n *\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getServers(requestOptions?: RequestOptions): Promise<InventoryResponse> {\n const requestPath = '/1/inventory/servers';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the status of all Algolia clusters and instances.\n *\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getStatus(requestOptions?: RequestOptions): Promise<StatusResponse> {\n const requestPath = '/1/status';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n };\n}\n"],"mappings":";AAEA,SAAS,YAAY,mBAAmB,uBAAuB;AA6BxD,IAAM,mBAAmB;AAEhC,SAAS,kBAA0B;AACjC,SAAO,CAAC,EAAE,KAAK,sBAAsB,QAAQ,aAAa,UAAU,QAAQ,CAAC;AAC/E;AAGO,SAAS,uBAAuB;AAAA,EACrC,OAAO;AAAA,EACP,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAwB;AACtB,QAAM,OAAO,WAAW,aAAa,cAAc,QAAQ;AAC3D,QAAM,cAAc,kBAAkB;AAAA,IACpC,OAAO,gBAAgB;AAAA,IACvB,GAAG;AAAA,IACH,cAAc,gBAAgB;AAAA,MAC5B;AAAA,MACA,QAAQ;AAAA,MACR,SAAS;AAAA,IACX,CAAC;AAAA,IACD,aAAa;AAAA,MACX,gBAAgB;AAAA,MAChB,GAAG,KAAK,QAAQ;AAAA,MAChB,GAAG,QAAQ;AAAA,IACb;AAAA,IACA,qBAAqB;AAAA,MACnB,GAAG,KAAK,gBAAgB;AAAA,MACxB,GAAG,QAAQ;AAAA,IACb;AAAA,EACF,CAAC;AAED,SAAO;AAAA,IACL;AAAA;AAAA;AAAA;AAAA,IAKA,OAAO;AAAA;AAAA;AAAA;AAAA,IAKP,aAA4B;AAC1B,aAAO,QAAQ,IAAI,CAAC,YAAY,cAAc,MAAM,GAAG,YAAY,eAAe,MAAM,CAAC,CAAC,EAAE,KAAK,MAAM,MAAS;AAAA,IAClH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YAAM,UAAmB;AAAA,QACvB,QAAQ;AAAA,QACR,MAAM;AAAA,QACN;AAAA,QACA;AAAA,MACF;AAEA,aAAO,YAAY,QAAQ,SAAS,cAAc;AAAA,IACpD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,UAAU,gBAA0D;AAClE,YAAM,cAAc;AACpB,YAAM,UAAmB,CAAC;AAC1B,YAAM,kBAAmC,CAAC;AAE1C,YAAM,UAAmB;AAAA,QACvB,QAAQ;AAAA,QACR,MAAM;AAAA,QACN;AAAA,QACA;AAAA,MACF;AAEA,aAAO,YAAY,QAAQ,SAAS,cAAc;AAAA,IACpD;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/monitoringClient.ts"],"sourcesContent":["// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.\n\nimport type {\n CreateClientOptions,\n Headers,\n Host,\n QueryParameters,\n Request,\n RequestOptions,\n} from '@algolia/client-common';\nimport { createAuth, createTransporter, getAlgoliaAgent } from '@algolia/client-common';\n\nimport type { IncidentsResponse } from '../model/incidentsResponse';\nimport type { IndexingTimeResponse } from '../model/indexingTimeResponse';\nimport type { InfrastructureResponse } from '../model/infrastructureResponse';\nimport type { InventoryResponse } from '../model/inventoryResponse';\nimport type { LatencyResponse } from '../model/latencyResponse';\n\nimport type { StatusResponse } from '../model/statusResponse';\n\nimport type {\n CustomDeleteProps,\n CustomGetProps,\n CustomPostProps,\n CustomPutProps,\n GetClusterIncidentsProps,\n GetClusterStatusProps,\n GetIndexingTimeProps,\n GetLatencyProps,\n GetMetricsProps,\n GetReachabilityProps,\n} from '../model/clientMethodProps';\n\nexport const apiClientVersion = '1.10.0';\n\nfunction getDefaultHosts(): Host[] {\n return [{ url: 'status.algolia.com', accept: 'readWrite', protocol: 'https' }];\n}\n\nexport function createMonitoringClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n ...options\n}: CreateClientOptions) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: 'Monitoring',\n version: apiClientVersion,\n }),\n baseHeaders: {\n 'content-type': 'text/plain',\n ...auth.headers(),\n ...options.baseHeaders,\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters,\n },\n });\n\n return {\n transporter,\n\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache(): Promise<void> {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => undefined);\n },\n\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua(): string {\n return transporter.algoliaAgent.value;\n },\n\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment: string, version?: string): void {\n transporter.algoliaAgent.add({ segment, version });\n },\n\n /**\n * Helper method to switch the API key used to authenticate the requests.\n *\n * @param params - Method params.\n * @param params.apiKey - The new API Key to use.\n */\n setClientApiKey({ apiKey }: { apiKey: string }): void {\n if (!authMode || authMode === 'WithinHeaders') {\n transporter.baseHeaders['x-algolia-api-key'] = apiKey;\n } else {\n transporter.baseQueryParameters['x-algolia-api-key'] = apiKey;\n }\n },\n\n /**\n * This method allow you to send requests to the Algolia REST API.\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, anything after \\\"/1\\\" must be specified.\n * @param customDelete.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customDelete(\n { path, parameters }: CustomDeleteProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, unknown>> {\n if (!path) {\n throw new Error('Parameter `path` is required when calling `customDelete`.');\n }\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'DELETE',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * This method allow you to send requests to the Algolia REST API.\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, anything after \\\"/1\\\" must be specified.\n * @param customGet.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>> {\n if (!path) {\n throw new Error('Parameter `path` is required when calling `customGet`.');\n }\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * This method allow you to send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, anything after \\\"/1\\\" must be specified.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost(\n { path, parameters, body }: CustomPostProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, unknown>> {\n if (!path) {\n throw new Error('Parameter `path` is required when calling `customPost`.');\n }\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {},\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * This method allow you to send requests to the Algolia REST API.\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, anything after \\\"/1\\\" must be specified.\n * @param customPut.parameters - Query parameters to apply to the current query.\n * @param customPut.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPut(\n { path, parameters, body }: CustomPutProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, unknown>> {\n if (!path) {\n throw new Error('Parameter `path` is required when calling `customPut`.');\n }\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'PUT',\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {},\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves known incidents for the selected clusters.\n * @param getClusterIncidents - The getClusterIncidents object.\n * @param getClusterIncidents.clusters - Subset of clusters, separated by commas.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getClusterIncidents(\n { clusters }: GetClusterIncidentsProps,\n requestOptions?: RequestOptions,\n ): Promise<IncidentsResponse> {\n if (!clusters) {\n throw new Error('Parameter `clusters` is required when calling `getClusterIncidents`.');\n }\n\n const requestPath = '/1/incidents/{clusters}'.replace('{clusters}', encodeURIComponent(clusters));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the status of selected clusters.\n * @param getClusterStatus - The getClusterStatus object.\n * @param getClusterStatus.clusters - Subset of clusters, separated by commas.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getClusterStatus({ clusters }: GetClusterStatusProps, requestOptions?: RequestOptions): Promise<StatusResponse> {\n if (!clusters) {\n throw new Error('Parameter `clusters` is required when calling `getClusterStatus`.');\n }\n\n const requestPath = '/1/status/{clusters}'.replace('{clusters}', encodeURIComponent(clusters));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves known incidents for all clusters.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getIncidents(requestOptions?: RequestOptions): Promise<IncidentsResponse> {\n const requestPath = '/1/incidents';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves average times for indexing operations for selected clusters.\n * @param getIndexingTime - The getIndexingTime object.\n * @param getIndexingTime.clusters - Subset of clusters, separated by commas.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getIndexingTime(\n { clusters }: GetIndexingTimeProps,\n requestOptions?: RequestOptions,\n ): Promise<IndexingTimeResponse> {\n if (!clusters) {\n throw new Error('Parameter `clusters` is required when calling `getIndexingTime`.');\n }\n\n const requestPath = '/1/indexing/{clusters}'.replace('{clusters}', encodeURIComponent(clusters));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the average latency for search requests for selected clusters.\n * @param getLatency - The getLatency object.\n * @param getLatency.clusters - Subset of clusters, separated by commas.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getLatency({ clusters }: GetLatencyProps, requestOptions?: RequestOptions): Promise<LatencyResponse> {\n if (!clusters) {\n throw new Error('Parameter `clusters` is required when calling `getLatency`.');\n }\n\n const requestPath = '/1/latency/{clusters}'.replace('{clusters}', encodeURIComponent(clusters));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves metrics related to your Algolia infrastructure, aggregated over a selected time window. Access to this API is available as part of the [Premium or Elevate plans](https://www.algolia.com/pricing). You must authenticate requests with the `x-algolia-application-id` and `x-algolia-api-key` headers (using the Monitoring API key).\n * @param getMetrics - The getMetrics object.\n * @param getMetrics.metric - Metric to report. For more information about the individual metrics, see the description of the API response. To include all metrics, use `*`.\n * @param getMetrics.period - Period over which to aggregate the metrics: - `minute`. Aggregate the last minute. 1 data point per 10 seconds. - `hour`. Aggregate the last hour. 1 data point per minute. - `day`. Aggregate the last day. 1 data point per 10 minutes. - `week`. Aggregate the last week. 1 data point per hour. - `month`. Aggregate the last month. 1 data point per day.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getMetrics({ metric, period }: GetMetricsProps, requestOptions?: RequestOptions): Promise<InfrastructureResponse> {\n if (!metric) {\n throw new Error('Parameter `metric` is required when calling `getMetrics`.');\n }\n\n if (!period) {\n throw new Error('Parameter `period` is required when calling `getMetrics`.');\n }\n\n const requestPath = '/1/infrastructure/{metric}/period/{period}'\n .replace('{metric}', encodeURIComponent(metric))\n .replace('{period}', encodeURIComponent(period));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Test whether clusters are reachable or not.\n * @param getReachability - The getReachability object.\n * @param getReachability.clusters - Subset of clusters, separated by commas.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getReachability(\n { clusters }: GetReachabilityProps,\n requestOptions?: RequestOptions,\n ): Promise<{ [key: string]: { [key: string]: boolean } }> {\n if (!clusters) {\n throw new Error('Parameter `clusters` is required when calling `getReachability`.');\n }\n\n const requestPath = '/1/reachability/{clusters}/probes'.replace('{clusters}', encodeURIComponent(clusters));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the servers that belong to clusters. The response depends on whether you authenticate your API request: - With authentication, the response lists the servers assigned to your Algolia application\\'s cluster. - Without authentication, the response lists the servers for all Algolia clusters.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getServers(requestOptions?: RequestOptions): Promise<InventoryResponse> {\n const requestPath = '/1/inventory/servers';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the status of all Algolia clusters and instances.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getStatus(requestOptions?: RequestOptions): Promise<StatusResponse> {\n const requestPath = '/1/status';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n };\n}\n"],"mappings":";AAUA,SAAS,YAAY,mBAAmB,uBAAuB;AAuBxD,IAAM,mBAAmB;AAEhC,SAAS,kBAA0B;AACjC,SAAO,CAAC,EAAE,KAAK,sBAAsB,QAAQ,aAAa,UAAU,QAAQ,CAAC;AAC/E;AAEO,SAAS,uBAAuB;AAAA,EACrC,OAAO;AAAA,EACP,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAwB;AACtB,QAAM,OAAO,WAAW,aAAa,cAAc,QAAQ;AAC3D,QAAM,cAAc,kBAAkB;AAAA,IACpC,OAAO,gBAAgB;AAAA,IACvB,GAAG;AAAA,IACH,cAAc,gBAAgB;AAAA,MAC5B;AAAA,MACA,QAAQ;AAAA,MACR,SAAS;AAAA,IACX,CAAC;AAAA,IACD,aAAa;AAAA,MACX,gBAAgB;AAAA,MAChB,GAAG,KAAK,QAAQ;AAAA,MAChB,GAAG,QAAQ;AAAA,IACb;AAAA,IACA,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AS,GACX,gBACwD;AACxD,UAAI,CAAC,UAAU;AACb,cAAM,IAAI,MAAM,kEAAkE;AAAA,MACpF;AAEA,YAAM,cAAc,oCAAoC,QAAQ,cAAc,mBAAmB,QAAQ,CAAC;AAC1G,YAAM,UAAmB,CAAC;AAC1B,YAAM,kBAAmC,CAAC;AAE1C,YAAM,UAAmB;AAAA,QACvB,QAAQ;AAAA,QACR,MAAM;AAAA,QACN;AAAA,QACA;AAAA,MACF;AAEA,aAAO,YAAY,QAAQ,SAAS,cAAc;AAAA,IACpD;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAW,gBAA6D;AACtE,YAAM,cAAc;AACpB,YAAM,UAAmB,CAAC;AAC1B,YAAM,kBAAmC,CAAC;AAE1C,YAAM,UAAmB;AAAA,QACvB,QAAQ;AAAA,QACR,MAAM;AAAA,QACN;AAAA,QACA;AAAA,MACF;AAEA,aAAO,YAAY,QAAQ,SAAS,cAAc;AAAA,IACpD;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,UAAU,gBAA0D;AAClE,YAAM,cAAc;AACpB,YAAM,UAAmB,CAAC;AAC1B,YAAM,kBAAmC,CAAC;AAE1C,YAAM,UAAmB;AAAA,QACvB,QAAQ;AAAA,QACR,MAAM;AAAA,QACN;AAAA,QACA;AAAA,MACF;AAEA,aAAO,YAAY,QAAQ,SAAS,cAAc;AAAA,IACpD;AAAA,EACF;AACF;","names":[]}
package/index.d.ts CHANGED
@@ -1,2 +1 @@
1
- // eslint-disable-next-line import/no-unresolved
2
1
  export * from './dist/node';
package/index.js CHANGED
@@ -1,2 +1 @@
1
- // eslint-disable-next-line import/no-commonjs,import/extensions
2
- module.exports = require('./dist/builds/node.cjs');
1
+ module.exports = require('./dist/builds/node.cjs');
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.2.4-beta.5",
2
+ "version": "5.10.0-beta.1",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/algolia/algoliasearch-client-javascript.git"
@@ -26,6 +26,10 @@
26
26
  "module": "./dist/builds/node.js",
27
27
  "require": "./dist/builds/node.cjs"
28
28
  },
29
+ "worker": {
30
+ "types": "./dist/fetch.d.ts",
31
+ "default": "./dist/builds/fetch.js"
32
+ },
29
33
  "default": {
30
34
  "types": "./dist/browser.d.ts",
31
35
  "module": "./dist/builds/browser.js",
@@ -37,24 +41,25 @@
37
41
  },
38
42
  "jsdelivr": "./dist/builds/browser.umd.js",
39
43
  "unpkg": "./dist/builds/browser.umd.js",
44
+ "react-native": "./dist/builds/browser.js",
40
45
  "files": [
41
46
  "dist",
42
- "model",
43
47
  "index.js",
44
48
  "index.d.ts"
45
49
  ],
46
50
  "dependencies": {
47
- "@algolia/client-common": "5.2.4-beta.5",
48
- "@algolia/requester-browser-xhr": "5.2.4-beta.5",
49
- "@algolia/requester-node-http": "5.2.4-beta.5"
51
+ "@algolia/client-common": "5.10.0-beta.1",
52
+ "@algolia/requester-browser-xhr": "5.10.0-beta.1",
53
+ "@algolia/requester-fetch": "5.10.0-beta.1",
54
+ "@algolia/requester-node-http": "5.10.0-beta.1"
50
55
  },
51
56
  "devDependencies": {
52
- "@arethetypeswrong/cli": "0.15.4",
53
- "@types/node": "22.5.1",
54
- "publint": "0.2.10",
55
- "rollup": "4.21.2",
56
- "tsup": "8.2.4",
57
- "typescript": "5.5.4"
57
+ "@arethetypeswrong/cli": "0.16.4",
58
+ "@types/node": "22.7.7",
59
+ "publint": "0.2.11",
60
+ "rollup": "4.24.0",
61
+ "tsup": "8.3.0",
62
+ "typescript": "5.6.3"
58
63
  },
59
64
  "engines": {
60
65
  "node": ">= 14.0.0"
@@ -1,5 +0,0 @@
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
-
3
- export type BadRequest = {
4
- reason?: string;
5
- };
@@ -1,132 +0,0 @@
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
-
3
- import type { Metric } from './metric';
4
- import type { Period } from './period';
5
-
6
- /**
7
- * Properties for the `customDelete` method.
8
- */
9
- export type CustomDeleteProps = {
10
- /**
11
- * Path of the endpoint, anything after \"/1\" must be specified.
12
- */
13
- path: string;
14
- /**
15
- * Query parameters to apply to the current query.
16
- */
17
- parameters?: Record<string, any>;
18
- };
19
-
20
- /**
21
- * Properties for the `customGet` method.
22
- */
23
- export type CustomGetProps = {
24
- /**
25
- * Path of the endpoint, anything after \"/1\" must be specified.
26
- */
27
- path: string;
28
- /**
29
- * Query parameters to apply to the current query.
30
- */
31
- parameters?: Record<string, any>;
32
- };
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, unknown>;
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, unknown>;
68
- };
69
-
70
- /**
71
- * Properties for the `getClusterIncidents` method.
72
- */
73
- export type GetClusterIncidentsProps = {
74
- /**
75
- * Subset of clusters, separated by comma.
76
- */
77
- clusters: string;
78
- };
79
-
80
- /**
81
- * Properties for the `getClusterStatus` method.
82
- */
83
- export type GetClusterStatusProps = {
84
- /**
85
- * Subset of clusters, separated by comma.
86
- */
87
- clusters: string;
88
- };
89
-
90
- /**
91
- * Properties for the `getIndexingTime` method.
92
- */
93
- export type GetIndexingTimeProps = {
94
- /**
95
- * Subset of clusters, separated by comma.
96
- */
97
- clusters: string;
98
- };
99
-
100
- /**
101
- * Properties for the `getLatency` method.
102
- */
103
- export type GetLatencyProps = {
104
- /**
105
- * Subset of clusters, separated by comma.
106
- */
107
- clusters: string;
108
- };
109
-
110
- /**
111
- * Properties for the `getMetrics` method.
112
- */
113
- export type GetMetricsProps = {
114
- /**
115
- * Metric to report. For more information about the individual metrics, see the description of the API response. To include all metrics, use `*`.
116
- */
117
- metric: Metric;
118
- /**
119
- * 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.
120
- */
121
- period: Period;
122
- };
123
-
124
- /**
125
- * Properties for the `getReachability` method.
126
- */
127
- export type GetReachabilityProps = {
128
- /**
129
- * Subset of clusters, separated by comma.
130
- */
131
- clusters: string;
132
- };
@@ -1,8 +0,0 @@
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
-
3
- /**
4
- * Error.
5
- */
6
- export type ErrorBase = Record<string, any> & {
7
- message?: string;
8
- };
@@ -1,5 +0,0 @@
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
-
3
- export type Forbidden = {
4
- reason?: string;
5
- };
package/model/incident.ts DELETED
@@ -1,15 +0,0 @@
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
-
3
- import type { Status } from './status';
4
-
5
- /**
6
- * Incident details.
7
- */
8
- export type Incident = {
9
- /**
10
- * Description of the incident.
11
- */
12
- title?: string;
13
-
14
- status?: Status;
15
- };
@@ -1,12 +0,0 @@
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
-
3
- import type { Incident } from './incident';
4
-
5
- export type IncidentEntry = {
6
- /**
7
- * Timestamp, measured in milliseconds since the Unix epoch.
8
- */
9
- t?: number;
10
-
11
- v?: Incident;
12
- };
@@ -1,7 +0,0 @@
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
-
3
- import type { IncidentEntry } from './incidentEntry';
4
-
5
- export type IncidentsResponse = {
6
- incidents?: Record<string, IncidentEntry[]>;
7
- };
package/model/index.ts DELETED
@@ -1,27 +0,0 @@
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
-
3
- export * from './badRequest';
4
- export * from './errorBase';
5
- export * from './forbidden';
6
- export * from './incident';
7
- export * from './incidentEntry';
8
- export * from './incidentsResponse';
9
- export * from './indexingMetric';
10
- export * from './indexingTimeResponse';
11
- export * from './infrastructureResponse';
12
- export * from './inventoryResponse';
13
- export * from './latencyMetric';
14
- export * from './latencyResponse';
15
- export * from './metric';
16
- export * from './metrics';
17
- export * from './period';
18
- export * from './probesMetric';
19
- export * from './region';
20
- export * from './server';
21
- export * from './serverStatus';
22
- export * from './status';
23
- export * from './statusResponse';
24
- export * from './timeEntry';
25
- export * from './type';
26
- export * from './unauthorized';
27
- export * from './clientMethodProps';
@@ -1,7 +0,0 @@
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
-
3
- import type { TimeEntry } from './timeEntry';
4
-
5
- export type IndexingMetric = {
6
- indexing?: Record<string, TimeEntry[]>;
7
- };
@@ -1,7 +0,0 @@
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
-
3
- import type { IndexingMetric } from './indexingMetric';
4
-
5
- export type IndexingTimeResponse = {
6
- metrics?: IndexingMetric;
7
- };
@@ -1,7 +0,0 @@
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
-
3
- import type { Metrics } from './metrics';
4
-
5
- export type InfrastructureResponse = {
6
- metrics?: Metrics;
7
- };
@@ -1,7 +0,0 @@
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
-
3
- import type { Server } from './server';
4
-
5
- export type InventoryResponse = {
6
- inventory?: Server[];
7
- };
@@ -1,7 +0,0 @@
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
-
3
- import type { TimeEntry } from './timeEntry';
4
-
5
- export type LatencyMetric = {
6
- latency?: Record<string, TimeEntry[]>;
7
- };
@@ -1,7 +0,0 @@
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
-
3
- import type { LatencyMetric } from './latencyMetric';
4
-
5
- export type LatencyResponse = {
6
- metrics?: LatencyMetric;
7
- };
package/model/metric.ts DELETED
@@ -1,3 +0,0 @@
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
-
3
- export type Metric = '*' | 'avg_build_time' | 'cpu_usage' | 'ram_indexing_usage' | 'ram_search_usage' | 'ssd_usage';
package/model/metrics.ts DELETED
@@ -1,30 +0,0 @@
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
-
3
- import type { ProbesMetric } from './probesMetric';
4
-
5
- export type Metrics = {
6
- /**
7
- * CPU idleness in %.
8
- */
9
- cpu_usage?: Record<string, ProbesMetric[]>;
10
-
11
- /**
12
- * RAM used for indexing in MB.
13
- */
14
- ram_indexing_usage?: Record<string, ProbesMetric[]>;
15
-
16
- /**
17
- * RAM used for search in MB.
18
- */
19
- ram_search_usage?: Record<string, ProbesMetric[]>;
20
-
21
- /**
22
- * Solid-state disk (SSD) usage expressed as % of RAM. 0% means no SSD usage. A value of 50% indicates 32&nbsp;GB SSD usage for a machine with 64&nbsp;RAM.
23
- */
24
- ssd_usage?: Record<string, ProbesMetric[]>;
25
-
26
- /**
27
- * Average build time of the indices in seconds.
28
- */
29
- avg_build_time?: Record<string, ProbesMetric[]>;
30
- };
package/model/period.ts DELETED
@@ -1,3 +0,0 @@
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
-
3
- export type Period = 'day' | 'hour' | 'minute' | 'month' | 'week';
@@ -1,13 +0,0 @@
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
-
3
- export type ProbesMetric = {
4
- /**
5
- * Timestamp, measured in milliseconds since the Unix epoch.
6
- */
7
- t?: number;
8
-
9
- /**
10
- * Value of the metric.
11
- */
12
- v?: number;
13
- };