@outfoxx/sunday 1.0.8 → 1.0.10

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.
Files changed (234) hide show
  1. package/LICENSE.txt +203 -0
  2. package/README.md +36 -2
  3. package/build/date-time-types.d.ts +35 -0
  4. package/build/date-time-types.js +699 -0
  5. package/build/date-time-types.js.map +1 -0
  6. package/build/event-parser.d.ts +17 -0
  7. package/build/event-parser.js +151 -0
  8. package/build/event-parser.js.map +1 -0
  9. package/build/fetch-event-source.d.ts +66 -0
  10. package/build/fetch-event-source.js +365 -0
  11. package/build/fetch-event-source.js.map +1 -0
  12. package/build/fetch-request-factory.d.ts +32 -0
  13. package/build/fetch-request-factory.js +316 -0
  14. package/build/fetch-request-factory.js.map +1 -0
  15. package/build/fetch.d.ts +9 -0
  16. package/build/fetch.js +140 -0
  17. package/build/fetch.js.map +1 -0
  18. package/build/header-parameters.d.ts +3 -0
  19. package/build/header-parameters.js +82 -0
  20. package/build/header-parameters.js.map +1 -0
  21. package/build/index.d.ts +26 -0
  22. package/build/index.js +41 -0
  23. package/build/index.js.map +1 -0
  24. package/{dist → build}/logger.d.ts +9 -0
  25. package/build/logger.js +36 -0
  26. package/build/logger.js.map +1 -0
  27. package/build/media-type-codecs/any-text-decoder.d.ts +7 -0
  28. package/build/media-type-codecs/any-text-decoder.js +29 -0
  29. package/build/media-type-codecs/any-text-decoder.js.map +1 -0
  30. package/build/media-type-codecs/any-text-encoder.d.ts +6 -0
  31. package/build/media-type-codecs/any-text-encoder.js +27 -0
  32. package/build/media-type-codecs/any-text-encoder.js.map +1 -0
  33. package/build/media-type-codecs/binary-decoder.d.ts +7 -0
  34. package/build/media-type-codecs/binary-decoder.js +33 -0
  35. package/build/media-type-codecs/binary-decoder.js.map +1 -0
  36. package/build/media-type-codecs/binary-encoder.d.ts +6 -0
  37. package/build/media-type-codecs/binary-encoder.js +30 -0
  38. package/build/media-type-codecs/binary-encoder.js.map +1 -0
  39. package/build/media-type-codecs/cbor-decoder.d.ts +13 -0
  40. package/build/media-type-codecs/cbor-decoder.js +38 -0
  41. package/build/media-type-codecs/cbor-decoder.js.map +1 -0
  42. package/build/media-type-codecs/cbor-encoder.d.ts +12 -0
  43. package/build/media-type-codecs/cbor-encoder.js +36 -0
  44. package/build/media-type-codecs/cbor-encoder.js.map +1 -0
  45. package/build/media-type-codecs/cbor-tags.d.ts +6 -0
  46. package/build/media-type-codecs/cbor-tags.js +20 -0
  47. package/build/media-type-codecs/cbor-tags.js.map +1 -0
  48. package/build/media-type-codecs/default-policies.d.ts +3 -0
  49. package/build/media-type-codecs/default-policies.js +33 -0
  50. package/build/media-type-codecs/default-policies.js.map +1 -0
  51. package/build/media-type-codecs/json-decoder.d.ts +14 -0
  52. package/build/media-type-codecs/json-decoder.js +40 -0
  53. package/build/media-type-codecs/json-decoder.js.map +1 -0
  54. package/build/media-type-codecs/json-encoder.d.ts +13 -0
  55. package/build/media-type-codecs/json-encoder.js +43 -0
  56. package/build/media-type-codecs/json-encoder.js.map +1 -0
  57. package/build/media-type-codecs/media-type-decoder.d.ts +14 -0
  58. package/build/media-type-codecs/media-type-decoder.js +18 -0
  59. package/build/media-type-codecs/media-type-decoder.js.map +1 -0
  60. package/build/media-type-codecs/media-type-decoders.d.ts +16 -0
  61. package/build/media-type-codecs/media-type-decoders.js +63 -0
  62. package/build/media-type-codecs/media-type-decoders.js.map +1 -0
  63. package/build/media-type-codecs/media-type-encoder.d.ts +12 -0
  64. package/build/media-type-codecs/media-type-encoder.js +22 -0
  65. package/build/media-type-codecs/media-type-encoder.js.map +1 -0
  66. package/build/media-type-codecs/media-type-encoders.d.ts +16 -0
  67. package/build/media-type-codecs/media-type-encoders.js +65 -0
  68. package/build/media-type-codecs/media-type-encoders.js.map +1 -0
  69. package/build/media-type-codecs/www-form-url-encoder.d.ts +31 -0
  70. package/build/media-type-codecs/www-form-url-encoder.js +281 -0
  71. package/build/media-type-codecs/www-form-url-encoder.js.map +1 -0
  72. package/build/media-type.d.ts +94 -0
  73. package/build/media-type.js +305 -0
  74. package/build/media-type.js.map +1 -0
  75. package/build/problem.d.ts +35 -0
  76. package/build/problem.js +122 -0
  77. package/build/problem.js.map +1 -0
  78. package/build/request-adapters.d.ts +23 -0
  79. package/build/request-adapters.js +53 -0
  80. package/build/request-adapters.js.map +1 -0
  81. package/build/request-factory.d.ts +39 -0
  82. package/build/request-factory.js +15 -0
  83. package/build/request-factory.js.map +1 -0
  84. package/build/result-response.d.ts +4 -0
  85. package/build/result-response.js +15 -0
  86. package/build/result-response.js.map +1 -0
  87. package/build/schema-builtins.d.ts +21 -0
  88. package/build/schema-builtins.js +201 -0
  89. package/build/schema-builtins.js.map +1 -0
  90. package/build/schema-policy.d.ts +31 -0
  91. package/build/schema-policy.js +41 -0
  92. package/build/schema-policy.js.map +1 -0
  93. package/build/schema-runtime.d.ts +25 -0
  94. package/build/schema-runtime.js +77 -0
  95. package/build/schema-runtime.js.map +1 -0
  96. package/build/sunday-error.d.ts +10 -0
  97. package/build/sunday-error.js +36 -0
  98. package/build/sunday-error.js.map +1 -0
  99. package/build/url-template.js +33 -0
  100. package/build/url-template.js.map +1 -0
  101. package/build/util/async-iterables.d.ts +15 -0
  102. package/build/util/async-iterables.js +179 -0
  103. package/build/util/async-iterables.js.map +1 -0
  104. package/build/util/errors.d.ts +2 -0
  105. package/build/util/errors.js +65 -0
  106. package/build/util/errors.js.map +1 -0
  107. package/build/util/nullify.d.ts +5 -0
  108. package/build/util/nullify.js +37 -0
  109. package/build/util/nullify.js.map +1 -0
  110. package/build/util/numbers.d.ts +11 -0
  111. package/build/util/numbers.js +41 -0
  112. package/build/util/numbers.js.map +1 -0
  113. package/build/util/subscriptions.d.ts +16 -0
  114. package/build/util/subscriptions.js +78 -0
  115. package/build/util/subscriptions.js.map +1 -0
  116. package/build/util/unknowns.d.ts +2 -0
  117. package/build/util/unknowns.js +23 -0
  118. package/build/util/unknowns.js.map +1 -0
  119. package/package.json +72 -49
  120. package/dist/any-type.d.ts +0 -2
  121. package/dist/any-type.js +0 -2
  122. package/dist/any-type.js.map +0 -1
  123. package/dist/binary-decoder.d.ts +0 -6
  124. package/dist/binary-decoder.js +0 -16
  125. package/dist/binary-decoder.js.map +0 -1
  126. package/dist/binary-encoder.d.ts +0 -5
  127. package/dist/binary-encoder.js +0 -13
  128. package/dist/binary-encoder.js.map +0 -1
  129. package/dist/cbor-decoder.d.ts +0 -15
  130. package/dist/cbor-decoder.js +0 -126
  131. package/dist/cbor-decoder.js.map +0 -1
  132. package/dist/cbor-encoder.d.ts +0 -29
  133. package/dist/cbor-encoder.js +0 -81
  134. package/dist/cbor-encoder.js.map +0 -1
  135. package/dist/cbor-tags.d.ts +0 -3
  136. package/dist/cbor-tags.js +0 -4
  137. package/dist/cbor-tags.js.map +0 -1
  138. package/dist/class-type.d.ts +0 -2
  139. package/dist/class-type.js +0 -2
  140. package/dist/class-type.js.map +0 -1
  141. package/dist/date-time-types.d.ts +0 -7
  142. package/dist/date-time-types.js +0 -5
  143. package/dist/date-time-types.js.map +0 -1
  144. package/dist/fetch-event-source.d.ts +0 -52
  145. package/dist/fetch-event-source.js +0 -271
  146. package/dist/fetch-event-source.js.map +0 -1
  147. package/dist/fetch-request-factory.d.ts +0 -26
  148. package/dist/fetch-request-factory.js +0 -125
  149. package/dist/fetch-request-factory.js.map +0 -1
  150. package/dist/fetch.d.ts +0 -1
  151. package/dist/fetch.js +0 -19
  152. package/dist/fetch.js.map +0 -1
  153. package/dist/http-error.d.ts +0 -10
  154. package/dist/http-error.js +0 -45
  155. package/dist/http-error.js.map +0 -1
  156. package/dist/index.d.ts +0 -25
  157. package/dist/index.js +0 -26
  158. package/dist/index.js.map +0 -1
  159. package/dist/json-decoder.d.ts +0 -31
  160. package/dist/json-decoder.js +0 -139
  161. package/dist/json-decoder.js.map +0 -1
  162. package/dist/json-encoder.d.ts +0 -35
  163. package/dist/json-encoder.js +0 -116
  164. package/dist/json-encoder.js.map +0 -1
  165. package/dist/logger.js +0 -2
  166. package/dist/logger.js.map +0 -1
  167. package/dist/media-type-decoder.d.ts +0 -4
  168. package/dist/media-type-decoder.js +0 -2
  169. package/dist/media-type-decoder.js.map +0 -1
  170. package/dist/media-type-decoders.d.ts +0 -17
  171. package/dist/media-type-decoders.js +0 -40
  172. package/dist/media-type-decoders.js.map +0 -1
  173. package/dist/media-type-encoder.d.ts +0 -8
  174. package/dist/media-type-encoder.js +0 -6
  175. package/dist/media-type-encoder.js.map +0 -1
  176. package/dist/media-type-encoders.d.ts +0 -17
  177. package/dist/media-type-encoders.js +0 -42
  178. package/dist/media-type-encoders.js.map +0 -1
  179. package/dist/media-type.d.ts +0 -14
  180. package/dist/media-type.js +0 -18
  181. package/dist/media-type.js.map +0 -1
  182. package/dist/problem.d.ts +0 -16
  183. package/dist/problem.js +0 -11
  184. package/dist/problem.js.map +0 -1
  185. package/dist/request-factory.d.ts +0 -38
  186. package/dist/request-factory.js +0 -2
  187. package/dist/request-factory.js.map +0 -1
  188. package/dist/url-encoder.d.ts +0 -59
  189. package/dist/url-encoder.js +0 -141
  190. package/dist/url-encoder.js.map +0 -1
  191. package/dist/url-template.js +0 -18
  192. package/dist/url-template.js.map +0 -1
  193. package/dist/util/base64.d.ts +0 -5
  194. package/dist/util/base64.js +0 -64
  195. package/dist/util/base64.js.map +0 -1
  196. package/dist/util/hex.d.ts +0 -4
  197. package/dist/util/hex.js +0 -18
  198. package/dist/util/hex.js.map +0 -1
  199. package/dist/util/rxjs.d.ts +0 -2
  200. package/dist/util/rxjs.js +0 -14
  201. package/dist/util/rxjs.js.map +0 -1
  202. package/dist/util/stream-rxjs.d.ts +0 -2
  203. package/dist/util/stream-rxjs.js +0 -26
  204. package/dist/util/stream-rxjs.js.map +0 -1
  205. package/src/any-type.ts +0 -4
  206. package/src/binary-decoder.ts +0 -24
  207. package/src/binary-encoder.ts +0 -19
  208. package/src/cbor-decoder.ts +0 -148
  209. package/src/cbor-encoder.ts +0 -95
  210. package/src/cbor-tags.ts +0 -3
  211. package/src/class-type.ts +0 -3
  212. package/src/date-time-types.ts +0 -10
  213. package/src/fetch-event-source.ts +0 -387
  214. package/src/fetch-request-factory.ts +0 -225
  215. package/src/fetch.ts +0 -30
  216. package/src/http-error.ts +0 -55
  217. package/src/index.ts +0 -26
  218. package/src/json-decoder.ts +0 -164
  219. package/src/json-encoder.ts +0 -144
  220. package/src/logger.ts +0 -8
  221. package/src/media-type-decoder.ts +0 -5
  222. package/src/media-type-decoders.ts +0 -59
  223. package/src/media-type-encoder.ts +0 -16
  224. package/src/media-type-encoders.ts +0 -61
  225. package/src/media-type.ts +0 -25
  226. package/src/problem.ts +0 -25
  227. package/src/request-factory.ts +0 -76
  228. package/src/url-encoder.ts +0 -173
  229. package/src/url-template.ts +0 -21
  230. package/src/util/base64.ts +0 -77
  231. package/src/util/hex.ts +0 -15
  232. package/src/util/rxjs.ts +0 -18
  233. package/src/util/stream-rxjs.ts +0 -28
  234. /package/{dist → build}/url-template.d.ts +0 -0
