@ancplua/qyl-api-schema 2.1.0 → 4.0.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/common/types.tsp +21 -2
- package/generated/json-schema/qyl-api-schema.json +247 -439
- package/generated/openapi/qyl.openapi.json +241 -435
- package/generated/otel-keys.gen.tsp +92 -92
- package/generated/ts-runtime/api.d.ts +47 -13
- package/generated/ts-runtime/api.js +8 -0
- package/models/health.tsp +12 -0
- package/models/mcp-tools.tsp +70 -0
- package/package.json +10 -9
package/common/types.tsp
CHANGED
|
@@ -65,13 +65,20 @@ scalar UserId extends string;
|
|
|
65
65
|
@encode(DateTimeKnownEncoding.rfc3339)
|
|
66
66
|
scalar Timestamp extends utcDateTime;
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
// Encoded as a decimal string, not a JSON number. A 2026 nanosecond timestamp is ~1.79e18,
|
|
69
|
+
// well past Number.MAX_SAFE_INTEGER (9.007e15), so a bare JSON number is rounded to the
|
|
70
|
+
// nearest 256 ns by every JavaScript consumer — two spans 100 ns apart come back byte-identical
|
|
71
|
+
// and the waterfall reorders them on each reload. This is the same reason OTLP/JSON mandates
|
|
72
|
+
// decimal strings for its 64-bit fixed64 fields.
|
|
73
|
+
@doc("Unsigned Unix timestamp in nanoseconds since epoch, encoded as a decimal string")
|
|
69
74
|
@minValue(0)
|
|
75
|
+
@encode(string)
|
|
70
76
|
@TypeSpec.OpenAPI.extension("x-csharp-type", "ulong")
|
|
71
77
|
scalar UnixNanos extends uint64;
|
|
72
78
|
|
|
73
|
-
@doc("Duration in nanoseconds")
|
|
79
|
+
@doc("Duration in nanoseconds, encoded as a decimal string")
|
|
74
80
|
@minValue(0)
|
|
81
|
+
@encode(string)
|
|
75
82
|
@TypeSpec.OpenAPI.extension("x-csharp-type", "ulong")
|
|
76
83
|
scalar DurationNs extends uint64;
|
|
77
84
|
|
|
@@ -171,6 +178,18 @@ scalar Temperature extends float64;
|
|
|
171
178
|
@maxLength(64)
|
|
172
179
|
scalar Sha256Hash extends string;
|
|
173
180
|
|
|
181
|
+
// The revision is a content hash of the emitted OpenAPI artifact, not a package
|
|
182
|
+
// version: two builds of the same contract share it whatever their package
|
|
183
|
+
// versions say, and any contract edit changes it without anyone remembering to
|
|
184
|
+
// bump anything. Truncated to 16 hex characters because it is compared for
|
|
185
|
+
// equality, never used as a security boundary.
|
|
186
|
+
@doc("Deterministic revision of the generated API contract: 'sha256:' followed by the first 16 hex characters of the SHA-256 digest of the emitted OpenAPI document.")
|
|
187
|
+
@pattern("^sha256:[a-f0-9]{16}$")
|
|
188
|
+
@minLength(23)
|
|
189
|
+
@maxLength(23)
|
|
190
|
+
@example("sha256:0f1e2d3c4b5a6978")
|
|
191
|
+
scalar ContractRevision extends string;
|
|
192
|
+
|
|
174
193
|
@doc("Semantic version string (e.g., 1.2.3)")
|
|
175
194
|
@pattern("^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$")
|
|
176
195
|
@example("2.1.0")
|