@ancplua/qyl-api-schema 2.1.0 → 3.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
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
|
|