@marinoscar/platform-contract 0.0.0-stage → 0.1.0-next.3
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/CHANGELOG.md +33 -0
- package/LICENSE +21 -0
- package/README.md +145 -2
- package/dist/cjs/doctor/constants.d.ts +59 -0
- package/dist/cjs/doctor/constants.d.ts.map +1 -0
- package/dist/cjs/doctor/constants.js +57 -0
- package/dist/cjs/doctor/constants.js.map +1 -0
- package/dist/cjs/doctor/index.d.ts +5 -0
- package/dist/cjs/doctor/index.d.ts.map +1 -0
- package/dist/cjs/doctor/index.js +24 -0
- package/dist/cjs/doctor/index.js.map +1 -0
- package/dist/cjs/doctor/schemas.d.ts +186 -0
- package/dist/cjs/doctor/schemas.d.ts.map +1 -0
- package/dist/cjs/doctor/schemas.js +183 -0
- package/dist/cjs/doctor/schemas.js.map +1 -0
- package/dist/cjs/index.d.ts +13 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +16 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/telemetry/assistant.d.ts +173 -0
- package/dist/cjs/telemetry/assistant.d.ts.map +1 -0
- package/dist/cjs/telemetry/assistant.js +43 -0
- package/dist/cjs/telemetry/assistant.js.map +1 -0
- package/dist/cjs/telemetry/config.d.ts +92 -0
- package/dist/cjs/telemetry/config.d.ts.map +1 -0
- package/dist/cjs/telemetry/config.js +101 -0
- package/dist/cjs/telemetry/config.js.map +1 -0
- package/dist/cjs/telemetry/connection.d.ts +355 -0
- package/dist/cjs/telemetry/connection.d.ts.map +1 -0
- package/dist/cjs/telemetry/connection.js +451 -0
- package/dist/cjs/telemetry/connection.js.map +1 -0
- package/dist/cjs/telemetry/constants.d.ts +442 -0
- package/dist/cjs/telemetry/constants.d.ts.map +1 -0
- package/dist/cjs/telemetry/constants.js +400 -0
- package/dist/cjs/telemetry/constants.js.map +1 -0
- package/dist/cjs/telemetry/dashboard.d.ts +826 -0
- package/dist/cjs/telemetry/dashboard.d.ts.map +1 -0
- package/dist/cjs/telemetry/dashboard.js +697 -0
- package/dist/cjs/telemetry/dashboard.js.map +1 -0
- package/dist/cjs/telemetry/enum.d.ts +5 -0
- package/dist/cjs/telemetry/enum.d.ts.map +1 -0
- package/dist/cjs/telemetry/enum.js +12 -0
- package/dist/cjs/telemetry/enum.js.map +1 -0
- package/dist/cjs/telemetry/index.d.ts +5 -0
- package/dist/cjs/telemetry/index.d.ts.map +1 -0
- package/dist/cjs/telemetry/index.js +128 -0
- package/dist/cjs/telemetry/index.js.map +1 -0
- package/dist/cjs/telemetry/query.d.ts +147 -0
- package/dist/cjs/telemetry/query.d.ts.map +1 -0
- package/dist/cjs/telemetry/query.js +141 -0
- package/dist/cjs/telemetry/query.js.map +1 -0
- package/dist/cjs/telemetry/schemas.d.ts +17 -0
- package/dist/cjs/telemetry/schemas.d.ts.map +1 -0
- package/dist/cjs/telemetry/schemas.js +89 -0
- package/dist/cjs/telemetry/schemas.js.map +1 -0
- package/dist/cjs/telemetry/settings.d.ts +65 -0
- package/dist/cjs/telemetry/settings.d.ts.map +1 -0
- package/dist/cjs/telemetry/settings.js +77 -0
- package/dist/cjs/telemetry/settings.js.map +1 -0
- package/dist/cjs/telemetry/stack.d.ts +87 -0
- package/dist/cjs/telemetry/stack.d.ts.map +1 -0
- package/dist/cjs/telemetry/stack.js +93 -0
- package/dist/cjs/telemetry/stack.js.map +1 -0
- package/dist/cjs/telemetry/status.d.ts +65 -0
- package/dist/cjs/telemetry/status.d.ts.map +1 -0
- package/dist/cjs/telemetry/status.js +65 -0
- package/dist/cjs/telemetry/status.js.map +1 -0
- package/dist/esm/doctor/constants.d.ts +59 -0
- package/dist/esm/doctor/constants.d.ts.map +1 -0
- package/dist/esm/doctor/constants.js +54 -0
- package/dist/esm/doctor/constants.js.map +1 -0
- package/dist/esm/doctor/index.d.ts +5 -0
- package/dist/esm/doctor/index.d.ts.map +1 -0
- package/dist/esm/doctor/index.js +10 -0
- package/dist/esm/doctor/index.js.map +1 -0
- package/dist/esm/doctor/schemas.d.ts +186 -0
- package/dist/esm/doctor/schemas.d.ts.map +1 -0
- package/dist/esm/doctor/schemas.js +180 -0
- package/dist/esm/doctor/schemas.js.map +1 -0
- package/dist/esm/index.d.ts +13 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +13 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/telemetry/assistant.d.ts +173 -0
- package/dist/esm/telemetry/assistant.d.ts.map +1 -0
- package/dist/esm/telemetry/assistant.js +40 -0
- package/dist/esm/telemetry/assistant.js.map +1 -0
- package/dist/esm/telemetry/config.d.ts +92 -0
- package/dist/esm/telemetry/config.d.ts.map +1 -0
- package/dist/esm/telemetry/config.js +98 -0
- package/dist/esm/telemetry/config.js.map +1 -0
- package/dist/esm/telemetry/connection.d.ts +355 -0
- package/dist/esm/telemetry/connection.d.ts.map +1 -0
- package/dist/esm/telemetry/connection.js +447 -0
- package/dist/esm/telemetry/connection.js.map +1 -0
- package/dist/esm/telemetry/constants.d.ts +442 -0
- package/dist/esm/telemetry/constants.d.ts.map +1 -0
- package/dist/esm/telemetry/constants.js +397 -0
- package/dist/esm/telemetry/constants.js.map +1 -0
- package/dist/esm/telemetry/dashboard.d.ts +826 -0
- package/dist/esm/telemetry/dashboard.d.ts.map +1 -0
- package/dist/esm/telemetry/dashboard.js +690 -0
- package/dist/esm/telemetry/dashboard.js.map +1 -0
- package/dist/esm/telemetry/enum.d.ts +5 -0
- package/dist/esm/telemetry/enum.d.ts.map +1 -0
- package/dist/esm/telemetry/enum.js +9 -0
- package/dist/esm/telemetry/enum.js.map +1 -0
- package/dist/esm/telemetry/index.d.ts +5 -0
- package/dist/esm/telemetry/index.d.ts.map +1 -0
- package/dist/esm/telemetry/index.js +10 -0
- package/dist/esm/telemetry/index.js.map +1 -0
- package/dist/esm/telemetry/query.d.ts +147 -0
- package/dist/esm/telemetry/query.d.ts.map +1 -0
- package/dist/esm/telemetry/query.js +138 -0
- package/dist/esm/telemetry/query.js.map +1 -0
- package/dist/esm/telemetry/schemas.d.ts +17 -0
- package/dist/esm/telemetry/schemas.d.ts.map +1 -0
- package/dist/esm/telemetry/schemas.js +12 -0
- package/dist/esm/telemetry/schemas.js.map +1 -0
- package/dist/esm/telemetry/settings.d.ts +65 -0
- package/dist/esm/telemetry/settings.d.ts.map +1 -0
- package/dist/esm/telemetry/settings.js +74 -0
- package/dist/esm/telemetry/settings.js.map +1 -0
- package/dist/esm/telemetry/stack.d.ts +87 -0
- package/dist/esm/telemetry/stack.d.ts.map +1 -0
- package/dist/esm/telemetry/stack.js +90 -0
- package/dist/esm/telemetry/stack.js.map +1 -0
- package/dist/esm/telemetry/status.d.ts +65 -0
- package/dist/esm/telemetry/status.d.ts.map +1 -0
- package/dist/esm/telemetry/status.js +62 -0
- package/dist/esm/telemetry/status.js.map +1 -0
- package/package.json +78 -4
|
@@ -0,0 +1,826 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* The window fields {@link refineWindow} reads.
|
|
4
|
+
*
|
|
5
|
+
* @stability stable
|
|
6
|
+
*/
|
|
7
|
+
export interface DashboardWindowInput {
|
|
8
|
+
/** A relative window. */
|
|
9
|
+
range?: string;
|
|
10
|
+
/** An absolute window start. */
|
|
11
|
+
from?: string;
|
|
12
|
+
/** An absolute window end. */
|
|
13
|
+
to?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The cross-field rules of a dashboard window, as a `superRefine`: `range`
|
|
17
|
+
* or `from`+`to` (never both, never one of the pair), `from < to`, `to` at
|
|
18
|
+
* most 1 minute in the future and a span of at most 30 days. Every dashboard
|
|
19
|
+
* query schema applies it; an app's own dashboard query applies it too.
|
|
20
|
+
*
|
|
21
|
+
* @stability stable
|
|
22
|
+
*/
|
|
23
|
+
export declare function refineWindow(value: DashboardWindowInput, ctx: z.RefinementCtx): void;
|
|
24
|
+
/**
|
|
25
|
+
* The query every dashboard route shares: `range` or `from`+`to`, `service`,
|
|
26
|
+
* `instance` and `buckets`, with {@link refineWindow}.
|
|
27
|
+
*
|
|
28
|
+
* @extensionPoint schema
|
|
29
|
+
* @stability stable
|
|
30
|
+
*/
|
|
31
|
+
export declare const telemetryDashboardQuerySchema: z.ZodObject<{
|
|
32
|
+
range: z.ZodOptional<z.ZodEnum<import("./constants.js").TelemetryEnumEntries<"15m" | "1h" | "6h" | "24h" | "7d">>>;
|
|
33
|
+
from: z.ZodOptional<z.ZodISODateTime>;
|
|
34
|
+
to: z.ZodOptional<z.ZodISODateTime>;
|
|
35
|
+
service: z.ZodOptional<z.ZodString>;
|
|
36
|
+
instance: z.ZodOptional<z.ZodString>;
|
|
37
|
+
buckets: z.ZodOptional<z.ZodEnum<import("./constants.js").TelemetryEnumEntries<"30" | "60">>>;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
/**
|
|
40
|
+
* The query every dashboard route shares.
|
|
41
|
+
*
|
|
42
|
+
* @stability stable
|
|
43
|
+
*/
|
|
44
|
+
export type TelemetryDashboardQuery = z.infer<typeof telemetryDashboardQuerySchema>;
|
|
45
|
+
/**
|
|
46
|
+
* `GET …/dashboard/timeseries` query: the common query plus `panel`
|
|
47
|
+
* (`api` or `logs`).
|
|
48
|
+
*
|
|
49
|
+
* @extensionPoint schema
|
|
50
|
+
* @stability stable
|
|
51
|
+
*/
|
|
52
|
+
export declare const telemetryDashboardTimeseriesQuerySchema: z.ZodObject<{
|
|
53
|
+
panel: z.ZodEnum<import("./constants.js").TelemetryEnumEntries<"api" | "logs">>;
|
|
54
|
+
range: z.ZodOptional<z.ZodEnum<import("./constants.js").TelemetryEnumEntries<"15m" | "1h" | "6h" | "24h" | "7d">>>;
|
|
55
|
+
from: z.ZodOptional<z.ZodISODateTime>;
|
|
56
|
+
to: z.ZodOptional<z.ZodISODateTime>;
|
|
57
|
+
service: z.ZodOptional<z.ZodString>;
|
|
58
|
+
instance: z.ZodOptional<z.ZodString>;
|
|
59
|
+
buckets: z.ZodOptional<z.ZodEnum<import("./constants.js").TelemetryEnumEntries<"30" | "60">>>;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
/**
|
|
62
|
+
* `GET …/dashboard/timeseries` query.
|
|
63
|
+
*
|
|
64
|
+
* @stability stable
|
|
65
|
+
*/
|
|
66
|
+
export type TelemetryDashboardTimeseriesQuery = z.infer<typeof telemetryDashboardTimeseriesQuerySchema>;
|
|
67
|
+
/**
|
|
68
|
+
* `GET …/dashboard/top` query: the common query plus `kind` (`routes` or
|
|
69
|
+
* `errors`).
|
|
70
|
+
*
|
|
71
|
+
* @extensionPoint schema
|
|
72
|
+
* @stability stable
|
|
73
|
+
*/
|
|
74
|
+
export declare const telemetryDashboardTopQuerySchema: z.ZodObject<{
|
|
75
|
+
kind: z.ZodEnum<import("./constants.js").TelemetryEnumEntries<"routes" | "errors">>;
|
|
76
|
+
range: z.ZodOptional<z.ZodEnum<import("./constants.js").TelemetryEnumEntries<"15m" | "1h" | "6h" | "24h" | "7d">>>;
|
|
77
|
+
from: z.ZodOptional<z.ZodISODateTime>;
|
|
78
|
+
to: z.ZodOptional<z.ZodISODateTime>;
|
|
79
|
+
service: z.ZodOptional<z.ZodString>;
|
|
80
|
+
instance: z.ZodOptional<z.ZodString>;
|
|
81
|
+
buckets: z.ZodOptional<z.ZodEnum<import("./constants.js").TelemetryEnumEntries<"30" | "60">>>;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
/**
|
|
84
|
+
* `GET …/dashboard/top` query.
|
|
85
|
+
*
|
|
86
|
+
* @stability stable
|
|
87
|
+
*/
|
|
88
|
+
export type TelemetryDashboardTopQuery = z.infer<typeof telemetryDashboardTopQuerySchema>;
|
|
89
|
+
/**
|
|
90
|
+
* `GET …/dashboard/events` query: the common query plus `severity` (a comma
|
|
91
|
+
* list of {@link DASHBOARD_EVENT_SEVERITIES}), `q` (a log body substring) and
|
|
92
|
+
* `cursor`.
|
|
93
|
+
*
|
|
94
|
+
* @extensionPoint schema
|
|
95
|
+
* @stability stable
|
|
96
|
+
*/
|
|
97
|
+
export declare const telemetryDashboardEventsQuerySchema: z.ZodObject<{
|
|
98
|
+
severity: z.ZodOptional<z.ZodString>;
|
|
99
|
+
q: z.ZodOptional<z.ZodString>;
|
|
100
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
101
|
+
range: z.ZodOptional<z.ZodEnum<import("./constants.js").TelemetryEnumEntries<"15m" | "1h" | "6h" | "24h" | "7d">>>;
|
|
102
|
+
from: z.ZodOptional<z.ZodISODateTime>;
|
|
103
|
+
to: z.ZodOptional<z.ZodISODateTime>;
|
|
104
|
+
service: z.ZodOptional<z.ZodString>;
|
|
105
|
+
instance: z.ZodOptional<z.ZodString>;
|
|
106
|
+
buckets: z.ZodOptional<z.ZodEnum<import("./constants.js").TelemetryEnumEntries<"30" | "60">>>;
|
|
107
|
+
}, z.core.$strip>;
|
|
108
|
+
/**
|
|
109
|
+
* `GET …/dashboard/events` query.
|
|
110
|
+
*
|
|
111
|
+
* @stability stable
|
|
112
|
+
*/
|
|
113
|
+
export type TelemetryDashboardEventsQuery = z.infer<typeof telemetryDashboardEventsQuerySchema>;
|
|
114
|
+
/**
|
|
115
|
+
* A metric group id as the contract knows it: any lower snake-case id
|
|
116
|
+
* ({@link METRIC_GROUP_ID_PATTERN}). The set is open; a server checks it
|
|
117
|
+
* against what it registered.
|
|
118
|
+
*
|
|
119
|
+
* @extensionPoint schema
|
|
120
|
+
* @stability stable
|
|
121
|
+
*/
|
|
122
|
+
export declare const metricGroupIdSchema: z.ZodString;
|
|
123
|
+
/**
|
|
124
|
+
* A metric group id.
|
|
125
|
+
*
|
|
126
|
+
* @stability stable
|
|
127
|
+
*/
|
|
128
|
+
export type MetricGroupId = z.infer<typeof metricGroupIdSchema>;
|
|
129
|
+
/**
|
|
130
|
+
* What {@link metricGroupQuerySchema} checks and documents.
|
|
131
|
+
*
|
|
132
|
+
* @stability stable
|
|
133
|
+
*/
|
|
134
|
+
export interface MetricGroupQueryOptions<G extends string> {
|
|
135
|
+
/** The ids published in the OpenAPI document (the enum and the description), in dashboard order. */
|
|
136
|
+
documented: readonly G[];
|
|
137
|
+
/** Whether `id` is a registered group, read live. */
|
|
138
|
+
isKnown: (id: unknown) => id is G;
|
|
139
|
+
/** The registered ids, read live, for the error message. */
|
|
140
|
+
knownIds: () => readonly string[];
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* The `/metrics` `group` query value of a server with a registry: checked
|
|
144
|
+
* against the LIVE set (`isKnown`), so a group registered after the schema
|
|
145
|
+
* was built is accepted, and DOCUMENTED as the enum of `documented`, exactly
|
|
146
|
+
* as a `z.enum` would be, so the OpenAPI document reads the same.
|
|
147
|
+
*
|
|
148
|
+
* @extensionPoint schema
|
|
149
|
+
* @stability stable
|
|
150
|
+
*/
|
|
151
|
+
export declare function metricGroupQuerySchema<G extends string>(options: MetricGroupQueryOptions<G>): z.ZodType<G, string>;
|
|
152
|
+
/**
|
|
153
|
+
* Builds the `GET …/dashboard/metrics` query schema around a `group` schema:
|
|
154
|
+
* the common query plus `group` and `host`, with {@link refineWindow}.
|
|
155
|
+
*
|
|
156
|
+
* @extensionPoint schema
|
|
157
|
+
* @stability stable
|
|
158
|
+
*/
|
|
159
|
+
export declare function createTelemetryDashboardMetricsQuerySchema<G extends z.ZodType<string, string>>(group: G): z.ZodObject<{
|
|
160
|
+
group: G;
|
|
161
|
+
host: z.ZodOptional<z.ZodString>;
|
|
162
|
+
range: z.ZodOptional<z.ZodEnum<import("./constants.js").TelemetryEnumEntries<"15m" | "1h" | "6h" | "24h" | "7d">>>;
|
|
163
|
+
from: z.ZodOptional<z.ZodISODateTime>;
|
|
164
|
+
to: z.ZodOptional<z.ZodISODateTime>;
|
|
165
|
+
service: z.ZodOptional<z.ZodString>;
|
|
166
|
+
instance: z.ZodOptional<z.ZodString>;
|
|
167
|
+
buckets: z.ZodOptional<z.ZodEnum<import("./constants.js").TelemetryEnumEntries<"30" | "60">>>;
|
|
168
|
+
}, z.core.$strip>;
|
|
169
|
+
/**
|
|
170
|
+
* `GET …/dashboard/metrics` query, with `group` any metric group id
|
|
171
|
+
* ({@link metricGroupIdSchema}).
|
|
172
|
+
*
|
|
173
|
+
* @extensionPoint schema
|
|
174
|
+
* @stability stable
|
|
175
|
+
*/
|
|
176
|
+
export declare const telemetryDashboardMetricsQuerySchema: z.ZodObject<{
|
|
177
|
+
group: z.ZodString;
|
|
178
|
+
host: z.ZodOptional<z.ZodString>;
|
|
179
|
+
range: z.ZodOptional<z.ZodEnum<import("./constants.js").TelemetryEnumEntries<"15m" | "1h" | "6h" | "24h" | "7d">>>;
|
|
180
|
+
from: z.ZodOptional<z.ZodISODateTime>;
|
|
181
|
+
to: z.ZodOptional<z.ZodISODateTime>;
|
|
182
|
+
service: z.ZodOptional<z.ZodString>;
|
|
183
|
+
instance: z.ZodOptional<z.ZodString>;
|
|
184
|
+
buckets: z.ZodOptional<z.ZodEnum<import("./constants.js").TelemetryEnumEntries<"30" | "60">>>;
|
|
185
|
+
}, z.core.$strip>;
|
|
186
|
+
/**
|
|
187
|
+
* `GET …/dashboard/metrics` query.
|
|
188
|
+
*
|
|
189
|
+
* @stability stable
|
|
190
|
+
*/
|
|
191
|
+
export type TelemetryDashboardMetricsQuery = z.infer<typeof telemetryDashboardMetricsQuerySchema>;
|
|
192
|
+
/**
|
|
193
|
+
* The fields every dashboard response except `/metrics` starts with:
|
|
194
|
+
* `range` (`from`, `to`, `bucketSeconds`), `generatedAt`, `truncated` and
|
|
195
|
+
* `sql` (the statement or statements run, primary first).
|
|
196
|
+
*
|
|
197
|
+
* @extensionPoint schema
|
|
198
|
+
* @stability stable
|
|
199
|
+
*/
|
|
200
|
+
export declare const telemetryDashboardEnvelopeSchema: z.ZodObject<{
|
|
201
|
+
range: z.ZodObject<{
|
|
202
|
+
from: z.ZodString;
|
|
203
|
+
to: z.ZodString;
|
|
204
|
+
bucketSeconds: z.ZodNumber;
|
|
205
|
+
}, z.core.$strip>;
|
|
206
|
+
generatedAt: z.ZodString;
|
|
207
|
+
truncated: z.ZodBoolean;
|
|
208
|
+
sql: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
209
|
+
}, z.core.$strip>;
|
|
210
|
+
/**
|
|
211
|
+
* The fields every dashboard response except `/metrics` starts with.
|
|
212
|
+
*
|
|
213
|
+
* @stability stable
|
|
214
|
+
*/
|
|
215
|
+
export type TelemetryDashboardEnvelope = z.infer<typeof telemetryDashboardEnvelopeSchema>;
|
|
216
|
+
/**
|
|
217
|
+
* One tile: `key`, `label`, `value`, `previous` (the previous window of equal
|
|
218
|
+
* length), `unit` and `sparkline` (one value per bucket, `null` a gap).
|
|
219
|
+
*
|
|
220
|
+
* @extensionPoint schema
|
|
221
|
+
* @stability stable
|
|
222
|
+
*/
|
|
223
|
+
export declare const telemetryDashboardTileSchema: z.ZodObject<{
|
|
224
|
+
key: z.ZodString;
|
|
225
|
+
label: z.ZodString;
|
|
226
|
+
value: z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
227
|
+
previous: z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
228
|
+
unit: z.ZodString;
|
|
229
|
+
sparkline: z.ZodArray<z.ZodNullable<z.ZodNumber>>;
|
|
230
|
+
}, z.core.$strip>;
|
|
231
|
+
/**
|
|
232
|
+
* One tile.
|
|
233
|
+
*
|
|
234
|
+
* @stability stable
|
|
235
|
+
*/
|
|
236
|
+
export type TelemetryDashboardTile = z.infer<typeof telemetryDashboardTileSchema>;
|
|
237
|
+
/**
|
|
238
|
+
* One unknown API route of the summary (#650): `method`, the normalized
|
|
239
|
+
* `route`, `count`, and how many were `bearer` or `anonymous`.
|
|
240
|
+
*
|
|
241
|
+
* @extensionPoint schema
|
|
242
|
+
* @stability stable
|
|
243
|
+
*/
|
|
244
|
+
export declare const unknownRouteSchema: z.ZodObject<{
|
|
245
|
+
method: z.ZodNullable<z.ZodString>;
|
|
246
|
+
route: z.ZodNullable<z.ZodString>;
|
|
247
|
+
count: z.ZodNumber;
|
|
248
|
+
bearer: z.ZodNumber;
|
|
249
|
+
anonymous: z.ZodNumber;
|
|
250
|
+
}, z.core.$strip>;
|
|
251
|
+
/**
|
|
252
|
+
* One unknown API route of the summary.
|
|
253
|
+
*
|
|
254
|
+
* @stability stable
|
|
255
|
+
*/
|
|
256
|
+
export type TelemetryDashboardUnknownRoute = z.infer<typeof unknownRouteSchema>;
|
|
257
|
+
/**
|
|
258
|
+
* Requests to API routes that do not exist (#650): totals, the previous
|
|
259
|
+
* window's, the top routes and the statements run.
|
|
260
|
+
*
|
|
261
|
+
* @extensionPoint schema
|
|
262
|
+
* @stability stable
|
|
263
|
+
*/
|
|
264
|
+
export declare const telemetryDashboardUnknownRoutesSchema: z.ZodObject<{
|
|
265
|
+
requests: z.ZodNumber;
|
|
266
|
+
bearer: z.ZodNumber;
|
|
267
|
+
anonymous: z.ZodNumber;
|
|
268
|
+
previousRequests: z.ZodNumber;
|
|
269
|
+
previousBearer: z.ZodNumber;
|
|
270
|
+
topRoutes: z.ZodArray<z.ZodObject<{
|
|
271
|
+
method: z.ZodNullable<z.ZodString>;
|
|
272
|
+
route: z.ZodNullable<z.ZodString>;
|
|
273
|
+
count: z.ZodNumber;
|
|
274
|
+
bearer: z.ZodNumber;
|
|
275
|
+
anonymous: z.ZodNumber;
|
|
276
|
+
}, z.core.$strip>>;
|
|
277
|
+
truncated: z.ZodBoolean;
|
|
278
|
+
sql: z.ZodArray<z.ZodString>;
|
|
279
|
+
}, z.core.$strip>;
|
|
280
|
+
/**
|
|
281
|
+
* Requests to API routes that do not exist.
|
|
282
|
+
*
|
|
283
|
+
* @stability stable
|
|
284
|
+
*/
|
|
285
|
+
export type TelemetryDashboardUnknownRoutes = z.infer<typeof telemetryDashboardUnknownRoutesSchema>;
|
|
286
|
+
/**
|
|
287
|
+
* `GET …/dashboard/summary`: the envelope plus `verdict` (`level` and
|
|
288
|
+
* `reasons`), `tiles`, `runtime` (optional) and `unknownRoutes` (optional).
|
|
289
|
+
*
|
|
290
|
+
* @extensionPoint schema
|
|
291
|
+
* @stability stable
|
|
292
|
+
*/
|
|
293
|
+
export declare const telemetryDashboardSummarySchema: z.ZodObject<{
|
|
294
|
+
verdict: z.ZodObject<{
|
|
295
|
+
level: z.ZodEnum<import("./constants.js").TelemetryEnumEntries<"healthy" | "degraded" | "critical" | "no_data">>;
|
|
296
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
297
|
+
}, z.core.$strip>;
|
|
298
|
+
tiles: z.ZodArray<z.ZodObject<{
|
|
299
|
+
key: z.ZodString;
|
|
300
|
+
label: z.ZodString;
|
|
301
|
+
value: z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
302
|
+
previous: z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
303
|
+
unit: z.ZodString;
|
|
304
|
+
sparkline: z.ZodArray<z.ZodNullable<z.ZodNumber>>;
|
|
305
|
+
}, z.core.$strip>>;
|
|
306
|
+
runtime: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
307
|
+
key: z.ZodString;
|
|
308
|
+
label: z.ZodString;
|
|
309
|
+
value: z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
310
|
+
previous: z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
311
|
+
unit: z.ZodString;
|
|
312
|
+
sparkline: z.ZodArray<z.ZodNullable<z.ZodNumber>>;
|
|
313
|
+
}, z.core.$strip>>>;
|
|
314
|
+
unknownRoutes: z.ZodOptional<z.ZodObject<{
|
|
315
|
+
requests: z.ZodNumber;
|
|
316
|
+
bearer: z.ZodNumber;
|
|
317
|
+
anonymous: z.ZodNumber;
|
|
318
|
+
previousRequests: z.ZodNumber;
|
|
319
|
+
previousBearer: z.ZodNumber;
|
|
320
|
+
topRoutes: z.ZodArray<z.ZodObject<{
|
|
321
|
+
method: z.ZodNullable<z.ZodString>;
|
|
322
|
+
route: z.ZodNullable<z.ZodString>;
|
|
323
|
+
count: z.ZodNumber;
|
|
324
|
+
bearer: z.ZodNumber;
|
|
325
|
+
anonymous: z.ZodNumber;
|
|
326
|
+
}, z.core.$strip>>;
|
|
327
|
+
truncated: z.ZodBoolean;
|
|
328
|
+
sql: z.ZodArray<z.ZodString>;
|
|
329
|
+
}, z.core.$strip>>;
|
|
330
|
+
range: z.ZodObject<{
|
|
331
|
+
from: z.ZodString;
|
|
332
|
+
to: z.ZodString;
|
|
333
|
+
bucketSeconds: z.ZodNumber;
|
|
334
|
+
}, z.core.$strip>;
|
|
335
|
+
generatedAt: z.ZodString;
|
|
336
|
+
truncated: z.ZodBoolean;
|
|
337
|
+
sql: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
338
|
+
}, z.core.$strip>;
|
|
339
|
+
/**
|
|
340
|
+
* `GET …/dashboard/summary`.
|
|
341
|
+
*
|
|
342
|
+
* @stability stable
|
|
343
|
+
*/
|
|
344
|
+
export type TelemetryDashboardSummary = z.infer<typeof telemetryDashboardSummarySchema>;
|
|
345
|
+
/**
|
|
346
|
+
* One `api` timeseries bucket: `t`, the status classes and `p95Ms`.
|
|
347
|
+
*
|
|
348
|
+
* @extensionPoint schema
|
|
349
|
+
* @stability stable
|
|
350
|
+
*/
|
|
351
|
+
export declare const apiBucketSchema: z.ZodObject<{
|
|
352
|
+
t: z.ZodString;
|
|
353
|
+
s2xx: z.ZodNumber;
|
|
354
|
+
s3xx: z.ZodNumber;
|
|
355
|
+
s4xx: z.ZodNumber;
|
|
356
|
+
s5xx: z.ZodNumber;
|
|
357
|
+
p95Ms: z.ZodNullable<z.ZodNumber>;
|
|
358
|
+
}, z.core.$strip>;
|
|
359
|
+
/**
|
|
360
|
+
* One `api` timeseries bucket.
|
|
361
|
+
*
|
|
362
|
+
* @stability stable
|
|
363
|
+
*/
|
|
364
|
+
export type TelemetryDashboardApiBucket = z.infer<typeof apiBucketSchema>;
|
|
365
|
+
/**
|
|
366
|
+
* One `logs` timeseries bucket: `t` and the severity bands.
|
|
367
|
+
*
|
|
368
|
+
* @extensionPoint schema
|
|
369
|
+
* @stability stable
|
|
370
|
+
*/
|
|
371
|
+
export declare const logsBucketSchema: z.ZodObject<{
|
|
372
|
+
t: z.ZodString;
|
|
373
|
+
error: z.ZodNumber;
|
|
374
|
+
warn: z.ZodNumber;
|
|
375
|
+
info: z.ZodNumber;
|
|
376
|
+
other: z.ZodNumber;
|
|
377
|
+
}, z.core.$strip>;
|
|
378
|
+
/**
|
|
379
|
+
* One `logs` timeseries bucket.
|
|
380
|
+
*
|
|
381
|
+
* @stability stable
|
|
382
|
+
*/
|
|
383
|
+
export type TelemetryDashboardLogsBucket = z.infer<typeof logsBucketSchema>;
|
|
384
|
+
/**
|
|
385
|
+
* `GET …/dashboard/timeseries`: the envelope plus `panel` and `buckets` (api
|
|
386
|
+
* buckets for `api`, logs buckets for `logs`).
|
|
387
|
+
*
|
|
388
|
+
* @extensionPoint schema
|
|
389
|
+
* @stability stable
|
|
390
|
+
*/
|
|
391
|
+
export declare const telemetryDashboardTimeseriesSchema: z.ZodObject<{
|
|
392
|
+
panel: z.ZodEnum<import("./constants.js").TelemetryEnumEntries<"api" | "logs">>;
|
|
393
|
+
buckets: z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
394
|
+
t: z.ZodString;
|
|
395
|
+
s2xx: z.ZodNumber;
|
|
396
|
+
s3xx: z.ZodNumber;
|
|
397
|
+
s4xx: z.ZodNumber;
|
|
398
|
+
s5xx: z.ZodNumber;
|
|
399
|
+
p95Ms: z.ZodNullable<z.ZodNumber>;
|
|
400
|
+
}, z.core.$strip>>, z.ZodArray<z.ZodObject<{
|
|
401
|
+
t: z.ZodString;
|
|
402
|
+
error: z.ZodNumber;
|
|
403
|
+
warn: z.ZodNumber;
|
|
404
|
+
info: z.ZodNumber;
|
|
405
|
+
other: z.ZodNumber;
|
|
406
|
+
}, z.core.$strip>>]>;
|
|
407
|
+
range: z.ZodObject<{
|
|
408
|
+
from: z.ZodString;
|
|
409
|
+
to: z.ZodString;
|
|
410
|
+
bucketSeconds: z.ZodNumber;
|
|
411
|
+
}, z.core.$strip>;
|
|
412
|
+
generatedAt: z.ZodString;
|
|
413
|
+
truncated: z.ZodBoolean;
|
|
414
|
+
sql: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
415
|
+
}, z.core.$strip>;
|
|
416
|
+
/**
|
|
417
|
+
* `GET …/dashboard/timeseries`.
|
|
418
|
+
*
|
|
419
|
+
* @stability stable
|
|
420
|
+
*/
|
|
421
|
+
export type TelemetryDashboardTimeseries = z.infer<typeof telemetryDashboardTimeseriesSchema>;
|
|
422
|
+
/**
|
|
423
|
+
* One route of `top?kind=routes`: request counts, 5xx `errors`, 4xx
|
|
424
|
+
* `clientErrors`, `unknownRequests`, `unknown` and `p95Ms`.
|
|
425
|
+
*
|
|
426
|
+
* @extensionPoint schema
|
|
427
|
+
* @stability stable
|
|
428
|
+
*/
|
|
429
|
+
export declare const topRouteSchema: z.ZodObject<{
|
|
430
|
+
method: z.ZodNullable<z.ZodString>;
|
|
431
|
+
route: z.ZodNullable<z.ZodString>;
|
|
432
|
+
count: z.ZodNumber;
|
|
433
|
+
errors: z.ZodNumber;
|
|
434
|
+
errorRatePct: z.ZodNumber;
|
|
435
|
+
clientErrors: z.ZodNumber;
|
|
436
|
+
unknownRequests: z.ZodNumber;
|
|
437
|
+
unknown: z.ZodBoolean;
|
|
438
|
+
p95Ms: z.ZodNullable<z.ZodNumber>;
|
|
439
|
+
}, z.core.$strip>;
|
|
440
|
+
/**
|
|
441
|
+
* One route of `top?kind=routes`.
|
|
442
|
+
*
|
|
443
|
+
* @stability stable
|
|
444
|
+
*/
|
|
445
|
+
export type TelemetryDashboardTopRoute = z.infer<typeof topRouteSchema>;
|
|
446
|
+
/**
|
|
447
|
+
* One error message of `top?kind=errors`: `message`, `count`, first and last
|
|
448
|
+
* seen, a sample trace and the `service`.
|
|
449
|
+
*
|
|
450
|
+
* @extensionPoint schema
|
|
451
|
+
* @stability stable
|
|
452
|
+
*/
|
|
453
|
+
export declare const topErrorSchema: z.ZodObject<{
|
|
454
|
+
message: z.ZodNullable<z.ZodString>;
|
|
455
|
+
count: z.ZodNumber;
|
|
456
|
+
firstSeen: z.ZodNullable<z.ZodString>;
|
|
457
|
+
lastSeen: z.ZodNullable<z.ZodString>;
|
|
458
|
+
sampleTraceId: z.ZodNullable<z.ZodString>;
|
|
459
|
+
service: z.ZodNullable<z.ZodString>;
|
|
460
|
+
}, z.core.$strip>;
|
|
461
|
+
/**
|
|
462
|
+
* One error message of `top?kind=errors`.
|
|
463
|
+
*
|
|
464
|
+
* @stability stable
|
|
465
|
+
*/
|
|
466
|
+
export type TelemetryDashboardTopError = z.infer<typeof topErrorSchema>;
|
|
467
|
+
/**
|
|
468
|
+
* `GET …/dashboard/top`: the envelope plus `kind` and `items` (routes for
|
|
469
|
+
* `routes`, errors for `errors`).
|
|
470
|
+
*
|
|
471
|
+
* @extensionPoint schema
|
|
472
|
+
* @stability stable
|
|
473
|
+
*/
|
|
474
|
+
export declare const telemetryDashboardTopSchema: z.ZodObject<{
|
|
475
|
+
kind: z.ZodEnum<import("./constants.js").TelemetryEnumEntries<"routes" | "errors">>;
|
|
476
|
+
items: z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
477
|
+
method: z.ZodNullable<z.ZodString>;
|
|
478
|
+
route: z.ZodNullable<z.ZodString>;
|
|
479
|
+
count: z.ZodNumber;
|
|
480
|
+
errors: z.ZodNumber;
|
|
481
|
+
errorRatePct: z.ZodNumber;
|
|
482
|
+
clientErrors: z.ZodNumber;
|
|
483
|
+
unknownRequests: z.ZodNumber;
|
|
484
|
+
unknown: z.ZodBoolean;
|
|
485
|
+
p95Ms: z.ZodNullable<z.ZodNumber>;
|
|
486
|
+
}, z.core.$strip>>, z.ZodArray<z.ZodObject<{
|
|
487
|
+
message: z.ZodNullable<z.ZodString>;
|
|
488
|
+
count: z.ZodNumber;
|
|
489
|
+
firstSeen: z.ZodNullable<z.ZodString>;
|
|
490
|
+
lastSeen: z.ZodNullable<z.ZodString>;
|
|
491
|
+
sampleTraceId: z.ZodNullable<z.ZodString>;
|
|
492
|
+
service: z.ZodNullable<z.ZodString>;
|
|
493
|
+
}, z.core.$strip>>]>;
|
|
494
|
+
range: z.ZodObject<{
|
|
495
|
+
from: z.ZodString;
|
|
496
|
+
to: z.ZodString;
|
|
497
|
+
bucketSeconds: z.ZodNumber;
|
|
498
|
+
}, z.core.$strip>;
|
|
499
|
+
generatedAt: z.ZodString;
|
|
500
|
+
truncated: z.ZodBoolean;
|
|
501
|
+
sql: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
502
|
+
}, z.core.$strip>;
|
|
503
|
+
/**
|
|
504
|
+
* `GET …/dashboard/top`.
|
|
505
|
+
*
|
|
506
|
+
* @stability stable
|
|
507
|
+
*/
|
|
508
|
+
export type TelemetryDashboardTop = z.infer<typeof telemetryDashboardTopSchema>;
|
|
509
|
+
/**
|
|
510
|
+
* One log event: `timestamp` (full precision, UTC), `severity`, `service`,
|
|
511
|
+
* `body`, `traceId` and `spanId`.
|
|
512
|
+
*
|
|
513
|
+
* @extensionPoint schema
|
|
514
|
+
* @stability stable
|
|
515
|
+
*/
|
|
516
|
+
export declare const dashboardEventSchema: z.ZodObject<{
|
|
517
|
+
timestamp: z.ZodString;
|
|
518
|
+
severity: z.ZodString;
|
|
519
|
+
service: z.ZodNullable<z.ZodString>;
|
|
520
|
+
body: z.ZodNullable<z.ZodString>;
|
|
521
|
+
traceId: z.ZodNullable<z.ZodString>;
|
|
522
|
+
spanId: z.ZodNullable<z.ZodString>;
|
|
523
|
+
}, z.core.$strip>;
|
|
524
|
+
/**
|
|
525
|
+
* One log event.
|
|
526
|
+
*
|
|
527
|
+
* @stability stable
|
|
528
|
+
*/
|
|
529
|
+
export type TelemetryDashboardEvent = z.infer<typeof dashboardEventSchema>;
|
|
530
|
+
/**
|
|
531
|
+
* `GET …/dashboard/events`: the envelope plus `items` and `nextCursor`.
|
|
532
|
+
*
|
|
533
|
+
* @extensionPoint schema
|
|
534
|
+
* @stability stable
|
|
535
|
+
*/
|
|
536
|
+
export declare const telemetryDashboardEventsSchema: z.ZodObject<{
|
|
537
|
+
items: z.ZodArray<z.ZodObject<{
|
|
538
|
+
timestamp: z.ZodString;
|
|
539
|
+
severity: z.ZodString;
|
|
540
|
+
service: z.ZodNullable<z.ZodString>;
|
|
541
|
+
body: z.ZodNullable<z.ZodString>;
|
|
542
|
+
traceId: z.ZodNullable<z.ZodString>;
|
|
543
|
+
spanId: z.ZodNullable<z.ZodString>;
|
|
544
|
+
}, z.core.$strip>>;
|
|
545
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
546
|
+
range: z.ZodObject<{
|
|
547
|
+
from: z.ZodString;
|
|
548
|
+
to: z.ZodString;
|
|
549
|
+
bucketSeconds: z.ZodNumber;
|
|
550
|
+
}, z.core.$strip>;
|
|
551
|
+
generatedAt: z.ZodString;
|
|
552
|
+
truncated: z.ZodBoolean;
|
|
553
|
+
sql: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
554
|
+
}, z.core.$strip>;
|
|
555
|
+
/**
|
|
556
|
+
* `GET …/dashboard/events`.
|
|
557
|
+
*
|
|
558
|
+
* @stability stable
|
|
559
|
+
*/
|
|
560
|
+
export type TelemetryDashboardEvents = z.infer<typeof telemetryDashboardEventsSchema>;
|
|
561
|
+
/**
|
|
562
|
+
* `GET …/dashboard/filters`: the envelope plus the `services`, `instances`
|
|
563
|
+
* and `hosts` seen in the window.
|
|
564
|
+
*
|
|
565
|
+
* @extensionPoint schema
|
|
566
|
+
* @stability stable
|
|
567
|
+
*/
|
|
568
|
+
export declare const telemetryDashboardFiltersSchema: z.ZodObject<{
|
|
569
|
+
services: z.ZodArray<z.ZodString>;
|
|
570
|
+
instances: z.ZodArray<z.ZodString>;
|
|
571
|
+
hosts: z.ZodArray<z.ZodString>;
|
|
572
|
+
range: z.ZodObject<{
|
|
573
|
+
from: z.ZodString;
|
|
574
|
+
to: z.ZodString;
|
|
575
|
+
bucketSeconds: z.ZodNumber;
|
|
576
|
+
}, z.core.$strip>;
|
|
577
|
+
generatedAt: z.ZodString;
|
|
578
|
+
truncated: z.ZodBoolean;
|
|
579
|
+
sql: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
580
|
+
}, z.core.$strip>;
|
|
581
|
+
/**
|
|
582
|
+
* `GET …/dashboard/filters`.
|
|
583
|
+
*
|
|
584
|
+
* @stability stable
|
|
585
|
+
*/
|
|
586
|
+
export type TelemetryDashboardFilters = z.infer<typeof telemetryDashboardFiltersSchema>;
|
|
587
|
+
/**
|
|
588
|
+
* One point of a metric series: `t` (bucket start) and `v` (`null` where
|
|
589
|
+
* nothing was measured).
|
|
590
|
+
*
|
|
591
|
+
* @extensionPoint schema
|
|
592
|
+
* @stability stable
|
|
593
|
+
*/
|
|
594
|
+
export declare const metricPointSchema: z.ZodObject<{
|
|
595
|
+
t: z.ZodString;
|
|
596
|
+
v: z.ZodNullable<z.ZodNumber>;
|
|
597
|
+
}, z.core.$strip>;
|
|
598
|
+
/**
|
|
599
|
+
* One point of a metric series.
|
|
600
|
+
*
|
|
601
|
+
* @stability stable
|
|
602
|
+
*/
|
|
603
|
+
export type TelemetryDashboardMetricPoint = z.infer<typeof metricPointSchema>;
|
|
604
|
+
/**
|
|
605
|
+
* One metric series: `key`, `label`, `unit`, `dimension`, `groupBy` and
|
|
606
|
+
* `points` (one per bucket).
|
|
607
|
+
*
|
|
608
|
+
* @extensionPoint schema
|
|
609
|
+
* @stability stable
|
|
610
|
+
*/
|
|
611
|
+
export declare const metricSeriesSchema: z.ZodObject<{
|
|
612
|
+
key: z.ZodString;
|
|
613
|
+
label: z.ZodString;
|
|
614
|
+
unit: z.ZodEnum<import("./constants.js").TelemetryEnumEntries<"boolean" | "text" | "timestamp" | "%" | "bytes" | "bytes/s" | "count" | "per_s" | "per_min" | "ms" | "seconds" | "hours" | "days" | "cores" | "load">>;
|
|
615
|
+
dimension: z.ZodNullable<z.ZodString>;
|
|
616
|
+
groupBy: z.ZodNullable<z.ZodString>;
|
|
617
|
+
points: z.ZodArray<z.ZodObject<{
|
|
618
|
+
t: z.ZodString;
|
|
619
|
+
v: z.ZodNullable<z.ZodNumber>;
|
|
620
|
+
}, z.core.$strip>>;
|
|
621
|
+
}, z.core.$strip>;
|
|
622
|
+
/**
|
|
623
|
+
* One metric series.
|
|
624
|
+
*
|
|
625
|
+
* @stability stable
|
|
626
|
+
*/
|
|
627
|
+
export type TelemetryDashboardMetricSeries = z.infer<typeof metricSeriesSchema>;
|
|
628
|
+
/**
|
|
629
|
+
* One column of a metric table: `key`, `label` and `unit`.
|
|
630
|
+
*
|
|
631
|
+
* @extensionPoint schema
|
|
632
|
+
* @stability stable
|
|
633
|
+
*/
|
|
634
|
+
export declare const metricColumnSchema: z.ZodObject<{
|
|
635
|
+
key: z.ZodString;
|
|
636
|
+
label: z.ZodString;
|
|
637
|
+
unit: z.ZodEnum<import("./constants.js").TelemetryEnumEntries<"boolean" | "text" | "timestamp" | "%" | "bytes" | "bytes/s" | "count" | "per_s" | "per_min" | "ms" | "seconds" | "hours" | "days" | "cores" | "load">>;
|
|
638
|
+
}, z.core.$strip>;
|
|
639
|
+
/**
|
|
640
|
+
* One column of a metric table.
|
|
641
|
+
*
|
|
642
|
+
* @stability stable
|
|
643
|
+
*/
|
|
644
|
+
export type TelemetryDashboardMetricColumn = z.infer<typeof metricColumnSchema>;
|
|
645
|
+
/**
|
|
646
|
+
* One cell of a metric table row: a string, number, boolean or `null`.
|
|
647
|
+
*
|
|
648
|
+
* @extensionPoint schema
|
|
649
|
+
* @stability stable
|
|
650
|
+
*/
|
|
651
|
+
export declare const metricCellSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
652
|
+
/**
|
|
653
|
+
* One cell of a metric table row.
|
|
654
|
+
*
|
|
655
|
+
* @stability stable
|
|
656
|
+
*/
|
|
657
|
+
export type TelemetryDashboardMetricCell = z.infer<typeof metricCellSchema>;
|
|
658
|
+
/**
|
|
659
|
+
* One per-key metric table: `key`, `label`, `columns` and `rows`.
|
|
660
|
+
*
|
|
661
|
+
* @extensionPoint schema
|
|
662
|
+
* @stability stable
|
|
663
|
+
*/
|
|
664
|
+
export declare const metricTableSchema: z.ZodObject<{
|
|
665
|
+
key: z.ZodString;
|
|
666
|
+
label: z.ZodString;
|
|
667
|
+
columns: z.ZodArray<z.ZodObject<{
|
|
668
|
+
key: z.ZodString;
|
|
669
|
+
label: z.ZodString;
|
|
670
|
+
unit: z.ZodEnum<import("./constants.js").TelemetryEnumEntries<"boolean" | "text" | "timestamp" | "%" | "bytes" | "bytes/s" | "count" | "per_s" | "per_min" | "ms" | "seconds" | "hours" | "days" | "cores" | "load">>;
|
|
671
|
+
}, z.core.$strip>>;
|
|
672
|
+
rows: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
|
|
673
|
+
}, z.core.$strip>;
|
|
674
|
+
/**
|
|
675
|
+
* One per-key metric table.
|
|
676
|
+
*
|
|
677
|
+
* @stability stable
|
|
678
|
+
*/
|
|
679
|
+
export type TelemetryDashboardMetricTable = z.infer<typeof metricTableSchema>;
|
|
680
|
+
/**
|
|
681
|
+
* Builds the `GET …/dashboard/metrics` response schema around a `group`
|
|
682
|
+
* schema: `range`, `generatedAt`, `truncated`, `sql`, `group`, `available`,
|
|
683
|
+
* `tiles`, `series`, `tables`, `skipped` and the optional `freshMs`.
|
|
684
|
+
*
|
|
685
|
+
* @extensionPoint schema
|
|
686
|
+
* @stability stable
|
|
687
|
+
*/
|
|
688
|
+
export declare function createTelemetryDashboardMetricsSchema<G extends z.ZodType<string>>(group: G): z.ZodObject<{
|
|
689
|
+
range: z.ZodObject<{
|
|
690
|
+
from: z.ZodString;
|
|
691
|
+
to: z.ZodString;
|
|
692
|
+
bucketSeconds: z.ZodNumber;
|
|
693
|
+
}, z.core.$strip>;
|
|
694
|
+
generatedAt: z.ZodString;
|
|
695
|
+
truncated: z.ZodBoolean;
|
|
696
|
+
sql: z.ZodArray<z.ZodString>;
|
|
697
|
+
group: G;
|
|
698
|
+
available: z.ZodBoolean;
|
|
699
|
+
tiles: z.ZodArray<z.ZodObject<{
|
|
700
|
+
key: z.ZodString;
|
|
701
|
+
label: z.ZodString;
|
|
702
|
+
value: z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
703
|
+
previous: z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
704
|
+
unit: z.ZodString;
|
|
705
|
+
sparkline: z.ZodArray<z.ZodNullable<z.ZodNumber>>;
|
|
706
|
+
}, z.core.$strip>>;
|
|
707
|
+
series: z.ZodArray<z.ZodObject<{
|
|
708
|
+
key: z.ZodString;
|
|
709
|
+
label: z.ZodString;
|
|
710
|
+
unit: z.ZodEnum<import("./constants.js").TelemetryEnumEntries<"boolean" | "text" | "timestamp" | "%" | "bytes" | "bytes/s" | "count" | "per_s" | "per_min" | "ms" | "seconds" | "hours" | "days" | "cores" | "load">>;
|
|
711
|
+
dimension: z.ZodNullable<z.ZodString>;
|
|
712
|
+
groupBy: z.ZodNullable<z.ZodString>;
|
|
713
|
+
points: z.ZodArray<z.ZodObject<{
|
|
714
|
+
t: z.ZodString;
|
|
715
|
+
v: z.ZodNullable<z.ZodNumber>;
|
|
716
|
+
}, z.core.$strip>>;
|
|
717
|
+
}, z.core.$strip>>;
|
|
718
|
+
tables: z.ZodArray<z.ZodObject<{
|
|
719
|
+
key: z.ZodString;
|
|
720
|
+
label: z.ZodString;
|
|
721
|
+
columns: z.ZodArray<z.ZodObject<{
|
|
722
|
+
key: z.ZodString;
|
|
723
|
+
label: z.ZodString;
|
|
724
|
+
unit: z.ZodEnum<import("./constants.js").TelemetryEnumEntries<"boolean" | "text" | "timestamp" | "%" | "bytes" | "bytes/s" | "count" | "per_s" | "per_min" | "ms" | "seconds" | "hours" | "days" | "cores" | "load">>;
|
|
725
|
+
}, z.core.$strip>>;
|
|
726
|
+
rows: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
|
|
727
|
+
}, z.core.$strip>>;
|
|
728
|
+
skipped: z.ZodArray<z.ZodString>;
|
|
729
|
+
freshMs: z.ZodOptional<z.ZodNumber>;
|
|
730
|
+
}, z.core.$strip>;
|
|
731
|
+
/**
|
|
732
|
+
* `GET …/dashboard/metrics`, with `group` any metric group id
|
|
733
|
+
* ({@link metricGroupIdSchema}).
|
|
734
|
+
*
|
|
735
|
+
* @extensionPoint schema
|
|
736
|
+
* @stability stable
|
|
737
|
+
*/
|
|
738
|
+
export declare const telemetryDashboardMetricsSchema: z.ZodObject<{
|
|
739
|
+
range: z.ZodObject<{
|
|
740
|
+
from: z.ZodString;
|
|
741
|
+
to: z.ZodString;
|
|
742
|
+
bucketSeconds: z.ZodNumber;
|
|
743
|
+
}, z.core.$strip>;
|
|
744
|
+
generatedAt: z.ZodString;
|
|
745
|
+
truncated: z.ZodBoolean;
|
|
746
|
+
sql: z.ZodArray<z.ZodString>;
|
|
747
|
+
group: z.ZodString;
|
|
748
|
+
available: z.ZodBoolean;
|
|
749
|
+
tiles: z.ZodArray<z.ZodObject<{
|
|
750
|
+
key: z.ZodString;
|
|
751
|
+
label: z.ZodString;
|
|
752
|
+
value: z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
753
|
+
previous: z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
754
|
+
unit: z.ZodString;
|
|
755
|
+
sparkline: z.ZodArray<z.ZodNullable<z.ZodNumber>>;
|
|
756
|
+
}, z.core.$strip>>;
|
|
757
|
+
series: z.ZodArray<z.ZodObject<{
|
|
758
|
+
key: z.ZodString;
|
|
759
|
+
label: z.ZodString;
|
|
760
|
+
unit: z.ZodEnum<import("./constants.js").TelemetryEnumEntries<"boolean" | "text" | "timestamp" | "%" | "bytes" | "bytes/s" | "count" | "per_s" | "per_min" | "ms" | "seconds" | "hours" | "days" | "cores" | "load">>;
|
|
761
|
+
dimension: z.ZodNullable<z.ZodString>;
|
|
762
|
+
groupBy: z.ZodNullable<z.ZodString>;
|
|
763
|
+
points: z.ZodArray<z.ZodObject<{
|
|
764
|
+
t: z.ZodString;
|
|
765
|
+
v: z.ZodNullable<z.ZodNumber>;
|
|
766
|
+
}, z.core.$strip>>;
|
|
767
|
+
}, z.core.$strip>>;
|
|
768
|
+
tables: z.ZodArray<z.ZodObject<{
|
|
769
|
+
key: z.ZodString;
|
|
770
|
+
label: z.ZodString;
|
|
771
|
+
columns: z.ZodArray<z.ZodObject<{
|
|
772
|
+
key: z.ZodString;
|
|
773
|
+
label: z.ZodString;
|
|
774
|
+
unit: z.ZodEnum<import("./constants.js").TelemetryEnumEntries<"boolean" | "text" | "timestamp" | "%" | "bytes" | "bytes/s" | "count" | "per_s" | "per_min" | "ms" | "seconds" | "hours" | "days" | "cores" | "load">>;
|
|
775
|
+
}, z.core.$strip>>;
|
|
776
|
+
rows: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
|
|
777
|
+
}, z.core.$strip>>;
|
|
778
|
+
skipped: z.ZodArray<z.ZodString>;
|
|
779
|
+
freshMs: z.ZodOptional<z.ZodNumber>;
|
|
780
|
+
}, z.core.$strip>;
|
|
781
|
+
/**
|
|
782
|
+
* `GET …/dashboard/metrics`.
|
|
783
|
+
*
|
|
784
|
+
* @stability stable
|
|
785
|
+
*/
|
|
786
|
+
export type TelemetryDashboardMetrics = z.infer<typeof telemetryDashboardMetricsSchema>;
|
|
787
|
+
/**
|
|
788
|
+
* One registered metric group: `id`, `label`, `title` and `order`.
|
|
789
|
+
*
|
|
790
|
+
* @extensionPoint schema
|
|
791
|
+
* @stability stable
|
|
792
|
+
*/
|
|
793
|
+
export declare const telemetryDashboardMetricGroupSchema: z.ZodObject<{
|
|
794
|
+
id: z.ZodString;
|
|
795
|
+
label: z.ZodString;
|
|
796
|
+
title: z.ZodString;
|
|
797
|
+
order: z.ZodNumber;
|
|
798
|
+
}, z.core.$strip>;
|
|
799
|
+
/**
|
|
800
|
+
* One registered metric group.
|
|
801
|
+
*
|
|
802
|
+
* @stability stable
|
|
803
|
+
*/
|
|
804
|
+
export type TelemetryDashboardMetricGroup = z.infer<typeof telemetryDashboardMetricGroupSchema>;
|
|
805
|
+
/**
|
|
806
|
+
* `GET …/dashboard/metric-groups`: `data`, every registered group in
|
|
807
|
+
* dashboard order.
|
|
808
|
+
*
|
|
809
|
+
* @extensionPoint schema
|
|
810
|
+
* @stability stable
|
|
811
|
+
*/
|
|
812
|
+
export declare const telemetryDashboardMetricGroupsSchema: z.ZodObject<{
|
|
813
|
+
data: z.ZodArray<z.ZodObject<{
|
|
814
|
+
id: z.ZodString;
|
|
815
|
+
label: z.ZodString;
|
|
816
|
+
title: z.ZodString;
|
|
817
|
+
order: z.ZodNumber;
|
|
818
|
+
}, z.core.$strip>>;
|
|
819
|
+
}, z.core.$strip>;
|
|
820
|
+
/**
|
|
821
|
+
* `GET …/dashboard/metric-groups`.
|
|
822
|
+
*
|
|
823
|
+
* @stability stable
|
|
824
|
+
*/
|
|
825
|
+
export type TelemetryDashboardMetricGroups = z.infer<typeof telemetryDashboardMetricGroupsSchema>;
|
|
826
|
+
//# sourceMappingURL=dashboard.d.ts.map
|