@algolia/monitoring 1.26.0 → 1.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/worker.d.ts CHANGED
@@ -13,54 +13,54 @@ type Incident = {
13
13
  /**
14
14
  * Description of the incident.
15
15
  */
16
- title?: string;
17
- status?: Status;
16
+ title?: string | undefined;
17
+ status?: Status | undefined;
18
18
  };
19
19
 
20
20
  type IncidentEntry = {
21
21
  /**
22
22
  * Timestamp, measured in milliseconds since the Unix epoch.
23
23
  */
24
- t?: number;
25
- v?: Incident;
24
+ t?: number | undefined;
25
+ v?: Incident | undefined;
26
26
  };
27
27
 
28
28
  type IncidentsResponse = {
29
29
  incidents?: {
30
30
  [key: string]: Array<IncidentEntry>;
31
- };
31
+ } | undefined;
32
32
  };
33
33
 
34
34
  type TimeEntry = {
35
35
  /**
36
36
  * Timestamp, measured in milliseconds since the Unix epoch.
37
37
  */
38
- t?: number;
38
+ t?: number | undefined;
39
39
  /**
40
40
  * Time in ms.
41
41
  */
42
- v?: number;
42
+ v?: number | undefined;
43
43
  };
44
44
 
45
45
  type IndexingMetric = {
46
46
  indexing?: {
47
47
  [key: string]: Array<TimeEntry>;
48
- };
48
+ } | undefined;
49
49
  };
50
50
 
51
51
  type IndexingTimeResponse = {
52
- metrics?: IndexingMetric;
52
+ metrics?: IndexingMetric | undefined;
53
53
  };
54
54
 
55
55
  type ProbesMetric = {
56
56
  /**
57
57
  * Timestamp, measured in milliseconds since the Unix epoch.
58
58
  */
59
- t?: number;
59
+ t?: number | undefined;
60
60
  /**
61
61
  * Value of the metric.
62
62
  */
63
- v?: number;
63
+ v?: number | undefined;
64
64
  };
65
65
 
66
66
  type Metrics = {
@@ -69,35 +69,35 @@ type Metrics = {
69
69
  */
70
70
  cpu_usage?: {
71
71
  [key: string]: Array<ProbesMetric>;
72
- };
72
+ } | undefined;
73
73
  /**
74
74
  * RAM used for indexing in MB.
75
75
  */
76
76
  ram_indexing_usage?: {
77
77
  [key: string]: Array<ProbesMetric>;
78
- };
78
+ } | undefined;
79
79
  /**
80
80
  * RAM used for search in MB.
81
81
  */
82
82
  ram_search_usage?: {
83
83
  [key: string]: Array<ProbesMetric>;
84
- };
84
+ } | undefined;
85
85
  /**
86
86
  * 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.
87
87
  */
88
88
  ssd_usage?: {
89
89
  [key: string]: Array<ProbesMetric>;
90
- };
90
+ } | undefined;
91
91
  /**
92
92
  * Average build time of the indices in seconds.
93
93
  */
94
94
  avg_build_time?: {
95
95
  [key: string]: Array<ProbesMetric>;
96
- };
96
+ } | undefined;
97
97
  };
98
98
 
99
99
  type InfrastructureResponse = {
100
- metrics?: Metrics;
100
+ metrics?: Metrics | undefined;
101
101
  };
102
102
 
103
103
  /**
@@ -113,42 +113,42 @@ type Server = {
113
113
  /**
114
114
  * Server name.
115
115
  */
116
- name?: string;
117
- region?: Region;
116
+ name?: string | undefined;
117
+ region?: Region | undefined;
118
118
  /**
119
119
  * Included to support legacy applications. Use `is_replica` instead.
120
120
  */
121
- is_slave?: boolean;
121
+ is_slave?: boolean | undefined;
122
122
  /**
123
123
  * Whether this server is a replica of another server.
124
124
  */
125
- is_replica?: boolean;
125
+ is_replica?: boolean | undefined;
126
126
  /**
127
127
  * Name of the cluster to which this server belongs.
128
128
  */
129
- cluster?: string;
130
- status?: ServerStatus;
131
- type?: Type;
129
+ cluster?: string | undefined;
130
+ status?: ServerStatus | undefined;
131
+ type?: Type | undefined;
132
132
  };
133
133
 
134
134
  type InventoryResponse = {
135
- inventory?: Array<Server>;
135
+ inventory?: Array<Server> | undefined;
136
136
  };
137
137
 
138
138
  type LatencyMetric = {
139
139
  latency?: {
140
140
  [key: string]: Array<TimeEntry>;
141
- };
141
+ } | undefined;
142
142
  };
143
143
 
144
144
  type LatencyResponse = {
145
- metrics?: LatencyMetric;
145
+ metrics?: LatencyMetric | undefined;
146
146
  };
147
147
 
148
148
  type StatusResponse = {
149
149
  status?: {
150
150
  [key: string]: Status;
151
- };
151
+ } | undefined;
152
152
  };
153
153
 
154
154
  type Metric = 'avg_build_time' | 'ssd_usage' | 'ram_search_usage' | 'ram_indexing_usage' | 'cpu_usage' | '*';
@@ -168,7 +168,7 @@ type CustomDeleteProps = {
168
168
  */
169
169
  parameters?: {
170
170
  [key: string]: any;
171
- };
171
+ } | undefined;
172
172
  };
173
173
  /**
174
174
  * Properties for the `customGet` method.
@@ -183,7 +183,7 @@ type CustomGetProps = {
183
183
  */
184
184
  parameters?: {
185
185
  [key: string]: any;
186
- };
186
+ } | undefined;
187
187
  };
188
188
  /**
189
189
  * Properties for the `customPost` method.
@@ -198,11 +198,11 @@ type CustomPostProps = {
198
198
  */
