effect 4.0.0-beta.99 → 4.0.0-rc.108
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/AGENTS.md +381 -0
- package/CLAUDE.md +381 -0
- package/README.md +14 -19
- package/ai-docs/README.md +44 -0
- package/ai-docs/package.json +36 -0
- package/ai-docs/src/01_effect/01_basics/01_effect-gen.ts +30 -0
- package/ai-docs/src/01_effect/01_basics/02_effect-fn.ts +39 -0
- package/ai-docs/src/01_effect/01_basics/10_creating-effects.ts +74 -0
- package/ai-docs/src/01_effect/01_basics/index.md +5 -0
- package/ai-docs/src/01_effect/02_schema/10_schema-basics.ts +43 -0
- package/ai-docs/src/01_effect/02_schema/index.md +7 -0
- package/ai-docs/src/01_effect/03_services/01_service.ts +45 -0
- package/ai-docs/src/01_effect/03_services/10_reference.ts +10 -0
- package/ai-docs/src/01_effect/03_services/20_layer-composition.ts +70 -0
- package/ai-docs/src/01_effect/03_services/20_layer-unwrap.ts +66 -0
- package/ai-docs/src/01_effect/03_services/index.md +5 -0
- package/ai-docs/src/01_effect/04_errors/01_error-handling.ts +30 -0
- package/ai-docs/src/01_effect/04_errors/10_catch-tags.ts +24 -0
- package/ai-docs/src/01_effect/04_errors/20_reason-errors.ts +64 -0
- package/ai-docs/src/01_effect/04_errors/index.md +1 -0
- package/ai-docs/src/01_effect/05_resources/10_acquire-release.ts +105 -0
- package/ai-docs/src/01_effect/05_resources/20_layer-side-effects.ts +31 -0
- package/ai-docs/src/01_effect/05_resources/30_layer-map.ts +86 -0
- package/ai-docs/src/01_effect/05_resources/index.md +3 -0
- package/ai-docs/src/01_effect/06_running/10_run-main.ts +30 -0
- package/ai-docs/src/01_effect/06_running/20_layer-launch.ts +27 -0
- package/ai-docs/src/01_effect/06_running/index.md +1 -0
- package/ai-docs/src/01_effect/07_pubsub/10_pubsub.ts +56 -0
- package/ai-docs/src/01_effect/07_pubsub/index.md +3 -0
- package/ai-docs/src/03_stream/10_creating-streams.ts +103 -0
- package/ai-docs/src/03_stream/20_consuming-streams.ts +137 -0
- package/ai-docs/src/03_stream/30_encoding.ts +165 -0
- package/ai-docs/src/03_stream/index.md +4 -0
- package/ai-docs/src/04_integration/10_managed-runtime.ts +129 -0
- package/ai-docs/src/04_integration/index.md +5 -0
- package/ai-docs/src/05_batching/10_request-resolver.ts +89 -0
- package/ai-docs/src/05_batching/index.md +3 -0
- package/ai-docs/src/06_schedule/10_schedules.ts +110 -0
- package/ai-docs/src/06_schedule/index.md +3 -0
- package/ai-docs/src/07_datetime/10_creating-and-formatting.ts +30 -0
- package/ai-docs/src/07_datetime/20_time-zones.ts +44 -0
- package/ai-docs/src/07_datetime/index.md +5 -0
- package/ai-docs/src/08_observability/10_logging.ts +66 -0
- package/ai-docs/src/08_observability/20_otlp-tracing.ts +95 -0
- package/ai-docs/src/08_observability/index.md +7 -0
- package/ai-docs/src/09_testing/10_effect-tests.ts +55 -0
- package/ai-docs/src/09_testing/20_layer-tests.ts +138 -0
- package/ai-docs/src/09_testing/index.md +1 -0
- package/ai-docs/src/10_predicate/01_basics.ts +14 -0
- package/ai-docs/src/10_predicate/index.md +9 -0
- package/ai-docs/src/50_http-client/10_basics.ts +102 -0
- package/ai-docs/src/50_http-client/index.md +3 -0
- package/ai-docs/src/51_http-server/10_basics.ts +116 -0
- package/ai-docs/src/51_http-server/fixtures/api/Api.ts +14 -0
- package/ai-docs/src/51_http-server/fixtures/api/Authorization.ts +36 -0
- package/ai-docs/src/51_http-server/fixtures/api/System.ts +10 -0
- package/ai-docs/src/51_http-server/fixtures/api/Users.ts +91 -0
- package/ai-docs/src/51_http-server/fixtures/domain/User.ts +12 -0
- package/ai-docs/src/51_http-server/fixtures/domain/UserErrors.ts +22 -0
- package/ai-docs/src/51_http-server/fixtures/server/Authorization.ts +36 -0
- package/ai-docs/src/51_http-server/fixtures/server/Users/http.ts +71 -0
- package/ai-docs/src/51_http-server/fixtures/server/Users.ts +62 -0
- package/ai-docs/src/51_http-server/index.md +3 -0
- package/ai-docs/src/60_child-process/10_working-with-child-processes.ts +117 -0
- package/ai-docs/src/60_child-process/index.md +3 -0
- package/ai-docs/src/70_cli/10_basics.ts +136 -0
- package/ai-docs/src/70_cli/index.md +5 -0
- package/ai-docs/src/71_ai/10_language-model.ts +156 -0
- package/ai-docs/src/71_ai/20_tools.ts +226 -0
- package/ai-docs/src/71_ai/30_chat.ts +158 -0
- package/ai-docs/src/71_ai/fixtures/domain/LaunchPlan.ts +9 -0
- package/ai-docs/src/71_ai/index.md +5 -0
- package/ai-docs/src/80_cluster/10_entities.ts +97 -0
- package/ai-docs/src/80_cluster/index.md +4 -0
- package/ai-docs/src/index.md +10 -0
- package/ai-docs/tsconfig.json +24 -0
- package/dist/Array.d.ts +971 -1037
- package/dist/Array.d.ts.map +1 -1
- package/dist/Array.js +462 -412
- package/dist/Array.js.map +1 -1
- package/dist/BigDecimal.d.ts +433 -756
- package/dist/BigDecimal.d.ts.map +1 -1
- package/dist/BigDecimal.js +200 -325
- package/dist/BigDecimal.js.map +1 -1
- package/dist/BigInt.d.ts +207 -267
- package/dist/BigInt.d.ts.map +1 -1
- package/dist/BigInt.js +107 -135
- package/dist/BigInt.js.map +1 -1
- package/dist/Boolean.d.ts +146 -188
- package/dist/Boolean.d.ts.map +1 -1
- package/dist/Boolean.js +64 -84
- package/dist/Boolean.js.map +1 -1
- package/dist/Brand.d.ts +3 -3
- package/dist/Brand.d.ts.map +1 -1
- package/dist/Brand.js +4 -3
- package/dist/Brand.js.map +1 -1
- package/dist/Cache.d.ts +409 -256
- package/dist/Cache.d.ts.map +1 -1
- package/dist/Cache.js +213 -134
- package/dist/Cache.js.map +1 -1
- package/dist/Cause.d.ts +167 -277
- package/dist/Cause.d.ts.map +1 -1
- package/dist/Cause.js +122 -176
- package/dist/Cause.js.map +1 -1
- package/dist/Channel.d.ts +756 -769
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +588 -449
- package/dist/Channel.js.map +1 -1
- package/dist/ChannelSchema.d.ts +1 -1
- package/dist/ChannelSchema.d.ts.map +1 -1
- package/dist/ChannelSchema.js.map +1 -1
- package/dist/Chunk.d.ts +834 -1173
- package/dist/Chunk.d.ts.map +1 -1
- package/dist/Chunk.js +326 -439
- package/dist/Chunk.js.map +1 -1
- package/dist/Clock.d.ts +180 -49
- package/dist/Clock.d.ts.map +1 -1
- package/dist/Clock.js +96 -31
- package/dist/Clock.js.map +1 -1
- package/dist/Combiner.d.ts +20 -33
- package/dist/Combiner.d.ts.map +1 -1
- package/dist/Combiner.js +18 -30
- package/dist/Combiner.js.map +1 -1
- package/dist/Config.d.ts +226 -174
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js +361 -267
- package/dist/Config.js.map +1 -1
- package/dist/ConfigProvider.d.ts +229 -71
- package/dist/ConfigProvider.d.ts.map +1 -1
- package/dist/ConfigProvider.js +164 -95
- package/dist/ConfigProvider.js.map +1 -1
- package/dist/Console.d.ts +233 -33
- package/dist/Console.d.ts.map +1 -1
- package/dist/Console.js +232 -32
- package/dist/Console.js.map +1 -1
- package/dist/Context.d.ts +153 -277
- package/dist/Context.d.ts.map +1 -1
- package/dist/Context.js +172 -236
- package/dist/Context.js.map +1 -1
- package/dist/Cron.d.ts +144 -176
- package/dist/Cron.d.ts.map +1 -1
- package/dist/Cron.js +227 -162
- package/dist/Cron.js.map +1 -1
- package/dist/Crypto.d.ts +13 -15
- package/dist/Crypto.d.ts.map +1 -1
- package/dist/Crypto.js +22 -15
- package/dist/Crypto.js.map +1 -1
- package/dist/Data.d.ts +60 -80
- package/dist/Data.d.ts.map +1 -1
- package/dist/Data.js +18 -24
- package/dist/Data.js.map +1 -1
- package/dist/DateTime.d.ts +562 -660
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/DateTime.js +307 -362
- package/dist/DateTime.js.map +1 -1
- package/dist/Deferred.d.ts +253 -256
- package/dist/Deferred.d.ts.map +1 -1
- package/dist/Deferred.js +110 -98
- package/dist/Deferred.js.map +1 -1
- package/dist/Duration.d.ts +216 -308
- package/dist/Duration.d.ts.map +1 -1
- package/dist/Duration.js +157 -188
- package/dist/Duration.js.map +1 -1
- package/dist/Effect.d.ts +3142 -3345
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +1452 -1570
- package/dist/Effect.js.map +1 -1
- package/dist/Effectable.js.map +1 -1
- package/dist/Encoding.d.ts +22 -40
- package/dist/Encoding.d.ts.map +1 -1
- package/dist/Encoding.js +22 -40
- package/dist/Encoding.js.map +1 -1
- package/dist/Equal.d.ts +33 -37
- package/dist/Equal.d.ts.map +1 -1
- package/dist/Equal.js +39 -23
- package/dist/Equal.js.map +1 -1
- package/dist/Equivalence.d.ts +103 -105
- package/dist/Equivalence.d.ts.map +1 -1
- package/dist/Equivalence.js +77 -79
- package/dist/Equivalence.js.map +1 -1
- package/dist/ErrorReporter.d.ts +51 -27
- package/dist/ErrorReporter.d.ts.map +1 -1
- package/dist/ErrorReporter.js +50 -26
- package/dist/ErrorReporter.js.map +1 -1
- package/dist/ExecutionPlan.d.ts +86 -55
- package/dist/ExecutionPlan.d.ts.map +1 -1
- package/dist/ExecutionPlan.js +8 -29
- package/dist/ExecutionPlan.js.map +1 -1
- package/dist/Exit.d.ts +116 -192
- package/dist/Exit.d.ts.map +1 -1
- package/dist/Exit.js +82 -130
- package/dist/Exit.js.map +1 -1
- package/dist/Fiber.d.ts +83 -147
- package/dist/Fiber.d.ts.map +1 -1
- package/dist/Fiber.js +48 -87
- package/dist/Fiber.js.map +1 -1
- package/dist/FiberHandle.d.ts +152 -105
- package/dist/FiberHandle.d.ts.map +1 -1
- package/dist/FiberHandle.js +109 -75
- package/dist/FiberHandle.js.map +1 -1
- package/dist/FiberMap.d.ts +213 -168
- package/dist/FiberMap.d.ts.map +1 -1
- package/dist/FiberMap.js +114 -89
- package/dist/FiberMap.js.map +1 -1
- package/dist/FiberSet.d.ts +123 -81
- package/dist/FiberSet.d.ts.map +1 -1
- package/dist/FiberSet.js +86 -60
- package/dist/FiberSet.js.map +1 -1
- package/dist/FileSystem.d.ts +154 -265
- package/dist/FileSystem.d.ts.map +1 -1
- package/dist/FileSystem.js +42 -147
- package/dist/FileSystem.js.map +1 -1
- package/dist/Filter.d.ts +61 -33
- package/dist/Filter.d.ts.map +1 -1
- package/dist/Filter.js +26 -15
- package/dist/Filter.js.map +1 -1
- package/dist/Formatter.d.ts +24 -32
- package/dist/Formatter.d.ts.map +1 -1
- package/dist/Formatter.js +55 -60
- package/dist/Formatter.js.map +1 -1
- package/dist/Function.d.ts +106 -148
- package/dist/Function.d.ts.map +1 -1
- package/dist/Function.js +81 -62
- package/dist/Function.js.map +1 -1
- package/dist/Graph.d.ts +360 -714
- package/dist/Graph.d.ts.map +1 -1
- package/dist/Graph.js +168 -297
- package/dist/Graph.js.map +1 -1
- package/dist/HKT.d.ts +12 -6
- package/dist/HKT.d.ts.map +1 -1
- package/dist/Hash.d.ts +47 -83
- package/dist/Hash.d.ts.map +1 -1
- package/dist/Hash.js +46 -68
- package/dist/Hash.js.map +1 -1
- package/dist/HashMap.d.ts +319 -411
- package/dist/HashMap.d.ts.map +1 -1
- package/dist/HashMap.js +122 -166
- package/dist/HashMap.js.map +1 -1
- package/dist/HashRing.d.ts.map +1 -1
- package/dist/HashRing.js +1 -0
- package/dist/HashRing.js.map +1 -1
- package/dist/HashSet.d.ts +177 -284
- package/dist/HashSet.d.ts.map +1 -1
- package/dist/HashSet.js +68 -109
- package/dist/HashSet.js.map +1 -1
- package/dist/Inspectable.d.ts +19 -18
- package/dist/Inspectable.d.ts.map +1 -1
- package/dist/Inspectable.js +20 -16
- package/dist/Inspectable.js.map +1 -1
- package/dist/Iterable.d.ts +620 -786
- package/dist/Iterable.d.ts.map +1 -1
- package/dist/Iterable.js +241 -317
- package/dist/Iterable.js.map +1 -1
- package/dist/JsonPatch.d.ts +11 -13
- package/dist/JsonPatch.d.ts.map +1 -1
- package/dist/JsonPatch.js +46 -103
- package/dist/JsonPatch.js.map +1 -1
- package/dist/JsonPointer.d.ts +8 -8
- package/dist/JsonPointer.js +8 -8
- package/dist/JsonPointer.js.map +1 -1
- package/dist/JsonSchema.d.ts +98 -44
- package/dist/JsonSchema.d.ts.map +1 -1
- package/dist/JsonSchema.js +319 -241
- package/dist/JsonSchema.js.map +1 -1
- package/dist/Latch.d.ts +23 -35
- package/dist/Latch.d.ts.map +1 -1
- package/dist/Latch.js +16 -28
- package/dist/Latch.js.map +1 -1
- package/dist/Layer.d.ts +359 -260
- package/dist/Layer.d.ts.map +1 -1
- package/dist/Layer.js +202 -180
- package/dist/Layer.js.map +1 -1
- package/dist/LayerMap.d.ts +42 -29
- package/dist/LayerMap.d.ts.map +1 -1
- package/dist/LayerMap.js +31 -21
- package/dist/LayerMap.js.map +1 -1
- package/dist/LayerRef.d.ts +6 -2
- package/dist/LayerRef.d.ts.map +1 -1
- package/dist/LayerRef.js +6 -2
- package/dist/LayerRef.js.map +1 -1
- package/dist/LogLevel.d.ts +114 -214
- package/dist/LogLevel.d.ts.map +1 -1
- package/dist/LogLevel.js +41 -76
- package/dist/LogLevel.js.map +1 -1
- package/dist/Logger.d.ts +218 -467
- package/dist/Logger.d.ts.map +1 -1
- package/dist/Logger.js +208 -453
- package/dist/Logger.js.map +1 -1
- package/dist/ManagedRuntime.d.ts +16 -5
- package/dist/ManagedRuntime.d.ts.map +1 -1
- package/dist/ManagedRuntime.js +10 -5
- package/dist/ManagedRuntime.js.map +1 -1
- package/dist/Match.d.ts +217 -252
- package/dist/Match.d.ts.map +1 -1
- package/dist/Match.js +150 -183
- package/dist/Match.js.map +1 -1
- package/dist/Metric.d.ts +442 -993
- package/dist/Metric.d.ts.map +1 -1
- package/dist/Metric.js +202 -645
- package/dist/Metric.js.map +1 -1
- package/dist/MutableHashMap.d.ts +144 -173
- package/dist/MutableHashMap.d.ts.map +1 -1
- package/dist/MutableHashMap.js +68 -79
- package/dist/MutableHashMap.js.map +1 -1
- package/dist/MutableHashSet.d.ts +84 -89
- package/dist/MutableHashSet.d.ts.map +1 -1
- package/dist/MutableHashSet.js +44 -47
- package/dist/MutableHashSet.js.map +1 -1
- package/dist/MutableList.d.ts +71 -370
- package/dist/MutableList.d.ts.map +1 -1
- package/dist/MutableList.js +63 -284
- package/dist/MutableList.js.map +1 -1
- package/dist/MutableRef.d.ts +420 -243
- package/dist/MutableRef.d.ts.map +1 -1
- package/dist/MutableRef.js +209 -120
- package/dist/MutableRef.js.map +1 -1
- package/dist/Newtype.d.ts +21 -14
- package/dist/Newtype.d.ts.map +1 -1
- package/dist/Newtype.js +15 -13
- package/dist/Newtype.js.map +1 -1
- package/dist/NonEmptyIterable.d.ts +7 -137
- package/dist/NonEmptyIterable.d.ts.map +1 -1
- package/dist/NonEmptyIterable.js +5 -93
- package/dist/NonEmptyIterable.js.map +1 -1
- package/dist/Number.d.ts +196 -233
- package/dist/Number.d.ts.map +1 -1
- package/dist/Number.js +90 -109
- package/dist/Number.js.map +1 -1
- package/dist/Optic.d.ts +132 -210
- package/dist/Optic.d.ts.map +1 -1
- package/dist/Optic.js +221 -324
- package/dist/Optic.js.map +1 -1
- package/dist/Option.d.ts +447 -812
- package/dist/Option.d.ts.map +1 -1
- package/dist/Option.js +213 -393
- package/dist/Option.js.map +1 -1
- package/dist/Order.d.ts +109 -109
- package/dist/Order.js +91 -91
- package/dist/Order.js.map +1 -1
- package/dist/Ordering.d.ts +20 -23
- package/dist/Ordering.d.ts.map +1 -1
- package/dist/Ordering.js +8 -9
- package/dist/Ordering.js.map +1 -1
- package/dist/PartitionedSemaphore.d.ts.map +1 -1
- package/dist/PartitionedSemaphore.js +1 -4
- package/dist/PartitionedSemaphore.js.map +1 -1
- package/dist/Path.d.ts +38 -41
- package/dist/Path.d.ts.map +1 -1
- package/dist/Path.js +3 -4
- package/dist/Path.js.map +1 -1
- package/dist/Pipeable.d.ts +6 -5
- package/dist/Pipeable.d.ts.map +1 -1
- package/dist/Pipeable.js +2 -2
- package/dist/Pipeable.js.map +1 -1
- package/dist/PlatformError.d.ts +4 -4
- package/dist/PlatformError.js +3 -3
- package/dist/PlatformError.js.map +1 -1
- package/dist/Pool.d.ts +4 -2
- package/dist/Pool.d.ts.map +1 -1
- package/dist/Pool.js +4 -2
- package/dist/Pool.js.map +1 -1
- package/dist/Predicate.d.ts +200 -181
- package/dist/Predicate.d.ts.map +1 -1
- package/dist/Predicate.js +100 -108
- package/dist/Predicate.js.map +1 -1
- package/dist/PrimaryKey.d.ts +7 -7
- package/dist/PrimaryKey.js +5 -5
- package/dist/PrimaryKey.js.map +1 -1
- package/dist/PubSub.d.ts +425 -494
- package/dist/PubSub.d.ts.map +1 -1
- package/dist/PubSub.js +373 -362
- package/dist/PubSub.js.map +1 -1
- package/dist/Pull.d.ts +24 -18
- package/dist/Pull.d.ts.map +1 -1
- package/dist/Pull.js +11 -9
- package/dist/Pull.js.map +1 -1
- package/dist/Queue.d.ts +200 -159
- package/dist/Queue.d.ts.map +1 -1
- package/dist/Queue.js +166 -138
- package/dist/Queue.js.map +1 -1
- package/dist/Random.d.ts +49 -74
- package/dist/Random.d.ts.map +1 -1
- package/dist/Random.js +35 -54
- package/dist/Random.js.map +1 -1
- package/dist/RcMap.d.ts +121 -63
- package/dist/RcMap.d.ts.map +1 -1
- package/dist/RcMap.js +42 -21
- package/dist/RcMap.js.map +1 -1
- package/dist/RcRef.d.ts +24 -13
- package/dist/RcRef.d.ts.map +1 -1
- package/dist/RcRef.js +15 -9
- package/dist/RcRef.js.map +1 -1
- package/dist/Record.d.ts +361 -466
- package/dist/Record.d.ts.map +1 -1
- package/dist/Record.js +163 -216
- package/dist/Record.js.map +1 -1
- package/dist/Redactable.d.ts +6 -2
- package/dist/Redactable.d.ts.map +1 -1
- package/dist/Redactable.js +7 -2
- package/dist/Redactable.js.map +1 -1
- package/dist/Redacted.d.ts +25 -25
- package/dist/Redacted.d.ts.map +1 -1
- package/dist/Redacted.js +19 -20
- package/dist/Redacted.js.map +1 -1
- package/dist/Reducer.d.ts +8 -15
- package/dist/Reducer.d.ts.map +1 -1
- package/dist/Reducer.js +6 -12
- package/dist/Reducer.js.map +1 -1
- package/dist/Ref.d.ts +95 -165
- package/dist/Ref.d.ts.map +1 -1
- package/dist/Ref.js +75 -122
- package/dist/Ref.js.map +1 -1
- package/dist/References.d.ts +102 -213
- package/dist/References.d.ts.map +1 -1
- package/dist/References.js +102 -213
- package/dist/References.js.map +1 -1
- package/dist/RegExp.d.ts +10 -14
- package/dist/RegExp.d.ts.map +1 -1
- package/dist/RegExp.js +10 -14
- package/dist/RegExp.js.map +1 -1
- package/dist/Request.d.ts +31 -21
- package/dist/Request.d.ts.map +1 -1
- package/dist/Request.js +25 -19
- package/dist/Request.js.map +1 -1
- package/dist/RequestResolver.d.ts +201 -90
- package/dist/RequestResolver.d.ts.map +1 -1
- package/dist/RequestResolver.js +87 -41
- package/dist/RequestResolver.js.map +1 -1
- package/dist/Resource.js.map +1 -1
- package/dist/Result.d.ts +302 -470
- package/dist/Result.d.ts.map +1 -1
- package/dist/Result.js +135 -218
- package/dist/Result.js.map +1 -1
- package/dist/Runtime.d.ts +50 -75
- package/dist/Runtime.d.ts.map +1 -1
- package/dist/Runtime.js +39 -60
- package/dist/Runtime.js.map +1 -1
- package/dist/Schedule.d.ts +292 -1638
- package/dist/Schedule.d.ts.map +1 -1
- package/dist/Schedule.js +164 -805
- package/dist/Schedule.js.map +1 -1
- package/dist/Scheduler.d.ts +5 -5
- package/dist/Scheduler.d.ts.map +1 -1
- package/dist/Scheduler.js +18 -6
- package/dist/Scheduler.js.map +1 -1
- package/dist/Schema.d.ts +2056 -1269
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +2868 -1135
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +64 -72
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +698 -468
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaGetter.d.ts +236 -188
- package/dist/SchemaGetter.d.ts.map +1 -1
- package/dist/SchemaGetter.js +281 -234
- package/dist/SchemaGetter.js.map +1 -1
- package/dist/SchemaIssue.d.ts +219 -190
- package/dist/SchemaIssue.d.ts.map +1 -1
- package/dist/SchemaIssue.js +303 -309
- package/dist/SchemaIssue.js.map +1 -1
- package/dist/SchemaParser.d.ts +32 -2
- package/dist/SchemaParser.d.ts.map +1 -1
- package/dist/SchemaParser.js +170 -118
- package/dist/SchemaParser.js.map +1 -1
- package/dist/SchemaRepresentation.d.ts +433 -1511
- package/dist/SchemaRepresentation.d.ts.map +1 -1
- package/dist/SchemaRepresentation.js +301 -2854
- package/dist/SchemaRepresentation.js.map +1 -1
- package/dist/SchemaTransformation.d.ts +117 -77
- package/dist/SchemaTransformation.d.ts.map +1 -1
- package/dist/SchemaTransformation.js +139 -104
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/Scope.d.ts +123 -151
- package/dist/Scope.d.ts.map +1 -1
- package/dist/Scope.js +72 -92
- package/dist/Scope.js.map +1 -1
- package/dist/ScopedCache.js +1 -1
- package/dist/ScopedCache.js.map +1 -1
- package/dist/ScopedRef.d.ts +3 -3
- package/dist/ScopedRef.d.ts.map +1 -1
- package/dist/ScopedRef.js +2 -2
- package/dist/ScopedRef.js.map +1 -1
- package/dist/Semaphore.d.ts +101 -13
- package/dist/Semaphore.d.ts.map +1 -1
- package/dist/Semaphore.js +78 -39
- package/dist/Semaphore.js.map +1 -1
- package/dist/Sink.d.ts +118 -108
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Sink.js +107 -100
- package/dist/Sink.js.map +1 -1
- package/dist/Stdio.d.ts +18 -5
- package/dist/Stdio.d.ts.map +1 -1
- package/dist/Stdio.js +6 -3
- package/dist/Stdio.js.map +1 -1
- package/dist/Stream.d.ts +2467 -2962
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +1154 -1413
- package/dist/Stream.js.map +1 -1
- package/dist/String.d.ts +262 -308
- package/dist/String.d.ts.map +1 -1
- package/dist/String.js +184 -215
- package/dist/String.js.map +1 -1
- package/dist/Struct.d.ts +109 -114
- package/dist/Struct.d.ts.map +1 -1
- package/dist/Struct.js +46 -54
- package/dist/Struct.js.map +1 -1
- package/dist/SubscriptionRef.d.ts +282 -250
- package/dist/SubscriptionRef.d.ts.map +1 -1
- package/dist/SubscriptionRef.js +104 -92
- package/dist/SubscriptionRef.js.map +1 -1
- package/dist/Symbol.d.ts +3 -3
- package/dist/Symbol.js +3 -3
- package/dist/Symbol.js.map +1 -1
- package/dist/SynchronizedRef.js +1 -1
- package/dist/SynchronizedRef.js.map +1 -1
- package/dist/Take.js.map +1 -1
- package/dist/Terminal.d.ts +2 -2
- package/dist/Terminal.js +2 -2
- package/dist/Terminal.js.map +1 -1
- package/dist/Tracer.d.ts +100 -54
- package/dist/Tracer.d.ts.map +1 -1
- package/dist/Tracer.js +41 -24
- package/dist/Tracer.js.map +1 -1
- package/dist/Trie.d.ts +287 -679
- package/dist/Trie.d.ts.map +1 -1
- package/dist/Trie.js +109 -251
- package/dist/Trie.js.map +1 -1
- package/dist/Tuple.d.ts +98 -131
- package/dist/Tuple.d.ts.map +1 -1
- package/dist/Tuple.js +42 -57
- package/dist/Tuple.js.map +1 -1
- package/dist/TxChunk.d.ts +201 -121
- package/dist/TxChunk.d.ts.map +1 -1
- package/dist/TxChunk.js +85 -56
- package/dist/TxChunk.js.map +1 -1
- package/dist/TxDeferred.d.ts +62 -46
- package/dist/TxDeferred.d.ts.map +1 -1
- package/dist/TxDeferred.js +30 -22
- package/dist/TxDeferred.js.map +1 -1
- package/dist/TxHashMap.d.ts +631 -779
- package/dist/TxHashMap.d.ts.map +1 -1
- package/dist/TxHashMap.js +268 -330
- package/dist/TxHashMap.js.map +1 -1
- package/dist/TxHashSet.d.ts +297 -236
- package/dist/TxHashSet.d.ts.map +1 -1
- package/dist/TxHashSet.js +130 -100
- package/dist/TxHashSet.js.map +1 -1
- package/dist/TxPriorityQueue.d.ts +126 -95
- package/dist/TxPriorityQueue.d.ts.map +1 -1
- package/dist/TxPriorityQueue.js +74 -56
- package/dist/TxPriorityQueue.js.map +1 -1
- package/dist/TxPubSub.d.ts +101 -88
- package/dist/TxPubSub.d.ts.map +1 -1
- package/dist/TxPubSub.js +87 -66
- package/dist/TxPubSub.js.map +1 -1
- package/dist/TxQueue.d.ts +200 -180
- package/dist/TxQueue.d.ts.map +1 -1
- package/dist/TxQueue.js +161 -137
- package/dist/TxQueue.js.map +1 -1
- package/dist/TxReentrantLock.d.ts +89 -114
- package/dist/TxReentrantLock.d.ts.map +1 -1
- package/dist/TxReentrantLock.js +75 -53
- package/dist/TxReentrantLock.js.map +1 -1
- package/dist/TxRef.d.ts +51 -32
- package/dist/TxRef.d.ts.map +1 -1
- package/dist/TxRef.js +23 -15
- package/dist/TxRef.js.map +1 -1
- package/dist/TxSemaphore.d.ts +129 -95
- package/dist/TxSemaphore.d.ts.map +1 -1
- package/dist/TxSemaphore.js +85 -70
- package/dist/TxSemaphore.js.map +1 -1
- package/dist/TxSubscriptionRef.d.ts +97 -70
- package/dist/TxSubscriptionRef.d.ts.map +1 -1
- package/dist/TxSubscriptionRef.js +44 -34
- package/dist/TxSubscriptionRef.js.map +1 -1
- package/dist/Types.d.ts +127 -70
- package/dist/Types.d.ts.map +1 -1
- package/dist/UndefinedOr.js.map +1 -1
- package/dist/Unify.d.ts +45 -65
- package/dist/Unify.d.ts.map +1 -1
- package/dist/Unify.js +6 -9
- package/dist/Unify.js.map +1 -1
- package/dist/Utils.d.ts +23 -16
- package/dist/Utils.d.ts.map +1 -1
- package/dist/Utils.js +3 -7
- package/dist/Utils.js.map +1 -1
- package/dist/index.d.ts +0 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -8
- package/dist/index.js.map +1 -1
- package/dist/internal/array.js.map +1 -1
- package/dist/internal/core.js +4 -3
- package/dist/internal/core.js.map +1 -1
- package/dist/internal/dateTime.js +5 -1
- package/dist/internal/dateTime.js.map +1 -1
- package/dist/internal/doNotation.js.map +1 -1
- package/dist/internal/effect.js +252 -108
- package/dist/internal/effect.js.map +1 -1
- package/dist/internal/equal.js.map +1 -1
- package/dist/internal/errors.js.map +1 -1
- package/dist/internal/executionPlan.js +52 -3
- package/dist/internal/executionPlan.js.map +1 -1
- package/dist/internal/hashMap.js +12 -8
- package/dist/internal/hashMap.js.map +1 -1
- package/dist/internal/hashSet.js.map +1 -1
- package/dist/internal/layer.js.map +1 -1
- package/dist/internal/matcher.js +2 -2
- package/dist/internal/matcher.js.map +1 -1
- package/dist/internal/metric.js.map +1 -1
- package/dist/internal/option.js.map +1 -1
- package/dist/internal/persistence.d.ts +2 -0
- package/dist/internal/persistence.d.ts.map +1 -0
- package/dist/internal/persistence.js +3 -0
- package/dist/internal/persistence.js.map +1 -0
- package/dist/internal/random.js.map +1 -1
- package/dist/internal/rcRef.js +18 -13
- package/dist/internal/rcRef.js.map +1 -1
- package/dist/internal/record.d.ts +0 -3
- package/dist/internal/record.d.ts.map +1 -1
- package/dist/internal/record.js +10 -5
- package/dist/internal/record.js.map +1 -1
- package/dist/internal/redacted.js.map +1 -1
- package/dist/internal/references.js +3 -4
- package/dist/internal/references.js.map +1 -1
- package/dist/internal/request.js.map +1 -1
- package/dist/internal/result.js.map +1 -1
- package/dist/internal/schedule.js.map +1 -1
- package/dist/internal/schema/annotations.js +15 -1
- package/dist/internal/schema/annotations.js.map +1 -1
- package/dist/internal/schema/cause.js.map +1 -1
- package/dist/internal/schema/fromJsonSchemaDocument.d.ts +2 -0
- package/dist/internal/schema/fromJsonSchemaDocument.d.ts.map +1 -0
- package/dist/internal/schema/fromJsonSchemaDocument.js +761 -0
- package/dist/internal/schema/fromJsonSchemaDocument.js.map +1 -0
- package/dist/internal/schema/fromRepresentation.d.ts +2 -0
- package/dist/internal/schema/fromRepresentation.d.ts.map +1 -0
- package/dist/internal/schema/fromRepresentation.js +245 -0
- package/dist/internal/schema/fromRepresentation.js.map +1 -0
- package/dist/internal/schema/parser.d.ts +14 -0
- package/dist/internal/schema/parser.d.ts.map +1 -0
- package/dist/internal/schema/parser.js +13 -0
- package/dist/internal/schema/parser.js.map +1 -0
- package/dist/internal/schema/schema.js +29 -49
- package/dist/internal/schema/schema.js.map +1 -1
- package/dist/internal/schema/toArbitrary.d.ts +2 -0
- package/dist/internal/schema/toArbitrary.d.ts.map +1 -0
- package/dist/internal/schema/{arbitrary.js → toArbitrary.js} +8 -83
- package/dist/internal/schema/toArbitrary.js.map +1 -0
- package/dist/internal/schema/toCodeDocument.d.ts +2 -0
- package/dist/internal/schema/toCodeDocument.d.ts.map +1 -0
- package/dist/internal/schema/toCodeDocument.js +438 -0
- package/dist/internal/schema/toCodeDocument.js.map +1 -0
- package/dist/internal/schema/toEquivalence.d.ts +2 -0
- package/dist/internal/schema/toEquivalence.d.ts.map +1 -0
- package/dist/internal/schema/{equivalence.js → toEquivalence.js} +15 -13
- package/dist/internal/schema/toEquivalence.js.map +1 -0
- package/dist/internal/schema/toJsonSchemaDocument.d.ts +2 -0
- package/dist/internal/schema/toJsonSchemaDocument.d.ts.map +1 -0
- package/dist/internal/schema/toJsonSchemaDocument.js +522 -0
- package/dist/internal/schema/toJsonSchemaDocument.js.map +1 -0
- package/dist/internal/schema/toRepresentation.d.ts +2 -0
- package/dist/internal/schema/toRepresentation.d.ts.map +1 -0
- package/dist/internal/schema/toRepresentation.js +351 -0
- package/dist/internal/schema/toRepresentation.js.map +1 -0
- package/dist/internal/stackTraceLimit.js +3 -6
- package/dist/internal/stackTraceLimit.js.map +1 -1
- package/dist/internal/stream.js.map +1 -1
- package/dist/internal/tracer.js.map +1 -1
- package/dist/internal/trie.js +24 -10
- package/dist/internal/trie.js.map +1 -1
- package/dist/testing/FastCheck.d.ts +8 -7
- package/dist/testing/FastCheck.d.ts.map +1 -1
- package/dist/testing/FastCheck.js +8 -7
- package/dist/testing/FastCheck.js.map +1 -1
- package/dist/testing/TestClock.d.ts +57 -28
- package/dist/testing/TestClock.d.ts.map +1 -1
- package/dist/testing/TestClock.js +65 -20
- package/dist/testing/TestClock.js.map +1 -1
- package/dist/testing/TestConsole.d.ts +32 -31
- package/dist/testing/TestConsole.d.ts.map +1 -1
- package/dist/testing/TestConsole.js +24 -22
- package/dist/testing/TestConsole.js.map +1 -1
- package/dist/testing/TestSchema.d.ts +31 -31
- package/dist/testing/TestSchema.d.ts.map +1 -1
- package/dist/testing/TestSchema.js +35 -34
- package/dist/testing/TestSchema.js.map +1 -1
- package/dist/testing/index.js.map +1 -1
- package/dist/unstable/ai/AiError.d.ts +121 -144
- package/dist/unstable/ai/AiError.d.ts.map +1 -1
- package/dist/unstable/ai/AiError.js +118 -140
- package/dist/unstable/ai/AiError.js.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.d.ts +22 -7
- package/dist/unstable/ai/AnthropicStructuredOutput.d.ts.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.js +87 -317
- package/dist/unstable/ai/AnthropicStructuredOutput.js.map +1 -1
- package/dist/unstable/ai/Chat.d.ts +132 -97
- package/dist/unstable/ai/Chat.d.ts.map +1 -1
- package/dist/unstable/ai/Chat.js +56 -52
- package/dist/unstable/ai/Chat.js.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.d.ts +1 -1
- package/dist/unstable/ai/EmbeddingModel.js +1 -1
- package/dist/unstable/ai/EmbeddingModel.js.map +1 -1
- package/dist/unstable/ai/IdGenerator.d.ts +32 -28
- package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
- package/dist/unstable/ai/IdGenerator.js +26 -21
- package/dist/unstable/ai/IdGenerator.js.map +1 -1
- package/dist/unstable/ai/LanguageModel.d.ts +111 -68
- package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
- package/dist/unstable/ai/LanguageModel.js +127 -83
- package/dist/unstable/ai/LanguageModel.js.map +1 -1
- package/dist/unstable/ai/McpProtocol.d.ts +30 -0
- package/dist/unstable/ai/McpProtocol.d.ts.map +1 -0
- package/dist/unstable/ai/McpProtocol.js +20 -0
- package/dist/unstable/ai/McpProtocol.js.map +1 -0
- package/dist/unstable/ai/McpSchema.d.ts +320 -254
- package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
- package/dist/unstable/ai/McpSchema.js +79 -71
- package/dist/unstable/ai/McpSchema.js.map +1 -1
- package/dist/unstable/ai/McpServer.d.ts +71 -62
- package/dist/unstable/ai/McpServer.d.ts.map +1 -1
- package/dist/unstable/ai/McpServer.js +777 -245
- package/dist/unstable/ai/McpServer.js.map +1 -1
- package/dist/unstable/ai/Model.d.ts +8 -19
- package/dist/unstable/ai/Model.d.ts.map +1 -1
- package/dist/unstable/ai/Model.js +9 -20
- package/dist/unstable/ai/Model.js.map +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.d.ts +33 -11
- package/dist/unstable/ai/OpenAiStructuredOutput.d.ts.map +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.js +194 -378
- package/dist/unstable/ai/OpenAiStructuredOutput.js.map +1 -1
- package/dist/unstable/ai/Prompt.d.ts +131 -44
- package/dist/unstable/ai/Prompt.d.ts.map +1 -1
- package/dist/unstable/ai/Prompt.js +100 -36
- package/dist/unstable/ai/Prompt.js.map +1 -1
- package/dist/unstable/ai/Response.d.ts +47 -33
- package/dist/unstable/ai/Response.d.ts.map +1 -1
- package/dist/unstable/ai/Response.js +23 -18
- package/dist/unstable/ai/Response.js.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.js.map +1 -1
- package/dist/unstable/ai/Telemetry.d.ts +46 -13
- package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
- package/dist/unstable/ai/Telemetry.js +18 -7
- package/dist/unstable/ai/Telemetry.js.map +1 -1
- package/dist/unstable/ai/Tokenizer.d.ts +14 -3
- package/dist/unstable/ai/Tokenizer.d.ts.map +1 -1
- package/dist/unstable/ai/Tokenizer.js +10 -2
- package/dist/unstable/ai/Tokenizer.js.map +1 -1
- package/dist/unstable/ai/Tool.d.ts +63 -44
- package/dist/unstable/ai/Tool.d.ts.map +1 -1
- package/dist/unstable/ai/Tool.js +59 -42
- package/dist/unstable/ai/Tool.js.map +1 -1
- package/dist/unstable/ai/Toolkit.d.ts +35 -9
- package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
- package/dist/unstable/ai/Toolkit.js +32 -14
- package/dist/unstable/ai/Toolkit.js.map +1 -1
- package/dist/unstable/ai/index.d.ts +4 -0
- package/dist/unstable/ai/index.d.ts.map +1 -1
- package/dist/unstable/ai/index.js +4 -0
- package/dist/unstable/ai/index.js.map +1 -1
- package/dist/unstable/ai/internal/codec-transformer.js +15 -12
- package/dist/unstable/ai/internal/codec-transformer.js.map +1 -1
- package/dist/unstable/ai/internal/mcpProtocol.d.ts +21 -0
- package/dist/unstable/ai/internal/mcpProtocol.d.ts.map +1 -0
- package/dist/unstable/ai/internal/mcpProtocol.js +22 -0
- package/dist/unstable/ai/internal/mcpProtocol.js.map +1 -0
- package/dist/unstable/ai/internal/mcpProtocolRegistry.d.ts +2 -0
- package/dist/unstable/ai/internal/mcpProtocolRegistry.d.ts.map +1 -0
- package/dist/unstable/ai/internal/mcpProtocolRegistry.js +32 -0
- package/dist/unstable/ai/internal/mcpProtocolRegistry.js.map +1 -0
- package/dist/unstable/ai/internal/structured-output.d.ts +2 -0
- package/dist/unstable/ai/internal/structured-output.d.ts.map +1 -0
- package/dist/unstable/ai/internal/structured-output.js +315 -0
- package/dist/unstable/ai/internal/structured-output.js.map +1 -0
- package/dist/unstable/cli/Argument.d.ts +279 -72
- package/dist/unstable/cli/Argument.d.ts.map +1 -1
- package/dist/unstable/cli/Argument.js +113 -34
- package/dist/unstable/cli/Argument.js.map +1 -1
- package/dist/unstable/cli/CliConfig.js.map +1 -1
- package/dist/unstable/cli/CliError.d.ts +126 -76
- package/dist/unstable/cli/CliError.d.ts.map +1 -1
- package/dist/unstable/cli/CliError.js +136 -76
- package/dist/unstable/cli/CliError.js.map +1 -1
- package/dist/unstable/cli/CliOutput.d.ts +35 -54
- package/dist/unstable/cli/CliOutput.d.ts.map +1 -1
- package/dist/unstable/cli/CliOutput.js +26 -42
- package/dist/unstable/cli/CliOutput.js.map +1 -1
- package/dist/unstable/cli/Command.d.ts +736 -115
- package/dist/unstable/cli/Command.d.ts.map +1 -1
- package/dist/unstable/cli/Command.js +282 -56
- package/dist/unstable/cli/Command.js.map +1 -1
- package/dist/unstable/cli/Completions.js.map +1 -1
- package/dist/unstable/cli/Flag.d.ts +418 -138
- package/dist/unstable/cli/Flag.d.ts.map +1 -1
- package/dist/unstable/cli/Flag.js +197 -71
- package/dist/unstable/cli/Flag.js.map +1 -1
- package/dist/unstable/cli/GlobalFlag.d.ts +1 -1
- package/dist/unstable/cli/GlobalFlag.js.map +1 -1
- package/dist/unstable/cli/HelpDoc.d.ts +12 -4
- package/dist/unstable/cli/HelpDoc.d.ts.map +1 -1
- package/dist/unstable/cli/Param.d.ts +299 -83
- package/dist/unstable/cli/Param.d.ts.map +1 -1
- package/dist/unstable/cli/Param.js +146 -60
- package/dist/unstable/cli/Param.js.map +1 -1
- package/dist/unstable/cli/Primitive.d.ts +370 -149
- package/dist/unstable/cli/Primitive.d.ts.map +1 -1
- package/dist/unstable/cli/Primitive.js +377 -162
- package/dist/unstable/cli/Primitive.js.map +1 -1
- package/dist/unstable/cli/Prompt.d.ts +23 -14
- package/dist/unstable/cli/Prompt.d.ts.map +1 -1
- package/dist/unstable/cli/Prompt.js +54 -31
- package/dist/unstable/cli/Prompt.js.map +1 -1
- package/dist/unstable/cli/index.js.map +1 -1
- package/dist/unstable/cli/internal/ansi.js +2 -2
- package/dist/unstable/cli/internal/ansi.js.map +1 -1
- package/dist/unstable/cli/internal/auto-suggest.js.map +1 -1
- package/dist/unstable/cli/internal/command.d.ts +5 -3
- package/dist/unstable/cli/internal/command.d.ts.map +1 -1
- package/dist/unstable/cli/internal/command.js +21 -13
- package/dist/unstable/cli/internal/command.js.map +1 -1
- package/dist/unstable/cli/internal/completions/bash.js +69 -9
- package/dist/unstable/cli/internal/completions/bash.js.map +1 -1
- package/dist/unstable/cli/internal/completions/descriptor.js +24 -18
- package/dist/unstable/cli/internal/completions/descriptor.js.map +1 -1
- package/dist/unstable/cli/internal/completions/fish.js +5 -5
- package/dist/unstable/cli/internal/completions/fish.js.map +1 -1
- package/dist/unstable/cli/internal/completions/zsh.js.map +1 -1
- package/dist/unstable/cli/internal/config.d.ts +0 -48
- package/dist/unstable/cli/internal/config.d.ts.map +1 -1
- package/dist/unstable/cli/internal/config.js +8 -10
- package/dist/unstable/cli/internal/config.js.map +1 -1
- package/dist/unstable/cli/internal/help.d.ts.map +1 -1
- package/dist/unstable/cli/internal/help.js +4 -2
- package/dist/unstable/cli/internal/help.js.map +1 -1
- package/dist/unstable/cli/internal/lexer.js +17 -7
- package/dist/unstable/cli/internal/lexer.js.map +1 -1
- package/dist/unstable/cli/internal/parser.js +5 -5
- package/dist/unstable/cli/internal/parser.js.map +1 -1
- package/dist/unstable/cli/internal/wizard.js +2 -2
- package/dist/unstable/cli/internal/wizard.js.map +1 -1
- package/dist/unstable/cluster/ClusterCron.js.map +1 -1
- package/dist/unstable/cluster/ClusterError.js +7 -7
- package/dist/unstable/cluster/ClusterError.js.map +1 -1
- package/dist/unstable/cluster/ClusterMetrics.js.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.d.ts +8 -8
- package/dist/unstable/cluster/ClusterSchema.js +8 -8
- package/dist/unstable/cluster/ClusterSchema.js.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.js +32 -16
- package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/unstable/cluster/DeliverAt.js.map +1 -1
- package/dist/unstable/cluster/Entity.d.ts +12 -12
- package/dist/unstable/cluster/Entity.d.ts.map +1 -1
- package/dist/unstable/cluster/Entity.js +9 -9
- package/dist/unstable/cluster/Entity.js.map +1 -1
- package/dist/unstable/cluster/EntityAddress.js.map +1 -1
- package/dist/unstable/cluster/EntityId.js.map +1 -1
- package/dist/unstable/cluster/EntityProxy.d.ts +7 -5
- package/dist/unstable/cluster/EntityProxy.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityProxy.js +8 -5
- package/dist/unstable/cluster/EntityProxy.js.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.js.map +1 -1
- package/dist/unstable/cluster/EntityResource.d.ts +2 -2
- package/dist/unstable/cluster/EntityResource.js +2 -2
- package/dist/unstable/cluster/EntityResource.js.map +1 -1
- package/dist/unstable/cluster/EntityType.js.map +1 -1
- package/dist/unstable/cluster/Envelope.d.ts +3 -3
- package/dist/unstable/cluster/Envelope.d.ts.map +1 -1
- package/dist/unstable/cluster/Envelope.js +5 -4
- package/dist/unstable/cluster/Envelope.js.map +1 -1
- package/dist/unstable/cluster/HttpRunner.d.ts +2 -2
- package/dist/unstable/cluster/HttpRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/HttpRunner.js +6 -4
- package/dist/unstable/cluster/HttpRunner.js.map +1 -1
- package/dist/unstable/cluster/K8sHttpClient.js.map +1 -1
- package/dist/unstable/cluster/MachineId.js.map +1 -1
- package/dist/unstable/cluster/Message.d.ts +9 -9
- package/dist/unstable/cluster/Message.js +6 -6
- package/dist/unstable/cluster/Message.js.map +1 -1
- package/dist/unstable/cluster/MessageStorage.d.ts +15 -15
- package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/MessageStorage.js +13 -6
- package/dist/unstable/cluster/MessageStorage.js.map +1 -1
- package/dist/unstable/cluster/Reply.d.ts +8 -0
- package/dist/unstable/cluster/Reply.d.ts.map +1 -1
- package/dist/unstable/cluster/Reply.js +17 -5
- package/dist/unstable/cluster/Reply.js.map +1 -1
- package/dist/unstable/cluster/Runner.d.ts +1 -1
- package/dist/unstable/cluster/Runner.js +1 -1
- package/dist/unstable/cluster/Runner.js.map +1 -1
- package/dist/unstable/cluster/RunnerAddress.d.ts +1 -1
- package/dist/unstable/cluster/RunnerAddress.js +1 -1
- package/dist/unstable/cluster/RunnerAddress.js.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.d.ts +1 -1
- package/dist/unstable/cluster/RunnerHealth.js +1 -1
- package/dist/unstable/cluster/RunnerHealth.js.map +1 -1
- package/dist/unstable/cluster/RunnerServer.d.ts +2 -1
- package/dist/unstable/cluster/RunnerServer.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerServer.js +29 -23
- package/dist/unstable/cluster/RunnerServer.js.map +1 -1
- package/dist/unstable/cluster/RunnerStorage.d.ts +3 -4
- package/dist/unstable/cluster/RunnerStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerStorage.js +8 -7
- package/dist/unstable/cluster/RunnerStorage.js.map +1 -1
- package/dist/unstable/cluster/Runners.d.ts +11 -15
- package/dist/unstable/cluster/Runners.d.ts.map +1 -1
- package/dist/unstable/cluster/Runners.js +32 -22
- package/dist/unstable/cluster/Runners.js.map +1 -1
- package/dist/unstable/cluster/ShardId.js +1 -1
- package/dist/unstable/cluster/ShardId.js.map +1 -1
- package/dist/unstable/cluster/Sharding.d.ts +2 -2
- package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
- package/dist/unstable/cluster/Sharding.js +164 -31
- package/dist/unstable/cluster/Sharding.js.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.d.ts +13 -5
- package/dist/unstable/cluster/ShardingConfig.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.js +3 -3
- package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
- package/dist/unstable/cluster/ShardingRegistrationEvent.js.map +1 -1
- package/dist/unstable/cluster/SingleRunner.d.ts +4 -2
- package/dist/unstable/cluster/SingleRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/SingleRunner.js +2 -1
- package/dist/unstable/cluster/SingleRunner.js.map +1 -1
- package/dist/unstable/cluster/Singleton.js.map +1 -1
- package/dist/unstable/cluster/SingletonAddress.d.ts +1 -1
- package/dist/unstable/cluster/SingletonAddress.js +1 -1
- package/dist/unstable/cluster/SingletonAddress.js.map +1 -1
- package/dist/unstable/cluster/Snowflake.d.ts +8 -8
- package/dist/unstable/cluster/Snowflake.js +8 -8
- package/dist/unstable/cluster/Snowflake.js.map +1 -1
- package/dist/unstable/cluster/SocketRunner.js.map +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.d.ts +7 -4
- package/dist/unstable/cluster/SqlMessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.js +56 -25
- package/dist/unstable/cluster/SqlMessageStorage.js.map +1 -1
- package/dist/unstable/cluster/SqlRunnerStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/SqlRunnerStorage.js +141 -79
- package/dist/unstable/cluster/SqlRunnerStorage.js.map +1 -1
- package/dist/unstable/cluster/TestRunner.js.map +1 -1
- package/dist/unstable/cluster/index.js.map +1 -1
- package/dist/unstable/cluster/internal/entityManager.js +25 -13
- package/dist/unstable/cluster/internal/entityManager.js.map +1 -1
- package/dist/unstable/cluster/internal/entityReaper.js.map +1 -1
- package/dist/unstable/cluster/internal/hash.js.map +1 -1
- package/dist/unstable/cluster/internal/interruptors.js.map +1 -1
- package/dist/unstable/cluster/internal/resourceMap.js +2 -2
- package/dist/unstable/cluster/internal/resourceMap.js.map +1 -1
- package/dist/unstable/cluster/internal/resourceRef.js +17 -0
- package/dist/unstable/cluster/internal/resourceRef.js.map +1 -1
- package/dist/unstable/cluster/internal/shardLock.d.ts +2 -0
- package/dist/unstable/cluster/internal/shardLock.d.ts.map +1 -0
- package/dist/unstable/cluster/internal/shardLock.js +4 -0
- package/dist/unstable/cluster/internal/shardLock.js.map +1 -0
- package/dist/unstable/devtools/DevTools.js.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.js +7 -2
- package/dist/unstable/devtools/DevToolsClient.js.map +1 -1
- package/dist/unstable/devtools/DevToolsSchema.d.ts +20 -20
- package/dist/unstable/devtools/DevToolsSchema.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsSchema.js +8 -5
- package/dist/unstable/devtools/DevToolsSchema.js.map +1 -1
- package/dist/unstable/devtools/DevToolsServer.js.map +1 -1
- package/dist/unstable/devtools/index.js.map +1 -1
- package/dist/unstable/encoding/Ini.d.ts +20 -0
- package/dist/unstable/encoding/Ini.d.ts.map +1 -0
- package/dist/unstable/encoding/Ini.js +153 -0
- package/dist/unstable/encoding/Ini.js.map +1 -0
- package/dist/unstable/encoding/Msgpack.d.ts +2 -1
- package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
- package/dist/unstable/encoding/Msgpack.js +31 -19
- package/dist/unstable/encoding/Msgpack.js.map +1 -1
- package/dist/unstable/encoding/Ndjson.d.ts.map +1 -1
- package/dist/unstable/encoding/Ndjson.js +7 -1
- package/dist/unstable/encoding/Ndjson.js.map +1 -1
- package/dist/unstable/encoding/Sse.d.ts +72 -8
- package/dist/unstable/encoding/Sse.d.ts.map +1 -1
- package/dist/unstable/encoding/Sse.js +72 -31
- package/dist/unstable/encoding/Sse.js.map +1 -1
- package/dist/unstable/encoding/Toml.d.ts +19 -0
- package/dist/unstable/encoding/Toml.d.ts.map +1 -0
- package/dist/unstable/encoding/Toml.js +434 -0
- package/dist/unstable/encoding/Toml.js.map +1 -0
- package/dist/unstable/encoding/Yaml.d.ts +19 -0
- package/dist/unstable/encoding/Yaml.d.ts.map +1 -0
- package/dist/unstable/encoding/Yaml.js +461 -0
- package/dist/unstable/encoding/Yaml.js.map +1 -0
- package/dist/unstable/encoding/index.d.ts +12 -0
- package/dist/unstable/encoding/index.d.ts.map +1 -1
- package/dist/unstable/encoding/index.js +12 -0
- package/dist/unstable/encoding/index.js.map +1 -1
- package/dist/unstable/eventlog/Event.d.ts +20 -20
- package/dist/unstable/eventlog/Event.js.map +1 -1
- package/dist/unstable/eventlog/EventGroup.d.ts +4 -4
- package/dist/unstable/eventlog/EventGroup.js.map +1 -1
- package/dist/unstable/eventlog/EventJournal.d.ts +17 -17
- package/dist/unstable/eventlog/EventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventJournal.js +27 -19
- package/dist/unstable/eventlog/EventJournal.js.map +1 -1
- package/dist/unstable/eventlog/EventLog.d.ts +3 -3
- package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLog.js +18 -14
- package/dist/unstable/eventlog/EventLog.js.map +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.d.ts +8 -7
- package/dist/unstable/eventlog/EventLogEncryption.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.js +16 -14
- package/dist/unstable/eventlog/EventLogEncryption.js.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.d.ts +31 -31
- package/dist/unstable/eventlog/EventLogMessage.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.js +12 -8
- package/dist/unstable/eventlog/EventLogMessage.js.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.d.ts +15 -15
- package/dist/unstable/eventlog/EventLogRemote.js +5 -5
- package/dist/unstable/eventlog/EventLogRemote.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.d.ts +11 -2
- package/dist/unstable/eventlog/EventLogServer.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.js +45 -21
- package/dist/unstable/eventlog/EventLogServer.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +4 -4
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.js +16 -7
- package/dist/unstable/eventlog/EventLogServerEncrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +5 -5
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js +15 -7
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.js +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.js +3 -6
- package/dist/unstable/eventlog/SqlEventJournal.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js +3 -3
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/eventlog/index.js.map +1 -1
- package/dist/unstable/eventlog/internal/identityRootSecretDerivation.js.map +1 -1
- package/dist/unstable/http/Cookies.d.ts +2 -2
- package/dist/unstable/http/Cookies.d.ts.map +1 -1
- package/dist/unstable/http/Cookies.js +54 -40
- package/dist/unstable/http/Cookies.js.map +1 -1
- package/dist/unstable/http/Etag.d.ts +1 -1
- package/dist/unstable/http/Etag.js +1 -1
- package/dist/unstable/http/Etag.js.map +1 -1
- package/dist/unstable/http/FetchHttpClient.d.ts.map +1 -1
- package/dist/unstable/http/FetchHttpClient.js.map +1 -1
- package/dist/unstable/http/FindMyWay/internal/queryString.d.ts +11 -0
- package/dist/unstable/http/FindMyWay/internal/queryString.d.ts.map +1 -0
- package/dist/unstable/http/FindMyWay/internal/queryString.js +259 -0
- package/dist/unstable/http/FindMyWay/internal/queryString.js.map +1 -0
- package/dist/unstable/http/FindMyWay/internal/router.d.ts +2 -0
- package/dist/unstable/http/FindMyWay/internal/router.d.ts.map +1 -0
- package/dist/unstable/http/FindMyWay/internal/router.js +665 -0
- package/dist/unstable/http/FindMyWay/internal/router.js.map +1 -0
- package/dist/unstable/http/FindMyWay.d.ts +33 -8
- package/dist/unstable/http/FindMyWay.d.ts.map +1 -1
- package/dist/unstable/http/FindMyWay.js +4 -7
- package/dist/unstable/http/FindMyWay.js.map +1 -1
- package/dist/unstable/http/Headers.d.ts +2 -2
- package/dist/unstable/http/Headers.js +10 -10
- package/dist/unstable/http/Headers.js.map +1 -1
- package/dist/unstable/http/HttpBody.d.ts +5 -3
- package/dist/unstable/http/HttpBody.d.ts.map +1 -1
- package/dist/unstable/http/HttpBody.js +11 -5
- package/dist/unstable/http/HttpBody.js.map +1 -1
- package/dist/unstable/http/HttpClient.d.ts +110 -47
- package/dist/unstable/http/HttpClient.d.ts.map +1 -1
- package/dist/unstable/http/HttpClient.js +79 -36
- package/dist/unstable/http/HttpClient.js.map +1 -1
- package/dist/unstable/http/HttpClientError.js +1 -1
- package/dist/unstable/http/HttpClientError.js.map +1 -1
- package/dist/unstable/http/HttpClientRequest.d.ts +44 -0
- package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientRequest.js +16 -12
- package/dist/unstable/http/HttpClientRequest.js.map +1 -1
- package/dist/unstable/http/HttpClientResponse.d.ts +4 -4
- package/dist/unstable/http/HttpClientResponse.js +3 -18
- package/dist/unstable/http/HttpClientResponse.js.map +1 -1
- package/dist/unstable/http/HttpEffect.d.ts +7 -9
- package/dist/unstable/http/HttpEffect.d.ts.map +1 -1
- package/dist/unstable/http/HttpEffect.js +7 -8
- package/dist/unstable/http/HttpEffect.js.map +1 -1
- package/dist/unstable/http/HttpIncomingMessage.js.map +1 -1
- package/dist/unstable/http/HttpMethod.d.ts +6 -9
- package/dist/unstable/http/HttpMethod.d.ts.map +1 -1
- package/dist/unstable/http/HttpMethod.js +6 -9
- package/dist/unstable/http/HttpMethod.js.map +1 -1
- package/dist/unstable/http/HttpMiddleware.d.ts +75 -9
- package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
- package/dist/unstable/http/HttpMiddleware.js +164 -39
- package/dist/unstable/http/HttpMiddleware.js.map +1 -1
- package/dist/unstable/http/HttpPlatform.d.ts +76 -0
- package/dist/unstable/http/HttpPlatform.d.ts.map +1 -1
- package/dist/unstable/http/HttpPlatform.js +53 -3
- package/dist/unstable/http/HttpPlatform.js.map +1 -1
- package/dist/unstable/http/HttpRouter.d.ts +91 -92
- package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
- package/dist/unstable/http/HttpRouter.js +78 -79
- package/dist/unstable/http/HttpRouter.js.map +1 -1
- package/dist/unstable/http/HttpServer.d.ts +13 -13
- package/dist/unstable/http/HttpServer.js +6 -6
- package/dist/unstable/http/HttpServer.js.map +1 -1
- package/dist/unstable/http/HttpServerError.d.ts +2 -2
- package/dist/unstable/http/HttpServerError.js +2 -2
- package/dist/unstable/http/HttpServerError.js.map +1 -1
- package/dist/unstable/http/HttpServerRequest.d.ts +4 -4
- package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRequest.js +23 -15
- package/dist/unstable/http/HttpServerRequest.js.map +1 -1
- package/dist/unstable/http/HttpServerRespondable.js.map +1 -1
- package/dist/unstable/http/HttpServerResponse.d.ts +22 -0
- package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerResponse.js +17 -5
- package/dist/unstable/http/HttpServerResponse.js.map +1 -1
- package/dist/unstable/http/HttpStaticServer.d.ts +35 -7
- package/dist/unstable/http/HttpStaticServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpStaticServer.js +35 -7
- package/dist/unstable/http/HttpStaticServer.js.map +1 -1
- package/dist/unstable/http/HttpTraceContext.js.map +1 -1
- package/dist/unstable/http/Multipart.d.ts +28 -9
- package/dist/unstable/http/Multipart.d.ts.map +1 -1
- package/dist/unstable/http/Multipart.js +65 -35
- package/dist/unstable/http/Multipart.js.map +1 -1
- package/dist/unstable/http/MultipartParser/HeadersParser.d.ts +53 -0
- package/dist/unstable/http/MultipartParser/HeadersParser.d.ts.map +1 -0
- package/dist/unstable/http/MultipartParser/HeadersParser.js +14 -0
- package/dist/unstable/http/MultipartParser/HeadersParser.js.map +1 -0
- package/dist/unstable/http/MultipartParser/Search.d.ts +11 -0
- package/dist/unstable/http/MultipartParser/Search.d.ts.map +1 -0
- package/dist/unstable/http/MultipartParser/Search.js +14 -0
- package/dist/unstable/http/MultipartParser/Search.js.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/contentType.d.ts +5 -0
- package/dist/unstable/http/MultipartParser/internal/contentType.d.ts.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/contentType.js +82 -0
- package/dist/unstable/http/MultipartParser/internal/contentType.js.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/headers.d.ts +3 -0
- package/dist/unstable/http/MultipartParser/internal/headers.d.ts.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/headers.js +208 -0
- package/dist/unstable/http/MultipartParser/internal/headers.js.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/multipart.d.ts +8 -0
- package/dist/unstable/http/MultipartParser/internal/multipart.d.ts.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/multipart.js +241 -0
- package/dist/unstable/http/MultipartParser/internal/multipart.js.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/search.d.ts +5 -0
- package/dist/unstable/http/MultipartParser/internal/search.d.ts.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/search.js +120 -0
- package/dist/unstable/http/MultipartParser/internal/search.js.map +1 -0
- package/dist/unstable/http/MultipartParser.d.ts +98 -0
- package/dist/unstable/http/MultipartParser.d.ts.map +1 -0
- package/dist/unstable/http/MultipartParser.js +23 -0
- package/dist/unstable/http/MultipartParser.js.map +1 -0
- package/dist/unstable/http/Template.d.ts.map +1 -1
- package/dist/unstable/http/Template.js +3 -3
- package/dist/unstable/http/Template.js.map +1 -1
- package/dist/unstable/http/Url.d.ts +33 -63
- package/dist/unstable/http/Url.d.ts.map +1 -1
- package/dist/unstable/http/Url.js +14 -28
- package/dist/unstable/http/Url.js.map +1 -1
- package/dist/unstable/http/UrlParams.d.ts +10 -18
- package/dist/unstable/http/UrlParams.d.ts.map +1 -1
- package/dist/unstable/http/UrlParams.js +26 -31
- package/dist/unstable/http/UrlParams.js.map +1 -1
- package/dist/unstable/http/index.d.ts +1 -1
- package/dist/unstable/http/index.d.ts.map +1 -1
- package/dist/unstable/http/index.js +1 -1
- package/dist/unstable/http/index.js.map +1 -1
- package/dist/unstable/http/internal/compression.d.ts +2 -0
- package/dist/unstable/http/internal/compression.d.ts.map +1 -0
- package/dist/unstable/http/internal/compression.js +155 -0
- package/dist/unstable/http/internal/compression.js.map +1 -0
- package/dist/unstable/http/internal/httpBody.d.ts +2 -0
- package/dist/unstable/http/internal/httpBody.d.ts.map +1 -0
- package/dist/unstable/http/internal/httpBody.js +10 -0
- package/dist/unstable/http/internal/httpBody.js.map +1 -0
- package/dist/unstable/http/internal/preResponseHandler.js.map +1 -1
- package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApi.js +9 -9
- package/dist/unstable/httpapi/HttpApi.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js +82 -30
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.d.ts +4 -5
- package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.js +89 -51
- package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +48 -46
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.js +73 -16
- package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts +18 -18
- package/dist/unstable/httpapi/HttpApiError.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.js +30 -30
- package/dist/unstable/httpapi/HttpApiError.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.d.ts +15 -15
- package/dist/unstable/httpapi/HttpApiGroup.js +2 -2
- package/dist/unstable/httpapi/HttpApiGroup.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +71 -24
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.js +57 -10
- package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.d.ts +0 -12
- package/dist/unstable/httpapi/HttpApiScalar.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.d.ts +225 -6
- package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.js +174 -4
- package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSwagger.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiTest.js.map +1 -1
- package/dist/unstable/httpapi/OpenApi.d.ts +21 -13
- package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/OpenApi.js +110 -57
- package/dist/unstable/httpapi/OpenApi.js.map +1 -1
- package/dist/unstable/httpapi/index.js.map +1 -1
- package/dist/unstable/httpapi/internal/html.js.map +1 -1
- package/dist/unstable/httpapi/internal/httpApiScalar.js.map +1 -1
- package/dist/unstable/httpapi/internal/httpApiSwagger.js.map +1 -1
- package/dist/unstable/httpapi/internal/mediaType.js.map +1 -1
- package/dist/unstable/observability/Otlp.js.map +1 -1
- package/dist/unstable/observability/OtlpExporter.d.ts +71 -2
- package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpExporter.js +86 -7
- package/dist/unstable/observability/OtlpExporter.js.map +1 -1
- package/dist/unstable/observability/OtlpLogger.d.ts +4 -3
- package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpLogger.js +4 -4
- package/dist/unstable/observability/OtlpLogger.js.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.d.ts +11 -4
- package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.js +31 -15
- package/dist/unstable/observability/OtlpMetrics.js.map +1 -1
- package/dist/unstable/observability/OtlpResource.d.ts +16 -7
- package/dist/unstable/observability/OtlpResource.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpResource.js +21 -12
- package/dist/unstable/observability/OtlpResource.js.map +1 -1
- package/dist/unstable/observability/OtlpSerialization.js.map +1 -1
- package/dist/unstable/observability/OtlpTracer.d.ts +4 -3
- package/dist/unstable/observability/OtlpTracer.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpTracer.js +3 -3
- package/dist/unstable/observability/OtlpTracer.js.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.d.ts +13 -4
- package/dist/unstable/observability/PrometheusMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.js +10 -3
- package/dist/unstable/observability/PrometheusMetrics.js.map +1 -1
- package/dist/unstable/observability/index.js.map +1 -1
- package/dist/unstable/observability/internal/otlpEnv.js +1 -1
- package/dist/unstable/observability/internal/otlpEnv.js.map +1 -1
- package/dist/unstable/observability/internal/otlpProtobuf.js.map +1 -1
- package/dist/unstable/observability/internal/protobuf.js +3 -0
- package/dist/unstable/observability/internal/protobuf.js.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.d.ts +8 -3
- package/dist/unstable/persistence/KeyValueStore.d.ts.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.js +22 -13
- package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
- package/dist/unstable/persistence/Persistable.d.ts +8 -8
- package/dist/unstable/persistence/Persistable.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistable.js +2 -1
- package/dist/unstable/persistence/Persistable.js.map +1 -1
- package/dist/unstable/persistence/PersistedCache.js.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.d.ts +6 -6
- package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.js +15 -15
- package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
- package/dist/unstable/persistence/Persistence.d.ts +3 -3
- package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistence.js +108 -22
- package/dist/unstable/persistence/Persistence.js.map +1 -1
- package/dist/unstable/persistence/RateLimiter.d.ts +47 -26
- package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
- package/dist/unstable/persistence/RateLimiter.js +31 -47
- package/dist/unstable/persistence/RateLimiter.js.map +1 -1
- package/dist/unstable/persistence/Redis.d.ts +2 -2
- package/dist/unstable/persistence/Redis.d.ts.map +1 -1
- package/dist/unstable/persistence/Redis.js +4 -4
- package/dist/unstable/persistence/Redis.js.map +1 -1
- package/dist/unstable/persistence/index.js.map +1 -1
- package/dist/unstable/process/ChildProcess.d.ts +72 -21
- package/dist/unstable/process/ChildProcess.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcess.js +14 -5
- package/dist/unstable/process/ChildProcess.js.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.d.ts +21 -10
- package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.js +4 -2
- package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
- package/dist/unstable/process/index.js.map +1 -1
- package/dist/unstable/reactivity/AsyncResult.d.ts +8 -8
- package/dist/unstable/reactivity/AsyncResult.d.ts.map +1 -1
- package/dist/unstable/reactivity/AsyncResult.js +14 -13
- package/dist/unstable/reactivity/AsyncResult.js.map +1 -1
- package/dist/unstable/reactivity/Atom.d.ts +131 -30
- package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
- package/dist/unstable/reactivity/Atom.js +53 -34
- package/dist/unstable/reactivity/Atom.js.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.d.ts +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.js +4 -1
- package/dist/unstable/reactivity/AtomHttpApi.js.map +1 -1
- package/dist/unstable/reactivity/AtomRef.js.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.js +25 -4
- package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.d.ts +1 -1
- package/dist/unstable/reactivity/AtomRpc.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.js +4 -1
- package/dist/unstable/reactivity/AtomRpc.js.map +1 -1
- package/dist/unstable/reactivity/Hydration.d.ts +1 -1
- package/dist/unstable/reactivity/Hydration.js +1 -1
- package/dist/unstable/reactivity/Hydration.js.map +1 -1
- package/dist/unstable/reactivity/Reactivity.js.map +1 -1
- package/dist/unstable/reactivity/index.js.map +1 -1
- package/dist/unstable/rpc/Rpc.d.ts +35 -33
- package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
- package/dist/unstable/rpc/Rpc.js +4 -2
- package/dist/unstable/rpc/Rpc.js.map +1 -1
- package/dist/unstable/rpc/RpcClient.d.ts +26 -12
- package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClient.js +40 -22
- package/dist/unstable/rpc/RpcClient.js.map +1 -1
- package/dist/unstable/rpc/RpcClientError.js +2 -2
- package/dist/unstable/rpc/RpcClientError.js.map +1 -1
- package/dist/unstable/rpc/RpcGroup.d.ts +8 -8
- package/dist/unstable/rpc/RpcGroup.js +1 -1
- package/dist/unstable/rpc/RpcGroup.js.map +1 -1
- package/dist/unstable/rpc/RpcMessage.d.ts +31 -30
- package/dist/unstable/rpc/RpcMessage.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMessage.js +6 -6
- package/dist/unstable/rpc/RpcMessage.js.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.d.ts +10 -10
- package/dist/unstable/rpc/RpcMiddleware.js +1 -1
- package/dist/unstable/rpc/RpcMiddleware.js.map +1 -1
- package/dist/unstable/rpc/RpcSchema.d.ts +4 -4
- package/dist/unstable/rpc/RpcSchema.js +3 -3
- package/dist/unstable/rpc/RpcSchema.js.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.d.ts +58 -7
- package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.js +177 -96
- package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
- package/dist/unstable/rpc/RpcServer.d.ts +13 -13
- package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcServer.js +20 -15
- package/dist/unstable/rpc/RpcServer.js.map +1 -1
- package/dist/unstable/rpc/RpcTest.js.map +1 -1
- package/dist/unstable/rpc/RpcWorker.d.ts +5 -5
- package/dist/unstable/rpc/RpcWorker.js +4 -4
- package/dist/unstable/rpc/RpcWorker.js.map +1 -1
- package/dist/unstable/rpc/Utils.js.map +1 -1
- package/dist/unstable/rpc/index.js.map +1 -1
- package/dist/unstable/schema/Model.d.ts +53 -51
- package/dist/unstable/schema/Model.d.ts.map +1 -1
- package/dist/unstable/schema/Model.js +35 -33
- package/dist/unstable/schema/Model.js.map +1 -1
- package/dist/unstable/schema/VariantSchema.d.ts +11 -12
- package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
- package/dist/unstable/schema/VariantSchema.js +28 -17
- package/dist/unstable/schema/VariantSchema.js.map +1 -1
- package/dist/unstable/schema/index.js.map +1 -1
- package/dist/unstable/socket/Socket.d.ts +12 -4
- package/dist/unstable/socket/Socket.d.ts.map +1 -1
- package/dist/unstable/socket/Socket.js +38 -17
- package/dist/unstable/socket/Socket.js.map +1 -1
- package/dist/unstable/socket/SocketServer.js.map +1 -1
- package/dist/unstable/socket/index.js.map +1 -1
- package/dist/unstable/sql/Migrator.d.ts +9 -1
- package/dist/unstable/sql/Migrator.d.ts.map +1 -1
- package/dist/unstable/sql/Migrator.js +15 -2
- package/dist/unstable/sql/Migrator.js.map +1 -1
- package/dist/unstable/sql/SqlClient.d.ts +1 -1
- package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
- package/dist/unstable/sql/SqlClient.js +8 -4
- package/dist/unstable/sql/SqlClient.js.map +1 -1
- package/dist/unstable/sql/SqlConnection.js.map +1 -1
- package/dist/unstable/sql/SqlError.d.ts +2 -2
- package/dist/unstable/sql/SqlError.js +15 -15
- package/dist/unstable/sql/SqlError.js.map +1 -1
- package/dist/unstable/sql/SqlModel.d.ts +2 -2
- package/dist/unstable/sql/SqlModel.js +2 -2
- package/dist/unstable/sql/SqlModel.js.map +1 -1
- package/dist/unstable/sql/SqlResolver.d.ts +5 -5
- package/dist/unstable/sql/SqlResolver.d.ts.map +1 -1
- package/dist/unstable/sql/SqlResolver.js +30 -24
- package/dist/unstable/sql/SqlResolver.js.map +1 -1
- package/dist/unstable/sql/SqlSchema.js.map +1 -1
- package/dist/unstable/sql/SqlStream.js.map +1 -1
- package/dist/unstable/sql/Statement.d.ts +6 -6
- package/dist/unstable/sql/Statement.d.ts.map +1 -1
- package/dist/unstable/sql/Statement.js +30 -27
- package/dist/unstable/sql/Statement.js.map +1 -1
- package/dist/unstable/sql/index.js.map +1 -1
- package/dist/unstable/workers/Transferable.d.ts +1 -1
- package/dist/unstable/workers/Transferable.js +1 -1
- package/dist/unstable/workers/Transferable.js.map +1 -1
- package/dist/unstable/workers/Worker.d.ts +2 -2
- package/dist/unstable/workers/Worker.d.ts.map +1 -1
- package/dist/unstable/workers/Worker.js +13 -14
- package/dist/unstable/workers/Worker.js.map +1 -1
- package/dist/unstable/workers/WorkerError.d.ts +7 -7
- package/dist/unstable/workers/WorkerError.js +11 -11
- package/dist/unstable/workers/WorkerError.js.map +1 -1
- package/dist/unstable/workers/WorkerRunner.d.ts +1 -1
- package/dist/unstable/workers/WorkerRunner.js +1 -1
- package/dist/unstable/workers/WorkerRunner.js.map +1 -1
- package/dist/unstable/workers/index.js.map +1 -1
- package/dist/unstable/workflow/Activity.d.ts +2 -2
- package/dist/unstable/workflow/Activity.js +2 -2
- package/dist/unstable/workflow/Activity.js.map +1 -1
- package/dist/unstable/workflow/DurableClock.d.ts +1 -1
- package/dist/unstable/workflow/DurableClock.js +1 -1
- package/dist/unstable/workflow/DurableClock.js.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.d.ts +10 -10
- package/dist/unstable/workflow/DurableDeferred.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.js +13 -8
- package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
- package/dist/unstable/workflow/DurableQueue.d.ts +22 -20
- package/dist/unstable/workflow/DurableQueue.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableQueue.js +22 -20
- package/dist/unstable/workflow/DurableQueue.js.map +1 -1
- package/dist/unstable/workflow/Workflow.d.ts +21 -21
- package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
- package/dist/unstable/workflow/Workflow.js +13 -14
- package/dist/unstable/workflow/Workflow.js.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts +26 -3
- package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js +72 -6
- package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
- package/dist/unstable/workflow/WorkflowProxy.d.ts +4 -2
- package/dist/unstable/workflow/WorkflowProxy.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowProxy.js +4 -2
- package/dist/unstable/workflow/WorkflowProxy.js.map +1 -1
- package/dist/unstable/workflow/WorkflowProxyServer.js.map +1 -1
- package/dist/unstable/workflow/index.js.map +1 -1
- package/dist/unstable/workflow/internal/crypto.js.map +1 -1
- package/package.json +10 -14
- package/src/Array.ts +1068 -1070
- package/src/BigDecimal.ts +433 -756
- package/src/BigInt.ts +213 -269
- package/src/Boolean.ts +146 -188
- package/src/Brand.ts +4 -4
- package/src/Cache.ts +469 -851
- package/src/Cause.ts +167 -277
- package/src/Channel.ts +982 -831
- package/src/ChannelSchema.ts +1 -1
- package/src/Chunk.ts +841 -1181
- package/src/Clock.ts +181 -49
- package/src/Combiner.ts +20 -33
- package/src/Config.ts +642 -335
- package/src/ConfigProvider.ts +267 -135
- package/src/Console.ts +289 -39
- package/src/Context.ts +323 -404
- package/src/Cron.ts +271 -219
- package/src/Crypto.ts +30 -23
- package/src/Data.ts +63 -82
- package/src/DateTime.ts +564 -660
- package/src/Deferred.ts +259 -258
- package/src/Duration.ts +244 -311
- package/src/Effect.ts +3215 -3394
- package/src/Encoding.ts +22 -40
- package/src/Equal.ts +59 -41
- package/src/Equivalence.ts +103 -105
- package/src/ErrorReporter.ts +51 -27
- package/src/ExecutionPlan.ts +91 -56
- package/src/Exit.ts +116 -192
- package/src/Fiber.ts +82 -149
- package/src/FiberHandle.ts +155 -107
- package/src/FiberMap.ts +225 -174
- package/src/FiberSet.ts +125 -83
- package/src/FileSystem.ts +156 -264
- package/src/Filter.ts +61 -33
- package/src/Formatter.ts +69 -76
- package/src/Function.ts +119 -151
- package/src/Graph.ts +416 -770
- package/src/HKT.ts +12 -6
- package/src/Hash.ts +52 -83
- package/src/HashMap.ts +319 -411
- package/src/HashRing.ts +1 -0
- package/src/HashSet.ts +177 -284
- package/src/Inspectable.ts +22 -20
- package/src/Iterable.ts +633 -797
- package/src/JsonPatch.ts +60 -113
- package/src/JsonPointer.ts +8 -8
- package/src/JsonSchema.ts +408 -251
- package/src/Latch.ts +23 -35
- package/src/Layer.ts +366 -265
- package/src/LayerMap.ts +49 -29
- package/src/LayerRef.ts +6 -2
- package/src/LogLevel.ts +114 -214
- package/src/Logger.ts +348 -700
- package/src/ManagedRuntime.ts +20 -5
- package/src/Match.ts +217 -252
- package/src/Metric.ts +520 -1092
- package/src/MutableHashMap.ts +218 -255
- package/src/MutableHashSet.ts +84 -89
- package/src/MutableList.ts +77 -370
- package/src/MutableRef.ts +420 -243
- package/src/Newtype.ts +21 -14
- package/src/NonEmptyIterable.ts +7 -137
- package/src/Number.ts +196 -233
- package/src/Optic.ts +303 -441
- package/src/Option.ts +449 -813
- package/src/Order.ts +109 -109
- package/src/Ordering.ts +20 -23
- package/src/PartitionedSemaphore.ts +1 -4
- package/src/Path.ts +38 -41
- package/src/Pipeable.ts +6 -5
- package/src/PlatformError.ts +4 -4
- package/src/Pool.ts +4 -2
- package/src/Predicate.ts +200 -181
- package/src/PrimaryKey.ts +7 -7
- package/src/PubSub.ts +526 -552
- package/src/Pull.ts +24 -18
- package/src/Queue.ts +204 -165
- package/src/Random.ts +49 -74
- package/src/RcMap.ts +121 -63
- package/src/RcRef.ts +24 -13
- package/src/Record.ts +387 -487
- package/src/Redactable.ts +10 -3
- package/src/Redacted.ts +25 -25
- package/src/Reducer.ts +8 -15
- package/src/Ref.ts +221 -361
- package/src/References.ts +102 -214
- package/src/RegExp.ts +10 -14
- package/src/Request.ts +36 -28
- package/src/RequestResolver.ts +202 -91
- package/src/Result.ts +314 -485
- package/src/Runtime.ts +50 -75
- package/src/Schedule.ts +311 -1737
- package/src/Scheduler.ts +20 -7
- package/src/Schema.ts +3475 -1913
- package/src/SchemaAST.ts +902 -573
- package/src/SchemaGetter.ts +351 -233
- package/src/SchemaIssue.ts +367 -334
- package/src/SchemaParser.ts +254 -148
- package/src/SchemaRepresentation.ts +732 -3414
- package/src/SchemaTransformation.ts +186 -97
- package/src/Scope.ts +123 -151
- package/src/ScopedCache.ts +1 -1
- package/src/ScopedRef.ts +6 -4
- package/src/Semaphore.ts +157 -54
- package/src/Sink.ts +129 -114
- package/src/Stdio.ts +24 -5
- package/src/Stream.ts +2745 -3173
- package/src/String.ts +275 -312
- package/src/Struct.ts +114 -118
- package/src/SubscriptionRef.ts +284 -252
- package/src/Symbol.ts +3 -3
- package/src/SynchronizedRef.ts +1 -1
- package/src/Terminal.ts +3 -3
- package/src/Tracer.ts +102 -55
- package/src/Trie.ts +287 -679
- package/src/Tuple.ts +99 -131
- package/src/TxChunk.ts +201 -121
- package/src/TxDeferred.ts +62 -46
- package/src/TxHashMap.ts +645 -799
- package/src/TxHashSet.ts +443 -356
- package/src/TxPriorityQueue.ts +130 -98
- package/src/TxPubSub.ts +107 -80
- package/src/TxQueue.ts +215 -184
- package/src/TxReentrantLock.ts +136 -101
- package/src/TxRef.ts +51 -32
- package/src/TxSemaphore.ts +129 -95
- package/src/TxSubscriptionRef.ts +97 -70
- package/src/Types.ts +127 -70
- package/src/Unify.ts +45 -65
- package/src/Utils.ts +23 -16
- package/src/index.ts +0 -10
- package/src/internal/core.ts +6 -5
- package/src/internal/dateTime.ts +7 -1
- package/src/internal/effect.ts +304 -134
- package/src/internal/executionPlan.ts +106 -10
- package/src/internal/hashMap.ts +20 -14
- package/src/internal/matcher.ts +3 -3
- package/src/internal/persistence.ts +2 -0
- package/src/internal/rcRef.ts +24 -16
- package/src/internal/record.ts +11 -7
- package/src/internal/references.ts +3 -7
- package/src/internal/schedule.ts +4 -4
- package/src/internal/schema/annotations.ts +48 -1
- package/src/internal/schema/fromJsonSchemaDocument.ts +977 -0
- package/src/internal/schema/fromRepresentation.ts +339 -0
- package/src/internal/schema/parser.ts +22 -0
- package/src/internal/schema/schema.ts +46 -63
- package/src/internal/schema/{arbitrary.ts → toArbitrary.ts} +9 -81
- package/src/internal/schema/toCodeDocument.ts +572 -0
- package/src/internal/schema/{equivalence.ts → toEquivalence.ts} +12 -7
- package/src/internal/schema/toJsonSchemaDocument.ts +549 -0
- package/src/internal/schema/toRepresentation.ts +404 -0
- package/src/internal/stackTraceLimit.ts +3 -7
- package/src/internal/trie.ts +21 -12
- package/src/testing/FastCheck.ts +8 -7
- package/src/testing/TestClock.ts +86 -32
- package/src/testing/TestConsole.ts +32 -31
- package/src/testing/TestSchema.ts +40 -40
- package/src/unstable/ai/AiError.ts +119 -141
- package/src/unstable/ai/AnthropicStructuredOutput.ts +103 -334
- package/src/unstable/ai/Chat.ts +133 -98
- package/src/unstable/ai/EmbeddingModel.ts +1 -1
- package/src/unstable/ai/IdGenerator.ts +32 -28
- package/src/unstable/ai/LanguageModel.ts +141 -97
- package/src/unstable/ai/McpProtocol.ts +48 -0
- package/src/unstable/ai/McpSchema.ts +92 -81
- package/src/unstable/ai/McpServer.ts +1057 -303
- package/src/unstable/ai/Model.ts +9 -20
- package/src/unstable/ai/OpenAiStructuredOutput.ts +231 -396
- package/src/unstable/ai/Prompt.ts +212 -63
- package/src/unstable/ai/Response.ts +52 -38
- package/src/unstable/ai/Telemetry.ts +46 -13
- package/src/unstable/ai/Tokenizer.ts +14 -3
- package/src/unstable/ai/Tool.ts +81 -48
- package/src/unstable/ai/Toolkit.ts +45 -15
- package/src/unstable/ai/index.ts +5 -0
- package/src/unstable/ai/internal/codec-transformer.ts +13 -7
- package/src/unstable/ai/internal/mcpProtocol.ts +85 -0
- package/src/unstable/ai/internal/mcpProtocolRegistry.ts +70 -0
- package/src/unstable/ai/internal/structured-output.ts +453 -0
- package/src/unstable/cli/Argument.ts +279 -72
- package/src/unstable/cli/CliError.ts +159 -91
- package/src/unstable/cli/CliOutput.ts +44 -58
- package/src/unstable/cli/Command.ts +764 -124
- package/src/unstable/cli/Flag.ts +418 -138
- package/src/unstable/cli/GlobalFlag.ts +1 -1
- package/src/unstable/cli/HelpDoc.ts +12 -4
- package/src/unstable/cli/Param.ts +336 -100
- package/src/unstable/cli/Primitive.ts +383 -156
- package/src/unstable/cli/Prompt.ts +64 -34
- package/src/unstable/cli/internal/ansi.ts +2 -2
- package/src/unstable/cli/internal/command.ts +28 -15
- package/src/unstable/cli/internal/completions/bash.ts +59 -9
- package/src/unstable/cli/internal/completions/descriptor.ts +14 -20
- package/src/unstable/cli/internal/completions/fish.ts +5 -7
- package/src/unstable/cli/internal/config.ts +8 -10
- package/src/unstable/cli/internal/help.ts +4 -2
- package/src/unstable/cli/internal/lexer.ts +8 -2
- package/src/unstable/cli/internal/parser.ts +5 -5
- package/src/unstable/cli/internal/wizard.ts +2 -2
- package/src/unstable/cluster/ClusterError.ts +7 -7
- package/src/unstable/cluster/ClusterSchema.ts +8 -8
- package/src/unstable/cluster/ClusterWorkflowEngine.ts +36 -20
- package/src/unstable/cluster/Entity.ts +23 -19
- package/src/unstable/cluster/EntityProxy.ts +16 -7
- package/src/unstable/cluster/EntityResource.ts +2 -2
- package/src/unstable/cluster/Envelope.ts +5 -4
- package/src/unstable/cluster/HttpRunner.ts +6 -4
- package/src/unstable/cluster/Message.ts +9 -9
- package/src/unstable/cluster/MessageStorage.ts +24 -20
- package/src/unstable/cluster/Reply.ts +26 -7
- package/src/unstable/cluster/Runner.ts +1 -1
- package/src/unstable/cluster/RunnerAddress.ts +1 -1
- package/src/unstable/cluster/RunnerHealth.ts +1 -1
- package/src/unstable/cluster/RunnerServer.ts +45 -18
- package/src/unstable/cluster/RunnerStorage.ts +11 -9
- package/src/unstable/cluster/Runners.ts +48 -26
- package/src/unstable/cluster/ShardId.ts +1 -1
- package/src/unstable/cluster/Sharding.ts +223 -55
- package/src/unstable/cluster/ShardingConfig.ts +8 -4
- package/src/unstable/cluster/SingleRunner.ts +4 -2
- package/src/unstable/cluster/SingletonAddress.ts +1 -1
- package/src/unstable/cluster/Snowflake.ts +8 -8
- package/src/unstable/cluster/SqlMessageStorage.ts +84 -36
- package/src/unstable/cluster/SqlRunnerStorage.ts +223 -133
- package/src/unstable/cluster/internal/entityManager.ts +43 -26
- package/src/unstable/cluster/internal/resourceMap.ts +5 -2
- package/src/unstable/cluster/internal/resourceRef.ts +27 -5
- package/src/unstable/cluster/internal/shardLock.ts +9 -0
- package/src/unstable/devtools/DevToolsClient.ts +3 -2
- package/src/unstable/devtools/DevToolsSchema.ts +10 -5
- package/src/unstable/encoding/Ini.ts +174 -0
- package/src/unstable/encoding/Msgpack.ts +61 -40
- package/src/unstable/encoding/Ndjson.ts +9 -1
- package/src/unstable/encoding/Sse.ts +109 -37
- package/src/unstable/encoding/Toml.ts +504 -0
- package/src/unstable/encoding/Yaml.ts +541 -0
- package/src/unstable/encoding/index.ts +15 -0
- package/src/unstable/eventlog/Event.ts +20 -20
- package/src/unstable/eventlog/EventGroup.ts +4 -4
- package/src/unstable/eventlog/EventJournal.ts +30 -22
- package/src/unstable/eventlog/EventLog.ts +24 -14
- package/src/unstable/eventlog/EventLogEncryption.ts +17 -18
- package/src/unstable/eventlog/EventLogMessage.ts +15 -9
- package/src/unstable/eventlog/EventLogRemote.ts +5 -5
- package/src/unstable/eventlog/EventLogServer.ts +41 -7
- package/src/unstable/eventlog/EventLogServerEncrypted.ts +15 -7
- package/src/unstable/eventlog/EventLogServerUnencrypted.ts +15 -7
- package/src/unstable/eventlog/EventLogSessionAuth.ts +1 -1
- package/src/unstable/eventlog/SqlEventJournal.ts +8 -6
- package/src/unstable/eventlog/SqlEventLogServerEncrypted.ts +1 -1
- package/src/unstable/eventlog/SqlEventLogServerUnencrypted.ts +6 -3
- package/src/unstable/http/Cookies.ts +64 -45
- package/src/unstable/http/Etag.ts +1 -1
- package/src/unstable/http/FetchHttpClient.ts +3 -1
- package/src/unstable/http/FindMyWay/internal/queryString.ts +420 -0
- package/src/unstable/http/FindMyWay/internal/router.ts +950 -0
- package/src/unstable/http/FindMyWay.ts +65 -6
- package/src/unstable/http/Headers.ts +10 -10
- package/src/unstable/http/HttpBody.ts +20 -5
- package/src/unstable/http/HttpClient.ts +215 -78
- package/src/unstable/http/HttpClientError.ts +1 -1
- package/src/unstable/http/HttpClientRequest.ts +59 -12
- package/src/unstable/http/HttpClientResponse.ts +5 -21
- package/src/unstable/http/HttpEffect.ts +20 -19
- package/src/unstable/http/HttpMethod.ts +6 -9
- package/src/unstable/http/HttpMiddleware.ts +202 -39
- package/src/unstable/http/HttpPlatform.ts +129 -6
- package/src/unstable/http/HttpRouter.ts +109 -101
- package/src/unstable/http/HttpServer.ts +13 -13
- package/src/unstable/http/HttpServerError.ts +2 -2
- package/src/unstable/http/HttpServerRequest.ts +31 -17
- package/src/unstable/http/HttpServerResponse.ts +38 -6
- package/src/unstable/http/HttpStaticServer.ts +35 -7
- package/src/unstable/http/Multipart.ts +67 -36
- package/src/unstable/http/MultipartParser/HeadersParser.ts +68 -0
- package/src/unstable/http/MultipartParser/Search.ts +17 -0
- package/src/unstable/http/MultipartParser/internal/contentType.ts +103 -0
- package/src/unstable/http/MultipartParser/internal/headers.ts +244 -0
- package/src/unstable/http/MultipartParser/internal/multipart.ts +279 -0
- package/src/unstable/http/MultipartParser/internal/search.ts +167 -0
- package/src/unstable/http/MultipartParser.ts +115 -0
- package/src/unstable/http/Template.ts +7 -6
- package/src/unstable/http/Url.ts +33 -63
- package/src/unstable/http/UrlParams.ts +27 -32
- package/src/unstable/http/index.ts +1 -1
- package/src/unstable/http/internal/compression.ts +196 -0
- package/src/unstable/http/internal/httpBody.ts +15 -0
- package/src/unstable/httpapi/HttpApi.ts +10 -11
- package/src/unstable/httpapi/HttpApiBuilder.ts +154 -33
- package/src/unstable/httpapi/HttpApiClient.ts +142 -61
- package/src/unstable/httpapi/HttpApiEndpoint.ts +159 -71
- package/src/unstable/httpapi/HttpApiError.ts +46 -52
- package/src/unstable/httpapi/HttpApiGroup.ts +17 -17
- package/src/unstable/httpapi/HttpApiMiddleware.ts +71 -24
- package/src/unstable/httpapi/HttpApiScalar.ts +0 -12
- package/src/unstable/httpapi/HttpApiSchema.ts +359 -6
- package/src/unstable/httpapi/OpenApi.ts +153 -62
- package/src/unstable/observability/OtlpExporter.ts +130 -12
- package/src/unstable/observability/OtlpLogger.ts +8 -6
- package/src/unstable/observability/OtlpMetrics.ts +42 -21
- package/src/unstable/observability/OtlpResource.ts +26 -17
- package/src/unstable/observability/OtlpTracer.ts +9 -5
- package/src/unstable/observability/PrometheusMetrics.ts +13 -4
- package/src/unstable/observability/internal/otlpEnv.ts +1 -1
- package/src/unstable/observability/internal/protobuf.ts +3 -0
- package/src/unstable/persistence/KeyValueStore.ts +72 -49
- package/src/unstable/persistence/Persistable.ts +11 -10
- package/src/unstable/persistence/PersistedQueue.ts +18 -15
- package/src/unstable/persistence/Persistence.ts +153 -26
- package/src/unstable/persistence/RateLimiter.ts +79 -45
- package/src/unstable/persistence/Redis.ts +5 -5
- package/src/unstable/process/ChildProcess.ts +72 -21
- package/src/unstable/process/ChildProcessSpawner.ts +22 -11
- package/src/unstable/reactivity/AsyncResult.ts +23 -18
- package/src/unstable/reactivity/Atom.ts +161 -47
- package/src/unstable/reactivity/AtomHttpApi.ts +5 -4
- package/src/unstable/reactivity/AtomRegistry.ts +25 -4
- package/src/unstable/reactivity/AtomRpc.ts +5 -4
- package/src/unstable/reactivity/Hydration.ts +1 -1
- package/src/unstable/rpc/Rpc.ts +35 -33
- package/src/unstable/rpc/RpcClient.ts +65 -29
- package/src/unstable/rpc/RpcClientError.ts +2 -2
- package/src/unstable/rpc/RpcGroup.ts +8 -8
- package/src/unstable/rpc/RpcMessage.ts +31 -30
- package/src/unstable/rpc/RpcMiddleware.ts +10 -10
- package/src/unstable/rpc/RpcSchema.ts +4 -4
- package/src/unstable/rpc/RpcSerialization.ts +167 -68
- package/src/unstable/rpc/RpcServer.ts +22 -17
- package/src/unstable/rpc/RpcWorker.ts +5 -5
- package/src/unstable/schema/Model.ts +52 -50
- package/src/unstable/schema/VariantSchema.ts +51 -43
- package/src/unstable/socket/Socket.ts +42 -19
- package/src/unstable/sql/Migrator.ts +22 -9
- package/src/unstable/sql/SqlClient.ts +64 -56
- package/src/unstable/sql/SqlError.ts +15 -15
- package/src/unstable/sql/SqlModel.ts +2 -2
- package/src/unstable/sql/SqlResolver.ts +41 -31
- package/src/unstable/sql/Statement.ts +44 -37
- package/src/unstable/workers/Transferable.ts +1 -1
- package/src/unstable/workers/Worker.ts +15 -16
- package/src/unstable/workers/WorkerError.ts +12 -12
- package/src/unstable/workers/WorkerRunner.ts +1 -1
- package/src/unstable/workflow/Activity.ts +2 -2
- package/src/unstable/workflow/DurableClock.ts +1 -1
- package/src/unstable/workflow/DurableDeferred.ts +18 -13
- package/src/unstable/workflow/DurableQueue.ts +22 -20
- package/src/unstable/workflow/Workflow.ts +23 -26
- package/src/unstable/workflow/WorkflowEngine.ts +111 -8
- package/src/unstable/workflow/WorkflowProxy.ts +4 -2
- package/dist/SchemaError.d.ts +0 -53
- package/dist/SchemaError.d.ts.map +0 -1
- package/dist/SchemaError.js +0 -61
- package/dist/SchemaError.js.map +0 -1
- package/dist/SchemaUtils.d.ts +0 -28
- package/dist/SchemaUtils.d.ts.map +0 -1
- package/dist/SchemaUtils.js +0 -45
- package/dist/SchemaUtils.js.map +0 -1
- package/dist/internal/schema/arbitrary.d.ts +0 -5
- package/dist/internal/schema/arbitrary.d.ts.map +0 -1
- package/dist/internal/schema/arbitrary.js.map +0 -1
- package/dist/internal/schema/equivalence.d.ts +0 -2
- package/dist/internal/schema/equivalence.d.ts.map +0 -1
- package/dist/internal/schema/equivalence.js.map +0 -1
- package/dist/internal/schema/representation.d.ts +0 -2
- package/dist/internal/schema/representation.d.ts.map +0 -1
- package/dist/internal/schema/representation.js +0 -865
- package/dist/internal/schema/representation.js.map +0 -1
- package/dist/internal/version.d.ts +0 -3
- package/dist/internal/version.d.ts.map +0 -1
- package/dist/internal/version.js +0 -2
- package/dist/internal/version.js.map +0 -1
- package/dist/unstable/http/Multipasta/HeadersParser.d.ts +0 -14
- package/dist/unstable/http/Multipasta/HeadersParser.d.ts.map +0 -1
- package/dist/unstable/http/Multipasta/HeadersParser.js +0 -14
- package/dist/unstable/http/Multipasta/HeadersParser.js.map +0 -1
- package/dist/unstable/http/Multipasta/Node.d.ts +0 -14
- package/dist/unstable/http/Multipasta/Node.d.ts.map +0 -1
- package/dist/unstable/http/Multipasta/Node.js +0 -14
- package/dist/unstable/http/Multipasta/Node.js.map +0 -1
- package/dist/unstable/http/Multipasta/Search.d.ts +0 -14
- package/dist/unstable/http/Multipasta/Search.d.ts.map +0 -1
- package/dist/unstable/http/Multipasta/Search.js +0 -14
- package/dist/unstable/http/Multipasta/Search.js.map +0 -1
- package/dist/unstable/http/Multipasta/Web.d.ts +0 -14
- package/dist/unstable/http/Multipasta/Web.d.ts.map +0 -1
- package/dist/unstable/http/Multipasta/Web.js +0 -14
- package/dist/unstable/http/Multipasta/Web.js.map +0 -1
- package/dist/unstable/http/Multipasta.d.ts +0 -15
- package/dist/unstable/http/Multipasta.d.ts.map +0 -1
- package/dist/unstable/http/Multipasta.js +0 -15
- package/dist/unstable/http/Multipasta.js.map +0 -1
- package/src/SchemaError.ts +0 -64
- package/src/SchemaUtils.ts +0 -51
- package/src/internal/schema/representation.ts +0 -795
- package/src/internal/version.ts +0 -2
- package/src/unstable/http/Multipasta/HeadersParser.ts +0 -14
- package/src/unstable/http/Multipasta/Node.ts +0 -14
- package/src/unstable/http/Multipasta/Search.ts +0 -14
- package/src/unstable/http/Multipasta/Web.ts +0 -14
- package/src/unstable/http/Multipasta.ts +0 -15
|
@@ -2,41 +2,129 @@ import type * as JsonSchema from "./JsonSchema.ts";
|
|
|
2
2
|
import * as Schema from "./Schema.ts";
|
|
3
3
|
import * as SchemaAST from "./SchemaAST.ts";
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Open persistence identity carried by declarations and opaque checks.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
|
|
7
|
+
* @category annotations
|
|
8
|
+
* @since 4.0.0
|
|
9
|
+
*/
|
|
10
|
+
export interface RepresentationAnnotation {
|
|
11
|
+
readonly id: string;
|
|
12
|
+
readonly payload: Schema.Json;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Open persistence identity and schema dependencies carried by opaque checks.
|
|
10
16
|
*
|
|
11
|
-
*
|
|
17
|
+
* @category annotations
|
|
18
|
+
* @since 4.0.0
|
|
19
|
+
*/
|
|
20
|
+
export interface CheckRepresentationAnnotation<S> extends RepresentationAnnotation {
|
|
21
|
+
readonly schemas?: ReadonlyArray<S> | undefined;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Input passed to JSON Schema compiler annotations.
|
|
12
25
|
*
|
|
13
|
-
*
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
26
|
+
* @since 4.0.0
|
|
27
|
+
*/
|
|
28
|
+
export declare namespace ToJsonSchema {
|
|
29
|
+
/**
|
|
30
|
+
* Input for a check compiler.
|
|
31
|
+
*
|
|
32
|
+
* @category models
|
|
33
|
+
* @since 4.0.0
|
|
34
|
+
*/
|
|
35
|
+
interface CheckInput {
|
|
36
|
+
readonly type: JsonSchema.Type | undefined;
|
|
37
|
+
readonly schemas: ReadonlyArray<JsonSchema.JsonSchema>;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Compiles a check to a JSON Schema fragment.
|
|
41
|
+
*
|
|
42
|
+
* **Gotchas**
|
|
43
|
+
*
|
|
44
|
+
* Treat the input schemas as immutable. The returned value must be a valid JSON Schema object graph and must not be
|
|
45
|
+
* mutated after this function returns. Return a new object graph to produce different output during a later
|
|
46
|
+
* compilation.
|
|
47
|
+
*
|
|
48
|
+
* @category models
|
|
49
|
+
* @since 4.0.0
|
|
50
|
+
*/
|
|
51
|
+
type Check = (input: CheckInput) => JsonSchema.JsonSchema;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Input and output contracts for code generation annotations.
|
|
17
55
|
*
|
|
18
|
-
* @
|
|
19
|
-
|
|
56
|
+
* @since 4.0.0
|
|
57
|
+
*/
|
|
58
|
+
export declare namespace Generation {
|
|
59
|
+
/**
|
|
60
|
+
* Input for declaration code generation.
|
|
61
|
+
*
|
|
62
|
+
* @category models
|
|
63
|
+
* @since 4.0.0
|
|
64
|
+
*/
|
|
65
|
+
interface DeclarationInput {
|
|
66
|
+
readonly typeParameters: ReadonlyArray<Code>;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Output of declaration code generation.
|
|
70
|
+
*
|
|
71
|
+
* @category models
|
|
72
|
+
* @since 4.0.0
|
|
73
|
+
*/
|
|
74
|
+
interface DeclarationOutput {
|
|
75
|
+
readonly runtime: string;
|
|
76
|
+
readonly Type: string;
|
|
77
|
+
readonly importDeclarations?: ReadonlyArray<string> | undefined;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Declaration code generator.
|
|
81
|
+
*
|
|
82
|
+
* @category models
|
|
83
|
+
* @since 4.0.0
|
|
84
|
+
*/
|
|
85
|
+
type Declaration = (input: DeclarationInput) => DeclarationOutput;
|
|
86
|
+
/**
|
|
87
|
+
* Input for check code generation.
|
|
88
|
+
*
|
|
89
|
+
* @category models
|
|
90
|
+
* @since 4.0.0
|
|
91
|
+
*/
|
|
92
|
+
interface CheckInput {
|
|
93
|
+
readonly schemas: ReadonlyArray<Code>;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Output of check code generation.
|
|
97
|
+
*
|
|
98
|
+
* @category models
|
|
99
|
+
* @since 4.0.0
|
|
100
|
+
*/
|
|
101
|
+
interface CheckOutput {
|
|
102
|
+
readonly runtime: string;
|
|
103
|
+
readonly importDeclarations?: ReadonlyArray<string> | undefined;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Check code generator.
|
|
107
|
+
*
|
|
108
|
+
* @category models
|
|
109
|
+
* @since 4.0.0
|
|
110
|
+
*/
|
|
111
|
+
type Check = (input: CheckInput) => CheckOutput;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* A custom opaque declaration.
|
|
20
115
|
*
|
|
21
116
|
* @category models
|
|
22
117
|
* @since 4.0.0
|
|
23
118
|
*/
|
|
24
119
|
export interface Declaration {
|
|
25
120
|
readonly _tag: "Declaration";
|
|
121
|
+
readonly representation?: RepresentationAnnotation | undefined;
|
|
26
122
|
readonly annotations?: Schema.Annotations.Annotations | undefined;
|
|
27
123
|
readonly typeParameters: ReadonlyArray<Representation>;
|
|
28
|
-
readonly checks: ReadonlyArray<Check
|
|
29
|
-
readonly encodedSchema: Representation;
|
|
124
|
+
readonly checks: ReadonlyArray<Check>;
|
|
30
125
|
}
|
|
31
126
|
/**
|
|
32
|
-
* A lazily resolved representation
|
|
33
|
-
*
|
|
34
|
-
* **Details**
|
|
35
|
-
*
|
|
36
|
-
* `thunk` points to the actual representation, possibly via a
|
|
37
|
-
* {@link Reference}. `checks` is always empty on `Suspend` nodes.
|
|
38
|
-
*
|
|
39
|
-
* @see {@link Reference}
|
|
127
|
+
* A lazily resolved representation.
|
|
40
128
|
*
|
|
41
129
|
* @category models
|
|
42
130
|
* @since 4.0.0
|
|
@@ -48,25 +136,7 @@ export interface Suspend {
|
|
|
48
136
|
readonly thunk: Representation;
|
|
49
137
|
}
|
|
50
138
|
/**
|
|
51
|
-
* A named reference
|
|
52
|
-
*
|
|
53
|
-
* **When to use**
|
|
54
|
-
*
|
|
55
|
-
* Use when a representation should point to a named definition instead of
|
|
56
|
-
* embedding the definition inline.
|
|
57
|
-
*
|
|
58
|
-
* **Details**
|
|
59
|
-
*
|
|
60
|
-
* `$ref` is the key into `Document.references` or `MultiDocument.references`.
|
|
61
|
-
* References are resolved lazily by {@link toSchema} and
|
|
62
|
-
* {@link toCodeDocument}.
|
|
63
|
-
*
|
|
64
|
-
* **Gotchas**
|
|
65
|
-
*
|
|
66
|
-
* Resolution throws at runtime if the key is not found in the references map.
|
|
67
|
-
*
|
|
68
|
-
* @see {@link References}
|
|
69
|
-
* @see {@link Document}
|
|
139
|
+
* A named reference.
|
|
70
140
|
*
|
|
71
141
|
* @category models
|
|
72
142
|
* @since 4.0.0
|
|
@@ -75,227 +145,155 @@ export interface Reference {
|
|
|
75
145
|
readonly _tag: "Reference";
|
|
76
146
|
readonly $ref: string;
|
|
77
147
|
}
|
|
148
|
+
interface Keyword<Tag extends string> {
|
|
149
|
+
readonly _tag: Tag;
|
|
150
|
+
readonly annotations?: Schema.Annotations.Annotations | undefined;
|
|
151
|
+
readonly checks: ReadonlyArray<Check>;
|
|
152
|
+
}
|
|
78
153
|
/**
|
|
79
|
-
* The
|
|
154
|
+
* The null keyword representation.
|
|
80
155
|
*
|
|
81
156
|
* @category models
|
|
82
157
|
* @since 4.0.0
|
|
83
158
|
*/
|
|
84
|
-
export interface Null {
|
|
85
|
-
readonly _tag: "Null";
|
|
86
|
-
readonly annotations?: Schema.Annotations.Annotations | undefined;
|
|
159
|
+
export interface Null extends Keyword<"Null"> {
|
|
87
160
|
}
|
|
88
161
|
/**
|
|
89
|
-
* The
|
|
162
|
+
* The undefined keyword representation.
|
|
90
163
|
*
|
|
91
164
|
* @category models
|
|
92
165
|
* @since 4.0.0
|
|
93
166
|
*/
|
|
94
|
-
export interface Undefined {
|
|
95
|
-
readonly _tag: "Undefined";
|
|
96
|
-
readonly annotations?: Schema.Annotations.Annotations | undefined;
|
|
167
|
+
export interface Undefined extends Keyword<"Undefined"> {
|
|
97
168
|
}
|
|
98
169
|
/**
|
|
99
|
-
* The
|
|
170
|
+
* The void keyword representation.
|
|
100
171
|
*
|
|
101
172
|
* @category models
|
|
102
173
|
* @since 4.0.0
|
|
103
174
|
*/
|
|
104
|
-
export interface Void {
|
|
105
|
-
readonly _tag: "Void";
|
|
106
|
-
readonly annotations?: Schema.Annotations.Annotations | undefined;
|
|
175
|
+
export interface Void extends Keyword<"Void"> {
|
|
107
176
|
}
|
|
108
177
|
/**
|
|
109
|
-
* The
|
|
178
|
+
* The never keyword representation.
|
|
110
179
|
*
|
|
111
180
|
* @category models
|
|
112
181
|
* @since 4.0.0
|
|
113
182
|
*/
|
|
114
|
-
export interface Never {
|
|
115
|
-
readonly _tag: "Never";
|
|
116
|
-
readonly annotations?: Schema.Annotations.Annotations | undefined;
|
|
183
|
+
export interface Never extends Keyword<"Never"> {
|
|
117
184
|
}
|
|
118
185
|
/**
|
|
119
|
-
* The
|
|
186
|
+
* The unknown keyword representation.
|
|
120
187
|
*
|
|
121
188
|
* @category models
|
|
122
189
|
* @since 4.0.0
|
|
123
190
|
*/
|
|
124
|
-
export interface Unknown {
|
|
125
|
-
readonly _tag: "Unknown";
|
|
126
|
-
readonly annotations?: Schema.Annotations.Annotations | undefined;
|
|
191
|
+
export interface Unknown extends Keyword<"Unknown"> {
|
|
127
192
|
}
|
|
128
193
|
/**
|
|
129
|
-
* The
|
|
194
|
+
* The any keyword representation.
|
|
130
195
|
*
|
|
131
196
|
* @category models
|
|
132
197
|
* @since 4.0.0
|
|
133
198
|
*/
|
|
134
|
-
export interface Any {
|
|
135
|
-
readonly _tag: "Any";
|
|
136
|
-
readonly annotations?: Schema.Annotations.Annotations | undefined;
|
|
199
|
+
export interface Any extends Keyword<"Any"> {
|
|
137
200
|
}
|
|
138
201
|
/**
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
* **Details**
|
|
142
|
-
*
|
|
143
|
-
* `checks` holds string-specific constraints, such as min/max length, pattern,
|
|
144
|
-
* and UUID checks. `contentMediaType` and `contentSchema` indicate that the
|
|
145
|
-
* string contains encoded data, such as `"application/json"` with a nested
|
|
146
|
-
* schema.
|
|
147
|
-
*
|
|
148
|
-
* @see {@link StringMeta}
|
|
149
|
-
* @see {@link Check}
|
|
202
|
+
* A string representation.
|
|
150
203
|
*
|
|
151
204
|
* @category models
|
|
152
205
|
* @since 4.0.0
|
|
153
206
|
*/
|
|
154
|
-
export interface String {
|
|
155
|
-
readonly _tag: "String";
|
|
156
|
-
readonly annotations?: Schema.Annotations.Annotations | undefined;
|
|
157
|
-
readonly checks: ReadonlyArray<Check<StringMeta>>;
|
|
158
|
-
readonly contentMediaType?: string | undefined;
|
|
159
|
-
readonly contentSchema?: Representation | undefined;
|
|
207
|
+
export interface String extends Keyword<"String"> {
|
|
160
208
|
}
|
|
161
209
|
/**
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
* **Details**
|
|
165
|
-
*
|
|
166
|
-
* `checks` holds number-specific constraints, such as int, finite, min, max,
|
|
167
|
-
* multipleOf, and between checks.
|
|
168
|
-
*
|
|
169
|
-
* @see {@link NumberMeta}
|
|
210
|
+
* A number representation.
|
|
170
211
|
*
|
|
171
212
|
* @category models
|
|
172
213
|
* @since 4.0.0
|
|
173
214
|
*/
|
|
174
|
-
export interface Number {
|
|
175
|
-
readonly _tag: "Number";
|
|
176
|
-
readonly annotations?: Schema.Annotations.Annotations | undefined;
|
|
177
|
-
readonly checks: ReadonlyArray<Check<NumberMeta>>;
|
|
215
|
+
export interface Number extends Keyword<"Number"> {
|
|
178
216
|
}
|
|
179
217
|
/**
|
|
180
|
-
*
|
|
218
|
+
* A boolean representation.
|
|
181
219
|
*
|
|
182
220
|
* @category models
|
|
183
221
|
* @since 4.0.0
|
|
184
222
|
*/
|
|
185
|
-
export interface Boolean {
|
|
186
|
-
readonly _tag: "Boolean";
|
|
187
|
-
readonly annotations?: Schema.Annotations.Annotations | undefined;
|
|
223
|
+
export interface Boolean extends Keyword<"Boolean"> {
|
|
188
224
|
}
|
|
189
225
|
/**
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
* @see {@link BigIntMeta}
|
|
226
|
+
* A bigint representation.
|
|
193
227
|
*
|
|
194
228
|
* @category models
|
|
195
229
|
* @since 4.0.0
|
|
196
230
|
*/
|
|
197
|
-
export interface BigInt {
|
|
198
|
-
readonly _tag: "BigInt";
|
|
199
|
-
readonly annotations?: Schema.Annotations.Annotations | undefined;
|
|
200
|
-
readonly checks: ReadonlyArray<Check<BigIntMeta>>;
|
|
231
|
+
export interface BigInt extends Keyword<"BigInt"> {
|
|
201
232
|
}
|
|
202
233
|
/**
|
|
203
|
-
*
|
|
234
|
+
* A symbol representation.
|
|
204
235
|
*
|
|
205
236
|
* @category models
|
|
206
237
|
* @since 4.0.0
|
|
207
238
|
*/
|
|
208
|
-
export interface Symbol {
|
|
209
|
-
readonly _tag: "Symbol";
|
|
210
|
-
readonly annotations?: Schema.Annotations.Annotations | undefined;
|
|
239
|
+
export interface Symbol extends Keyword<"Symbol"> {
|
|
211
240
|
}
|
|
212
241
|
/**
|
|
213
|
-
* A
|
|
242
|
+
* A literal representation.
|
|
243
|
+
*
|
|
244
|
+
* **Details**
|
|
245
|
+
*
|
|
246
|
+
* The live representation stores the native literal value. Persistent codecs
|
|
247
|
+
* add an explicit type discriminator when encoding it.
|
|
214
248
|
*
|
|
215
249
|
* @category models
|
|
216
250
|
* @since 4.0.0
|
|
217
251
|
*/
|
|
218
|
-
export interface Literal {
|
|
219
|
-
readonly
|
|
220
|
-
readonly annotations?: Schema.Annotations.Annotations | undefined;
|
|
221
|
-
readonly literal: string | number | boolean | bigint;
|
|
252
|
+
export interface Literal extends Keyword<"Literal"> {
|
|
253
|
+
readonly literal: SchemaAST.LiteralValue;
|
|
222
254
|
}
|
|
223
255
|
/**
|
|
224
|
-
* A
|
|
256
|
+
* A unique global symbol representation.
|
|
225
257
|
*
|
|
226
258
|
* @category models
|
|
227
259
|
* @since 4.0.0
|
|
228
260
|
*/
|
|
229
|
-
export interface UniqueSymbol {
|
|
230
|
-
readonly _tag: "UniqueSymbol";
|
|
231
|
-
readonly annotations?: Schema.Annotations.Annotations | undefined;
|
|
261
|
+
export interface UniqueSymbol extends Keyword<"UniqueSymbol"> {
|
|
232
262
|
readonly symbol: symbol;
|
|
233
263
|
}
|
|
234
264
|
/**
|
|
235
|
-
* The
|
|
265
|
+
* The object keyword representation.
|
|
236
266
|
*
|
|
237
267
|
* @category models
|
|
238
268
|
* @since 4.0.0
|
|
239
269
|
*/
|
|
240
|
-
export interface ObjectKeyword {
|
|
241
|
-
readonly _tag: "ObjectKeyword";
|
|
242
|
-
readonly annotations?: Schema.Annotations.Annotations | undefined;
|
|
270
|
+
export interface ObjectKeyword extends Keyword<"ObjectKeyword"> {
|
|
243
271
|
}
|
|
244
272
|
/**
|
|
245
|
-
*
|
|
273
|
+
* An enum representation.
|
|
274
|
+
*
|
|
275
|
+
* **Details**
|
|
276
|
+
*
|
|
277
|
+
* Enum members are stored as native string or number values. Persistent
|
|
278
|
+
* codecs add an explicit type discriminator when encoding them.
|
|
246
279
|
*
|
|
247
280
|
* @category models
|
|
248
281
|
* @since 4.0.0
|
|
249
282
|
*/
|
|
250
|
-
export interface Enum {
|
|
251
|
-
readonly _tag: "Enum";
|
|
252
|
-
readonly annotations?: Schema.Annotations.Annotations | undefined;
|
|
283
|
+
export interface Enum extends Keyword<"Enum"> {
|
|
253
284
|
readonly enums: ReadonlyArray<readonly [string, string | number]>;
|
|
254
285
|
}
|
|
255
286
|
/**
|
|
256
|
-
* A template literal
|
|
257
|
-
* numbers, etc.).
|
|
287
|
+
* A template literal representation.
|
|
258
288
|
*
|
|
259
289
|
* @category models
|
|
260
290
|
* @since 4.0.0
|
|
261
291
|
*/
|
|
262
|
-
export interface TemplateLiteral {
|
|
263
|
-
readonly _tag: "TemplateLiteral";
|
|
264
|
-
readonly annotations?: Schema.Annotations.Annotations | undefined;
|
|
292
|
+
export interface TemplateLiteral extends Keyword<"TemplateLiteral"> {
|
|
265
293
|
readonly parts: ReadonlyArray<Representation>;
|
|
266
294
|
}
|
|
267
295
|
/**
|
|
268
|
-
*
|
|
269
|
-
*
|
|
270
|
-
* **Details**
|
|
271
|
-
*
|
|
272
|
-
* `elements` are the fixed positional elements, or tuple prefix, and each may
|
|
273
|
-
* be optional. `rest` contains the variadic tail types; a single-element
|
|
274
|
-
* `rest` with no `elements` produces a plain `Array<T>`. `checks` holds
|
|
275
|
-
* array-specific constraints, such as minLength, maxLength, and unique checks.
|
|
276
|
-
*
|
|
277
|
-
* @see {@link Element}
|
|
278
|
-
* @see {@link ArraysMeta}
|
|
279
|
-
*
|
|
280
|
-
* @category models
|
|
281
|
-
* @since 4.0.0
|
|
282
|
-
*/
|
|
283
|
-
export interface Arrays {
|
|
284
|
-
readonly _tag: "Arrays";
|
|
285
|
-
readonly annotations?: Schema.Annotations.Annotations | undefined;
|
|
286
|
-
readonly elements: ReadonlyArray<Element>;
|
|
287
|
-
readonly rest: ReadonlyArray<Representation>;
|
|
288
|
-
readonly checks: ReadonlyArray<Check<ArraysMeta>>;
|
|
289
|
-
}
|
|
290
|
-
/**
|
|
291
|
-
* A positional element within an {@link Arrays} tuple.
|
|
292
|
-
*
|
|
293
|
-
* **Details**
|
|
294
|
-
*
|
|
295
|
-
* `isOptional` indicates whether this element can be absent. `type` is the
|
|
296
|
-
* schema representation for this element's value.
|
|
297
|
-
*
|
|
298
|
-
* @see {@link Arrays}
|
|
296
|
+
* A tuple element.
|
|
299
297
|
*
|
|
300
298
|
* @category models
|
|
301
299
|
* @since 4.0.0
|
|
@@ -306,38 +304,27 @@ export interface Element {
|
|
|
306
304
|
readonly annotations?: Schema.Annotations.Annotations | undefined;
|
|
307
305
|
}
|
|
308
306
|
/**
|
|
309
|
-
* An
|
|
310
|
-
*
|
|
311
|
-
* **Details**
|
|
312
|
-
*
|
|
313
|
-
* `propertySignatures` are the explicitly named fields. `indexSignatures`
|
|
314
|
-
* define catch-all key/value types, such as `Record<string, T>`. `checks`
|
|
315
|
-
* holds object-specific constraints, such as minProperties and maxProperties.
|
|
316
|
-
*
|
|
317
|
-
* @see {@link PropertySignature}
|
|
318
|
-
* @see {@link IndexSignature}
|
|
319
|
-
* @see {@link ObjectsMeta}
|
|
307
|
+
* An array or tuple representation.
|
|
320
308
|
*
|
|
321
309
|
* @category models
|
|
322
310
|
* @since 4.0.0
|
|
323
311
|
*/
|
|
324
|
-
export interface
|
|
325
|
-
readonly
|
|
326
|
-
readonly
|
|
327
|
-
readonly propertySignatures: ReadonlyArray<PropertySignature>;
|
|
328
|
-
readonly indexSignatures: ReadonlyArray<IndexSignature>;
|
|
329
|
-
readonly checks: ReadonlyArray<Check<ObjectsMeta>>;
|
|
312
|
+
export interface Arrays extends Keyword<"Arrays"> {
|
|
313
|
+
readonly elements: ReadonlyArray<Element>;
|
|
314
|
+
readonly rest: ReadonlyArray<Representation>;
|
|
330
315
|
}
|
|
331
316
|
/**
|
|
332
|
-
* A
|
|
317
|
+
* A property signature.
|
|
333
318
|
*
|
|
334
319
|
* **Details**
|
|
335
320
|
*
|
|
336
|
-
*
|
|
337
|
-
*
|
|
338
|
-
* whether the property is mutable rather than readonly.
|
|
321
|
+
* The live representation stores the native property key. Persistent codecs
|
|
322
|
+
* add an explicit type discriminator when encoding it.
|
|
339
323
|
*
|
|
340
|
-
*
|
|
324
|
+
* **Gotchas**
|
|
325
|
+
*
|
|
326
|
+
* Local symbols can be represented while the schema is live, but persistent
|
|
327
|
+
* codecs reject them because they cannot be reconstructed by identity.
|
|
341
328
|
*
|
|
342
329
|
* @category models
|
|
343
330
|
* @since 4.0.0
|
|
@@ -350,15 +337,7 @@ export interface PropertySignature {
|
|
|
350
337
|
readonly annotations?: Schema.Annotations.Annotations | undefined;
|
|
351
338
|
}
|
|
352
339
|
/**
|
|
353
|
-
* An index signature
|
|
354
|
-
* {@link Objects}.
|
|
355
|
-
*
|
|
356
|
-
* **Details**
|
|
357
|
-
*
|
|
358
|
-
* `parameter` is the key type representation. `type` is the value type
|
|
359
|
-
* representation.
|
|
360
|
-
*
|
|
361
|
-
* @see {@link Objects}
|
|
340
|
+
* An index signature.
|
|
362
341
|
*
|
|
363
342
|
* @category models
|
|
364
343
|
* @since 4.0.0
|
|
@@ -368,1581 +347,524 @@ export interface IndexSignature {
|
|
|
368
347
|
readonly type: Representation;
|
|
369
348
|
}
|
|
370
349
|
/**
|
|
371
|
-
*
|
|
350
|
+
* An object representation.
|
|
372
351
|
*
|
|
373
|
-
*
|
|
374
|
-
*
|
|
375
|
-
|
|
376
|
-
|
|
352
|
+
* @category models
|
|
353
|
+
* @since 4.0.0
|
|
354
|
+
*/
|
|
355
|
+
export interface Objects extends Keyword<"Objects"> {
|
|
356
|
+
readonly propertySignatures: ReadonlyArray<PropertySignature>;
|
|
357
|
+
readonly indexSignatures: ReadonlyArray<IndexSignature>;
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* A union representation.
|
|
377
361
|
*
|
|
378
362
|
* @category models
|
|
379
363
|
* @since 4.0.0
|
|
380
364
|
*/
|
|
381
|
-
export interface Union {
|
|
382
|
-
readonly _tag: "Union";
|
|
383
|
-
readonly annotations?: Schema.Annotations.Annotations | undefined;
|
|
365
|
+
export interface Union extends Keyword<"Union"> {
|
|
384
366
|
readonly types: ReadonlyArray<Representation>;
|
|
385
367
|
readonly mode: "anyOf" | "oneOf";
|
|
386
368
|
}
|
|
387
369
|
/**
|
|
388
|
-
* The
|
|
389
|
-
*
|
|
390
|
-
* **Details**
|
|
391
|
-
*
|
|
392
|
-
* Each variant has a `_tag` discriminator. Switch on `_tag` to handle each
|
|
393
|
-
* shape. Most variants carry optional `annotations` and some carry `checks`
|
|
394
|
-
* for validation constraints.
|
|
395
|
-
*
|
|
396
|
-
* @see {@link Document}
|
|
397
|
-
* @see {@link fromAST}
|
|
370
|
+
* The structural schema representation.
|
|
398
371
|
*
|
|
399
372
|
* @category models
|
|
400
373
|
* @since 4.0.0
|
|
401
374
|
*/
|
|
402
375
|
export type Representation = Declaration | Reference | Suspend | Null | Undefined | Void | Never | Unknown | Any | String | Number | Boolean | BigInt | Symbol | Literal | UniqueSymbol | ObjectKeyword | Enum | TemplateLiteral | Arrays | Objects | Union;
|
|
403
376
|
/**
|
|
404
|
-
* A
|
|
405
|
-
* or a {@link FilterGroup} combining multiple checks.
|
|
406
|
-
*
|
|
407
|
-
* @see {@link Filter}
|
|
408
|
-
* @see {@link FilterGroup}
|
|
377
|
+
* A structural check.
|
|
409
378
|
*
|
|
410
379
|
* @category models
|
|
411
380
|
* @since 4.0.0
|
|
412
381
|
*/
|
|
413
|
-
export type Check
|
|
382
|
+
export type Check = Filter | FilterGroup;
|
|
414
383
|
/**
|
|
415
|
-
*
|
|
416
|
-
* (e.g. `{ _tag: "isMinLength", minLength: 3 }`).
|
|
417
|
-
*
|
|
418
|
-
* @see {@link Check}
|
|
384
|
+
* An opaque leaf check.
|
|
419
385
|
*
|
|
420
386
|
* @category models
|
|
421
387
|
* @since 4.0.0
|
|
422
388
|
*/
|
|
423
|
-
export interface Filter
|
|
389
|
+
export interface Filter {
|
|
424
390
|
readonly _tag: "Filter";
|
|
425
|
-
readonly
|
|
426
|
-
readonly
|
|
391
|
+
readonly representation?: CheckRepresentationAnnotation<Representation> | undefined;
|
|
392
|
+
readonly annotations?: Schema.Annotations.Annotations | undefined;
|
|
393
|
+
readonly aborted: boolean;
|
|
427
394
|
}
|
|
428
395
|
/**
|
|
429
|
-
* A group of
|
|
430
|
-
* at least one {@link Check}.
|
|
431
|
-
*
|
|
432
|
-
* @see {@link Check}
|
|
396
|
+
* A non-empty group of checks.
|
|
433
397
|
*
|
|
434
398
|
* @category models
|
|
435
399
|
* @since 4.0.0
|
|
436
400
|
*/
|
|
437
|
-
export interface FilterGroup
|
|
401
|
+
export interface FilterGroup {
|
|
438
402
|
readonly _tag: "FilterGroup";
|
|
439
|
-
readonly
|
|
440
|
-
readonly
|
|
403
|
+
readonly representation?: CheckRepresentationAnnotation<Representation> | undefined;
|
|
404
|
+
readonly annotations?: Schema.Annotations.Annotations | undefined;
|
|
405
|
+
readonly checks: readonly [Check, ...Array<Check>];
|
|
441
406
|
}
|
|
442
407
|
/**
|
|
443
|
-
*
|
|
444
|
-
* pattern, UUID, trimmed, etc.).
|
|
445
|
-
*
|
|
446
|
-
* @see {@link String}
|
|
447
|
-
* @see {@link Check}
|
|
448
|
-
*
|
|
449
|
-
* @category models
|
|
450
|
-
* @since 4.0.0
|
|
451
|
-
*/
|
|
452
|
-
export type StringMeta = Schema.Annotations.BuiltInMetaDefinitions["isStringFinite" | "isStringBigInt" | "isStringSymbol" | "isMinLength" | "isMaxLength" | "isPattern" | "isLengthBetween" | "isTrimmed" | "isUUID" | "isGUID" | "isULID" | "isBase64" | "isBase64Url" | "isStartsWith" | "isEndsWith" | "isIncludes" | "isUppercased" | "isLowercased" | "isCapitalized" | "isUncapitalized"];
|
|
453
|
-
/**
|
|
454
|
-
* Metadata union for number-specific validation checks (int, finite,
|
|
455
|
-
* min, max, multipleOf, between).
|
|
456
|
-
*
|
|
457
|
-
* @see {@link Number}
|
|
458
|
-
* @see {@link Check}
|
|
459
|
-
*
|
|
460
|
-
* @category models
|
|
461
|
-
* @since 4.0.0
|
|
462
|
-
*/
|
|
463
|
-
export type NumberMeta = Schema.Annotations.BuiltInMetaDefinitions["isInt" | "isFinite" | "isMultipleOf" | "isGreaterThanOrEqualTo" | "isLessThanOrEqualTo" | "isGreaterThan" | "isLessThan" | "isBetween"];
|
|
464
|
-
/**
|
|
465
|
-
* Metadata union for bigint-specific validation checks (min, max, between).
|
|
466
|
-
*
|
|
467
|
-
* @see {@link BigInt}
|
|
468
|
-
* @see {@link Check}
|
|
408
|
+
* Named representation definitions.
|
|
469
409
|
*
|
|
470
410
|
* @category models
|
|
471
411
|
* @since 4.0.0
|
|
472
412
|
*/
|
|
473
|
-
export
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
* length, unique).
|
|
477
|
-
*
|
|
478
|
-
* @see {@link Arrays}
|
|
479
|
-
* @see {@link Check}
|
|
480
|
-
*
|
|
481
|
-
* @category models
|
|
482
|
-
* @since 4.0.0
|
|
483
|
-
*/
|
|
484
|
-
export type ArraysMeta = Schema.Annotations.BuiltInMetaDefinitions["isMinLength" | "isMaxLength" | "isLengthBetween" | "isUnique"];
|
|
413
|
+
export interface References {
|
|
414
|
+
readonly [$ref: string]: Representation;
|
|
415
|
+
}
|
|
485
416
|
/**
|
|
486
|
-
*
|
|
487
|
-
* maxProperties, propertiesLength, propertyNames).
|
|
488
|
-
*
|
|
489
|
-
* @see {@link Objects}
|
|
490
|
-
* @see {@link Check}
|
|
417
|
+
* A single representation and its definitions.
|
|
491
418
|
*
|
|
492
419
|
* @category models
|
|
493
420
|
* @since 4.0.0
|
|
494
421
|
*/
|
|
495
|
-
export
|
|
496
|
-
readonly
|
|
497
|
-
readonly
|
|
498
|
-
}
|
|
422
|
+
export interface Document {
|
|
423
|
+
readonly representation: Representation;
|
|
424
|
+
readonly references: References;
|
|
425
|
+
}
|
|
499
426
|
/**
|
|
500
|
-
*
|
|
501
|
-
*
|
|
502
|
-
* @see {@link Declaration}
|
|
503
|
-
* @see {@link DeclarationMeta}
|
|
427
|
+
* Multiple representations sharing definitions.
|
|
504
428
|
*
|
|
505
429
|
* @category models
|
|
506
430
|
* @since 4.0.0
|
|
507
431
|
*/
|
|
508
|
-
export
|
|
432
|
+
export interface MultiDocument {
|
|
433
|
+
readonly representations: readonly [Representation, ...Array<Representation>];
|
|
434
|
+
readonly references: References;
|
|
435
|
+
}
|
|
509
436
|
/**
|
|
510
|
-
*
|
|
511
|
-
* Used for collection types like `Set`, `Map`.
|
|
512
|
-
*
|
|
513
|
-
* @see {@link Declaration}
|
|
514
|
-
* @see {@link DeclarationMeta}
|
|
437
|
+
* Reviver for a declaration.
|
|
515
438
|
*
|
|
516
439
|
* @category models
|
|
517
440
|
* @since 4.0.0
|
|
518
441
|
*/
|
|
519
|
-
export
|
|
442
|
+
export interface DeclarationReviver<P> {
|
|
443
|
+
readonly id: string;
|
|
444
|
+
readonly payloadSchema: Schema.Decoder<P>;
|
|
445
|
+
readonly revive: (input: {
|
|
446
|
+
readonly payload: P;
|
|
447
|
+
readonly typeParameters: ReadonlyArray<Schema.Top>;
|
|
448
|
+
readonly annotations: Schema.Annotations.Annotations | undefined;
|
|
449
|
+
}) => Schema.Top;
|
|
450
|
+
}
|
|
520
451
|
/**
|
|
521
|
-
*
|
|
522
|
-
* or {@link SizeMeta}.
|
|
452
|
+
* Reviver for a leaf check.
|
|
523
453
|
*
|
|
524
454
|
* @category models
|
|
525
455
|
* @since 4.0.0
|
|
526
456
|
*/
|
|
527
|
-
export
|
|
457
|
+
export interface FilterReviver<P> {
|
|
458
|
+
readonly id: string;
|
|
459
|
+
readonly payloadSchema: Schema.Decoder<P>;
|
|
460
|
+
readonly revive: (input: {
|
|
461
|
+
readonly payload: P;
|
|
462
|
+
readonly schemas: ReadonlyArray<Schema.Top>;
|
|
463
|
+
readonly annotations: Schema.Annotations.Filter | undefined;
|
|
464
|
+
}) => SchemaAST.Filter<any>;
|
|
465
|
+
}
|
|
528
466
|
/**
|
|
529
|
-
*
|
|
530
|
-
* {@link Document} and {@link MultiDocument} for `$ref` resolution (analogous
|
|
531
|
-
* to JSON Schema `$defs`).
|
|
532
|
-
*
|
|
533
|
-
* @see {@link Reference}
|
|
534
|
-
* @see {@link Document}
|
|
467
|
+
* Reviver for a check group.
|
|
535
468
|
*
|
|
536
469
|
* @category models
|
|
537
470
|
* @since 4.0.0
|
|
538
471
|
*/
|
|
539
|
-
export interface
|
|
540
|
-
readonly
|
|
472
|
+
export interface FilterGroupReviver<P> {
|
|
473
|
+
readonly id: string;
|
|
474
|
+
readonly payloadSchema: Schema.Decoder<P>;
|
|
475
|
+
readonly revive: (input: {
|
|
476
|
+
readonly payload: P;
|
|
477
|
+
readonly schemas: ReadonlyArray<Schema.Top>;
|
|
478
|
+
readonly annotations: Schema.Annotations.Filter | undefined;
|
|
479
|
+
}) => SchemaAST.FilterGroup<any>;
|
|
541
480
|
}
|
|
542
481
|
/**
|
|
543
|
-
* A
|
|
544
|
-
*
|
|
545
|
-
* **When to use**
|
|
546
|
-
*
|
|
547
|
-
* Use when representing a single Schema AST together with its named references
|
|
548
|
-
* before reconstructing a runtime Schema, converting to JSON Schema, or
|
|
549
|
-
* wrapping it as a {@link MultiDocument}.
|
|
550
|
-
*
|
|
551
|
-
* @see {@link MultiDocument}
|
|
552
|
-
* @see {@link fromAST}
|
|
482
|
+
* A check reviver.
|
|
553
483
|
*
|
|
554
484
|
* @category models
|
|
555
485
|
* @since 4.0.0
|
|
556
486
|
*/
|
|
557
|
-
export type
|
|
558
|
-
readonly representation: Representation;
|
|
559
|
-
readonly references: References;
|
|
560
|
-
};
|
|
487
|
+
export type CheckReviver<P> = FilterReviver<P> | FilterGroupReviver<P>;
|
|
561
488
|
/**
|
|
562
|
-
*
|
|
563
|
-
*
|
|
564
|
-
* **When to use**
|
|
565
|
-
*
|
|
566
|
-
* Use when you use {@link fromASTs} to create this from multiple Schema ASTs,
|
|
567
|
-
* {@link toCodeDocument} to generate TypeScript code, and
|
|
568
|
-
* {@link toJsonSchemaMultiDocument} to convert to JSON Schema.
|
|
569
|
-
*
|
|
570
|
-
* @see {@link Document}
|
|
571
|
-
* @see {@link fromASTs}
|
|
489
|
+
* A typed reviver.
|
|
572
490
|
*
|
|
573
491
|
* @category models
|
|
574
492
|
* @since 4.0.0
|
|
575
493
|
*/
|
|
576
|
-
export type
|
|
577
|
-
readonly representations: readonly [Representation, ...Array<Representation>];
|
|
578
|
-
readonly references: References;
|
|
579
|
-
};
|
|
580
|
-
/**
|
|
581
|
-
* A tree of primitive values used to serialize annotations to JSON.
|
|
582
|
-
*
|
|
583
|
-
* @category Tree
|
|
584
|
-
* @since 4.0.0
|
|
585
|
-
*/
|
|
586
|
-
export type PrimitiveTree = Schema.Tree<null | number | boolean | bigint | symbol | string>;
|
|
494
|
+
export type Reviver<P> = DeclarationReviver<P> | CheckReviver<P>;
|
|
587
495
|
/**
|
|
588
|
-
*
|
|
589
|
-
*
|
|
590
|
-
* **When to use**
|
|
591
|
-
*
|
|
592
|
-
* Use to validate recursive annotation metadata trees whose leaves are `null`,
|
|
593
|
-
* `number`, `boolean`, `bigint`, `symbol`, or `string`.
|
|
594
|
-
*
|
|
595
|
-
* @see {@link PrimitiveTree} for the recursive tree type accepted by this codec
|
|
596
|
-
* @see {@link $Annotations} for the annotation codec that filters values through this codec
|
|
496
|
+
* A reviver erased only at collection boundaries.
|
|
597
497
|
*
|
|
598
|
-
* @category
|
|
498
|
+
* @category models
|
|
599
499
|
* @since 4.0.0
|
|
600
500
|
*/
|
|
601
|
-
export
|
|
501
|
+
export type AnyReviver = Reviver<any>;
|
|
602
502
|
/**
|
|
603
|
-
*
|
|
604
|
-
* filters out internal annotation keys and non-primitive values during
|
|
605
|
-
* encoding.
|
|
606
|
-
*
|
|
607
|
-
* **When to use**
|
|
503
|
+
* Creates a declaration reviver while inferring its payload type from `payloadSchema`.
|
|
608
504
|
*
|
|
609
|
-
*
|
|
610
|
-
* only primitive-tree metadata.
|
|
611
|
-
*
|
|
612
|
-
* **Details**
|
|
613
|
-
*
|
|
614
|
-
* Decoding is passthrough. Encoding removes internal annotation keys and values
|
|
615
|
-
* that are not accepted by `$PrimitiveTree`.
|
|
616
|
-
*
|
|
617
|
-
* @see {@link $PrimitiveTree} for the codec used to filter annotation values
|
|
618
|
-
*
|
|
619
|
-
* @category schemas
|
|
505
|
+
* @category constructors
|
|
620
506
|
* @since 4.0.0
|
|
621
507
|
*/
|
|
622
|
-
export declare const
|
|
508
|
+
export declare const makeDeclarationReviver: <P>(id: string, payloadSchema: Schema.Decoder<P>, revive: DeclarationReviver<P>["revive"]) => DeclarationReviver<P>;
|
|
623
509
|
/**
|
|
624
|
-
*
|
|
510
|
+
* Creates a filter reviver while inferring its payload type from `payloadSchema`.
|
|
625
511
|
*
|
|
626
|
-
* @category
|
|
512
|
+
* @category constructors
|
|
627
513
|
* @since 4.0.0
|
|
628
514
|
*/
|
|
629
|
-
export declare const
|
|
630
|
-
readonly _tag: Schema.tag<"Null">;
|
|
631
|
-
readonly annotations: Schema.optional<Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<PrimitiveTree, PrimitiveTree, never, never>>, never, never>>;
|
|
632
|
-
}>;
|
|
515
|
+
export declare const makeFilterReviver: <P>(id: string, payloadSchema: Schema.Decoder<P>, revive: FilterReviver<P>["revive"]) => FilterReviver<P>;
|
|
633
516
|
/**
|
|
634
|
-
*
|
|
517
|
+
* Creates a filter group reviver while inferring its payload type from `payloadSchema`.
|
|
635
518
|
*
|
|
636
|
-
* @category
|
|
519
|
+
* @category constructors
|
|
637
520
|
* @since 4.0.0
|
|
638
521
|
*/
|
|
639
|
-
export declare const
|
|
640
|
-
readonly _tag: Schema.tag<"Undefined">;
|
|
641
|
-
readonly annotations: Schema.optional<Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<PrimitiveTree, PrimitiveTree, never, never>>, never, never>>;
|
|
642
|
-
}>;
|
|
643
|
-
/**
|
|
644
|
-
* Schema for the {@link Void} representation node.
|
|
645
|
-
*
|
|
646
|
-
* @category schemas
|
|
647
|
-
* @since 4.0.0
|
|
648
|
-
*/
|
|
649
|
-
export declare const $Void: Schema.Struct<{
|
|
650
|
-
readonly _tag: Schema.tag<"Void">;
|
|
651
|
-
readonly annotations: Schema.optional<Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<PrimitiveTree, PrimitiveTree, never, never>>, never, never>>;
|
|
652
|
-
}>;
|
|
653
|
-
/**
|
|
654
|
-
* Schema for the {@link Never} representation node.
|
|
655
|
-
*
|
|
656
|
-
* @category schemas
|
|
657
|
-
* @since 4.0.0
|
|
658
|
-
*/
|
|
659
|
-
export declare const $Never: Schema.Struct<{
|
|
660
|
-
readonly _tag: Schema.tag<"Never">;
|
|
661
|
-
readonly annotations: Schema.optional<Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<PrimitiveTree, PrimitiveTree, never, never>>, never, never>>;
|
|
662
|
-
}>;
|
|
522
|
+
export declare const makeFilterGroupReviver: <P>(id: string, payloadSchema: Schema.Decoder<P>, revive: FilterGroupReviver<P>["revive"]) => FilterGroupReviver<P>;
|
|
663
523
|
/**
|
|
664
|
-
*
|
|
665
|
-
*
|
|
666
|
-
* @category schemas
|
|
667
|
-
* @since 4.0.0
|
|
668
|
-
*/
|
|
669
|
-
export declare const $Unknown: Schema.Struct<{
|
|
670
|
-
readonly _tag: Schema.tag<"Unknown">;
|
|
671
|
-
readonly annotations: Schema.optional<Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<PrimitiveTree, PrimitiveTree, never, never>>, never, never>>;
|
|
672
|
-
}>;
|
|
673
|
-
/**
|
|
674
|
-
* Schema for the {@link Any} representation node.
|
|
675
|
-
*
|
|
676
|
-
* @category schemas
|
|
677
|
-
* @since 4.0.0
|
|
678
|
-
*/
|
|
679
|
-
export declare const $Any: Schema.Struct<{
|
|
680
|
-
readonly _tag: Schema.tag<"Any">;
|
|
681
|
-
readonly annotations: Schema.optional<Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<PrimitiveTree, PrimitiveTree, never, never>>, never, never>>;
|
|
682
|
-
}>;
|
|
683
|
-
/**
|
|
684
|
-
* Schema for {@link StringMeta}.
|
|
685
|
-
*
|
|
686
|
-
* @category schemas
|
|
687
|
-
* @since 4.0.0
|
|
688
|
-
*/
|
|
689
|
-
export declare const $StringMeta: Schema.Union<readonly [Schema.Struct<{
|
|
690
|
-
readonly _tag: Schema.tag<"isStringFinite">;
|
|
691
|
-
readonly regExp: Schema.RegExp;
|
|
692
|
-
}>, Schema.Struct<{
|
|
693
|
-
readonly _tag: Schema.tag<"isStringBigInt">;
|
|
694
|
-
readonly regExp: Schema.RegExp;
|
|
695
|
-
}>, Schema.Struct<{
|
|
696
|
-
readonly _tag: Schema.tag<"isStringSymbol">;
|
|
697
|
-
readonly regExp: Schema.RegExp;
|
|
698
|
-
}>, Schema.Struct<{
|
|
699
|
-
readonly _tag: Schema.tag<"isTrimmed">;
|
|
700
|
-
readonly regExp: Schema.RegExp;
|
|
701
|
-
}>, Schema.Struct<{
|
|
702
|
-
readonly _tag: Schema.tag<"isUUID">;
|
|
703
|
-
readonly regExp: Schema.RegExp;
|
|
704
|
-
readonly version: Schema.UndefinedOr<Schema.Literals<readonly [1, 2, 3, 4, 5, 6, 7, 8]>>;
|
|
705
|
-
}>, Schema.Struct<{
|
|
706
|
-
readonly _tag: Schema.tag<"isGUID">;
|
|
707
|
-
readonly regExp: Schema.RegExp;
|
|
708
|
-
}>, Schema.Struct<{
|
|
709
|
-
readonly _tag: Schema.tag<"isULID">;
|
|
710
|
-
readonly regExp: Schema.RegExp;
|
|
711
|
-
}>, Schema.Struct<{
|
|
712
|
-
readonly _tag: Schema.tag<"isBase64">;
|
|
713
|
-
readonly regExp: Schema.RegExp;
|
|
714
|
-
}>, Schema.Struct<{
|
|
715
|
-
readonly _tag: Schema.tag<"isBase64Url">;
|
|
716
|
-
readonly regExp: Schema.RegExp;
|
|
717
|
-
}>, Schema.Struct<{
|
|
718
|
-
readonly _tag: Schema.tag<"isStartsWith">;
|
|
719
|
-
readonly startsWith: Schema.String;
|
|
720
|
-
readonly regExp: Schema.RegExp;
|
|
721
|
-
}>, Schema.Struct<{
|
|
722
|
-
readonly _tag: Schema.tag<"isEndsWith">;
|
|
723
|
-
readonly endsWith: Schema.String;
|
|
724
|
-
readonly regExp: Schema.RegExp;
|
|
725
|
-
}>, Schema.Struct<{
|
|
726
|
-
readonly _tag: Schema.tag<"isIncludes">;
|
|
727
|
-
readonly includes: Schema.String;
|
|
728
|
-
readonly regExp: Schema.RegExp;
|
|
729
|
-
}>, Schema.Struct<{
|
|
730
|
-
readonly _tag: Schema.tag<"isUppercased">;
|
|
731
|
-
readonly regExp: Schema.RegExp;
|
|
732
|
-
}>, Schema.Struct<{
|
|
733
|
-
readonly _tag: Schema.tag<"isLowercased">;
|
|
734
|
-
readonly regExp: Schema.RegExp;
|
|
735
|
-
}>, Schema.Struct<{
|
|
736
|
-
readonly _tag: Schema.tag<"isCapitalized">;
|
|
737
|
-
readonly regExp: Schema.RegExp;
|
|
738
|
-
}>, Schema.Struct<{
|
|
739
|
-
readonly _tag: Schema.tag<"isUncapitalized">;
|
|
740
|
-
readonly regExp: Schema.RegExp;
|
|
741
|
-
}>, Schema.Struct<{
|
|
742
|
-
readonly _tag: Schema.tag<"isMinLength">;
|
|
743
|
-
readonly minLength: Schema.Int;
|
|
744
|
-
}>, Schema.Struct<{
|
|
745
|
-
readonly _tag: Schema.tag<"isMaxLength">;
|
|
746
|
-
readonly maxLength: Schema.Int;
|
|
747
|
-
}>, Schema.Struct<{
|
|
748
|
-
readonly _tag: Schema.tag<"isPattern">;
|
|
749
|
-
readonly regExp: Schema.RegExp;
|
|
750
|
-
}>, Schema.Struct<{
|
|
751
|
-
readonly _tag: Schema.tag<"isLengthBetween">;
|
|
752
|
-
readonly minimum: Schema.Int;
|
|
753
|
-
readonly maximum: Schema.Int;
|
|
754
|
-
}>]>;
|
|
755
|
-
/**
|
|
756
|
-
* Schema for the {@link String} representation node.
|
|
757
|
-
*
|
|
758
|
-
* @category schemas
|
|
759
|
-
* @since 4.0.0
|
|
760
|
-
*/
|
|
761
|
-
export declare const $String: Schema.Struct<{
|
|
762
|
-
readonly _tag: Schema.tag<"String">;
|
|
763
|
-
readonly annotations: Schema.optional<Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<PrimitiveTree, PrimitiveTree, never, never>>, never, never>>;
|
|
764
|
-
readonly checks: Schema.$Array<Schema.Codec<Check<Schema.Struct.ReadonlySide<{
|
|
765
|
-
readonly _tag: Schema.tag<"isStringFinite">;
|
|
766
|
-
readonly regExp: Schema.RegExp;
|
|
767
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
768
|
-
readonly _tag: Schema.tag<"isStringBigInt">;
|
|
769
|
-
readonly regExp: Schema.RegExp;
|
|
770
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
771
|
-
readonly _tag: Schema.tag<"isStringSymbol">;
|
|
772
|
-
readonly regExp: Schema.RegExp;
|
|
773
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
774
|
-
readonly _tag: Schema.tag<"isTrimmed">;
|
|
775
|
-
readonly regExp: Schema.RegExp;
|
|
776
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
777
|
-
readonly _tag: Schema.tag<"isUUID">;
|
|
778
|
-
readonly regExp: Schema.RegExp;
|
|
779
|
-
readonly version: Schema.UndefinedOr<Schema.Literals<readonly [1, 2, 3, 4, 5, 6, 7, 8]>>;
|
|
780
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
781
|
-
readonly _tag: Schema.tag<"isGUID">;
|
|
782
|
-
readonly regExp: Schema.RegExp;
|
|
783
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
784
|
-
readonly _tag: Schema.tag<"isULID">;
|
|
785
|
-
readonly regExp: Schema.RegExp;
|
|
786
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
787
|
-
readonly _tag: Schema.tag<"isBase64">;
|
|
788
|
-
readonly regExp: Schema.RegExp;
|
|
789
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
790
|
-
readonly _tag: Schema.tag<"isBase64Url">;
|
|
791
|
-
readonly regExp: Schema.RegExp;
|
|
792
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
793
|
-
readonly _tag: Schema.tag<"isStartsWith">;
|
|
794
|
-
readonly startsWith: Schema.String;
|
|
795
|
-
readonly regExp: Schema.RegExp;
|
|
796
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
797
|
-
readonly _tag: Schema.tag<"isEndsWith">;
|
|
798
|
-
readonly endsWith: Schema.String;
|
|
799
|
-
readonly regExp: Schema.RegExp;
|
|
800
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
801
|
-
readonly _tag: Schema.tag<"isIncludes">;
|
|
802
|
-
readonly includes: Schema.String;
|
|
803
|
-
readonly regExp: Schema.RegExp;
|
|
804
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
805
|
-
readonly _tag: Schema.tag<"isUppercased">;
|
|
806
|
-
readonly regExp: Schema.RegExp;
|
|
807
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
808
|
-
readonly _tag: Schema.tag<"isLowercased">;
|
|
809
|
-
readonly regExp: Schema.RegExp;
|
|
810
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
811
|
-
readonly _tag: Schema.tag<"isCapitalized">;
|
|
812
|
-
readonly regExp: Schema.RegExp;
|
|
813
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
814
|
-
readonly _tag: Schema.tag<"isUncapitalized">;
|
|
815
|
-
readonly regExp: Schema.RegExp;
|
|
816
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
817
|
-
readonly _tag: Schema.tag<"isMinLength">;
|
|
818
|
-
readonly minLength: Schema.Int;
|
|
819
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
820
|
-
readonly _tag: Schema.tag<"isMaxLength">;
|
|
821
|
-
readonly maxLength: Schema.Int;
|
|
822
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
823
|
-
readonly _tag: Schema.tag<"isLengthBetween">;
|
|
824
|
-
readonly minimum: Schema.Int;
|
|
825
|
-
readonly maximum: Schema.Int;
|
|
826
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
827
|
-
readonly _tag: Schema.tag<"isPattern">;
|
|
828
|
-
readonly regExp: Schema.RegExp;
|
|
829
|
-
}, "Encoded">>, Check<Schema.Struct.ReadonlySide<{
|
|
830
|
-
readonly _tag: Schema.tag<"isStringFinite">;
|
|
831
|
-
readonly regExp: Schema.RegExp;
|
|
832
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
833
|
-
readonly _tag: Schema.tag<"isStringBigInt">;
|
|
834
|
-
readonly regExp: Schema.RegExp;
|
|
835
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
836
|
-
readonly _tag: Schema.tag<"isStringSymbol">;
|
|
837
|
-
readonly regExp: Schema.RegExp;
|
|
838
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
839
|
-
readonly _tag: Schema.tag<"isTrimmed">;
|
|
840
|
-
readonly regExp: Schema.RegExp;
|
|
841
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
842
|
-
readonly _tag: Schema.tag<"isUUID">;
|
|
843
|
-
readonly regExp: Schema.RegExp;
|
|
844
|
-
readonly version: Schema.UndefinedOr<Schema.Literals<readonly [1, 2, 3, 4, 5, 6, 7, 8]>>;
|
|
845
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
846
|
-
readonly _tag: Schema.tag<"isGUID">;
|
|
847
|
-
readonly regExp: Schema.RegExp;
|
|
848
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
849
|
-
readonly _tag: Schema.tag<"isULID">;
|
|
850
|
-
readonly regExp: Schema.RegExp;
|
|
851
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
852
|
-
readonly _tag: Schema.tag<"isBase64">;
|
|
853
|
-
readonly regExp: Schema.RegExp;
|
|
854
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
855
|
-
readonly _tag: Schema.tag<"isBase64Url">;
|
|
856
|
-
readonly regExp: Schema.RegExp;
|
|
857
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
858
|
-
readonly _tag: Schema.tag<"isStartsWith">;
|
|
859
|
-
readonly startsWith: Schema.String;
|
|
860
|
-
readonly regExp: Schema.RegExp;
|
|
861
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
862
|
-
readonly _tag: Schema.tag<"isEndsWith">;
|
|
863
|
-
readonly endsWith: Schema.String;
|
|
864
|
-
readonly regExp: Schema.RegExp;
|
|
865
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
866
|
-
readonly _tag: Schema.tag<"isIncludes">;
|
|
867
|
-
readonly includes: Schema.String;
|
|
868
|
-
readonly regExp: Schema.RegExp;
|
|
869
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
870
|
-
readonly _tag: Schema.tag<"isUppercased">;
|
|
871
|
-
readonly regExp: Schema.RegExp;
|
|
872
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
873
|
-
readonly _tag: Schema.tag<"isLowercased">;
|
|
874
|
-
readonly regExp: Schema.RegExp;
|
|
875
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
876
|
-
readonly _tag: Schema.tag<"isCapitalized">;
|
|
877
|
-
readonly regExp: Schema.RegExp;
|
|
878
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
879
|
-
readonly _tag: Schema.tag<"isUncapitalized">;
|
|
880
|
-
readonly regExp: Schema.RegExp;
|
|
881
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
882
|
-
readonly _tag: Schema.tag<"isMinLength">;
|
|
883
|
-
readonly minLength: Schema.Int;
|
|
884
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
885
|
-
readonly _tag: Schema.tag<"isMaxLength">;
|
|
886
|
-
readonly maxLength: Schema.Int;
|
|
887
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
888
|
-
readonly _tag: Schema.tag<"isLengthBetween">;
|
|
889
|
-
readonly minimum: Schema.Int;
|
|
890
|
-
readonly maximum: Schema.Int;
|
|
891
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
892
|
-
readonly _tag: Schema.tag<"isPattern">;
|
|
893
|
-
readonly regExp: Schema.RegExp;
|
|
894
|
-
}, "Encoded">>, never, never>>;
|
|
895
|
-
readonly contentMediaType: Schema.optional<Schema.String>;
|
|
896
|
-
readonly contentSchema: Schema.optional<Schema.suspend<$Representation>>;
|
|
897
|
-
}>;
|
|
898
|
-
/**
|
|
899
|
-
* Schema for {@link NumberMeta}.
|
|
900
|
-
*
|
|
901
|
-
* @category schemas
|
|
902
|
-
* @since 4.0.0
|
|
903
|
-
*/
|
|
904
|
-
export declare const $NumberMeta: Schema.Union<readonly [Schema.Struct<{
|
|
905
|
-
readonly _tag: Schema.tag<"isInt">;
|
|
906
|
-
}>, Schema.Struct<{
|
|
907
|
-
readonly _tag: Schema.tag<"isMultipleOf">;
|
|
908
|
-
readonly divisor: Schema.Finite;
|
|
909
|
-
}>, Schema.Struct<{
|
|
910
|
-
readonly _tag: Schema.tag<"isFinite">;
|
|
911
|
-
}>, Schema.Struct<{
|
|
912
|
-
readonly _tag: Schema.tag<"isGreaterThan">;
|
|
913
|
-
readonly exclusiveMinimum: Schema.Finite;
|
|
914
|
-
}>, Schema.Struct<{
|
|
915
|
-
readonly _tag: Schema.tag<"isGreaterThanOrEqualTo">;
|
|
916
|
-
readonly minimum: Schema.Finite;
|
|
917
|
-
}>, Schema.Struct<{
|
|
918
|
-
readonly _tag: Schema.tag<"isLessThan">;
|
|
919
|
-
readonly exclusiveMaximum: Schema.Finite;
|
|
920
|
-
}>, Schema.Struct<{
|
|
921
|
-
readonly _tag: Schema.tag<"isLessThanOrEqualTo">;
|
|
922
|
-
readonly maximum: Schema.Finite;
|
|
923
|
-
}>, Schema.Struct<{
|
|
924
|
-
readonly _tag: Schema.tag<"isBetween">;
|
|
925
|
-
readonly minimum: Schema.Finite;
|
|
926
|
-
readonly maximum: Schema.Finite;
|
|
927
|
-
readonly exclusiveMinimum: Schema.optional<Schema.Boolean>;
|
|
928
|
-
readonly exclusiveMaximum: Schema.optional<Schema.Boolean>;
|
|
929
|
-
}>]>;
|
|
930
|
-
/**
|
|
931
|
-
* Schema for the {@link Number} representation node.
|
|
932
|
-
*
|
|
933
|
-
* @category schemas
|
|
934
|
-
* @since 4.0.0
|
|
935
|
-
*/
|
|
936
|
-
export declare const $Number: Schema.Struct<{
|
|
937
|
-
readonly _tag: Schema.tag<"Number">;
|
|
938
|
-
readonly annotations: Schema.optional<Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<PrimitiveTree, PrimitiveTree, never, never>>, never, never>>;
|
|
939
|
-
readonly checks: Schema.$Array<Schema.Codec<Check<Schema.Struct.ReadonlySide<{
|
|
940
|
-
readonly _tag: Schema.tag<"isInt">;
|
|
941
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
942
|
-
readonly _tag: Schema.tag<"isMultipleOf">;
|
|
943
|
-
readonly divisor: Schema.Finite;
|
|
944
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
945
|
-
readonly _tag: Schema.tag<"isFinite">;
|
|
946
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
947
|
-
readonly _tag: Schema.tag<"isGreaterThan">;
|
|
948
|
-
readonly exclusiveMinimum: Schema.Finite;
|
|
949
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
950
|
-
readonly _tag: Schema.tag<"isGreaterThanOrEqualTo">;
|
|
951
|
-
readonly minimum: Schema.Finite;
|
|
952
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
953
|
-
readonly _tag: Schema.tag<"isLessThan">;
|
|
954
|
-
readonly exclusiveMaximum: Schema.Finite;
|
|
955
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
956
|
-
readonly _tag: Schema.tag<"isLessThanOrEqualTo">;
|
|
957
|
-
readonly maximum: Schema.Finite;
|
|
958
|
-
}, "Encoded"> | {
|
|
959
|
-
readonly _tag: "isBetween";
|
|
960
|
-
readonly minimum: number;
|
|
961
|
-
readonly maximum: number;
|
|
962
|
-
readonly exclusiveMinimum?: boolean | undefined;
|
|
963
|
-
readonly exclusiveMaximum?: boolean | undefined;
|
|
964
|
-
}>, Check<Schema.Struct.ReadonlySide<{
|
|
965
|
-
readonly _tag: Schema.tag<"isInt">;
|
|
966
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
967
|
-
readonly _tag: Schema.tag<"isMultipleOf">;
|
|
968
|
-
readonly divisor: Schema.Finite;
|
|
969
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
970
|
-
readonly _tag: Schema.tag<"isFinite">;
|
|
971
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
972
|
-
readonly _tag: Schema.tag<"isGreaterThan">;
|
|
973
|
-
readonly exclusiveMinimum: Schema.Finite;
|
|
974
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
975
|
-
readonly _tag: Schema.tag<"isGreaterThanOrEqualTo">;
|
|
976
|
-
readonly minimum: Schema.Finite;
|
|
977
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
978
|
-
readonly _tag: Schema.tag<"isLessThan">;
|
|
979
|
-
readonly exclusiveMaximum: Schema.Finite;
|
|
980
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
981
|
-
readonly _tag: Schema.tag<"isLessThanOrEqualTo">;
|
|
982
|
-
readonly maximum: Schema.Finite;
|
|
983
|
-
}, "Encoded"> | {
|
|
984
|
-
readonly _tag: "isBetween";
|
|
985
|
-
readonly minimum: number;
|
|
986
|
-
readonly maximum: number;
|
|
987
|
-
readonly exclusiveMinimum?: boolean | undefined;
|
|
988
|
-
readonly exclusiveMaximum?: boolean | undefined;
|
|
989
|
-
}>, never, never>>;
|
|
990
|
-
}>;
|
|
991
|
-
/**
|
|
992
|
-
* Schema for the {@link Boolean} representation node.
|
|
993
|
-
*
|
|
994
|
-
* @category schemas
|
|
995
|
-
* @since 4.0.0
|
|
996
|
-
*/
|
|
997
|
-
export declare const $Boolean: Schema.Struct<{
|
|
998
|
-
readonly _tag: Schema.tag<"Boolean">;
|
|
999
|
-
readonly annotations: Schema.optional<Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<PrimitiveTree, PrimitiveTree, never, never>>, never, never>>;
|
|
1000
|
-
}>;
|
|
1001
|
-
/**
|
|
1002
|
-
* Schema for the {@link BigInt} representation node.
|
|
524
|
+
* Options for importing JSON Schema Draft 2020-12 documents.
|
|
1003
525
|
*
|
|
1004
526
|
* **When to use**
|
|
1005
527
|
*
|
|
1006
|
-
* Use to
|
|
1007
|
-
* not application `bigint` values.
|
|
528
|
+
* Use when you need to configure pattern handling or transform each JSON Schema node before translation.
|
|
1008
529
|
*
|
|
1009
530
|
* **Details**
|
|
1010
531
|
*
|
|
1011
|
-
*
|
|
1012
|
-
* and
|
|
532
|
+
* `patterns` controls pattern constraints reached during best-effort translation, including `pattern`, the keys of
|
|
533
|
+
* `patternProperties`, and patterns nested in `propertyNames`:
|
|
1013
534
|
*
|
|
1014
|
-
*
|
|
535
|
+
* - `"error"` rejects the document and is the default.
|
|
536
|
+
* - `"ignore"` skips the constraint.
|
|
537
|
+
* - `"apply"` compiles and enforces the constraint with the runtime's native regular expression engine.
|
|
1015
538
|
*
|
|
1016
|
-
*
|
|
1017
|
-
* @since 4.0.0
|
|
1018
|
-
*/
|
|
1019
|
-
export declare const $BigInt: Schema.Struct<{
|
|
1020
|
-
readonly _tag: Schema.tag<"BigInt">;
|
|
1021
|
-
readonly annotations: Schema.optional<Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<PrimitiveTree, PrimitiveTree, never, never>>, never, never>>;
|
|
1022
|
-
readonly checks: Schema.$Array<Schema.Codec<Check<Schema.Struct.ReadonlySide<{
|
|
1023
|
-
readonly _tag: Schema.tag<"isGreaterThanBigInt">;
|
|
1024
|
-
readonly exclusiveMinimum: Schema.BigInt;
|
|
1025
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1026
|
-
readonly _tag: Schema.tag<"isGreaterThanOrEqualToBigInt">;
|
|
1027
|
-
readonly minimum: Schema.BigInt;
|
|
1028
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1029
|
-
readonly _tag: Schema.tag<"isLessThanBigInt">;
|
|
1030
|
-
readonly exclusiveMaximum: Schema.BigInt;
|
|
1031
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1032
|
-
readonly _tag: Schema.tag<"isLessThanOrEqualToBigInt">;
|
|
1033
|
-
readonly maximum: Schema.BigInt;
|
|
1034
|
-
}, "Encoded"> | {
|
|
1035
|
-
readonly _tag: "isBetweenBigInt";
|
|
1036
|
-
readonly minimum: bigint;
|
|
1037
|
-
readonly maximum: bigint;
|
|
1038
|
-
readonly exclusiveMinimum?: boolean | undefined;
|
|
1039
|
-
readonly exclusiveMaximum?: boolean | undefined;
|
|
1040
|
-
}>, Check<Schema.Struct.ReadonlySide<{
|
|
1041
|
-
readonly _tag: Schema.tag<"isGreaterThanBigInt">;
|
|
1042
|
-
readonly exclusiveMinimum: Schema.BigInt;
|
|
1043
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1044
|
-
readonly _tag: Schema.tag<"isGreaterThanOrEqualToBigInt">;
|
|
1045
|
-
readonly minimum: Schema.BigInt;
|
|
1046
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1047
|
-
readonly _tag: Schema.tag<"isLessThanBigInt">;
|
|
1048
|
-
readonly exclusiveMaximum: Schema.BigInt;
|
|
1049
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1050
|
-
readonly _tag: Schema.tag<"isLessThanOrEqualToBigInt">;
|
|
1051
|
-
readonly maximum: Schema.BigInt;
|
|
1052
|
-
}, "Encoded"> | {
|
|
1053
|
-
readonly _tag: "isBetweenBigInt";
|
|
1054
|
-
readonly minimum: bigint;
|
|
1055
|
-
readonly maximum: bigint;
|
|
1056
|
-
readonly exclusiveMinimum?: boolean | undefined;
|
|
1057
|
-
readonly exclusiveMaximum?: boolean | undefined;
|
|
1058
|
-
}>, never, never>>;
|
|
1059
|
-
}>;
|
|
1060
|
-
/**
|
|
1061
|
-
* Schema for the {@link Symbol} representation node.
|
|
539
|
+
* **Gotchas**
|
|
1062
540
|
*
|
|
1063
|
-
*
|
|
1064
|
-
*
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
}>;
|
|
1070
|
-
/**
|
|
1071
|
-
* Schema for the literal value types allowed in a {@link Literal} node
|
|
1072
|
-
* (string, finite number, boolean, or bigint).
|
|
541
|
+
* Use `patterns: "apply"` only for trusted documents because regular expression evaluation may block for an unbounded
|
|
542
|
+
* amount of time. `patterns: "ignore"` weakens validation by accepting values that the source document may reject.
|
|
543
|
+
* Ignoring `patternProperties` also skips its value constraints and `additionalProperties`, because matching keys cannot
|
|
544
|
+
* be determined without evaluating the patterns.
|
|
545
|
+
* `onEnter` must return a JSON Schema object. Its result is used directly, and exceptions raised by the callback pass
|
|
546
|
+
* through unchanged.
|
|
1073
547
|
*
|
|
1074
|
-
* @category
|
|
548
|
+
* @category models
|
|
1075
549
|
* @since 4.0.0
|
|
1076
550
|
*/
|
|
1077
|
-
export
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
readonly annotations: Schema.optional<Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<PrimitiveTree, PrimitiveTree, never, never>>, never, never>>;
|
|
1087
|
-
readonly literal: Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.BigInt]>;
|
|
1088
|
-
}>;
|
|
1089
|
-
/**
|
|
1090
|
-
* Schema for the {@link UniqueSymbol} representation node.
|
|
1091
|
-
*
|
|
1092
|
-
* @category schemas
|
|
1093
|
-
* @since 4.0.0
|
|
1094
|
-
*/
|
|
1095
|
-
export declare const $UniqueSymbol: Schema.Struct<{
|
|
1096
|
-
readonly _tag: Schema.tag<"UniqueSymbol">;
|
|
1097
|
-
readonly annotations: Schema.optional<Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<PrimitiveTree, PrimitiveTree, never, never>>, never, never>>;
|
|
1098
|
-
readonly symbol: Schema.Symbol;
|
|
1099
|
-
}>;
|
|
551
|
+
export interface FromJsonSchemaOptions {
|
|
552
|
+
readonly onEnter?: ((schema: JsonSchema.JsonSchema) => JsonSchema.JsonSchema) | undefined;
|
|
553
|
+
/**
|
|
554
|
+
* Controls how reached JSON Schema regular expression patterns are imported.
|
|
555
|
+
*
|
|
556
|
+
* @default "error"
|
|
557
|
+
*/
|
|
558
|
+
readonly patterns?: "error" | "ignore" | "apply" | undefined;
|
|
559
|
+
}
|
|
1100
560
|
/**
|
|
1101
|
-
*
|
|
561
|
+
* Runtime and TypeScript source generated for one schema.
|
|
1102
562
|
*
|
|
1103
|
-
* @category
|
|
563
|
+
* @category models
|
|
1104
564
|
* @since 4.0.0
|
|
1105
565
|
*/
|
|
1106
|
-
export
|
|
1107
|
-
readonly
|
|
1108
|
-
readonly
|
|
1109
|
-
}
|
|
566
|
+
export interface Code {
|
|
567
|
+
readonly runtime: string;
|
|
568
|
+
readonly Type: string;
|
|
569
|
+
}
|
|
1110
570
|
/**
|
|
1111
|
-
*
|
|
571
|
+
* Creates generated runtime and TypeScript source strings for a schema.
|
|
1112
572
|
*
|
|
1113
|
-
* @category
|
|
573
|
+
* @category constructors
|
|
1114
574
|
* @since 4.0.0
|
|
1115
575
|
*/
|
|
1116
|
-
export declare const
|
|
1117
|
-
readonly _tag: Schema.tag<"Enum">;
|
|
1118
|
-
readonly annotations: Schema.optional<Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<PrimitiveTree, PrimitiveTree, never, never>>, never, never>>;
|
|
1119
|
-
readonly enums: Schema.$Array<Schema.Tuple<readonly [Schema.String, Schema.Union<readonly [Schema.String, Schema.Number]>]>>;
|
|
1120
|
-
}>;
|
|
1121
|
-
/**
|
|
1122
|
-
* Schema for the {@link TemplateLiteral} representation node.
|
|
1123
|
-
*
|
|
1124
|
-
* @category schemas
|
|
1125
|
-
* @since 4.0.0
|
|
1126
|
-
*/
|
|
1127
|
-
export declare const $TemplateLiteral: Schema.Struct<{
|
|
1128
|
-
readonly _tag: Schema.tag<"TemplateLiteral">;
|
|
1129
|
-
readonly annotations: Schema.optional<Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<PrimitiveTree, PrimitiveTree, never, never>>, never, never>>;
|
|
1130
|
-
readonly parts: Schema.$Array<Schema.suspend<$Representation>>;
|
|
1131
|
-
}>;
|
|
576
|
+
export declare const makeCode: (runtime: string, Type: string) => Code;
|
|
1132
577
|
/**
|
|
1133
|
-
*
|
|
578
|
+
* Auxiliary source artifact emitted while generating schema code.
|
|
1134
579
|
*
|
|
1135
|
-
* @category
|
|
580
|
+
* @category models
|
|
1136
581
|
* @since 4.0.0
|
|
1137
582
|
*/
|
|
1138
|
-
export
|
|
1139
|
-
readonly
|
|
1140
|
-
readonly
|
|
1141
|
-
readonly
|
|
1142
|
-
}
|
|
583
|
+
export type Artifact = {
|
|
584
|
+
readonly _tag: "Symbol";
|
|
585
|
+
readonly identifier: string;
|
|
586
|
+
readonly code: Code;
|
|
587
|
+
} | {
|
|
588
|
+
readonly _tag: "Enum";
|
|
589
|
+
readonly identifier: string;
|
|
590
|
+
readonly code: Code;
|
|
591
|
+
} | {
|
|
592
|
+
readonly _tag: "Import";
|
|
593
|
+
readonly importDeclaration: string;
|
|
594
|
+
};
|
|
1143
595
|
/**
|
|
1144
|
-
*
|
|
596
|
+
* Generated schema code together with named references and auxiliary artifacts.
|
|
1145
597
|
*
|
|
1146
|
-
* @category
|
|
598
|
+
* @category models
|
|
1147
599
|
* @since 4.0.0
|
|
1148
600
|
*/
|
|
1149
|
-
export
|
|
1150
|
-
readonly
|
|
1151
|
-
readonly
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
readonly
|
|
1159
|
-
readonly _tag: Schema.tag<"isMinLength">;
|
|
1160
|
-
readonly minLength: Schema.Int;
|
|
1161
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1162
|
-
readonly _tag: Schema.tag<"isMaxLength">;
|
|
1163
|
-
readonly maxLength: Schema.Int;
|
|
1164
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1165
|
-
readonly _tag: Schema.tag<"isLengthBetween">;
|
|
1166
|
-
readonly minimum: Schema.Int;
|
|
1167
|
-
readonly maximum: Schema.Int;
|
|
1168
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1169
|
-
readonly _tag: Schema.tag<"isUnique">;
|
|
1170
|
-
}, "Encoded">>, Check<Schema.Struct.ReadonlySide<{
|
|
1171
|
-
readonly _tag: Schema.tag<"isMinLength">;
|
|
1172
|
-
readonly minLength: Schema.Int;
|
|
1173
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1174
|
-
readonly _tag: Schema.tag<"isMaxLength">;
|
|
1175
|
-
readonly maxLength: Schema.Int;
|
|
1176
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1177
|
-
readonly _tag: Schema.tag<"isLengthBetween">;
|
|
1178
|
-
readonly minimum: Schema.Int;
|
|
1179
|
-
readonly maximum: Schema.Int;
|
|
1180
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1181
|
-
readonly _tag: Schema.tag<"isUnique">;
|
|
1182
|
-
}, "Encoded">>, never, never>>;
|
|
1183
|
-
}>;
|
|
1184
|
-
/**
|
|
1185
|
-
* Schema for the {@link PropertySignature} type.
|
|
1186
|
-
*
|
|
1187
|
-
* @category schemas
|
|
1188
|
-
* @since 4.0.0
|
|
1189
|
-
*/
|
|
1190
|
-
export declare const $PropertySignature: Schema.Struct<{
|
|
1191
|
-
readonly annotations: Schema.optional<Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<PrimitiveTree, PrimitiveTree, never, never>>, never, never>>;
|
|
1192
|
-
readonly name: Schema.Union<readonly [Schema.Finite, Schema.Symbol, Schema.String]>;
|
|
1193
|
-
readonly type: Schema.suspend<$Representation>;
|
|
1194
|
-
readonly isOptional: Schema.Boolean;
|
|
1195
|
-
readonly isMutable: Schema.Boolean;
|
|
1196
|
-
}>;
|
|
1197
|
-
/**
|
|
1198
|
-
* Schema for the {@link IndexSignature} type.
|
|
1199
|
-
*
|
|
1200
|
-
* @category schemas
|
|
1201
|
-
* @since 4.0.0
|
|
1202
|
-
*/
|
|
1203
|
-
export declare const $IndexSignature: Schema.Struct<{
|
|
1204
|
-
readonly parameter: Schema.suspend<$Representation>;
|
|
1205
|
-
readonly type: Schema.suspend<$Representation>;
|
|
1206
|
-
}>;
|
|
1207
|
-
/**
|
|
1208
|
-
* Schema for {@link ObjectsMeta}.
|
|
1209
|
-
*
|
|
1210
|
-
* @category schemas
|
|
1211
|
-
* @since 4.0.0
|
|
1212
|
-
*/
|
|
1213
|
-
export declare const $ObjectsMeta: Schema.Union<readonly [Schema.Struct<{
|
|
1214
|
-
readonly _tag: Schema.tag<"isMinProperties">;
|
|
1215
|
-
readonly minProperties: Schema.Int;
|
|
1216
|
-
}>, Schema.Struct<{
|
|
1217
|
-
readonly _tag: Schema.tag<"isMaxProperties">;
|
|
1218
|
-
readonly maxProperties: Schema.Int;
|
|
1219
|
-
}>, Schema.Struct<{
|
|
1220
|
-
readonly _tag: Schema.tag<"isPropertiesLengthBetween">;
|
|
1221
|
-
readonly minimum: Schema.Int;
|
|
1222
|
-
readonly maximum: Schema.Int;
|
|
1223
|
-
}>, Schema.Struct<{
|
|
1224
|
-
readonly _tag: Schema.tag<"isPropertyNames">;
|
|
1225
|
-
readonly propertyNames: Schema.suspend<$Representation>;
|
|
1226
|
-
}>]>;
|
|
1227
|
-
/**
|
|
1228
|
-
* Schema for the {@link Objects} representation node.
|
|
1229
|
-
*
|
|
1230
|
-
* @category schemas
|
|
1231
|
-
* @since 4.0.0
|
|
1232
|
-
*/
|
|
1233
|
-
export declare const $Objects: Schema.Struct<{
|
|
1234
|
-
readonly _tag: Schema.tag<"Objects">;
|
|
1235
|
-
readonly annotations: Schema.optional<Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<PrimitiveTree, PrimitiveTree, never, never>>, never, never>>;
|
|
1236
|
-
readonly propertySignatures: Schema.$Array<Schema.Struct<{
|
|
1237
|
-
readonly annotations: Schema.optional<Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<PrimitiveTree, PrimitiveTree, never, never>>, never, never>>;
|
|
1238
|
-
readonly name: Schema.Union<readonly [Schema.Finite, Schema.Symbol, Schema.String]>;
|
|
1239
|
-
readonly type: Schema.suspend<$Representation>;
|
|
1240
|
-
readonly isOptional: Schema.Boolean;
|
|
1241
|
-
readonly isMutable: Schema.Boolean;
|
|
1242
|
-
}>>;
|
|
1243
|
-
readonly indexSignatures: Schema.$Array<Schema.Struct<{
|
|
1244
|
-
readonly parameter: Schema.suspend<$Representation>;
|
|
1245
|
-
readonly type: Schema.suspend<$Representation>;
|
|
1246
|
-
}>>;
|
|
1247
|
-
readonly checks: Schema.$Array<Schema.Codec<Check<Schema.Struct.ReadonlySide<{
|
|
1248
|
-
readonly _tag: Schema.tag<"isMinProperties">;
|
|
1249
|
-
readonly minProperties: Schema.Int;
|
|
1250
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1251
|
-
readonly _tag: Schema.tag<"isMaxProperties">;
|
|
1252
|
-
readonly maxProperties: Schema.Int;
|
|
1253
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1254
|
-
readonly _tag: Schema.tag<"isPropertiesLengthBetween">;
|
|
1255
|
-
readonly minimum: Schema.Int;
|
|
1256
|
-
readonly maximum: Schema.Int;
|
|
1257
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1258
|
-
readonly _tag: Schema.tag<"isPropertyNames">;
|
|
1259
|
-
readonly propertyNames: Schema.suspend<$Representation>;
|
|
1260
|
-
}, "Encoded">>, Check<Schema.Struct.ReadonlySide<{
|
|
1261
|
-
readonly _tag: Schema.tag<"isMinProperties">;
|
|
1262
|
-
readonly minProperties: Schema.Int;
|
|
1263
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1264
|
-
readonly _tag: Schema.tag<"isMaxProperties">;
|
|
1265
|
-
readonly maxProperties: Schema.Int;
|
|
1266
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1267
|
-
readonly _tag: Schema.tag<"isPropertiesLengthBetween">;
|
|
1268
|
-
readonly minimum: Schema.Int;
|
|
1269
|
-
readonly maximum: Schema.Int;
|
|
1270
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1271
|
-
readonly _tag: Schema.tag<"isPropertyNames">;
|
|
1272
|
-
readonly propertyNames: Schema.suspend<$Representation>;
|
|
1273
|
-
}, "Encoded">>, never, never>>;
|
|
1274
|
-
}>;
|
|
1275
|
-
/**
|
|
1276
|
-
* Schema for the {@link Union} representation node.
|
|
1277
|
-
*
|
|
1278
|
-
* @category schemas
|
|
1279
|
-
* @since 4.0.0
|
|
1280
|
-
*/
|
|
1281
|
-
export declare const $Union: Schema.Struct<{
|
|
1282
|
-
readonly _tag: Schema.tag<"Union">;
|
|
1283
|
-
readonly annotations: Schema.optional<Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<PrimitiveTree, PrimitiveTree, never, never>>, never, never>>;
|
|
1284
|
-
readonly types: Schema.$Array<Schema.suspend<$Representation>>;
|
|
1285
|
-
readonly mode: Schema.Literals<readonly ["anyOf", "oneOf"]>;
|
|
1286
|
-
}>;
|
|
1287
|
-
/**
|
|
1288
|
-
* Schema for the {@link Reference} representation node.
|
|
1289
|
-
*
|
|
1290
|
-
* @category schemas
|
|
1291
|
-
* @since 4.0.0
|
|
1292
|
-
*/
|
|
1293
|
-
export declare const $Reference: Schema.Struct<{
|
|
1294
|
-
readonly _tag: Schema.tag<"Reference">;
|
|
1295
|
-
readonly $ref: Schema.String;
|
|
1296
|
-
}>;
|
|
1297
|
-
/**
|
|
1298
|
-
* Schema for {@link DateMeta}.
|
|
1299
|
-
*
|
|
1300
|
-
* @category schemas
|
|
1301
|
-
* @since 4.0.0
|
|
1302
|
-
*/
|
|
1303
|
-
export declare const $DateMeta: Schema.Union<readonly [Schema.Struct<{
|
|
1304
|
-
readonly _tag: Schema.tag<"isDateValid">;
|
|
1305
|
-
}>, Schema.Struct<{
|
|
1306
|
-
readonly _tag: Schema.tag<"isGreaterThanDate">;
|
|
1307
|
-
readonly exclusiveMinimum: Schema.Date;
|
|
1308
|
-
}>, Schema.Struct<{
|
|
1309
|
-
readonly _tag: Schema.tag<"isGreaterThanOrEqualToDate">;
|
|
1310
|
-
readonly minimum: Schema.Date;
|
|
1311
|
-
}>, Schema.Struct<{
|
|
1312
|
-
readonly _tag: Schema.tag<"isLessThanDate">;
|
|
1313
|
-
readonly exclusiveMaximum: Schema.Date;
|
|
1314
|
-
}>, Schema.Struct<{
|
|
1315
|
-
readonly _tag: Schema.tag<"isLessThanOrEqualToDate">;
|
|
1316
|
-
readonly maximum: Schema.Date;
|
|
1317
|
-
}>, Schema.Struct<{
|
|
1318
|
-
readonly _tag: Schema.tag<"isBetweenDate">;
|
|
1319
|
-
readonly minimum: Schema.Date;
|
|
1320
|
-
readonly maximum: Schema.Date;
|
|
1321
|
-
readonly exclusiveMinimum: Schema.optional<Schema.Boolean>;
|
|
1322
|
-
readonly exclusiveMaximum: Schema.optional<Schema.Boolean>;
|
|
1323
|
-
}>]>;
|
|
1324
|
-
/**
|
|
1325
|
-
* Schema for {@link SizeMeta}.
|
|
1326
|
-
*
|
|
1327
|
-
* @category schemas
|
|
1328
|
-
* @since 4.0.0
|
|
1329
|
-
*/
|
|
1330
|
-
export declare const $SizeMeta: Schema.Union<readonly [Schema.Struct<{
|
|
1331
|
-
readonly _tag: Schema.tag<"isMinSize">;
|
|
1332
|
-
readonly minSize: Schema.Int;
|
|
1333
|
-
}>, Schema.Struct<{
|
|
1334
|
-
readonly _tag: Schema.tag<"isMaxSize">;
|
|
1335
|
-
readonly maxSize: Schema.Int;
|
|
1336
|
-
}>, Schema.Struct<{
|
|
1337
|
-
readonly _tag: Schema.tag<"isSizeBetween">;
|
|
1338
|
-
readonly minimum: Schema.Int;
|
|
1339
|
-
readonly maximum: Schema.Int;
|
|
1340
|
-
}>]>;
|
|
1341
|
-
/**
|
|
1342
|
-
* Schema for {@link DeclarationMeta}.
|
|
1343
|
-
*
|
|
1344
|
-
* @category schemas
|
|
1345
|
-
* @since 4.0.0
|
|
1346
|
-
*/
|
|
1347
|
-
export declare const $DeclarationMeta: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
|
|
1348
|
-
readonly _tag: Schema.tag<"isDateValid">;
|
|
1349
|
-
}>, Schema.Struct<{
|
|
1350
|
-
readonly _tag: Schema.tag<"isGreaterThanDate">;
|
|
1351
|
-
readonly exclusiveMinimum: Schema.Date;
|
|
1352
|
-
}>, Schema.Struct<{
|
|
1353
|
-
readonly _tag: Schema.tag<"isGreaterThanOrEqualToDate">;
|
|
1354
|
-
readonly minimum: Schema.Date;
|
|
1355
|
-
}>, Schema.Struct<{
|
|
1356
|
-
readonly _tag: Schema.tag<"isLessThanDate">;
|
|
1357
|
-
readonly exclusiveMaximum: Schema.Date;
|
|
1358
|
-
}>, Schema.Struct<{
|
|
1359
|
-
readonly _tag: Schema.tag<"isLessThanOrEqualToDate">;
|
|
1360
|
-
readonly maximum: Schema.Date;
|
|
1361
|
-
}>, Schema.Struct<{
|
|
1362
|
-
readonly _tag: Schema.tag<"isBetweenDate">;
|
|
1363
|
-
readonly minimum: Schema.Date;
|
|
1364
|
-
readonly maximum: Schema.Date;
|
|
1365
|
-
readonly exclusiveMinimum: Schema.optional<Schema.Boolean>;
|
|
1366
|
-
readonly exclusiveMaximum: Schema.optional<Schema.Boolean>;
|
|
1367
|
-
}>]>, Schema.Union<readonly [Schema.Struct<{
|
|
1368
|
-
readonly _tag: Schema.tag<"isMinSize">;
|
|
1369
|
-
readonly minSize: Schema.Int;
|
|
1370
|
-
}>, Schema.Struct<{
|
|
1371
|
-
readonly _tag: Schema.tag<"isMaxSize">;
|
|
1372
|
-
readonly maxSize: Schema.Int;
|
|
1373
|
-
}>, Schema.Struct<{
|
|
1374
|
-
readonly _tag: Schema.tag<"isSizeBetween">;
|
|
1375
|
-
readonly minimum: Schema.Int;
|
|
1376
|
-
readonly maximum: Schema.Int;
|
|
1377
|
-
}>]>]>;
|
|
1378
|
-
/**
|
|
1379
|
-
* Schema for the {@link Declaration} representation node.
|
|
1380
|
-
*
|
|
1381
|
-
* @category schemas
|
|
1382
|
-
* @since 4.0.0
|
|
1383
|
-
*/
|
|
1384
|
-
export declare const $Declaration: Schema.Struct<{
|
|
1385
|
-
readonly _tag: Schema.tag<"Declaration">;
|
|
1386
|
-
readonly annotations: Schema.optional<Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<PrimitiveTree, PrimitiveTree, never, never>>, never, never>>;
|
|
1387
|
-
readonly typeParameters: Schema.$Array<Schema.suspend<$Representation>>;
|
|
1388
|
-
readonly checks: Schema.$Array<Schema.Codec<Check<Schema.Struct.ReadonlySide<{
|
|
1389
|
-
readonly _tag: Schema.tag<"isDateValid">;
|
|
1390
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1391
|
-
readonly _tag: Schema.tag<"isGreaterThanDate">;
|
|
1392
|
-
readonly exclusiveMinimum: Schema.Date;
|
|
1393
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1394
|
-
readonly _tag: Schema.tag<"isGreaterThanOrEqualToDate">;
|
|
1395
|
-
readonly minimum: Schema.Date;
|
|
1396
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1397
|
-
readonly _tag: Schema.tag<"isLessThanDate">;
|
|
1398
|
-
readonly exclusiveMaximum: Schema.Date;
|
|
1399
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1400
|
-
readonly _tag: Schema.tag<"isLessThanOrEqualToDate">;
|
|
1401
|
-
readonly maximum: Schema.Date;
|
|
1402
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1403
|
-
readonly _tag: Schema.tag<"isMinSize">;
|
|
1404
|
-
readonly minSize: Schema.Int;
|
|
1405
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1406
|
-
readonly _tag: Schema.tag<"isMaxSize">;
|
|
1407
|
-
readonly maxSize: Schema.Int;
|
|
1408
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1409
|
-
readonly _tag: Schema.tag<"isSizeBetween">;
|
|
1410
|
-
readonly minimum: Schema.Int;
|
|
1411
|
-
readonly maximum: Schema.Int;
|
|
1412
|
-
}, "Encoded"> | {
|
|
1413
|
-
readonly _tag: "isBetweenDate";
|
|
1414
|
-
readonly minimum: Date;
|
|
1415
|
-
readonly maximum: Date;
|
|
1416
|
-
readonly exclusiveMinimum?: boolean | undefined;
|
|
1417
|
-
readonly exclusiveMaximum?: boolean | undefined;
|
|
1418
|
-
}>, Check<Schema.Struct.ReadonlySide<{
|
|
1419
|
-
readonly _tag: Schema.tag<"isDateValid">;
|
|
1420
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1421
|
-
readonly _tag: Schema.tag<"isGreaterThanDate">;
|
|
1422
|
-
readonly exclusiveMinimum: Schema.Date;
|
|
1423
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1424
|
-
readonly _tag: Schema.tag<"isGreaterThanOrEqualToDate">;
|
|
1425
|
-
readonly minimum: Schema.Date;
|
|
1426
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1427
|
-
readonly _tag: Schema.tag<"isLessThanDate">;
|
|
1428
|
-
readonly exclusiveMaximum: Schema.Date;
|
|
1429
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1430
|
-
readonly _tag: Schema.tag<"isLessThanOrEqualToDate">;
|
|
1431
|
-
readonly maximum: Schema.Date;
|
|
1432
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1433
|
-
readonly _tag: Schema.tag<"isMinSize">;
|
|
1434
|
-
readonly minSize: Schema.Int;
|
|
1435
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1436
|
-
readonly _tag: Schema.tag<"isMaxSize">;
|
|
1437
|
-
readonly maxSize: Schema.Int;
|
|
1438
|
-
}, "Encoded"> | Schema.Struct.ReadonlySide<{
|
|
1439
|
-
readonly _tag: Schema.tag<"isSizeBetween">;
|
|
1440
|
-
readonly minimum: Schema.Int;
|
|
1441
|
-
readonly maximum: Schema.Int;
|
|
1442
|
-
}, "Encoded"> | {
|
|
1443
|
-
readonly _tag: "isBetweenDate";
|
|
1444
|
-
readonly minimum: Date;
|
|
1445
|
-
readonly maximum: Date;
|
|
1446
|
-
readonly exclusiveMinimum?: boolean | undefined;
|
|
1447
|
-
readonly exclusiveMaximum?: boolean | undefined;
|
|
1448
|
-
}>, never, never>>;
|
|
1449
|
-
readonly encodedSchema: Schema.suspend<$Representation>;
|
|
1450
|
-
}>;
|
|
1451
|
-
/**
|
|
1452
|
-
* Schema for the {@link Suspend} representation node.
|
|
1453
|
-
*
|
|
1454
|
-
* @category schemas
|
|
1455
|
-
* @since 4.0.0
|
|
1456
|
-
*/
|
|
1457
|
-
export declare const $Suspend: Schema.Struct<{
|
|
1458
|
-
readonly _tag: Schema.tag<"Suspend">;
|
|
1459
|
-
readonly annotations: Schema.optional<Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<PrimitiveTree, PrimitiveTree, never, never>>, never, never>>;
|
|
1460
|
-
readonly checks: Schema.Tuple<readonly []>;
|
|
1461
|
-
readonly thunk: Schema.suspend<$Representation>;
|
|
1462
|
-
}>;
|
|
1463
|
-
/**
|
|
1464
|
-
* Type-level helper for the recursive {@link $Representation} codec.
|
|
1465
|
-
*
|
|
1466
|
-
* @category schemas
|
|
1467
|
-
* @since 4.0.0
|
|
1468
|
-
*/
|
|
1469
|
-
export interface $Representation extends Schema.Codec<Representation> {
|
|
601
|
+
export interface CodeDocument {
|
|
602
|
+
readonly codes: ReadonlyArray<Code>;
|
|
603
|
+
readonly references: {
|
|
604
|
+
readonly nonRecursives: ReadonlyArray<{
|
|
605
|
+
readonly $ref: string;
|
|
606
|
+
readonly code: Code;
|
|
607
|
+
}>;
|
|
608
|
+
readonly recursives: Readonly<Record<string, Code>>;
|
|
609
|
+
};
|
|
610
|
+
readonly artifacts: ReadonlyArray<Artifact>;
|
|
1470
611
|
}
|
|
1471
612
|
/**
|
|
1472
|
-
*
|
|
1473
|
-
* and encodes any representation node.
|
|
1474
|
-
*
|
|
1475
|
-
* @category schemas
|
|
1476
|
-
* @since 4.0.0
|
|
1477
|
-
*/
|
|
1478
|
-
export declare const $Representation: $Representation;
|
|
1479
|
-
/**
|
|
1480
|
-
* Schema for {@link Document}.
|
|
1481
|
-
*
|
|
1482
|
-
* **When to use**
|
|
1483
|
-
*
|
|
1484
|
-
* Use to validate or serialize a single schema representation document with
|
|
1485
|
-
* `Schema.decodeUnknownSync` or `Schema.encodeSync`.
|
|
1486
|
-
*
|
|
1487
|
-
* **Gotchas**
|
|
613
|
+
* Lowers the encoded side of an AST to a live representation document.
|
|
1488
614
|
*
|
|
1489
|
-
*
|
|
1490
|
-
* against `references`.
|
|
1491
|
-
*
|
|
1492
|
-
* @see {@link DocumentFromJson} for the JSON-string codec wrapper
|
|
1493
|
-
* @see {@link $MultiDocument} for validating documents with multiple root representations
|
|
615
|
+
* **Details**
|
|
1494
616
|
*
|
|
1495
|
-
*
|
|
1496
|
-
* @since 4.0.0
|
|
1497
|
-
*/
|
|
1498
|
-
export declare const $Document: Schema.Struct<{
|
|
1499
|
-
readonly representation: $Representation;
|
|
1500
|
-
readonly references: Schema.$Record<Schema.String, $Representation>;
|
|
1501
|
-
}>;
|
|
1502
|
-
/**
|
|
1503
|
-
* Schema for {@link MultiDocument}.
|
|
617
|
+
* Apply `SchemaAST.toType` to the AST first to lower its type side instead.
|
|
1504
618
|
*
|
|
1505
|
-
* @category
|
|
619
|
+
* @category constructors
|
|
1506
620
|
* @since 4.0.0
|
|
1507
621
|
*/
|
|
1508
|
-
export declare
|
|
1509
|
-
readonly representations: Schema.NonEmptyArray<$Representation>;
|
|
1510
|
-
readonly references: Schema.$Record<Schema.String, $Representation>;
|
|
1511
|
-
}>;
|
|
622
|
+
export declare function toRepresentation(ast: SchemaAST.AST): Document;
|
|
1512
623
|
/**
|
|
1513
|
-
*
|
|
1514
|
-
*
|
|
1515
|
-
* **When to use**
|
|
1516
|
-
*
|
|
1517
|
-
* Use when you have a single Schema AST and need a schema representation
|
|
1518
|
-
* document.
|
|
624
|
+
* Lowers one or more AST encoded sides in a shared reference environment.
|
|
1519
625
|
*
|
|
1520
626
|
* **Details**
|
|
1521
627
|
*
|
|
1522
|
-
*
|
|
1523
|
-
*
|
|
1524
|
-
* **Example** (Converting a Schema to a Document)
|
|
1525
|
-
*
|
|
1526
|
-
* ```ts
|
|
1527
|
-
* import { Schema, SchemaRepresentation } from "effect"
|
|
1528
|
-
*
|
|
1529
|
-
* const Person = Schema.Struct({
|
|
1530
|
-
* name: Schema.String,
|
|
1531
|
-
* age: Schema.Number
|
|
1532
|
-
* })
|
|
1533
|
-
*
|
|
1534
|
-
* const doc = SchemaRepresentation.fromAST(Person.ast)
|
|
1535
|
-
* console.log(doc.representation._tag)
|
|
1536
|
-
* // "Objects"
|
|
1537
|
-
* ```
|
|
1538
|
-
*
|
|
1539
|
-
* @see {@link Document}
|
|
1540
|
-
* @see {@link fromASTs}
|
|
628
|
+
* Apply `SchemaAST.toType` to an AST first to lower its type side instead.
|
|
1541
629
|
*
|
|
1542
630
|
* @category constructors
|
|
1543
631
|
* @since 4.0.0
|
|
1544
632
|
*/
|
|
1545
|
-
export declare
|
|
633
|
+
export declare function toRepresentations(asts: readonly [SchemaAST.AST, ...Array<SchemaAST.AST>]): MultiDocument;
|
|
1546
634
|
/**
|
|
1547
|
-
*
|
|
635
|
+
* Wraps a single representation document as a multi-document with one root.
|
|
1548
636
|
*
|
|
1549
637
|
* **When to use**
|
|
1550
638
|
*
|
|
1551
|
-
* Use when
|
|
1552
|
-
* `MultiDocument` with shared references.
|
|
1553
|
-
*
|
|
1554
|
-
* **Details**
|
|
639
|
+
* Use when an API such as `toCodeDocument` requires a `MultiDocument`.
|
|
1555
640
|
*
|
|
1556
|
-
*
|
|
1557
|
-
*
|
|
1558
|
-
* @see {@link MultiDocument}
|
|
1559
|
-
* @see {@link fromAST}
|
|
1560
|
-
*
|
|
1561
|
-
* @category constructors
|
|
641
|
+
* @category transforming
|
|
1562
642
|
* @since 4.0.0
|
|
1563
643
|
*/
|
|
1564
|
-
export declare
|
|
644
|
+
export declare function toMultiDocument(document: Document): MultiDocument;
|
|
1565
645
|
/**
|
|
1566
|
-
*
|
|
646
|
+
* Compiles a live representation document to JSON Schema Draft 2020-12.
|
|
1567
647
|
*
|
|
1568
648
|
* **When to use**
|
|
1569
649
|
*
|
|
1570
|
-
* Use when you need
|
|
1571
|
-
* `Schema.decodeUnknownSync` or `Schema.encodeSync`.
|
|
650
|
+
* Use when you need JSON Schema output from a representation whose checks carry compiler annotations.
|
|
1572
651
|
*
|
|
1573
|
-
* **
|
|
1574
|
-
*
|
|
1575
|
-
* ```ts
|
|
1576
|
-
* import { Schema, SchemaRepresentation } from "effect"
|
|
652
|
+
* **Gotchas**
|
|
1577
653
|
*
|
|
1578
|
-
*
|
|
1579
|
-
*
|
|
1580
|
-
*
|
|
1581
|
-
*
|
|
654
|
+
* Opaque declarations are represented by an unconstrained JSON Schema. Check callback results are used directly, and
|
|
655
|
+
* exceptions raised by a callback pass through unchanged. Callbacks must treat their input schemas as immutable. Each
|
|
656
|
+
* returned value must be a valid JSON Schema object graph and must not be mutated after the callback returns. Local
|
|
657
|
+
* definition references returned by callbacks are resolved together with compiler-generated references.
|
|
1582
658
|
*
|
|
1583
|
-
* @see {@link
|
|
1584
|
-
* @see {@link MultiDocumentFromJson}
|
|
659
|
+
* @see {@link toJsonSchemaMultiDocument} for multiple roots sharing definitions
|
|
1585
660
|
*
|
|
1586
|
-
* @category
|
|
661
|
+
* @category transforming
|
|
1587
662
|
* @since 4.0.0
|
|
1588
663
|
*/
|
|
1589
|
-
export declare
|
|
664
|
+
export declare function toJsonSchemaDocument(document: Document, options?: Schema.ToJsonSchemaOptions): JsonSchema.Document<"draft-2020-12">;
|
|
1590
665
|
/**
|
|
1591
|
-
*
|
|
666
|
+
* Compiles multiple live representations to a shared JSON Schema Draft 2020-12 document.
|
|
1592
667
|
*
|
|
1593
|
-
*
|
|
1594
|
-
* @see {@link DocumentFromJson}
|
|
668
|
+
* **When to use**
|
|
1595
669
|
*
|
|
1596
|
-
*
|
|
1597
|
-
* @since 4.0.0
|
|
1598
|
-
*/
|
|
1599
|
-
export declare const MultiDocumentFromJson: Schema.Codec<MultiDocument, Schema.Json>;
|
|
1600
|
-
/**
|
|
1601
|
-
* Wraps a single {@link Document} as a {@link MultiDocument} with one
|
|
1602
|
-
* representation.
|
|
670
|
+
* Use when several representation roots must share the same JSON Schema definitions.
|
|
1603
671
|
*
|
|
1604
|
-
* **
|
|
672
|
+
* **Gotchas**
|
|
1605
673
|
*
|
|
1606
|
-
*
|
|
1607
|
-
*
|
|
674
|
+
* Every definition is compiled, including definitions that are not reachable from a root. Check callbacks must treat
|
|
675
|
+
* their input schemas as immutable. Each returned value must be a valid JSON Schema object graph and must not be
|
|
676
|
+
* mutated after the callback returns. Local definition references returned by callbacks are resolved together with
|
|
677
|
+
* compiler-generated references.
|
|
1608
678
|
*
|
|
1609
|
-
* @see {@link
|
|
1610
|
-
* @see {@link MultiDocument}
|
|
679
|
+
* @see {@link toJsonSchemaDocument} for a single root
|
|
1611
680
|
*
|
|
1612
681
|
* @category transforming
|
|
1613
682
|
* @since 4.0.0
|
|
1614
683
|
*/
|
|
1615
|
-
export declare function
|
|
684
|
+
export declare function toJsonSchemaMultiDocument(document: MultiDocument, options?: Schema.ToJsonSchemaOptions): JsonSchema.MultiDocument<"draft-2020-12">;
|
|
1616
685
|
/**
|
|
1617
|
-
*
|
|
1618
|
-
* ({@link toSchema}) or code generation ({@link toCodeDocument}).
|
|
686
|
+
* Generates TypeScript source for live schema representations and their definitions.
|
|
1619
687
|
*
|
|
1620
|
-
* **
|
|
688
|
+
* **When to use**
|
|
689
|
+
*
|
|
690
|
+
* Use when custom declarations and checks provide `toCode` callbacks and must be emitted without a central handler registry.
|
|
1621
691
|
*
|
|
1622
|
-
*
|
|
1623
|
-
* default behavior, which uses `encodedSchema` for `toSchema` or the
|
|
1624
|
-
* `generation` annotation for `toCodeDocument`. `recur` processes child
|
|
1625
|
-
* representations recursively.
|
|
692
|
+
* **Gotchas**
|
|
1626
693
|
*
|
|
1627
|
-
*
|
|
1628
|
-
* @see {@link toSchemaDefaultReviver}
|
|
1629
|
-
* @see {@link toCodeDocument}
|
|
694
|
+
* Opaque declarations and leaf checks require `toCode` callbacks. Callback results are used directly, and exceptions raised by a callback pass through unchanged.
|
|
1630
695
|
*
|
|
1631
|
-
* @category
|
|
696
|
+
* @category transforming
|
|
1632
697
|
* @since 4.0.0
|
|
1633
698
|
*/
|
|
1634
|
-
export
|
|
699
|
+
export declare function toCodeDocument(document: MultiDocument): CodeDocument;
|
|
1635
700
|
/**
|
|
1636
|
-
*
|
|
1637
|
-
* types, including Option, Result, Redacted, Cause, Exit, ReadonlyMap, HashMap,
|
|
1638
|
-
* ReadonlySet, Date, Duration, URL, and RegExp.
|
|
701
|
+
* Projects a live single-root representation document and encodes it as JSON.
|
|
1639
702
|
*
|
|
1640
703
|
* **When to use**
|
|
1641
704
|
*
|
|
1642
|
-
* Use when you need
|
|
1643
|
-
* reconstruct runtime schemas for built-in Effect declarations.
|
|
705
|
+
* Use when you need a stable JSON value for storage or transport after calling `toRepresentation`.
|
|
1644
706
|
*
|
|
1645
|
-
* **
|
|
707
|
+
* **Gotchas**
|
|
1646
708
|
*
|
|
1647
|
-
*
|
|
1648
|
-
* fallback to `encodedSchema`.
|
|
709
|
+
* Generic annotations that are not JSON are omitted. Invalid persistence identities and unsupported structural values throw an `Error` containing their representation path.
|
|
1649
710
|
*
|
|
1650
|
-
* @see {@link
|
|
1651
|
-
* @see {@link
|
|
711
|
+
* @see {@link toRepresentation} for constructing the live document
|
|
712
|
+
* @see {@link toJsonMultiDocument} for documents with multiple roots
|
|
1652
713
|
*
|
|
1653
|
-
* @category
|
|
714
|
+
* @category encoding
|
|
1654
715
|
* @since 4.0.0
|
|
1655
716
|
*/
|
|
1656
|
-
export declare
|
|
717
|
+
export declare function toJson(document: Document): Schema.Json;
|
|
1657
718
|
/**
|
|
1658
|
-
*
|
|
719
|
+
* Projects a live multi-root representation document and encodes it as JSON.
|
|
1659
720
|
*
|
|
1660
721
|
* **When to use**
|
|
1661
722
|
*
|
|
1662
|
-
* Use when you
|
|
1663
|
-
* need a runtime Schema for decoding/encoding.
|
|
1664
|
-
*
|
|
1665
|
-
* **Details**
|
|
1666
|
-
*
|
|
1667
|
-
* Pass `options.reviver`, such as {@link toSchemaDefaultReviver}, to handle
|
|
1668
|
-
* {@link Declaration} nodes for types like `Date` and `Option`. Without a
|
|
1669
|
-
* reviver, declarations fall back to their `encodedSchema`. Circular references
|
|
1670
|
-
* are handled via lazy `Schema.suspend`.
|
|
723
|
+
* Use when you need one JSON value for multiple live roots that share a reference environment.
|
|
1671
724
|
*
|
|
1672
725
|
* **Gotchas**
|
|
1673
726
|
*
|
|
1674
|
-
*
|
|
1675
|
-
*
|
|
1676
|
-
* **Example** (Reconstructing a Schema)
|
|
1677
|
-
*
|
|
1678
|
-
* ```ts
|
|
1679
|
-
* import { Schema, SchemaRepresentation } from "effect"
|
|
1680
|
-
*
|
|
1681
|
-
* const doc = SchemaRepresentation.fromAST(
|
|
1682
|
-
* Schema.Struct({ name: Schema.String }).ast
|
|
1683
|
-
* )
|
|
1684
|
-
*
|
|
1685
|
-
* const schema = SchemaRepresentation.toSchema(doc)
|
|
1686
|
-
* console.log(JSON.stringify(Schema.toJsonSchemaDocument(schema), null, 2))
|
|
1687
|
-
* ```
|
|
727
|
+
* The root order and shared reference keys are preserved, while non-JSON generic annotations are omitted.
|
|
1688
728
|
*
|
|
1689
|
-
* @see {@link
|
|
1690
|
-
* @see {@link
|
|
1691
|
-
* @see {@link toSchemaDefaultReviver}
|
|
729
|
+
* @see {@link toRepresentations} for constructing the live multi-document
|
|
730
|
+
* @see {@link toJson} for a single-root document
|
|
1692
731
|
*
|
|
1693
|
-
* @category
|
|
732
|
+
* @category encoding
|
|
1694
733
|
* @since 4.0.0
|
|
1695
734
|
*/
|
|
1696
|
-
export declare function
|
|
1697
|
-
readonly reviver?: Reviver<Schema.Top> | undefined;
|
|
1698
|
-
}): S;
|
|
735
|
+
export declare function toJsonMultiDocument(document: MultiDocument): Schema.Json;
|
|
1699
736
|
/**
|
|
1700
|
-
*
|
|
737
|
+
* Decodes a persisted single-root representation document from JSON.
|
|
1701
738
|
*
|
|
1702
739
|
* **When to use**
|
|
1703
740
|
*
|
|
1704
|
-
* Use when
|
|
1705
|
-
* representation `Document`.
|
|
741
|
+
* Use when reading a representation document from storage or transport before inspecting it or passing it to `fromRepresentation`.
|
|
1706
742
|
*
|
|
1707
743
|
* **Gotchas**
|
|
1708
744
|
*
|
|
1709
|
-
*
|
|
1710
|
-
* semantics cannot be represented exactly in JSON Schema, and importing an
|
|
1711
|
-
* emitted JSON Schema may produce an equivalent approximation rather than the
|
|
1712
|
-
* original representation shape.
|
|
1713
|
-
*
|
|
1714
|
-
* **Example** (Generating JSON Schema)
|
|
1715
|
-
*
|
|
1716
|
-
* ```ts
|
|
1717
|
-
* import { Schema, SchemaRepresentation } from "effect"
|
|
1718
|
-
*
|
|
1719
|
-
* const doc = SchemaRepresentation.fromAST(Schema.String.ast)
|
|
1720
|
-
* const jsonSchema = SchemaRepresentation.toJsonSchemaDocument(doc)
|
|
1721
|
-
* console.log(jsonSchema.schema.type)
|
|
1722
|
-
* // "string"
|
|
1723
|
-
* ```
|
|
745
|
+
* Invalid documents throw a schema decoding error. Decoding does not reconstruct runtime callbacks.
|
|
1724
746
|
*
|
|
1725
|
-
* @see {@link
|
|
1726
|
-
* @see {@link
|
|
1727
|
-
* @see {@link
|
|
747
|
+
* @see {@link toJson} for encoding a document
|
|
748
|
+
* @see {@link fromRepresentation} for reconstructing a runtime schema
|
|
749
|
+
* @see {@link fromJsonMultiDocument} for multiple roots sharing references
|
|
1728
750
|
*
|
|
1729
|
-
* @category
|
|
751
|
+
* @category decoding
|
|
1730
752
|
* @since 4.0.0
|
|
1731
753
|
*/
|
|
1732
|
-
export declare
|
|
754
|
+
export declare function fromJson(input: Schema.Json): Document;
|
|
1733
755
|
/**
|
|
1734
|
-
*
|
|
1735
|
-
* multi-document.
|
|
756
|
+
* Decodes a persisted multi-root representation document from JSON.
|
|
1736
757
|
*
|
|
1737
758
|
* **When to use**
|
|
1738
759
|
*
|
|
1739
|
-
* Use when
|
|
1740
|
-
* so shared definitions stay in multi-document JSON Schema form.
|
|
760
|
+
* Use when reading multiple representation roots that share references before inspecting them or passing them to `fromRepresentations`.
|
|
1741
761
|
*
|
|
1742
762
|
* **Gotchas**
|
|
1743
763
|
*
|
|
1744
|
-
*
|
|
1745
|
-
* semantics cannot be represented exactly in JSON Schema, and importing an
|
|
1746
|
-
* emitted JSON Schema may produce equivalent approximations rather than the
|
|
1747
|
-
* original representation shapes.
|
|
764
|
+
* Invalid documents throw a schema decoding error. Decoding does not reconstruct runtime callbacks.
|
|
1748
765
|
*
|
|
1749
|
-
* @see {@link
|
|
1750
|
-
* @see {@link
|
|
1751
|
-
* @see {@link
|
|
766
|
+
* @see {@link toJsonMultiDocument} for encoding a multi-document
|
|
767
|
+
* @see {@link fromRepresentations} for reconstructing runtime schemas
|
|
768
|
+
* @see {@link fromJson} for a single root
|
|
1752
769
|
*
|
|
1753
|
-
* @category
|
|
770
|
+
* @category decoding
|
|
1754
771
|
* @since 4.0.0
|
|
1755
772
|
*/
|
|
1756
|
-
export declare
|
|
773
|
+
export declare function fromJsonMultiDocument(input: Schema.Json): MultiDocument;
|
|
1757
774
|
/**
|
|
1758
|
-
*
|
|
1759
|
-
* executable Schema expression, `Type` is the corresponding TypeScript type.
|
|
775
|
+
* Reconstructs a runtime schema from a representation document.
|
|
1760
776
|
*
|
|
1761
|
-
*
|
|
1762
|
-
* @see {@link CodeDocument}
|
|
777
|
+
* **When to use**
|
|
1763
778
|
*
|
|
1764
|
-
*
|
|
1765
|
-
* @since 4.0.0
|
|
1766
|
-
*/
|
|
1767
|
-
export type Code = {
|
|
1768
|
-
readonly runtime: string;
|
|
1769
|
-
readonly Type: string;
|
|
1770
|
-
};
|
|
1771
|
-
/**
|
|
1772
|
-
* Constructs a {@link Code} value from a runtime expression string and a
|
|
1773
|
-
* TypeScript type string.
|
|
779
|
+
* Use when you have decoded or constructed a document whose declaration and check annotations may require revivers.
|
|
1774
780
|
*
|
|
1775
|
-
*
|
|
781
|
+
* **Gotchas**
|
|
1776
782
|
*
|
|
1777
|
-
*
|
|
1778
|
-
* @since 4.0.0
|
|
1779
|
-
*/
|
|
1780
|
-
export declare function makeCode(runtime: string, Type: string): Code;
|
|
1781
|
-
/**
|
|
1782
|
-
* An auxiliary code artifact produced during code generation — a symbol
|
|
1783
|
-
* declaration, an enum declaration, or an import statement.
|
|
783
|
+
* Revivers are resolved locally by `id`; none are installed implicitly. Reviver results are used directly, and exceptions raised by a reviver pass through unchanged.
|
|
1784
784
|
*
|
|
1785
|
-
*
|
|
1786
|
-
* @see {@link toCodeDocument}
|
|
785
|
+
* **Example** (Restoring a persisted schema)
|
|
1787
786
|
*
|
|
1788
|
-
*
|
|
1789
|
-
*
|
|
1790
|
-
*/
|
|
1791
|
-
export type Artifact = {
|
|
1792
|
-
readonly _tag: "Symbol";
|
|
1793
|
-
readonly identifier: string;
|
|
1794
|
-
readonly generation: Code;
|
|
1795
|
-
} | {
|
|
1796
|
-
readonly _tag: "Enum";
|
|
1797
|
-
readonly identifier: string;
|
|
1798
|
-
readonly generation: Code;
|
|
1799
|
-
} | {
|
|
1800
|
-
readonly _tag: "Import";
|
|
1801
|
-
readonly importDeclaration: string;
|
|
1802
|
-
};
|
|
1803
|
-
/**
|
|
1804
|
-
* The output of {@link toCodeDocument}: generated TypeScript code for one or
|
|
1805
|
-
* more schemas plus their shared references and auxiliary artifacts.
|
|
787
|
+
* ```ts import.meta.vitest
|
|
788
|
+
* import { Schema, SchemaRepresentation } from "effect"
|
|
1806
789
|
*
|
|
1807
|
-
*
|
|
790
|
+
* const document = SchemaRepresentation.toRepresentation(Schema.Struct({ name: Schema.String }).ast)
|
|
791
|
+
* const persisted = SchemaRepresentation.toJson(document)
|
|
792
|
+
* const restored = SchemaRepresentation.fromJson(persisted)
|
|
793
|
+
* const schema = SchemaRepresentation.fromRepresentation(restored, { revivers: [] })
|
|
794
|
+
* const Person = Schema.make<Schema.Codec<{ readonly name: string }>>(schema.ast)
|
|
1808
795
|
*
|
|
1809
|
-
*
|
|
1810
|
-
*
|
|
1811
|
-
* definitions. `references.recursives` contains definitions involved in cycles.
|
|
1812
|
-
* `artifacts` contains symbols, enums, and import statements needed by the
|
|
1813
|
-
* code.
|
|
796
|
+
* Schema.decodeUnknownSync(Person)({ name: "Ada" }) // => { name: "Ada" }
|
|
797
|
+
* ```
|
|
1814
798
|
*
|
|
1815
|
-
* @see {@link
|
|
1816
|
-
* @see {@link
|
|
1817
|
-
* @see {@link Artifact}
|
|
799
|
+
* @see {@link fromJson} for decoding a persisted document
|
|
800
|
+
* @see {@link fromRepresentations} for multiple roots sharing references
|
|
1818
801
|
*
|
|
1819
|
-
* @category
|
|
802
|
+
* @category transforming
|
|
1820
803
|
* @since 4.0.0
|
|
1821
804
|
*/
|
|
1822
|
-
export
|
|
1823
|
-
readonly
|
|
1824
|
-
|
|
1825
|
-
readonly nonRecursives: ReadonlyArray<{
|
|
1826
|
-
readonly $ref: string;
|
|
1827
|
-
readonly code: Code;
|
|
1828
|
-
}>;
|
|
1829
|
-
readonly recursives: {
|
|
1830
|
-
readonly [$ref: string]: Code;
|
|
1831
|
-
};
|
|
1832
|
-
};
|
|
1833
|
-
readonly artifacts: ReadonlyArray<Artifact>;
|
|
1834
|
-
};
|
|
805
|
+
export declare function fromRepresentation(document: Document, options: {
|
|
806
|
+
readonly revivers: ReadonlyArray<AnyReviver>;
|
|
807
|
+
}): Schema.Top;
|
|
1835
808
|
/**
|
|
1836
|
-
*
|
|
809
|
+
* Reconstructs multiple runtime schemas from a representation multi-document.
|
|
1837
810
|
*
|
|
1838
811
|
* **When to use**
|
|
1839
812
|
*
|
|
1840
|
-
* Use when
|
|
1841
|
-
* schema representation `MultiDocument`.
|
|
1842
|
-
*
|
|
1843
|
-
* **Details**
|
|
1844
|
-
*
|
|
1845
|
-
* `options.reviver` can customize code generation for {@link Declaration}
|
|
1846
|
-
* nodes. Return `undefined` to fall back to the default logic, which uses
|
|
1847
|
-
* `generation` annotations or the encoded schema. References are
|
|
1848
|
-
* topologically sorted so non-recursive definitions are emitted before their
|
|
1849
|
-
* dependents. `$ref` keys are converted to sanitized JavaScript identifiers.
|
|
1850
|
-
*
|
|
1851
|
-
* **Example** (Generating TypeScript code)
|
|
813
|
+
* Use when multiple roots must be rebuilt in one shared reference environment.
|
|
1852
814
|
*
|
|
1853
|
-
*
|
|
1854
|
-
* import { Schema, SchemaRepresentation } from "effect"
|
|
815
|
+
* **Gotchas**
|
|
1855
816
|
*
|
|
1856
|
-
*
|
|
1857
|
-
* name: Schema.String,
|
|
1858
|
-
* age: Schema.Int
|
|
1859
|
-
* })
|
|
1860
|
-
*
|
|
1861
|
-
* const multi = SchemaRepresentation.toMultiDocument(
|
|
1862
|
-
* SchemaRepresentation.fromAST(Person.ast)
|
|
1863
|
-
* )
|
|
1864
|
-
* const codeDoc = SchemaRepresentation.toCodeDocument(multi)
|
|
1865
|
-
* console.log(codeDoc.codes[0].runtime)
|
|
1866
|
-
* // Schema.Struct({ ... })
|
|
1867
|
-
* ```
|
|
817
|
+
* Only references reachable from a root are revived. Revivers are resolved locally by `id`; none are installed implicitly.
|
|
1868
818
|
*
|
|
1869
|
-
* @see {@link
|
|
1870
|
-
* @see {@link
|
|
1871
|
-
* @see {@link Reviver}
|
|
819
|
+
* @see {@link fromJsonMultiDocument} for decoding a persisted multi-document
|
|
820
|
+
* @see {@link fromRepresentation} for a single root
|
|
1872
821
|
*
|
|
1873
|
-
* @category
|
|
822
|
+
* @category transforming
|
|
1874
823
|
* @since 4.0.0
|
|
1875
824
|
*/
|
|
1876
|
-
export declare function
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
*/
|
|
1880
|
-
readonly reviver?: Reviver<Code> | undefined;
|
|
1881
|
-
}): CodeDocument;
|
|
825
|
+
export declare function fromRepresentations(document: MultiDocument, options: {
|
|
826
|
+
readonly revivers: ReadonlyArray<AnyReviver>;
|
|
827
|
+
}): readonly [Schema.Top, ...Array<Schema.Top>];
|
|
1882
828
|
/**
|
|
1883
|
-
*
|
|
829
|
+
* Imports a JSON Schema Draft 2020-12 document as a runtime schema.
|
|
1884
830
|
*
|
|
1885
831
|
* **When to use**
|
|
1886
832
|
*
|
|
1887
|
-
* Use when you need to
|
|
1888
|
-
* Effect schema representation system.
|
|
1889
|
-
*
|
|
1890
|
-
* **Details**
|
|
1891
|
-
*
|
|
1892
|
-
* `options.onEnter` is an optional hook called on each JSON Schema node before
|
|
1893
|
-
* processing, allowing pre-transformation.
|
|
833
|
+
* Use when you need to validate or transform values described by an external JSON Schema document.
|
|
1894
834
|
*
|
|
1895
835
|
* **Gotchas**
|
|
1896
836
|
*
|
|
1897
|
-
*
|
|
1898
|
-
*
|
|
1899
|
-
*
|
|
1900
|
-
*
|
|
837
|
+
* Import is best-effort. Built-in declarations and checks are reconstructed with importer-owned revivers. Pattern
|
|
838
|
+
* constraints reached during translation cause an error by default. Use `patterns: "apply"` only for trusted documents,
|
|
839
|
+
* or `patterns: "ignore"` to weaken validation explicitly. Callback results are used directly, and exceptions raised by a
|
|
840
|
+
* callback pass through unchanged.
|
|
1901
841
|
*
|
|
1902
|
-
*
|
|
1903
|
-
*
|
|
1904
|
-
*
|
|
1905
|
-
* @see {@link Document}
|
|
1906
|
-
* @see {@link toJsonSchemaDocument}
|
|
1907
|
-
* @see {@link fromJsonSchemaMultiDocument}
|
|
842
|
+
* @see {@link fromJsonSchemaMultiDocument} for multiple roots sharing definitions
|
|
843
|
+
* @see {@link toRepresentation} for converting the result to a representation document
|
|
1908
844
|
*
|
|
1909
845
|
* @category constructors
|
|
1910
846
|
* @since 4.0.0
|
|
1911
847
|
*/
|
|
1912
|
-
export declare function fromJsonSchemaDocument(document: JsonSchema.Document<"draft-2020-12">, options?:
|
|
1913
|
-
readonly onEnter?: ((js: JsonSchema.JsonSchema) => JsonSchema.JsonSchema) | undefined;
|
|
1914
|
-
}): Document;
|
|
848
|
+
export declare function fromJsonSchemaDocument(document: JsonSchema.Document<"draft-2020-12">, options?: FromJsonSchemaOptions): Schema.Top;
|
|
1915
849
|
/**
|
|
1916
|
-
*
|
|
1917
|
-
* {@link MultiDocument}.
|
|
850
|
+
* Imports multiple JSON Schema Draft 2020-12 roots as runtime schemas with shared definitions.
|
|
1918
851
|
*
|
|
1919
852
|
* **When to use**
|
|
1920
853
|
*
|
|
1921
|
-
* Use when
|
|
1922
|
-
* schemas share definitions.
|
|
1923
|
-
*
|
|
1924
|
-
* **Details**
|
|
1925
|
-
*
|
|
1926
|
-
* `options.onEnter` is an optional hook called on each JSON Schema node before
|
|
1927
|
-
* processing.
|
|
854
|
+
* Use when multiple imported roots share reachable definitions, aliases, or recursion.
|
|
1928
855
|
*
|
|
1929
856
|
* **Gotchas**
|
|
1930
857
|
*
|
|
1931
|
-
*
|
|
1932
|
-
*
|
|
1933
|
-
*
|
|
1934
|
-
* rather than the original representation shapes.
|
|
1935
|
-
*
|
|
1936
|
-
* This throws if a `$ref` cannot be resolved.
|
|
858
|
+
* Only definitions reachable from a root are translated. Pattern constraints reached during translation cause an error
|
|
859
|
+
* by default. Use `patterns: "apply"` only for trusted documents, or `patterns: "ignore"` to weaken validation explicitly.
|
|
860
|
+
* Callback results are used directly, and exceptions raised by a callback pass through unchanged.
|
|
1937
861
|
*
|
|
1938
|
-
* @see {@link
|
|
1939
|
-
* @see {@link
|
|
1940
|
-
* @see {@link fromJsonSchemaDocument}
|
|
862
|
+
* @see {@link fromJsonSchemaDocument} for a single root
|
|
863
|
+
* @see {@link toRepresentations} for converting the returned schema ASTs to a representation document
|
|
1941
864
|
*
|
|
1942
865
|
* @category constructors
|
|
1943
866
|
* @since 4.0.0
|
|
1944
867
|
*/
|
|
1945
|
-
export declare function fromJsonSchemaMultiDocument(document: JsonSchema.MultiDocument<"draft-2020-12">, options?:
|
|
1946
|
-
|
|
1947
|
-
}): MultiDocument;
|
|
868
|
+
export declare function fromJsonSchemaMultiDocument(document: JsonSchema.MultiDocument<"draft-2020-12">, options?: FromJsonSchemaOptions): readonly [Schema.Top, ...Array<Schema.Top>];
|
|
869
|
+
export {};
|
|
1948
870
|
//# sourceMappingURL=SchemaRepresentation.d.ts.map
|