effect 4.0.0-beta.69 → 4.0.0-beta.70
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/dist/Array.d.ts +454 -0
- package/dist/Array.d.ts.map +1 -1
- package/dist/Array.js +152 -0
- package/dist/Array.js.map +1 -1
- package/dist/BigDecimal.d.ts +87 -33
- package/dist/BigDecimal.d.ts.map +1 -1
- package/dist/BigDecimal.js +37 -11
- package/dist/BigDecimal.js.map +1 -1
- package/dist/BigInt.d.ts +71 -14
- package/dist/BigInt.d.ts.map +1 -1
- package/dist/BigInt.js +35 -10
- package/dist/BigInt.js.map +1 -1
- package/dist/Boolean.d.ts +4 -0
- package/dist/Boolean.d.ts.map +1 -1
- package/dist/Boolean.js +4 -0
- package/dist/Boolean.js.map +1 -1
- package/dist/Brand.d.ts +16 -11
- package/dist/Brand.d.ts.map +1 -1
- package/dist/Brand.js +16 -11
- package/dist/Brand.js.map +1 -1
- package/dist/Cache.d.ts +13 -1
- package/dist/Cache.d.ts.map +1 -1
- package/dist/Cache.js +8 -0
- package/dist/Cache.js.map +1 -1
- package/dist/Cause.d.ts +95 -3
- package/dist/Cause.d.ts.map +1 -1
- package/dist/Cause.js +56 -2
- package/dist/Cause.js.map +1 -1
- package/dist/Channel.d.ts +312 -0
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +126 -0
- package/dist/Channel.js.map +1 -1
- package/dist/ChannelSchema.d.ts +20 -0
- package/dist/ChannelSchema.d.ts.map +1 -1
- package/dist/ChannelSchema.js +12 -0
- package/dist/ChannelSchema.js.map +1 -1
- package/dist/Chunk.d.ts +59 -22
- package/dist/Chunk.d.ts.map +1 -1
- package/dist/Chunk.js +29 -10
- package/dist/Chunk.js.map +1 -1
- package/dist/Combiner.d.ts +75 -71
- package/dist/Combiner.d.ts.map +1 -1
- package/dist/Combiner.js +67 -62
- package/dist/Combiner.js.map +1 -1
- package/dist/Config.d.ts +167 -46
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js +108 -28
- package/dist/Config.js.map +1 -1
- package/dist/ConfigProvider.d.ts +235 -158
- package/dist/ConfigProvider.d.ts.map +1 -1
- package/dist/ConfigProvider.js +144 -93
- package/dist/ConfigProvider.js.map +1 -1
- package/dist/Console.d.ts +21 -79
- package/dist/Console.d.ts.map +1 -1
- package/dist/Console.js +20 -75
- package/dist/Console.js.map +1 -1
- package/dist/Context.d.ts +4 -4
- package/dist/Context.js +2 -2
- package/dist/Cron.d.ts +42 -16
- package/dist/Cron.d.ts.map +1 -1
- package/dist/Cron.js +33 -13
- package/dist/Cron.js.map +1 -1
- package/dist/Crypto.d.ts +6 -0
- package/dist/Crypto.d.ts.map +1 -1
- package/dist/Crypto.js.map +1 -1
- package/dist/Data.d.ts +132 -70
- package/dist/Data.d.ts.map +1 -1
- package/dist/Data.js +44 -29
- package/dist/Data.js.map +1 -1
- package/dist/DateTime.d.ts +227 -14
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/DateTime.js +115 -6
- package/dist/DateTime.js.map +1 -1
- package/dist/Deferred.d.ts +94 -27
- package/dist/Deferred.d.ts.map +1 -1
- package/dist/Deferred.js +33 -8
- package/dist/Deferred.js.map +1 -1
- package/dist/Differ.d.ts +2 -0
- package/dist/Differ.d.ts.map +1 -1
- package/dist/Duration.d.ts +64 -6
- package/dist/Duration.d.ts.map +1 -1
- package/dist/Duration.js +26 -2
- package/dist/Duration.js.map +1 -1
- package/dist/Effect.d.ts +907 -603
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +360 -233
- package/dist/Effect.js.map +1 -1
- package/dist/Effectable.d.ts +3 -1
- package/dist/Effectable.d.ts.map +1 -1
- package/dist/Effectable.js +3 -1
- package/dist/Effectable.js.map +1 -1
- package/dist/Encoding.d.ts +16 -0
- package/dist/Encoding.d.ts.map +1 -1
- package/dist/Encoding.js +16 -0
- package/dist/Encoding.js.map +1 -1
- package/dist/Equal.d.ts +52 -40
- package/dist/Equal.d.ts.map +1 -1
- package/dist/Equal.js +32 -26
- package/dist/Equal.js.map +1 -1
- package/dist/Equivalence.d.ts +190 -153
- package/dist/Equivalence.d.ts.map +1 -1
- package/dist/Equivalence.js +129 -104
- package/dist/Equivalence.js.map +1 -1
- package/dist/ErrorReporter.d.ts +35 -14
- package/dist/ErrorReporter.d.ts.map +1 -1
- package/dist/ErrorReporter.js +18 -6
- package/dist/ErrorReporter.js.map +1 -1
- package/dist/ExecutionPlan.d.ts +10 -3
- package/dist/ExecutionPlan.d.ts.map +1 -1
- package/dist/ExecutionPlan.js +4 -3
- package/dist/ExecutionPlan.js.map +1 -1
- package/dist/Exit.d.ts +212 -6
- package/dist/Exit.d.ts.map +1 -1
- package/dist/Exit.js +139 -2
- package/dist/Exit.js.map +1 -1
- package/dist/Fiber.d.ts +8 -0
- package/dist/Fiber.d.ts.map +1 -1
- package/dist/Fiber.js +4 -0
- package/dist/Fiber.js.map +1 -1
- package/dist/FiberHandle.d.ts +46 -23
- package/dist/FiberHandle.d.ts.map +1 -1
- package/dist/FiberHandle.js +27 -11
- package/dist/FiberHandle.js.map +1 -1
- package/dist/FiberMap.d.ts +43 -4
- package/dist/FiberMap.d.ts.map +1 -1
- package/dist/FiberMap.js +27 -4
- package/dist/FiberMap.js.map +1 -1
- package/dist/FiberSet.d.ts +21 -6
- package/dist/FiberSet.d.ts.map +1 -1
- package/dist/FiberSet.js +17 -6
- package/dist/FiberSet.js.map +1 -1
- package/dist/FileSystem.d.ts +64 -0
- package/dist/FileSystem.d.ts.map +1 -1
- package/dist/FileSystem.js +26 -0
- package/dist/FileSystem.js.map +1 -1
- package/dist/Filter.d.ts +53 -21
- package/dist/Filter.d.ts.map +1 -1
- package/dist/Filter.js +20 -9
- package/dist/Filter.js.map +1 -1
- package/dist/Formatter.d.ts +21 -22
- package/dist/Formatter.d.ts.map +1 -1
- package/dist/Formatter.js +12 -12
- package/dist/Formatter.js.map +1 -1
- package/dist/Function.d.ts +67 -75
- package/dist/Function.d.ts.map +1 -1
- package/dist/Function.js +29 -19
- package/dist/Function.js.map +1 -1
- package/dist/Graph.d.ts +51 -13
- package/dist/Graph.d.ts.map +1 -1
- package/dist/Graph.js +19 -3
- package/dist/Graph.js.map +1 -1
- package/dist/HKT.d.ts +22 -21
- package/dist/HKT.d.ts.map +1 -1
- package/dist/Hash.d.ts +33 -10
- package/dist/Hash.d.ts.map +1 -1
- package/dist/Hash.js +27 -10
- package/dist/Hash.js.map +1 -1
- package/dist/HashMap.d.ts +50 -9
- package/dist/HashMap.d.ts.map +1 -1
- package/dist/HashMap.js +17 -3
- package/dist/HashMap.js.map +1 -1
- package/dist/HashRing.d.ts +4 -0
- package/dist/HashRing.d.ts.map +1 -1
- package/dist/HashRing.js +2 -0
- package/dist/HashRing.js.map +1 -1
- package/dist/HashSet.d.ts +2 -0
- package/dist/HashSet.d.ts.map +1 -1
- package/dist/HashSet.js.map +1 -1
- package/dist/Inspectable.d.ts +15 -2
- package/dist/Inspectable.d.ts.map +1 -1
- package/dist/Inspectable.js +11 -2
- package/dist/Inspectable.js.map +1 -1
- package/dist/Iterable.d.ts +104 -22
- package/dist/Iterable.d.ts.map +1 -1
- package/dist/Iterable.js +46 -12
- package/dist/Iterable.js.map +1 -1
- package/dist/JsonPatch.d.ts +61 -80
- package/dist/JsonPatch.d.ts.map +1 -1
- package/dist/JsonPatch.js +35 -42
- package/dist/JsonPatch.js.map +1 -1
- package/dist/JsonPointer.d.ts +16 -20
- package/dist/JsonPointer.d.ts.map +1 -1
- package/dist/JsonPointer.js +16 -20
- package/dist/JsonPointer.js.map +1 -1
- package/dist/JsonSchema.d.ts +123 -73
- package/dist/JsonSchema.d.ts.map +1 -1
- package/dist/JsonSchema.js +95 -53
- package/dist/JsonSchema.js.map +1 -1
- package/dist/Latch.d.ts +28 -2
- package/dist/Latch.d.ts.map +1 -1
- package/dist/Latch.js +22 -2
- package/dist/Latch.js.map +1 -1
- package/dist/Layer.d.ts +781 -335
- package/dist/Layer.d.ts.map +1 -1
- package/dist/Layer.js +324 -129
- package/dist/Layer.js.map +1 -1
- package/dist/LogLevel.d.ts +86 -13
- package/dist/LogLevel.d.ts.map +1 -1
- package/dist/LogLevel.js +30 -4
- package/dist/LogLevel.js.map +1 -1
- package/dist/Logger.d.ts +63 -51
- package/dist/Logger.d.ts.map +1 -1
- package/dist/Logger.js +61 -51
- package/dist/Logger.js.map +1 -1
- package/dist/ManagedRuntime.d.ts +12 -0
- package/dist/ManagedRuntime.d.ts.map +1 -1
- package/dist/ManagedRuntime.js +1 -0
- package/dist/ManagedRuntime.js.map +1 -1
- package/dist/Match.d.ts +83 -1
- package/dist/Match.d.ts.map +1 -1
- package/dist/Match.js +31 -1
- package/dist/Match.js.map +1 -1
- package/dist/Metric.d.ts +89 -12
- package/dist/Metric.d.ts.map +1 -1
- package/dist/Metric.js +53 -8
- package/dist/Metric.js.map +1 -1
- package/dist/MutableHashMap.d.ts +14 -0
- package/dist/MutableHashMap.d.ts.map +1 -1
- package/dist/MutableHashMap.js +4 -0
- package/dist/MutableHashMap.js.map +1 -1
- package/dist/MutableHashSet.d.ts +2 -0
- package/dist/MutableHashSet.d.ts.map +1 -1
- package/dist/MutableHashSet.js.map +1 -1
- package/dist/MutableList.d.ts +24 -6
- package/dist/MutableList.d.ts.map +1 -1
- package/dist/MutableList.js +22 -6
- package/dist/MutableList.js.map +1 -1
- package/dist/MutableRef.d.ts +2 -0
- package/dist/MutableRef.d.ts.map +1 -1
- package/dist/MutableRef.js.map +1 -1
- package/dist/Newtype.d.ts +69 -30
- package/dist/Newtype.d.ts.map +1 -1
- package/dist/Newtype.js +52 -22
- package/dist/Newtype.js.map +1 -1
- package/dist/NonEmptyIterable.d.ts +6 -0
- package/dist/NonEmptyIterable.d.ts.map +1 -1
- package/dist/NonEmptyIterable.js +2 -0
- package/dist/NonEmptyIterable.js.map +1 -1
- package/dist/Number.d.ts +16 -30
- package/dist/Number.d.ts.map +1 -1
- package/dist/Number.js +6 -12
- package/dist/Number.js.map +1 -1
- package/dist/Optic.d.ts +90 -40
- package/dist/Optic.d.ts.map +1 -1
- package/dist/Optic.js +48 -24
- package/dist/Optic.js.map +1 -1
- package/dist/Option.d.ts +121 -111
- package/dist/Option.d.ts.map +1 -1
- package/dist/Option.js +56 -54
- package/dist/Option.js.map +1 -1
- package/dist/Order.d.ts +169 -167
- package/dist/Order.d.ts.map +1 -1
- package/dist/Order.js +135 -135
- package/dist/Order.js.map +1 -1
- package/dist/Ordering.d.ts +4 -0
- package/dist/Ordering.d.ts.map +1 -1
- package/dist/Ordering.js +2 -0
- package/dist/Ordering.js.map +1 -1
- package/dist/PartitionedSemaphore.d.ts +7 -5
- package/dist/PartitionedSemaphore.d.ts.map +1 -1
- package/dist/PartitionedSemaphore.js +5 -5
- package/dist/PartitionedSemaphore.js.map +1 -1
- package/dist/Path.d.ts +8 -0
- package/dist/Path.d.ts.map +1 -1
- package/dist/Path.js +4 -0
- package/dist/Path.js.map +1 -1
- package/dist/Pipeable.d.ts +10 -0
- package/dist/Pipeable.d.ts.map +1 -1
- package/dist/Pipeable.js +8 -0
- package/dist/Pipeable.js.map +1 -1
- package/dist/PlatformError.d.ts +12 -0
- package/dist/PlatformError.d.ts.map +1 -1
- package/dist/PlatformError.js +10 -0
- package/dist/PlatformError.js.map +1 -1
- package/dist/Pool.d.ts +30 -16
- package/dist/Pool.d.ts.map +1 -1
- package/dist/Pool.js +30 -16
- package/dist/Pool.js.map +1 -1
- package/dist/Predicate.d.ts +520 -352
- package/dist/Predicate.d.ts.map +1 -1
- package/dist/Predicate.js +271 -184
- package/dist/Predicate.js.map +1 -1
- package/dist/PrimaryKey.d.ts +4 -0
- package/dist/PrimaryKey.d.ts.map +1 -1
- package/dist/PrimaryKey.js +2 -0
- package/dist/PrimaryKey.js.map +1 -1
- package/dist/PubSub.d.ts +22 -4
- package/dist/PubSub.d.ts.map +1 -1
- package/dist/PubSub.js +17 -3
- package/dist/PubSub.js.map +1 -1
- package/dist/Pull.d.ts +16 -0
- package/dist/Pull.d.ts.map +1 -1
- package/dist/Pull.js +10 -0
- package/dist/Pull.js.map +1 -1
- package/dist/Queue.d.ts +44 -0
- package/dist/Queue.d.ts.map +1 -1
- package/dist/Queue.js +28 -0
- package/dist/Queue.js.map +1 -1
- package/dist/Random.d.ts +25 -6
- package/dist/Random.d.ts.map +1 -1
- package/dist/Random.js +11 -2
- package/dist/Random.js.map +1 -1
- package/dist/RcMap.d.ts +10 -6
- package/dist/RcMap.d.ts.map +1 -1
- package/dist/RcMap.js +2 -2
- package/dist/RcMap.js.map +1 -1
- package/dist/RcRef.d.ts +3 -1
- package/dist/RcRef.d.ts.map +1 -1
- package/dist/RcRef.js.map +1 -1
- package/dist/Record.d.ts +24 -3
- package/dist/Record.d.ts.map +1 -1
- package/dist/Record.js +12 -3
- package/dist/Record.js.map +1 -1
- package/dist/Redactable.d.ts +54 -41
- package/dist/Redactable.d.ts.map +1 -1
- package/dist/Redactable.js +42 -32
- package/dist/Redactable.js.map +1 -1
- package/dist/Redacted.d.ts +10 -0
- package/dist/Redacted.d.ts.map +1 -1
- package/dist/Redacted.js +6 -0
- package/dist/Redacted.js.map +1 -1
- package/dist/Reducer.d.ts +20 -11
- package/dist/Reducer.d.ts.map +1 -1
- package/dist/Reducer.js +10 -6
- package/dist/Reducer.js.map +1 -1
- package/dist/Ref.d.ts +45 -24
- package/dist/Ref.d.ts.map +1 -1
- package/dist/Ref.js +41 -21
- package/dist/Ref.js.map +1 -1
- package/dist/References.d.ts +18 -1
- package/dist/References.d.ts.map +1 -1
- package/dist/References.js +17 -1
- package/dist/References.js.map +1 -1
- package/dist/Request.d.ts +3 -3
- package/dist/Request.js +2 -2
- package/dist/RequestResolver.d.ts +7 -17
- package/dist/RequestResolver.d.ts.map +1 -1
- package/dist/RequestResolver.js +3 -5
- package/dist/RequestResolver.js.map +1 -1
- package/dist/Resource.d.ts +2 -0
- package/dist/Resource.d.ts.map +1 -1
- package/dist/Resource.js +2 -0
- package/dist/Resource.js.map +1 -1
- package/dist/Result.d.ts +188 -6
- package/dist/Result.d.ts.map +1 -1
- package/dist/Result.js +84 -2
- package/dist/Result.js.map +1 -1
- package/dist/Runtime.d.ts +14 -11
- package/dist/Runtime.d.ts.map +1 -1
- package/dist/Runtime.js +11 -9
- package/dist/Runtime.js.map +1 -1
- package/dist/Schedule.d.ts +27 -3
- package/dist/Schedule.d.ts.map +1 -1
- package/dist/Schedule.js +21 -2
- package/dist/Schedule.js.map +1 -1
- package/dist/Scheduler.d.ts +22 -19
- package/dist/Scheduler.d.ts.map +1 -1
- package/dist/Scheduler.js +14 -12
- package/dist/Scheduler.js.map +1 -1
- package/dist/Schema.d.ts +547 -130
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +409 -121
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +123 -65
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +90 -39
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaGetter.d.ts +269 -234
- package/dist/SchemaGetter.d.ts.map +1 -1
- package/dist/SchemaGetter.js +245 -215
- package/dist/SchemaGetter.js.map +1 -1
- package/dist/SchemaIssue.d.ts +48 -46
- package/dist/SchemaIssue.d.ts.map +1 -1
- package/dist/SchemaIssue.js +34 -34
- package/dist/SchemaIssue.js.map +1 -1
- package/dist/SchemaParser.d.ts +58 -0
- package/dist/SchemaParser.d.ts.map +1 -1
- package/dist/SchemaParser.js +58 -0
- package/dist/SchemaParser.js.map +1 -1
- package/dist/SchemaRepresentation.d.ts +198 -96
- package/dist/SchemaRepresentation.d.ts.map +1 -1
- package/dist/SchemaRepresentation.js +107 -45
- package/dist/SchemaRepresentation.js.map +1 -1
- package/dist/SchemaTransformation.d.ts +272 -203
- package/dist/SchemaTransformation.d.ts.map +1 -1
- package/dist/SchemaTransformation.js +249 -187
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/SchemaUtils.d.ts +2 -0
- package/dist/SchemaUtils.d.ts.map +1 -1
- package/dist/SchemaUtils.js +2 -0
- package/dist/SchemaUtils.js.map +1 -1
- package/dist/Scope.d.ts +18 -0
- package/dist/Scope.d.ts.map +1 -1
- package/dist/Scope.js +12 -0
- package/dist/Scope.js.map +1 -1
- package/dist/ScopedCache.d.ts +44 -0
- package/dist/ScopedCache.d.ts.map +1 -1
- package/dist/ScopedCache.js +18 -0
- package/dist/ScopedCache.js.map +1 -1
- package/dist/ScopedRef.d.ts +9 -3
- package/dist/ScopedRef.d.ts.map +1 -1
- package/dist/ScopedRef.js +3 -1
- package/dist/ScopedRef.js.map +1 -1
- package/dist/Semaphore.d.ts +6 -0
- package/dist/Semaphore.d.ts.map +1 -1
- package/dist/Semaphore.js +4 -0
- package/dist/Semaphore.js.map +1 -1
- package/dist/Sink.d.ts +108 -0
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Sink.js +54 -0
- package/dist/Sink.js.map +1 -1
- package/dist/Stdio.d.ts +7 -3
- package/dist/Stdio.d.ts.map +1 -1
- package/dist/Stdio.js +2 -0
- package/dist/Stdio.js.map +1 -1
- package/dist/Stream.d.ts +416 -16
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +164 -8
- package/dist/Stream.js.map +1 -1
- package/dist/String.d.ts +14 -0
- package/dist/String.d.ts.map +1 -1
- package/dist/String.js +6 -0
- package/dist/String.js.map +1 -1
- package/dist/Struct.d.ts +371 -191
- package/dist/Struct.d.ts.map +1 -1
- package/dist/Struct.js +144 -77
- package/dist/Struct.js.map +1 -1
- package/dist/SubscriptionRef.d.ts +7 -1
- package/dist/SubscriptionRef.d.ts.map +1 -1
- package/dist/SubscriptionRef.js +5 -1
- package/dist/SubscriptionRef.js.map +1 -1
- package/dist/SynchronizedRef.d.ts +2 -0
- package/dist/SynchronizedRef.d.ts.map +1 -1
- package/dist/SynchronizedRef.js +2 -0
- package/dist/SynchronizedRef.js.map +1 -1
- package/dist/Tracer.d.ts +17 -27
- package/dist/Tracer.d.ts.map +1 -1
- package/dist/Tracer.js +8 -12
- package/dist/Tracer.js.map +1 -1
- package/dist/Trie.d.ts +23 -9
- package/dist/Trie.d.ts.map +1 -1
- package/dist/Trie.js +13 -3
- package/dist/Trie.js.map +1 -1
- package/dist/Tuple.d.ts +287 -144
- package/dist/Tuple.d.ts.map +1 -1
- package/dist/Tuple.js +135 -66
- package/dist/Tuple.js.map +1 -1
- package/dist/TxChunk.d.ts +182 -93
- package/dist/TxChunk.d.ts.map +1 -1
- package/dist/TxChunk.js +68 -35
- package/dist/TxChunk.js.map +1 -1
- package/dist/TxDeferred.d.ts +3 -4
- package/dist/TxDeferred.d.ts.map +1 -1
- package/dist/TxDeferred.js.map +1 -1
- package/dist/TxHashMap.d.ts +163 -86
- package/dist/TxHashMap.d.ts.map +1 -1
- package/dist/TxHashMap.js +57 -30
- package/dist/TxHashMap.js.map +1 -1
- package/dist/TxHashSet.d.ts +24 -27
- package/dist/TxHashSet.d.ts.map +1 -1
- package/dist/TxHashSet.js +9 -6
- package/dist/TxHashSet.js.map +1 -1
- package/dist/TxPriorityQueue.d.ts +2 -0
- package/dist/TxPriorityQueue.d.ts.map +1 -1
- package/dist/TxPriorityQueue.js.map +1 -1
- package/dist/TxPubSub.d.ts +36 -35
- package/dist/TxPubSub.d.ts.map +1 -1
- package/dist/TxPubSub.js +22 -21
- package/dist/TxPubSub.js.map +1 -1
- package/dist/TxQueue.d.ts +77 -114
- package/dist/TxQueue.d.ts.map +1 -1
- package/dist/TxQueue.js +45 -62
- package/dist/TxQueue.js.map +1 -1
- package/dist/TxRef.d.ts +4 -0
- package/dist/TxRef.d.ts.map +1 -1
- package/dist/TxRef.js +2 -0
- package/dist/TxRef.js.map +1 -1
- package/dist/TxSemaphore.d.ts +66 -27
- package/dist/TxSemaphore.d.ts.map +1 -1
- package/dist/TxSemaphore.js +38 -15
- package/dist/TxSemaphore.js.map +1 -1
- package/dist/Types.d.ts +202 -75
- package/dist/Types.d.ts.map +1 -1
- package/dist/UndefinedOr.d.ts +31 -29
- package/dist/UndefinedOr.d.ts.map +1 -1
- package/dist/UndefinedOr.js +27 -21
- package/dist/UndefinedOr.js.map +1 -1
- package/dist/Unify.d.ts +28 -0
- package/dist/Unify.d.ts.map +1 -1
- package/dist/Unify.js +2 -0
- package/dist/Unify.js.map +1 -1
- package/dist/Utils.d.ts +29 -35
- package/dist/Utils.d.ts.map +1 -1
- package/dist/Utils.js +11 -13
- package/dist/Utils.js.map +1 -1
- package/dist/index.d.ts +18 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -7
- package/dist/index.js.map +1 -1
- package/dist/testing/TestClock.d.ts +17 -17
- package/dist/testing/TestClock.js +1 -1
- package/dist/testing/TestClock.js.map +1 -1
- package/dist/testing/TestConsole.d.ts +2 -0
- package/dist/testing/TestConsole.d.ts.map +1 -1
- package/dist/testing/TestConsole.js.map +1 -1
- package/dist/testing/TestSchema.d.ts +43 -55
- package/dist/testing/TestSchema.d.ts.map +1 -1
- package/dist/testing/TestSchema.js +43 -55
- package/dist/testing/TestSchema.js.map +1 -1
- package/dist/unstable/ai/AiError.d.ts +62 -11
- package/dist/unstable/ai/AiError.d.ts.map +1 -1
- package/dist/unstable/ai/AiError.js +58 -11
- package/dist/unstable/ai/AiError.js.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.d.ts +4 -4
- package/dist/unstable/ai/AnthropicStructuredOutput.js +4 -4
- package/dist/unstable/ai/Chat.d.ts +29 -1
- package/dist/unstable/ai/Chat.d.ts.map +1 -1
- package/dist/unstable/ai/Chat.js +15 -1
- package/dist/unstable/ai/Chat.js.map +1 -1
- package/dist/unstable/ai/IdGenerator.d.ts +10 -0
- package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
- package/dist/unstable/ai/IdGenerator.js +8 -0
- package/dist/unstable/ai/IdGenerator.js.map +1 -1
- package/dist/unstable/ai/LanguageModel.d.ts +32 -46
- package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
- package/dist/unstable/ai/LanguageModel.js +5 -14
- package/dist/unstable/ai/LanguageModel.js.map +1 -1
- package/dist/unstable/ai/McpSchema.d.ts +84 -32
- package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
- package/dist/unstable/ai/McpSchema.js +73 -28
- package/dist/unstable/ai/McpSchema.js.map +1 -1
- package/dist/unstable/ai/McpServer.d.ts +8 -0
- package/dist/unstable/ai/McpServer.d.ts.map +1 -1
- package/dist/unstable/ai/McpServer.js +6 -0
- package/dist/unstable/ai/McpServer.js.map +1 -1
- package/dist/unstable/ai/Model.d.ts +9 -5
- package/dist/unstable/ai/Model.d.ts.map +1 -1
- package/dist/unstable/ai/Model.js +4 -0
- package/dist/unstable/ai/Model.js.map +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.d.ts +3 -2
- package/dist/unstable/ai/OpenAiStructuredOutput.d.ts.map +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.js +3 -2
- package/dist/unstable/ai/OpenAiStructuredOutput.js.map +1 -1
- package/dist/unstable/ai/Prompt.d.ts +62 -35
- package/dist/unstable/ai/Prompt.d.ts.map +1 -1
- package/dist/unstable/ai/Prompt.js +16 -15
- package/dist/unstable/ai/Prompt.js.map +1 -1
- package/dist/unstable/ai/Response.d.ts +40 -21
- package/dist/unstable/ai/Response.d.ts.map +1 -1
- package/dist/unstable/ai/Response.js +10 -0
- package/dist/unstable/ai/Response.js.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.d.ts +8 -0
- package/dist/unstable/ai/ResponseIdTracker.d.ts.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.js +4 -0
- package/dist/unstable/ai/ResponseIdTracker.js.map +1 -1
- package/dist/unstable/ai/Telemetry.d.ts +30 -5
- package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
- package/dist/unstable/ai/Telemetry.js +7 -1
- package/dist/unstable/ai/Telemetry.js.map +1 -1
- package/dist/unstable/ai/Tokenizer.d.ts +6 -0
- package/dist/unstable/ai/Tokenizer.d.ts.map +1 -1
- package/dist/unstable/ai/Tokenizer.js +4 -0
- package/dist/unstable/ai/Tokenizer.js.map +1 -1
- package/dist/unstable/ai/Tool.d.ts +68 -0
- package/dist/unstable/ai/Tool.d.ts.map +1 -1
- package/dist/unstable/ai/Tool.js +36 -0
- package/dist/unstable/ai/Tool.js.map +1 -1
- package/dist/unstable/ai/Toolkit.d.ts +12 -0
- package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
- package/dist/unstable/ai/Toolkit.js +6 -0
- package/dist/unstable/ai/Toolkit.js.map +1 -1
- package/dist/unstable/cli/Argument.d.ts +14 -4
- package/dist/unstable/cli/Argument.d.ts.map +1 -1
- package/dist/unstable/cli/Argument.js +4 -0
- package/dist/unstable/cli/Argument.js.map +1 -1
- package/dist/unstable/cli/CliError.d.ts +6 -0
- package/dist/unstable/cli/CliError.d.ts.map +1 -1
- package/dist/unstable/cli/CliError.js +4 -0
- package/dist/unstable/cli/CliError.js.map +1 -1
- package/dist/unstable/cli/Command.d.ts +123 -12
- package/dist/unstable/cli/Command.d.ts.map +1 -1
- package/dist/unstable/cli/Command.js +57 -4
- package/dist/unstable/cli/Command.js.map +1 -1
- package/dist/unstable/cli/Flag.d.ts +31 -14
- package/dist/unstable/cli/Flag.d.ts.map +1 -1
- package/dist/unstable/cli/Flag.js +23 -10
- package/dist/unstable/cli/Flag.js.map +1 -1
- package/dist/unstable/cli/Param.d.ts +10 -0
- package/dist/unstable/cli/Param.d.ts.map +1 -1
- package/dist/unstable/cli/Param.js +46 -5
- package/dist/unstable/cli/Param.js.map +1 -1
- package/dist/unstable/cli/Primitive.d.ts +10 -0
- package/dist/unstable/cli/Primitive.d.ts.map +1 -1
- package/dist/unstable/cli/Primitive.js +10 -0
- package/dist/unstable/cli/Primitive.js.map +1 -1
- package/dist/unstable/cli/Prompt.d.ts +47 -40
- package/dist/unstable/cli/Prompt.d.ts.map +1 -1
- package/dist/unstable/cli/Prompt.js +25 -20
- package/dist/unstable/cli/Prompt.js.map +1 -1
- package/dist/unstable/cli/internal/command.d.ts +1 -0
- package/dist/unstable/cli/internal/command.d.ts.map +1 -1
- package/dist/unstable/cli/internal/command.js +10 -2
- package/dist/unstable/cli/internal/command.js.map +1 -1
- package/dist/unstable/cli/internal/completions/descriptor.js +3 -0
- package/dist/unstable/cli/internal/completions/descriptor.js.map +1 -1
- package/dist/unstable/cli/internal/parser.js +8 -1
- package/dist/unstable/cli/internal/parser.js.map +1 -1
- package/dist/unstable/cluster/ClusterCron.d.ts +10 -1
- package/dist/unstable/cluster/ClusterCron.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterCron.js +2 -0
- package/dist/unstable/cluster/ClusterCron.js.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.d.ts +8 -0
- package/dist/unstable/cluster/ClusterSchema.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.js +8 -0
- package/dist/unstable/cluster/ClusterSchema.js.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts +4 -0
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.js +4 -0
- package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/unstable/cluster/DeliverAt.d.ts +3 -4
- package/dist/unstable/cluster/DeliverAt.d.ts.map +1 -1
- package/dist/unstable/cluster/DeliverAt.js.map +1 -1
- package/dist/unstable/cluster/Entity.d.ts +24 -0
- package/dist/unstable/cluster/Entity.d.ts.map +1 -1
- package/dist/unstable/cluster/Entity.js +12 -0
- package/dist/unstable/cluster/Entity.js.map +1 -1
- package/dist/unstable/cluster/EntityProxy.d.ts +10 -4
- package/dist/unstable/cluster/EntityProxy.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityProxy.js.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.d.ts +6 -0
- package/dist/unstable/cluster/EntityProxyServer.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.js +4 -0
- package/dist/unstable/cluster/EntityProxyServer.js.map +1 -1
- package/dist/unstable/cluster/EntityResource.d.ts +10 -0
- package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityResource.js +8 -0
- package/dist/unstable/cluster/EntityResource.js.map +1 -1
- package/dist/unstable/cluster/Envelope.d.ts +16 -0
- package/dist/unstable/cluster/Envelope.d.ts.map +1 -1
- package/dist/unstable/cluster/Envelope.js +10 -0
- package/dist/unstable/cluster/Envelope.js.map +1 -1
- package/dist/unstable/cluster/HttpRunner.d.ts +16 -0
- package/dist/unstable/cluster/HttpRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/HttpRunner.js +16 -0
- package/dist/unstable/cluster/HttpRunner.js.map +1 -1
- package/dist/unstable/cluster/K8sHttpClient.d.ts +8 -0
- package/dist/unstable/cluster/K8sHttpClient.d.ts.map +1 -1
- package/dist/unstable/cluster/K8sHttpClient.js +8 -0
- package/dist/unstable/cluster/K8sHttpClient.js.map +1 -1
- package/dist/unstable/cluster/Message.d.ts +24 -0
- package/dist/unstable/cluster/Message.d.ts.map +1 -1
- package/dist/unstable/cluster/Message.js +18 -0
- package/dist/unstable/cluster/Message.js.map +1 -1
- package/dist/unstable/cluster/MessageStorage.d.ts +64 -20
- package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/MessageStorage.js +8 -0
- package/dist/unstable/cluster/MessageStorage.js.map +1 -1
- package/dist/unstable/cluster/Reply.d.ts +6 -6
- package/dist/unstable/cluster/Reply.d.ts.map +1 -1
- package/dist/unstable/cluster/Reply.js +4 -3
- package/dist/unstable/cluster/Reply.js.map +1 -1
- package/dist/unstable/cluster/Runner.d.ts +2 -0
- package/dist/unstable/cluster/Runner.d.ts.map +1 -1
- package/dist/unstable/cluster/Runner.js +2 -0
- package/dist/unstable/cluster/Runner.js.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.d.ts +13 -2
- package/dist/unstable/cluster/RunnerHealth.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.js +13 -2
- package/dist/unstable/cluster/RunnerHealth.js.map +1 -1
- package/dist/unstable/cluster/RunnerServer.d.ts +8 -8
- package/dist/unstable/cluster/RunnerServer.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerServer.js +8 -8
- package/dist/unstable/cluster/RunnerServer.js.map +1 -1
- package/dist/unstable/cluster/RunnerStorage.d.ts +2 -0
- package/dist/unstable/cluster/RunnerStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerStorage.js +2 -0
- package/dist/unstable/cluster/RunnerStorage.js.map +1 -1
- package/dist/unstable/cluster/ShardId.d.ts +4 -0
- package/dist/unstable/cluster/ShardId.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardId.js +4 -0
- package/dist/unstable/cluster/ShardId.js.map +1 -1
- package/dist/unstable/cluster/Snowflake.d.ts +2 -0
- package/dist/unstable/cluster/Snowflake.d.ts.map +1 -1
- package/dist/unstable/cluster/Snowflake.js +2 -0
- package/dist/unstable/cluster/Snowflake.js.map +1 -1
- package/dist/unstable/cluster/TestRunner.d.ts +3 -2
- package/dist/unstable/cluster/TestRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/TestRunner.js +3 -2
- package/dist/unstable/cluster/TestRunner.js.map +1 -1
- package/dist/unstable/devtools/DevToolsSchema.d.ts +34 -2
- package/dist/unstable/devtools/DevToolsSchema.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsSchema.js +14 -0
- package/dist/unstable/devtools/DevToolsSchema.js.map +1 -1
- package/dist/unstable/devtools/DevToolsServer.d.ts +4 -0
- package/dist/unstable/devtools/DevToolsServer.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsServer.js +2 -0
- package/dist/unstable/devtools/DevToolsServer.js.map +1 -1
- package/dist/unstable/encoding/Msgpack.d.ts +24 -0
- package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
- package/dist/unstable/encoding/Msgpack.js +18 -0
- package/dist/unstable/encoding/Msgpack.js.map +1 -1
- package/dist/unstable/encoding/Ndjson.d.ts +46 -2
- package/dist/unstable/encoding/Ndjson.d.ts.map +1 -1
- package/dist/unstable/encoding/Ndjson.js +30 -2
- package/dist/unstable/encoding/Ndjson.js.map +1 -1
- package/dist/unstable/encoding/Sse.d.ts +24 -17
- package/dist/unstable/encoding/Sse.d.ts.map +1 -1
- package/dist/unstable/encoding/Sse.js +20 -11
- package/dist/unstable/encoding/Sse.js.map +1 -1
- package/dist/unstable/eventlog/Event.d.ts +16 -0
- package/dist/unstable/eventlog/Event.d.ts.map +1 -1
- package/dist/unstable/eventlog/Event.js.map +1 -1
- package/dist/unstable/eventlog/EventGroup.d.ts +4 -0
- package/dist/unstable/eventlog/EventGroup.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventGroup.js +2 -0
- package/dist/unstable/eventlog/EventGroup.js.map +1 -1
- package/dist/unstable/eventlog/EventJournal.d.ts +20 -0
- package/dist/unstable/eventlog/EventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventJournal.js +18 -0
- package/dist/unstable/eventlog/EventJournal.js.map +1 -1
- package/dist/unstable/eventlog/EventLog.d.ts +22 -0
- package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLog.js +18 -0
- package/dist/unstable/eventlog/EventLog.js.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.d.ts +10 -0
- package/dist/unstable/eventlog/EventLogMessage.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.js +10 -0
- package/dist/unstable/eventlog/EventLogMessage.js.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.d.ts +4 -0
- package/dist/unstable/eventlog/EventLogRemote.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.js +4 -0
- package/dist/unstable/eventlog/EventLogRemote.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.d.ts +4 -0
- package/dist/unstable/eventlog/EventLogServer.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.js +4 -0
- package/dist/unstable/eventlog/EventLogServer.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +6 -0
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.js +6 -0
- package/dist/unstable/eventlog/EventLogServerEncrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +8 -0
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js +8 -0
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts +11 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.js +11 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.d.ts +2 -0
- package/dist/unstable/eventlog/SqlEventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.js +2 -0
- package/dist/unstable/eventlog/SqlEventJournal.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts +2 -0
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js +2 -0
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts +2 -0
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js +2 -0
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/http/Cookies.d.ts +34 -0
- package/dist/unstable/http/Cookies.d.ts.map +1 -1
- package/dist/unstable/http/Cookies.js +18 -0
- package/dist/unstable/http/Cookies.js.map +1 -1
- package/dist/unstable/http/Etag.d.ts +4 -0
- package/dist/unstable/http/Etag.d.ts.map +1 -1
- package/dist/unstable/http/Etag.js.map +1 -1
- package/dist/unstable/http/FetchHttpClient.d.ts +4 -0
- package/dist/unstable/http/FetchHttpClient.d.ts.map +1 -1
- package/dist/unstable/http/FetchHttpClient.js +4 -0
- package/dist/unstable/http/FetchHttpClient.js.map +1 -1
- package/dist/unstable/http/Headers.d.ts +60 -0
- package/dist/unstable/http/Headers.d.ts.map +1 -1
- package/dist/unstable/http/Headers.js +24 -0
- package/dist/unstable/http/Headers.js.map +1 -1
- package/dist/unstable/http/HttpBody.d.ts +32 -0
- package/dist/unstable/http/HttpBody.d.ts.map +1 -1
- package/dist/unstable/http/HttpBody.js +22 -0
- package/dist/unstable/http/HttpBody.js.map +1 -1
- package/dist/unstable/http/HttpClient.d.ts +44 -0
- package/dist/unstable/http/HttpClient.d.ts.map +1 -1
- package/dist/unstable/http/HttpClient.js +14 -0
- package/dist/unstable/http/HttpClient.js.map +1 -1
- package/dist/unstable/http/HttpClientRequest.d.ts +2 -0
- package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientRequest.js +2 -0
- package/dist/unstable/http/HttpClientRequest.js.map +1 -1
- package/dist/unstable/http/HttpClientResponse.d.ts +6 -0
- package/dist/unstable/http/HttpClientResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientResponse.js +6 -0
- package/dist/unstable/http/HttpClientResponse.js.map +1 -1
- package/dist/unstable/http/HttpEffect.d.ts +4 -0
- package/dist/unstable/http/HttpEffect.d.ts.map +1 -1
- package/dist/unstable/http/HttpEffect.js +4 -0
- package/dist/unstable/http/HttpEffect.js.map +1 -1
- package/dist/unstable/http/HttpPlatform.d.ts +2 -0
- package/dist/unstable/http/HttpPlatform.d.ts.map +1 -1
- package/dist/unstable/http/HttpPlatform.js +2 -0
- package/dist/unstable/http/HttpPlatform.js.map +1 -1
- package/dist/unstable/http/HttpRouter.d.ts +54 -16
- package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
- package/dist/unstable/http/HttpRouter.js +26 -1
- package/dist/unstable/http/HttpRouter.js.map +1 -1
- package/dist/unstable/http/HttpServer.d.ts +35 -1
- package/dist/unstable/http/HttpServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpServer.js +17 -1
- package/dist/unstable/http/HttpServer.js.map +1 -1
- package/dist/unstable/http/HttpServerError.d.ts +17 -3
- package/dist/unstable/http/HttpServerError.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerError.js +16 -0
- package/dist/unstable/http/HttpServerError.js.map +1 -1
- package/dist/unstable/http/HttpServerRequest.d.ts +30 -0
- package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRequest.js +28 -0
- package/dist/unstable/http/HttpServerRequest.js.map +1 -1
- package/dist/unstable/http/HttpServerRespondable.d.ts +8 -0
- package/dist/unstable/http/HttpServerRespondable.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRespondable.js +6 -0
- package/dist/unstable/http/HttpServerRespondable.js.map +1 -1
- package/dist/unstable/http/HttpServerResponse.d.ts +96 -0
- package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerResponse.js +50 -0
- package/dist/unstable/http/HttpServerResponse.js.map +1 -1
- package/dist/unstable/http/HttpTraceContext.d.ts +12 -0
- package/dist/unstable/http/HttpTraceContext.d.ts.map +1 -1
- package/dist/unstable/http/HttpTraceContext.js +10 -0
- package/dist/unstable/http/HttpTraceContext.js.map +1 -1
- package/dist/unstable/http/Multipart.d.ts +49 -2
- package/dist/unstable/http/Multipart.d.ts.map +1 -1
- package/dist/unstable/http/Multipart.js +35 -2
- package/dist/unstable/http/Multipart.js.map +1 -1
- package/dist/unstable/http/Template.d.ts +14 -0
- package/dist/unstable/http/Template.d.ts.map +1 -1
- package/dist/unstable/http/Template.js +4 -0
- package/dist/unstable/http/Template.js.map +1 -1
- package/dist/unstable/http/UrlParams.d.ts +64 -0
- package/dist/unstable/http/UrlParams.d.ts.map +1 -1
- package/dist/unstable/http/UrlParams.js +28 -0
- package/dist/unstable/http/UrlParams.js.map +1 -1
- package/dist/unstable/httpapi/HttpApi.d.ts +10 -4
- package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApi.js +4 -0
- package/dist/unstable/httpapi/HttpApi.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts +9 -4
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js +5 -4
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +2 -0
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.js +2 -0
- package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.d.ts +23 -14
- package/dist/unstable/httpapi/HttpApiGroup.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.js +6 -3
- package/dist/unstable/httpapi/HttpApiGroup.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +14 -0
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.js +6 -0
- package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.d.ts +38 -15
- package/dist/unstable/httpapi/HttpApiScalar.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.js +4 -0
- package/dist/unstable/httpapi/HttpApiScalar.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.d.ts +14 -3
- package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.js +10 -0
- package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts +17 -11
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.js +17 -11
- package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSwagger.d.ts +2 -4
- package/dist/unstable/httpapi/HttpApiSwagger.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSwagger.js +2 -4
- package/dist/unstable/httpapi/HttpApiSwagger.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiTest.d.ts +2 -0
- package/dist/unstable/httpapi/HttpApiTest.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiTest.js +2 -0
- package/dist/unstable/httpapi/HttpApiTest.js.map +1 -1
- package/dist/unstable/httpapi/OpenApi.d.ts +2 -0
- package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/OpenApi.js +2 -0
- package/dist/unstable/httpapi/OpenApi.js.map +1 -1
- package/dist/unstable/observability/Otlp.d.ts +2 -0
- package/dist/unstable/observability/Otlp.d.ts.map +1 -1
- package/dist/unstable/observability/Otlp.js +2 -0
- package/dist/unstable/observability/Otlp.js.map +1 -1
- package/dist/unstable/observability/OtlpExporter.d.ts +2 -0
- package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpExporter.js +2 -0
- package/dist/unstable/observability/OtlpExporter.js.map +1 -1
- package/dist/unstable/observability/OtlpLogger.d.ts +4 -0
- package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpLogger.js +4 -0
- package/dist/unstable/observability/OtlpLogger.js.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.d.ts +8 -9
- package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.js +3 -3
- package/dist/unstable/observability/OtlpMetrics.js.map +1 -1
- package/dist/unstable/observability/OtlpResource.d.ts +8 -0
- package/dist/unstable/observability/OtlpResource.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpResource.js +8 -0
- package/dist/unstable/observability/OtlpResource.js.map +1 -1
- package/dist/unstable/observability/OtlpTracer.d.ts +3 -2
- package/dist/unstable/observability/OtlpTracer.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpTracer.js +3 -2
- package/dist/unstable/observability/OtlpTracer.js.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.d.ts +6 -2
- package/dist/unstable/observability/PrometheusMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.js +6 -2
- package/dist/unstable/observability/PrometheusMetrics.js.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.d.ts +10 -0
- package/dist/unstable/persistence/KeyValueStore.d.ts.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.js +8 -0
- package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
- package/dist/unstable/persistence/Persistable.d.ts +2 -0
- package/dist/unstable/persistence/Persistable.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistable.js +2 -0
- package/dist/unstable/persistence/Persistable.js.map +1 -1
- package/dist/unstable/persistence/PersistedCache.d.ts +2 -0
- package/dist/unstable/persistence/PersistedCache.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedCache.js +2 -0
- package/dist/unstable/persistence/PersistedCache.js.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.d.ts +21 -6
- package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.js +10 -0
- package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
- package/dist/unstable/persistence/Persistence.d.ts +14 -0
- package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistence.js +14 -0
- package/dist/unstable/persistence/Persistence.js.map +1 -1
- package/dist/unstable/persistence/RateLimiter.d.ts +6 -3
- package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
- package/dist/unstable/persistence/RateLimiter.js +4 -0
- package/dist/unstable/persistence/RateLimiter.js.map +1 -1
- package/dist/unstable/persistence/Redis.d.ts +6 -0
- package/dist/unstable/persistence/Redis.d.ts.map +1 -1
- package/dist/unstable/persistence/Redis.js +4 -0
- package/dist/unstable/persistence/Redis.js.map +1 -1
- package/dist/unstable/process/ChildProcess.d.ts +70 -19
- package/dist/unstable/process/ChildProcess.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcess.js +10 -0
- package/dist/unstable/process/ChildProcess.js.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.d.ts +20 -4
- package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
- package/dist/unstable/reactivity/Atom.d.ts +105 -14
- package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
- package/dist/unstable/reactivity/Atom.js +53 -8
- package/dist/unstable/reactivity/Atom.js.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.d.ts +4 -0
- package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.js +2 -0
- package/dist/unstable/reactivity/AtomHttpApi.js.map +1 -1
- package/dist/unstable/reactivity/AtomRef.d.ts +8 -0
- package/dist/unstable/reactivity/AtomRef.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRef.js +2 -0
- package/dist/unstable/reactivity/AtomRef.js.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.d.ts +32 -0
- package/dist/unstable/reactivity/AtomRegistry.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.js +12 -0
- package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.d.ts +8 -6
- package/dist/unstable/reactivity/AtomRpc.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.js +4 -3
- package/dist/unstable/reactivity/AtomRpc.js.map +1 -1
- package/dist/unstable/reactivity/Hydration.d.ts +6 -0
- package/dist/unstable/reactivity/Hydration.d.ts.map +1 -1
- package/dist/unstable/reactivity/Hydration.js +4 -0
- package/dist/unstable/reactivity/Hydration.js.map +1 -1
- package/dist/unstable/reactivity/Reactivity.d.ts +27 -3
- package/dist/unstable/reactivity/Reactivity.d.ts.map +1 -1
- package/dist/unstable/reactivity/Reactivity.js +15 -3
- package/dist/unstable/reactivity/Reactivity.js.map +1 -1
- package/dist/unstable/rpc/Rpc.d.ts +38 -2
- package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
- package/dist/unstable/rpc/Rpc.js +12 -2
- package/dist/unstable/rpc/Rpc.js.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.d.ts +6 -0
- package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.js +6 -0
- package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
- package/dist/unstable/rpc/RpcServer.d.ts +5 -3
- package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcServer.js +5 -3
- package/dist/unstable/rpc/RpcServer.js.map +1 -1
- package/dist/unstable/schema/Model.d.ts +43 -12
- package/dist/unstable/schema/Model.d.ts.map +1 -1
- package/dist/unstable/schema/Model.js +41 -12
- package/dist/unstable/schema/Model.js.map +1 -1
- package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
- package/dist/unstable/sql/SqlResolver.d.ts +6 -4
- package/dist/unstable/sql/SqlResolver.d.ts.map +1 -1
- package/dist/unstable/sql/SqlResolver.js +6 -4
- package/dist/unstable/sql/SqlResolver.js.map +1 -1
- package/dist/unstable/sql/Statement.d.ts +8 -4
- package/dist/unstable/sql/Statement.d.ts.map +1 -1
- package/dist/unstable/sql/Statement.js.map +1 -1
- package/dist/unstable/workflow/DurableClock.d.ts +1 -1
- package/dist/unstable/workflow/DurableDeferred.d.ts +3 -0
- package/dist/unstable/workflow/DurableDeferred.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.js +3 -0
- package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
- package/dist/unstable/workflow/Workflow.d.ts +42 -34
- package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
- package/dist/unstable/workflow/Workflow.js +18 -19
- package/dist/unstable/workflow/Workflow.js.map +1 -1
- package/package.json +1 -1
- package/src/Array.ts +454 -0
- package/src/BigDecimal.ts +87 -33
- package/src/BigInt.ts +71 -14
- package/src/Boolean.ts +4 -0
- package/src/Brand.ts +16 -11
- package/src/Cache.ts +17 -1
- package/src/Cause.ts +95 -3
- package/src/Channel.ts +326 -0
- package/src/ChannelSchema.ts +24 -0
- package/src/Chunk.ts +59 -22
- package/src/Combiner.ts +75 -71
- package/src/Config.ts +167 -46
- package/src/ConfigProvider.ts +235 -158
- package/src/Console.ts +25 -99
- package/src/Context.ts +4 -4
- package/src/Cron.ts +42 -16
- package/src/Crypto.ts +6 -0
- package/src/Data.ts +132 -70
- package/src/DateTime.ts +227 -14
- package/src/Deferred.ts +94 -27
- package/src/Differ.ts +2 -0
- package/src/Duration.ts +64 -6
- package/src/Effect.ts +909 -605
- package/src/Effectable.ts +3 -1
- package/src/Encoding.ts +16 -0
- package/src/Equal.ts +52 -40
- package/src/Equivalence.ts +190 -153
- package/src/ErrorReporter.ts +35 -14
- package/src/ExecutionPlan.ts +10 -3
- package/src/Exit.ts +212 -6
- package/src/Fiber.ts +8 -0
- package/src/FiberHandle.ts +46 -23
- package/src/FiberMap.ts +43 -4
- package/src/FiberSet.ts +21 -6
- package/src/FileSystem.ts +64 -0
- package/src/Filter.ts +53 -21
- package/src/Formatter.ts +21 -22
- package/src/Function.ts +67 -75
- package/src/Graph.ts +51 -13
- package/src/HKT.ts +22 -21
- package/src/Hash.ts +33 -10
- package/src/HashMap.ts +50 -9
- package/src/HashRing.ts +4 -0
- package/src/HashSet.ts +2 -0
- package/src/Inspectable.ts +15 -2
- package/src/Iterable.ts +104 -22
- package/src/JsonPatch.ts +61 -80
- package/src/JsonPointer.ts +16 -20
- package/src/JsonSchema.ts +123 -73
- package/src/Latch.ts +28 -2
- package/src/Layer.ts +781 -335
- package/src/LogLevel.ts +86 -13
- package/src/Logger.ts +71 -51
- package/src/ManagedRuntime.ts +12 -0
- package/src/Match.ts +83 -1
- package/src/Metric.ts +105 -12
- package/src/MutableHashMap.ts +18 -0
- package/src/MutableHashSet.ts +2 -0
- package/src/MutableList.ts +24 -6
- package/src/MutableRef.ts +2 -0
- package/src/Newtype.ts +69 -30
- package/src/NonEmptyIterable.ts +6 -0
- package/src/Number.ts +16 -30
- package/src/Optic.ts +90 -40
- package/src/Option.ts +121 -111
- package/src/Order.ts +169 -167
- package/src/Ordering.ts +4 -0
- package/src/PartitionedSemaphore.ts +7 -5
- package/src/Path.ts +8 -0
- package/src/Pipeable.ts +10 -0
- package/src/PlatformError.ts +12 -0
- package/src/Pool.ts +30 -16
- package/src/Predicate.ts +520 -352
- package/src/PrimaryKey.ts +4 -0
- package/src/PubSub.ts +23 -5
- package/src/Pull.ts +16 -0
- package/src/Queue.ts +44 -0
- package/src/Random.ts +25 -6
- package/src/RcMap.ts +10 -6
- package/src/RcRef.ts +3 -1
- package/src/Record.ts +24 -3
- package/src/Redactable.ts +54 -41
- package/src/Redacted.ts +10 -0
- package/src/Reducer.ts +20 -11
- package/src/Ref.ts +95 -58
- package/src/References.ts +18 -1
- package/src/Request.ts +3 -3
- package/src/RequestResolver.ts +8 -22
- package/src/Resource.ts +2 -0
- package/src/Result.ts +192 -6
- package/src/Runtime.ts +14 -11
- package/src/Schedule.ts +35 -3
- package/src/Scheduler.ts +22 -19
- package/src/Schema.ts +547 -130
- package/src/SchemaAST.ts +123 -65
- package/src/SchemaGetter.ts +269 -234
- package/src/SchemaIssue.ts +48 -46
- package/src/SchemaParser.ts +58 -0
- package/src/SchemaRepresentation.ts +198 -96
- package/src/SchemaTransformation.ts +272 -203
- package/src/SchemaUtils.ts +2 -0
- package/src/Scope.ts +19 -1
- package/src/ScopedCache.ts +56 -0
- package/src/ScopedRef.ts +9 -3
- package/src/Semaphore.ts +6 -0
- package/src/Sink.ts +108 -0
- package/src/Stdio.ts +7 -3
- package/src/Stream.ts +464 -16
- package/src/String.ts +14 -0
- package/src/Struct.ts +371 -191
- package/src/SubscriptionRef.ts +7 -1
- package/src/SynchronizedRef.ts +2 -0
- package/src/Tracer.ts +17 -27
- package/src/Trie.ts +23 -9
- package/src/Tuple.ts +287 -144
- package/src/TxChunk.ts +182 -93
- package/src/TxDeferred.ts +3 -4
- package/src/TxHashMap.ts +171 -90
- package/src/TxHashSet.ts +36 -35
- package/src/TxPriorityQueue.ts +2 -0
- package/src/TxPubSub.ts +36 -35
- package/src/TxQueue.ts +77 -114
- package/src/TxRef.ts +4 -0
- package/src/TxSemaphore.ts +66 -27
- package/src/Types.ts +202 -75
- package/src/UndefinedOr.ts +31 -29
- package/src/Unify.ts +28 -0
- package/src/Utils.ts +29 -35
- package/src/index.ts +18 -7
- package/src/testing/TestClock.ts +16 -16
- package/src/testing/TestConsole.ts +2 -0
- package/src/testing/TestSchema.ts +43 -55
- package/src/unstable/ai/AiError.ts +62 -11
- package/src/unstable/ai/AnthropicStructuredOutput.ts +4 -4
- package/src/unstable/ai/Chat.ts +29 -1
- package/src/unstable/ai/IdGenerator.ts +10 -0
- package/src/unstable/ai/LanguageModel.ts +32 -46
- package/src/unstable/ai/McpSchema.ts +84 -32
- package/src/unstable/ai/McpServer.ts +8 -0
- package/src/unstable/ai/Model.ts +9 -5
- package/src/unstable/ai/OpenAiStructuredOutput.ts +3 -2
- package/src/unstable/ai/Prompt.ts +62 -35
- package/src/unstable/ai/Response.ts +40 -21
- package/src/unstable/ai/ResponseIdTracker.ts +8 -0
- package/src/unstable/ai/Telemetry.ts +30 -5
- package/src/unstable/ai/Tokenizer.ts +6 -0
- package/src/unstable/ai/Tool.ts +68 -0
- package/src/unstable/ai/Toolkit.ts +12 -0
- package/src/unstable/cli/Argument.ts +14 -4
- package/src/unstable/cli/CliError.ts +6 -0
- package/src/unstable/cli/Command.ts +128 -12
- package/src/unstable/cli/Flag.ts +31 -14
- package/src/unstable/cli/Param.ts +96 -9
- package/src/unstable/cli/Primitive.ts +10 -0
- package/src/unstable/cli/Prompt.ts +47 -40
- package/src/unstable/cli/internal/command.ts +11 -2
- package/src/unstable/cli/internal/completions/descriptor.ts +3 -0
- package/src/unstable/cli/internal/parser.ts +8 -1
- package/src/unstable/cluster/ClusterCron.ts +10 -1
- package/src/unstable/cluster/ClusterSchema.ts +8 -0
- package/src/unstable/cluster/ClusterWorkflowEngine.ts +4 -0
- package/src/unstable/cluster/DeliverAt.ts +3 -4
- package/src/unstable/cluster/Entity.ts +24 -0
- package/src/unstable/cluster/EntityProxy.ts +10 -4
- package/src/unstable/cluster/EntityProxyServer.ts +6 -0
- package/src/unstable/cluster/EntityResource.ts +10 -0
- package/src/unstable/cluster/Envelope.ts +16 -0
- package/src/unstable/cluster/HttpRunner.ts +16 -0
- package/src/unstable/cluster/K8sHttpClient.ts +8 -0
- package/src/unstable/cluster/Message.ts +24 -0
- package/src/unstable/cluster/MessageStorage.ts +44 -10
- package/src/unstable/cluster/Reply.ts +6 -6
- package/src/unstable/cluster/Runner.ts +2 -0
- package/src/unstable/cluster/RunnerHealth.ts +13 -2
- package/src/unstable/cluster/RunnerServer.ts +8 -8
- package/src/unstable/cluster/RunnerStorage.ts +2 -0
- package/src/unstable/cluster/ShardId.ts +4 -0
- package/src/unstable/cluster/Snowflake.ts +2 -0
- package/src/unstable/cluster/TestRunner.ts +3 -2
- package/src/unstable/devtools/DevToolsSchema.ts +34 -2
- package/src/unstable/devtools/DevToolsServer.ts +4 -0
- package/src/unstable/encoding/Msgpack.ts +24 -0
- package/src/unstable/encoding/Ndjson.ts +46 -2
- package/src/unstable/encoding/Sse.ts +24 -17
- package/src/unstable/eventlog/Event.ts +16 -0
- package/src/unstable/eventlog/EventGroup.ts +4 -0
- package/src/unstable/eventlog/EventJournal.ts +20 -0
- package/src/unstable/eventlog/EventLog.ts +22 -0
- package/src/unstable/eventlog/EventLogMessage.ts +10 -0
- package/src/unstable/eventlog/EventLogRemote.ts +4 -0
- package/src/unstable/eventlog/EventLogServer.ts +4 -0
- package/src/unstable/eventlog/EventLogServerEncrypted.ts +6 -0
- package/src/unstable/eventlog/EventLogServerUnencrypted.ts +8 -0
- package/src/unstable/eventlog/EventLogSessionAuth.ts +11 -1
- package/src/unstable/eventlog/SqlEventJournal.ts +2 -0
- package/src/unstable/eventlog/SqlEventLogServerEncrypted.ts +2 -0
- package/src/unstable/eventlog/SqlEventLogServerUnencrypted.ts +2 -0
- package/src/unstable/http/Cookies.ts +34 -0
- package/src/unstable/http/Etag.ts +4 -0
- package/src/unstable/http/FetchHttpClient.ts +4 -0
- package/src/unstable/http/Headers.ts +88 -0
- package/src/unstable/http/HttpBody.ts +32 -0
- package/src/unstable/http/HttpClient.ts +44 -0
- package/src/unstable/http/HttpClientRequest.ts +2 -0
- package/src/unstable/http/HttpClientResponse.ts +6 -0
- package/src/unstable/http/HttpEffect.ts +4 -0
- package/src/unstable/http/HttpPlatform.ts +2 -0
- package/src/unstable/http/HttpRouter.ts +54 -16
- package/src/unstable/http/HttpServer.ts +35 -1
- package/src/unstable/http/HttpServerError.ts +17 -3
- package/src/unstable/http/HttpServerRequest.ts +30 -0
- package/src/unstable/http/HttpServerRespondable.ts +8 -0
- package/src/unstable/http/HttpServerResponse.ts +96 -0
- package/src/unstable/http/HttpTraceContext.ts +12 -0
- package/src/unstable/http/Multipart.ts +49 -2
- package/src/unstable/http/Template.ts +14 -0
- package/src/unstable/http/UrlParams.ts +64 -0
- package/src/unstable/httpapi/HttpApi.ts +10 -4
- package/src/unstable/httpapi/HttpApiBuilder.ts +9 -4
- package/src/unstable/httpapi/HttpApiEndpoint.ts +2 -0
- package/src/unstable/httpapi/HttpApiGroup.ts +23 -14
- package/src/unstable/httpapi/HttpApiMiddleware.ts +14 -0
- package/src/unstable/httpapi/HttpApiScalar.ts +38 -15
- package/src/unstable/httpapi/HttpApiSchema.ts +14 -3
- package/src/unstable/httpapi/HttpApiSecurity.ts +17 -11
- package/src/unstable/httpapi/HttpApiSwagger.ts +2 -4
- package/src/unstable/httpapi/HttpApiTest.ts +2 -0
- package/src/unstable/httpapi/OpenApi.ts +2 -0
- package/src/unstable/observability/Otlp.ts +2 -0
- package/src/unstable/observability/OtlpExporter.ts +2 -0
- package/src/unstable/observability/OtlpLogger.ts +4 -0
- package/src/unstable/observability/OtlpMetrics.ts +8 -9
- package/src/unstable/observability/OtlpResource.ts +8 -0
- package/src/unstable/observability/OtlpTracer.ts +3 -2
- package/src/unstable/observability/PrometheusMetrics.ts +6 -2
- package/src/unstable/persistence/KeyValueStore.ts +10 -0
- package/src/unstable/persistence/Persistable.ts +2 -0
- package/src/unstable/persistence/PersistedCache.ts +2 -0
- package/src/unstable/persistence/PersistedQueue.ts +21 -6
- package/src/unstable/persistence/Persistence.ts +14 -0
- package/src/unstable/persistence/RateLimiter.ts +6 -3
- package/src/unstable/persistence/Redis.ts +6 -0
- package/src/unstable/process/ChildProcess.ts +70 -19
- package/src/unstable/process/ChildProcessSpawner.ts +20 -4
- package/src/unstable/reactivity/Atom.ts +119 -14
- package/src/unstable/reactivity/AtomHttpApi.ts +4 -0
- package/src/unstable/reactivity/AtomRef.ts +8 -0
- package/src/unstable/reactivity/AtomRegistry.ts +34 -0
- package/src/unstable/reactivity/AtomRpc.ts +8 -6
- package/src/unstable/reactivity/Hydration.ts +6 -0
- package/src/unstable/reactivity/Reactivity.ts +27 -3
- package/src/unstable/rpc/Rpc.ts +38 -2
- package/src/unstable/rpc/RpcSerialization.ts +6 -0
- package/src/unstable/rpc/RpcServer.ts +5 -3
- package/src/unstable/schema/Model.ts +43 -12
- package/src/unstable/sql/SqlClient.ts +1 -1
- package/src/unstable/sql/SqlResolver.ts +6 -4
- package/src/unstable/sql/Statement.ts +8 -4
- package/src/unstable/workflow/DurableClock.ts +1 -1
- package/src/unstable/workflow/DurableDeferred.ts +3 -0
- package/src/unstable/workflow/Workflow.ts +42 -34
package/dist/Schema.js
CHANGED
|
@@ -131,6 +131,8 @@ const TypeId = InternalSchema.TypeId;
|
|
|
131
131
|
* `Array<A>`, `Option<A>`, etc.) by accepting a list of type-parameter schemas
|
|
132
132
|
* and a decoder factory.
|
|
133
133
|
*
|
|
134
|
+
* **Details**
|
|
135
|
+
*
|
|
134
136
|
* The outer call `declareConstructor<T, E, Iso>()` fixes the decoded type `T`,
|
|
135
137
|
* the encoded type `E`, and the optional iso type. The inner call receives:
|
|
136
138
|
* - `typeParameters` — the concrete schemas for each type variable
|
|
@@ -183,6 +185,8 @@ export function declareConstructor() {
|
|
|
183
185
|
* function. The schema accepts any unknown value and succeeds when `is` returns
|
|
184
186
|
* `true`, failing with an `InvalidType` issue otherwise.
|
|
185
187
|
*
|
|
188
|
+
* **Details**
|
|
189
|
+
*
|
|
186
190
|
* Use this when the type has no type parameters. For parametric types such as
|
|
187
191
|
* `Option<A>` or `Array<A>`, use {@link declareConstructor} instead.
|
|
188
192
|
*
|
|
@@ -214,6 +218,8 @@ export function declare(is, annotations) {
|
|
|
214
218
|
* Widens a schema's type to the fully-parameterized {@link Bottom} interface,
|
|
215
219
|
* making all 14 type parameters visible to TypeScript.
|
|
216
220
|
*
|
|
221
|
+
* **Details**
|
|
222
|
+
*
|
|
217
223
|
* Normally, concrete schema interfaces (e.g. `Schema<string>`) hide most type
|
|
218
224
|
* parameters. `revealBottom` is useful when writing generic utilities that need
|
|
219
225
|
* to inspect or propagate the complete set of type parameters.
|
|
@@ -244,6 +250,8 @@ export function revealBottom(bottom) {
|
|
|
244
250
|
* Adds metadata annotations to a schema without changing its runtime behavior.
|
|
245
251
|
* This is the pipeable (curried) counterpart of the `.annotate` method.
|
|
246
252
|
*
|
|
253
|
+
* **Details**
|
|
254
|
+
*
|
|
247
255
|
* Annotations provide extra context used by documentation generators, JSON
|
|
248
256
|
* Schema converters, error formatters, and other tooling. Common keys include
|
|
249
257
|
* `title`, `description`, `examples`, `message`, and `identifier`.
|
|
@@ -274,6 +282,8 @@ export function annotate(annotations) {
|
|
|
274
282
|
* changing its runtime behavior. This is the encoded-side counterpart of
|
|
275
283
|
* `annotate`, which targets the decoded (Type) side.
|
|
276
284
|
*
|
|
285
|
+
* **Details**
|
|
286
|
+
*
|
|
277
287
|
* Internally the schema is flipped so that `Encoded` becomes `Type`,
|
|
278
288
|
* annotated, and then flipped back.
|
|
279
289
|
*
|
|
@@ -304,6 +314,8 @@ export function annotateEncoded(annotations) {
|
|
|
304
314
|
* Adds key-level annotations to a schema field. This is the pipeable
|
|
305
315
|
* (curried) counterpart of the `.annotateKey` method.
|
|
306
316
|
*
|
|
317
|
+
* **Details**
|
|
318
|
+
*
|
|
307
319
|
* Key annotations apply to a field's position inside a `Struct` or `Tuple`
|
|
308
320
|
* rather than to the field's value type. They can carry a
|
|
309
321
|
* `messageMissingKey` to customise the error shown when the field is absent,
|
|
@@ -337,6 +349,8 @@ export function annotateKey(annotations) {
|
|
|
337
349
|
* Identity function that widens a value to the full {@link Codec} interface,
|
|
338
350
|
* prompting TypeScript to infer all four type parameters (`T`, `E`, `RD`, `RE`).
|
|
339
351
|
*
|
|
352
|
+
* **Details**
|
|
353
|
+
*
|
|
340
354
|
* When a schema is stored in a variable typed as `Schema<T>` or `Top`, the
|
|
341
355
|
* encoded type and service requirements are erased. Passing the value through
|
|
342
356
|
* `revealCodec` recovers those parameters without any runtime cost.
|
|
@@ -364,6 +378,8 @@ export {
|
|
|
364
378
|
* Error thrown (or returned as the error channel value) when schema decoding
|
|
365
379
|
* or encoding fails.
|
|
366
380
|
*
|
|
381
|
+
* **Details**
|
|
382
|
+
*
|
|
367
383
|
* The `issue` field contains a structured {@link Issue.Issue} tree describing
|
|
368
384
|
* every validation failure, including the path to the problematic value,
|
|
369
385
|
* expected types, and actual values received. `message` renders the issue tree
|
|
@@ -386,6 +402,7 @@ export {
|
|
|
386
402
|
* }
|
|
387
403
|
* ```
|
|
388
404
|
*
|
|
405
|
+
* @category errors
|
|
389
406
|
* @since 4.0.0
|
|
390
407
|
*/
|
|
391
408
|
SchemaError };
|
|
@@ -423,6 +440,8 @@ function makeStandardResult(exit) {
|
|
|
423
440
|
* Returns a "Standard Schema" object conforming to the [Standard Schema
|
|
424
441
|
* v1](https://standardschema.dev/) specification.
|
|
425
442
|
*
|
|
443
|
+
* **Details**
|
|
444
|
+
*
|
|
426
445
|
* This function creates a schema whose `validate` method attempts to decode and
|
|
427
446
|
* validate the provided input synchronously. If the underlying `Schema`
|
|
428
447
|
* includes any asynchronous components (e.g., asynchronous message resolutions
|
|
@@ -546,6 +565,8 @@ function toBaseStandardJSONSchemaV1(self, target) {
|
|
|
546
565
|
/**
|
|
547
566
|
* Experimental support for converting a schema to a Standard JSON Schema V1.
|
|
548
567
|
*
|
|
568
|
+
* **Details**
|
|
569
|
+
*
|
|
549
570
|
* https://github.com/standard-schema/standard-schema/pull/134
|
|
550
571
|
*
|
|
551
572
|
* @category Standard Schema
|
|
@@ -581,6 +602,8 @@ export function toStandardJSONSchemaV1(self) {
|
|
|
581
602
|
* Creates a type guard function that checks if a value conforms to a given
|
|
582
603
|
* schema.
|
|
583
604
|
*
|
|
605
|
+
* **Details**
|
|
606
|
+
*
|
|
584
607
|
* This function returns a predicate that performs a type-safe check, narrowing
|
|
585
608
|
* the type of the input value if the check passes. It's particularly useful for
|
|
586
609
|
* runtime type validation and TypeScript type narrowing.
|
|
@@ -611,6 +634,8 @@ export const is = Parser.is;
|
|
|
611
634
|
* Creates an assertion function that throws an error if the input doesn't match
|
|
612
635
|
* the schema.
|
|
613
636
|
*
|
|
637
|
+
* **Details**
|
|
638
|
+
*
|
|
614
639
|
* This function is useful for runtime type checking with TypeScript's `asserts`
|
|
615
640
|
* type guard. It narrows the type of the input if the assertion succeeds, or
|
|
616
641
|
* throws an error if it fails.
|
|
@@ -763,6 +788,7 @@ export const decodeUnknownPromise = Parser.decodeUnknownPromise;
|
|
|
763
788
|
* schema issue. For `unknown` input use `decodeUnknownPromise`.
|
|
764
789
|
*
|
|
765
790
|
* **Details**
|
|
791
|
+
*
|
|
766
792
|
* Options may be provided either when creating the decoder or when applying it;
|
|
767
793
|
* application options override creation options.
|
|
768
794
|
*
|
|
@@ -777,6 +803,7 @@ export const decodePromise = Parser.decodePromise;
|
|
|
777
803
|
* mismatch as an exception. For typed input use `decodeSync`.
|
|
778
804
|
*
|
|
779
805
|
* **Details**
|
|
806
|
+
*
|
|
780
807
|
* Only service-free schemas can be decoded synchronously. For non-throwing
|
|
781
808
|
* alternatives see `decodeUnknownOption`, `decodeUnknownExit`, or
|
|
782
809
|
* `decodeUnknownEffect`. Options may be provided either when creating the
|
|
@@ -809,6 +836,7 @@ export const decodeUnknownSync = Parser.decodeUnknownSync;
|
|
|
809
836
|
* contains the schema issue. For `unknown` input use `decodeUnknownSync`.
|
|
810
837
|
*
|
|
811
838
|
* **Details**
|
|
839
|
+
*
|
|
812
840
|
* Only service-free schemas can be decoded synchronously. Options may be
|
|
813
841
|
* provided either when creating the decoder or when applying it; application
|
|
814
842
|
* options override creation options.
|
|
@@ -985,6 +1013,8 @@ export const encodeSync = Parser.encodeSync;
|
|
|
985
1013
|
/**
|
|
986
1014
|
* Creates a schema from an AST (Abstract Syntax Tree) node.
|
|
987
1015
|
*
|
|
1016
|
+
* **Details**
|
|
1017
|
+
*
|
|
988
1018
|
* This is the fundamental constructor for all schemas in the Effect Schema
|
|
989
1019
|
* library. It takes an AST node and wraps it in a fully-typed schema that
|
|
990
1020
|
* preserves all type information and provides the complete schema API.
|
|
@@ -1070,7 +1100,10 @@ export const requiredKey = /*#__PURE__*/Struct_.lambda(self => self.schema);
|
|
|
1070
1100
|
* Marks a struct field as optional, allowing the key to be absent or
|
|
1071
1101
|
* `undefined`.
|
|
1072
1102
|
*
|
|
1073
|
-
*
|
|
1103
|
+
* **Details**
|
|
1104
|
+
*
|
|
1105
|
+
* The resulting property may be absent or explicitly set to `undefined`.
|
|
1106
|
+
* Equivalent to `optionalKey(UndefinedOr(S))`.
|
|
1074
1107
|
*
|
|
1075
1108
|
* Use {@link optionalKey} instead if you want exact optional semantics (absent
|
|
1076
1109
|
* only, not `undefined`).
|
|
@@ -1303,7 +1336,9 @@ export const String = /*#__PURE__*/make(AST.string);
|
|
|
1303
1336
|
/**
|
|
1304
1337
|
* Schema for `number` values, including `NaN`, `Infinity`, and `-Infinity`.
|
|
1305
1338
|
*
|
|
1306
|
-
* **
|
|
1339
|
+
* **Details**
|
|
1340
|
+
*
|
|
1341
|
+
* Default JSON serializer:
|
|
1307
1342
|
*
|
|
1308
1343
|
* - Finite numbers are serialized as numbers.
|
|
1309
1344
|
* - Non-finite values are serialized as strings (`"NaN"`, `"Infinity"`, `"-Infinity"`).
|
|
@@ -1381,6 +1416,8 @@ function makeStruct(ast, fields) {
|
|
|
1381
1416
|
/**
|
|
1382
1417
|
* Defines a struct schema from a map of field schemas.
|
|
1383
1418
|
*
|
|
1419
|
+
* **Details**
|
|
1420
|
+
*
|
|
1384
1421
|
* Each field value is a schema. Use {@link optionalKey} or {@link optional} to
|
|
1385
1422
|
* mark fields as optional, and {@link mutableKey} to mark them as mutable.
|
|
1386
1423
|
*
|
|
@@ -1437,6 +1474,8 @@ export function fieldsAssign(fields) {
|
|
|
1437
1474
|
/**
|
|
1438
1475
|
* Renames struct keys in the encoded form without changing the decoded type.
|
|
1439
1476
|
*
|
|
1477
|
+
* **Details**
|
|
1478
|
+
*
|
|
1440
1479
|
* Takes a partial mapping `{ decodedKey: encodedKey }` and produces a
|
|
1441
1480
|
* transformation schema that decodes from the renamed keys and encodes back to
|
|
1442
1481
|
* the renamed keys. Keys not present in the mapping are left unchanged.
|
|
@@ -1480,6 +1519,8 @@ export function encodeKeys(mapping) {
|
|
|
1480
1519
|
/**
|
|
1481
1520
|
* Adds derived fields to a struct schema during decoding.
|
|
1482
1521
|
*
|
|
1522
|
+
* **Details**
|
|
1523
|
+
*
|
|
1483
1524
|
* Each new field is derived from the decoded struct value via a function that
|
|
1484
1525
|
* returns `Option`. On encoding the derived fields are stripped. This allows
|
|
1485
1526
|
* computed or enriched fields to live in the decoded type without appearing in
|
|
@@ -1630,6 +1671,7 @@ export function Tuple(elements) {
|
|
|
1630
1671
|
* Extends a fixed-length tuple schema with a variadic rest segment.
|
|
1631
1672
|
*
|
|
1632
1673
|
* **Details**
|
|
1674
|
+
*
|
|
1633
1675
|
* The resulting tuple starts with the fixed elements from `schema`. The first
|
|
1634
1676
|
* schema in `rest` is the repeatable element schema, and any additional schemas
|
|
1635
1677
|
* in `rest` are required trailing tuple elements after the variadic segment. For
|
|
@@ -1714,6 +1756,7 @@ export const NonEmptyArray = /*#__PURE__*/Struct_.lambda(schema => make(new AST.
|
|
|
1714
1756
|
* decoded by `Schema.Array(schema)`, then returns an array.
|
|
1715
1757
|
*
|
|
1716
1758
|
* **Details**
|
|
1759
|
+
*
|
|
1717
1760
|
* The single-value branch is tried before the array branch. If `schema` itself
|
|
1718
1761
|
* accepts arrays, an array input can be treated as one value and wrapped in a
|
|
1719
1762
|
* one-element array.
|
|
@@ -1733,6 +1776,8 @@ export function ArrayEnsure(schema) {
|
|
|
1733
1776
|
/**
|
|
1734
1777
|
* Returns a new array schema that ensures all elements are unique.
|
|
1735
1778
|
*
|
|
1779
|
+
* **Details**
|
|
1780
|
+
*
|
|
1736
1781
|
* The equivalence used to determine uniqueness is the one provided by
|
|
1737
1782
|
* `Schema.toEquivalence(item)`.
|
|
1738
1783
|
*
|
|
@@ -1777,6 +1822,8 @@ function makeUnion(ast, members) {
|
|
|
1777
1822
|
* Creates a union schema from an array of member schemas. Members are tested in
|
|
1778
1823
|
* order; the first match is returned.
|
|
1779
1824
|
*
|
|
1825
|
+
* **Details**
|
|
1826
|
+
*
|
|
1780
1827
|
* Optionally, specify `mode`:
|
|
1781
1828
|
* - `"anyOf"` (default) — matches if any member matches.
|
|
1782
1829
|
* - `"oneOf"` — matches if exactly one member matches.
|
|
@@ -1846,6 +1893,7 @@ export const NullOr = /*#__PURE__*/Struct_.lambda(self => Union([self, Null]));
|
|
|
1846
1893
|
export const UndefinedOr = /*#__PURE__*/Struct_.lambda(self => Union([self, Undefined]));
|
|
1847
1894
|
/**
|
|
1848
1895
|
* Creates a union schema of `S | null | undefined`.
|
|
1896
|
+
*
|
|
1849
1897
|
* @category constructors
|
|
1850
1898
|
* @since 3.10.0
|
|
1851
1899
|
*/
|
|
@@ -1901,6 +1949,8 @@ export function check(...checks) {
|
|
|
1901
1949
|
* Narrows the TypeScript type of a schema's output via a type guard predicate,
|
|
1902
1950
|
* attaching the guard as a runtime filter check.
|
|
1903
1951
|
*
|
|
1952
|
+
* **Details**
|
|
1953
|
+
*
|
|
1904
1954
|
* The `annotations` parameter annotates the filter created by the refinement.
|
|
1905
1955
|
* With the default formatter, failed refinements use `message` first,
|
|
1906
1956
|
* `expected` second, and `<filter>` when neither is provided. `identifier`
|
|
@@ -1943,6 +1993,8 @@ export function fromBrand(identifier, ctor) {
|
|
|
1943
1993
|
/**
|
|
1944
1994
|
* Intercepts the decoding pipeline of a schema.
|
|
1945
1995
|
*
|
|
1996
|
+
* **Details**
|
|
1997
|
+
*
|
|
1946
1998
|
* The provided function receives the current decoding `Effect` and `ParseOptions`,
|
|
1947
1999
|
* and returns a new `Effect` — potentially adding service requirements (`RD`),
|
|
1948
2000
|
* recovering from errors, or augmenting the result.
|
|
@@ -1971,6 +2023,8 @@ export function middlewareDecoding(decode) {
|
|
|
1971
2023
|
/**
|
|
1972
2024
|
* Intercepts the encoding pipeline of a schema.
|
|
1973
2025
|
*
|
|
2026
|
+
* **Details**
|
|
2027
|
+
*
|
|
1974
2028
|
* The provided function receives the current encoding `Effect` and `ParseOptions`,
|
|
1975
2029
|
* and returns a new `Effect` — potentially adding service requirements (`RE`),
|
|
1976
2030
|
* recovering from errors, or augmenting the result.
|
|
@@ -1999,6 +2053,8 @@ export function middlewareEncoding(encode) {
|
|
|
1999
2053
|
/**
|
|
2000
2054
|
* Recovers from a decoding error by providing a fallback value.
|
|
2001
2055
|
*
|
|
2056
|
+
* **Details**
|
|
2057
|
+
*
|
|
2002
2058
|
* The handler receives the `Issue` and returns an `Effect` that either
|
|
2003
2059
|
* succeeds with a fallback value or re-fails with a (possibly different) issue.
|
|
2004
2060
|
*
|
|
@@ -2031,6 +2087,8 @@ export function catchDecodingWithContext(f) {
|
|
|
2031
2087
|
/**
|
|
2032
2088
|
* Recovers from an encoding error by providing a fallback value.
|
|
2033
2089
|
*
|
|
2090
|
+
* **Details**
|
|
2091
|
+
*
|
|
2034
2092
|
* The handler receives the `Issue` and returns an `Effect` that either
|
|
2035
2093
|
* succeeds with a fallback value or re-fails with a (possibly different) issue.
|
|
2036
2094
|
*
|
|
@@ -2061,18 +2119,20 @@ export function decodeTo(to, transformation) {
|
|
|
2061
2119
|
/**
|
|
2062
2120
|
* Applies a transformation to a schema, creating a new schema with the same type but transformed encoding/decoding.
|
|
2063
2121
|
*
|
|
2122
|
+
* **Details**
|
|
2123
|
+
*
|
|
2064
2124
|
* This is a curried function: call it with a transformation object, then call the returned function with a schema.
|
|
2065
2125
|
* The resulting schema has `Type = S["Type"]` and `Encoded = S["Encoded"]`, with the transformation applied during
|
|
2066
2126
|
* encoding and decoding operations.
|
|
2067
2127
|
*
|
|
2068
|
-
*
|
|
2128
|
+
* Key guarantees:
|
|
2069
2129
|
* - Resulting schema has `Type = S["Type"]` and `Encoded = S["Encoded"]`
|
|
2070
2130
|
* - Uses `toType(self)` as the target schema internally (creates a schema where both Type and Encoded are `S["Type"]`)
|
|
2071
2131
|
* - Combines decoding/encoding services from the source schema and transformation
|
|
2072
2132
|
* - Transformation `decode` maps `S["Type"]` → `S["Type"]` (used during encoding)
|
|
2073
2133
|
* - Transformation `encode` maps `S["Type"]` → `S["Type"]` (used during decoding)
|
|
2074
2134
|
*
|
|
2075
|
-
*
|
|
2135
|
+
* Common mistakes:
|
|
2076
2136
|
* - **Currying**: This is curried - must use pipe: `schema.pipe(Schema.decode(transformation))`
|
|
2077
2137
|
* - **Transformation direction**: `decode` and `encode` both operate on `S["Type"]` (same type, different values)
|
|
2078
2138
|
* - **Service dependencies**: Resulting schema requires services from the source schema and transformation; use `Schema.provideService` if needed
|
|
@@ -2110,6 +2170,8 @@ export function encodeTo(to, transformation) {
|
|
|
2110
2170
|
* Applies a transformation to a schema's encoded type, creating a new schema where encoding/decoding
|
|
2111
2171
|
* operate on `S["Encoded"]` rather than `S["Type"]`.
|
|
2112
2172
|
*
|
|
2173
|
+
* **Details**
|
|
2174
|
+
*
|
|
2113
2175
|
* The `decode` getter maps `S["Encoded"]` → `S["Encoded"]` (applied during decoding),
|
|
2114
2176
|
* and the `encode` getter maps `S["Encoded"]` → `S["Encoded"]` (applied during encoding).
|
|
2115
2177
|
*
|
|
@@ -2137,6 +2199,8 @@ export function encode(transformation) {
|
|
|
2137
2199
|
/**
|
|
2138
2200
|
* Attaches a constructor default value to a schema field.
|
|
2139
2201
|
*
|
|
2202
|
+
* **Details**
|
|
2203
|
+
*
|
|
2140
2204
|
* Constructor defaults are applied only during `make*`, not during decoding or
|
|
2141
2205
|
* encoding.
|
|
2142
2206
|
*
|
|
@@ -2171,11 +2235,13 @@ defaultValue) {
|
|
|
2171
2235
|
* Makes a struct key optional on the `Encoded` side and provides a default
|
|
2172
2236
|
* `Encoded` value when the key is missing during decoding.
|
|
2173
2237
|
*
|
|
2238
|
+
* **Details**
|
|
2239
|
+
*
|
|
2174
2240
|
* The key uses `optionalKey` on the encoded side, so it may be absent from the
|
|
2175
2241
|
* input object but **not** `undefined`. The default value is specified in terms
|
|
2176
2242
|
* of the `Encoded` type (before any decoding transformations).
|
|
2177
2243
|
*
|
|
2178
|
-
*
|
|
2244
|
+
* Options:
|
|
2179
2245
|
*
|
|
2180
2246
|
* - `encodingStrategy`:
|
|
2181
2247
|
* - `"passthrough"` (default): include the value in the encoded output.
|
|
@@ -2213,11 +2279,13 @@ export function withDecodingDefaultKey(defaultValue, options) {
|
|
|
2213
2279
|
* key may be absent but **not** `undefined`) and provides a default `Type`
|
|
2214
2280
|
* value when the key is missing during decoding.
|
|
2215
2281
|
*
|
|
2282
|
+
* **Details**
|
|
2283
|
+
*
|
|
2216
2284
|
* Unlike {@link withDecodingDefaultKey}, the default value is specified in
|
|
2217
2285
|
* terms of the `Type` (decoded) representation, so it does not need to go
|
|
2218
2286
|
* through the decoding transformation.
|
|
2219
2287
|
*
|
|
2220
|
-
*
|
|
2288
|
+
* Options:
|
|
2221
2289
|
*
|
|
2222
2290
|
* - `encodingStrategy`:
|
|
2223
2291
|
* - `"passthrough"` (default): include the value in the encoded output.
|
|
@@ -2238,10 +2306,12 @@ export function withDecodingDefaultTypeKey(defaultValue, options) {
|
|
|
2238
2306
|
* and provides a default `Encoded` value when the field is missing or
|
|
2239
2307
|
* `undefined` during decoding.
|
|
2240
2308
|
*
|
|
2309
|
+
* **Details**
|
|
2310
|
+
*
|
|
2241
2311
|
* The default value is specified in terms of the `Encoded` type (before any
|
|
2242
2312
|
* decoding transformations).
|
|
2243
2313
|
*
|
|
2244
|
-
*
|
|
2314
|
+
* Options:
|
|
2245
2315
|
*
|
|
2246
2316
|
* - `encodingStrategy`:
|
|
2247
2317
|
* - `"passthrough"` (default): include the value in the encoded output.
|
|
@@ -2279,11 +2349,13 @@ export function withDecodingDefault(defaultValue, options) {
|
|
|
2279
2349
|
* and provides a default `Type` value when the field is missing or
|
|
2280
2350
|
* `undefined` during decoding.
|
|
2281
2351
|
*
|
|
2352
|
+
* **Details**
|
|
2353
|
+
*
|
|
2282
2354
|
* Unlike {@link withDecodingDefault}, the default value is specified in terms
|
|
2283
2355
|
* of the `Type` (decoded) representation, so it does not need to go through
|
|
2284
2356
|
* the decoding transformation.
|
|
2285
2357
|
*
|
|
2286
|
-
*
|
|
2358
|
+
* Options:
|
|
2287
2359
|
*
|
|
2288
2360
|
* - `encodingStrategy`:
|
|
2289
2361
|
* - `"passthrough"` (default): include the value in the encoded output.
|
|
@@ -2358,6 +2430,8 @@ export function tagDefaultOmit(literal) {
|
|
|
2358
2430
|
* to identify the specific variant of the object, which is especially useful
|
|
2359
2431
|
* when working with union types.
|
|
2360
2432
|
*
|
|
2433
|
+
* **Details**
|
|
2434
|
+
*
|
|
2361
2435
|
* When using the `make` method, the `_tag` field is optional and will be
|
|
2362
2436
|
* added automatically. However, when decoding or encoding, the `_tag` field
|
|
2363
2437
|
* must be present in the input.
|
|
@@ -2582,6 +2656,7 @@ export function link() {
|
|
|
2582
2656
|
* Creates a custom validation filter from a predicate function.
|
|
2583
2657
|
*
|
|
2584
2658
|
* **Details**
|
|
2659
|
+
*
|
|
2585
2660
|
* The predicate receives the decoded input value, the schema AST, and parse
|
|
2586
2661
|
* options, and returns a `FilterOutput`. Non-success outputs are normalized into
|
|
2587
2662
|
* schema issues. The `annotations` parameter annotates the filter itself; with
|
|
@@ -2650,12 +2725,14 @@ const TRIMMED_PATTERN = "^\\S[\\s\\S]*\\S$|^\\S$|^$";
|
|
|
2650
2725
|
/**
|
|
2651
2726
|
* Validates that a string has no leading or trailing whitespace.
|
|
2652
2727
|
*
|
|
2653
|
-
* **
|
|
2728
|
+
* **Details**
|
|
2729
|
+
*
|
|
2730
|
+
* JSON Schema:
|
|
2654
2731
|
*
|
|
2655
2732
|
* This check corresponds to a `pattern` constraint in JSON Schema that
|
|
2656
2733
|
* matches strings without leading or trailing whitespace.
|
|
2657
2734
|
*
|
|
2658
|
-
*
|
|
2735
|
+
* Arbitrary:
|
|
2659
2736
|
*
|
|
2660
2737
|
* When generating test data with fast-check, this applies a `patterns`
|
|
2661
2738
|
* constraint to ensure generated strings match the trimmed pattern.
|
|
@@ -2681,11 +2758,13 @@ export function isTrimmed(annotations) {
|
|
|
2681
2758
|
/**
|
|
2682
2759
|
* Validates that a string matches the specified regular expression pattern.
|
|
2683
2760
|
*
|
|
2684
|
-
* **
|
|
2761
|
+
* **Details**
|
|
2762
|
+
*
|
|
2763
|
+
* JSON Schema:
|
|
2685
2764
|
*
|
|
2686
2765
|
* This check corresponds to the `pattern` constraint in JSON Schema.
|
|
2687
2766
|
*
|
|
2688
|
-
*
|
|
2767
|
+
* Arbitrary:
|
|
2689
2768
|
*
|
|
2690
2769
|
* When generating test data with fast-check, this applies a `patterns`
|
|
2691
2770
|
* constraint to ensure generated strings match the specified RegExp pattern.
|
|
@@ -2697,12 +2776,14 @@ export const isPattern = AST.isPattern;
|
|
|
2697
2776
|
/**
|
|
2698
2777
|
* Validates that a string represents a finite number.
|
|
2699
2778
|
*
|
|
2700
|
-
* **
|
|
2779
|
+
* **Details**
|
|
2780
|
+
*
|
|
2781
|
+
* JSON Schema:
|
|
2701
2782
|
*
|
|
2702
2783
|
* This check corresponds to a `pattern` constraint in JSON Schema that matches
|
|
2703
2784
|
* strings representing finite numbers.
|
|
2704
2785
|
*
|
|
2705
|
-
*
|
|
2786
|
+
* Arbitrary:
|
|
2706
2787
|
*
|
|
2707
2788
|
* When generating test data with fast-check, this applies a `patterns`
|
|
2708
2789
|
* constraint to ensure generated strings match the number string pattern.
|
|
@@ -2716,11 +2797,12 @@ export const isStringFinite = AST.isStringFinite;
|
|
|
2716
2797
|
* BigInt string encoding.
|
|
2717
2798
|
*
|
|
2718
2799
|
* **Details**
|
|
2800
|
+
*
|
|
2719
2801
|
* The check uses the pattern `^-?\d+$`. It does not accept leading `+`, decimal
|
|
2720
2802
|
* points, exponent notation, separators, or non-decimal inputs such as
|
|
2721
2803
|
* hexadecimal strings.
|
|
2722
2804
|
*
|
|
2723
|
-
*
|
|
2805
|
+
* JSON Schema:
|
|
2724
2806
|
* This check corresponds to a `pattern` constraint with the same signed
|
|
2725
2807
|
* base-10 integer pattern.
|
|
2726
2808
|
*
|
|
@@ -2733,6 +2815,7 @@ export const isStringBigInt = AST.isStringBigInt;
|
|
|
2733
2815
|
* symbol string encoding.
|
|
2734
2816
|
*
|
|
2735
2817
|
* **Details**
|
|
2818
|
+
*
|
|
2736
2819
|
* The check uses the pattern `^Symbol\((.*)\)$`. It is not a general test for
|
|
2737
2820
|
* whether a string can be passed to JavaScript's `Symbol()` function.
|
|
2738
2821
|
*
|
|
@@ -2756,12 +2839,14 @@ const getUUIDRegExp = version => {
|
|
|
2756
2839
|
* Optionally specify a version (1-8) to validate against a specific UUID version.
|
|
2757
2840
|
* If no version is specified (`undefined`), all versions are supported.
|
|
2758
2841
|
*
|
|
2759
|
-
* **
|
|
2842
|
+
* **Details**
|
|
2843
|
+
*
|
|
2844
|
+
* JSON Schema:
|
|
2760
2845
|
*
|
|
2761
2846
|
* This check corresponds to a `pattern` constraint in JSON Schema that matches
|
|
2762
2847
|
* UUID format, and includes a `format: "uuid"` annotation.
|
|
2763
2848
|
*
|
|
2764
|
-
*
|
|
2849
|
+
* Arbitrary:
|
|
2765
2850
|
*
|
|
2766
2851
|
* When generating test data with fast-check, this applies a `patterns`
|
|
2767
2852
|
* constraint to ensure generated strings match the UUID pattern.
|
|
@@ -2785,12 +2870,14 @@ export function isUUID(version, annotations) {
|
|
|
2785
2870
|
* Validates that a string is a valid ULID (Universally Unique Lexicographically
|
|
2786
2871
|
* Sortable Identifier).
|
|
2787
2872
|
*
|
|
2788
|
-
* **
|
|
2873
|
+
* **Details**
|
|
2874
|
+
*
|
|
2875
|
+
* JSON Schema:
|
|
2789
2876
|
*
|
|
2790
2877
|
* This check corresponds to a `pattern` constraint in JSON Schema that matches
|
|
2791
2878
|
* the ULID format.
|
|
2792
2879
|
*
|
|
2793
|
-
*
|
|
2880
|
+
* Arbitrary:
|
|
2794
2881
|
*
|
|
2795
2882
|
* When generating test data with fast-check, this applies a `patterns`
|
|
2796
2883
|
* constraint to ensure generated strings match the ULID pattern.
|
|
@@ -2811,12 +2898,14 @@ export function isULID(annotations) {
|
|
|
2811
2898
|
/**
|
|
2812
2899
|
* Validates that a string is valid Base64 encoded data.
|
|
2813
2900
|
*
|
|
2814
|
-
* **
|
|
2901
|
+
* **Details**
|
|
2902
|
+
*
|
|
2903
|
+
* JSON Schema:
|
|
2815
2904
|
*
|
|
2816
2905
|
* This check corresponds to a `pattern` constraint in JSON Schema that matches
|
|
2817
2906
|
* Base64 format.
|
|
2818
2907
|
*
|
|
2819
|
-
*
|
|
2908
|
+
* Arbitrary:
|
|
2820
2909
|
*
|
|
2821
2910
|
* When generating test data with fast-check, this applies a `patterns`
|
|
2822
2911
|
* constraint to ensure generated strings match the Base64 pattern.
|
|
@@ -2839,12 +2928,14 @@ export function isBase64(annotations) {
|
|
|
2839
2928
|
* Validates that a string is valid Base64URL encoded data (Base64 with URL-safe
|
|
2840
2929
|
* characters).
|
|
2841
2930
|
*
|
|
2842
|
-
* **
|
|
2931
|
+
* **Details**
|
|
2932
|
+
*
|
|
2933
|
+
* JSON Schema:
|
|
2843
2934
|
*
|
|
2844
2935
|
* This check corresponds to a `pattern` constraint in JSON Schema that matches
|
|
2845
2936
|
* Base64URL format.
|
|
2846
2937
|
*
|
|
2847
|
-
*
|
|
2938
|
+
* Arbitrary:
|
|
2848
2939
|
*
|
|
2849
2940
|
* When generating test data with fast-check, this applies a `patterns`
|
|
2850
2941
|
* constraint to ensure generated strings match the Base64URL pattern.
|
|
@@ -2866,7 +2957,9 @@ export function isBase64Url(annotations) {
|
|
|
2866
2957
|
/**
|
|
2867
2958
|
* Validates at runtime that a string starts with the specified literal prefix.
|
|
2868
2959
|
*
|
|
2869
|
-
* **
|
|
2960
|
+
* **Details**
|
|
2961
|
+
*
|
|
2962
|
+
* Notes:
|
|
2870
2963
|
* The JSON Schema and arbitrary metadata are built from `^${startsWith}` without
|
|
2871
2964
|
* escaping regexp metacharacters. If the prefix contains regexp syntax, generated
|
|
2872
2965
|
* patterns may not be equivalent to the runtime `startsWith` check.
|
|
@@ -2894,7 +2987,9 @@ export function isStartsWith(startsWith, annotations) {
|
|
|
2894
2987
|
/**
|
|
2895
2988
|
* Validates at runtime that a string ends with the specified literal suffix.
|
|
2896
2989
|
*
|
|
2897
|
-
* **
|
|
2990
|
+
* **Details**
|
|
2991
|
+
*
|
|
2992
|
+
* Notes:
|
|
2898
2993
|
* The JSON Schema and arbitrary metadata are built from `${endsWith}$` without
|
|
2899
2994
|
* escaping regexp metacharacters. If the suffix contains regexp syntax, generated
|
|
2900
2995
|
* patterns may not be equivalent to the runtime `endsWith` check.
|
|
@@ -2922,7 +3017,9 @@ export function isEndsWith(endsWith, annotations) {
|
|
|
2922
3017
|
/**
|
|
2923
3018
|
* Validates at runtime that a string contains the specified literal substring.
|
|
2924
3019
|
*
|
|
2925
|
-
* **
|
|
3020
|
+
* **Details**
|
|
3021
|
+
*
|
|
3022
|
+
* Notes:
|
|
2926
3023
|
* The JSON Schema and arbitrary metadata use the substring as a raw regexp
|
|
2927
3024
|
* pattern. If the substring contains regexp syntax, generated patterns may not be
|
|
2928
3025
|
* equivalent to the runtime `includes` check.
|
|
@@ -2952,6 +3049,7 @@ const UPPERCASED_PATTERN = "^[^a-z]*$";
|
|
|
2952
3049
|
* Validates that a string is unchanged by JavaScript's `toUpperCase()`.
|
|
2953
3050
|
*
|
|
2954
3051
|
* **Details**
|
|
3052
|
+
*
|
|
2955
3053
|
* This accepts empty strings and characters that do not have lowercase forms,
|
|
2956
3054
|
* such as digits, punctuation, and whitespace. It rejects strings that would
|
|
2957
3055
|
* change when uppercased.
|
|
@@ -2979,6 +3077,7 @@ const LOWERCASED_PATTERN = "^[^A-Z]*$";
|
|
|
2979
3077
|
* Validates that a string is unchanged by JavaScript's `toLowerCase()`.
|
|
2980
3078
|
*
|
|
2981
3079
|
* **Details**
|
|
3080
|
+
*
|
|
2982
3081
|
* This accepts empty strings and characters that do not have uppercase forms,
|
|
2983
3082
|
* such as digits, punctuation, and whitespace. It rejects strings that would
|
|
2984
3083
|
* change when lowercased.
|
|
@@ -3007,6 +3106,7 @@ const CAPITALIZED_PATTERN = "^[^a-z]?.*$";
|
|
|
3007
3106
|
* `toUpperCase()`.
|
|
3008
3107
|
*
|
|
3009
3108
|
* **Details**
|
|
3109
|
+
*
|
|
3010
3110
|
* Empty strings pass. Strings whose first character has no lowercase form, such
|
|
3011
3111
|
* as a digit, punctuation mark, or whitespace, also pass.
|
|
3012
3112
|
*
|
|
@@ -3034,6 +3134,7 @@ const UNCAPITALIZED_PATTERN = "^[^A-Z]?.*$";
|
|
|
3034
3134
|
* `toLowerCase()`.
|
|
3035
3135
|
*
|
|
3036
3136
|
* **Details**
|
|
3137
|
+
*
|
|
3037
3138
|
* Empty strings pass. Strings whose first character has no uppercase form, such
|
|
3038
3139
|
* as a digit, punctuation mark, or whitespace, also pass.
|
|
3039
3140
|
*
|
|
@@ -3058,12 +3159,14 @@ export function isUncapitalized(annotations) {
|
|
|
3058
3159
|
/**
|
|
3059
3160
|
* Validates that a number is finite (not `Infinity`, `-Infinity`, or `NaN`).
|
|
3060
3161
|
*
|
|
3061
|
-
* **
|
|
3162
|
+
* **Details**
|
|
3163
|
+
*
|
|
3164
|
+
* JSON Schema:
|
|
3062
3165
|
*
|
|
3063
3166
|
* This check does not have a direct JSON Schema equivalent, but ensures the
|
|
3064
3167
|
* number is valid and finite.
|
|
3065
3168
|
*
|
|
3066
|
-
*
|
|
3169
|
+
* Arbitrary:
|
|
3067
3170
|
*
|
|
3068
3171
|
* When generating test data with fast-check, this applies `noDefaultInfinity`
|
|
3069
3172
|
* and `noNaN` constraints to ensure generated numbers are finite.
|
|
@@ -3201,11 +3304,13 @@ export function makeIsMultipleOf(options) {
|
|
|
3201
3304
|
/**
|
|
3202
3305
|
* Validates that a number is greater than the specified value (exclusive).
|
|
3203
3306
|
*
|
|
3204
|
-
* **
|
|
3307
|
+
* **Details**
|
|
3308
|
+
*
|
|
3309
|
+
* JSON Schema:
|
|
3205
3310
|
*
|
|
3206
3311
|
* This check corresponds to the `exclusiveMinimum` constraint in JSON Schema.
|
|
3207
3312
|
*
|
|
3208
|
-
*
|
|
3313
|
+
* Arbitrary:
|
|
3209
3314
|
*
|
|
3210
3315
|
* When generating test data with fast-check, this applies a `min` constraint
|
|
3211
3316
|
* with `minExcluded: true` to ensure generated numbers are greater than the
|
|
@@ -3233,11 +3338,13 @@ export const isGreaterThan = /*#__PURE__*/makeIsGreaterThan({
|
|
|
3233
3338
|
* Validates that a number is greater than or equal to the specified value
|
|
3234
3339
|
* (inclusive).
|
|
3235
3340
|
*
|
|
3236
|
-
* **
|
|
3341
|
+
* **Details**
|
|
3342
|
+
*
|
|
3343
|
+
* JSON Schema:
|
|
3237
3344
|
*
|
|
3238
3345
|
* This check corresponds to the `minimum` constraint in JSON Schema.
|
|
3239
3346
|
*
|
|
3240
|
-
*
|
|
3347
|
+
* Arbitrary:
|
|
3241
3348
|
*
|
|
3242
3349
|
* When generating test data with fast-check, this applies a `min` constraint
|
|
3243
3350
|
* to ensure generated numbers are greater than or equal to the specified value.
|
|
@@ -3262,11 +3369,13 @@ export const isGreaterThanOrEqualTo = /*#__PURE__*/makeIsGreaterThanOrEqualTo({
|
|
|
3262
3369
|
/**
|
|
3263
3370
|
* Validates that a number is less than the specified value (exclusive).
|
|
3264
3371
|
*
|
|
3265
|
-
* **
|
|
3372
|
+
* **Details**
|
|
3373
|
+
*
|
|
3374
|
+
* JSON Schema:
|
|
3266
3375
|
*
|
|
3267
3376
|
* This check corresponds to the `exclusiveMaximum` constraint in JSON Schema.
|
|
3268
3377
|
*
|
|
3269
|
-
*
|
|
3378
|
+
* Arbitrary:
|
|
3270
3379
|
*
|
|
3271
3380
|
* When generating test data with fast-check, this applies a `max` constraint
|
|
3272
3381
|
* with `maxExcluded: true` to ensure generated numbers are less than the
|
|
@@ -3294,11 +3403,13 @@ export const isLessThan = /*#__PURE__*/makeIsLessThan({
|
|
|
3294
3403
|
* Validates that a number is less than or equal to the specified value
|
|
3295
3404
|
* (inclusive).
|
|
3296
3405
|
*
|
|
3297
|
-
* **
|
|
3406
|
+
* **Details**
|
|
3407
|
+
*
|
|
3408
|
+
* JSON Schema:
|
|
3298
3409
|
*
|
|
3299
3410
|
* This check corresponds to the `maximum` constraint in JSON Schema.
|
|
3300
3411
|
*
|
|
3301
|
-
*
|
|
3412
|
+
* Arbitrary:
|
|
3302
3413
|
*
|
|
3303
3414
|
* When generating test data with fast-check, this applies a `max` constraint
|
|
3304
3415
|
* to ensure generated numbers are less than or equal to the specified value.
|
|
@@ -3324,12 +3435,14 @@ export const isLessThanOrEqualTo = /*#__PURE__*/makeIsLessThanOrEqualTo({
|
|
|
3324
3435
|
* Validates that a number is within a specified range. The range boundaries can
|
|
3325
3436
|
* be inclusive or exclusive based on the provided options.
|
|
3326
3437
|
*
|
|
3327
|
-
* **
|
|
3438
|
+
* **Details**
|
|
3439
|
+
*
|
|
3440
|
+
* JSON Schema:
|
|
3328
3441
|
*
|
|
3329
3442
|
* This check corresponds to `minimum`/`maximum` or `exclusiveMinimum`/`exclusiveMaximum`
|
|
3330
3443
|
* constraints in JSON Schema, depending on the options provided.
|
|
3331
3444
|
*
|
|
3332
|
-
*
|
|
3445
|
+
* Arbitrary:
|
|
3333
3446
|
*
|
|
3334
3447
|
* When generating test data with fast-check, this applies `min` and `max`
|
|
3335
3448
|
* constraints with optional `minExcluded` and `maxExcluded` flags to ensure
|
|
@@ -3364,11 +3477,13 @@ export const isBetween = /*#__PURE__*/makeIsBetween({
|
|
|
3364
3477
|
/**
|
|
3365
3478
|
* Validates that a number is a multiple of the specified divisor.
|
|
3366
3479
|
*
|
|
3367
|
-
* **
|
|
3480
|
+
* **Details**
|
|
3481
|
+
*
|
|
3482
|
+
* JSON Schema:
|
|
3368
3483
|
*
|
|
3369
3484
|
* This check corresponds to the `multipleOf` constraint in JSON Schema.
|
|
3370
3485
|
*
|
|
3371
|
-
*
|
|
3486
|
+
* Arbitrary:
|
|
3372
3487
|
*
|
|
3373
3488
|
* When generating test data with fast-check, this applies constraints to ensure
|
|
3374
3489
|
* generated numbers are multiples of the specified divisor.
|
|
@@ -3391,11 +3506,13 @@ export const isMultipleOf = /*#__PURE__*/makeIsMultipleOf({
|
|
|
3391
3506
|
* Validates that a number is a safe integer (within the safe integer range
|
|
3392
3507
|
* that can be exactly represented in JavaScript).
|
|
3393
3508
|
*
|
|
3394
|
-
* **
|
|
3509
|
+
* **Details**
|
|
3510
|
+
*
|
|
3511
|
+
* JSON Schema:
|
|
3395
3512
|
*
|
|
3396
3513
|
* This check corresponds to the `type: "integer"` constraint in JSON Schema.
|
|
3397
3514
|
*
|
|
3398
|
-
*
|
|
3515
|
+
* Arbitrary:
|
|
3399
3516
|
*
|
|
3400
3517
|
* When generating test data with fast-check, this applies an `isInteger: true`
|
|
3401
3518
|
* constraint to ensure generated numbers are integers.
|
|
@@ -3421,12 +3538,14 @@ export function isInt(annotations) {
|
|
|
3421
3538
|
* Validates that a number is a 32-bit signed integer (range: -2,147,483,648 to
|
|
3422
3539
|
* 2,147,483,647).
|
|
3423
3540
|
*
|
|
3424
|
-
* **
|
|
3541
|
+
* **Details**
|
|
3542
|
+
*
|
|
3543
|
+
* JSON Schema:
|
|
3425
3544
|
*
|
|
3426
3545
|
* This check corresponds to the `format: "int32"` constraint in OpenAPI 3.1,
|
|
3427
3546
|
* or `minimum`/`maximum` constraints in other JSON Schema targets.
|
|
3428
3547
|
*
|
|
3429
|
-
*
|
|
3548
|
+
* Arbitrary:
|
|
3430
3549
|
*
|
|
3431
3550
|
* When generating test data with fast-check, this applies integer and range
|
|
3432
3551
|
* constraints to ensure generated numbers are 32-bit signed integers.
|
|
@@ -3447,12 +3566,14 @@ export function isInt32(annotations) {
|
|
|
3447
3566
|
* Validates that a number is a 32-bit unsigned integer (range: 0 to
|
|
3448
3567
|
* 4,294,967,295).
|
|
3449
3568
|
*
|
|
3450
|
-
* **
|
|
3569
|
+
* **Details**
|
|
3570
|
+
*
|
|
3571
|
+
* JSON Schema:
|
|
3451
3572
|
*
|
|
3452
3573
|
* This check corresponds to the `format: "uint32"` constraint in OpenAPI 3.1,
|
|
3453
3574
|
* or `minimum`/`maximum` constraints in other JSON Schema targets.
|
|
3454
3575
|
*
|
|
3455
|
-
*
|
|
3576
|
+
* Arbitrary:
|
|
3456
3577
|
*
|
|
3457
3578
|
* When generating test data with fast-check, this applies integer and range
|
|
3458
3579
|
* constraints to ensure generated numbers are 32-bit unsigned integers.
|
|
@@ -3473,12 +3594,14 @@ export function isUint32(annotations) {
|
|
|
3473
3594
|
* Validates that a Date object represents a valid date (not an invalid date
|
|
3474
3595
|
* like `new Date("invalid")`).
|
|
3475
3596
|
*
|
|
3476
|
-
* **
|
|
3597
|
+
* **Details**
|
|
3598
|
+
*
|
|
3599
|
+
* JSON Schema:
|
|
3477
3600
|
*
|
|
3478
3601
|
* This check does not have a direct JSON Schema equivalent, as JSON Schema
|
|
3479
3602
|
* validates date strings, not Date objects.
|
|
3480
3603
|
*
|
|
3481
|
-
*
|
|
3604
|
+
* Arbitrary:
|
|
3482
3605
|
*
|
|
3483
3606
|
* When generating test data with fast-check, this applies a `noInvalidDate`
|
|
3484
3607
|
* constraint to ensure generated Date objects are valid.
|
|
@@ -3503,7 +3626,9 @@ export function isDateValid(annotations) {
|
|
|
3503
3626
|
/**
|
|
3504
3627
|
* Validates that a Date is greater than the specified value (exclusive).
|
|
3505
3628
|
*
|
|
3506
|
-
* **
|
|
3629
|
+
* **Details**
|
|
3630
|
+
*
|
|
3631
|
+
* Arbitrary:
|
|
3507
3632
|
*
|
|
3508
3633
|
* When generating test data with fast-check, this applies a `min` constraint
|
|
3509
3634
|
* with `minExcluded: true` to ensure generated Date objects are greater than the
|
|
@@ -3531,12 +3656,14 @@ export const isGreaterThanDate = /*#__PURE__*/makeIsGreaterThan({
|
|
|
3531
3656
|
* Validates that a Date is greater than or equal to the specified date
|
|
3532
3657
|
* (inclusive).
|
|
3533
3658
|
*
|
|
3534
|
-
* **
|
|
3659
|
+
* **Details**
|
|
3660
|
+
*
|
|
3661
|
+
* JSON Schema:
|
|
3535
3662
|
*
|
|
3536
3663
|
* This check does not have a direct JSON Schema equivalent, as JSON Schema
|
|
3537
3664
|
* validates date strings, not Date objects.
|
|
3538
3665
|
*
|
|
3539
|
-
*
|
|
3666
|
+
* Arbitrary:
|
|
3540
3667
|
*
|
|
3541
3668
|
* When generating test data with fast-check, this applies a `min` constraint
|
|
3542
3669
|
* to ensure generated Date objects are greater than or equal to the specified
|
|
@@ -3562,7 +3689,9 @@ export const isGreaterThanOrEqualToDate = /*#__PURE__*/makeIsGreaterThanOrEqualT
|
|
|
3562
3689
|
/**
|
|
3563
3690
|
* Validates that a Date is less than the specified value (exclusive).
|
|
3564
3691
|
*
|
|
3565
|
-
* **
|
|
3692
|
+
* **Details**
|
|
3693
|
+
*
|
|
3694
|
+
* Arbitrary:
|
|
3566
3695
|
*
|
|
3567
3696
|
* When generating test data with fast-check, this applies a `max` constraint
|
|
3568
3697
|
* with `maxExcluded: true` to ensure generated Date objects are less than the
|
|
@@ -3590,12 +3719,14 @@ export const isLessThanDate = /*#__PURE__*/makeIsLessThan({
|
|
|
3590
3719
|
* Validates that a Date is less than or equal to the specified date
|
|
3591
3720
|
* (inclusive).
|
|
3592
3721
|
*
|
|
3593
|
-
* **
|
|
3722
|
+
* **Details**
|
|
3723
|
+
*
|
|
3724
|
+
* JSON Schema:
|
|
3594
3725
|
*
|
|
3595
3726
|
* This check does not have a direct JSON Schema equivalent, as JSON Schema
|
|
3596
3727
|
* validates date strings, not Date objects.
|
|
3597
3728
|
*
|
|
3598
|
-
*
|
|
3729
|
+
* Arbitrary:
|
|
3599
3730
|
*
|
|
3600
3731
|
* When generating test data with fast-check, this applies a `max` constraint
|
|
3601
3732
|
* to ensure generated Date objects are less than or equal to the specified
|
|
@@ -3622,12 +3753,14 @@ export const isLessThanOrEqualToDate = /*#__PURE__*/makeIsLessThanOrEqualTo({
|
|
|
3622
3753
|
* Validates that a Date is within a specified range. The range boundaries can
|
|
3623
3754
|
* be inclusive or exclusive based on the provided options.
|
|
3624
3755
|
*
|
|
3625
|
-
* **
|
|
3756
|
+
* **Details**
|
|
3757
|
+
*
|
|
3758
|
+
* JSON Schema:
|
|
3626
3759
|
*
|
|
3627
3760
|
* This check does not have a direct JSON Schema equivalent, as JSON Schema
|
|
3628
3761
|
* validates date strings, not Date objects.
|
|
3629
3762
|
*
|
|
3630
|
-
*
|
|
3763
|
+
* Arbitrary:
|
|
3631
3764
|
*
|
|
3632
3765
|
* When generating test data with fast-check, this applies `min` and `max`
|
|
3633
3766
|
* constraints to ensure generated Date objects fall within the specified range.
|
|
@@ -3653,7 +3786,9 @@ export const isBetweenDate = /*#__PURE__*/makeIsBetween({
|
|
|
3653
3786
|
/**
|
|
3654
3787
|
* Validates that a BigInt is greater than the specified value (exclusive).
|
|
3655
3788
|
*
|
|
3656
|
-
* **
|
|
3789
|
+
* **Details**
|
|
3790
|
+
*
|
|
3791
|
+
* Arbitrary:
|
|
3657
3792
|
*
|
|
3658
3793
|
* When generating test data with fast-check, this applies a `min` constraint
|
|
3659
3794
|
* with `minExcluded: true` to ensure generated BigInts are greater than the
|
|
@@ -3681,7 +3816,9 @@ export const isGreaterThanBigInt = /*#__PURE__*/makeIsGreaterThan({
|
|
|
3681
3816
|
* Validates that a BigInt is greater than or equal to the specified value
|
|
3682
3817
|
* (inclusive).
|
|
3683
3818
|
*
|
|
3684
|
-
* **
|
|
3819
|
+
* **Details**
|
|
3820
|
+
*
|
|
3821
|
+
* Arbitrary:
|
|
3685
3822
|
*
|
|
3686
3823
|
* When generating test data with fast-check, this applies a `min` constraint
|
|
3687
3824
|
* to ensure generated BigInt values are greater than or equal to the specified
|
|
@@ -3707,7 +3844,9 @@ export const isGreaterThanOrEqualToBigInt = /*#__PURE__*/makeIsGreaterThanOrEqua
|
|
|
3707
3844
|
/**
|
|
3708
3845
|
* Validates that a BigInt is less than the specified value (exclusive).
|
|
3709
3846
|
*
|
|
3710
|
-
* **
|
|
3847
|
+
* **Details**
|
|
3848
|
+
*
|
|
3849
|
+
* Arbitrary:
|
|
3711
3850
|
*
|
|
3712
3851
|
* When generating test data with fast-check, this applies a `max` constraint
|
|
3713
3852
|
* with `maxExcluded: true` to ensure generated BigInts are less than the
|
|
@@ -3735,7 +3874,9 @@ export const isLessThanBigInt = /*#__PURE__*/makeIsLessThan({
|
|
|
3735
3874
|
* Validates that a BigInt is less than or equal to the specified value
|
|
3736
3875
|
* (inclusive).
|
|
3737
3876
|
*
|
|
3738
|
-
* **
|
|
3877
|
+
* **Details**
|
|
3878
|
+
*
|
|
3879
|
+
* Arbitrary:
|
|
3739
3880
|
*
|
|
3740
3881
|
* When generating test data with fast-check, this applies a `max` constraint
|
|
3741
3882
|
* to ensure generated BigInt values are less than or equal to the specified
|
|
@@ -3762,7 +3903,9 @@ export const isLessThanOrEqualToBigInt = /*#__PURE__*/makeIsLessThanOrEqualTo({
|
|
|
3762
3903
|
* Validates that a BigInt is within a specified range. The range boundaries can
|
|
3763
3904
|
* be inclusive or exclusive based on the provided options.
|
|
3764
3905
|
*
|
|
3765
|
-
* **
|
|
3906
|
+
* **Details**
|
|
3907
|
+
*
|
|
3908
|
+
* Arbitrary:
|
|
3766
3909
|
*
|
|
3767
3910
|
* When generating test data with fast-check, this applies `min` and `max`
|
|
3768
3911
|
* constraints to ensure generated BigInt values fall within the specified
|
|
@@ -3832,6 +3975,7 @@ export const isLessThanOrEqualToBigDecimal = /*#__PURE__*/makeIsLessThanOrEqualT
|
|
|
3832
3975
|
* Validates that a `BigDecimal` is within a specified range.
|
|
3833
3976
|
*
|
|
3834
3977
|
* **Details**
|
|
3978
|
+
*
|
|
3835
3979
|
* The minimum and maximum boundaries are inclusive by default. Pass
|
|
3836
3980
|
* `exclusiveMinimum` or `exclusiveMaximum` to exclude either boundary.
|
|
3837
3981
|
*
|
|
@@ -3846,12 +3990,14 @@ export const isBetweenBigDecimal = /*#__PURE__*/makeIsBetween({
|
|
|
3846
3990
|
* Validates that a value has at least the specified length. Works with strings
|
|
3847
3991
|
* and arrays.
|
|
3848
3992
|
*
|
|
3849
|
-
* **
|
|
3993
|
+
* **Details**
|
|
3994
|
+
*
|
|
3995
|
+
* JSON Schema:
|
|
3850
3996
|
*
|
|
3851
3997
|
* This check corresponds to the `minLength` constraint for strings or the
|
|
3852
3998
|
* `minItems` constraint for arrays in JSON Schema.
|
|
3853
3999
|
*
|
|
3854
|
-
*
|
|
4000
|
+
* Arbitrary:
|
|
3855
4001
|
*
|
|
3856
4002
|
* When generating test data with fast-check, this applies a `minLength`
|
|
3857
4003
|
* constraint to ensure generated strings or arrays have at least the required
|
|
@@ -3893,12 +4039,14 @@ export function isMinLength(minLength, annotations) {
|
|
|
3893
4039
|
* Validates that a value has at least one element. Works with strings and arrays.
|
|
3894
4040
|
* This is equivalent to `isMinLength(1)`.
|
|
3895
4041
|
*
|
|
3896
|
-
* **
|
|
4042
|
+
* **Details**
|
|
4043
|
+
*
|
|
4044
|
+
* JSON Schema:
|
|
3897
4045
|
*
|
|
3898
4046
|
* This check corresponds to the `minLength: 1` constraint for strings or the
|
|
3899
4047
|
* `minItems: 1` constraint for arrays in JSON Schema.
|
|
3900
4048
|
*
|
|
3901
|
-
*
|
|
4049
|
+
* Arbitrary:
|
|
3902
4050
|
*
|
|
3903
4051
|
* When generating test data with fast-check, this applies a `minLength: 1`
|
|
3904
4052
|
* constraint to ensure generated strings or arrays are non-empty.
|
|
@@ -3913,12 +4061,14 @@ export function isNonEmpty(annotations) {
|
|
|
3913
4061
|
* Validates that a value has at most the specified length. Works with strings
|
|
3914
4062
|
* and arrays.
|
|
3915
4063
|
*
|
|
3916
|
-
* **
|
|
4064
|
+
* **Details**
|
|
4065
|
+
*
|
|
4066
|
+
* JSON Schema:
|
|
3917
4067
|
*
|
|
3918
4068
|
* This check corresponds to the `maxLength` constraint for strings or the
|
|
3919
4069
|
* `maxItems` constraint for arrays in JSON Schema.
|
|
3920
4070
|
*
|
|
3921
|
-
*
|
|
4071
|
+
* Arbitrary:
|
|
3922
4072
|
*
|
|
3923
4073
|
* When generating test data with fast-check, this applies a `maxLength`
|
|
3924
4074
|
* constraint to ensure generated strings or arrays have at most the required
|
|
@@ -3951,12 +4101,14 @@ export function isMaxLength(maxLength, annotations) {
|
|
|
3951
4101
|
* Validates that a value's length is within the specified range. Works with
|
|
3952
4102
|
* strings and arrays.
|
|
3953
4103
|
*
|
|
3954
|
-
* **
|
|
4104
|
+
* **Details**
|
|
4105
|
+
*
|
|
4106
|
+
* JSON Schema:
|
|
3955
4107
|
*
|
|
3956
4108
|
* This check corresponds to `minLength`/`maxLength` constraints for strings
|
|
3957
4109
|
* or `minItems`/`maxItems` constraints for arrays in JSON Schema.
|
|
3958
4110
|
*
|
|
3959
|
-
*
|
|
4111
|
+
* Arbitrary:
|
|
3960
4112
|
*
|
|
3961
4113
|
* When generating test data with fast-check, this applies `minLength` and
|
|
3962
4114
|
* `maxLength` constraints to ensure generated strings or arrays have a length
|
|
@@ -3993,12 +4145,14 @@ export function isLengthBetween(minimum, maximum, annotations) {
|
|
|
3993
4145
|
* Validates that a value has at least the specified size. Works with values
|
|
3994
4146
|
* that have a `size` property, such as `Set` or `Map`.
|
|
3995
4147
|
*
|
|
3996
|
-
* **
|
|
4148
|
+
* **Details**
|
|
4149
|
+
*
|
|
4150
|
+
* JSON Schema:
|
|
3997
4151
|
*
|
|
3998
4152
|
* This check does not have a direct JSON Schema equivalent, as it applies to
|
|
3999
4153
|
* values with a `size` property rather than standard JSON Schema types.
|
|
4000
4154
|
*
|
|
4001
|
-
*
|
|
4155
|
+
* Arbitrary:
|
|
4002
4156
|
*
|
|
4003
4157
|
* When generating test data with fast-check, this applies a `minLength`
|
|
4004
4158
|
* constraint to the array representation to ensure generated values have at
|
|
@@ -4028,12 +4182,14 @@ export function isMinSize(minSize, annotations) {
|
|
|
4028
4182
|
* Validates that a value has at most the specified size. Works with values
|
|
4029
4183
|
* that have a `size` property, such as `Set` or `Map`.
|
|
4030
4184
|
*
|
|
4031
|
-
* **
|
|
4185
|
+
* **Details**
|
|
4186
|
+
*
|
|
4187
|
+
* JSON Schema:
|
|
4032
4188
|
*
|
|
4033
4189
|
* This check does not have a direct JSON Schema equivalent, as it applies to
|
|
4034
4190
|
* values with a `size` property rather than standard JSON Schema types.
|
|
4035
4191
|
*
|
|
4036
|
-
*
|
|
4192
|
+
* Arbitrary:
|
|
4037
4193
|
*
|
|
4038
4194
|
* When generating test data with fast-check, this applies a `maxLength`
|
|
4039
4195
|
* constraint to the array representation to ensure generated values have at
|
|
@@ -4063,12 +4219,14 @@ export function isMaxSize(maxSize, annotations) {
|
|
|
4063
4219
|
* Validates that a value's size is within the specified range. Works with
|
|
4064
4220
|
* values that have a `size` property, such as `Set` or `Map`.
|
|
4065
4221
|
*
|
|
4066
|
-
* **
|
|
4222
|
+
* **Details**
|
|
4223
|
+
*
|
|
4224
|
+
* JSON Schema:
|
|
4067
4225
|
*
|
|
4068
4226
|
* This check does not have a direct JSON Schema equivalent, as it applies to
|
|
4069
4227
|
* values with a `size` property rather than standard JSON Schema types.
|
|
4070
4228
|
*
|
|
4071
|
-
*
|
|
4229
|
+
* Arbitrary:
|
|
4072
4230
|
*
|
|
4073
4231
|
* When generating test data with fast-check, this applies `minLength` and
|
|
4074
4232
|
* `maxLength` constraints to ensure generated values have a size within the
|
|
@@ -4102,11 +4260,13 @@ export function isSizeBetween(minimum, maximum, annotations) {
|
|
|
4102
4260
|
* properties. This includes both string and symbol keys when counting
|
|
4103
4261
|
* properties.
|
|
4104
4262
|
*
|
|
4105
|
-
* **
|
|
4263
|
+
* **Details**
|
|
4264
|
+
*
|
|
4265
|
+
* JSON Schema:
|
|
4106
4266
|
*
|
|
4107
4267
|
* This check corresponds to the `minProperties` constraint in JSON Schema.
|
|
4108
4268
|
*
|
|
4109
|
-
*
|
|
4269
|
+
* Arbitrary:
|
|
4110
4270
|
*
|
|
4111
4271
|
* When generating test data with fast-check, this applies a `minLength`
|
|
4112
4272
|
* constraint to the array of entries that is generated before being converted
|
|
@@ -4137,11 +4297,13 @@ export function isMinProperties(minProperties, annotations) {
|
|
|
4137
4297
|
* Validates that an object contains at most the specified number of properties.
|
|
4138
4298
|
* This includes both string and symbol keys when counting properties.
|
|
4139
4299
|
*
|
|
4140
|
-
* **
|
|
4300
|
+
* **Details**
|
|
4301
|
+
*
|
|
4302
|
+
* JSON Schema:
|
|
4141
4303
|
*
|
|
4142
4304
|
* This check corresponds to the `maxProperties` constraint in JSON Schema.
|
|
4143
4305
|
*
|
|
4144
|
-
*
|
|
4306
|
+
* Arbitrary:
|
|
4145
4307
|
*
|
|
4146
4308
|
* When generating test data with fast-check, this applies a `maxLength`
|
|
4147
4309
|
* constraint to the array of entries that is generated before being converted
|
|
@@ -4172,12 +4334,14 @@ export function isMaxProperties(maxProperties, annotations) {
|
|
|
4172
4334
|
* Validates that an object contains between `minimum` and `maximum` properties (inclusive).
|
|
4173
4335
|
* This includes both string and symbol keys when counting properties.
|
|
4174
4336
|
*
|
|
4175
|
-
* **
|
|
4337
|
+
* **Details**
|
|
4338
|
+
*
|
|
4339
|
+
* JSON Schema:
|
|
4176
4340
|
*
|
|
4177
4341
|
* This check corresponds to `minProperties` and `maxProperties`
|
|
4178
4342
|
* constraints in JSON Schema.
|
|
4179
4343
|
*
|
|
4180
|
-
*
|
|
4344
|
+
* Arbitrary:
|
|
4181
4345
|
*
|
|
4182
4346
|
* When generating test data with fast-check, this applies `minLength` and
|
|
4183
4347
|
* `maxLength` constraints to the array of entries that is generated before
|
|
@@ -4211,10 +4375,11 @@ export function isPropertiesLengthBetween(minimum, maximum, annotations) {
|
|
|
4211
4375
|
* of the provided key schema.
|
|
4212
4376
|
*
|
|
4213
4377
|
* **Details**
|
|
4378
|
+
*
|
|
4214
4379
|
* This check uses `Reflect.ownKeys`, so symbol keys are validated in addition to
|
|
4215
4380
|
* string property names.
|
|
4216
4381
|
*
|
|
4217
|
-
*
|
|
4382
|
+
* JSON Schema:
|
|
4218
4383
|
* For string property names, this corresponds to the `propertyNames` constraint
|
|
4219
4384
|
* in JSON Schema.
|
|
4220
4385
|
*
|
|
@@ -4251,10 +4416,12 @@ export function isPropertyNames(keySchema, annotations) {
|
|
|
4251
4416
|
/**
|
|
4252
4417
|
* Validates that all items in an array are unique according to Effect equality.
|
|
4253
4418
|
*
|
|
4254
|
-
* **
|
|
4419
|
+
* **Details**
|
|
4420
|
+
*
|
|
4421
|
+
* JSON Schema:
|
|
4255
4422
|
* This check corresponds to the `uniqueItems: true` constraint in JSON Schema.
|
|
4256
4423
|
*
|
|
4257
|
-
*
|
|
4424
|
+
* Arbitrary:
|
|
4258
4425
|
* When generating test data with fast-check, this applies a comparator based on
|
|
4259
4426
|
* Effect equality to ensure generated arrays contain only unique items.
|
|
4260
4427
|
*
|
|
@@ -4352,6 +4519,8 @@ export function Option(value) {
|
|
|
4352
4519
|
/**
|
|
4353
4520
|
* Decodes a nullable, required value `T` to a required `Option<T>` value.
|
|
4354
4521
|
*
|
|
4522
|
+
* **Details**
|
|
4523
|
+
*
|
|
4355
4524
|
* Decoding:
|
|
4356
4525
|
* - `null` is decoded as `None`
|
|
4357
4526
|
* - other values are decoded as `Some`
|
|
@@ -4369,6 +4538,8 @@ export function OptionFromNullOr(schema) {
|
|
|
4369
4538
|
/**
|
|
4370
4539
|
* Decodes an undefined-or value `T` to a required `Option<T>` value.
|
|
4371
4540
|
*
|
|
4541
|
+
* **Details**
|
|
4542
|
+
*
|
|
4372
4543
|
* Decoding:
|
|
4373
4544
|
* - `undefined` is decoded as `None`
|
|
4374
4545
|
* - other values are decoded as `Some`
|
|
@@ -4386,6 +4557,8 @@ export function OptionFromUndefinedOr(schema) {
|
|
|
4386
4557
|
/**
|
|
4387
4558
|
* Decodes a nullish value `T` to a required `Option<T>` value.
|
|
4388
4559
|
*
|
|
4560
|
+
* **Details**
|
|
4561
|
+
*
|
|
4389
4562
|
* Decoding:
|
|
4390
4563
|
* - `null` and `undefined` are decoded as `None`
|
|
4391
4564
|
* - other values are decoded as `Some`
|
|
@@ -4403,6 +4576,8 @@ export function OptionFromNullishOr(schema, options) {
|
|
|
4403
4576
|
/**
|
|
4404
4577
|
* Decodes an optional value `A` to a required `Option<A>` value.
|
|
4405
4578
|
*
|
|
4579
|
+
* **Details**
|
|
4580
|
+
*
|
|
4406
4581
|
* Decoding:
|
|
4407
4582
|
* - a missing key is decoded as `None`
|
|
4408
4583
|
* - a present value is decoded as `Some`
|
|
@@ -4421,6 +4596,8 @@ export function OptionFromOptionalKey(schema) {
|
|
|
4421
4596
|
* Decodes an optional or `undefined` value `A` to an required `Option<A>`
|
|
4422
4597
|
* value.
|
|
4423
4598
|
*
|
|
4599
|
+
* **Details**
|
|
4600
|
+
*
|
|
4424
4601
|
* Decoding:
|
|
4425
4602
|
* - a missing key is decoded as `None`
|
|
4426
4603
|
* - a present key with an `undefined` value is decoded as `None`
|
|
@@ -4440,6 +4617,8 @@ export function OptionFromOptional(schema) {
|
|
|
4440
4617
|
* Decodes an optional or `null` or `undefined` value `A` to a required `Option<A>`
|
|
4441
4618
|
* value.
|
|
4442
4619
|
*
|
|
4620
|
+
* **Details**
|
|
4621
|
+
*
|
|
4443
4622
|
* Decoding:
|
|
4444
4623
|
* - a missing key is decoded as `None`
|
|
4445
4624
|
* - a present key with an `undefined` value is decoded as `None`
|
|
@@ -4533,10 +4712,12 @@ export function Result(success, failure) {
|
|
|
4533
4712
|
* Creates a schema for the `Redacted` type, providing secure handling of
|
|
4534
4713
|
* sensitive information.
|
|
4535
4714
|
*
|
|
4715
|
+
* **Details**
|
|
4716
|
+
*
|
|
4536
4717
|
* If the wrapped schema fails, the issue will be redacted to prevent both
|
|
4537
4718
|
* the actual value and the schema details from being exposed.
|
|
4538
4719
|
*
|
|
4539
|
-
*
|
|
4720
|
+
* Options:
|
|
4540
4721
|
*
|
|
4541
4722
|
* - `label`: When provided, the schema will behave as follows:
|
|
4542
4723
|
* - Values will be validated against the label in addition to the wrapped schema
|
|
@@ -4544,7 +4725,7 @@ export function Result(success, failure) {
|
|
|
4544
4725
|
* - The arbitrary generator will produce a `Redacted` instance with the label
|
|
4545
4726
|
* - The formatter will return the label
|
|
4546
4727
|
*
|
|
4547
|
-
*
|
|
4728
|
+
* Default JSON serializer:
|
|
4548
4729
|
*
|
|
4549
4730
|
* The default JSON serializer will fail when attempting to serialize a `Redacted` value,
|
|
4550
4731
|
* but it will deserialize a value into a `Redacted` instance.
|
|
@@ -4786,7 +4967,9 @@ const ErrorJsonEncoded = /*#__PURE__*/Struct({
|
|
|
4786
4967
|
/**
|
|
4787
4968
|
* A schema for JavaScript `Error` objects.
|
|
4788
4969
|
*
|
|
4789
|
-
* **
|
|
4970
|
+
* **Details**
|
|
4971
|
+
*
|
|
4972
|
+
* Default JSON serializer:
|
|
4790
4973
|
* Encodes an `Error` as an object with `message` and optional `name` properties,
|
|
4791
4974
|
* and decodes that object back into an `Error`. The stack trace is omitted from
|
|
4792
4975
|
* the encoded form for security.
|
|
@@ -4810,7 +4993,9 @@ export const Error = /*#__PURE__*/instanceOf(globalThis.Error, {
|
|
|
4810
4993
|
* A schema for JavaScript `Error` objects that preserves stack traces in the JSON
|
|
4811
4994
|
* encoded form.
|
|
4812
4995
|
*
|
|
4813
|
-
* **
|
|
4996
|
+
* **Details**
|
|
4997
|
+
*
|
|
4998
|
+
* Default JSON serializer:
|
|
4814
4999
|
* Encodes an `Error` as an object with `message`, optional `name`, and optional
|
|
4815
5000
|
* `stack` properties, and decodes that object back into an `Error`.
|
|
4816
5001
|
*
|
|
@@ -4842,7 +5027,9 @@ const defectTransformation = /*#__PURE__*/new Transformation.Transformation(/*#_
|
|
|
4842
5027
|
* A schema for defect values, accepting either JavaScript `Error` values encoded
|
|
4843
5028
|
* with `message` and optional `name`, or arbitrary unknown defect values.
|
|
4844
5029
|
*
|
|
4845
|
-
* **
|
|
5030
|
+
* **Details**
|
|
5031
|
+
*
|
|
5032
|
+
* Default JSON serializer:
|
|
4846
5033
|
* Unknown defects are serialized with `JSON.stringify` when possible and fall
|
|
4847
5034
|
* back to Effect's formatted representation when JSON serialization fails.
|
|
4848
5035
|
*
|
|
@@ -5219,6 +5406,8 @@ export function Chunk(value) {
|
|
|
5219
5406
|
/**
|
|
5220
5407
|
* Schema for JavaScript `RegExp` objects.
|
|
5221
5408
|
*
|
|
5409
|
+
* **Details**
|
|
5410
|
+
*
|
|
5222
5411
|
* The default JSON serializer encodes a `RegExp` as `{ source, flags }`.
|
|
5223
5412
|
*
|
|
5224
5413
|
* @category RegExp
|
|
@@ -5261,7 +5450,9 @@ const URLString = /*#__PURE__*/String.annotate({
|
|
|
5261
5450
|
/**
|
|
5262
5451
|
* A schema for JavaScript `URL` objects.
|
|
5263
5452
|
*
|
|
5264
|
-
* **
|
|
5453
|
+
* **Details**
|
|
5454
|
+
*
|
|
5455
|
+
* Default JSON serializer:
|
|
5265
5456
|
*
|
|
5266
5457
|
* - encodes `URL` as a `string`
|
|
5267
5458
|
*
|
|
@@ -5284,6 +5475,8 @@ export const URL = /*#__PURE__*/instanceOf(globalThis.URL, {
|
|
|
5284
5475
|
/**
|
|
5285
5476
|
* A transformation schema that decodes a `string` into a `URL`.
|
|
5286
5477
|
*
|
|
5478
|
+
* **Details**
|
|
5479
|
+
*
|
|
5287
5480
|
* Decoding:
|
|
5288
5481
|
* - A **valid** URL `string` is decoded as a `URL`
|
|
5289
5482
|
*
|
|
@@ -5300,6 +5493,8 @@ const DateString = /*#__PURE__*/String.annotate({
|
|
|
5300
5493
|
/**
|
|
5301
5494
|
* A schema for JavaScript `Date` objects.
|
|
5302
5495
|
*
|
|
5496
|
+
* **Details**
|
|
5497
|
+
*
|
|
5303
5498
|
* This schema accepts any `Date` instance, including invalid dates. For
|
|
5304
5499
|
* validating only valid dates, use `DateValid` instead. The default JSON
|
|
5305
5500
|
* serializer encodes valid dates as ISO 8601 strings; invalid dates encode as
|
|
@@ -5332,11 +5527,13 @@ export const Date = /*#__PURE__*/instanceOf(globalThis.Date, {
|
|
|
5332
5527
|
/**
|
|
5333
5528
|
* A transformation schema that decodes a string into a JavaScript `Date`.
|
|
5334
5529
|
*
|
|
5335
|
-
* **
|
|
5530
|
+
* **Details**
|
|
5531
|
+
*
|
|
5532
|
+
* Decoding:
|
|
5336
5533
|
* The string is passed to JavaScript `Date` construction and may decode to an
|
|
5337
5534
|
* invalid `Date`. Compose with `DateValid` when invalid dates should be rejected.
|
|
5338
5535
|
*
|
|
5339
|
-
*
|
|
5536
|
+
* Encoding:
|
|
5340
5537
|
* A valid `Date` is encoded as an ISO string; an invalid `Date` is encoded as
|
|
5341
5538
|
* `"Invalid Date"`.
|
|
5342
5539
|
*
|
|
@@ -5347,6 +5544,8 @@ export const DateFromString = /*#__PURE__*/DateString.pipe(/*#__PURE__*/decodeTo
|
|
|
5347
5544
|
/**
|
|
5348
5545
|
* A schema for **valid** JavaScript `Date` objects.
|
|
5349
5546
|
*
|
|
5547
|
+
* **Details**
|
|
5548
|
+
*
|
|
5350
5549
|
* This schema accepts `Date` instances but rejects invalid dates (such as `new
|
|
5351
5550
|
* Date("invalid")`).
|
|
5352
5551
|
*
|
|
@@ -5357,6 +5556,8 @@ export const DateValid = /*#__PURE__*/Date.check(/*#__PURE__*/isDateValid());
|
|
|
5357
5556
|
/**
|
|
5358
5557
|
* A schema for `Duration` values.
|
|
5359
5558
|
*
|
|
5559
|
+
* **Details**
|
|
5560
|
+
*
|
|
5360
5561
|
* The default JSON serializer encodes `Duration` as a tagged object with the
|
|
5361
5562
|
* duration type and value.
|
|
5362
5563
|
*
|
|
@@ -5439,6 +5640,8 @@ const DurationString = /*#__PURE__*/String.annotate({
|
|
|
5439
5640
|
/**
|
|
5440
5641
|
* A transformation schema that parses a string into a `Duration`.
|
|
5441
5642
|
*
|
|
5643
|
+
* **Details**
|
|
5644
|
+
*
|
|
5442
5645
|
* Decoding:
|
|
5443
5646
|
* - A `string` is decoded as a `Duration`, accepting any format that
|
|
5444
5647
|
* `Duration.fromInput` can parse.
|
|
@@ -5455,10 +5658,12 @@ const bigint0 = /*#__PURE__*/globalThis.BigInt(0);
|
|
|
5455
5658
|
* A transformation schema that decodes a non-negative `bigint` into a
|
|
5456
5659
|
* `Duration`, treating the bigint as nanoseconds.
|
|
5457
5660
|
*
|
|
5458
|
-
* **
|
|
5661
|
+
* **Details**
|
|
5662
|
+
*
|
|
5663
|
+
* Decoding:
|
|
5459
5664
|
* A non-negative `bigint` representing nanoseconds is decoded as a `Duration`.
|
|
5460
5665
|
*
|
|
5461
|
-
*
|
|
5666
|
+
* Encoding:
|
|
5462
5667
|
* Finite durations are encoded as a non-negative `bigint` number of nanoseconds.
|
|
5463
5668
|
* Encoding fails when the duration cannot be represented as nanoseconds, such as
|
|
5464
5669
|
* `Duration.infinity`.
|
|
@@ -5472,6 +5677,8 @@ export const DurationFromNanos = /*#__PURE__*/BigInt.check(isGreaterThanOrEqualT
|
|
|
5472
5677
|
* integer into a `Duration`, treating the integer value as the duration in
|
|
5473
5678
|
* milliseconds.
|
|
5474
5679
|
*
|
|
5680
|
+
* **Details**
|
|
5681
|
+
*
|
|
5475
5682
|
* Decoding:
|
|
5476
5683
|
* - A non-negative (possibly infinite) integer representing milliseconds is
|
|
5477
5684
|
* decoded as a `Duration`
|
|
@@ -5490,7 +5697,9 @@ const BigDecimalString = /*#__PURE__*/String.annotate({
|
|
|
5490
5697
|
/**
|
|
5491
5698
|
* A schema for `BigDecimal` values.
|
|
5492
5699
|
*
|
|
5493
|
-
* **
|
|
5700
|
+
* **Details**
|
|
5701
|
+
*
|
|
5702
|
+
* Default JSON serializer:
|
|
5494
5703
|
*
|
|
5495
5704
|
* - encodes `BigDecimal` as a `string`
|
|
5496
5705
|
*
|
|
@@ -5518,6 +5727,8 @@ export const BigDecimal = /*#__PURE__*/declare(BigDecimal_.isBigDecimal, {
|
|
|
5518
5727
|
/**
|
|
5519
5728
|
* A transformation schema that parses a string into a `BigDecimal`.
|
|
5520
5729
|
*
|
|
5730
|
+
* **Details**
|
|
5731
|
+
*
|
|
5521
5732
|
* Decoding:
|
|
5522
5733
|
* - A `string` is decoded as a `BigDecimal`.
|
|
5523
5734
|
*
|
|
@@ -5531,6 +5742,8 @@ export const BigDecimalFromString = /*#__PURE__*/BigDecimalString.pipe(/*#__PURE
|
|
|
5531
5742
|
/**
|
|
5532
5743
|
* A transformation schema that decodes a JSON-encoded string into an `unknown` value.
|
|
5533
5744
|
*
|
|
5745
|
+
* **Details**
|
|
5746
|
+
*
|
|
5534
5747
|
* Decoding:
|
|
5535
5748
|
* - A `string` is decoded as an `unknown` value.
|
|
5536
5749
|
* - If the string is not valid JSON, decoding fails.
|
|
@@ -5556,12 +5769,20 @@ export const UnknownFromJsonString = /*#__PURE__*/fromJsonString(Unknown);
|
|
|
5556
5769
|
* Returns a schema that decodes a JSON string and then decodes the parsed value
|
|
5557
5770
|
* using the given schema.
|
|
5558
5771
|
*
|
|
5772
|
+
* **Details**
|
|
5773
|
+
*
|
|
5559
5774
|
* This is useful when working with JSON-encoded strings where the actual
|
|
5560
5775
|
* structure of the value is known and described by an existing schema.
|
|
5561
5776
|
*
|
|
5562
5777
|
* The resulting schema first parses the input string as JSON, and then runs the
|
|
5563
5778
|
* provided schema on the parsed result.
|
|
5564
5779
|
*
|
|
5780
|
+
* JSON Schema generation:
|
|
5781
|
+
*
|
|
5782
|
+
* When using `fromJsonString` with `draft-2020-12` or `openApi3.1`, the
|
|
5783
|
+
* resulting schema will be a JSON Schema with a `contentSchema` property that
|
|
5784
|
+
* contains the JSON Schema for the given schema.
|
|
5785
|
+
*
|
|
5565
5786
|
* **Example** (Decoding JSON strings with a schema)
|
|
5566
5787
|
*
|
|
5567
5788
|
* ```ts
|
|
@@ -5574,12 +5795,6 @@ export const UnknownFromJsonString = /*#__PURE__*/fromJsonString(Unknown);
|
|
|
5574
5795
|
* // => { a: 1 }
|
|
5575
5796
|
* ```
|
|
5576
5797
|
*
|
|
5577
|
-
* **Json Schema Generation**
|
|
5578
|
-
*
|
|
5579
|
-
* When using `fromJsonString` with `draft-2020-12` or `openApi3.1`, the
|
|
5580
|
-
* resulting schema will be a JSON Schema with a `contentSchema` property that
|
|
5581
|
-
* contains the JSON Schema for the given schema.
|
|
5582
|
-
*
|
|
5583
5798
|
* **Example** (Emitting JSON Schema for a JSON string decoder)
|
|
5584
5799
|
*
|
|
5585
5800
|
* ```ts
|
|
@@ -5626,6 +5841,8 @@ export function fromJsonString(schema) {
|
|
|
5626
5841
|
/**
|
|
5627
5842
|
* Schema for JavaScript `File` objects.
|
|
5628
5843
|
*
|
|
5844
|
+
* **Details**
|
|
5845
|
+
*
|
|
5629
5846
|
* The default JSON serializer encodes a `File` as `{ data, type, name, lastModified }`
|
|
5630
5847
|
* where `data` is base64-encoded.
|
|
5631
5848
|
*
|
|
@@ -5678,6 +5895,8 @@ export const File = /*#__PURE__*/instanceOf(globalThis.File, {
|
|
|
5678
5895
|
/**
|
|
5679
5896
|
* Schema for JavaScript `FormData` objects.
|
|
5680
5897
|
*
|
|
5898
|
+
* **Details**
|
|
5899
|
+
*
|
|
5681
5900
|
* The default JSON serializer encodes a `FormData` as an array of `[key, entry]`
|
|
5682
5901
|
* pairs where each entry is tagged as `"String"` or `"File"`.
|
|
5683
5902
|
*
|
|
@@ -5729,11 +5948,20 @@ export const FormData = /*#__PURE__*/instanceOf(globalThis.FormData, {
|
|
|
5729
5948
|
* converts it into a tree record using bracket notation, and then decodes the
|
|
5730
5949
|
* resulting structure using the provided schema.
|
|
5731
5950
|
*
|
|
5951
|
+
* **Details**
|
|
5952
|
+
*
|
|
5732
5953
|
* The decoding process has two steps:
|
|
5733
5954
|
*
|
|
5734
5955
|
* 1. Parse `FormData` into a nested tree record.
|
|
5735
5956
|
* 2. Decode the parsed value with the given schema.
|
|
5736
5957
|
*
|
|
5958
|
+
* You can express nested values using bracket notation.
|
|
5959
|
+
*
|
|
5960
|
+
* If you want to decode values that are not strings, use
|
|
5961
|
+
* `Schema.toCodecStringTree` with the `keepDeclarations: true` option.
|
|
5962
|
+
* This serializer preserves values such as numbers and `Blob` objects when
|
|
5963
|
+
* compatible with the schema.
|
|
5964
|
+
*
|
|
5737
5965
|
* **Example** (Decoding a flat structure)
|
|
5738
5966
|
*
|
|
5739
5967
|
* ```ts
|
|
@@ -5753,8 +5981,6 @@ export const FormData = /*#__PURE__*/instanceOf(globalThis.FormData, {
|
|
|
5753
5981
|
* // Success({"a":"1"})
|
|
5754
5982
|
* ```
|
|
5755
5983
|
*
|
|
5756
|
-
* You can express nested values using bracket notation.
|
|
5757
|
-
*
|
|
5758
5984
|
* **Example** (Nested fields)
|
|
5759
5985
|
*
|
|
5760
5986
|
* ```ts
|
|
@@ -5779,11 +6005,6 @@ export const FormData = /*#__PURE__*/instanceOf(globalThis.FormData, {
|
|
|
5779
6005
|
* // Success({"a":"1","b":{"c":"2","d":"3"}})
|
|
5780
6006
|
* ```
|
|
5781
6007
|
*
|
|
5782
|
-
* If you want to decode values that are not strings, use
|
|
5783
|
-
* `Schema.toCodecStringTree` with the `keepDeclarations: true` option.
|
|
5784
|
-
* This serializer preserves values such as numbers and `Blob` objects when
|
|
5785
|
-
* compatible with the schema.
|
|
5786
|
-
*
|
|
5787
6008
|
* **Example** (Parsing non-string values)
|
|
5788
6009
|
*
|
|
5789
6010
|
* ```ts
|
|
@@ -5814,6 +6035,8 @@ export function fromFormData(schema) {
|
|
|
5814
6035
|
/**
|
|
5815
6036
|
* Schema for JavaScript `URLSearchParams` objects.
|
|
5816
6037
|
*
|
|
6038
|
+
* **Details**
|
|
6039
|
+
*
|
|
5817
6040
|
* The default JSON serializer encodes a `URLSearchParams` as a query string.
|
|
5818
6041
|
*
|
|
5819
6042
|
* @category URLSearchParams
|
|
@@ -5840,11 +6063,19 @@ export const URLSearchParams = /*#__PURE__*/instanceOf(globalThis.URLSearchParam
|
|
|
5840
6063
|
* instance, converts it into a tree record using bracket notation, and then
|
|
5841
6064
|
* decodes the resulting structure using the provided schema.
|
|
5842
6065
|
*
|
|
6066
|
+
* **Details**
|
|
6067
|
+
*
|
|
5843
6068
|
* The decoding process has two steps:
|
|
5844
6069
|
*
|
|
5845
6070
|
* 1. Parse `URLSearchParams` into a nested tree record.
|
|
5846
6071
|
* 2. Decode the parsed value with the given schema.
|
|
5847
6072
|
*
|
|
6073
|
+
* You can express nested values using bracket notation.
|
|
6074
|
+
*
|
|
6075
|
+
* If you want to decode values that are not strings, use
|
|
6076
|
+
* `Schema.toCodecStringTree`. This serializer preserves values such as
|
|
6077
|
+
* numbers when compatible with the schema.
|
|
6078
|
+
*
|
|
5848
6079
|
* **Example** (Decoding a flat structure)
|
|
5849
6080
|
*
|
|
5850
6081
|
* ```ts
|
|
@@ -5861,7 +6092,6 @@ export const URLSearchParams = /*#__PURE__*/instanceOf(globalThis.URLSearchParam
|
|
|
5861
6092
|
* console.log(String(Schema.decodeUnknownExit(schema)(urlSearchParams)))
|
|
5862
6093
|
* // Success({"a":"1"})
|
|
5863
6094
|
* ```
|
|
5864
|
-
* You can express nested values using bracket notation.
|
|
5865
6095
|
*
|
|
5866
6096
|
* **Example** (Nested fields)
|
|
5867
6097
|
*
|
|
@@ -5884,10 +6114,6 @@ export const URLSearchParams = /*#__PURE__*/instanceOf(globalThis.URLSearchParam
|
|
|
5884
6114
|
* // Success({"a":"1","b":{"c":"2","d":"3"}})
|
|
5885
6115
|
* ```
|
|
5886
6116
|
*
|
|
5887
|
-
* If you want to decode values that are not strings, use
|
|
5888
|
-
* `Schema.toCodecStringTree`. This serializer preserves values such as
|
|
5889
|
-
* numbers when compatible with the schema.
|
|
5890
|
-
*
|
|
5891
6117
|
* **Example** (Parsing non-string values)
|
|
5892
6118
|
*
|
|
5893
6119
|
* ```ts
|
|
@@ -5931,12 +6157,14 @@ export const Int = /*#__PURE__*/Number.check(/*#__PURE__*/isInt());
|
|
|
5931
6157
|
* A transformation schema that parses a string into a `number` using JavaScript
|
|
5932
6158
|
* number coercion.
|
|
5933
6159
|
*
|
|
5934
|
-
* **
|
|
6160
|
+
* **Details**
|
|
6161
|
+
*
|
|
6162
|
+
* Decoding:
|
|
5935
6163
|
* A `string` is decoded as a number, including possible non-finite values such as
|
|
5936
6164
|
* `NaN`, `Infinity`, and `-Infinity`. Use `FiniteFromString` to reject non-finite
|
|
5937
6165
|
* numbers.
|
|
5938
6166
|
*
|
|
5939
|
-
*
|
|
6167
|
+
* Encoding:
|
|
5940
6168
|
* A number is encoded as a `string`.
|
|
5941
6169
|
*
|
|
5942
6170
|
* @category Number
|
|
@@ -5948,6 +6176,8 @@ export const NumberFromString = /*#__PURE__*/String.annotate({
|
|
|
5948
6176
|
/**
|
|
5949
6177
|
* A transformation schema that parses a string into a finite number.
|
|
5950
6178
|
*
|
|
6179
|
+
* **Details**
|
|
6180
|
+
*
|
|
5951
6181
|
* Decoding:
|
|
5952
6182
|
* - A `string` is decoded as a finite number, rejecting `NaN`, `Infinity`, and
|
|
5953
6183
|
* `-Infinity` values.
|
|
@@ -5964,6 +6194,8 @@ export const FiniteFromString = /*#__PURE__*/String.annotate({
|
|
|
5964
6194
|
/**
|
|
5965
6195
|
* A transformation schema that parses a string into a `bigint`.
|
|
5966
6196
|
*
|
|
6197
|
+
* **Details**
|
|
6198
|
+
*
|
|
5967
6199
|
* Decoding:
|
|
5968
6200
|
* - A `string` is decoded as a `bigint`.
|
|
5969
6201
|
*
|
|
@@ -5984,6 +6216,8 @@ export const Trimmed = /*#__PURE__*/String.check(/*#__PURE__*/isTrimmed());
|
|
|
5984
6216
|
/**
|
|
5985
6217
|
* A transformation schema that trims whitespace from a string.
|
|
5986
6218
|
*
|
|
6219
|
+
* **Details**
|
|
6220
|
+
*
|
|
5987
6221
|
* Decoding:
|
|
5988
6222
|
* - A `string` is decoded as a string with no leading or trailing whitespaces.
|
|
5989
6223
|
*
|
|
@@ -5999,6 +6233,8 @@ export const Trim = /*#__PURE__*/String.annotate({
|
|
|
5999
6233
|
/**
|
|
6000
6234
|
* Decodes a base64 (RFC4648) encoded string into a UTF-8 string.
|
|
6001
6235
|
*
|
|
6236
|
+
* **Details**
|
|
6237
|
+
*
|
|
6002
6238
|
* Decoding:
|
|
6003
6239
|
* - A **valid** base64 encoded string is decoded as a UTF-8 `string`.
|
|
6004
6240
|
*
|
|
@@ -6014,6 +6250,8 @@ export const StringFromBase64 = /*#__PURE__*/String.annotate({
|
|
|
6014
6250
|
/**
|
|
6015
6251
|
* Decodes a base64 (URL) encoded string into a UTF-8 string.
|
|
6016
6252
|
*
|
|
6253
|
+
* **Details**
|
|
6254
|
+
*
|
|
6017
6255
|
* Decoding:
|
|
6018
6256
|
* - A **valid** base64 (URL) encoded string is decoded as a UTF-8 `string`.
|
|
6019
6257
|
*
|
|
@@ -6029,6 +6267,8 @@ export const StringFromBase64Url = /*#__PURE__*/String.annotate({
|
|
|
6029
6267
|
/**
|
|
6030
6268
|
* Decodes a hex encoded string into a UTF-8 string.
|
|
6031
6269
|
*
|
|
6270
|
+
* **Details**
|
|
6271
|
+
*
|
|
6032
6272
|
* Decoding:
|
|
6033
6273
|
* - A **valid** hex encoded string is decoded as a UTF-8 `string`.
|
|
6034
6274
|
*
|
|
@@ -6045,6 +6285,8 @@ export const StringFromHex = /*#__PURE__*/String.annotate({
|
|
|
6045
6285
|
* Decodes a URI component encoded string into a UTF-8 string.
|
|
6046
6286
|
* Can be used to store data in a URL.
|
|
6047
6287
|
*
|
|
6288
|
+
* **Details**
|
|
6289
|
+
*
|
|
6048
6290
|
* Decoding:
|
|
6049
6291
|
* - A **valid** URI component encoded string is decoded as a UTF-8 `string`.
|
|
6050
6292
|
*
|
|
@@ -6086,6 +6328,8 @@ export const PropertyKey = /*#__PURE__*/Union([Finite, Symbol, String]);
|
|
|
6086
6328
|
/**
|
|
6087
6329
|
* Schema for a Standard Schema v1 failure result.
|
|
6088
6330
|
*
|
|
6331
|
+
* **Details**
|
|
6332
|
+
*
|
|
6089
6333
|
* The result contains an `issues` array where each issue has a message and an
|
|
6090
6334
|
* optional path made of property keys or keyed path segments.
|
|
6091
6335
|
*
|
|
@@ -6118,7 +6362,9 @@ const Base64String = /*#__PURE__*/String.annotate({
|
|
|
6118
6362
|
/**
|
|
6119
6363
|
* A schema for JavaScript `Uint8Array` objects.
|
|
6120
6364
|
*
|
|
6121
|
-
* **
|
|
6365
|
+
* **Details**
|
|
6366
|
+
*
|
|
6367
|
+
* Default JSON serializer:
|
|
6122
6368
|
*
|
|
6123
6369
|
* The default JSON serializer encodes Uint8Array as a Base64 encoded string.
|
|
6124
6370
|
*
|
|
@@ -6141,6 +6387,8 @@ export const Uint8Array = /*#__PURE__*/instanceOf(globalThis.Uint8Array, {
|
|
|
6141
6387
|
* A transformation schema that decodes a base64 encoded string into a
|
|
6142
6388
|
* `Uint8Array`.
|
|
6143
6389
|
*
|
|
6390
|
+
* **Details**
|
|
6391
|
+
*
|
|
6144
6392
|
* Decoding:
|
|
6145
6393
|
* - A **valid** base64 encoded string is decoded as a `Uint8Array`.
|
|
6146
6394
|
*
|
|
@@ -6155,6 +6403,8 @@ export const Uint8ArrayFromBase64 = /*#__PURE__*/Base64String.pipe(/*#__PURE__*/
|
|
|
6155
6403
|
* A transformation schema that decodes a base64 (URL) encoded string into a
|
|
6156
6404
|
* `Uint8Array`.
|
|
6157
6405
|
*
|
|
6406
|
+
* **Details**
|
|
6407
|
+
*
|
|
6158
6408
|
* Decoding:
|
|
6159
6409
|
* - A **valid** base64 (URL) encoded string is decoded as a `Uint8Array`.
|
|
6160
6410
|
*
|
|
@@ -6174,6 +6424,8 @@ export const Uint8ArrayFromBase64Url = /*#__PURE__*/String.annotate({
|
|
|
6174
6424
|
* A transformation schema that decodes a hex encoded string into a
|
|
6175
6425
|
* `Uint8Array`.
|
|
6176
6426
|
*
|
|
6427
|
+
* **Details**
|
|
6428
|
+
*
|
|
6177
6429
|
* Decoding:
|
|
6178
6430
|
* - A **valid** hex encoded string is decoded as a `Uint8Array`.
|
|
6179
6431
|
*
|
|
@@ -6192,7 +6444,9 @@ export const Uint8ArrayFromHex = /*#__PURE__*/String.annotate({
|
|
|
6192
6444
|
/**
|
|
6193
6445
|
* A schema for `DateTime.Utc` values.
|
|
6194
6446
|
*
|
|
6195
|
-
* **
|
|
6447
|
+
* **Details**
|
|
6448
|
+
*
|
|
6449
|
+
* Default JSON serializer:
|
|
6196
6450
|
*
|
|
6197
6451
|
* - encodes `DateTime.Utc` as a UTC ISO string
|
|
6198
6452
|
*
|
|
@@ -6220,6 +6474,8 @@ export const DateTimeUtc = /*#__PURE__*/declare(u => DateTime.isDateTime(u) && D
|
|
|
6220
6474
|
/**
|
|
6221
6475
|
* A transformation schema that decodes a `Date` into a `DateTime.Utc`.
|
|
6222
6476
|
*
|
|
6477
|
+
* **Details**
|
|
6478
|
+
*
|
|
6223
6479
|
* Decoding:
|
|
6224
6480
|
* - A **valid** `Date` is decoded as a `DateTime.Utc`
|
|
6225
6481
|
*
|
|
@@ -6236,6 +6492,8 @@ export const DateTimeUtcFromDate = /*#__PURE__*/DateValid.pipe(/*#__PURE__*/deco
|
|
|
6236
6492
|
/**
|
|
6237
6493
|
* A transformation schema that decodes a date-time string into a `DateTime.Utc`.
|
|
6238
6494
|
*
|
|
6495
|
+
* **Details**
|
|
6496
|
+
*
|
|
6239
6497
|
* Decoding:
|
|
6240
6498
|
*
|
|
6241
6499
|
* - A string accepted by `DateTime.make` is parsed and normalized to UTC. Strings
|
|
@@ -6254,6 +6512,8 @@ export const DateTimeUtcFromString = /*#__PURE__*/String.annotate({
|
|
|
6254
6512
|
/**
|
|
6255
6513
|
* A transformation schema that decodes a number into a `DateTime.Utc`.
|
|
6256
6514
|
*
|
|
6515
|
+
* **Details**
|
|
6516
|
+
*
|
|
6257
6517
|
* Decoding:
|
|
6258
6518
|
* - A number of milliseconds since the Unix epoch is decoded as a `DateTime.Utc`
|
|
6259
6519
|
*
|
|
@@ -6270,7 +6530,9 @@ export const DateTimeUtcFromMillis = /*#__PURE__*/Number.pipe(/*#__PURE__*/decod
|
|
|
6270
6530
|
/**
|
|
6271
6531
|
* A schema for `DateTime.TimeZone.Offset` values.
|
|
6272
6532
|
*
|
|
6273
|
-
* **
|
|
6533
|
+
* **Details**
|
|
6534
|
+
*
|
|
6535
|
+
* Default JSON serializer:
|
|
6274
6536
|
*
|
|
6275
6537
|
* - encodes `DateTime.TimeZone.Offset` as a number (offset in milliseconds)
|
|
6276
6538
|
*
|
|
@@ -6301,7 +6563,9 @@ const TimeZoneNamedString = /*#__PURE__*/String.annotate({
|
|
|
6301
6563
|
/**
|
|
6302
6564
|
* A schema for `DateTime.TimeZone.Named` values.
|
|
6303
6565
|
*
|
|
6304
|
-
* **
|
|
6566
|
+
* **Details**
|
|
6567
|
+
*
|
|
6568
|
+
* Default JSON serializer:
|
|
6305
6569
|
*
|
|
6306
6570
|
* - encodes `DateTime.TimeZone.Named` as a string (IANA time zone identifier)
|
|
6307
6571
|
*
|
|
@@ -6326,6 +6590,8 @@ export const TimeZoneNamed = /*#__PURE__*/declare(DateTime.isTimeZoneNamed, {
|
|
|
6326
6590
|
/**
|
|
6327
6591
|
* A transformation schema that parses an IANA time zone identifier string into a `DateTime.TimeZone.Named`.
|
|
6328
6592
|
*
|
|
6593
|
+
* **Details**
|
|
6594
|
+
*
|
|
6329
6595
|
* Decoding:
|
|
6330
6596
|
* - A `string` is decoded as a `DateTime.TimeZone.Named`.
|
|
6331
6597
|
*
|
|
@@ -6342,7 +6608,9 @@ const TimeZoneString = /*#__PURE__*/String.annotate({
|
|
|
6342
6608
|
/**
|
|
6343
6609
|
* A schema for `DateTime.TimeZone` values.
|
|
6344
6610
|
*
|
|
6345
|
-
* **
|
|
6611
|
+
* **Details**
|
|
6612
|
+
*
|
|
6613
|
+
* Default JSON serializer:
|
|
6346
6614
|
*
|
|
6347
6615
|
* - encodes `DateTime.TimeZone` as a string (IANA identifier or offset like
|
|
6348
6616
|
* `+03:00`)
|
|
@@ -6371,6 +6639,8 @@ export const TimeZone = /*#__PURE__*/declare(DateTime.isTimeZone, {
|
|
|
6371
6639
|
/**
|
|
6372
6640
|
* A transformation schema that parses a time zone string into a `DateTime.TimeZone`.
|
|
6373
6641
|
*
|
|
6642
|
+
* **Details**
|
|
6643
|
+
*
|
|
6374
6644
|
* Decoding:
|
|
6375
6645
|
* - A `string` (IANA identifier or offset like `+03:00`) is decoded as a `DateTime.TimeZone`.
|
|
6376
6646
|
*
|
|
@@ -6387,7 +6657,9 @@ const DateTimeZonedString = /*#__PURE__*/String.annotate({
|
|
|
6387
6657
|
/**
|
|
6388
6658
|
* A schema for `DateTime.Zoned` values.
|
|
6389
6659
|
*
|
|
6390
|
-
* **
|
|
6660
|
+
* **Details**
|
|
6661
|
+
*
|
|
6662
|
+
* Default JSON serializer:
|
|
6391
6663
|
*
|
|
6392
6664
|
* - encodes offset zones as an ISO date-time with a numeric offset, such as
|
|
6393
6665
|
* `YYYY-MM-DDTHH:mm:ss.sss+HH:MM`
|
|
@@ -6422,6 +6694,8 @@ export const DateTimeZoned = /*#__PURE__*/declare(u => DateTime.isDateTime(u) &&
|
|
|
6422
6694
|
/**
|
|
6423
6695
|
* A transformation schema that parses a zoned DateTime string into a `DateTime.Zoned`.
|
|
6424
6696
|
*
|
|
6697
|
+
* **Details**
|
|
6698
|
+
*
|
|
6425
6699
|
* Decoding:
|
|
6426
6700
|
* - A `string` (e.g. `2024-01-01T00:00:00.000+00:00[Europe/London]`) is decoded as a `DateTime.Zoned`.
|
|
6427
6701
|
*
|
|
@@ -6537,6 +6811,8 @@ function isStruct(schema) {
|
|
|
6537
6811
|
* {@link Struct} schema. Construction throws a {@link SchemaError} on invalid
|
|
6538
6812
|
* input (unless `disableChecks` is set in the options).
|
|
6539
6813
|
*
|
|
6814
|
+
* **Details**
|
|
6815
|
+
*
|
|
6540
6816
|
* Pass the desired class type as the first type parameter. The second optional
|
|
6541
6817
|
* type parameter can be used to add nominal brands.
|
|
6542
6818
|
*
|
|
@@ -6591,6 +6867,8 @@ export const Class = identifier => (schema, annotations) => {
|
|
|
6591
6867
|
* given `tag` value. This makes instances compatible with tagged union
|
|
6592
6868
|
* discrimination patterns.
|
|
6593
6869
|
*
|
|
6870
|
+
* **Details**
|
|
6871
|
+
*
|
|
6594
6872
|
* The optional `identifier` parameter overrides the schema identifier;
|
|
6595
6873
|
* it defaults to the `tag` value.
|
|
6596
6874
|
*
|
|
@@ -6689,6 +6967,8 @@ export const TaggedErrorClass = identifier => {
|
|
|
6689
6967
|
* Derives a {@link LazyArbitrary} from a schema. The result is memoized so
|
|
6690
6968
|
* repeated calls with the same schema are cheap.
|
|
6691
6969
|
*
|
|
6970
|
+
* **Details**
|
|
6971
|
+
*
|
|
6692
6972
|
* Prefer {@link toArbitrary} when you just need the arbitrary directly.
|
|
6693
6973
|
*
|
|
6694
6974
|
* @category Arbitrary
|
|
@@ -6729,6 +7009,8 @@ export function toArbitrary(schema) {
|
|
|
6729
7009
|
/**
|
|
6730
7010
|
* Annotates a schema with a custom formatter used by `toFormatter`.
|
|
6731
7011
|
*
|
|
7012
|
+
* **Details**
|
|
7013
|
+
*
|
|
6732
7014
|
* Use this when the formatter derived from the schema structure is not suitable.
|
|
6733
7015
|
* The annotation is applied through this helper because adding it directly to
|
|
6734
7016
|
* `Annotations.Bottom` would make schemas invariant.
|
|
@@ -6748,6 +7030,8 @@ export function overrideToFormatter(toFormatter) {
|
|
|
6748
7030
|
* a value to its human-readable string representation, recursing into structs,
|
|
6749
7031
|
* arrays, and unions.
|
|
6750
7032
|
*
|
|
7033
|
+
* **Details**
|
|
7034
|
+
*
|
|
6751
7035
|
* The optional `onBefore` hook lets you intercept specific AST nodes before
|
|
6752
7036
|
* the default formatting logic runs.
|
|
6753
7037
|
*
|
|
@@ -6940,6 +7224,8 @@ export function toRepresentation(schema) {
|
|
|
6940
7224
|
/**
|
|
6941
7225
|
* Returns a JSON Schema document using draft 2020-12.
|
|
6942
7226
|
*
|
|
7227
|
+
* **Details**
|
|
7228
|
+
*
|
|
6943
7229
|
* The `options` parameter controls generation details such as additional
|
|
6944
7230
|
* properties and synthesized check descriptions; it does not change the draft
|
|
6945
7231
|
* target.
|
|
@@ -7062,6 +7348,8 @@ export function toCodecStringTree(schema, options) {
|
|
|
7062
7348
|
/**
|
|
7063
7349
|
* Derives an XML encoder from a codec.
|
|
7064
7350
|
*
|
|
7351
|
+
* **Details**
|
|
7352
|
+
*
|
|
7065
7353
|
* The returned function encodes a value through `toCodecStringTree` and returns
|
|
7066
7354
|
* an `Effect` that succeeds with the XML string or fails with `SchemaError` if
|
|
7067
7355
|
* codec encoding fails.
|