199
199
  parameters?: {
200
200
  [key: string]: any;
201
- };
201
+ } | undefined;
202
202
  /**
203
203
  * Parameters to send with the custom request.
204
204
  */
205
- body?: Record<string, unknown>;
205
+ body?: Record<string, unknown> | undefined;
206
206
  };
207
207
  /**
208
208
  * Properties for the `customPut` method.
@@ -217,11 +217,11 @@ type CustomPutProps = {
217
217
  */
218
218
  parameters?: {
219
219
  [key: string]: any;
220
- };
220
+ } | undefined;
221
221
  /**
222
222
  * Parameters to send with the custom request.
223
223
  */
224
- body?: Record<string, unknown>;
224
+ body?: Record<string, unknown> | undefined;
225
225
  };
226
226
  /**
227
227
  * Properties for the `getClusterIncidents` method.
@@ -282,7 +282,7 @@ type GetReachabilityProps = {
282
282
  clusters: string;
283
283
  };
284
284
 
285
- declare const apiClientVersion = "1.26.0";
285
+ declare const apiClientVersion = "1.28.0";
286
286
  declare function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
287
287
  transporter: _algolia_client_common.Transporter;
288
288
  /**
@@ -307,7 +307,7 @@ declare function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOpti
307
307
  * @param segment - The algolia agent (user-agent) segment to add.
308
308
  * @param version - The version of the agent.
309
309
  */
310
- addAlgoliaAgent(segment: string, version?: string): void;
310
+ addAlgoliaAgent(segment: string, version?: string | undefined): void;
311
311
  /**
312
312
  * Helper method to switch the API key used to authenticate the requests.
313
313
  *
@@ -369,7 +369,7 @@ declare function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOpti
369
369
  * Retrieves known incidents for all clusters.
370
370
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
371
371
  */
372
- getIncidents(requestOptions?: RequestOptions): Promise<IncidentsResponse>;
372
+ getIncidents(requestOptions?: RequestOptions | undefined): Promise<IncidentsResponse>;
373
373
  /**
374
374
  * Retrieves average times for indexing operations for selected clusters.
375
375
  * @param getIndexingTime - The getIndexingTime object.
@@ -407,35 +407,35 @@ declare function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOpti
407
407
  * 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.
408
408
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
409
409
  */
410
- getServers(requestOptions?: RequestOptions): Promise<InventoryResponse>;
410
+ getServers(requestOptions?: RequestOptions | undefined): Promise<InventoryResponse>;
411
411
  /**
412
412
  * Retrieves the status of all Algolia clusters and instances.
413
413
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
414
414
  */
415
- getStatus(requestOptions?: RequestOptions): Promise<StatusResponse>;
415
+ getStatus(requestOptions?: RequestOptions | undefined): Promise<StatusResponse>;
416
416
  };
417
417
 
418
418
  type BadRequest = {
419
- reason?: string;
419
+ reason?: string | undefined;
420
420
  };
421
421
 
422
422
  /**
423
423
  * Error.
424
424
  */
425
425
  type ErrorBase = Record<string, any> & {
426
- message?: string;
426
+ message?: string | undefined;
427
427
  };
428
428
 
429
429
  type Forbidden = {
430
- reason?: string;
430
+ reason?: string | undefined;
431
431
  };
432
432
 
433
433
  type Unauthorized = {
434
- reason?: string;
434
+ reason?: string | undefined;
435
435
  };
436
436
 
437
437
  type MonitoringClient = ReturnType<typeof createMonitoringClient>;
438
438
 
439
- declare function monitoringClient(appId: string, apiKey: string, options?: ClientOptions): MonitoringClient;
439
+ declare function monitoringClient(appId: string, apiKey: string, options?: ClientOptions | undefined): MonitoringClient;
440
440
 
441
441
  export { type BadRequest, type CustomDeleteProps, type CustomGetProps, type CustomPostProps, type CustomPutProps, type ErrorBase, type Forbidden, type GetClusterIncidentsProps, type GetClusterStatusProps, type GetIndexingTimeProps, type GetLatencyProps, type GetMetricsProps, type GetReachabilityProps, type Incident, type IncidentEntry, type IncidentsResponse, type IndexingMetric, type IndexingTimeResponse, type InfrastructureResponse, type InventoryResponse, type LatencyMetric, type LatencyResponse, type Metric, type Metrics, type MonitoringClient, type Period, type ProbesMetric, type Region, type Server, type ServerStatus, type Status, type StatusResponse, type TimeEntry, type Type, type Unauthorized, apiClientVersion, monitoringClient };
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.26.0",
2
+ "version": "1.28.0",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/algolia/algoliasearch-client-javascript.git"
@@ -49,14 +49,14 @@
49
49
  "index.d.ts"
50
50
  ],
51
51
  "dependencies": {
52
- "@algolia/client-common": "5.26.0",
53
- "@algolia/requester-browser-xhr": "5.26.0",
54
- "@algolia/requester-fetch": "5.26.0",
55
- "@algolia/requester-node-http": "5.26.0"
52
+ "@algolia/client-common": "5.28.0",
53
+ "@algolia/requester-browser-xhr": "5.28.0",
54
+ "@algolia/requester-fetch": "5.28.0",
55
+ "@algolia/requester-node-http": "5.28.0"
56
56
  },
57
57
  "devDependencies": {
58
- "@arethetypeswrong/cli": "0.18.1",
59
- "@types/node": "22.15.29",
58
+ "@arethetypeswrong/cli": "0.18.2",
59
+ "@types/node": "22.15.31",
60
60
  "publint": "0.3.12",
61
61
  "rollup": "4.41.0",
62
62
  "tsup": "8.5.0",