@@ -0,0 +1,699 @@
1
+ // Copyright 2020 Outfox, Inc.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+ import { DateTimeFormatter, DateTimeFormatterBuilder, Duration as JsJodaDuration, Instant as JsJodaInstant, LocalDate as JsJodaLocalDate, LocalDateTime as JsJodaLocalDateTime, LocalTime as JsJodaLocalTime, OffsetDateTime as JsJodaOffsetDateTime, OffsetTime as JsJodaOffsetTime, Period as JsJodaPeriod, ResolverStyle, Temporal as JsJodaTemporal, ZonedDateTime as JsJodaZonedDateTime, ZoneId as JsJodaZoneId, ZoneOffset as JsJodaZoneOffset, } from '@js-joda/core';
15
+ import { TaggedValue } from 'cbor-redux';
16
+ import { z } from 'zod';
17
+ import { epochDateTag, epochDateTimeTag, isoDateTimeTag } from './media-type-codecs/cbor-tags.js';
18
+ import { DateEncoding, NumericDateDecoding } from './schema-policy.js';
19
+ import { defineSchema } from './schema-runtime.js';
20
+ import { appendNumericTimeFields, secondsToNumber } from './util/numbers.js';
21
+ export const Temporal = JsJodaTemporal;
22
+ export const Instant = JsJodaInstant;
23
+ export const LocalDate = JsJodaLocalDate;
24
+ export const LocalTime = JsJodaLocalTime;
25
+ export const LocalDateTime = JsJodaLocalDateTime;
26
+ export const OffsetTime = JsJodaOffsetTime;
27
+ export const OffsetDateTime = JsJodaOffsetDateTime;
28
+ export const ZonedDateTime = JsJodaZonedDateTime;
29
+ export const Duration = JsJodaDuration;
30
+ export const Period = JsJodaPeriod;
31
+ export const ZoneId = JsJodaZoneId;
32
+ export const ZoneOffset = JsJodaZoneOffset;
33
+ // For CBOR, tagged payloads are emitted only when tag semantics align with Jackson wire values.
34
+ // Decoders still accept known tags and prioritize them when present.
35
+ const TAGGED_VALUE_SCHEMA = z.instanceof(TaggedValue);
36
+ const DATE_OUTPUT_SCHEMA = z.instanceof(Date);
37
+ const INSTANT_OUTPUT_SCHEMA = z.custom((value) => value instanceof Instant);
38
+ const ZONED_DATE_TIME_OUTPUT_SCHEMA = z.custom((value) => value instanceof ZonedDateTime);
39
+ const OFFSET_DATE_TIME_OUTPUT_SCHEMA = z.custom((value) => value instanceof OffsetDateTime);
40
+ const OFFSET_TIME_OUTPUT_SCHEMA = z.custom((value) => value instanceof OffsetTime);
41
+ const LOCAL_DATE_TIME_OUTPUT_SCHEMA = z.custom((value) => value instanceof LocalDateTime);
42
+ const LOCAL_DATE_OUTPUT_SCHEMA = z.custom((value) => value instanceof LocalDate);
43
+ const LOCAL_TIME_OUTPUT_SCHEMA = z.custom((value) => value instanceof LocalTime);
44
+ const DURATION_OUTPUT_SCHEMA = z.custom((value) => value instanceof Duration);
45
+ const INSTANT_JSON_INPUT_SCHEMA = z.union([z.string(), z.number()]);
46
+ const INSTANT_CBOR_INPUT_SCHEMA = z.union([z.string(), z.number(), TAGGED_VALUE_SCHEMA]);
47
+ const ZONED_DATE_TIME_JSON_INPUT_SCHEMA = z.union([z.string(), z.number()]);
48
+ const ZONED_DATE_TIME_CBOR_INPUT_SCHEMA = z.union([z.string(), z.number(), TAGGED_VALUE_SCHEMA]);
49
+ const OFFSET_DATE_TIME_JSON_INPUT_SCHEMA = z.union([z.string(), z.number()]);
50
+ const OFFSET_DATE_TIME_CBOR_INPUT_SCHEMA = z.union([z.string(), z.number(), TAGGED_VALUE_SCHEMA]);
51
+ const LOCAL_DATE_TIME_ARRAY_INPUT_SCHEMA = z.array(z.number());
52
+ const LOCAL_DATE_ARRAY_INPUT_SCHEMA = z.array(z.number());
53
+ const LOCAL_TIME_ARRAY_INPUT_SCHEMA = z.array(z.number());
54
+ const OFFSET_TIME_ARRAY_INPUT_SCHEMA = z.array(z.union([z.number(), z.string()]));
55
+ const OFFSET_TIME_INPUT_SCHEMA = z.union([z.string(), OFFSET_TIME_ARRAY_INPUT_SCHEMA]);
56
+ const LOCAL_DATE_TIME_INPUT_SCHEMA = z.union([z.string(), LOCAL_DATE_TIME_ARRAY_INPUT_SCHEMA]);
57
+ const LOCAL_DATE_JSON_INPUT_SCHEMA = z.union([z.string(), LOCAL_DATE_ARRAY_INPUT_SCHEMA]);
58
+ const LOCAL_DATE_CBOR_INPUT_SCHEMA = z.union([z.string(), LOCAL_DATE_ARRAY_INPUT_SCHEMA, TAGGED_VALUE_SCHEMA]);
59
+ const LOCAL_TIME_INPUT_SCHEMA = z.union([z.string(), LOCAL_TIME_ARRAY_INPUT_SCHEMA]);
60
+ const DURATION_JSON_INPUT_SCHEMA = z.union([z.string(), z.number()]);
61
+ const DURATION_CBOR_INPUT_SCHEMA = z.union([z.string(), z.number()]);
62
+ const DATE_JSON_INPUT_SCHEMA = z.union([z.string(), z.number()]);
63
+ const DATE_CBOR_INPUT_SCHEMA = z.union([z.string(), z.number(), TAGGED_VALUE_SCHEMA]);
64
+ const offsetTimeFormatter = new DateTimeFormatterBuilder()
65
+ .parseCaseInsensitive()
66
+ .append(DateTimeFormatter.ISO_LOCAL_TIME)
67
+ .appendOffsetId()
68
+ .toFormatter(ResolverStyle.STRICT);
69
+ const instantCodecByPolicy = new Map();
70
+ const zonedDateTimeCodecByPolicy = new Map();
71
+ const offsetDateTimeCodecByPolicy = new Map();
72
+ const offsetTimeCodecByPolicy = new Map();
73
+ const localDateTimeCodecByPolicy = new Map();
74
+ const localDateCodecByPolicy = new Map();
75
+ const localTimeCodecByPolicy = new Map();
76
+ const durationCodecByPolicy = new Map();
77
+ const dateCodecByPolicy = new Map();
78
+ function policyKey(policy) {
79
+ return [
80
+ policy.format,
81
+ policy.dateEncoding.toString(),
82
+ policy.numericDateDecoding.toString(),
83
+ ].join(':');
84
+ }
85
+ function codecForPolicy(cache, policy, factory) {
86
+ const key = policyKey(policy);
87
+ const cached = cache.get(key);
88
+ if (cached) {
89
+ return cached;
90
+ }
91
+ const schema = factory(policy);
92
+ cache.set(key, schema);
93
+ return schema;
94
+ }
95
+ function pushIssue(ctx, message, input) {
96
+ ctx.issues.push({
97
+ code: 'custom',
98
+ message,
99
+ input,
100
+ });
101
+ return z.NEVER;
102
+ }
103
+ function splitEpochSeconds(value) {
104
+ let seconds = Math.trunc(value);
105
+ const fraction = value - seconds;
106
+ let nanos = Math.round((fraction * 1_000_000_000) / 1_000) * 1_000;
107
+ if (nanos >= 1_000_000_000) {
108
+ seconds += 1;
109
+ nanos = 0;
110
+ }
111
+ if (nanos < 0) {
112
+ seconds -= 1;
113
+ nanos += 1_000_000_000;
114
+ }
115
+ return { seconds, nanos };
116
+ }
117
+ function decodeInstantFromNumericPolicy(value, policy) {
118
+ if (policy.numericDateDecoding === NumericDateDecoding.MILLISECONDS_SINCE_EPOCH) {
119
+ return Instant.ofEpochMilli(value);
120
+ }
121
+ const { seconds, nanos } = splitEpochSeconds(value);
122
+ return Instant.ofEpochSecond(seconds, nanos);
123
+ }
124
+ function decodeInstantFromEpochSeconds(value) {
125
+ const { seconds, nanos } = splitEpochSeconds(value);
126
+ return Instant.ofEpochSecond(seconds, nanos);
127
+ }
128
+ function decodeFractionToNanos(fraction, policy) {
129
+ if (!Number.isInteger(fraction) || fraction < 0) {
130
+ throw new Error('Fractional component must be a non-negative integer');
131
+ }
132
+ if (policy.numericDateDecoding === NumericDateDecoding.MILLISECONDS_SINCE_EPOCH) {
133
+ return fraction * 1_000_000;
134
+ }
135
+ return fraction;
136
+ }
137
+ function encodeFractionFromNanos(nanos, dateEncoding) {
138
+ if (dateEncoding === DateEncoding.MILLISECONDS_SINCE_EPOCH) {
139
+ return Math.trunc(nanos / 1_000_000);
140
+ }
141
+ return nanos;
142
+ }
143
+ function encodeLocalDateTimeArray(value, dateEncoding) {
144
+ return appendNumericTimeFields([value.year(), value.monthValue(), value.dayOfMonth(), value.hour(), value.minute()], value.second(), encodeFractionFromNanos(value.nano(), dateEncoding));
145
+ }
146
+ function encodeLocalDateArray(value) {
147
+ return [value.year(), value.monthValue(), value.dayOfMonth()];
148
+ }
149
+ function encodeLocalTimeArray(value, dateEncoding) {
150
+ return appendNumericTimeFields([value.hour(), value.minute()], value.second(), encodeFractionFromNanos(value.nano(), dateEncoding));
151
+ }
152
+ function encodeOffsetTimeArray(value, dateEncoding) {
153
+ const local = encodeLocalTimeArray(value.toLocalTime(), dateEncoding);
154
+ return [...local, value.offset().toString()];
155
+ }
156
+ function parseLocalDateTimeArray(value, policy, ctx) {
157
+ if (value.length < 5 || value.length > 7) {
158
+ return pushIssue(ctx, 'LocalDateTime numeric timestamps must be ' +
159
+ '[year,month,day,hour,minute,(second),(fraction)]', value);
160
+ }
161
+ try {
162
+ const year = value[0];
163
+ const month = value[1];
164
+ const day = value[2];
165
+ const hour = value[3];
166
+ const minute = value[4];
167
+ const second = value.length >= 6 ? value[5] : 0;
168
+ const nanos = value.length === 7 ? decodeFractionToNanos(value[6], policy) : 0;
169
+ return LocalDateTime.of(year, month, day, hour, minute, second, nanos);
170
+ }
171
+ catch (error) {
172
+ const details = error instanceof Error ? `: ${error.message}` : '';
173
+ return pushIssue(ctx, `Invalid LocalDateTime numeric timestamp array${details}`, value);
174
+ }
175
+ }
176
+ function parseLocalDateArray(value, ctx) {
177
+ if (value.length !== 3) {
178
+ return pushIssue(ctx, 'LocalDate numeric timestamps must be [year,month,day]', value);
179
+ }
180
+ try {
181
+ return LocalDate.of(value[0], value[1], value[2]);
182
+ }
183
+ catch {
184
+ return pushIssue(ctx, 'Invalid LocalDate numeric timestamp array', value);
185
+ }
186
+ }
187
+ function parseLocalTimeArray(value, policy, ctx) {
188
+ if (value.length < 2 || value.length > 4) {
189
+ return pushIssue(ctx, 'LocalTime numeric timestamps must be [hour,minute,(second),(fraction)]', value);
190
+ }
191
+ try {
192
+ const hour = value[0];
193
+ const minute = value[1];
194
+ const second = value.length >= 3 ? value[2] : 0;
195
+ const nanos = value.length === 4 ? decodeFractionToNanos(value[3], policy) : 0;
196
+ return LocalTime.of(hour, minute, second, nanos);
197
+ }
198
+ catch (error) {
199
+ const details = error instanceof Error ? `: ${error.message}` : '';
200
+ return pushIssue(ctx, `Invalid LocalTime numeric timestamp array${details}`, value);
201
+ }
202
+ }
203
+ function parseOffsetTimeArray(value, policy, ctx) {
204
+ if (value.length < 3 || value.length > 5) {
205
+ return pushIssue(ctx, 'OffsetTime numeric timestamps must be [hour,minute,(second),(fraction),offset]', value);
206
+ }
207
+ const offset = value.at(-1);
208
+ if (typeof offset !== 'string') {
209
+ return pushIssue(ctx, 'OffsetTime numeric timestamps must end with an offset string', value);
210
+ }
211
+ const timeParts = value.slice(0, -1);
212
+ if (!timeParts.every((part) => typeof part === 'number')) {
213
+ return pushIssue(ctx, 'OffsetTime numeric timestamps must contain number time fields', value);
214
+ }
215
+ const localTime = parseLocalTimeArray(timeParts, policy, ctx);
216
+ if (localTime === z.NEVER) {
217
+ return z.NEVER;
218
+ }
219
+ try {
220
+ return OffsetTime.of(localTime, ZoneOffset.of(offset));
221
+ }
222
+ catch {
223
+ return pushIssue(ctx, 'Invalid OffsetTime offset', value);
224
+ }
225
+ }
226
+ function parseIsoInstant(value, ctx) {
227
+ try {
228
+ return Instant.from(DateTimeFormatter.ISO_INSTANT.parse(value));
229
+ }
230
+ catch {
231
+ return pushIssue(ctx, `Invalid ISO instant: ${value}`, value);
232
+ }
233
+ }
234
+ function parseIsoZonedDateTime(value, ctx) {
235
+ try {
236
+ return ZonedDateTime.from(DateTimeFormatter.ISO_ZONED_DATE_TIME.parse(value));
237
+ }
238
+ catch {
239
+ return pushIssue(ctx, `Invalid ISO zoned date-time: ${value}`, value);
240
+ }
241
+ }
242
+ function parseIsoOffsetDateTime(value, ctx) {
243
+ try {
244
+ return OffsetDateTime.from(DateTimeFormatter.ISO_OFFSET_DATE_TIME.parse(value));
245
+ }
246
+ catch {
247
+ return pushIssue(ctx, `Invalid ISO offset date-time: ${value}`, value);
248
+ }
249
+ }
250
+ function parseIsoDate(value, ctx) {
251
+ const parsed = new Date(value);
252
+ if (Number.isNaN(parsed.getTime())) {
253
+ return pushIssue(ctx, `Invalid ISO date-time: ${value}`, value);
254
+ }
255
+ return parsed;
256
+ }
257
+ function parseIsoDuration(value, ctx) {
258
+ try {
259
+ return Duration.parse(value);
260
+ }
261
+ catch {
262
+ return pushIssue(ctx, `Invalid ISO duration: ${value}`, value);
263
+ }
264
+ }
265
+ function decodeTaggedTemporal(tagged, ctx) {
266
+ switch (tagged.tag) {
267
+ case isoDateTimeTag:
268
+ if (typeof tagged.value !== 'string') {
269
+ return pushIssue(ctx, 'CBOR tag 0 must contain a string datetime', tagged.value);
270
+ }
271
+ return { tag: isoDateTimeTag, value: tagged.value };
272
+ case epochDateTimeTag:
273
+ if (typeof tagged.value !== 'number') {
274
+ return pushIssue(ctx, 'CBOR tag 1 must contain epoch-seconds', tagged.value);
275
+ }
276
+ return { tag: epochDateTimeTag, value: tagged.value };
277
+ default:
278
+ ctx.issues.push({
279
+ code: 'invalid_value',
280
+ values: [isoDateTimeTag, epochDateTimeTag],
281
+ input: tagged.tag,
282
+ message: 'Invalid CBOR tag for temporal decoding',
283
+ });
284
+ return z.NEVER;
285
+ }
286
+ }
287
+ function decodeTaggedLocalDate(tagged, ctx) {
288
+ if (tagged.tag !== epochDateTag) {
289
+ ctx.issues.push({
290
+ code: 'invalid_value',
291
+ values: [epochDateTag],
292
+ input: tagged.tag,
293
+ message: 'Invalid CBOR tag for LocalDate decoding',
294
+ });
295
+ return z.NEVER;
296
+ }
297
+ if (typeof tagged.value !== 'number' || !Number.isInteger(tagged.value)) {
298
+ return pushIssue(ctx, 'CBOR tag 100 must contain an integer epoch-day', tagged.value);
299
+ }
300
+ return { tag: epochDateTag, value: tagged.value };
301
+ }
302
+ function taggedTemporalEncoder(dateEncoding, iso, milliseconds, decimalSeconds, convert) {
303
+ switch (dateEncoding) {
304
+ case DateEncoding.ISO8601:
305
+ return (value) => new TaggedValue(iso(value), isoDateTimeTag);
306
+ case DateEncoding.MILLISECONDS_SINCE_EPOCH:
307
+ return (value) => milliseconds(convert(value));
308
+ case DateEncoding.DECIMAL_SECONDS_SINCE_EPOCH:
309
+ return (value) => new TaggedValue(decimalSeconds(convert(value)), epochDateTimeTag);
310
+ }
311
+ }
312
+ function createInstantSchema(policy) {
313
+ switch (policy.format) {
314
+ case 'json':
315
+ return z.codec(INSTANT_JSON_INPUT_SCHEMA, INSTANT_OUTPUT_SCHEMA, {
316
+ decode: (value, ctx) => {
317
+ switch (typeof value) {
318
+ case 'string':
319
+ return parseIsoInstant(value, ctx);
320
+ case 'number':
321
+ return decodeInstantFromNumericPolicy(value, policy);
322
+ }
323
+ },
324
+ encode: (value) => {
325
+ switch (policy.dateEncoding) {
326
+ case DateEncoding.ISO8601:
327
+ return DateTimeFormatter.ISO_INSTANT.format(value);
328
+ case DateEncoding.MILLISECONDS_SINCE_EPOCH:
329
+ return value.toEpochMilli();
330
+ case DateEncoding.DECIMAL_SECONDS_SINCE_EPOCH:
331
+ return secondsToNumber(value.epochSecond(), value.nano());
332
+ }
333
+ },
334
+ });
335
+ case 'cbor':
336
+ return z.codec(INSTANT_CBOR_INPUT_SCHEMA, INSTANT_OUTPUT_SCHEMA, {
337
+ decode: (value, ctx) => {
338
+ switch (typeof value) {
339
+ case 'string':
340
+ return parseIsoInstant(value, ctx);
341
+ case 'number':
342
+ return decodeInstantFromNumericPolicy(value, policy);
343
+ default: {
344
+ const tagged = decodeTaggedTemporal(value, ctx);
345
+ if (tagged === z.NEVER) {
346
+ return z.NEVER;
347
+ }
348
+ return tagged.tag === isoDateTimeTag
349
+ ? parseIsoInstant(tagged.value, ctx)
350
+ : decodeInstantFromEpochSeconds(tagged.value);
351
+ }
352
+ }
353
+ },
354
+ encode: taggedTemporalEncoder(policy.dateEncoding, (instant) => DateTimeFormatter.ISO_INSTANT.format(instant), (instant) => instant.toEpochMilli(), (instant) => secondsToNumber(instant.epochSecond(), instant.nano()), (instant) => instant),
355
+ });
356
+ }
357
+ }
358
+ function createZonedDateTimeSchema(policy) {
359
+ switch (policy.format) {
360
+ case 'json':
361
+ return z.codec(ZONED_DATE_TIME_JSON_INPUT_SCHEMA, ZONED_DATE_TIME_OUTPUT_SCHEMA, {
362
+ decode: (value, ctx) => {
363
+ if (typeof value === 'string') {
364
+ return parseIsoZonedDateTime(value, ctx);
365
+ }
366
+ return ZonedDateTime.ofInstant(decodeInstantFromNumericPolicy(value, policy), ZoneId.UTC);
367
+ },
368
+ encode: (value) => {
369
+ switch (policy.dateEncoding) {
370
+ case DateEncoding.ISO8601:
371
+ return DateTimeFormatter.ISO_ZONED_DATE_TIME.format(value);
372
+ case DateEncoding.MILLISECONDS_SINCE_EPOCH:
373
+ return value.withZoneSameInstant(ZoneOffset.UTC).toInstant().toEpochMilli();
374
+ case DateEncoding.DECIMAL_SECONDS_SINCE_EPOCH: {
375
+ const instant = value.withZoneSameInstant(ZoneOffset.UTC).toInstant();
376
+ return secondsToNumber(instant.epochSecond(), instant.nano());
377
+ }
378
+ }
379
+ },
380
+ });
381
+ case 'cbor':
382
+ return z.codec(ZONED_DATE_TIME_CBOR_INPUT_SCHEMA, ZONED_DATE_TIME_OUTPUT_SCHEMA, {
383
+ decode: (value, ctx) => {
384
+ if (value instanceof TaggedValue) {
385
+ const tagged = decodeTaggedTemporal(value, ctx);
386
+ if (tagged === z.NEVER) {
387
+ return z.NEVER;
388
+ }
389
+ return tagged.tag === isoDateTimeTag
390
+ ? parseIsoZonedDateTime(tagged.value, ctx)
391
+ : ZonedDateTime.ofInstant(decodeInstantFromEpochSeconds(tagged.value), ZoneId.UTC);
392
+ }
393
+ if (typeof value === 'number') {
394
+ return ZonedDateTime.ofInstant(decodeInstantFromNumericPolicy(value, policy), ZoneId.UTC);
395
+ }
396
+ return parseIsoZonedDateTime(value, ctx);
397
+ },
398
+ encode: taggedTemporalEncoder(policy.dateEncoding, (zoned) => DateTimeFormatter.ISO_ZONED_DATE_TIME.format(zoned), (instant) => instant.toEpochMilli(), (instant) => secondsToNumber(instant.epochSecond(), instant.nano()), (zoned) => zoned.toInstant()),
399
+ });
400
+ }
401
+ }
402
+ function createOffsetDateTimeSchema(policy) {
403
+ switch (policy.format) {
404
+ case 'json':
405
+ return z.codec(OFFSET_DATE_TIME_JSON_INPUT_SCHEMA, OFFSET_DATE_TIME_OUTPUT_SCHEMA, {
406
+ decode: (value, ctx) => {
407
+ if (typeof value === 'string') {
408
+ return parseIsoOffsetDateTime(value, ctx);
409
+ }
410
+ return OffsetDateTime.ofInstant(decodeInstantFromNumericPolicy(value, policy), ZoneOffset.UTC);
411
+ },
412
+ encode: (value) => {
413
+ switch (policy.dateEncoding) {
414
+ case DateEncoding.ISO8601:
415
+ return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value);
416
+ case DateEncoding.MILLISECONDS_SINCE_EPOCH:
417
+ return value.withOffsetSameInstant(ZoneOffset.UTC).toInstant().toEpochMilli();
418
+ case DateEncoding.DECIMAL_SECONDS_SINCE_EPOCH: {
419
+ const instant = value.withOffsetSameInstant(ZoneOffset.UTC).toInstant();
420
+ return secondsToNumber(instant.epochSecond(), instant.nano());
421
+ }
422
+ }
423
+ },
424
+ });
425
+ case 'cbor':
426
+ return z.codec(OFFSET_DATE_TIME_CBOR_INPUT_SCHEMA, OFFSET_DATE_TIME_OUTPUT_SCHEMA, {
427
+ decode: (value, ctx) => {
428
+ if (value instanceof TaggedValue) {
429
+ const tagged = decodeTaggedTemporal(value, ctx);
430
+ if (tagged === z.NEVER) {
431
+ return z.NEVER;
432
+ }
433
+ return tagged.tag === isoDateTimeTag
434
+ ? parseIsoOffsetDateTime(tagged.value, ctx)
435
+ : OffsetDateTime.ofInstant(decodeInstantFromEpochSeconds(tagged.value), ZoneOffset.UTC);
436
+ }
437
+ if (typeof value === 'number') {
438
+ return OffsetDateTime.ofInstant(decodeInstantFromNumericPolicy(value, policy), ZoneOffset.UTC);
439
+ }
440
+ return parseIsoOffsetDateTime(value, ctx);
441
+ },
442
+ encode: taggedTemporalEncoder(policy.dateEncoding, (offset) => DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(offset), (instant) => instant.toEpochMilli(), (instant) => secondsToNumber(instant.epochSecond(), instant.nano()), (offset) => offset.toInstant()),
443
+ });
444
+ }
445
+ }
446
+ function createOffsetTimeSchema(policy) {
447
+ return z.codec(OFFSET_TIME_INPUT_SCHEMA, OFFSET_TIME_OUTPUT_SCHEMA, {
448
+ decode: (value, ctx) => {
449
+ if (typeof value === 'string') {
450
+ return OffsetTime.parse(value, offsetTimeFormatter);
451
+ }
452
+ return parseOffsetTimeArray(value, policy, ctx);
453
+ },
454
+ encode: (value) => {
455
+ if (policy.dateEncoding === DateEncoding.ISO8601) {
456
+ return offsetTimeFormatter.format(value);
457
+ }
458
+ return encodeOffsetTimeArray(value, policy.dateEncoding);
459
+ },
460
+ });
461
+ }
462
+ function createLocalDateTimeSchema(policy) {
463
+ return z.codec(LOCAL_DATE_TIME_INPUT_SCHEMA, LOCAL_DATE_TIME_OUTPUT_SCHEMA, {
464
+ decode: (value, ctx) => {
465
+ if (typeof value === 'string') {
466
+ return LocalDateTime.parse(value);
467
+ }
468
+ return parseLocalDateTimeArray(value, policy, ctx);
469
+ },
470
+ encode: (value) => {
471
+ if (policy.dateEncoding === DateEncoding.ISO8601) {
472
+ return DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(value);
473
+ }
474
+ // CBOR tag 100 (epoch-day) is accepted on decode for compatibility,
475
+ // but the encoder always emits [year, month, day] to match Jackson's
476
+ // array output.
477
+ return encodeLocalDateTimeArray(value, policy.dateEncoding);
478
+ },
479
+ });
480
+ }
481
+ function createLocalDateSchema(policy) {
482
+ switch (policy.format) {
483
+ case 'json':
484
+ return z.codec(LOCAL_DATE_JSON_INPUT_SCHEMA, LOCAL_DATE_OUTPUT_SCHEMA, {
485
+ decode: (value, ctx) => {
486
+ if (typeof value === 'string') {
487
+ return LocalDate.parse(value);
488
+ }
489
+ return parseLocalDateArray(value, ctx);
490
+ },
491
+ encode: (value) => {
492
+ if (policy.dateEncoding === DateEncoding.ISO8601) {
493
+ return DateTimeFormatter.ISO_LOCAL_DATE.format(value);
494
+ }
495
+ return encodeLocalDateArray(value);
496
+ },
497
+ });
498
+ case 'cbor':
499
+ return z.codec(LOCAL_DATE_CBOR_INPUT_SCHEMA, LOCAL_DATE_OUTPUT_SCHEMA, {
500
+ decode: (value, ctx) => {
501
+ if (typeof value === 'string') {
502
+ return LocalDate.parse(value);
503
+ }
504
+ if (value instanceof TaggedValue) {
505
+ const tagged = decodeTaggedLocalDate(value, ctx);
506
+ if (tagged === z.NEVER) {
507
+ return z.NEVER;
508
+ }
509
+ return LocalDate.ofEpochDay(tagged.value);
510
+ }
511
+ return parseLocalDateArray(value, ctx);
512
+ },
513
+ encode: (value) => {
514
+ if (policy.dateEncoding === DateEncoding.ISO8601) {
515
+ return DateTimeFormatter.ISO_LOCAL_DATE.format(value);
516
+ }
517
+ return encodeLocalDateArray(value);
518
+ },
519
+ });
520
+ }
521
+ }
522
+ function createLocalTimeSchema(policy) {
523
+ return z.codec(LOCAL_TIME_INPUT_SCHEMA, LOCAL_TIME_OUTPUT_SCHEMA, {
524
+ decode: (value, ctx) => {
525
+ if (typeof value === 'string') {
526
+ return LocalTime.parse(value);
527
+ }
528
+ return parseLocalTimeArray(value, policy, ctx);
529
+ },
530
+ encode: (value) => {
531
+ if (policy.dateEncoding === DateEncoding.ISO8601) {
532
+ return DateTimeFormatter.ISO_LOCAL_TIME.format(value);
533
+ }
534
+ return encodeLocalTimeArray(value, policy.dateEncoding);
535
+ },
536
+ });
537
+ }
538
+ function createDurationSchema(policy) {
539
+ switch (policy.format) {
540
+ case 'json':
541
+ return z.codec(DURATION_JSON_INPUT_SCHEMA, DURATION_OUTPUT_SCHEMA, {
542
+ decode: (value, ctx) => {
543
+ if (typeof value === 'string') {
544
+ return parseIsoDuration(value, ctx);
545
+ }
546
+ if (policy.numericDateDecoding === NumericDateDecoding.MILLISECONDS_SINCE_EPOCH) {
547
+ return Duration.ofMillis(value);
548
+ }
549
+ const { seconds, nanos } = splitEpochSeconds(value);
550
+ return Duration.ofSeconds(seconds, nanos);
551
+ },
552
+ encode: (value) => {
553
+ switch (policy.dateEncoding) {
554
+ case DateEncoding.ISO8601:
555
+ return value.toString();
556
+ case DateEncoding.MILLISECONDS_SINCE_EPOCH:
557
+ return value.toMillis();
558
+ case DateEncoding.DECIMAL_SECONDS_SINCE_EPOCH:
559
+ return secondsToNumber(value.seconds(), value.nano());
560
+ }
561
+ },
562
+ });
563
+ case 'cbor':
564
+ return z.codec(DURATION_CBOR_INPUT_SCHEMA, DURATION_OUTPUT_SCHEMA, {
565
+ decode: (value, ctx) => {
566
+ if (typeof value === 'string') {
567
+ return parseIsoDuration(value, ctx);
568
+ }
569
+ if (policy.numericDateDecoding === NumericDateDecoding.MILLISECONDS_SINCE_EPOCH) {
570
+ return Duration.ofMillis(value);
571
+ }
572
+ const { seconds, nanos } = splitEpochSeconds(value);
573
+ return Duration.ofSeconds(seconds, nanos);
574
+ },
575
+ encode: (value) => {
576
+ switch (policy.dateEncoding) {
577
+ case DateEncoding.ISO8601:
578
+ return value.toString();
579
+ case DateEncoding.MILLISECONDS_SINCE_EPOCH:
580
+ return value.toMillis();
581
+ case DateEncoding.DECIMAL_SECONDS_SINCE_EPOCH:
582
+ return secondsToNumber(value.seconds(), value.nano());
583
+ }
584
+ },
585
+ });
586
+ }
587
+ }
588
+ function createDateSchema(policy) {
589
+ switch (policy.format) {
590
+ case 'json':
591
+ return z.codec(DATE_JSON_INPUT_SCHEMA, DATE_OUTPUT_SCHEMA, {
592
+ decode: (value, ctx) => {
593
+ if (typeof value === 'string') {
594
+ return parseIsoDate(value, ctx);
595
+ }
596
+ if (policy.numericDateDecoding === NumericDateDecoding.MILLISECONDS_SINCE_EPOCH) {
597
+ return new Date(value);
598
+ }
599
+ return new Date(value * 1000);
600
+ },
601
+ encode: (value) => {
602
+ switch (policy.dateEncoding) {
603
+ case DateEncoding.ISO8601:
604
+ return value.toISOString();
605
+ case DateEncoding.MILLISECONDS_SINCE_EPOCH:
606
+ return value.getTime();
607
+ case DateEncoding.DECIMAL_SECONDS_SINCE_EPOCH:
608
+ return value.getTime() / 1000;
609
+ }
610
+ },
611
+ });
612
+ case 'cbor':
613
+ return z.codec(DATE_CBOR_INPUT_SCHEMA, DATE_OUTPUT_SCHEMA, {
614
+ decode: (value, ctx) => {
615
+ if (typeof value === 'string') {
616
+ return parseIsoDate(value, ctx);
617
+ }
618
+ if (typeof value === 'number') {
619
+ if (policy.numericDateDecoding === NumericDateDecoding.MILLISECONDS_SINCE_EPOCH) {
620
+ return new Date(value);
621
+ }
622
+ return new Date(value * 1000);
623
+ }
624
+ const tagged = decodeTaggedTemporal(value, ctx);
625
+ if (tagged === z.NEVER) {
626
+ return z.NEVER;
627
+ }
628
+ return tagged.tag === isoDateTimeTag
629
+ ? parseIsoDate(tagged.value, ctx)
630
+ : new Date(tagged.value * 1000);
631
+ },
632
+ encode: taggedTemporalEncoder(policy.dateEncoding, (date) => date.toISOString(), (date) => date.getTime(), (date) => date.getTime() / 1000, (date) => date),
633
+ });
634
+ }
635
+ }
636
+ function instantCodecForPolicy(policy) {
637
+ return codecForPolicy(instantCodecByPolicy, policy, createInstantSchema);
638
+ }
639
+ function zonedDateTimeCodecForPolicy(policy) {
640
+ return codecForPolicy(zonedDateTimeCodecByPolicy, policy, createZonedDateTimeSchema);
641
+ }
642
+ function offsetDateTimeCodecForPolicy(policy) {
643
+ return codecForPolicy(offsetDateTimeCodecByPolicy, policy, createOffsetDateTimeSchema);
644
+ }
645
+ function offsetTimeCodecForPolicy(policy) {
646
+ return codecForPolicy(offsetTimeCodecByPolicy, policy, createOffsetTimeSchema);
647
+ }
648
+ function localDateTimeCodecForPolicy(policy) {
649
+ return codecForPolicy(localDateTimeCodecByPolicy, policy, createLocalDateTimeSchema);
650
+ }
651
+ function localDateCodecForPolicy(policy) {
652
+ return codecForPolicy(localDateCodecByPolicy, policy, createLocalDateSchema);
653
+ }
654
+ function localTimeCodecForPolicy(policy) {
655
+ return codecForPolicy(localTimeCodecByPolicy, policy, createLocalTimeSchema);
656
+ }
657
+ function durationCodecForPolicy(policy) {
658
+ return codecForPolicy(durationCodecByPolicy, policy, createDurationSchema);
659
+ }
660
+ function dateCodecForPolicy(policy) {
661
+ return codecForPolicy(dateCodecByPolicy, policy, createDateSchema);
662
+ }
663
+ export const DateSchema = defineSchema((runtime) => dateCodecForPolicy(runtime.policy), {
664
+ id: Symbol.for('@outfoxx/sunday/DateSchema'),
665
+ debugName: 'DateSchema',
666
+ });
667
+ export const InstantSchema = defineSchema((runtime) => instantCodecForPolicy(runtime.policy), {
668
+ id: Symbol.for('@outfoxx/sunday/InstantSchema'),
669
+ debugName: 'InstantSchema',
670
+ });
671
+ export const ZonedDateTimeSchema = defineSchema((runtime) => zonedDateTimeCodecForPolicy(runtime.policy), {
672
+ id: Symbol.for('@outfoxx/sunday/ZonedDateTimeSchema'),
673
+ debugName: 'ZonedDateTimeSchema',
674
+ });
675
+ export const OffsetDateTimeSchema = defineSchema((runtime) => offsetDateTimeCodecForPolicy(runtime.policy), {
676
+ id: Symbol.for('@outfoxx/sunday/OffsetDateTimeSchema'),
677
+ debugName: 'OffsetDateTimeSchema',
678
+ });
679
+ export const OffsetTimeSchema = defineSchema((runtime) => offsetTimeCodecForPolicy(runtime.policy), {
680
+ id: Symbol.for('@outfoxx/sunday/OffsetTimeSchema'),
681
+ debugName: 'OffsetTimeSchema',
682
+ });
683
+ export const LocalDateTimeSchema = defineSchema((runtime) => localDateTimeCodecForPolicy(runtime.policy), {
684
+ id: Symbol.for('@outfoxx/sunday/LocalDateTimeSchema'),
685
+ debugName: 'LocalDateTimeSchema',
686
+ });
687
+ export const LocalDateSchema = defineSchema((runtime) => localDateCodecForPolicy(runtime.policy), {
688
+ id: Symbol.for('@outfoxx/sunday/LocalDateSchema'),
689
+ debugName: 'LocalDateSchema',
690
+ });
691
+ export const LocalTimeSchema = defineSchema((runtime) => localTimeCodecForPolicy(runtime.policy), {
692
+ id: Symbol.for('@outfoxx/sunday/LocalTimeSchema'),
693
+ debugName: 'LocalTimeSchema',
694
+ });
695
+ export const DurationSchema = defineSchema((runtime) => durationCodecForPolicy(runtime.policy), {
696
+ id: Symbol.for('@outfoxx/sunday/DurationSchema'),
697
+ debugName: 'DurationSchema',
698
+ });
699
+ //# sourceMappingURL=date-time-types.js.map