@ancplua/qyl-api-schema 0.6.1 → 1.0.2
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/README.md +4 -2
- package/api/runner.tsp +48 -0
- package/common/types.tsp +59 -6
- package/generated/json-schema/qyl-api-schema.json +269 -33
- package/generated/openapi/qyl.openapi.json +882 -63
- package/generated/ts-runtime/api.d.ts +33 -14
- package/otel/logs.tsp +1 -1
- package/otel/metrics.tsp +35 -13
- package/otel/resource.tsp +4 -0
- package/package.json +1 -1
|
@@ -577,10 +577,13 @@ export declare const GenAiEtlFrontierCostBasisValues: {
|
|
|
577
577
|
readonly unavailable: "unavailable";
|
|
578
578
|
};
|
|
579
579
|
export type GenAiEtlFrontierCostBasis = typeof GenAiEtlFrontierCostBasisValues[keyof typeof GenAiEtlFrontierCostBasisValues];
|
|
580
|
-
export type
|
|
580
|
+
export type AttributeDouble = number | "NaN" | "Infinity" | "-Infinity";
|
|
581
|
+
export type AttributeValue = null | string | boolean | AttributeIntValue | AttributeDoubleValue | AttributeBytesValue | AttributeValue[] | AttributeKeyValueListValue;
|
|
581
582
|
export type ApiError = NotFoundError | ValidationError | UnauthorizedError | ForbiddenError | ConflictError | RateLimitError | InternalServerError | BadGatewayError | ServiceUnavailableError;
|
|
582
583
|
export type LogBody = LogBodyString | LogBodyKvList | LogBodyArray | LogBodyBytes;
|
|
584
|
+
export type MetricDouble = number | "NaN" | "Infinity" | "-Infinity";
|
|
583
585
|
export type MetricNumberValue = MetricIntegerValue | MetricDoubleValue;
|
|
586
|
+
export type SummaryQuantileDouble = number | "Infinity";
|
|
584
587
|
export type MetricPoint = GaugeMetricPoint | SumMetricPoint | HistogramMetricPoint | ExponentialHistogramMetricPoint | SummaryMetricPoint;
|
|
585
588
|
export type RunnerMcpServerConfiguration = RunnerMcpStdioServerConfiguration | RunnerMcpStreamableHttpServerConfiguration | RunnerMcpSseServerConfiguration | RunnerMcpInProcessServerConfiguration | RunnerMcpBuiltinServerConfiguration;
|
|
586
589
|
export type RunnerMcpTestAssertion = RunnerMcpStatusAssertion | RunnerMcpExactAssertion | RunnerMcpPartialAssertion | RunnerMcpSchemaAssertion | RunnerMcpPatternAssertion | RunnerMcpLatencyAssertion;
|
|
@@ -599,8 +602,17 @@ export interface AttributeBytesValue {
|
|
|
599
602
|
"type": "bytes";
|
|
600
603
|
"base64": string;
|
|
601
604
|
}
|
|
605
|
+
export interface AttributeIntValue {
|
|
606
|
+
"type": "int";
|
|
607
|
+
"value": string;
|
|
608
|
+
}
|
|
609
|
+
export interface AttributeDoubleValue {
|
|
610
|
+
"type": "double";
|
|
611
|
+
"value": AttributeDouble;
|
|
612
|
+
}
|
|
602
613
|
export interface AttributeKeyValueListValue {
|
|
603
|
-
|
|
614
|
+
"type": "kvlist";
|
|
615
|
+
"values": Record<string, AttributeValue>;
|
|
604
616
|
}
|
|
605
617
|
export interface Attribute {
|
|
606
618
|
"key": string;
|
|
@@ -609,6 +621,12 @@ export interface Attribute {
|
|
|
609
621
|
export interface Attributes {
|
|
610
622
|
"items": Attribute[];
|
|
611
623
|
}
|
|
624
|
+
export interface EntityRef {
|
|
625
|
+
"schema_url"?: string;
|
|
626
|
+
"type": string;
|
|
627
|
+
"id_keys": string[];
|
|
628
|
+
"description_keys"?: string[];
|
|
629
|
+
}
|
|
612
630
|
export interface InstrumentationScope {
|
|
613
631
|
"name": string;
|
|
614
632
|
"version"?: string;
|
|
@@ -727,6 +745,7 @@ export interface Resource {
|
|
|
727
745
|
"k8s.deployment.name"?: string;
|
|
728
746
|
"attributes"?: Attribute[];
|
|
729
747
|
"dropped_attributes_count"?: number;
|
|
748
|
+
"entity_refs"?: EntityRef[];
|
|
730
749
|
}
|
|
731
750
|
export interface Span {
|
|
732
751
|
"span_id": SpanId;
|
|
@@ -846,7 +865,7 @@ export interface MetricIntegerValue {
|
|
|
846
865
|
"as_int": string;
|
|
847
866
|
}
|
|
848
867
|
export interface MetricDoubleValue {
|
|
849
|
-
"as_double":
|
|
868
|
+
"as_double": MetricDouble;
|
|
850
869
|
}
|
|
851
870
|
export interface MetricExemplar {
|
|
852
871
|
"time_unix_nano": string;
|
|
@@ -861,7 +880,7 @@ export interface ExponentialHistogramBuckets {
|
|
|
861
880
|
}
|
|
862
881
|
export interface SummaryQuantileValue {
|
|
863
882
|
"quantile": number;
|
|
864
|
-
"value":
|
|
883
|
+
"value": SummaryQuantileDouble;
|
|
865
884
|
}
|
|
866
885
|
export interface MetricPointBase {
|
|
867
886
|
"name": string;
|
|
@@ -879,12 +898,12 @@ export interface MetricPointBase {
|
|
|
879
898
|
}
|
|
880
899
|
export interface GaugeMetricPoint extends MetricPointBase {
|
|
881
900
|
"type": "gauge";
|
|
882
|
-
"value"
|
|
901
|
+
"value"?: MetricNumberValue;
|
|
883
902
|
"exemplars"?: MetricExemplar[];
|
|
884
903
|
}
|
|
885
904
|
export interface SumMetricPoint extends MetricPointBase {
|
|
886
905
|
"type": "sum";
|
|
887
|
-
"value"
|
|
906
|
+
"value"?: MetricNumberValue;
|
|
888
907
|
"aggregation_temporality": AggregationTemporality;
|
|
889
908
|
"is_monotonic": boolean;
|
|
890
909
|
"exemplars"?: MetricExemplar[];
|
|
@@ -892,32 +911,32 @@ export interface SumMetricPoint extends MetricPointBase {
|
|
|
892
911
|
export interface HistogramMetricPoint extends MetricPointBase {
|
|
893
912
|
"type": "histogram";
|
|
894
913
|
"count": string;
|
|
895
|
-
"sum"?:
|
|
914
|
+
"sum"?: MetricDouble;
|
|
896
915
|
"bucket_counts": string[];
|
|
897
916
|
"explicit_bounds": number[];
|
|
898
|
-
"min"?:
|
|
899
|
-
"max"?:
|
|
917
|
+
"min"?: MetricDouble;
|
|
918
|
+
"max"?: MetricDouble;
|
|
900
919
|
"aggregation_temporality": AggregationTemporality;
|
|
901
920
|
"exemplars"?: MetricExemplar[];
|
|
902
921
|
}
|
|
903
922
|
export interface ExponentialHistogramMetricPoint extends MetricPointBase {
|
|
904
923
|
"type": "exponential_histogram";
|
|
905
924
|
"count": string;
|
|
906
|
-
"sum"?:
|
|
925
|
+
"sum"?: MetricDouble;
|
|
907
926
|
"scale": number;
|
|
908
927
|
"zero_count": string;
|
|
909
|
-
"zero_threshold":
|
|
928
|
+
"zero_threshold": MetricDouble;
|
|
910
929
|
"positive": ExponentialHistogramBuckets;
|
|
911
930
|
"negative": ExponentialHistogramBuckets;
|
|
912
|
-
"min"?:
|
|
913
|
-
"max"?:
|
|
931
|
+
"min"?: MetricDouble;
|
|
932
|
+
"max"?: MetricDouble;
|
|
914
933
|
"aggregation_temporality": AggregationTemporality;
|
|
915
934
|
"exemplars"?: MetricExemplar[];
|
|
916
935
|
}
|
|
917
936
|
export interface SummaryMetricPoint extends MetricPointBase {
|
|
918
937
|
"type": "summary";
|
|
919
938
|
"count": string;
|
|
920
|
-
"sum":
|
|
939
|
+
"sum": MetricDouble;
|
|
921
940
|
"quantile_values": SummaryQuantileValue[];
|
|
922
941
|
}
|
|
923
942
|
export interface Profile {
|
package/otel/logs.tsp
CHANGED
|
@@ -61,7 +61,7 @@ model LogRecord {
|
|
|
61
61
|
@encodedName("application/json", "span_id")
|
|
62
62
|
spanId?: SpanId;
|
|
63
63
|
|
|
64
|
-
@doc("
|
|
64
|
+
@doc("Optional event category whose presence identifies this log record as an event; records with the same name are expected to share one body and attribute schema.")
|
|
65
65
|
@encodedName("application/json", "event_name")
|
|
66
66
|
eventName?: string;
|
|
67
67
|
|
package/otel/metrics.tsp
CHANGED
|
@@ -38,6 +38,24 @@ scalar MetricUnixNanos extends uint64;
|
|
|
38
38
|
@TypeSpec.OpenAPI.extension("x-csharp-type", "ulong")
|
|
39
39
|
scalar MetricStartUnixNanos extends uint64;
|
|
40
40
|
|
|
41
|
+
@doc("An OTLP double encoded as a JSON number when finite or as a canonical named string when non-finite.")
|
|
42
|
+
union MetricDouble {
|
|
43
|
+
finite: float64,
|
|
44
|
+
nan: "NaN",
|
|
45
|
+
positiveInfinity: "Infinity",
|
|
46
|
+
negativeInfinity: "-Infinity",
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@doc("A finite, non-negative value observed at an OTLP summary quantile.")
|
|
50
|
+
@minValue(0)
|
|
51
|
+
scalar SummaryQuantileFiniteValue extends float64;
|
|
52
|
+
|
|
53
|
+
@doc("A non-negative OTLP summary quantile value, including canonical positive infinity.")
|
|
54
|
+
union SummaryQuantileDouble {
|
|
55
|
+
finite: SummaryQuantileFiniteValue,
|
|
56
|
+
positiveInfinity: "Infinity",
|
|
57
|
+
}
|
|
58
|
+
|
|
41
59
|
@doc("An integer measurement value from an OTLP number data point or exemplar.")
|
|
42
60
|
model MetricIntegerValue {
|
|
43
61
|
@encodedName("application/json", "as_int")
|
|
@@ -47,7 +65,7 @@ model MetricIntegerValue {
|
|
|
47
65
|
@doc("A floating-point measurement value from an OTLP number data point or exemplar.")
|
|
48
66
|
model MetricDoubleValue {
|
|
49
67
|
@encodedName("application/json", "as_double")
|
|
50
|
-
asDouble:
|
|
68
|
+
asDouble: MetricDouble;
|
|
51
69
|
}
|
|
52
70
|
|
|
53
71
|
@doc("The exactly-one numeric value carried by an OTLP number data point or exemplar.")
|
|
@@ -88,8 +106,7 @@ model SummaryQuantileValue {
|
|
|
88
106
|
@maxValue(1)
|
|
89
107
|
quantile: float64;
|
|
90
108
|
|
|
91
|
-
|
|
92
|
-
value: float64;
|
|
109
|
+
value: SummaryQuantileDouble;
|
|
93
110
|
}
|
|
94
111
|
|
|
95
112
|
@doc("Fields shared by every persisted OTLP metric data point.")
|
|
@@ -132,14 +149,19 @@ model MetricPointBase {
|
|
|
132
149
|
@doc("Instantaneous gauge measurement.")
|
|
133
150
|
model GaugeMetricPoint extends MetricPointBase {
|
|
134
151
|
type: "gauge";
|
|
135
|
-
|
|
152
|
+
|
|
153
|
+
@doc("Recorded value, absent when flags contain NO_RECORDED_VALUE (bit 1).")
|
|
154
|
+
value?: MetricNumberValue;
|
|
155
|
+
|
|
136
156
|
exemplars?: MetricExemplar[];
|
|
137
157
|
}
|
|
138
158
|
|
|
139
159
|
@doc("Delta or cumulative sum measurement.")
|
|
140
160
|
model SumMetricPoint extends MetricPointBase {
|
|
141
161
|
type: "sum";
|
|
142
|
-
|
|
162
|
+
|
|
163
|
+
@doc("Recorded value, absent when flags contain NO_RECORDED_VALUE (bit 1).")
|
|
164
|
+
value?: MetricNumberValue;
|
|
143
165
|
|
|
144
166
|
@encodedName("application/json", "aggregation_temporality")
|
|
145
167
|
aggregationTemporality: AggregationTemporality;
|
|
@@ -154,7 +176,7 @@ model SumMetricPoint extends MetricPointBase {
|
|
|
154
176
|
model HistogramMetricPoint extends MetricPointBase {
|
|
155
177
|
type: "histogram";
|
|
156
178
|
count: MetricUInt64;
|
|
157
|
-
sum?:
|
|
179
|
+
sum?: MetricDouble;
|
|
158
180
|
|
|
159
181
|
@encodedName("application/json", "bucket_counts")
|
|
160
182
|
bucketCounts: MetricUInt64[];
|
|
@@ -162,8 +184,8 @@ model HistogramMetricPoint extends MetricPointBase {
|
|
|
162
184
|
@encodedName("application/json", "explicit_bounds")
|
|
163
185
|
explicitBounds: float64[];
|
|
164
186
|
|
|
165
|
-
min?:
|
|
166
|
-
max?:
|
|
187
|
+
min?: MetricDouble;
|
|
188
|
+
max?: MetricDouble;
|
|
167
189
|
|
|
168
190
|
@encodedName("application/json", "aggregation_temporality")
|
|
169
191
|
aggregationTemporality: AggregationTemporality;
|
|
@@ -175,19 +197,19 @@ model HistogramMetricPoint extends MetricPointBase {
|
|
|
175
197
|
model ExponentialHistogramMetricPoint extends MetricPointBase {
|
|
176
198
|
type: "exponential_histogram";
|
|
177
199
|
count: MetricUInt64;
|
|
178
|
-
sum?:
|
|
200
|
+
sum?: MetricDouble;
|
|
179
201
|
scale: int32;
|
|
180
202
|
|
|
181
203
|
@encodedName("application/json", "zero_count")
|
|
182
204
|
zeroCount: MetricUInt64;
|
|
183
205
|
|
|
184
206
|
@encodedName("application/json", "zero_threshold")
|
|
185
|
-
zeroThreshold:
|
|
207
|
+
zeroThreshold: MetricDouble;
|
|
186
208
|
|
|
187
209
|
positive: ExponentialHistogramBuckets;
|
|
188
210
|
negative: ExponentialHistogramBuckets;
|
|
189
|
-
min?:
|
|
190
|
-
max?:
|
|
211
|
+
min?: MetricDouble;
|
|
212
|
+
max?: MetricDouble;
|
|
191
213
|
|
|
192
214
|
@encodedName("application/json", "aggregation_temporality")
|
|
193
215
|
aggregationTemporality: AggregationTemporality;
|
|
@@ -199,7 +221,7 @@ model ExponentialHistogramMetricPoint extends MetricPointBase {
|
|
|
199
221
|
model SummaryMetricPoint extends MetricPointBase {
|
|
200
222
|
type: "summary";
|
|
201
223
|
count: MetricUInt64;
|
|
202
|
-
sum:
|
|
224
|
+
sum: MetricDouble;
|
|
203
225
|
|
|
204
226
|
@encodedName("application/json", "quantile_values")
|
|
205
227
|
quantileValues: SummaryQuantileValue[];
|
package/otel/resource.tsp
CHANGED
|
@@ -163,6 +163,10 @@ model Resource {
|
|
|
163
163
|
@doc("Dropped attributes count")
|
|
164
164
|
@encodedName("application/json", "dropped_attributes_count")
|
|
165
165
|
droppedAttributesCount?: Count;
|
|
166
|
+
|
|
167
|
+
@doc("Entities participating in this Resource, keyed by attributes on the Resource.")
|
|
168
|
+
@encodedName("application/json", "entity_refs")
|
|
169
|
+
entityRefs?: EntityRef[];
|
|
166
170
|
}
|
|
167
171
|
|
|
168
172
|
// =============================================================================
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ancplua/qyl-api-schema",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "TypeSpec source of truth for qyl API contracts. Emits OpenAPI, JSON Schema, Qyl.Api.Contracts DTOs, and TypeScript contract types; not an OpenTelemetry package, storage schema, or server implementation.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|