@ancplua/qyl-api-schema 0.5.14 → 0.6.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/api/routes.tsp +151 -50
- package/api/runner.tsp +711 -31
- package/generated/json-schema/qyl-api-schema.json +6761 -2704
- package/generated/openapi/qyl.openapi.json +17761 -4035
- package/generated/ts-runtime/api.d.ts +953 -143
- package/generated/ts-runtime/api.js +143 -20
- package/index.tsp +1 -0
- package/models/cost-etl-audit.tsp +592 -80
- package/models/runner-mcp.tsp +990 -141
- package/models/runner.tsp +7 -7
- package/otel/enums.tsp +0 -3
- package/otel/metrics.tsp +215 -0
- package/otel/otel-conventions.tsp +1 -0
- package/package.json +3 -2
package/api/routes.tsp
CHANGED
|
@@ -6,6 +6,7 @@ import "../common/errors.tsp";
|
|
|
6
6
|
import "../common/pagination.tsp";
|
|
7
7
|
import "../otel/span.tsp";
|
|
8
8
|
import "../otel/logs.tsp";
|
|
9
|
+
import "../otel/metrics.tsp";
|
|
9
10
|
import "../otel/profiles.tsp";
|
|
10
11
|
import "../models/session.tsp";
|
|
11
12
|
import "../models/health.tsp";
|
|
@@ -19,6 +20,7 @@ using Qyl.Api.Contracts.Common.Errors;
|
|
|
19
20
|
using Qyl.Api.Contracts.Common.Pagination;
|
|
20
21
|
using Qyl.Api.Contracts.OTel.Traces;
|
|
21
22
|
using Qyl.Api.Contracts.OTel.Logs;
|
|
23
|
+
using Qyl.Api.Contracts.OTel.Metrics;
|
|
22
24
|
using Qyl.Api.Contracts.OTel.Enums;
|
|
23
25
|
using Qyl.Api.Contracts.OTel.Profiles;
|
|
24
26
|
using Qyl.Api.Contracts.Domains.Observe.Session;
|
|
@@ -47,23 +49,34 @@ interface TracesApi {
|
|
|
47
49
|
@get
|
|
48
50
|
list(
|
|
49
51
|
...ProjectScopeHeader,
|
|
50
|
-
|
|
52
|
+
|
|
53
|
+
@query
|
|
54
|
+
@minValue(1)
|
|
55
|
+
@maxValue(1000)
|
|
56
|
+
limit?: int32 = 100,
|
|
57
|
+
|
|
51
58
|
@query cursor?: string,
|
|
52
|
-
):
|
|
59
|
+
):
|
|
60
|
+
| CursorPage<Trace>
|
|
61
|
+
| ValidationError
|
|
62
|
+
| UnauthorizedError
|
|
63
|
+
| InternalServerError;
|
|
53
64
|
|
|
54
65
|
@get
|
|
55
66
|
@route("/{traceId}")
|
|
56
|
-
get(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
67
|
+
get(...ProjectScopeHeader, @path traceId: TraceId):
|
|
68
|
+
| Trace
|
|
69
|
+
| NotFoundError
|
|
70
|
+
| UnauthorizedError
|
|
71
|
+
| InternalServerError;
|
|
60
72
|
|
|
61
73
|
@get
|
|
62
74
|
@route("/{traceId}/spans")
|
|
63
|
-
getSpans(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
75
|
+
getSpans(...ProjectScopeHeader, @path traceId: TraceId):
|
|
76
|
+
| CursorPage<Span>
|
|
77
|
+
| NotFoundError
|
|
78
|
+
| UnauthorizedError
|
|
79
|
+
| InternalServerError;
|
|
67
80
|
}
|
|
68
81
|
|
|
69
82
|
// -----------------------------------------------------------------------------
|
|
@@ -85,8 +98,47 @@ interface LogsApi {
|
|
|
85
98
|
@query startTime?: utcDateTime,
|
|
86
99
|
@query endTime?: utcDateTime,
|
|
87
100
|
@query query?: string,
|
|
88
|
-
|
|
89
|
-
|
|
101
|
+
|
|
102
|
+
@query
|
|
103
|
+
@minValue(1)
|
|
104
|
+
@maxValue(10000)
|
|
105
|
+
limit?: int32 = 100,
|
|
106
|
+
):
|
|
107
|
+
| CursorPage<LogRecord>
|
|
108
|
+
| ValidationError
|
|
109
|
+
| UnauthorizedError
|
|
110
|
+
| InternalServerError;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// -----------------------------------------------------------------------------
|
|
114
|
+
// Metrics
|
|
115
|
+
// -----------------------------------------------------------------------------
|
|
116
|
+
|
|
117
|
+
@route("/api/v1/metrics")
|
|
118
|
+
@tag("Metrics")
|
|
119
|
+
@useAuth(QylApiKeyHeaderAuth)
|
|
120
|
+
interface MetricsApi {
|
|
121
|
+
@doc("List persisted OTLP metric data points without re-aggregating producer values.")
|
|
122
|
+
@get
|
|
123
|
+
list(
|
|
124
|
+
...ProjectScopeHeader,
|
|
125
|
+
@query name?: string,
|
|
126
|
+
@query type?: MetricType,
|
|
127
|
+
@query serviceName?: string,
|
|
128
|
+
@query startTime?: utcDateTime,
|
|
129
|
+
@query endTime?: utcDateTime,
|
|
130
|
+
|
|
131
|
+
@query
|
|
132
|
+
@minValue(1)
|
|
133
|
+
@maxValue(1000)
|
|
134
|
+
limit?: int32 = 100,
|
|
135
|
+
|
|
136
|
+
@query cursor?: string,
|
|
137
|
+
):
|
|
138
|
+
| CursorPage<MetricPoint>
|
|
139
|
+
| ValidationError
|
|
140
|
+
| UnauthorizedError
|
|
141
|
+
| InternalServerError;
|
|
90
142
|
}
|
|
91
143
|
|
|
92
144
|
// -----------------------------------------------------------------------------
|
|
@@ -104,22 +156,31 @@ interface ProfilesApi {
|
|
|
104
156
|
@query traceId?: TraceId,
|
|
105
157
|
@query serviceName?: string,
|
|
106
158
|
@query sampleType?: string,
|
|
107
|
-
|
|
159
|
+
|
|
160
|
+
@query
|
|
161
|
+
@minValue(1)
|
|
162
|
+
@maxValue(1000)
|
|
163
|
+
limit?: int32 = 100,
|
|
108
164
|
): Profile[] | ValidationError | UnauthorizedError | InternalServerError;
|
|
109
165
|
|
|
110
166
|
@get
|
|
111
167
|
@route("/{profileId}")
|
|
112
|
-
get(
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
168
|
+
get(...ProjectScopeHeader, @path profileId: string):
|
|
169
|
+
| Profile
|
|
170
|
+
| NotFoundError
|
|
171
|
+
| UnauthorizedError
|
|
172
|
+
| InternalServerError;
|
|
116
173
|
|
|
117
174
|
@get
|
|
118
175
|
@route("/by-trace/{traceId}")
|
|
119
176
|
getByTrace(
|
|
120
177
|
...ProjectScopeHeader,
|
|
121
178
|
@path traceId: TraceId,
|
|
122
|
-
|
|
179
|
+
|
|
180
|
+
@query
|
|
181
|
+
@minValue(1)
|
|
182
|
+
@maxValue(1000)
|
|
183
|
+
limit?: int32 = 100,
|
|
123
184
|
): Profile[] | ValidationError | UnauthorizedError | InternalServerError;
|
|
124
185
|
|
|
125
186
|
@get
|
|
@@ -127,7 +188,11 @@ interface ProfilesApi {
|
|
|
127
188
|
getBySpan(
|
|
128
189
|
...ProjectScopeHeader,
|
|
129
190
|
@path spanId: SpanId,
|
|
130
|
-
|
|
191
|
+
|
|
192
|
+
@query
|
|
193
|
+
@minValue(1)
|
|
194
|
+
@maxValue(1000)
|
|
195
|
+
limit?: int32 = 100,
|
|
131
196
|
): Profile[] | ValidationError | UnauthorizedError | InternalServerError;
|
|
132
197
|
}
|
|
133
198
|
|
|
@@ -145,23 +210,34 @@ interface SessionsApi {
|
|
|
145
210
|
@query isActive?: boolean,
|
|
146
211
|
@query startTime?: utcDateTime,
|
|
147
212
|
@query endTime?: utcDateTime,
|
|
148
|
-
|
|
213
|
+
|
|
214
|
+
@query
|
|
215
|
+
@minValue(1)
|
|
216
|
+
@maxValue(1000)
|
|
217
|
+
limit?: int32 = 100,
|
|
218
|
+
|
|
149
219
|
@query cursor?: string,
|
|
150
|
-
):
|
|
220
|
+
):
|
|
221
|
+
| CursorPage<SessionEntity>
|
|
222
|
+
| ValidationError
|
|
223
|
+
| UnauthorizedError
|
|
224
|
+
| InternalServerError;
|
|
151
225
|
|
|
152
226
|
@get
|
|
153
227
|
@route("/{sessionId}")
|
|
154
|
-
get(
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
228
|
+
get(...ProjectScopeHeader, @path sessionId: SessionId):
|
|
229
|
+
| SessionEntity
|
|
230
|
+
| NotFoundError
|
|
231
|
+
| UnauthorizedError
|
|
232
|
+
| InternalServerError;
|
|
158
233
|
|
|
159
234
|
@get
|
|
160
235
|
@route("/{sessionId}/traces")
|
|
161
|
-
getTraces(
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
236
|
+
getTraces(...ProjectScopeHeader, @path sessionId: SessionId):
|
|
237
|
+
| CursorPage<Trace>
|
|
238
|
+
| NotFoundError
|
|
239
|
+
| UnauthorizedError
|
|
240
|
+
| InternalServerError;
|
|
165
241
|
|
|
166
242
|
@get
|
|
167
243
|
@route("/stats")
|
|
@@ -183,23 +259,44 @@ interface GenAiEtlAuditApi {
|
|
|
183
259
|
@get
|
|
184
260
|
report(
|
|
185
261
|
...ProjectScopeHeader,
|
|
262
|
+
|
|
186
263
|
@doc("Optional audit-period start. Omitted dates select the previous 30 completed UTC days; an explicit range may not exceed 180 days.")
|
|
187
|
-
@query
|
|
264
|
+
@query
|
|
265
|
+
startTime?: utcDateTime,
|
|
266
|
+
|
|
188
267
|
@doc("Optional audit-period end. Omitted dates select the previous 30 completed UTC days; an explicit range may not exceed 180 days.")
|
|
189
|
-
@query
|
|
190
|
-
|
|
191
|
-
|
|
268
|
+
@query
|
|
269
|
+
endTime?: utcDateTime,
|
|
270
|
+
|
|
271
|
+
@query
|
|
272
|
+
@minValue(1)
|
|
273
|
+
@maxValue(100)
|
|
274
|
+
limit?: int32 = 25,
|
|
275
|
+
):
|
|
276
|
+
| GenAiEtlAuditReport
|
|
277
|
+
| ValidationError
|
|
278
|
+
| UnauthorizedError
|
|
279
|
+
| InternalServerError;
|
|
192
280
|
|
|
193
281
|
@post
|
|
194
282
|
@route("/evaluate")
|
|
195
283
|
evaluate(
|
|
196
284
|
...ProjectScopeHeader,
|
|
285
|
+
|
|
197
286
|
@doc("Optional audit-period start. Omitted dates select the previous 30 completed UTC days; an explicit range may not exceed 180 days.")
|
|
198
|
-
@query
|
|
287
|
+
@query
|
|
288
|
+
startTime?: utcDateTime,
|
|
289
|
+
|
|
199
290
|
@doc("Optional audit-period end. Omitted dates select the previous 30 completed UTC days; an explicit range may not exceed 180 days.")
|
|
200
|
-
@query
|
|
291
|
+
@query
|
|
292
|
+
endTime?: utcDateTime,
|
|
293
|
+
|
|
201
294
|
@body request: GenAiEtlAuditEvaluationRequest,
|
|
202
|
-
):
|
|
295
|
+
):
|
|
296
|
+
| GenAiEtlAuditEvaluationResponse
|
|
297
|
+
| ValidationError
|
|
298
|
+
| UnauthorizedError
|
|
299
|
+
| InternalServerError;
|
|
203
300
|
}
|
|
204
301
|
|
|
205
302
|
// -----------------------------------------------------------------------------
|
|
@@ -211,22 +308,26 @@ interface HealthApi {
|
|
|
211
308
|
@get
|
|
212
309
|
@route("/alive")
|
|
213
310
|
@operationId("health_alive")
|
|
214
|
-
alive():
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
311
|
+
alive():
|
|
312
|
+
| {
|
|
313
|
+
@statusCode statusCode: 200;
|
|
314
|
+
@body body: HealthReport;
|
|
315
|
+
}
|
|
316
|
+
| {
|
|
317
|
+
@statusCode statusCode: 503;
|
|
318
|
+
@body body: HealthReport;
|
|
319
|
+
};
|
|
221
320
|
|
|
222
321
|
@get
|
|
223
322
|
@route("/health")
|
|
224
323
|
@operationId("health_ready")
|
|
225
|
-
ready():
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
324
|
+
ready():
|
|
325
|
+
| {
|
|
326
|
+
@statusCode statusCode: 200;
|
|
327
|
+
@body body: HealthReport;
|
|
328
|
+
}
|
|
329
|
+
| {
|
|
330
|
+
@statusCode statusCode: 503;
|
|
331
|
+
@body body: HealthReport;
|
|
332
|
+
};
|
|
232
333
|
}
|