effect 4.0.0-rc.111 → 4.0.0-rc.113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +24 -9
- package/CLAUDE.md +24 -9
- package/ai-docs/package.json +2 -2
- package/ai-docs/src/01_effect/01_basics/02_effect-fn.ts +18 -5
- package/ai-docs/src/01_effect/01_basics/index.md +5 -3
- package/ai-docs/src/01_effect/03_services/20_layer-composition.ts +1 -1
- package/ai-docs/src/01_effect/03_services/20_layer-unwrap.ts +2 -2
- package/ai-docs/src/01_effect/05_resources/10_acquire-release.ts +2 -2
- package/ai-docs/src/03_stream/30_encoding.ts +5 -7
- package/ai-docs/src/08_observability/10_logging.ts +1 -1
- package/ai-docs/src/70_cli/10_basics.ts +7 -7
- package/ai-docs/src/71_ai/10_language-model.ts +2 -2
- package/ai-docs/src/71_ai/20_tools.ts +1 -1
- package/ai-docs/src/71_ai/30_chat.ts +1 -1
- package/dist/Array.d.ts +109 -52
- package/dist/Array.d.ts.map +1 -1
- package/dist/Array.js +65 -32
- package/dist/Array.js.map +1 -1
- package/dist/BigDecimal.d.ts +5 -1
- package/dist/BigDecimal.d.ts.map +1 -1
- package/dist/BigDecimal.js +40 -23
- package/dist/BigDecimal.js.map +1 -1
- package/dist/ByteSize.d.ts +633 -0
- package/dist/ByteSize.d.ts.map +1 -0
- package/dist/ByteSize.js +524 -0
- package/dist/ByteSize.js.map +1 -0
- package/dist/Cache.d.ts.map +1 -1
- package/dist/Cache.js +17 -3
- package/dist/Cache.js.map +1 -1
- package/dist/Cause.d.ts +1 -1
- package/dist/Cause.d.ts.map +1 -1
- package/dist/Channel.d.ts +97 -24
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +68 -41
- package/dist/Channel.js.map +1 -1
- package/dist/Chunk.d.ts +49 -28
- package/dist/Chunk.d.ts.map +1 -1
- package/dist/Chunk.js +27 -18
- package/dist/Chunk.js.map +1 -1
- package/dist/Config.d.ts +162 -201
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js +103 -212
- package/dist/Config.js.map +1 -1
- package/dist/ConfigProvider.d.ts +4 -4
- package/dist/ConfigProvider.d.ts.map +1 -1
- package/dist/ConfigProvider.js +7 -7
- package/dist/ConfigProvider.js.map +1 -1
- package/dist/Context.d.ts +31 -0
- package/dist/Context.d.ts.map +1 -1
- package/dist/Context.js.map +1 -1
- package/dist/Cron.d.ts +2 -2
- package/dist/Cron.d.ts.map +1 -1
- package/dist/Cron.js +2 -2
- package/dist/Cron.js.map +1 -1
- package/dist/Crypto.d.ts +1 -1
- package/dist/Crypto.d.ts.map +1 -1
- package/dist/Crypto.js +3 -2
- package/dist/Crypto.js.map +1 -1
- package/dist/DateTime.d.ts +2 -2
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/Deferred.d.ts.map +1 -1
- package/dist/Deferred.js +6 -6
- package/dist/Deferred.js.map +1 -1
- package/dist/Duration.d.ts +1 -1
- package/dist/Duration.d.ts.map +1 -1
- package/dist/Duration.js +1 -1
- package/dist/Duration.js.map +1 -1
- package/dist/Effect.d.ts +220 -113
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +27 -26
- package/dist/Effect.js.map +1 -1
- package/dist/Effectable.d.ts +58 -2
- package/dist/Effectable.d.ts.map +1 -1
- package/dist/Effectable.js +58 -6
- package/dist/Effectable.js.map +1 -1
- package/dist/Encoding.d.ts +3 -1
- package/dist/Encoding.d.ts.map +1 -1
- package/dist/Encoding.js +40 -10
- package/dist/Encoding.js.map +1 -1
- package/dist/Equal.d.ts +1 -1
- package/dist/Equal.d.ts.map +1 -1
- package/dist/Equal.js +1 -1
- package/dist/Equal.js.map +1 -1
- package/dist/ExecutionPlan.d.ts.map +1 -1
- package/dist/ExecutionPlan.js +1 -0
- package/dist/ExecutionPlan.js.map +1 -1
- package/dist/Fiber.d.ts +32 -8
- package/dist/Fiber.d.ts.map +1 -1
- package/dist/Fiber.js.map +1 -1
- package/dist/FiberHandle.js +3 -3
- package/dist/FiberHandle.js.map +1 -1
- package/dist/FiberMap.d.ts +12 -6
- package/dist/FiberMap.d.ts.map +1 -1
- package/dist/FiberMap.js +11 -6
- package/dist/FiberMap.js.map +1 -1
- package/dist/FileSystem.d.ts +42 -210
- package/dist/FileSystem.d.ts.map +1 -1
- package/dist/FileSystem.js +16 -148
- package/dist/FileSystem.js.map +1 -1
- package/dist/Formatter.d.ts +1 -0
- package/dist/Formatter.d.ts.map +1 -1
- package/dist/Formatter.js +19 -3
- package/dist/Formatter.js.map +1 -1
- package/dist/Graph.d.ts +48 -20
- package/dist/Graph.d.ts.map +1 -1
- package/dist/Graph.js +20 -5
- package/dist/Graph.js.map +1 -1
- package/dist/Hash.d.ts +1 -1
- package/dist/Hash.d.ts.map +1 -1
- package/dist/Hash.js +5 -14
- package/dist/Hash.js.map +1 -1
- package/dist/HashMap.d.ts +1 -1
- package/dist/HashMap.d.ts.map +1 -1
- package/dist/HashRing.d.ts +6 -1
- package/dist/HashRing.d.ts.map +1 -1
- package/dist/HashRing.js +9 -2
- package/dist/HashRing.js.map +1 -1
- package/dist/HashSet.d.ts +1 -1
- package/dist/HashSet.d.ts.map +1 -1
- package/dist/HashSet.js.map +1 -1
- package/dist/Iterable.d.ts +56 -17
- package/dist/Iterable.d.ts.map +1 -1
- package/dist/Iterable.js +65 -45
- package/dist/Iterable.js.map +1 -1
- package/dist/JsonPatch.js +4 -4
- package/dist/JsonPatch.js.map +1 -1
- package/dist/JsonPointer.d.ts +68 -4
- package/dist/JsonPointer.d.ts.map +1 -1
- package/dist/JsonPointer.js +90 -4
- package/dist/JsonPointer.js.map +1 -1
- package/dist/JsonSchema.d.ts +67 -94
- package/dist/JsonSchema.d.ts.map +1 -1
- package/dist/JsonSchema.js +752 -397
- package/dist/JsonSchema.js.map +1 -1
- package/dist/Layer.d.ts +47 -4
- package/dist/Layer.d.ts.map +1 -1
- package/dist/Layer.js +4 -6
- package/dist/Layer.js.map +1 -1
- package/dist/LayerMap.d.ts +24 -3
- package/dist/LayerMap.d.ts.map +1 -1
- package/dist/LayerMap.js +9 -5
- package/dist/LayerMap.js.map +1 -1
- package/dist/LayerRef.d.ts.map +1 -1
- package/dist/LayerRef.js +7 -5
- package/dist/LayerRef.js.map +1 -1
- package/dist/Logger.d.ts +114 -9
- package/dist/Logger.d.ts.map +1 -1
- package/dist/Logger.js +109 -9
- package/dist/Logger.js.map +1 -1
- package/dist/ManagedRuntime.js +1 -1
- package/dist/ManagedRuntime.js.map +1 -1
- package/dist/Match.d.ts +43 -31
- package/dist/Match.d.ts.map +1 -1
- package/dist/Match.js +5 -2
- package/dist/Match.js.map +1 -1
- package/dist/Metric.d.ts +11 -4
- package/dist/Metric.d.ts.map +1 -1
- package/dist/Metric.js +14 -18
- package/dist/Metric.js.map +1 -1
- package/dist/MutableHashMap.d.ts +1 -1
- package/dist/MutableHashMap.d.ts.map +1 -1
- package/dist/MutableHashMap.js +1 -1
- package/dist/MutableHashMap.js.map +1 -1
- package/dist/MutableHashSet.d.ts +1 -1
- package/dist/MutableHashSet.d.ts.map +1 -1
- package/dist/MutableHashSet.js +1 -1
- package/dist/MutableHashSet.js.map +1 -1
- package/dist/MutableList.d.ts +13 -2
- package/dist/MutableList.d.ts.map +1 -1
- package/dist/MutableList.js +18 -2
- package/dist/MutableList.js.map +1 -1
- package/dist/Number.d.ts +6 -0
- package/dist/Number.d.ts.map +1 -1
- package/dist/Number.js +3 -1
- package/dist/Number.js.map +1 -1
- package/dist/Optic.d.ts.map +1 -1
- package/dist/Optic.js +5 -4
- package/dist/Optic.js.map +1 -1
- package/dist/Option.d.ts +1 -1
- package/dist/Option.d.ts.map +1 -1
- package/dist/Option.js +1 -1
- package/dist/Option.js.map +1 -1
- package/dist/Order.d.ts +1 -0
- package/dist/Order.d.ts.map +1 -1
- package/dist/Order.js +3 -1
- package/dist/Order.js.map +1 -1
- package/dist/PartitionedSemaphore.d.ts.map +1 -1
- package/dist/PartitionedSemaphore.js +1 -2
- package/dist/PartitionedSemaphore.js.map +1 -1
- package/dist/Path.d.ts +1 -1
- package/dist/Path.d.ts.map +1 -1
- package/dist/Path.js +1 -1
- package/dist/Path.js.map +1 -1
- package/dist/PlatformError.d.ts +1 -1
- package/dist/PlatformError.d.ts.map +1 -1
- package/dist/PlatformError.js +1 -1
- package/dist/PlatformError.js.map +1 -1
- package/dist/Pool.d.ts +137 -10
- package/dist/Pool.d.ts.map +1 -1
- package/dist/Pool.js +332 -75
- package/dist/Pool.js.map +1 -1
- package/dist/PrimaryKey.d.ts +1 -1
- package/dist/PrimaryKey.d.ts.map +1 -1
- package/dist/PrimaryKey.js +1 -1
- package/dist/PrimaryKey.js.map +1 -1
- package/dist/PubSub.d.ts +21 -9
- package/dist/PubSub.d.ts.map +1 -1
- package/dist/PubSub.js +18 -14
- package/dist/PubSub.js.map +1 -1
- package/dist/Queue.d.ts +82 -6
- package/dist/Queue.d.ts.map +1 -1
- package/dist/Queue.js +116 -27
- package/dist/Queue.js.map +1 -1
- package/dist/Random.d.ts +17 -4
- package/dist/Random.d.ts.map +1 -1
- package/dist/Random.js +1 -1
- package/dist/Random.js.map +1 -1
- package/dist/RcMap.d.ts +137 -0
- package/dist/RcMap.d.ts.map +1 -1
- package/dist/RcMap.js +72 -9
- package/dist/RcMap.js.map +1 -1
- package/dist/Record.d.ts +13 -0
- package/dist/Record.d.ts.map +1 -1
- package/dist/Record.js.map +1 -1
- package/dist/Redacted.d.ts +1 -1
- package/dist/Redacted.d.ts.map +1 -1
- package/dist/Redacted.js +1 -1
- package/dist/Redacted.js.map +1 -1
- package/dist/RequestResolver.d.ts +15 -9
- package/dist/RequestResolver.d.ts.map +1 -1
- package/dist/RequestResolver.js +33 -15
- package/dist/RequestResolver.js.map +1 -1
- package/dist/Result.d.ts +1 -1
- package/dist/Result.d.ts.map +1 -1
- package/dist/Result.js +1 -1
- package/dist/Result.js.map +1 -1
- package/dist/Scheduler.d.ts.map +1 -1
- package/dist/Scheduler.js +19 -10
- package/dist/Scheduler.js.map +1 -1
- package/dist/Schema.d.ts +2200 -2433
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +2797 -4184
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +359 -176
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +373 -630
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaGetter.d.ts +46 -22
- package/dist/SchemaGetter.d.ts.map +1 -1
- package/dist/SchemaGetter.js +56 -53
- package/dist/SchemaGetter.js.map +1 -1
- package/dist/SchemaIssue.d.ts +123 -200
- package/dist/SchemaIssue.d.ts.map +1 -1
- package/dist/SchemaIssue.js +59 -263
- package/dist/SchemaIssue.js.map +1 -1
- package/dist/SchemaParser.js +2 -9
- package/dist/SchemaParser.js.map +1 -1
- package/dist/SchemaRepresentation.d.ts +1276 -172
- package/dist/SchemaRepresentation.d.ts.map +1 -1
- package/dist/SchemaRepresentation.js +1371 -29
- package/dist/SchemaRepresentation.js.map +1 -1
- package/dist/SchemaTransformation.d.ts +49 -16
- package/dist/SchemaTransformation.d.ts.map +1 -1
- package/dist/SchemaTransformation.js +75 -98
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/Scope.d.ts +9 -2
- package/dist/Scope.d.ts.map +1 -1
- package/dist/Scope.js.map +1 -1
- package/dist/ScopedCache.d.ts.map +1 -1
- package/dist/ScopedCache.js +10 -3
- package/dist/ScopedCache.js.map +1 -1
- package/dist/Sink.d.ts +9 -4
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Sink.js +49 -31
- package/dist/Sink.js.map +1 -1
- package/dist/StandardSchema.d.ts +125 -0
- package/dist/StandardSchema.d.ts.map +1 -0
- package/dist/StandardSchema.js +9 -0
- package/dist/StandardSchema.js.map +1 -0
- package/dist/Stream.d.ts +221 -35
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +168 -84
- package/dist/Stream.js.map +1 -1
- package/dist/String.d.ts +16 -6
- package/dist/String.d.ts.map +1 -1
- package/dist/String.js +12 -5
- package/dist/String.js.map +1 -1
- package/dist/Struct.d.ts.map +1 -1
- package/dist/Struct.js +7 -4
- package/dist/Struct.js.map +1 -1
- package/dist/SynchronizedRef.d.ts +3 -2
- package/dist/SynchronizedRef.d.ts.map +1 -1
- package/dist/SynchronizedRef.js.map +1 -1
- package/dist/Terminal.d.ts +3 -3
- package/dist/Terminal.d.ts.map +1 -1
- package/dist/Terminal.js +3 -3
- package/dist/Terminal.js.map +1 -1
- package/dist/Tracer.d.ts +27 -7
- package/dist/Tracer.d.ts.map +1 -1
- package/dist/Tracer.js +38 -13
- package/dist/Tracer.js.map +1 -1
- package/dist/Trie.d.ts +1 -1
- package/dist/Trie.d.ts.map +1 -1
- package/dist/Tuple.d.ts +2 -1
- package/dist/Tuple.d.ts.map +1 -1
- package/dist/Tuple.js.map +1 -1
- package/dist/TxChunk.d.ts +1 -1
- package/dist/TxChunk.d.ts.map +1 -1
- package/dist/TxChunk.js +1 -1
- package/dist/TxChunk.js.map +1 -1
- package/dist/TxDeferred.d.ts +1 -1
- package/dist/TxDeferred.d.ts.map +1 -1
- package/dist/TxDeferred.js +1 -1
- package/dist/TxDeferred.js.map +1 -1
- package/dist/TxHashMap.d.ts +1 -1
- package/dist/TxHashMap.d.ts.map +1 -1
- package/dist/TxHashMap.js +1 -1
- package/dist/TxHashMap.js.map +1 -1
- package/dist/TxHashSet.d.ts +1 -1
- package/dist/TxHashSet.d.ts.map +1 -1
- package/dist/TxHashSet.js +1 -1
- package/dist/TxHashSet.js.map +1 -1
- package/dist/TxPriorityQueue.d.ts +1 -1
- package/dist/TxPriorityQueue.d.ts.map +1 -1
- package/dist/TxPriorityQueue.js +1 -1
- package/dist/TxPriorityQueue.js.map +1 -1
- package/dist/TxPubSub.d.ts +1 -1
- package/dist/TxPubSub.d.ts.map +1 -1
- package/dist/TxPubSub.js +1 -1
- package/dist/TxPubSub.js.map +1 -1
- package/dist/TxQueue.d.ts +9 -9
- package/dist/TxQueue.d.ts.map +1 -1
- package/dist/TxQueue.js +93 -86
- package/dist/TxQueue.js.map +1 -1
- package/dist/TxReentrantLock.d.ts +29 -1
- package/dist/TxReentrantLock.d.ts.map +1 -1
- package/dist/TxReentrantLock.js +29 -1
- package/dist/TxReentrantLock.js.map +1 -1
- package/dist/TxRef.d.ts +1 -1
- package/dist/TxRef.d.ts.map +1 -1
- package/dist/TxRef.js +1 -1
- package/dist/TxRef.js.map +1 -1
- package/dist/TxSemaphore.d.ts +1 -1
- package/dist/TxSemaphore.d.ts.map +1 -1
- package/dist/TxSemaphore.js +1 -1
- package/dist/TxSemaphore.js.map +1 -1
- package/dist/TxSubscriptionRef.d.ts +1 -1
- package/dist/TxSubscriptionRef.d.ts.map +1 -1
- package/dist/TxSubscriptionRef.js +1 -1
- package/dist/TxSubscriptionRef.js.map +1 -1
- package/dist/Types.d.ts +33 -19
- package/dist/Types.d.ts.map +1 -1
- package/dist/Utils.d.ts.map +1 -1
- package/dist/Utils.js +2 -1
- package/dist/Utils.js.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/internal/arbitrary/model.d.ts +2 -0
- package/dist/internal/arbitrary/model.d.ts.map +1 -0
- package/dist/internal/arbitrary/model.js +495 -0
- package/dist/internal/arbitrary/model.js.map +1 -0
- package/dist/internal/arbitrary/regexp.d.ts +2 -0
- package/dist/internal/arbitrary/regexp.d.ts.map +1 -0
- package/dist/internal/arbitrary/regexp.js +789 -0
- package/dist/internal/arbitrary/regexp.js.map +1 -0
- package/dist/internal/arbitrary/runner.d.ts +2 -0
- package/dist/internal/arbitrary/runner.d.ts.map +1 -0
- package/dist/internal/arbitrary/runner.js +496 -0
- package/dist/internal/arbitrary/runner.js.map +1 -0
- package/dist/internal/arbitrary/schema.d.ts.map +1 -0
- package/dist/internal/arbitrary/schema.js +1340 -0
- package/dist/internal/arbitrary/schema.js.map +1 -0
- package/dist/internal/core.js +27 -13
- package/dist/internal/core.js.map +1 -1
- package/dist/internal/count.d.ts +2 -0
- package/dist/internal/count.d.ts.map +1 -0
- package/dist/internal/count.js +14 -0
- package/dist/internal/count.js.map +1 -0
- package/dist/internal/dateTime.js +4 -10
- package/dist/internal/dateTime.js.map +1 -1
- package/dist/internal/effect.js +416 -258
- package/dist/internal/effect.js.map +1 -1
- package/dist/internal/graph.js +3 -1
- package/dist/internal/graph.js.map +1 -1
- package/dist/internal/hashMap.js +5 -3
- package/dist/internal/hashMap.js.map +1 -1
- package/dist/internal/hashSet.js +1 -1
- package/dist/internal/hashSet.js.map +1 -1
- package/dist/internal/matcher.js +1 -1
- package/dist/internal/matcher.js.map +1 -1
- package/dist/internal/metric.js +1 -1
- package/dist/internal/metric.js.map +1 -1
- package/dist/internal/option.js +6 -5
- package/dist/internal/option.js.map +1 -1
- package/dist/internal/random.js +17 -0
- package/dist/internal/random.js.map +1 -1
- package/dist/internal/rcRef.js +10 -7
- package/dist/internal/rcRef.js.map +1 -1
- package/dist/internal/references.js +1 -0
- package/dist/internal/references.js.map +1 -1
- package/dist/internal/request.js +13 -6
- package/dist/internal/request.js.map +1 -1
- package/dist/internal/result.js +11 -9
- package/dist/internal/result.js.map +1 -1
- package/dist/internal/schema/annotations.js +1 -1
- package/dist/internal/schema/annotations.js.map +1 -1
- package/dist/internal/schema/fromJsonSchemaDocument.js +238 -132
- package/dist/internal/schema/fromJsonSchemaDocument.js.map +1 -1
- package/dist/internal/schema/fromRepresentation.js +5 -5
- package/dist/internal/schema/fromRepresentation.js.map +1 -1
- package/dist/internal/schema/make.d.ts +2 -0
- package/dist/internal/schema/make.d.ts.map +1 -0
- package/dist/internal/schema/{schema.js → make.js} +1 -25
- package/dist/internal/schema/make.js.map +1 -0
- package/dist/internal/schema/parser.d.ts +0 -12
- package/dist/internal/schema/parser.d.ts.map +1 -1
- package/dist/internal/schema/parser.js +7 -0
- package/dist/internal/schema/parser.js.map +1 -1
- package/dist/internal/schema/standardSchema.d.ts +2 -0
- package/dist/internal/schema/standardSchema.d.ts.map +1 -0
- package/dist/internal/schema/standardSchema.js +112 -0
- package/dist/internal/schema/standardSchema.js.map +1 -0
- package/dist/internal/schema/toCodeDocument.js +34 -22
- package/dist/internal/schema/toCodeDocument.js.map +1 -1
- package/dist/internal/schema/toCodec.d.ts +2 -0
- package/dist/internal/schema/toCodec.d.ts.map +1 -0
- package/dist/internal/schema/toCodec.js +242 -0
- package/dist/internal/schema/toCodec.js.map +1 -0
- package/dist/internal/schema/toDifferJsonPatch.d.ts +2 -0
- package/dist/internal/schema/toDifferJsonPatch.d.ts.map +1 -0
- package/dist/internal/schema/toDifferJsonPatch.js +20 -0
- package/dist/internal/schema/toDifferJsonPatch.js.map +1 -0
- package/dist/internal/schema/toEncoderXml.d.ts +2 -0
- package/dist/internal/schema/toEncoderXml.d.ts.map +1 -0
- package/dist/internal/schema/toEncoderXml.js +104 -0
- package/dist/internal/schema/toEncoderXml.js.map +1 -0
- package/dist/internal/schema/toEquivalence.js +66 -0
- package/dist/internal/schema/toEquivalence.js.map +1 -1
- package/dist/internal/schema/toFormatter.d.ts +2 -0
- package/dist/internal/schema/toFormatter.d.ts.map +1 -0
- package/dist/internal/schema/toFormatter.js +227 -0
- package/dist/internal/schema/toFormatter.js.map +1 -0
- package/dist/internal/schema/toIso.d.ts +2 -0
- package/dist/internal/schema/toIso.d.ts.map +1 -0
- package/dist/internal/schema/toIso.js +17 -0
- package/dist/internal/schema/toIso.js.map +1 -0
- package/dist/internal/schema/toJsonSchemaDocument.js +122 -71
- package/dist/internal/schema/toJsonSchemaDocument.js.map +1 -1
- package/dist/internal/schema/toRepresentation.js +3 -1
- package/dist/internal/schema/toRepresentation.js.map +1 -1
- package/dist/internal/schemaError.d.ts +4 -0
- package/dist/internal/schemaError.d.ts.map +1 -0
- package/dist/internal/schemaError.js +6 -0
- package/dist/internal/schemaError.js.map +1 -0
- package/dist/internal/stream.js +5 -6
- package/dist/internal/stream.js.map +1 -1
- package/dist/internal/tracer.d.ts +1 -3
- package/dist/internal/tracer.d.ts.map +1 -1
- package/dist/internal/tracer.js +6 -0
- package/dist/internal/tracer.js.map +1 -1
- package/dist/internal/trie.js +2 -2
- package/dist/internal/trie.js.map +1 -1
- package/dist/internal/uuid.d.ts +1 -2
- package/dist/internal/uuid.d.ts.map +1 -1
- package/dist/internal/uuid.js +2 -0
- package/dist/internal/uuid.js.map +1 -1
- package/dist/testing/TestSchema.d.ts +9 -11
- package/dist/testing/TestSchema.d.ts.map +1 -1
- package/dist/testing/TestSchema.js +20 -18
- package/dist/testing/TestSchema.js.map +1 -1
- package/dist/testing/index.d.ts +0 -4
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +0 -4
- package/dist/testing/index.js.map +1 -1
- package/dist/unstable/ai/AiError.d.ts +98 -23
- package/dist/unstable/ai/AiError.d.ts.map +1 -1
- package/dist/unstable/ai/AiError.js +98 -6
- package/dist/unstable/ai/AiError.js.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.d.ts +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.d.ts.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.js +5 -16
- package/dist/unstable/ai/AnthropicStructuredOutput.js.map +1 -1
- package/dist/unstable/ai/Chat.d.ts +27 -32
- package/dist/unstable/ai/Chat.d.ts.map +1 -1
- package/dist/unstable/ai/Chat.js +10 -13
- package/dist/unstable/ai/Chat.js.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.d.ts +23 -16
- package/dist/unstable/ai/EmbeddingModel.d.ts.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.js +13 -11
- package/dist/unstable/ai/EmbeddingModel.js.map +1 -1
- package/dist/unstable/ai/LanguageModel.d.ts +48 -37
- package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
- package/dist/unstable/ai/LanguageModel.js +150 -47
- package/dist/unstable/ai/LanguageModel.js.map +1 -1
- package/dist/unstable/ai/McpServer.d.ts +2 -2
- package/dist/unstable/ai/McpServer.d.ts.map +1 -1
- package/dist/unstable/ai/McpServer.js +87 -78
- package/dist/unstable/ai/McpServer.js.map +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.d.ts +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.d.ts.map +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.js +3 -14
- package/dist/unstable/ai/OpenAiStructuredOutput.js.map +1 -1
- package/dist/unstable/ai/Prompt.d.ts +2 -2
- package/dist/unstable/ai/Prompt.d.ts.map +1 -1
- package/dist/unstable/ai/Prompt.js +15 -4
- package/dist/unstable/ai/Prompt.js.map +1 -1
- package/dist/unstable/ai/Response.d.ts +37 -94
- package/dist/unstable/ai/Response.d.ts.map +1 -1
- package/dist/unstable/ai/Response.js +46 -96
- package/dist/unstable/ai/Response.js.map +1 -1
- package/dist/unstable/ai/Tokenizer.js +4 -5
- package/dist/unstable/ai/Tokenizer.js.map +1 -1
- package/dist/unstable/ai/Tool.d.ts +38 -20
- package/dist/unstable/ai/Tool.d.ts.map +1 -1
- package/dist/unstable/ai/Tool.js +27 -1
- package/dist/unstable/ai/Tool.js.map +1 -1
- package/dist/unstable/ai/Toolkit.d.ts +1 -1
- package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
- package/dist/unstable/ai/Toolkit.js +30 -18
- package/dist/unstable/ai/Toolkit.js.map +1 -1
- package/dist/unstable/ai/internal/codec-transformer.js +2 -2
- package/dist/unstable/ai/internal/codec-transformer.js.map +1 -1
- package/dist/unstable/ai/internal/structured-output.js +28 -5
- package/dist/unstable/ai/internal/structured-output.js.map +1 -1
- package/dist/unstable/arbitrary/Arbitrary.d.ts +626 -0
- package/dist/unstable/arbitrary/Arbitrary.d.ts.map +1 -0
- package/dist/unstable/arbitrary/Arbitrary.js +238 -0
- package/dist/unstable/arbitrary/Arbitrary.js.map +1 -0
- package/dist/unstable/arbitrary/index.d.ts +8 -0
- package/dist/unstable/arbitrary/index.d.ts.map +1 -0
- package/dist/unstable/arbitrary/index.js +9 -0
- package/dist/unstable/arbitrary/index.js.map +1 -0
- package/dist/unstable/cli/Argument.d.ts +104 -108
- package/dist/unstable/cli/Argument.d.ts.map +1 -1
- package/dist/unstable/cli/Argument.js +56 -57
- package/dist/unstable/cli/Argument.js.map +1 -1
- package/dist/unstable/cli/CliError.d.ts +2 -0
- package/dist/unstable/cli/CliError.d.ts.map +1 -1
- package/dist/unstable/cli/CliError.js +2 -0
- package/dist/unstable/cli/CliError.js.map +1 -1
- package/dist/unstable/cli/CliOutput.js +27 -4
- package/dist/unstable/cli/CliOutput.js.map +1 -1
- package/dist/unstable/cli/Command.d.ts +73 -73
- package/dist/unstable/cli/Command.d.ts.map +1 -1
- package/dist/unstable/cli/Command.js +22 -22
- package/dist/unstable/cli/Command.js.map +1 -1
- package/dist/unstable/cli/Completions.d.ts +4 -4
- package/dist/unstable/cli/Completions.d.ts.map +1 -1
- package/dist/unstable/cli/Flag.d.ts +150 -161
- package/dist/unstable/cli/Flag.d.ts.map +1 -1
- package/dist/unstable/cli/Flag.js +79 -90
- package/dist/unstable/cli/Flag.js.map +1 -1
- package/dist/unstable/cli/GlobalFlag.d.ts +3 -3
- package/dist/unstable/cli/GlobalFlag.js +13 -13
- package/dist/unstable/cli/GlobalFlag.js.map +1 -1
- package/dist/unstable/cli/Param.d.ts +118 -126
- package/dist/unstable/cli/Param.d.ts.map +1 -1
- package/dist/unstable/cli/Param.js +104 -113
- package/dist/unstable/cli/Param.js.map +1 -1
- package/dist/unstable/cli/Primitive.d.ts +69 -58
- package/dist/unstable/cli/Primitive.d.ts.map +1 -1
- package/dist/unstable/cli/Primitive.js +65 -66
- package/dist/unstable/cli/Primitive.js.map +1 -1
- package/dist/unstable/cli/Prompt.d.ts +113 -59
- package/dist/unstable/cli/Prompt.d.ts.map +1 -1
- package/dist/unstable/cli/Prompt.js +391 -327
- package/dist/unstable/cli/Prompt.js.map +1 -1
- package/dist/unstable/cli/internal/completions/bash.js +109 -38
- package/dist/unstable/cli/internal/completions/bash.js.map +1 -1
- package/dist/unstable/cli/internal/completions/descriptor.js +23 -11
- package/dist/unstable/cli/internal/completions/descriptor.js.map +1 -1
- package/dist/unstable/cli/internal/completions/fish.js +15 -7
- package/dist/unstable/cli/internal/completions/fish.js.map +1 -1
- package/dist/unstable/cli/internal/completions/zsh.js +6 -4
- package/dist/unstable/cli/internal/completions/zsh.js.map +1 -1
- package/dist/unstable/cli/internal/config.js +4 -4
- package/dist/unstable/cli/internal/parser.js +1 -1
- package/dist/unstable/cli/internal/parser.js.map +1 -1
- package/dist/unstable/cli/internal/wizard.d.ts +5 -1
- package/dist/unstable/cli/internal/wizard.d.ts.map +1 -1
- package/dist/unstable/cli/internal/wizard.js +34 -26
- package/dist/unstable/cli/internal/wizard.js.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.d.ts +13 -0
- package/dist/unstable/cluster/ClusterSchema.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.js +16 -1
- package/dist/unstable/cluster/ClusterSchema.js.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.js +57 -14
- package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/unstable/cluster/Entity.d.ts.map +1 -1
- package/dist/unstable/cluster/Entity.js +2 -0
- package/dist/unstable/cluster/Entity.js.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.d.ts +2 -2
- package/dist/unstable/cluster/EntityProxyServer.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.js.map +1 -1
- package/dist/unstable/cluster/Envelope.d.ts +22 -5
- package/dist/unstable/cluster/Envelope.d.ts.map +1 -1
- package/dist/unstable/cluster/Envelope.js +23 -3
- package/dist/unstable/cluster/Envelope.js.map +1 -1
- package/dist/unstable/cluster/HttpRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/HttpRunner.js +32 -13
- package/dist/unstable/cluster/HttpRunner.js.map +1 -1
- package/dist/unstable/cluster/Message.d.ts +17 -5
- package/dist/unstable/cluster/Message.d.ts.map +1 -1
- package/dist/unstable/cluster/Message.js +21 -8
- package/dist/unstable/cluster/Message.js.map +1 -1
- package/dist/unstable/cluster/MessageStorage.d.ts +34 -4
- package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/MessageStorage.js +33 -12
- package/dist/unstable/cluster/MessageStorage.js.map +1 -1
- package/dist/unstable/cluster/Reply.d.ts +5 -4
- package/dist/unstable/cluster/Reply.d.ts.map +1 -1
- package/dist/unstable/cluster/Reply.js +21 -12
- package/dist/unstable/cluster/Reply.js.map +1 -1
- package/dist/unstable/cluster/RunnerServer.d.ts +1 -1
- package/dist/unstable/cluster/RunnerServer.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerServer.js +12 -6
- package/dist/unstable/cluster/RunnerServer.js.map +1 -1
- package/dist/unstable/cluster/Runners.d.ts +11 -5
- package/dist/unstable/cluster/Runners.d.ts.map +1 -1
- package/dist/unstable/cluster/Runners.js +56 -35
- package/dist/unstable/cluster/Runners.js.map +1 -1
- package/dist/unstable/cluster/Sharding.d.ts +1 -1
- package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
- package/dist/unstable/cluster/Sharding.js +32 -17
- package/dist/unstable/cluster/Sharding.js.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.js +23 -23
- package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
- package/dist/unstable/cluster/SocketRunner.d.ts +2 -2
- package/dist/unstable/cluster/SocketRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/SocketRunner.js +4 -3
- package/dist/unstable/cluster/SocketRunner.js.map +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.js +11 -8
- package/dist/unstable/cluster/SqlMessageStorage.js.map +1 -1
- package/dist/unstable/cluster/SqlRunnerStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/SqlRunnerStorage.js +11 -4
- package/dist/unstable/cluster/SqlRunnerStorage.js.map +1 -1
- package/dist/unstable/cluster/internal/clusterAbandon.d.ts +5 -0
- package/dist/unstable/cluster/internal/clusterAbandon.d.ts.map +1 -0
- package/dist/unstable/cluster/internal/clusterAbandon.js +9 -0
- package/dist/unstable/cluster/internal/clusterAbandon.js.map +1 -0
- package/dist/unstable/cluster/internal/entityManager.js +10 -6
- package/dist/unstable/cluster/internal/entityManager.js.map +1 -1
- package/dist/unstable/cluster/internal/interruptors.js +30 -1
- package/dist/unstable/cluster/internal/interruptors.js.map +1 -1
- package/dist/unstable/cluster/internal/resourceRef.js +12 -7
- package/dist/unstable/cluster/internal/resourceRef.js.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.js +12 -7
- package/dist/unstable/devtools/DevToolsClient.js.map +1 -1
- package/dist/unstable/encoding/Ini.d.ts +2 -0
- package/dist/unstable/encoding/Ini.d.ts.map +1 -1
- package/dist/unstable/encoding/Ini.js +2 -0
- package/dist/unstable/encoding/Ini.js.map +1 -1
- package/dist/unstable/encoding/SchemaBinary.d.ts +273 -0
- package/dist/unstable/encoding/SchemaBinary.d.ts.map +1 -0
- package/dist/unstable/encoding/SchemaBinary.js +4573 -0
- package/dist/unstable/encoding/SchemaBinary.js.map +1 -0
- package/dist/unstable/encoding/Sse.js +1 -1
- package/dist/unstable/encoding/Sse.js.map +1 -1
- package/dist/unstable/encoding/Toml.d.ts +2 -0
- package/dist/unstable/encoding/Toml.d.ts.map +1 -1
- package/dist/unstable/encoding/Toml.js +6 -4
- package/dist/unstable/encoding/Toml.js.map +1 -1
- package/dist/unstable/encoding/Yaml.d.ts +2 -0
- package/dist/unstable/encoding/Yaml.d.ts.map +1 -1
- package/dist/unstable/encoding/Yaml.js +16 -5
- package/dist/unstable/encoding/Yaml.js.map +1 -1
- package/dist/unstable/encoding/index.d.ts +2 -2
- package/dist/unstable/encoding/index.d.ts.map +1 -1
- package/dist/unstable/encoding/index.js +2 -2
- package/dist/unstable/encoding/index.js.map +1 -1
- package/dist/unstable/eventlog/Event.d.ts +5 -5
- package/dist/unstable/eventlog/Event.d.ts.map +1 -1
- package/dist/unstable/eventlog/Event.js +3 -3
- package/dist/unstable/eventlog/Event.js.map +1 -1
- package/dist/unstable/eventlog/EventJournal.d.ts +15 -9
- package/dist/unstable/eventlog/EventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventJournal.js +26 -12
- package/dist/unstable/eventlog/EventJournal.js.map +1 -1
- package/dist/unstable/eventlog/EventLog.d.ts +1 -1
- package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLog.js +13 -9
- package/dist/unstable/eventlog/EventLog.js.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.d.ts +11 -5
- package/dist/unstable/eventlog/EventLogMessage.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.js +25 -15
- package/dist/unstable/eventlog/EventLogMessage.js.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.d.ts +7 -1
- package/dist/unstable/eventlog/EventLogRemote.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.js +13 -3
- package/dist/unstable/eventlog/EventLogRemote.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js +2 -2
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.d.ts +0 -10
- package/dist/unstable/eventlog/SqlEventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.js +29 -14
- package/dist/unstable/eventlog/SqlEventJournal.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js +5 -1
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/http/Cookies.d.ts +1 -45
- package/dist/unstable/http/Cookies.d.ts.map +1 -1
- package/dist/unstable/http/Cookies.js +2 -64
- package/dist/unstable/http/Cookies.js.map +1 -1
- package/dist/unstable/http/FetchHttpClient.js +1 -1
- package/dist/unstable/http/FetchHttpClient.js.map +1 -1
- package/dist/unstable/http/FindMyWay/internal/router.js +124 -33
- package/dist/unstable/http/FindMyWay/internal/router.js.map +1 -1
- package/dist/unstable/http/FindMyWay.d.ts +15 -5
- package/dist/unstable/http/FindMyWay.d.ts.map +1 -1
- package/dist/unstable/http/FindMyWay.js +3 -1
- package/dist/unstable/http/FindMyWay.js.map +1 -1
- package/dist/unstable/http/Headers.d.ts +0 -22
- package/dist/unstable/http/Headers.d.ts.map +1 -1
- package/dist/unstable/http/Headers.js +3 -34
- package/dist/unstable/http/Headers.js.map +1 -1
- package/dist/unstable/http/HttpBody.d.ts +41 -10
- package/dist/unstable/http/HttpBody.d.ts.map +1 -1
- package/dist/unstable/http/HttpBody.js +64 -10
- package/dist/unstable/http/HttpBody.js.map +1 -1
- package/dist/unstable/http/HttpClient.d.ts +1 -1
- package/dist/unstable/http/HttpClient.d.ts.map +1 -1
- package/dist/unstable/http/HttpClient.js +28 -18
- package/dist/unstable/http/HttpClient.js.map +1 -1
- package/dist/unstable/http/HttpClientRequest.d.ts +28 -6
- package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientRequest.js +8 -19
- package/dist/unstable/http/HttpClientRequest.js.map +1 -1
- package/dist/unstable/http/HttpClientResponse.d.ts +6 -1
- package/dist/unstable/http/HttpClientResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientResponse.js +10 -6
- package/dist/unstable/http/HttpClientResponse.js.map +1 -1
- package/dist/unstable/http/HttpEffect.d.ts +16 -0
- package/dist/unstable/http/HttpEffect.d.ts.map +1 -1
- package/dist/unstable/http/HttpEffect.js +121 -65
- package/dist/unstable/http/HttpEffect.js.map +1 -1
- package/dist/unstable/http/HttpIncomingMessage.d.ts +3 -3
- package/dist/unstable/http/HttpIncomingMessage.d.ts.map +1 -1
- package/dist/unstable/http/HttpIncomingMessage.js +1 -13
- package/dist/unstable/http/HttpIncomingMessage.js.map +1 -1
- package/dist/unstable/http/HttpMiddleware.d.ts +1 -1
- package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
- package/dist/unstable/http/HttpMiddleware.js +29 -21
- package/dist/unstable/http/HttpMiddleware.js.map +1 -1
- package/dist/unstable/http/HttpPlatform.d.ts +12 -11
- package/dist/unstable/http/HttpPlatform.d.ts.map +1 -1
- package/dist/unstable/http/HttpPlatform.js +36 -10
- package/dist/unstable/http/HttpPlatform.js.map +1 -1
- package/dist/unstable/http/HttpRouter.d.ts +5 -1
- package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
- package/dist/unstable/http/HttpRouter.js +22 -8
- package/dist/unstable/http/HttpRouter.js.map +1 -1
- package/dist/unstable/http/HttpServer.d.ts +11 -42
- package/dist/unstable/http/HttpServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpServer.js +16 -20
- package/dist/unstable/http/HttpServer.js.map +1 -1
- package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRequest.js +11 -11
- package/dist/unstable/http/HttpServerRequest.js.map +1 -1
- package/dist/unstable/http/HttpServerRespondable.js +1 -1
- package/dist/unstable/http/HttpServerRespondable.js.map +1 -1
- package/dist/unstable/http/HttpServerResponse.d.ts +9 -13
- package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerResponse.js +34 -44
- package/dist/unstable/http/HttpServerResponse.js.map +1 -1
- package/dist/unstable/http/HttpStaticServer.d.ts +2 -2
- package/dist/unstable/http/HttpStaticServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpStaticServer.js +19 -19
- package/dist/unstable/http/HttpStaticServer.js.map +1 -1
- package/dist/unstable/http/Mime.d.ts +28 -0
- package/dist/unstable/http/Mime.d.ts.map +1 -0
- package/dist/unstable/http/Mime.js +72 -0
- package/dist/unstable/http/Mime.js.map +1 -0
- package/dist/unstable/http/Multipart.d.ts +22 -9
- package/dist/unstable/http/Multipart.d.ts.map +1 -1
- package/dist/unstable/http/Multipart.js +26 -10
- package/dist/unstable/http/Multipart.js.map +1 -1
- package/dist/unstable/http/MultipartParser/internal/multipart.d.ts +1 -1
- package/dist/unstable/http/MultipartParser/internal/multipart.d.ts.map +1 -1
- package/dist/unstable/http/MultipartParser/internal/multipart.js +8 -3
- package/dist/unstable/http/MultipartParser/internal/multipart.js.map +1 -1
- package/dist/unstable/http/MultipartParser.d.ts +4 -3
- package/dist/unstable/http/MultipartParser.d.ts.map +1 -1
- package/dist/unstable/http/MultipartParser.js.map +1 -1
- package/dist/unstable/http/UrlParams.d.ts +0 -97
- package/dist/unstable/http/UrlParams.d.ts.map +1 -1
- package/dist/unstable/http/UrlParams.js +3 -104
- package/dist/unstable/http/UrlParams.js.map +1 -1
- package/dist/unstable/http/index.d.ts +4 -0
- package/dist/unstable/http/index.d.ts.map +1 -1
- package/dist/unstable/http/index.js +4 -0
- package/dist/unstable/http/index.js.map +1 -1
- package/dist/unstable/http/internal/compression.js +8 -11
- package/dist/unstable/http/internal/compression.js.map +1 -1
- package/dist/unstable/http/internal/headers.d.ts +2 -0
- package/dist/unstable/http/internal/headers.d.ts.map +1 -0
- package/dist/unstable/http/internal/headers.js +5 -0
- package/dist/unstable/http/internal/headers.js.map +1 -0
- package/dist/unstable/http/internal/httpBody.js +8 -0
- package/dist/unstable/http/internal/httpBody.js.map +1 -1
- package/dist/unstable/http/internal/mimeTypes.d.ts +361 -0
- package/dist/unstable/http/internal/mimeTypes.d.ts.map +1 -0
- package/dist/unstable/http/internal/mimeTypes.js +363 -0
- package/dist/unstable/http/internal/mimeTypes.js.map +1 -0
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts +13 -0
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js +28 -11
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.d.ts +4 -3
- package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.js +25 -13
- package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +8 -3
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.js +9 -6
- package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.js +3 -1
- package/dist/unstable/httpapi/HttpApiError.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.js +7 -5
- package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.js +15 -12
- package/dist/unstable/httpapi/HttpApiScalar.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.d.ts +12 -0
- package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.js +8 -10
- package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSwagger.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSwagger.js +6 -3
- package/dist/unstable/httpapi/HttpApiSwagger.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiTest.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiTest.js +8 -2
- package/dist/unstable/httpapi/HttpApiTest.js.map +1 -1
- package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/OpenApi.js +31 -20
- package/dist/unstable/httpapi/OpenApi.js.map +1 -1
- package/dist/unstable/net/IpInterface.d.ts +140 -0
- package/dist/unstable/net/IpInterface.d.ts.map +1 -0
- package/dist/unstable/net/IpInterface.js +149 -0
- package/dist/unstable/net/IpInterface.js.map +1 -0
- package/dist/unstable/net/IpNetwork.d.ts +227 -0
- package/dist/unstable/net/IpNetwork.d.ts.map +1 -0
- package/dist/unstable/net/IpNetwork.js +239 -0
- package/dist/unstable/net/IpNetwork.js.map +1 -0
- package/dist/unstable/net/NetAddress.d.ts +705 -0
- package/dist/unstable/net/NetAddress.d.ts.map +1 -0
- package/dist/unstable/net/NetAddress.js +956 -0
- package/dist/unstable/net/NetAddress.js.map +1 -0
- package/dist/unstable/net/index.d.ts +16 -0
- package/dist/unstable/net/index.d.ts.map +1 -0
- package/dist/unstable/net/index.js +17 -0
- package/dist/unstable/net/index.js.map +1 -0
- package/dist/unstable/observability/OtlpExporter.d.ts +1 -0
- package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpExporter.js +4 -6
- package/dist/unstable/observability/OtlpExporter.js.map +1 -1
- package/dist/unstable/observability/OtlpLogger.js +9 -9
- package/dist/unstable/observability/OtlpLogger.js.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.js +9 -8
- package/dist/unstable/observability/OtlpMetrics.js.map +1 -1
- package/dist/unstable/observability/OtlpResource.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpResource.js +2 -2
- package/dist/unstable/observability/OtlpResource.js.map +1 -1
- package/dist/unstable/observability/OtlpTracer.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpTracer.js +82 -55
- package/dist/unstable/observability/OtlpTracer.js.map +1 -1
- package/dist/unstable/observability/internal/otlpEnv.d.ts +1 -1
- package/dist/unstable/observability/internal/otlpEnv.d.ts.map +1 -1
- package/dist/unstable/observability/internal/otlpEnv.js +5 -9
- package/dist/unstable/observability/internal/otlpEnv.js.map +1 -1
- package/dist/unstable/persistence/PersistedCache.js +1 -1
- package/dist/unstable/persistence/PersistedCache.js.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.d.ts +114 -14
- package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.js +799 -234
- package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
- package/dist/unstable/persistence/RateLimiter.d.ts +28 -15
- package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
- package/dist/unstable/persistence/RateLimiter.js +33 -41
- package/dist/unstable/persistence/RateLimiter.js.map +1 -1
- package/dist/unstable/process/ChildProcess.d.ts +8 -2
- package/dist/unstable/process/ChildProcess.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcess.js +7 -2
- package/dist/unstable/process/ChildProcess.js.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.d.ts +1 -1
- package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.js +1 -1
- package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
- package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
- package/dist/unstable/reactivity/Atom.js +6 -3
- package/dist/unstable/reactivity/Atom.js.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.d.ts +3 -6
- package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.js +6 -3
- package/dist/unstable/reactivity/AtomHttpApi.js.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.js +2 -3
- package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.d.ts +2 -2
- package/dist/unstable/reactivity/AtomRpc.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.js +1 -1
- package/dist/unstable/reactivity/AtomRpc.js.map +1 -1
- package/dist/unstable/reactivity/Hydration.d.ts +6 -4
- package/dist/unstable/reactivity/Hydration.d.ts.map +1 -1
- package/dist/unstable/reactivity/Hydration.js +20 -6
- package/dist/unstable/reactivity/Hydration.js.map +1 -1
- package/dist/unstable/reactivity/Reactivity.d.ts +26 -26
- package/dist/unstable/reactivity/Reactivity.d.ts.map +1 -1
- package/dist/unstable/reactivity/Reactivity.js +10 -12
- package/dist/unstable/reactivity/Reactivity.js.map +1 -1
- package/dist/unstable/rpc/RpcClient.d.ts +5 -0
- package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClient.js +94 -81
- package/dist/unstable/rpc/RpcClient.js.map +1 -1
- package/dist/unstable/rpc/RpcClientError.d.ts +1 -1
- package/dist/unstable/rpc/RpcMessage.d.ts +66 -7
- package/dist/unstable/rpc/RpcMessage.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMessage.js +68 -9
- package/dist/unstable/rpc/RpcMessage.js.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.js +7 -5
- package/dist/unstable/rpc/RpcMiddleware.js.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.d.ts +28 -33
- package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.js +56 -92
- package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
- package/dist/unstable/rpc/RpcServer.d.ts +25 -0
- package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcServer.js +125 -68
- package/dist/unstable/rpc/RpcServer.js.map +1 -1
- package/dist/unstable/schema/Model.d.ts.map +1 -1
- package/dist/unstable/schema/Model.js +7 -6
- package/dist/unstable/schema/Model.js.map +1 -1
- package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
- package/dist/unstable/schema/VariantSchema.js +3 -0
- package/dist/unstable/schema/VariantSchema.js.map +1 -1
- package/dist/unstable/socket/Socket.d.ts +287 -102
- package/dist/unstable/socket/Socket.d.ts.map +1 -1
- package/dist/unstable/socket/Socket.js +408 -215
- package/dist/unstable/socket/Socket.js.map +1 -1
- package/dist/unstable/socket/SocketServer.d.ts +5 -32
- package/dist/unstable/socket/SocketServer.d.ts.map +1 -1
- package/dist/unstable/socket/SocketServer.js +3 -3
- package/dist/unstable/socket/SocketServer.js.map +1 -1
- package/dist/unstable/sql/SqlClient.d.ts +20 -0
- package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
- package/dist/unstable/sql/SqlClient.js +14 -7
- package/dist/unstable/sql/SqlClient.js.map +1 -1
- package/dist/unstable/sql/SqlConnection.d.ts +15 -0
- package/dist/unstable/sql/SqlConnection.d.ts.map +1 -1
- package/dist/unstable/sql/SqlConnection.js.map +1 -1
- package/dist/unstable/sql/SqlModel.d.ts +1 -1
- package/dist/unstable/sql/SqlModel.d.ts.map +1 -1
- package/dist/unstable/sql/Statement.d.ts +13 -5
- package/dist/unstable/sql/Statement.d.ts.map +1 -1
- package/dist/unstable/sql/Statement.js +29 -15
- package/dist/unstable/sql/Statement.js.map +1 -1
- package/dist/unstable/workers/Transferable.js +1 -1
- package/dist/unstable/workers/Worker.d.ts.map +1 -1
- package/dist/unstable/workers/Worker.js +3 -1
- package/dist/unstable/workers/Worker.js.map +1 -1
- package/dist/unstable/workflow/Activity.d.ts +7 -0
- package/dist/unstable/workflow/Activity.d.ts.map +1 -1
- package/dist/unstable/workflow/Activity.js +14 -4
- package/dist/unstable/workflow/Activity.js.map +1 -1
- package/dist/unstable/workflow/DurableClock.js +1 -1
- package/dist/unstable/workflow/DurableClock.js.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.d.ts +2 -2
- package/dist/unstable/workflow/DurableDeferred.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
- package/dist/unstable/workflow/DurableQueue.d.ts +8 -0
- package/dist/unstable/workflow/DurableQueue.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableQueue.js +8 -0
- package/dist/unstable/workflow/DurableQueue.js.map +1 -1
- package/dist/unstable/workflow/Workflow.d.ts +5 -0
- package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
- package/dist/unstable/workflow/Workflow.js +70 -12
- package/dist/unstable/workflow/Workflow.js.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts +6 -0
- package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js +11 -0
- package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
- package/dist/unstable/workflow/WorkflowProxy.d.ts +2 -2
- package/dist/unstable/workflow/WorkflowProxy.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowProxy.js +4 -2
- package/dist/unstable/workflow/WorkflowProxy.js.map +1 -1
- package/package.json +8 -10
- package/src/Array.ts +142 -70
- package/src/BigDecimal.ts +50 -28
- package/src/ByteSize.ts +838 -0
- package/src/Cache.ts +17 -3
- package/src/Cause.ts +1 -1
- package/src/Channel.ts +185 -50
- package/src/Chunk.ts +65 -36
- package/src/Config.ts +237 -248
- package/src/ConfigProvider.ts +7 -8
- package/src/Context.ts +31 -0
- package/src/Cron.ts +2 -2
- package/src/Crypto.ts +3 -2
- package/src/Deferred.ts +7 -6
- package/src/Duration.ts +1 -1
- package/src/Effect.ts +226 -122
- package/src/Effectable.ts +78 -9
- package/src/Encoding.ts +101 -11
- package/src/Equal.ts +1 -1
- package/src/ExecutionPlan.ts +3 -0
- package/src/Fiber.ts +33 -8
- package/src/FiberHandle.ts +3 -3
- package/src/FiberMap.ts +19 -10
- package/src/FileSystem.ts +55 -230
- package/src/Formatter.ts +21 -3
- package/src/Graph.ts +55 -25
- package/src/Hash.ts +5 -16
- package/src/HashRing.ts +9 -2
- package/src/HashSet.ts +56 -0
- package/src/Iterable.ts +90 -44
- package/src/JsonPatch.ts +4 -4
- package/src/JsonPointer.ts +97 -4
- package/src/JsonSchema.ts +998 -476
- package/src/Layer.ts +59 -18
- package/src/LayerMap.ts +38 -6
- package/src/LayerRef.ts +7 -5
- package/src/Logger.ts +125 -18
- package/src/ManagedRuntime.ts +1 -1
- package/src/Match.ts +33 -14
- package/src/Metric.ts +24 -21
- package/src/MutableHashMap.ts +1 -1
- package/src/MutableHashSet.ts +1 -1
- package/src/MutableList.ts +18 -2
- package/src/Number.ts +7 -1
- package/src/Optic.ts +8 -4
- package/src/Option.ts +1 -1
- package/src/Order.ts +3 -1
- package/src/PartitionedSemaphore.ts +1 -2
- package/src/Path.ts +1 -1
- package/src/PlatformError.ts +1 -1
- package/src/Pool.ts +535 -134
- package/src/PrimaryKey.ts +1 -1
- package/src/PubSub.ts +32 -20
- package/src/Queue.ts +119 -28
- package/src/Random.ts +20 -6
- package/src/RcMap.ts +176 -13
- package/src/Record.ts +15 -0
- package/src/Redacted.ts +1 -1
- package/src/RequestResolver.ts +49 -26
- package/src/Result.ts +1 -1
- package/src/Scheduler.ts +21 -11
- package/src/Schema.ts +5032 -6518
- package/src/SchemaAST.ts +1156 -316
- package/src/SchemaGetter.ts +75 -21
- package/src/SchemaIssue.ts +260 -16
- package/src/SchemaParser.ts +2 -12
- package/src/SchemaRepresentation.ts +1774 -189
- package/src/SchemaTransformation.ts +145 -22
- package/src/Scope.ts +9 -2
- package/src/ScopedCache.ts +10 -3
- package/src/Sink.ts +31 -15
- package/src/StandardSchema.ts +207 -0
- package/src/Stream.ts +294 -76
- package/src/String.ts +20 -9
- package/src/Struct.ts +8 -4
- package/src/SynchronizedRef.ts +3 -5
- package/src/Terminal.ts +3 -3
- package/src/Tracer.ts +43 -14
- package/src/Tuple.ts +3 -1
- package/src/TxChunk.ts +1 -1
- package/src/TxDeferred.ts +1 -1
- package/src/TxHashMap.ts +1 -1
- package/src/TxHashSet.ts +92 -11
- package/src/TxPriorityQueue.ts +1 -1
- package/src/TxPubSub.ts +1 -1
- package/src/TxQueue.ts +22 -17
- package/src/TxReentrantLock.ts +29 -1
- package/src/TxRef.ts +1 -1
- package/src/TxSemaphore.ts +1 -1
- package/src/TxSubscriptionRef.ts +1 -1
- package/src/Types.ts +40 -17
- package/src/Utils.ts +3 -1
- package/src/index.ts +10 -0
- package/src/internal/arbitrary/model.ts +701 -0
- package/src/internal/arbitrary/regexp.ts +855 -0
- package/src/internal/arbitrary/runner.ts +608 -0
- package/src/internal/arbitrary/schema.ts +1800 -0
- package/src/internal/core.ts +48 -22
- package/src/internal/count.ts +14 -0
- package/src/internal/dateTime.ts +8 -10
- package/src/internal/effect.ts +510 -301
- package/src/internal/graph.ts +6 -1
- package/src/internal/hashMap.ts +5 -3
- package/src/internal/hashSet.ts +1 -1
- package/src/internal/matcher.ts +34 -19
- package/src/internal/metric.ts +1 -1
- package/src/internal/option.ts +8 -6
- package/src/internal/random.ts +20 -7
- package/src/internal/rcRef.ts +10 -7
- package/src/internal/references.ts +1 -0
- package/src/internal/request.ts +12 -7
- package/src/internal/result.ts +15 -11
- package/src/internal/schema/annotations.ts +3 -3
- package/src/internal/schema/fromJsonSchemaDocument.ts +326 -160
- package/src/internal/schema/fromRepresentation.ts +5 -3
- package/src/internal/schema/{schema.ts → make.ts} +0 -40
- package/src/internal/schema/parser.ts +8 -0
- package/src/internal/schema/standardSchema.ts +125 -0
- package/src/internal/schema/toCodeDocument.ts +58 -44
- package/src/internal/schema/toCodec.ts +312 -0
- package/src/internal/schema/toDifferJsonPatch.ts +24 -0
- package/src/internal/schema/toEncoderXml.ts +110 -0
- package/src/internal/schema/toEquivalence.ts +76 -0
- package/src/internal/schema/toFormatter.ts +230 -0
- package/src/internal/schema/toIso.ts +20 -0
- package/src/internal/schema/toJsonSchemaDocument.ts +125 -67
- package/src/internal/schema/toRepresentation.ts +1 -1
- package/src/internal/schemaError.ts +8 -0
- package/src/internal/stream.ts +14 -6
- package/src/internal/tracer.ts +4 -0
- package/src/internal/trie.ts +5 -2
- package/src/internal/uuid.ts +4 -0
- package/src/testing/TestSchema.ts +36 -30
- package/src/testing/index.ts +0 -5
- package/src/unstable/ai/AiError.ts +126 -6
- package/src/unstable/ai/AnthropicStructuredOutput.ts +8 -5
- package/src/unstable/ai/Chat.ts +35 -36
- package/src/unstable/ai/EmbeddingModel.ts +27 -15
- package/src/unstable/ai/LanguageModel.ts +283 -100
- package/src/unstable/ai/McpServer.ts +105 -92
- package/src/unstable/ai/OpenAiStructuredOutput.ts +6 -3
- package/src/unstable/ai/Prompt.ts +20 -5
- package/src/unstable/ai/Response.ts +107 -189
- package/src/unstable/ai/Tokenizer.ts +4 -5
- package/src/unstable/ai/Tool.ts +58 -35
- package/src/unstable/ai/Toolkit.ts +43 -37
- package/src/unstable/ai/internal/codec-transformer.ts +3 -2
- package/src/unstable/ai/internal/structured-output.ts +29 -6
- package/src/unstable/arbitrary/Arbitrary.ts +715 -0
- package/src/unstable/arbitrary/index.ts +10 -0
- package/src/unstable/cli/Argument.ts +111 -115
- package/src/unstable/cli/CliError.ts +2 -0
- package/src/unstable/cli/CliOutput.ts +41 -4
- package/src/unstable/cli/Command.ts +79 -78
- package/src/unstable/cli/Completions.ts +4 -4
- package/src/unstable/cli/Flag.ts +158 -169
- package/src/unstable/cli/GlobalFlag.ts +13 -13
- package/src/unstable/cli/Param.ts +150 -159
- package/src/unstable/cli/Primitive.ts +75 -76
- package/src/unstable/cli/Prompt.ts +543 -408
- package/src/unstable/cli/internal/completions/bash.ts +113 -38
- package/src/unstable/cli/internal/completions/descriptor.ts +23 -11
- package/src/unstable/cli/internal/completions/fish.ts +17 -9
- package/src/unstable/cli/internal/completions/zsh.ts +7 -4
- package/src/unstable/cli/internal/config.ts +4 -4
- package/src/unstable/cli/internal/parser.ts +1 -1
- package/src/unstable/cli/internal/wizard.ts +60 -32
- package/src/unstable/cluster/ClusterSchema.ts +19 -1
- package/src/unstable/cluster/ClusterWorkflowEngine.ts +66 -16
- package/src/unstable/cluster/Entity.ts +3 -0
- package/src/unstable/cluster/EntityProxyServer.ts +6 -2
- package/src/unstable/cluster/Envelope.ts +32 -3
- package/src/unstable/cluster/HttpRunner.ts +52 -25
- package/src/unstable/cluster/Message.ts +35 -13
- package/src/unstable/cluster/MessageStorage.ts +69 -24
- package/src/unstable/cluster/Reply.ts +36 -19
- package/src/unstable/cluster/RunnerServer.ts +21 -11
- package/src/unstable/cluster/Runners.ts +93 -80
- package/src/unstable/cluster/Sharding.ts +44 -19
- package/src/unstable/cluster/ShardingConfig.ts +23 -23
- package/src/unstable/cluster/SocketRunner.ts +5 -4
- package/src/unstable/cluster/SqlMessageStorage.ts +12 -8
- package/src/unstable/cluster/SqlRunnerStorage.ts +18 -10
- package/src/unstable/cluster/internal/clusterAbandon.ts +14 -0
- package/src/unstable/cluster/internal/entityManager.ts +15 -6
- package/src/unstable/cluster/internal/interruptors.ts +58 -1
- package/src/unstable/cluster/internal/resourceRef.ts +15 -7
- package/src/unstable/devtools/DevToolsClient.ts +13 -3
- package/src/unstable/encoding/Ini.ts +2 -0
- package/src/unstable/encoding/SchemaBinary.ts +5308 -0
- package/src/unstable/encoding/Sse.ts +1 -1
- package/src/unstable/encoding/Toml.ts +7 -5
- package/src/unstable/encoding/Yaml.ts +18 -5
- package/src/unstable/encoding/index.ts +2 -2
- package/src/unstable/eventlog/Event.ts +7 -7
- package/src/unstable/eventlog/EventJournal.ts +22 -15
- package/src/unstable/eventlog/EventLog.ts +24 -14
- package/src/unstable/eventlog/EventLogMessage.ts +25 -15
- package/src/unstable/eventlog/EventLogRemote.ts +15 -4
- package/src/unstable/eventlog/EventLogServerUnencrypted.ts +2 -2
- package/src/unstable/eventlog/SqlEventJournal.ts +35 -10
- package/src/unstable/eventlog/SqlEventLogServerUnencrypted.ts +11 -1
- package/src/unstable/http/Cookies.ts +2 -102
- package/src/unstable/http/FetchHttpClient.ts +1 -1
- package/src/unstable/http/FindMyWay/internal/router.ts +139 -33
- package/src/unstable/http/FindMyWay.ts +15 -5
- package/src/unstable/http/Headers.ts +3 -48
- package/src/unstable/http/HttpBody.ts +107 -36
- package/src/unstable/http/HttpClient.ts +41 -30
- package/src/unstable/http/HttpClientRequest.ts +32 -18
- package/src/unstable/http/HttpClientResponse.ts +16 -3
- package/src/unstable/http/HttpEffect.ts +145 -73
- package/src/unstable/http/HttpIncomingMessage.ts +4 -4
- package/src/unstable/http/HttpMiddleware.ts +43 -24
- package/src/unstable/http/HttpPlatform.ts +62 -20
- package/src/unstable/http/HttpRouter.ts +27 -16
- package/src/unstable/http/HttpServer.ts +18 -57
- package/src/unstable/http/HttpServerRequest.ts +17 -15
- package/src/unstable/http/HttpServerRespondable.ts +1 -1
- package/src/unstable/http/HttpServerResponse.ts +49 -40
- package/src/unstable/http/HttpStaticServer.ts +30 -28
- package/src/unstable/http/Mime.ts +76 -0
- package/src/unstable/http/Multipart.ts +35 -18
- package/src/unstable/http/MultipartParser/internal/multipart.ts +10 -3
- package/src/unstable/http/MultipartParser.ts +4 -3
- package/src/unstable/http/UrlParams.ts +3 -161
- package/src/unstable/http/index.ts +5 -0
- package/src/unstable/http/internal/compression.ts +11 -12
- package/src/unstable/http/internal/headers.ts +7 -0
- package/src/unstable/http/internal/httpBody.ts +9 -0
- package/src/unstable/http/internal/mimeTypes.ts +395 -0
- package/src/unstable/httpapi/HttpApiBuilder.ts +63 -11
- package/src/unstable/httpapi/HttpApiClient.ts +44 -24
- package/src/unstable/httpapi/HttpApiEndpoint.ts +24 -11
- package/src/unstable/httpapi/HttpApiError.ts +3 -1
- package/src/unstable/httpapi/HttpApiMiddleware.ts +7 -5
- package/src/unstable/httpapi/HttpApiScalar.ts +30 -27
- package/src/unstable/httpapi/HttpApiSchema.ts +14 -7
- package/src/unstable/httpapi/HttpApiSwagger.ts +6 -3
- package/src/unstable/httpapi/HttpApiTest.ts +6 -1
- package/src/unstable/httpapi/OpenApi.ts +32 -22
- package/src/unstable/net/IpInterface.ts +242 -0
- package/src/unstable/net/IpNetwork.ts +357 -0
- package/src/unstable/net/NetAddress.ts +1271 -0
- package/src/unstable/net/index.ts +20 -0
- package/src/unstable/observability/OtlpExporter.ts +5 -6
- package/src/unstable/observability/OtlpLogger.ts +9 -9
- package/src/unstable/observability/OtlpMetrics.ts +9 -8
- package/src/unstable/observability/OtlpResource.ts +5 -4
- package/src/unstable/observability/OtlpTracer.ts +103 -81
- package/src/unstable/observability/internal/otlpEnv.ts +10 -13
- package/src/unstable/persistence/PersistedCache.ts +1 -1
- package/src/unstable/persistence/PersistedQueue.ts +1100 -291
- package/src/unstable/persistence/RateLimiter.ts +64 -58
- package/src/unstable/process/ChildProcess.ts +15 -4
- package/src/unstable/process/ChildProcessSpawner.ts +1 -1
- package/src/unstable/reactivity/Atom.ts +6 -3
- package/src/unstable/reactivity/AtomHttpApi.ts +21 -10
- package/src/unstable/reactivity/AtomRegistry.ts +2 -4
- package/src/unstable/reactivity/AtomRpc.ts +6 -5
- package/src/unstable/reactivity/Hydration.ts +26 -7
- package/src/unstable/reactivity/Reactivity.ts +49 -36
- package/src/unstable/rpc/RpcClient.ts +100 -82
- package/src/unstable/rpc/RpcMessage.ts +78 -11
- package/src/unstable/rpc/RpcMiddleware.ts +7 -5
- package/src/unstable/rpc/RpcSerialization.ts +82 -92
- package/src/unstable/rpc/RpcServer.ts +171 -93
- package/src/unstable/schema/Model.ts +8 -7
- package/src/unstable/schema/VariantSchema.ts +3 -0
- package/src/unstable/socket/Socket.ts +714 -383
- package/src/unstable/socket/SocketServer.ts +5 -35
- package/src/unstable/sql/SqlClient.ts +42 -7
- package/src/unstable/sql/SqlConnection.ts +18 -0
- package/src/unstable/sql/SqlModel.ts +1 -1
- package/src/unstable/sql/Statement.ts +46 -20
- package/src/unstable/workers/Transferable.ts +1 -1
- package/src/unstable/workers/Worker.ts +3 -1
- package/src/unstable/workflow/Activity.ts +20 -9
- package/src/unstable/workflow/DurableClock.ts +1 -1
- package/src/unstable/workflow/DurableDeferred.ts +6 -0
- package/src/unstable/workflow/DurableQueue.ts +8 -0
- package/src/unstable/workflow/Workflow.ts +105 -28
- package/src/unstable/workflow/WorkflowEngine.ts +22 -0
- package/src/unstable/workflow/WorkflowProxy.ts +8 -4
- package/dist/internal/schema/schema.d.ts.map +0 -1
- package/dist/internal/schema/schema.js.map +0 -1
- package/dist/internal/schema/toArbitrary.d.ts +0 -2
- package/dist/internal/schema/toArbitrary.d.ts.map +0 -1
- package/dist/internal/schema/toArbitrary.js +0 -705
- package/dist/internal/schema/toArbitrary.js.map +0 -1
- package/dist/testing/FastCheck.d.ts +0 -90
- package/dist/testing/FastCheck.d.ts.map +0 -1
- package/dist/testing/FastCheck.js +0 -90
- package/dist/testing/FastCheck.js.map +0 -1
- package/dist/unstable/encoding/Msgpack.d.ts +0 -185
- package/dist/unstable/encoding/Msgpack.d.ts.map +0 -1
- package/dist/unstable/encoding/Msgpack.js +0 -227
- package/dist/unstable/encoding/Msgpack.js.map +0 -1
- package/src/internal/schema/toArbitrary.ts +0 -843
- package/src/testing/FastCheck.ts +0 -90
- package/src/unstable/encoding/Msgpack.ts +0 -432
- /package/dist/internal/{schema → arbitrary}/schema.d.ts +0 -0
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
import * as InternalRecord from "./internal/record.ts"
|
|
7
7
|
import * as InternalFromJsonSchemaDocument from "./internal/schema/fromJsonSchemaDocument.ts"
|
|
8
8
|
import * as InternalFromRepresentation from "./internal/schema/fromRepresentation.ts"
|
|
9
|
-
import * as InternalSchema from "./internal/schema/schema.ts"
|
|
10
9
|
import * as InternalToCodeDocument from "./internal/schema/toCodeDocument.ts"
|
|
11
10
|
import * as InternalToJsonSchemaDocument from "./internal/schema/toJsonSchemaDocument.ts"
|
|
12
11
|
import * as InternalToRepresentation from "./internal/schema/toRepresentation.ts"
|
|
@@ -14,7 +13,7 @@ import type * as JsonSchema from "./JsonSchema.ts"
|
|
|
14
13
|
import * as Option from "./Option.ts"
|
|
15
14
|
import * as Schema from "./Schema.ts"
|
|
16
15
|
import * as SchemaAST from "./SchemaAST.ts"
|
|
17
|
-
import * as
|
|
16
|
+
import * as InternalGetter from "./SchemaGetter.ts"
|
|
18
17
|
|
|
19
18
|
/**
|
|
20
19
|
* Open persistence identity carried by declarations and opaque checks.
|
|
@@ -60,8 +59,8 @@ export declare namespace ToJsonSchema {
|
|
|
60
59
|
* **Gotchas**
|
|
61
60
|
*
|
|
62
61
|
* Treat the input schemas as immutable. The returned value must be a valid JSON Schema object graph and must not be
|
|
63
|
-
* mutated after this function returns.
|
|
64
|
-
* compilation.
|
|
62
|
+
* mutated after this function returns. Local `$defs` references must use valid JSON Pointer URI fragments. Return a
|
|
63
|
+
* new object graph to produce different output during a later compilation.
|
|
65
64
|
*
|
|
66
65
|
* @category models
|
|
67
66
|
* @since 4.0.0
|
|
@@ -275,7 +274,12 @@ export interface Literal extends Keyword<"Literal"> {
|
|
|
275
274
|
}
|
|
276
275
|
|
|
277
276
|
/**
|
|
278
|
-
* A unique
|
|
277
|
+
* A unique symbol representation.
|
|
278
|
+
*
|
|
279
|
+
* **Details**
|
|
280
|
+
*
|
|
281
|
+
* Globally registered symbols have an exact JSON string representation. Local
|
|
282
|
+
* symbols have no JSON representation.
|
|
279
283
|
*
|
|
280
284
|
* @category models
|
|
281
285
|
* @since 4.0.0
|
|
@@ -297,7 +301,7 @@ export interface ObjectKeyword extends Keyword<"ObjectKeyword"> {}
|
|
|
297
301
|
*
|
|
298
302
|
* **Details**
|
|
299
303
|
*
|
|
300
|
-
* Enum members are stored as native string or number values. Persistent
|
|
304
|
+
* Enum members are stored as native string or finite number values. Persistent
|
|
301
305
|
* codecs add an explicit type discriminator when encoding them.
|
|
302
306
|
*
|
|
303
307
|
* @category models
|
|
@@ -335,271 +339,1822 @@ export interface Element {
|
|
|
335
339
|
* @category models
|
|
336
340
|
* @since 4.0.0
|
|
337
341
|
*/
|
|
338
|
-
export interface Arrays extends Keyword<"Arrays"> {
|
|
339
|
-
readonly elements: ReadonlyArray<Element>
|
|
340
|
-
readonly rest: ReadonlyArray<Representation>
|
|
341
|
-
}
|
|
342
|
+
export interface Arrays extends Keyword<"Arrays"> {
|
|
343
|
+
readonly elements: ReadonlyArray<Element>
|
|
344
|
+
readonly rest: ReadonlyArray<Representation>
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* A property signature.
|
|
349
|
+
*
|
|
350
|
+
* **Details**
|
|
351
|
+
*
|
|
352
|
+
* The live representation stores the native property key. Persistent codecs
|
|
353
|
+
* add an explicit type discriminator when encoding it.
|
|
354
|
+
*
|
|
355
|
+
* **Gotchas**
|
|
356
|
+
*
|
|
357
|
+
* Local symbols can be represented while the schema is live, but persistent
|
|
358
|
+
* codecs reject them because they cannot be reconstructed by identity.
|
|
359
|
+
*
|
|
360
|
+
* @category models
|
|
361
|
+
* @since 4.0.0
|
|
362
|
+
*/
|
|
363
|
+
export interface PropertySignature {
|
|
364
|
+
readonly name: PropertyKey
|
|
365
|
+
readonly type: Representation
|
|
366
|
+
readonly isOptional: boolean
|
|
367
|
+
readonly isMutable: boolean
|
|
368
|
+
readonly annotations?: Schema.Annotations.Annotations | undefined
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* An index signature.
|
|
373
|
+
*
|
|
374
|
+
* @category models
|
|
375
|
+
* @since 4.0.0
|
|
376
|
+
*/
|
|
377
|
+
export interface IndexSignature {
|
|
378
|
+
readonly parameter: Representation
|
|
379
|
+
readonly type: Representation
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* An object representation.
|
|
384
|
+
*
|
|
385
|
+
* @category models
|
|
386
|
+
* @since 4.0.0
|
|
387
|
+
*/
|
|
388
|
+
export interface Objects extends Keyword<"Objects"> {
|
|
389
|
+
readonly propertySignatures: ReadonlyArray<PropertySignature>
|
|
390
|
+
readonly indexSignatures: ReadonlyArray<IndexSignature>
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* A union representation.
|
|
395
|
+
*
|
|
396
|
+
* @category models
|
|
397
|
+
* @since 4.0.0
|
|
398
|
+
*/
|
|
399
|
+
export interface Union extends Keyword<"Union"> {
|
|
400
|
+
readonly types: ReadonlyArray<Representation>
|
|
401
|
+
readonly options?: SchemaAST.UnionOptions | undefined
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* The structural schema representation.
|
|
406
|
+
*
|
|
407
|
+
* @category models
|
|
408
|
+
* @since 4.0.0
|
|
409
|
+
*/
|
|
410
|
+
export type Representation =
|
|
411
|
+
| Declaration
|
|
412
|
+
| Reference
|
|
413
|
+
| Suspend
|
|
414
|
+
| Null
|
|
415
|
+
| Undefined
|
|
416
|
+
| Void
|
|
417
|
+
| Never
|
|
418
|
+
| Unknown
|
|
419
|
+
| Any
|
|
420
|
+
| String
|
|
421
|
+
| Number
|
|
422
|
+
| Boolean
|
|
423
|
+
| BigInt
|
|
424
|
+
| Symbol
|
|
425
|
+
| Literal
|
|
426
|
+
| UniqueSymbol
|
|
427
|
+
| ObjectKeyword
|
|
428
|
+
| Enum
|
|
429
|
+
| TemplateLiteral
|
|
430
|
+
| Arrays
|
|
431
|
+
| Objects
|
|
432
|
+
| Union
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* A structural check.
|
|
436
|
+
*
|
|
437
|
+
* @category models
|
|
438
|
+
* @since 4.0.0
|
|
439
|
+
*/
|
|
440
|
+
export type Check = Filter | FilterGroup
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* An opaque leaf check.
|
|
444
|
+
*
|
|
445
|
+
* @category models
|
|
446
|
+
* @since 4.0.0
|
|
447
|
+
*/
|
|
448
|
+
export interface Filter {
|
|
449
|
+
readonly _tag: "Filter"
|
|
450
|
+
readonly representation?: CheckRepresentationAnnotation<Representation> | undefined
|
|
451
|
+
readonly annotations?: Schema.Annotations.Annotations | undefined
|
|
452
|
+
readonly aborted: boolean
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* A non-empty group of checks.
|
|
457
|
+
*
|
|
458
|
+
* @category models
|
|
459
|
+
* @since 4.0.0
|
|
460
|
+
*/
|
|
461
|
+
export interface FilterGroup {
|
|
462
|
+
readonly _tag: "FilterGroup"
|
|
463
|
+
readonly representation?: CheckRepresentationAnnotation<Representation> | undefined
|
|
464
|
+
readonly annotations?: Schema.Annotations.Annotations | undefined
|
|
465
|
+
readonly checks: readonly [Check, ...Array<Check>]
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* Named representation definitions.
|
|
470
|
+
*
|
|
471
|
+
* @category models
|
|
472
|
+
* @since 4.0.0
|
|
473
|
+
*/
|
|
474
|
+
export interface References {
|
|
475
|
+
readonly [$ref: string]: Representation
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* A single representation and its definitions.
|
|
480
|
+
*
|
|
481
|
+
* @category models
|
|
482
|
+
* @since 4.0.0
|
|
483
|
+
*/
|
|
484
|
+
export interface Document {
|
|
485
|
+
readonly representation: Representation
|
|
486
|
+
readonly references: References
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* Multiple representations sharing definitions.
|
|
491
|
+
*
|
|
492
|
+
* @category models
|
|
493
|
+
* @since 4.0.0
|
|
494
|
+
*/
|
|
495
|
+
export interface MultiDocument {
|
|
496
|
+
readonly representations: readonly [Representation, ...Array<Representation>]
|
|
497
|
+
readonly references: References
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* Reviver for a declaration.
|
|
502
|
+
*
|
|
503
|
+
* @category models
|
|
504
|
+
* @since 4.0.0
|
|
505
|
+
*/
|
|
506
|
+
export interface DeclarationReviver<P> {
|
|
507
|
+
readonly id: string
|
|
508
|
+
readonly payloadSchema: Schema.Decoder<P>
|
|
509
|
+
readonly revive: (input: {
|
|
510
|
+
readonly payload: P
|
|
511
|
+
readonly typeParameters: ReadonlyArray<Schema.Top>
|
|
512
|
+
readonly annotations: Schema.Annotations.Annotations | undefined
|
|
513
|
+
}) => Schema.Top
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* Reviver for a leaf check.
|
|
518
|
+
*
|
|
519
|
+
* @category models
|
|
520
|
+
* @since 4.0.0
|
|
521
|
+
*/
|
|
522
|
+
export interface FilterReviver<P> {
|
|
523
|
+
readonly id: string
|
|
524
|
+
readonly payloadSchema: Schema.Decoder<P>
|
|
525
|
+
readonly revive: (input: {
|
|
526
|
+
readonly payload: P
|
|
527
|
+
readonly schemas: ReadonlyArray<Schema.Top>
|
|
528
|
+
readonly annotations: Schema.Annotations.Filter | undefined
|
|
529
|
+
}) => SchemaAST.Filter<any>
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* Reviver for a check group.
|
|
534
|
+
*
|
|
535
|
+
* @category models
|
|
536
|
+
* @since 4.0.0
|
|
537
|
+
*/
|
|
538
|
+
export interface FilterGroupReviver<P> {
|
|
539
|
+
readonly id: string
|
|
540
|
+
readonly payloadSchema: Schema.Decoder<P>
|
|
541
|
+
readonly revive: (input: {
|
|
542
|
+
readonly payload: P
|
|
543
|
+
readonly schemas: ReadonlyArray<Schema.Top>
|
|
544
|
+
readonly annotations: Schema.Annotations.Filter | undefined
|
|
545
|
+
}) => SchemaAST.FilterGroup<any>
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* A check reviver.
|
|
550
|
+
*
|
|
551
|
+
* @category models
|
|
552
|
+
* @since 4.0.0
|
|
553
|
+
*/
|
|
554
|
+
export type CheckReviver<P> = FilterReviver<P> | FilterGroupReviver<P>
|
|
555
|
+
|
|
556
|
+
/**
|
|
557
|
+
* A typed reviver.
|
|
558
|
+
*
|
|
559
|
+
* @category models
|
|
560
|
+
* @since 4.0.0
|
|
561
|
+
*/
|
|
562
|
+
export type Reviver<P> = DeclarationReviver<P> | CheckReviver<P>
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* A reviver erased only at collection boundaries.
|
|
566
|
+
*
|
|
567
|
+
* @category models
|
|
568
|
+
* @since 4.0.0
|
|
569
|
+
*/
|
|
570
|
+
export type AnyReviver = Reviver<any>
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* Creates a declaration reviver while inferring its payload type from `payloadSchema`.
|
|
574
|
+
*
|
|
575
|
+
* @category constructors
|
|
576
|
+
* @since 4.0.0
|
|
577
|
+
*/
|
|
578
|
+
export const makeReviverDeclaration: <P>(
|
|
579
|
+
id: string,
|
|
580
|
+
payloadSchema: Schema.Decoder<P>,
|
|
581
|
+
revive: DeclarationReviver<P>["revive"]
|
|
582
|
+
) => DeclarationReviver<P> = (id, payloadSchema, revive) => ({ id, payloadSchema, revive })
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* Creates a filter reviver while inferring its payload type from `payloadSchema`.
|
|
586
|
+
*
|
|
587
|
+
* @category constructors
|
|
588
|
+
* @since 4.0.0
|
|
589
|
+
*/
|
|
590
|
+
export const makeReviverFilter: <P>(
|
|
591
|
+
id: string,
|
|
592
|
+
payloadSchema: Schema.Decoder<P>,
|
|
593
|
+
revive: FilterReviver<P>["revive"]
|
|
594
|
+
) => FilterReviver<P> = (id, payloadSchema, revive) => ({ id, payloadSchema, revive })
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* Creates a filter group reviver while inferring its payload type from `payloadSchema`.
|
|
598
|
+
*
|
|
599
|
+
* @category constructors
|
|
600
|
+
* @since 4.0.0
|
|
601
|
+
*/
|
|
602
|
+
export const makeReviverFilterGroup: <P>(
|
|
603
|
+
id: string,
|
|
604
|
+
payloadSchema: Schema.Decoder<P>,
|
|
605
|
+
revive: FilterGroupReviver<P>["revive"]
|
|
606
|
+
) => FilterGroupReviver<P> = (id, payloadSchema, revive) => ({ id, payloadSchema, revive })
|
|
607
|
+
|
|
608
|
+
function makeFixedDeclarationReviver(id: string, schema: Schema.Top): DeclarationReviver<null> {
|
|
609
|
+
return makeReviverDeclaration(
|
|
610
|
+
id,
|
|
611
|
+
Schema.Null,
|
|
612
|
+
({ annotations }) => annotations === undefined ? schema : schema.annotate(annotations)
|
|
613
|
+
)
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
const IsPatternPayload = Schema.Struct({
|
|
617
|
+
source: Schema.String,
|
|
618
|
+
flags: Schema.String
|
|
619
|
+
}).check(Schema.makeFilter((payload: { readonly source: string; readonly flags: string }) => {
|
|
620
|
+
try {
|
|
621
|
+
const regExp = new globalThis.RegExp(payload.source, payload.flags)
|
|
622
|
+
return regExp.source === payload.source && regExp.flags === payload.flags
|
|
623
|
+
} catch {
|
|
624
|
+
return false
|
|
625
|
+
}
|
|
626
|
+
}))
|
|
627
|
+
|
|
628
|
+
type ErrorRepresentationOptions = {
|
|
629
|
+
readonly includeStack?: true | undefined
|
|
630
|
+
readonly excludeCause?: true | undefined
|
|
631
|
+
}
|
|
632
|
+
type ErrorRepresentationPayload = ErrorRepresentationOptions | null
|
|
633
|
+
const ErrorOptionsPayload = Schema.declare((input): input is ErrorRepresentationOptions => {
|
|
634
|
+
if (typeof input !== "object" || input === null) return false
|
|
635
|
+
const object = input as Record<string, unknown>
|
|
636
|
+
const keys = globalThis.Object.keys(input)
|
|
637
|
+
return keys.length > 0 &&
|
|
638
|
+
keys.every((key) => (key === "includeStack" || key === "excludeCause") && object[key] === true)
|
|
639
|
+
})
|
|
640
|
+
const ErrorRepresentationPayload: Schema.Decoder<ErrorRepresentationPayload> = Schema.Union([
|
|
641
|
+
Schema.Null,
|
|
642
|
+
ErrorOptionsPayload
|
|
643
|
+
])
|
|
644
|
+
|
|
645
|
+
type RedactedRepresentationOptions = {
|
|
646
|
+
readonly label?: string | undefined
|
|
647
|
+
readonly disallowJsonEncode?: true | undefined
|
|
648
|
+
}
|
|
649
|
+
type RedactedRepresentationPayload = RedactedRepresentationOptions | null
|
|
650
|
+
const RedactedOptionsPayload = Schema.declare((input): input is RedactedRepresentationOptions => {
|
|
651
|
+
if (typeof input !== "object" || input === null) return false
|
|
652
|
+
const object = input as Record<string, unknown>
|
|
653
|
+
const keys = globalThis.Object.keys(input)
|
|
654
|
+
return keys.length > 0 && keys.every((key) => {
|
|
655
|
+
switch (key) {
|
|
656
|
+
case "label":
|
|
657
|
+
return typeof object[key] === "string"
|
|
658
|
+
case "disallowJsonEncode":
|
|
659
|
+
return object[key] === true
|
|
660
|
+
default:
|
|
661
|
+
return false
|
|
662
|
+
}
|
|
663
|
+
})
|
|
664
|
+
})
|
|
665
|
+
const RedactedRepresentationPayload: Schema.Decoder<RedactedRepresentationPayload> = Schema.Union([
|
|
666
|
+
Schema.Null,
|
|
667
|
+
RedactedOptionsPayload
|
|
668
|
+
])
|
|
669
|
+
|
|
670
|
+
/**
|
|
671
|
+
* Reviver for persisted `isTrimmed` checks.
|
|
672
|
+
*
|
|
673
|
+
* **When to use**
|
|
674
|
+
*
|
|
675
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isTrimmed}.
|
|
676
|
+
*
|
|
677
|
+
* @see {@link Schema.isTrimmed} for creating the corresponding check
|
|
678
|
+
*
|
|
679
|
+
* @category validation
|
|
680
|
+
* @since 4.0.0
|
|
681
|
+
*/
|
|
682
|
+
export const isTrimmedReviver: FilterReviver<null> = makeReviverFilter(
|
|
683
|
+
"effect/schema/isTrimmed",
|
|
684
|
+
Schema.Null,
|
|
685
|
+
({ annotations }) => Schema.isTrimmed(annotations)
|
|
686
|
+
)
|
|
687
|
+
|
|
688
|
+
/**
|
|
689
|
+
* Reviver for persisted `isPattern` checks.
|
|
690
|
+
*
|
|
691
|
+
* **When to use**
|
|
692
|
+
*
|
|
693
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isPattern}.
|
|
694
|
+
*
|
|
695
|
+
* @see {@link Schema.isPattern} for creating the corresponding check
|
|
696
|
+
*
|
|
697
|
+
* @category validation
|
|
698
|
+
* @since 4.0.0
|
|
699
|
+
*/
|
|
700
|
+
export const isPatternReviver: FilterReviver<{
|
|
701
|
+
readonly source: string
|
|
702
|
+
readonly flags: string
|
|
703
|
+
}> = makeReviverFilter(
|
|
704
|
+
"effect/schema/isPattern",
|
|
705
|
+
IsPatternPayload,
|
|
706
|
+
({ annotations, payload }) => Schema.isPattern(new globalThis.RegExp(payload.source, payload.flags), annotations)
|
|
707
|
+
)
|
|
708
|
+
|
|
709
|
+
/**
|
|
710
|
+
* Reviver for persisted `isStringFinite` checks.
|
|
711
|
+
*
|
|
712
|
+
* **When to use**
|
|
713
|
+
*
|
|
714
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isStringFinite}.
|
|
715
|
+
*
|
|
716
|
+
* @see {@link Schema.isStringFinite} for creating the corresponding check
|
|
717
|
+
*
|
|
718
|
+
* @category validation
|
|
719
|
+
* @since 4.0.0
|
|
720
|
+
*/
|
|
721
|
+
export const isStringFiniteReviver: FilterReviver<null> = makeReviverFilter(
|
|
722
|
+
"effect/schema/isStringFinite",
|
|
723
|
+
Schema.Null,
|
|
724
|
+
({ annotations }) => Schema.isStringFinite(annotations)
|
|
725
|
+
)
|
|
726
|
+
|
|
727
|
+
/**
|
|
728
|
+
* Reviver for persisted `isStringBigInt` checks.
|
|
729
|
+
*
|
|
730
|
+
* **When to use**
|
|
731
|
+
*
|
|
732
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isStringBigInt}.
|
|
733
|
+
*
|
|
734
|
+
* @see {@link Schema.isStringBigInt} for creating the corresponding check
|
|
735
|
+
*
|
|
736
|
+
* @category validation
|
|
737
|
+
* @since 4.0.0
|
|
738
|
+
*/
|
|
739
|
+
export const isStringBigIntReviver: FilterReviver<null> = makeReviverFilter(
|
|
740
|
+
"effect/schema/isStringBigInt",
|
|
741
|
+
Schema.Null,
|
|
742
|
+
({ annotations }) => Schema.isStringBigInt(annotations)
|
|
743
|
+
)
|
|
744
|
+
|
|
745
|
+
/**
|
|
746
|
+
* Reviver for persisted `isStringSymbol` checks.
|
|
747
|
+
*
|
|
748
|
+
* **When to use**
|
|
749
|
+
*
|
|
750
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isStringSymbol}.
|
|
751
|
+
*
|
|
752
|
+
* @see {@link Schema.isStringSymbol} for creating the corresponding check
|
|
753
|
+
*
|
|
754
|
+
* @category validation
|
|
755
|
+
* @since 4.0.0
|
|
756
|
+
*/
|
|
757
|
+
export const isStringSymbolReviver: FilterReviver<null> = makeReviverFilter(
|
|
758
|
+
"effect/schema/isStringSymbol",
|
|
759
|
+
Schema.Null,
|
|
760
|
+
({ annotations }) => Schema.isStringSymbol(annotations)
|
|
761
|
+
)
|
|
762
|
+
|
|
763
|
+
/**
|
|
764
|
+
* Reviver for persisted `isUUID` checks.
|
|
765
|
+
*
|
|
766
|
+
* **When to use**
|
|
767
|
+
*
|
|
768
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isUUID}.
|
|
769
|
+
*
|
|
770
|
+
* @see {@link Schema.isUUID} for creating the corresponding check
|
|
771
|
+
*
|
|
772
|
+
* @category validation
|
|
773
|
+
* @since 4.0.0
|
|
774
|
+
*/
|
|
775
|
+
export const isUUIDReviver: FilterReviver<{
|
|
776
|
+
readonly version: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | null
|
|
777
|
+
}> = makeReviverFilter(
|
|
778
|
+
"effect/schema/isUUID",
|
|
779
|
+
Schema.Struct({ version: Schema.Union([Schema.Literals([1, 2, 3, 4, 5, 6, 7, 8]), Schema.Null]) }),
|
|
780
|
+
({ annotations, payload }) => Schema.isUUID(payload.version ?? undefined, annotations)
|
|
781
|
+
)
|
|
782
|
+
|
|
783
|
+
/**
|
|
784
|
+
* Reviver for persisted `isGUID` checks.
|
|
785
|
+
*
|
|
786
|
+
* **When to use**
|
|
787
|
+
*
|
|
788
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isGUID}.
|
|
789
|
+
*
|
|
790
|
+
* @see {@link Schema.isGUID} for creating the corresponding check
|
|
791
|
+
*
|
|
792
|
+
* @category validation
|
|
793
|
+
* @since 4.0.0
|
|
794
|
+
*/
|
|
795
|
+
export const isGUIDReviver: FilterReviver<null> = makeReviverFilter(
|
|
796
|
+
"effect/schema/isGUID",
|
|
797
|
+
Schema.Null,
|
|
798
|
+
({ annotations }) => Schema.isGUID(annotations)
|
|
799
|
+
)
|
|
800
|
+
|
|
801
|
+
/**
|
|
802
|
+
* Reviver for persisted `isULID` checks.
|
|
803
|
+
*
|
|
804
|
+
* **When to use**
|
|
805
|
+
*
|
|
806
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isULID}.
|
|
807
|
+
*
|
|
808
|
+
* @see {@link Schema.isULID} for creating the corresponding check
|
|
809
|
+
*
|
|
810
|
+
* @category validation
|
|
811
|
+
* @since 4.0.0
|
|
812
|
+
*/
|
|
813
|
+
export const isULIDReviver: FilterReviver<null> = makeReviverFilter(
|
|
814
|
+
"effect/schema/isULID",
|
|
815
|
+
Schema.Null,
|
|
816
|
+
({ annotations }) => Schema.isULID(annotations)
|
|
817
|
+
)
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* Reviver for persisted `isBase64` checks.
|
|
821
|
+
*
|
|
822
|
+
* **When to use**
|
|
823
|
+
*
|
|
824
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isBase64}.
|
|
825
|
+
*
|
|
826
|
+
* @see {@link Schema.isBase64} for creating the corresponding check
|
|
827
|
+
*
|
|
828
|
+
* @category validation
|
|
829
|
+
* @since 4.0.0
|
|
830
|
+
*/
|
|
831
|
+
export const isBase64Reviver: FilterReviver<null> = makeReviverFilter(
|
|
832
|
+
"effect/schema/isBase64",
|
|
833
|
+
Schema.Null,
|
|
834
|
+
({ annotations }) => Schema.isBase64(annotations)
|
|
835
|
+
)
|
|
836
|
+
|
|
837
|
+
/**
|
|
838
|
+
* Reviver for persisted `isBase64Url` checks.
|
|
839
|
+
*
|
|
840
|
+
* **When to use**
|
|
841
|
+
*
|
|
842
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isBase64Url}.
|
|
843
|
+
*
|
|
844
|
+
* @see {@link Schema.isBase64Url} for creating the corresponding check
|
|
845
|
+
*
|
|
846
|
+
* @category validation
|
|
847
|
+
* @since 4.0.0
|
|
848
|
+
*/
|
|
849
|
+
export const isBase64UrlReviver: FilterReviver<null> = makeReviverFilter(
|
|
850
|
+
"effect/schema/isBase64Url",
|
|
851
|
+
Schema.Null,
|
|
852
|
+
({ annotations }) => Schema.isBase64Url(annotations)
|
|
853
|
+
)
|
|
854
|
+
|
|
855
|
+
/**
|
|
856
|
+
* Reviver for persisted `isStartsWith` checks.
|
|
857
|
+
*
|
|
858
|
+
* **When to use**
|
|
859
|
+
*
|
|
860
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isStartsWith}.
|
|
861
|
+
*
|
|
862
|
+
* @see {@link Schema.isStartsWith} for creating the corresponding check
|
|
863
|
+
*
|
|
864
|
+
* @category validation
|
|
865
|
+
* @since 4.0.0
|
|
866
|
+
*/
|
|
867
|
+
export const isStartsWithReviver: FilterReviver<{
|
|
868
|
+
readonly startsWith: string
|
|
869
|
+
}> = makeReviverFilter(
|
|
870
|
+
"effect/schema/isStartsWith",
|
|
871
|
+
Schema.Struct({ startsWith: Schema.String }),
|
|
872
|
+
({ annotations, payload }) => Schema.isStartsWith(payload.startsWith, annotations)
|
|
873
|
+
)
|
|
874
|
+
|
|
875
|
+
/**
|
|
876
|
+
* Reviver for persisted `isEndsWith` checks.
|
|
877
|
+
*
|
|
878
|
+
* **When to use**
|
|
879
|
+
*
|
|
880
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isEndsWith}.
|
|
881
|
+
*
|
|
882
|
+
* @see {@link Schema.isEndsWith} for creating the corresponding check
|
|
883
|
+
*
|
|
884
|
+
* @category validation
|
|
885
|
+
* @since 4.0.0
|
|
886
|
+
*/
|
|
887
|
+
export const isEndsWithReviver: FilterReviver<{
|
|
888
|
+
readonly endsWith: string
|
|
889
|
+
}> = makeReviverFilter(
|
|
890
|
+
"effect/schema/isEndsWith",
|
|
891
|
+
Schema.Struct({ endsWith: Schema.String }),
|
|
892
|
+
({ annotations, payload }) => Schema.isEndsWith(payload.endsWith, annotations)
|
|
893
|
+
)
|
|
894
|
+
|
|
895
|
+
/**
|
|
896
|
+
* Reviver for persisted `isIncludes` checks.
|
|
897
|
+
*
|
|
898
|
+
* **When to use**
|
|
899
|
+
*
|
|
900
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isIncludes}.
|
|
901
|
+
*
|
|
902
|
+
* @see {@link Schema.isIncludes} for creating the corresponding check
|
|
903
|
+
*
|
|
904
|
+
* @category validation
|
|
905
|
+
* @since 4.0.0
|
|
906
|
+
*/
|
|
907
|
+
export const isIncludesReviver: FilterReviver<{
|
|
908
|
+
readonly includes: string
|
|
909
|
+
}> = makeReviverFilter(
|
|
910
|
+
"effect/schema/isIncludes",
|
|
911
|
+
Schema.Struct({ includes: Schema.String }),
|
|
912
|
+
({ annotations, payload }) => Schema.isIncludes(payload.includes, annotations)
|
|
913
|
+
)
|
|
914
|
+
|
|
915
|
+
/**
|
|
916
|
+
* Reviver for persisted `isUppercased` checks.
|
|
917
|
+
*
|
|
918
|
+
* **When to use**
|
|
919
|
+
*
|
|
920
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isUppercased}.
|
|
921
|
+
*
|
|
922
|
+
* @see {@link Schema.isUppercased} for creating the corresponding check
|
|
923
|
+
*
|
|
924
|
+
* @category validation
|
|
925
|
+
* @since 4.0.0
|
|
926
|
+
*/
|
|
927
|
+
export const isUppercasedReviver: FilterReviver<null> = makeReviverFilter(
|
|
928
|
+
"effect/schema/isUppercased",
|
|
929
|
+
Schema.Null,
|
|
930
|
+
({ annotations }) => Schema.isUppercased(annotations)
|
|
931
|
+
)
|
|
932
|
+
|
|
933
|
+
/**
|
|
934
|
+
* Reviver for persisted `isLowercased` checks.
|
|
935
|
+
*
|
|
936
|
+
* **When to use**
|
|
937
|
+
*
|
|
938
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isLowercased}.
|
|
939
|
+
*
|
|
940
|
+
* @see {@link Schema.isLowercased} for creating the corresponding check
|
|
941
|
+
*
|
|
942
|
+
* @category validation
|
|
943
|
+
* @since 4.0.0
|
|
944
|
+
*/
|
|
945
|
+
export const isLowercasedReviver: FilterReviver<null> = makeReviverFilter(
|
|
946
|
+
"effect/schema/isLowercased",
|
|
947
|
+
Schema.Null,
|
|
948
|
+
({ annotations }) => Schema.isLowercased(annotations)
|
|
949
|
+
)
|
|
950
|
+
|
|
951
|
+
/**
|
|
952
|
+
* Reviver for persisted `isCapitalized` checks.
|
|
953
|
+
*
|
|
954
|
+
* **When to use**
|
|
955
|
+
*
|
|
956
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isCapitalized}.
|
|
957
|
+
*
|
|
958
|
+
* @see {@link Schema.isCapitalized} for creating the corresponding check
|
|
959
|
+
*
|
|
960
|
+
* @category validation
|
|
961
|
+
* @since 4.0.0
|
|
962
|
+
*/
|
|
963
|
+
export const isCapitalizedReviver: FilterReviver<null> = makeReviverFilter(
|
|
964
|
+
"effect/schema/isCapitalized",
|
|
965
|
+
Schema.Null,
|
|
966
|
+
({ annotations }) => Schema.isCapitalized(annotations)
|
|
967
|
+
)
|
|
968
|
+
|
|
969
|
+
/**
|
|
970
|
+
* Reviver for persisted `isUncapitalized` checks.
|
|
971
|
+
*
|
|
972
|
+
* **When to use**
|
|
973
|
+
*
|
|
974
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isUncapitalized}.
|
|
975
|
+
*
|
|
976
|
+
* @see {@link Schema.isUncapitalized} for creating the corresponding check
|
|
977
|
+
*
|
|
978
|
+
* @category validation
|
|
979
|
+
* @since 4.0.0
|
|
980
|
+
*/
|
|
981
|
+
export const isUncapitalizedReviver: FilterReviver<null> = makeReviverFilter(
|
|
982
|
+
"effect/schema/isUncapitalized",
|
|
983
|
+
Schema.Null,
|
|
984
|
+
({ annotations }) => Schema.isUncapitalized(annotations)
|
|
985
|
+
)
|
|
986
|
+
|
|
987
|
+
/**
|
|
988
|
+
* Reviver for persisted `isFinite` checks.
|
|
989
|
+
*
|
|
990
|
+
* **When to use**
|
|
991
|
+
*
|
|
992
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isFinite}.
|
|
993
|
+
*
|
|
994
|
+
* @see {@link Schema.isFinite} for creating the corresponding check
|
|
995
|
+
*
|
|
996
|
+
* @category validation
|
|
997
|
+
* @since 4.0.0
|
|
998
|
+
*/
|
|
999
|
+
export const isFiniteReviver: FilterReviver<null> = makeReviverFilter(
|
|
1000
|
+
"effect/schema/isFinite",
|
|
1001
|
+
Schema.Null,
|
|
1002
|
+
({ annotations }) => Schema.isFinite(annotations)
|
|
1003
|
+
)
|
|
1004
|
+
|
|
1005
|
+
/**
|
|
1006
|
+
* Reviver for persisted `isGreaterThan` checks.
|
|
1007
|
+
*
|
|
1008
|
+
* **When to use**
|
|
1009
|
+
*
|
|
1010
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isGreaterThan}.
|
|
1011
|
+
*
|
|
1012
|
+
* @see {@link Schema.isGreaterThan} for creating the corresponding check
|
|
1013
|
+
*
|
|
1014
|
+
* @category validation
|
|
1015
|
+
* @since 4.0.0
|
|
1016
|
+
*/
|
|
1017
|
+
export const isGreaterThanReviver: FilterReviver<{
|
|
1018
|
+
readonly exclusiveMinimum: number
|
|
1019
|
+
}> = makeReviverFilter(
|
|
1020
|
+
"effect/schema/isGreaterThan",
|
|
1021
|
+
Schema.Struct({ exclusiveMinimum: Schema.Finite }),
|
|
1022
|
+
({ annotations, payload }) => Schema.isGreaterThan(payload.exclusiveMinimum, annotations)
|
|
1023
|
+
)
|
|
1024
|
+
|
|
1025
|
+
/**
|
|
1026
|
+
* Reviver for persisted `isGreaterThanOrEqualTo` checks.
|
|
1027
|
+
*
|
|
1028
|
+
* **When to use**
|
|
1029
|
+
*
|
|
1030
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isGreaterThanOrEqualTo}.
|
|
1031
|
+
*
|
|
1032
|
+
* @see {@link Schema.isGreaterThanOrEqualTo} for creating the corresponding check
|
|
1033
|
+
*
|
|
1034
|
+
* @category validation
|
|
1035
|
+
* @since 4.0.0
|
|
1036
|
+
*/
|
|
1037
|
+
export const isGreaterThanOrEqualToReviver: FilterReviver<{
|
|
1038
|
+
readonly minimum: number
|
|
1039
|
+
}> = makeReviverFilter(
|
|
1040
|
+
"effect/schema/isGreaterThanOrEqualTo",
|
|
1041
|
+
Schema.Struct({ minimum: Schema.Finite }),
|
|
1042
|
+
({ annotations, payload }) => Schema.isGreaterThanOrEqualTo(payload.minimum, annotations)
|
|
1043
|
+
)
|
|
1044
|
+
|
|
1045
|
+
/**
|
|
1046
|
+
* Reviver for persisted `isLessThan` checks.
|
|
1047
|
+
*
|
|
1048
|
+
* **When to use**
|
|
1049
|
+
*
|
|
1050
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isLessThan}.
|
|
1051
|
+
*
|
|
1052
|
+
* @see {@link Schema.isLessThan} for creating the corresponding check
|
|
1053
|
+
*
|
|
1054
|
+
* @category validation
|
|
1055
|
+
* @since 4.0.0
|
|
1056
|
+
*/
|
|
1057
|
+
export const isLessThanReviver: FilterReviver<{
|
|
1058
|
+
readonly exclusiveMaximum: number
|
|
1059
|
+
}> = makeReviverFilter(
|
|
1060
|
+
"effect/schema/isLessThan",
|
|
1061
|
+
Schema.Struct({ exclusiveMaximum: Schema.Finite }),
|
|
1062
|
+
({ annotations, payload }) => Schema.isLessThan(payload.exclusiveMaximum, annotations)
|
|
1063
|
+
)
|
|
1064
|
+
|
|
1065
|
+
/**
|
|
1066
|
+
* Reviver for persisted `isLessThanOrEqualTo` checks.
|
|
1067
|
+
*
|
|
1068
|
+
* **When to use**
|
|
1069
|
+
*
|
|
1070
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isLessThanOrEqualTo}.
|
|
1071
|
+
*
|
|
1072
|
+
* @see {@link Schema.isLessThanOrEqualTo} for creating the corresponding check
|
|
1073
|
+
*
|
|
1074
|
+
* @category validation
|
|
1075
|
+
* @since 4.0.0
|
|
1076
|
+
*/
|
|
1077
|
+
export const isLessThanOrEqualToReviver: FilterReviver<{
|
|
1078
|
+
readonly maximum: number
|
|
1079
|
+
}> = makeReviverFilter(
|
|
1080
|
+
"effect/schema/isLessThanOrEqualTo",
|
|
1081
|
+
Schema.Struct({ maximum: Schema.Finite }),
|
|
1082
|
+
({ annotations, payload }) => Schema.isLessThanOrEqualTo(payload.maximum, annotations)
|
|
1083
|
+
)
|
|
1084
|
+
|
|
1085
|
+
/**
|
|
1086
|
+
* Reviver for persisted `isBetween` checks.
|
|
1087
|
+
*
|
|
1088
|
+
* **When to use**
|
|
1089
|
+
*
|
|
1090
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isBetween}.
|
|
1091
|
+
*
|
|
1092
|
+
* @see {@link Schema.isBetween} for creating the corresponding check
|
|
1093
|
+
*
|
|
1094
|
+
* @category validation
|
|
1095
|
+
* @since 4.0.0
|
|
1096
|
+
*/
|
|
1097
|
+
export const isBetweenReviver: FilterReviver<{
|
|
1098
|
+
readonly minimum: number
|
|
1099
|
+
readonly maximum: number
|
|
1100
|
+
readonly exclusiveMinimum?: true | undefined
|
|
1101
|
+
readonly exclusiveMaximum?: true | undefined
|
|
1102
|
+
}> = makeReviverFilter(
|
|
1103
|
+
"effect/schema/isBetween",
|
|
1104
|
+
Schema.Struct({
|
|
1105
|
+
minimum: Schema.Finite,
|
|
1106
|
+
maximum: Schema.Finite,
|
|
1107
|
+
exclusiveMinimum: Schema.optional(Schema.Literal(true)),
|
|
1108
|
+
exclusiveMaximum: Schema.optional(Schema.Literal(true))
|
|
1109
|
+
}),
|
|
1110
|
+
({ annotations, payload }) => Schema.isBetween(payload, annotations)
|
|
1111
|
+
)
|
|
1112
|
+
|
|
1113
|
+
/**
|
|
1114
|
+
* Reviver for persisted `isMultipleOf` checks.
|
|
1115
|
+
*
|
|
1116
|
+
* **When to use**
|
|
1117
|
+
*
|
|
1118
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isMultipleOf}.
|
|
1119
|
+
*
|
|
1120
|
+
* @see {@link Schema.isMultipleOf} for creating the corresponding check
|
|
1121
|
+
*
|
|
1122
|
+
* @category validation
|
|
1123
|
+
* @since 4.0.0
|
|
1124
|
+
*/
|
|
1125
|
+
export const isMultipleOfReviver: FilterReviver<{
|
|
1126
|
+
readonly divisor: number
|
|
1127
|
+
}> = makeReviverFilter(
|
|
1128
|
+
"effect/schema/isMultipleOf",
|
|
1129
|
+
Schema.Struct({ divisor: Schema.Finite }),
|
|
1130
|
+
({ annotations, payload }) => Schema.isMultipleOf(payload.divisor, annotations)
|
|
1131
|
+
)
|
|
1132
|
+
|
|
1133
|
+
/**
|
|
1134
|
+
* Reviver for persisted `isInt` checks.
|
|
1135
|
+
*
|
|
1136
|
+
* **When to use**
|
|
1137
|
+
*
|
|
1138
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isInt}.
|
|
1139
|
+
*
|
|
1140
|
+
* @see {@link Schema.isInt} for creating the corresponding check
|
|
1141
|
+
*
|
|
1142
|
+
* @category validation
|
|
1143
|
+
* @since 4.0.0
|
|
1144
|
+
*/
|
|
1145
|
+
export const isIntReviver: FilterReviver<null> = makeReviverFilter(
|
|
1146
|
+
"effect/schema/isInt",
|
|
1147
|
+
Schema.Null,
|
|
1148
|
+
({ annotations }) => Schema.isInt(annotations)
|
|
1149
|
+
)
|
|
1150
|
+
|
|
1151
|
+
/**
|
|
1152
|
+
* Reviver for persisted `isMinLength` checks.
|
|
1153
|
+
*
|
|
1154
|
+
* **When to use**
|
|
1155
|
+
*
|
|
1156
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isMinLength}.
|
|
1157
|
+
*
|
|
1158
|
+
* @see {@link Schema.isMinLength} for creating the corresponding check
|
|
1159
|
+
*
|
|
1160
|
+
* @category validation
|
|
1161
|
+
* @since 4.0.0
|
|
1162
|
+
*/
|
|
1163
|
+
export const isMinLengthReviver: FilterReviver<{
|
|
1164
|
+
readonly minLength: number
|
|
1165
|
+
}> = makeReviverFilter(
|
|
1166
|
+
"effect/schema/isMinLength",
|
|
1167
|
+
Schema.Struct({ minLength: Schema.Natural }),
|
|
1168
|
+
({ annotations, payload }) => Schema.isMinLength(payload.minLength, annotations)
|
|
1169
|
+
)
|
|
1170
|
+
|
|
1171
|
+
/**
|
|
1172
|
+
* Reviver for persisted `isMaxLength` checks.
|
|
1173
|
+
*
|
|
1174
|
+
* **When to use**
|
|
1175
|
+
*
|
|
1176
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isMaxLength}.
|
|
1177
|
+
*
|
|
1178
|
+
* @see {@link Schema.isMaxLength} for creating the corresponding check
|
|
1179
|
+
*
|
|
1180
|
+
* @category validation
|
|
1181
|
+
* @since 4.0.0
|
|
1182
|
+
*/
|
|
1183
|
+
export const isMaxLengthReviver: FilterReviver<{
|
|
1184
|
+
readonly maxLength: number
|
|
1185
|
+
}> = makeReviverFilter(
|
|
1186
|
+
"effect/schema/isMaxLength",
|
|
1187
|
+
Schema.Struct({ maxLength: Schema.Natural }),
|
|
1188
|
+
({ annotations, payload }) => Schema.isMaxLength(payload.maxLength, annotations)
|
|
1189
|
+
)
|
|
1190
|
+
|
|
1191
|
+
/**
|
|
1192
|
+
* Reviver for persisted `isLengthBetween` checks.
|
|
1193
|
+
*
|
|
1194
|
+
* **When to use**
|
|
1195
|
+
*
|
|
1196
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isLengthBetween}.
|
|
1197
|
+
*
|
|
1198
|
+
* @see {@link Schema.isLengthBetween} for creating the corresponding check
|
|
1199
|
+
*
|
|
1200
|
+
* @category validation
|
|
1201
|
+
* @since 4.0.0
|
|
1202
|
+
*/
|
|
1203
|
+
export const isLengthBetweenReviver: FilterReviver<{
|
|
1204
|
+
readonly minimum: number
|
|
1205
|
+
readonly maximum: number
|
|
1206
|
+
}> = makeReviverFilter(
|
|
1207
|
+
"effect/schema/isLengthBetween",
|
|
1208
|
+
Schema.Struct({ minimum: Schema.Natural, maximum: Schema.Natural }),
|
|
1209
|
+
({ annotations, payload }) => Schema.isLengthBetween(payload.minimum, payload.maximum, annotations)
|
|
1210
|
+
)
|
|
1211
|
+
|
|
1212
|
+
/**
|
|
1213
|
+
* Reviver for persisted `isMinSize` checks.
|
|
1214
|
+
*
|
|
1215
|
+
* **When to use**
|
|
1216
|
+
*
|
|
1217
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isMinSize}.
|
|
1218
|
+
*
|
|
1219
|
+
* @see {@link Schema.isMinSize} for creating the corresponding check
|
|
1220
|
+
*
|
|
1221
|
+
* @category validation
|
|
1222
|
+
* @since 4.0.0
|
|
1223
|
+
*/
|
|
1224
|
+
export const isMinSizeReviver: FilterReviver<{
|
|
1225
|
+
readonly minSize: number
|
|
1226
|
+
}> = makeReviverFilter(
|
|
1227
|
+
"effect/schema/isMinSize",
|
|
1228
|
+
Schema.Struct({ minSize: Schema.Natural }),
|
|
1229
|
+
({ annotations, payload }) => Schema.isMinSize(payload.minSize, annotations)
|
|
1230
|
+
)
|
|
1231
|
+
|
|
1232
|
+
/**
|
|
1233
|
+
* Reviver for persisted `isMaxSize` checks.
|
|
1234
|
+
*
|
|
1235
|
+
* **When to use**
|
|
1236
|
+
*
|
|
1237
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isMaxSize}.
|
|
1238
|
+
*
|
|
1239
|
+
* @see {@link Schema.isMaxSize} for creating the corresponding check
|
|
1240
|
+
*
|
|
1241
|
+
* @category validation
|
|
1242
|
+
* @since 4.0.0
|
|
1243
|
+
*/
|
|
1244
|
+
export const isMaxSizeReviver: FilterReviver<{
|
|
1245
|
+
readonly maxSize: number
|
|
1246
|
+
}> = makeReviverFilter(
|
|
1247
|
+
"effect/schema/isMaxSize",
|
|
1248
|
+
Schema.Struct({ maxSize: Schema.Natural }),
|
|
1249
|
+
({ annotations, payload }) => Schema.isMaxSize(payload.maxSize, annotations)
|
|
1250
|
+
)
|
|
1251
|
+
|
|
1252
|
+
/**
|
|
1253
|
+
* Reviver for persisted `isSizeBetween` checks.
|
|
1254
|
+
*
|
|
1255
|
+
* **When to use**
|
|
1256
|
+
*
|
|
1257
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isSizeBetween}.
|
|
1258
|
+
*
|
|
1259
|
+
* @see {@link Schema.isSizeBetween} for creating the corresponding check
|
|
1260
|
+
*
|
|
1261
|
+
* @category validation
|
|
1262
|
+
* @since 4.0.0
|
|
1263
|
+
*/
|
|
1264
|
+
export const isSizeBetweenReviver: FilterReviver<{
|
|
1265
|
+
readonly minimum: number
|
|
1266
|
+
readonly maximum: number
|
|
1267
|
+
}> = makeReviverFilter(
|
|
1268
|
+
"effect/schema/isSizeBetween",
|
|
1269
|
+
Schema.Struct({ minimum: Schema.Natural, maximum: Schema.Natural }),
|
|
1270
|
+
({ annotations, payload }) => Schema.isSizeBetween(payload.minimum, payload.maximum, annotations)
|
|
1271
|
+
)
|
|
1272
|
+
|
|
1273
|
+
/**
|
|
1274
|
+
* Reviver for persisted `isMinProperties` checks.
|
|
1275
|
+
*
|
|
1276
|
+
* **When to use**
|
|
1277
|
+
*
|
|
1278
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isMinProperties}.
|
|
1279
|
+
*
|
|
1280
|
+
* @see {@link Schema.isMinProperties} for creating the corresponding check
|
|
1281
|
+
*
|
|
1282
|
+
* @category validation
|
|
1283
|
+
* @since 4.0.0
|
|
1284
|
+
*/
|
|
1285
|
+
export const isMinPropertiesReviver: FilterReviver<{
|
|
1286
|
+
readonly minProperties: number
|
|
1287
|
+
}> = makeReviverFilter(
|
|
1288
|
+
"effect/schema/isMinProperties",
|
|
1289
|
+
Schema.Struct({ minProperties: Schema.Natural }),
|
|
1290
|
+
({ annotations, payload }) => Schema.isMinProperties(payload.minProperties, annotations)
|
|
1291
|
+
)
|
|
1292
|
+
|
|
1293
|
+
/**
|
|
1294
|
+
* Reviver for persisted `isMaxProperties` checks.
|
|
1295
|
+
*
|
|
1296
|
+
* **When to use**
|
|
1297
|
+
*
|
|
1298
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isMaxProperties}.
|
|
1299
|
+
*
|
|
1300
|
+
* @see {@link Schema.isMaxProperties} for creating the corresponding check
|
|
1301
|
+
*
|
|
1302
|
+
* @category validation
|
|
1303
|
+
* @since 4.0.0
|
|
1304
|
+
*/
|
|
1305
|
+
export const isMaxPropertiesReviver: FilterReviver<{
|
|
1306
|
+
readonly maxProperties: number
|
|
1307
|
+
}> = makeReviverFilter(
|
|
1308
|
+
"effect/schema/isMaxProperties",
|
|
1309
|
+
Schema.Struct({ maxProperties: Schema.Natural }),
|
|
1310
|
+
({ annotations, payload }) => Schema.isMaxProperties(payload.maxProperties, annotations)
|
|
1311
|
+
)
|
|
1312
|
+
|
|
1313
|
+
/**
|
|
1314
|
+
* Reviver for persisted `isPropertiesLengthBetween` checks.
|
|
1315
|
+
*
|
|
1316
|
+
* **When to use**
|
|
1317
|
+
*
|
|
1318
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isPropertiesLengthBetween}.
|
|
1319
|
+
*
|
|
1320
|
+
* @see {@link Schema.isPropertiesLengthBetween} for creating the corresponding check
|
|
1321
|
+
*
|
|
1322
|
+
* @category validation
|
|
1323
|
+
* @since 4.0.0
|
|
1324
|
+
*/
|
|
1325
|
+
export const isPropertiesLengthBetweenReviver: FilterReviver<{
|
|
1326
|
+
readonly minimum: number
|
|
1327
|
+
readonly maximum: number
|
|
1328
|
+
}> = makeReviverFilter(
|
|
1329
|
+
"effect/schema/isPropertiesLengthBetween",
|
|
1330
|
+
Schema.Struct({ minimum: Schema.Natural, maximum: Schema.Natural }),
|
|
1331
|
+
({ annotations, payload }) => Schema.isPropertiesLengthBetween(payload.minimum, payload.maximum, annotations)
|
|
1332
|
+
)
|
|
1333
|
+
|
|
1334
|
+
/**
|
|
1335
|
+
* Reviver for persisted `isPropertyNames` checks.
|
|
1336
|
+
*
|
|
1337
|
+
* **When to use**
|
|
1338
|
+
*
|
|
1339
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isPropertyNames}.
|
|
1340
|
+
*
|
|
1341
|
+
* @see {@link Schema.isPropertyNames} for creating the corresponding check
|
|
1342
|
+
*
|
|
1343
|
+
* @category validation
|
|
1344
|
+
* @since 4.0.0
|
|
1345
|
+
*/
|
|
1346
|
+
export const isPropertyNamesReviver: FilterReviver<null> = makeReviverFilter(
|
|
1347
|
+
"effect/schema/isPropertyNames",
|
|
1348
|
+
Schema.Null,
|
|
1349
|
+
({ annotations, schemas }) => Schema.isPropertyNames(schemas[0], annotations)
|
|
1350
|
+
)
|
|
1351
|
+
|
|
1352
|
+
/**
|
|
1353
|
+
* Reviver for persisted `isUnique` checks.
|
|
1354
|
+
*
|
|
1355
|
+
* **When to use**
|
|
1356
|
+
*
|
|
1357
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isUnique}.
|
|
1358
|
+
*
|
|
1359
|
+
* @see {@link Schema.isUnique} for creating the corresponding check
|
|
1360
|
+
*
|
|
1361
|
+
* @category validation
|
|
1362
|
+
* @since 4.0.0
|
|
1363
|
+
*/
|
|
1364
|
+
export const isUniqueReviver: FilterReviver<null> = makeReviverFilter(
|
|
1365
|
+
"effect/schema/isUnique",
|
|
1366
|
+
Schema.Null,
|
|
1367
|
+
({ annotations }) => Schema.isUnique(annotations)
|
|
1368
|
+
)
|
|
1369
|
+
|
|
1370
|
+
/**
|
|
1371
|
+
* Reviver for persisted `isUniqueKey` checks.
|
|
1372
|
+
*
|
|
1373
|
+
* **When to use**
|
|
1374
|
+
*
|
|
1375
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isUniqueKey}.
|
|
1376
|
+
*
|
|
1377
|
+
* @see {@link Schema.isUniqueKey} for creating the corresponding check
|
|
1378
|
+
* @category validation
|
|
1379
|
+
* @since 4.0.0
|
|
1380
|
+
*/
|
|
1381
|
+
export const isUniqueKeyReviver: FilterReviver<null> = makeReviverFilter(
|
|
1382
|
+
"effect/schema/isUniqueKey",
|
|
1383
|
+
Schema.Null,
|
|
1384
|
+
({ annotations }) => Schema.isUniqueKey(annotations)
|
|
1385
|
+
)
|
|
1386
|
+
|
|
1387
|
+
/**
|
|
1388
|
+
* Reviver for persisted `Option` declarations.
|
|
1389
|
+
*
|
|
1390
|
+
* **When to use**
|
|
1391
|
+
*
|
|
1392
|
+
* Use when reconstructing documents that may contain schemas created by {@link Schema.Option}.
|
|
1393
|
+
*
|
|
1394
|
+
* @see {@link Schema.Option} for creating the corresponding schema
|
|
1395
|
+
*
|
|
1396
|
+
* @category schemas
|
|
1397
|
+
* @since 4.0.0
|
|
1398
|
+
*/
|
|
1399
|
+
export const OptionReviver: DeclarationReviver<null> = makeReviverDeclaration(
|
|
1400
|
+
"effect/schema/Option",
|
|
1401
|
+
Schema.Null,
|
|
1402
|
+
({ annotations, typeParameters }) => {
|
|
1403
|
+
const schema = Schema.Option(typeParameters[0])
|
|
1404
|
+
return annotations === undefined ? schema : schema.annotate(annotations)
|
|
1405
|
+
}
|
|
1406
|
+
)
|
|
1407
|
+
|
|
1408
|
+
/**
|
|
1409
|
+
* Reviver for persisted {@link Schema.Result} declarations.
|
|
1410
|
+
*
|
|
1411
|
+
* **When to use**
|
|
1412
|
+
*
|
|
1413
|
+
* Use when reconstructing documents that may contain schemas created by {@link Schema.Result}.
|
|
1414
|
+
*
|
|
1415
|
+
* @see {@link Schema.Result} for creating the corresponding schema
|
|
1416
|
+
*
|
|
1417
|
+
* @category schemas
|
|
1418
|
+
* @since 4.0.0
|
|
1419
|
+
*/
|
|
1420
|
+
export const ResultReviver: DeclarationReviver<null> = makeReviverDeclaration(
|
|
1421
|
+
"effect/schema/Result",
|
|
1422
|
+
Schema.Null,
|
|
1423
|
+
({ annotations, typeParameters }) => {
|
|
1424
|
+
const schema = Schema.Result(typeParameters[0], typeParameters[1])
|
|
1425
|
+
return annotations === undefined ? schema : schema.annotate(annotations)
|
|
1426
|
+
}
|
|
1427
|
+
)
|
|
1428
|
+
|
|
1429
|
+
/**
|
|
1430
|
+
* Reviver for persisted {@link Schema.Redacted} declarations.
|
|
1431
|
+
*
|
|
1432
|
+
* **When to use**
|
|
1433
|
+
*
|
|
1434
|
+
* Use when reconstructing documents that may contain schemas created by {@link Schema.Redacted}.
|
|
1435
|
+
*
|
|
1436
|
+
* @see {@link Schema.Redacted} for creating the corresponding schema
|
|
1437
|
+
*
|
|
1438
|
+
* @category schemas
|
|
1439
|
+
* @since 4.0.0
|
|
1440
|
+
*/
|
|
1441
|
+
export const RedactedReviver: DeclarationReviver<RedactedRepresentationPayload> = makeReviverDeclaration(
|
|
1442
|
+
"effect/schema/Redacted",
|
|
1443
|
+
RedactedRepresentationPayload,
|
|
1444
|
+
({ annotations, payload, typeParameters }) => {
|
|
1445
|
+
const schema = Schema.Redacted(typeParameters[0], payload ?? undefined)
|
|
1446
|
+
return annotations === undefined ? schema : schema.annotate(annotations)
|
|
1447
|
+
}
|
|
1448
|
+
)
|
|
1449
|
+
|
|
1450
|
+
/**
|
|
1451
|
+
* Reviver for persisted `CauseReason` declarations.
|
|
1452
|
+
*
|
|
1453
|
+
* **When to use**
|
|
1454
|
+
*
|
|
1455
|
+
* Use when reconstructing documents that may contain schemas created by {@link Schema.CauseReason}.
|
|
1456
|
+
*
|
|
1457
|
+
* @see {@link Schema.CauseReason} for creating the corresponding schema
|
|
1458
|
+
*
|
|
1459
|
+
* @category schemas
|
|
1460
|
+
* @since 4.0.0
|
|
1461
|
+
*/
|
|
1462
|
+
export const CauseReasonReviver: DeclarationReviver<null> = makeReviverDeclaration(
|
|
1463
|
+
"effect/schema/CauseReason",
|
|
1464
|
+
Schema.Null,
|
|
1465
|
+
({ annotations, typeParameters }) => {
|
|
1466
|
+
const schema = Schema.CauseReason(typeParameters[0], typeParameters[1])
|
|
1467
|
+
return annotations === undefined ? schema : schema.annotate(annotations)
|
|
1468
|
+
}
|
|
1469
|
+
)
|
|
1470
|
+
|
|
1471
|
+
/**
|
|
1472
|
+
* Reviver for persisted `Cause` declarations.
|
|
1473
|
+
*
|
|
1474
|
+
* **When to use**
|
|
1475
|
+
*
|
|
1476
|
+
* Use when reconstructing documents that may contain schemas created by {@link Schema.Cause}.
|
|
1477
|
+
*
|
|
1478
|
+
* @see {@link Schema.Cause} for creating the corresponding schema
|
|
1479
|
+
*
|
|
1480
|
+
* @category schemas
|
|
1481
|
+
* @since 4.0.0
|
|
1482
|
+
*/
|
|
1483
|
+
export const CauseReviver: DeclarationReviver<null> = makeReviverDeclaration(
|
|
1484
|
+
"effect/schema/Cause",
|
|
1485
|
+
Schema.Null,
|
|
1486
|
+
({ annotations, typeParameters }) => {
|
|
1487
|
+
const schema = Schema.Cause(typeParameters[0], typeParameters[1])
|
|
1488
|
+
return annotations === undefined ? schema : schema.annotate(annotations)
|
|
1489
|
+
}
|
|
1490
|
+
)
|
|
1491
|
+
|
|
1492
|
+
/**
|
|
1493
|
+
* Reviver for persisted {@link Schema.ErrorInstance} declarations.
|
|
1494
|
+
*
|
|
1495
|
+
* **When to use**
|
|
1496
|
+
*
|
|
1497
|
+
* Use when reconstructing documents that may contain schemas created by {@link Schema.ErrorInstance}.
|
|
1498
|
+
*
|
|
1499
|
+
* @see {@link Schema.ErrorInstance} for creating the corresponding schema
|
|
1500
|
+
*
|
|
1501
|
+
* @category schemas
|
|
1502
|
+
* @since 4.0.0
|
|
1503
|
+
*/
|
|
1504
|
+
export const ErrorInstanceReviver: DeclarationReviver<ErrorRepresentationPayload> = makeReviverDeclaration(
|
|
1505
|
+
"effect/schema/Error",
|
|
1506
|
+
ErrorRepresentationPayload,
|
|
1507
|
+
({ annotations, payload }) => {
|
|
1508
|
+
const schema = Schema.ErrorInstance(payload ?? undefined)
|
|
1509
|
+
return annotations === undefined ? schema : schema.annotate(annotations)
|
|
1510
|
+
}
|
|
1511
|
+
)
|
|
1512
|
+
|
|
1513
|
+
/**
|
|
1514
|
+
* Reviver for persisted `Exit` declarations.
|
|
1515
|
+
*
|
|
1516
|
+
* **When to use**
|
|
1517
|
+
*
|
|
1518
|
+
* Use when reconstructing documents that may contain schemas created by {@link Schema.Exit}.
|
|
1519
|
+
*
|
|
1520
|
+
* @see {@link Schema.Exit} for creating the corresponding schema
|
|
1521
|
+
*
|
|
1522
|
+
* @category schemas
|
|
1523
|
+
* @since 4.0.0
|
|
1524
|
+
*/
|
|
1525
|
+
export const ExitReviver: DeclarationReviver<null> = makeReviverDeclaration(
|
|
1526
|
+
"effect/schema/Exit",
|
|
1527
|
+
Schema.Null,
|
|
1528
|
+
({ annotations, typeParameters }) => {
|
|
1529
|
+
const schema = Schema.Exit(typeParameters[0], typeParameters[1], typeParameters[2])
|
|
1530
|
+
return annotations === undefined ? schema : schema.annotate(annotations)
|
|
1531
|
+
}
|
|
1532
|
+
)
|
|
1533
|
+
|
|
1534
|
+
/**
|
|
1535
|
+
* Reviver for persisted {@link Schema.ReadonlyMap} declarations.
|
|
1536
|
+
*
|
|
1537
|
+
* **When to use**
|
|
1538
|
+
*
|
|
1539
|
+
* Use when reconstructing documents that may contain schemas created by {@link Schema.ReadonlyMap}.
|
|
1540
|
+
*
|
|
1541
|
+
* @see {@link Schema.ReadonlyMap} for creating the corresponding schema
|
|
1542
|
+
*
|
|
1543
|
+
* @category schemas
|
|
1544
|
+
* @since 4.0.0
|
|
1545
|
+
*/
|
|
1546
|
+
export const ReadonlyMapReviver: DeclarationReviver<null> = makeReviverDeclaration(
|
|
1547
|
+
"effect/schema/ReadonlyMap",
|
|
1548
|
+
Schema.Null,
|
|
1549
|
+
({ annotations, typeParameters }) => {
|
|
1550
|
+
const schema = Schema.ReadonlyMap(typeParameters[0], typeParameters[1])
|
|
1551
|
+
return annotations === undefined ? schema : schema.annotate(annotations)
|
|
1552
|
+
}
|
|
1553
|
+
)
|
|
1554
|
+
|
|
1555
|
+
/**
|
|
1556
|
+
* Reviver for persisted {@link Schema.Graph} declarations.
|
|
1557
|
+
*
|
|
1558
|
+
* @category schemas
|
|
1559
|
+
* @since 4.0.0
|
|
1560
|
+
*/
|
|
1561
|
+
export const GraphReviver: DeclarationReviver<"directed" | "undirected"> = makeReviverDeclaration(
|
|
1562
|
+
"effect/schema/Graph",
|
|
1563
|
+
Schema.Literals(["directed", "undirected"]),
|
|
1564
|
+
({ annotations, payload, typeParameters }) => {
|
|
1565
|
+
const schema = Schema.Graph(payload, typeParameters[0], typeParameters[1])
|
|
1566
|
+
return annotations === undefined ? schema : schema.annotate(annotations)
|
|
1567
|
+
}
|
|
1568
|
+
)
|
|
1569
|
+
|
|
1570
|
+
/**
|
|
1571
|
+
* Reviver for persisted `HashMap` declarations.
|
|
1572
|
+
*
|
|
1573
|
+
* **When to use**
|
|
1574
|
+
*
|
|
1575
|
+
* Use when reconstructing documents that may contain schemas created by {@link Schema.HashMap}.
|
|
1576
|
+
*
|
|
1577
|
+
* @see {@link Schema.HashMap} for creating the corresponding schema
|
|
1578
|
+
*
|
|
1579
|
+
* @category schemas
|
|
1580
|
+
* @since 4.0.0
|
|
1581
|
+
*/
|
|
1582
|
+
export const HashMapReviver: DeclarationReviver<null> = makeReviverDeclaration(
|
|
1583
|
+
"effect/schema/HashMap",
|
|
1584
|
+
Schema.Null,
|
|
1585
|
+
({ annotations, typeParameters }) => {
|
|
1586
|
+
const schema = Schema.HashMap(typeParameters[0], typeParameters[1])
|
|
1587
|
+
return annotations === undefined ? schema : schema.annotate(annotations)
|
|
1588
|
+
}
|
|
1589
|
+
)
|
|
1590
|
+
|
|
1591
|
+
/**
|
|
1592
|
+
* Reviver for persisted {@link Schema.ReadonlySet} declarations.
|
|
1593
|
+
*
|
|
1594
|
+
* **When to use**
|
|
1595
|
+
*
|
|
1596
|
+
* Use when reconstructing documents that may contain schemas created by {@link Schema.ReadonlySet}.
|
|
1597
|
+
*
|
|
1598
|
+
* @see {@link Schema.ReadonlySet} for creating the corresponding schema
|
|
1599
|
+
*
|
|
1600
|
+
* @category schemas
|
|
1601
|
+
* @since 4.0.0
|
|
1602
|
+
*/
|
|
1603
|
+
export const ReadonlySetReviver: DeclarationReviver<null> = makeReviverDeclaration(
|
|
1604
|
+
"effect/schema/ReadonlySet",
|
|
1605
|
+
Schema.Null,
|
|
1606
|
+
({ annotations, typeParameters }) => {
|
|
1607
|
+
const schema = Schema.ReadonlySet(typeParameters[0])
|
|
1608
|
+
return annotations === undefined ? schema : schema.annotate(annotations)
|
|
1609
|
+
}
|
|
1610
|
+
)
|
|
1611
|
+
|
|
1612
|
+
/**
|
|
1613
|
+
* Reviver for persisted `HashSet` declarations.
|
|
1614
|
+
*
|
|
1615
|
+
* **When to use**
|
|
1616
|
+
*
|
|
1617
|
+
* Use when reconstructing documents that may contain schemas created by {@link Schema.HashSet}.
|
|
1618
|
+
*
|
|
1619
|
+
* @see {@link Schema.HashSet} for creating the corresponding schema
|
|
1620
|
+
*
|
|
1621
|
+
* @category schemas
|
|
1622
|
+
* @since 4.0.0
|
|
1623
|
+
*/
|
|
1624
|
+
export const HashSetReviver: DeclarationReviver<null> = makeReviverDeclaration(
|
|
1625
|
+
"effect/schema/HashSet",
|
|
1626
|
+
Schema.Null,
|
|
1627
|
+
({ annotations, typeParameters }) => {
|
|
1628
|
+
const schema = Schema.HashSet(typeParameters[0])
|
|
1629
|
+
return annotations === undefined ? schema : schema.annotate(annotations)
|
|
1630
|
+
}
|
|
1631
|
+
)
|
|
1632
|
+
|
|
1633
|
+
/**
|
|
1634
|
+
* Reviver for persisted {@link Schema.Chunk} declarations.
|
|
1635
|
+
*
|
|
1636
|
+
* **When to use**
|
|
1637
|
+
*
|
|
1638
|
+
* Use when reconstructing documents that may contain schemas created by {@link Schema.Chunk}.
|
|
1639
|
+
*
|
|
1640
|
+
* @see {@link Schema.Chunk} for creating the corresponding schema
|
|
1641
|
+
*
|
|
1642
|
+
* @category schemas
|
|
1643
|
+
* @since 4.0.0
|
|
1644
|
+
*/
|
|
1645
|
+
export const ChunkReviver: DeclarationReviver<null> = makeReviverDeclaration(
|
|
1646
|
+
"effect/schema/Chunk",
|
|
1647
|
+
Schema.Null,
|
|
1648
|
+
({ annotations, typeParameters }) => {
|
|
1649
|
+
const schema = Schema.Chunk(typeParameters[0])
|
|
1650
|
+
return annotations === undefined ? schema : schema.annotate(annotations)
|
|
1651
|
+
}
|
|
1652
|
+
)
|
|
1653
|
+
|
|
1654
|
+
/**
|
|
1655
|
+
* Reviver for persisted `RegExp` declarations.
|
|
1656
|
+
*
|
|
1657
|
+
* **When to use**
|
|
1658
|
+
*
|
|
1659
|
+
* Use when reconstructing documents that may contain the {@link Schema.RegExp} schema.
|
|
1660
|
+
*
|
|
1661
|
+
* @see {@link Schema.RegExp} for the corresponding schema
|
|
1662
|
+
*
|
|
1663
|
+
* @category schemas
|
|
1664
|
+
* @since 4.0.0
|
|
1665
|
+
*/
|
|
1666
|
+
export const RegExpReviver: DeclarationReviver<null> = makeFixedDeclarationReviver(
|
|
1667
|
+
"effect/schema/RegExp",
|
|
1668
|
+
Schema.RegExp
|
|
1669
|
+
)
|
|
1670
|
+
|
|
1671
|
+
/**
|
|
1672
|
+
* Reviver for persisted `URL` declarations.
|
|
1673
|
+
*
|
|
1674
|
+
* **When to use**
|
|
1675
|
+
*
|
|
1676
|
+
* Use when reconstructing documents that may contain the {@link Schema.URL} schema.
|
|
1677
|
+
*
|
|
1678
|
+
* @see {@link Schema.URL} for the corresponding schema
|
|
1679
|
+
*
|
|
1680
|
+
* @category schemas
|
|
1681
|
+
* @since 4.0.0
|
|
1682
|
+
*/
|
|
1683
|
+
export const URLReviver: DeclarationReviver<null> = makeFixedDeclarationReviver("effect/schema/URL", Schema.URL)
|
|
1684
|
+
|
|
1685
|
+
/**
|
|
1686
|
+
* Reviver for persisted `Date` declarations.
|
|
1687
|
+
*
|
|
1688
|
+
* **When to use**
|
|
1689
|
+
*
|
|
1690
|
+
* Use when reconstructing documents that may contain the {@link Schema.Date} schema.
|
|
1691
|
+
*
|
|
1692
|
+
* @see {@link Schema.Date} for the corresponding schema
|
|
1693
|
+
*
|
|
1694
|
+
* @category schemas
|
|
1695
|
+
* @since 4.0.0
|
|
1696
|
+
*/
|
|
1697
|
+
export const DateReviver: DeclarationReviver<null> = makeFixedDeclarationReviver("effect/schema/Date", Schema.Date)
|
|
1698
|
+
|
|
1699
|
+
/**
|
|
1700
|
+
* Reviver for persisted {@link Schema.Duration} declarations.
|
|
1701
|
+
*
|
|
1702
|
+
* **When to use**
|
|
1703
|
+
*
|
|
1704
|
+
* Use when reconstructing documents that may contain the {@link Schema.Duration} schema.
|
|
1705
|
+
*
|
|
1706
|
+
* @see {@link Schema.Duration} for the corresponding schema
|
|
1707
|
+
*
|
|
1708
|
+
* @category schemas
|
|
1709
|
+
* @since 4.0.0
|
|
1710
|
+
*/
|
|
1711
|
+
export const DurationReviver: DeclarationReviver<null> = makeFixedDeclarationReviver(
|
|
1712
|
+
"effect/schema/Duration",
|
|
1713
|
+
Schema.Duration
|
|
1714
|
+
)
|
|
1715
|
+
|
|
1716
|
+
/**
|
|
1717
|
+
* Reviver for persisted {@link Schema.ByteSize} declarations.
|
|
1718
|
+
*
|
|
1719
|
+
* @category schemas
|
|
1720
|
+
* @since 4.0.0
|
|
1721
|
+
*/
|
|
1722
|
+
export const ByteSizeReviver: DeclarationReviver<null> = makeFixedDeclarationReviver(
|
|
1723
|
+
"effect/schema/ByteSize",
|
|
1724
|
+
Schema.ByteSize
|
|
1725
|
+
)
|
|
1726
|
+
|
|
1727
|
+
/**
|
|
1728
|
+
* Reviver for persisted {@link Schema.BigDecimal} declarations.
|
|
1729
|
+
*
|
|
1730
|
+
* **When to use**
|
|
1731
|
+
*
|
|
1732
|
+
* Use when reconstructing documents that may contain the {@link Schema.BigDecimal} schema.
|
|
1733
|
+
*
|
|
1734
|
+
* @see {@link Schema.BigDecimal} for the corresponding schema
|
|
1735
|
+
*
|
|
1736
|
+
* @category schemas
|
|
1737
|
+
* @since 4.0.0
|
|
1738
|
+
*/
|
|
1739
|
+
export const BigDecimalReviver: DeclarationReviver<null> = makeFixedDeclarationReviver(
|
|
1740
|
+
"effect/schema/BigDecimal",
|
|
1741
|
+
Schema.BigDecimal
|
|
1742
|
+
)
|
|
1743
|
+
|
|
1744
|
+
/**
|
|
1745
|
+
* Reviver for persisted `File` declarations.
|
|
1746
|
+
*
|
|
1747
|
+
* **When to use**
|
|
1748
|
+
*
|
|
1749
|
+
* Use when reconstructing documents that may contain the {@link Schema.File} schema.
|
|
1750
|
+
*
|
|
1751
|
+
* @see {@link Schema.File} for the corresponding schema
|
|
1752
|
+
*
|
|
1753
|
+
* @category schemas
|
|
1754
|
+
* @since 4.0.0
|
|
1755
|
+
*/
|
|
1756
|
+
export const FileReviver: DeclarationReviver<null> = makeFixedDeclarationReviver("effect/schema/File", Schema.File)
|
|
342
1757
|
|
|
343
1758
|
/**
|
|
344
|
-
*
|
|
345
|
-
*
|
|
346
|
-
* **Details**
|
|
1759
|
+
* Reviver for persisted `FormData` declarations.
|
|
347
1760
|
*
|
|
348
|
-
*
|
|
349
|
-
* add an explicit type discriminator when encoding it.
|
|
1761
|
+
* **When to use**
|
|
350
1762
|
*
|
|
351
|
-
*
|
|
1763
|
+
* Use when reconstructing documents that may contain the {@link Schema.FormData} schema.
|
|
352
1764
|
*
|
|
353
|
-
*
|
|
354
|
-
* codecs reject them because they cannot be reconstructed by identity.
|
|
1765
|
+
* @see {@link Schema.FormData} for the corresponding schema
|
|
355
1766
|
*
|
|
356
|
-
* @category
|
|
1767
|
+
* @category schemas
|
|
357
1768
|
* @since 4.0.0
|
|
358
1769
|
*/
|
|
359
|
-
export
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
readonly isMutable: boolean
|
|
364
|
-
readonly annotations?: Schema.Annotations.Annotations | undefined
|
|
365
|
-
}
|
|
1770
|
+
export const FormDataReviver: DeclarationReviver<null> = makeFixedDeclarationReviver(
|
|
1771
|
+
"effect/schema/FormData",
|
|
1772
|
+
Schema.FormData
|
|
1773
|
+
)
|
|
366
1774
|
|
|
367
1775
|
/**
|
|
368
|
-
*
|
|
1776
|
+
* Reviver for persisted `URLSearchParams` declarations.
|
|
369
1777
|
*
|
|
370
|
-
*
|
|
1778
|
+
* **When to use**
|
|
1779
|
+
*
|
|
1780
|
+
* Use when reconstructing documents that may contain the {@link Schema.URLSearchParams} schema.
|
|
1781
|
+
*
|
|
1782
|
+
* @see {@link Schema.URLSearchParams} for the corresponding schema
|
|
1783
|
+
*
|
|
1784
|
+
* @category schemas
|
|
371
1785
|
* @since 4.0.0
|
|
372
1786
|
*/
|
|
373
|
-
export
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
1787
|
+
export const URLSearchParamsReviver: DeclarationReviver<null> = makeFixedDeclarationReviver(
|
|
1788
|
+
"effect/schema/URLSearchParams",
|
|
1789
|
+
Schema.URLSearchParams
|
|
1790
|
+
)
|
|
377
1791
|
|
|
378
1792
|
/**
|
|
379
|
-
*
|
|
1793
|
+
* Reviver for persisted `Uint8Array` declarations.
|
|
380
1794
|
*
|
|
381
|
-
*
|
|
1795
|
+
* **When to use**
|
|
1796
|
+
*
|
|
1797
|
+
* Use when reconstructing documents that may contain the {@link Schema.Uint8Array} schema.
|
|
1798
|
+
*
|
|
1799
|
+
* @see {@link Schema.Uint8Array} for the corresponding schema
|
|
1800
|
+
*
|
|
1801
|
+
* @category schemas
|
|
382
1802
|
* @since 4.0.0
|
|
383
1803
|
*/
|
|
384
|
-
export
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
1804
|
+
export const Uint8ArrayReviver: DeclarationReviver<null> = makeFixedDeclarationReviver(
|
|
1805
|
+
"effect/schema/Uint8Array",
|
|
1806
|
+
Schema.Uint8Array
|
|
1807
|
+
)
|
|
388
1808
|
|
|
389
1809
|
/**
|
|
390
|
-
*
|
|
1810
|
+
* Reviver for persisted {@link Schema.DateTimeUtc} declarations.
|
|
391
1811
|
*
|
|
392
|
-
*
|
|
1812
|
+
* **When to use**
|
|
1813
|
+
*
|
|
1814
|
+
* Use when reconstructing documents that may contain the {@link Schema.DateTimeUtc} schema.
|
|
1815
|
+
*
|
|
1816
|
+
* @see {@link Schema.DateTimeUtc} for the corresponding schema
|
|
1817
|
+
*
|
|
1818
|
+
* @category schemas
|
|
393
1819
|
* @since 4.0.0
|
|
394
1820
|
*/
|
|
395
|
-
export
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
1821
|
+
export const DateTimeUtcReviver: DeclarationReviver<null> = makeFixedDeclarationReviver(
|
|
1822
|
+
"effect/schema/DateTimeUtc",
|
|
1823
|
+
Schema.DateTimeUtc
|
|
1824
|
+
)
|
|
399
1825
|
|
|
400
1826
|
/**
|
|
401
|
-
*
|
|
1827
|
+
* Reviver for persisted {@link Schema.TimeZoneOffset} declarations.
|
|
402
1828
|
*
|
|
403
|
-
*
|
|
1829
|
+
* **When to use**
|
|
1830
|
+
*
|
|
1831
|
+
* Use when reconstructing documents that may contain the {@link Schema.TimeZoneOffset} schema.
|
|
1832
|
+
*
|
|
1833
|
+
* @see {@link Schema.TimeZoneOffset} for the corresponding schema
|
|
1834
|
+
*
|
|
1835
|
+
* @category schemas
|
|
404
1836
|
* @since 4.0.0
|
|
405
1837
|
*/
|
|
406
|
-
export
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
| Null
|
|
411
|
-
| Undefined
|
|
412
|
-
| Void
|
|
413
|
-
| Never
|
|
414
|
-
| Unknown
|
|
415
|
-
| Any
|
|
416
|
-
| String
|
|
417
|
-
| Number
|
|
418
|
-
| Boolean
|
|
419
|
-
| BigInt
|
|
420
|
-
| Symbol
|
|
421
|
-
| Literal
|
|
422
|
-
| UniqueSymbol
|
|
423
|
-
| ObjectKeyword
|
|
424
|
-
| Enum
|
|
425
|
-
| TemplateLiteral
|
|
426
|
-
| Arrays
|
|
427
|
-
| Objects
|
|
428
|
-
| Union
|
|
1838
|
+
export const TimeZoneOffsetReviver: DeclarationReviver<null> = makeFixedDeclarationReviver(
|
|
1839
|
+
"effect/schema/TimeZoneOffset",
|
|
1840
|
+
Schema.TimeZoneOffset
|
|
1841
|
+
)
|
|
429
1842
|
|
|
430
1843
|
/**
|
|
431
|
-
*
|
|
1844
|
+
* Reviver for persisted {@link Schema.TimeZoneNamed} declarations.
|
|
432
1845
|
*
|
|
433
|
-
*
|
|
1846
|
+
* **When to use**
|
|
1847
|
+
*
|
|
1848
|
+
* Use when reconstructing documents that may contain the {@link Schema.TimeZoneNamed} schema.
|
|
1849
|
+
*
|
|
1850
|
+
* @see {@link Schema.TimeZoneNamed} for the corresponding schema
|
|
1851
|
+
*
|
|
1852
|
+
* @category schemas
|
|
434
1853
|
* @since 4.0.0
|
|
435
1854
|
*/
|
|
436
|
-
export
|
|
1855
|
+
export const TimeZoneNamedReviver: DeclarationReviver<null> = makeFixedDeclarationReviver(
|
|
1856
|
+
"effect/schema/TimeZoneNamed",
|
|
1857
|
+
Schema.TimeZoneNamed
|
|
1858
|
+
)
|
|
437
1859
|
|
|
438
1860
|
/**
|
|
439
|
-
*
|
|
1861
|
+
* Reviver for persisted {@link Schema.TimeZone} declarations.
|
|
440
1862
|
*
|
|
441
|
-
*
|
|
1863
|
+
* **When to use**
|
|
1864
|
+
*
|
|
1865
|
+
* Use when reconstructing documents that may contain the {@link Schema.TimeZone} schema.
|
|
1866
|
+
*
|
|
1867
|
+
* @see {@link Schema.TimeZone} for the corresponding schema
|
|
1868
|
+
*
|
|
1869
|
+
* @category schemas
|
|
442
1870
|
* @since 4.0.0
|
|
443
1871
|
*/
|
|
444
|
-
export
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
readonly aborted: boolean
|
|
449
|
-
}
|
|
1872
|
+
export const TimeZoneReviver: DeclarationReviver<null> = makeFixedDeclarationReviver(
|
|
1873
|
+
"effect/schema/TimeZone",
|
|
1874
|
+
Schema.TimeZone
|
|
1875
|
+
)
|
|
450
1876
|
|
|
451
1877
|
/**
|
|
452
|
-
*
|
|
1878
|
+
* Reviver for persisted {@link Schema.DateTimeZoned} declarations.
|
|
453
1879
|
*
|
|
454
|
-
*
|
|
1880
|
+
* **When to use**
|
|
1881
|
+
*
|
|
1882
|
+
* Use when reconstructing documents that may contain the {@link Schema.DateTimeZoned} schema.
|
|
1883
|
+
*
|
|
1884
|
+
* @see {@link Schema.DateTimeZoned} for the corresponding schema
|
|
1885
|
+
*
|
|
1886
|
+
* @category schemas
|
|
455
1887
|
* @since 4.0.0
|
|
456
1888
|
*/
|
|
457
|
-
export
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
readonly checks: readonly [Check, ...Array<Check>]
|
|
462
|
-
}
|
|
1889
|
+
export const DateTimeZonedReviver: DeclarationReviver<null> = makeFixedDeclarationReviver(
|
|
1890
|
+
"effect/schema/DateTimeZoned",
|
|
1891
|
+
Schema.DateTimeZoned
|
|
1892
|
+
)
|
|
463
1893
|
|
|
464
1894
|
/**
|
|
465
|
-
*
|
|
1895
|
+
* Reviver for persisted `isGreaterThanDate` checks.
|
|
466
1896
|
*
|
|
467
|
-
*
|
|
1897
|
+
* **When to use**
|
|
1898
|
+
*
|
|
1899
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isGreaterThanDate}.
|
|
1900
|
+
*
|
|
1901
|
+
* @see {@link Schema.isGreaterThanDate} for creating the corresponding check
|
|
1902
|
+
*
|
|
1903
|
+
* @category validation
|
|
468
1904
|
* @since 4.0.0
|
|
469
1905
|
*/
|
|
470
|
-
export
|
|
471
|
-
readonly
|
|
472
|
-
}
|
|
1906
|
+
export const isGreaterThanDateReviver: FilterReviver<{
|
|
1907
|
+
readonly exclusiveMinimum: globalThis.Date
|
|
1908
|
+
}> = makeReviverFilter(
|
|
1909
|
+
"effect/schema/isGreaterThanDate",
|
|
1910
|
+
Schema.Struct({ exclusiveMinimum: Schema.Date }),
|
|
1911
|
+
({ annotations, payload }) => Schema.isGreaterThanDate(payload.exclusiveMinimum, annotations)
|
|
1912
|
+
)
|
|
473
1913
|
|
|
474
1914
|
/**
|
|
475
|
-
*
|
|
1915
|
+
* Reviver for persisted `isGreaterThanOrEqualToDate` checks.
|
|
476
1916
|
*
|
|
477
|
-
*
|
|
1917
|
+
* **When to use**
|
|
1918
|
+
*
|
|
1919
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isGreaterThanOrEqualToDate}.
|
|
1920
|
+
*
|
|
1921
|
+
* @see {@link Schema.isGreaterThanOrEqualToDate} for creating the corresponding check
|
|
1922
|
+
*
|
|
1923
|
+
* @category validation
|
|
478
1924
|
* @since 4.0.0
|
|
479
1925
|
*/
|
|
480
|
-
export
|
|
481
|
-
readonly
|
|
482
|
-
|
|
483
|
-
|
|
1926
|
+
export const isGreaterThanOrEqualToDateReviver: FilterReviver<{
|
|
1927
|
+
readonly minimum: globalThis.Date
|
|
1928
|
+
}> = makeReviverFilter(
|
|
1929
|
+
"effect/schema/isGreaterThanOrEqualToDate",
|
|
1930
|
+
Schema.Struct({ minimum: Schema.Date }),
|
|
1931
|
+
({ annotations, payload }) => Schema.isGreaterThanOrEqualToDate(payload.minimum, annotations)
|
|
1932
|
+
)
|
|
484
1933
|
|
|
485
1934
|
/**
|
|
486
|
-
*
|
|
1935
|
+
* Reviver for persisted `isLessThanDate` checks.
|
|
487
1936
|
*
|
|
488
|
-
*
|
|
1937
|
+
* **When to use**
|
|
1938
|
+
*
|
|
1939
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isLessThanDate}.
|
|
1940
|
+
*
|
|
1941
|
+
* @see {@link Schema.isLessThanDate} for creating the corresponding check
|
|
1942
|
+
*
|
|
1943
|
+
* @category validation
|
|
489
1944
|
* @since 4.0.0
|
|
490
1945
|
*/
|
|
491
|
-
export
|
|
492
|
-
readonly
|
|
493
|
-
|
|
494
|
-
|
|
1946
|
+
export const isLessThanDateReviver: FilterReviver<{
|
|
1947
|
+
readonly exclusiveMaximum: globalThis.Date
|
|
1948
|
+
}> = makeReviverFilter(
|
|
1949
|
+
"effect/schema/isLessThanDate",
|
|
1950
|
+
Schema.Struct({ exclusiveMaximum: Schema.Date }),
|
|
1951
|
+
({ annotations, payload }) => Schema.isLessThanDate(payload.exclusiveMaximum, annotations)
|
|
1952
|
+
)
|
|
495
1953
|
|
|
496
1954
|
/**
|
|
497
|
-
* Reviver for
|
|
1955
|
+
* Reviver for persisted `isLessThanOrEqualToDate` checks.
|
|
498
1956
|
*
|
|
499
|
-
*
|
|
1957
|
+
* **When to use**
|
|
1958
|
+
*
|
|
1959
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isLessThanOrEqualToDate}.
|
|
1960
|
+
*
|
|
1961
|
+
* @see {@link Schema.isLessThanOrEqualToDate} for creating the corresponding check
|
|
1962
|
+
*
|
|
1963
|
+
* @category validation
|
|
500
1964
|
* @since 4.0.0
|
|
501
1965
|
*/
|
|
502
|
-
export
|
|
503
|
-
readonly
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
}) => Schema.Top
|
|
510
|
-
}
|
|
1966
|
+
export const isLessThanOrEqualToDateReviver: FilterReviver<{
|
|
1967
|
+
readonly maximum: globalThis.Date
|
|
1968
|
+
}> = makeReviverFilter(
|
|
1969
|
+
"effect/schema/isLessThanOrEqualToDate",
|
|
1970
|
+
Schema.Struct({ maximum: Schema.Date }),
|
|
1971
|
+
({ annotations, payload }) => Schema.isLessThanOrEqualToDate(payload.maximum, annotations)
|
|
1972
|
+
)
|
|
511
1973
|
|
|
512
1974
|
/**
|
|
513
|
-
* Reviver for
|
|
1975
|
+
* Reviver for persisted `isBetweenDate` checks.
|
|
514
1976
|
*
|
|
515
|
-
*
|
|
1977
|
+
* **When to use**
|
|
1978
|
+
*
|
|
1979
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isBetweenDate}.
|
|
1980
|
+
*
|
|
1981
|
+
* @see {@link Schema.isBetweenDate} for creating the corresponding check
|
|
1982
|
+
*
|
|
1983
|
+
* @category validation
|
|
516
1984
|
* @since 4.0.0
|
|
517
1985
|
*/
|
|
518
|
-
export
|
|
519
|
-
readonly
|
|
520
|
-
readonly
|
|
521
|
-
readonly
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
1986
|
+
export const isBetweenDateReviver: FilterReviver<{
|
|
1987
|
+
readonly minimum: globalThis.Date
|
|
1988
|
+
readonly maximum: globalThis.Date
|
|
1989
|
+
readonly exclusiveMinimum?: true | undefined
|
|
1990
|
+
readonly exclusiveMaximum?: true | undefined
|
|
1991
|
+
}> = makeReviverFilter(
|
|
1992
|
+
"effect/schema/isBetweenDate",
|
|
1993
|
+
Schema.Struct({
|
|
1994
|
+
minimum: Schema.Date,
|
|
1995
|
+
maximum: Schema.Date,
|
|
1996
|
+
exclusiveMinimum: Schema.optional(Schema.Literal(true)),
|
|
1997
|
+
exclusiveMaximum: Schema.optional(Schema.Literal(true))
|
|
1998
|
+
}),
|
|
1999
|
+
({ annotations, payload }) => Schema.isBetweenDate(payload, annotations)
|
|
2000
|
+
)
|
|
527
2001
|
|
|
528
2002
|
/**
|
|
529
|
-
* Reviver for
|
|
2003
|
+
* Reviver for persisted `isGreaterThanBigInt` checks.
|
|
530
2004
|
*
|
|
531
|
-
*
|
|
2005
|
+
* **When to use**
|
|
2006
|
+
*
|
|
2007
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isGreaterThanBigInt}.
|
|
2008
|
+
*
|
|
2009
|
+
* @see {@link Schema.isGreaterThanBigInt} for creating the corresponding check
|
|
2010
|
+
*
|
|
2011
|
+
* @category validation
|
|
532
2012
|
* @since 4.0.0
|
|
533
2013
|
*/
|
|
534
|
-
export
|
|
535
|
-
readonly
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
}) => SchemaAST.FilterGroup<any>
|
|
542
|
-
}
|
|
2014
|
+
export const isGreaterThanBigIntReviver: FilterReviver<{
|
|
2015
|
+
readonly exclusiveMinimum: bigint
|
|
2016
|
+
}> = makeReviverFilter(
|
|
2017
|
+
"effect/schema/isGreaterThanBigInt",
|
|
2018
|
+
Schema.Struct({ exclusiveMinimum: Schema.BigInt }),
|
|
2019
|
+
({ annotations, payload }) => Schema.isGreaterThanBigInt(payload.exclusiveMinimum, annotations)
|
|
2020
|
+
)
|
|
543
2021
|
|
|
544
2022
|
/**
|
|
545
|
-
*
|
|
2023
|
+
* Reviver for persisted `isGreaterThanOrEqualToBigInt` checks.
|
|
546
2024
|
*
|
|
547
|
-
*
|
|
2025
|
+
* **When to use**
|
|
2026
|
+
*
|
|
2027
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isGreaterThanOrEqualToBigInt}.
|
|
2028
|
+
*
|
|
2029
|
+
* @see {@link Schema.isGreaterThanOrEqualToBigInt} for creating the corresponding check
|
|
2030
|
+
*
|
|
2031
|
+
* @category validation
|
|
548
2032
|
* @since 4.0.0
|
|
549
2033
|
*/
|
|
550
|
-
export
|
|
2034
|
+
export const isGreaterThanOrEqualToBigIntReviver: FilterReviver<{
|
|
2035
|
+
readonly minimum: bigint
|
|
2036
|
+
}> = makeReviverFilter(
|
|
2037
|
+
"effect/schema/isGreaterThanOrEqualToBigInt",
|
|
2038
|
+
Schema.Struct({ minimum: Schema.BigInt }),
|
|
2039
|
+
({ annotations, payload }) => Schema.isGreaterThanOrEqualToBigInt(payload.minimum, annotations)
|
|
2040
|
+
)
|
|
551
2041
|
|
|
552
2042
|
/**
|
|
553
|
-
*
|
|
2043
|
+
* Reviver for persisted `isLessThanBigInt` checks.
|
|
554
2044
|
*
|
|
555
|
-
*
|
|
2045
|
+
* **When to use**
|
|
2046
|
+
*
|
|
2047
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isLessThanBigInt}.
|
|
2048
|
+
*
|
|
2049
|
+
* @see {@link Schema.isLessThanBigInt} for creating the corresponding check
|
|
2050
|
+
*
|
|
2051
|
+
* @category validation
|
|
556
2052
|
* @since 4.0.0
|
|
557
2053
|
*/
|
|
558
|
-
export
|
|
2054
|
+
export const isLessThanBigIntReviver: FilterReviver<{
|
|
2055
|
+
readonly exclusiveMaximum: bigint
|
|
2056
|
+
}> = makeReviverFilter(
|
|
2057
|
+
"effect/schema/isLessThanBigInt",
|
|
2058
|
+
Schema.Struct({ exclusiveMaximum: Schema.BigInt }),
|
|
2059
|
+
({ annotations, payload }) => Schema.isLessThanBigInt(payload.exclusiveMaximum, annotations)
|
|
2060
|
+
)
|
|
559
2061
|
|
|
560
2062
|
/**
|
|
561
|
-
*
|
|
2063
|
+
* Reviver for persisted `isLessThanOrEqualToBigInt` checks.
|
|
562
2064
|
*
|
|
563
|
-
*
|
|
2065
|
+
* **When to use**
|
|
2066
|
+
*
|
|
2067
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isLessThanOrEqualToBigInt}.
|
|
2068
|
+
*
|
|
2069
|
+
* @see {@link Schema.isLessThanOrEqualToBigInt} for creating the corresponding check
|
|
2070
|
+
*
|
|
2071
|
+
* @category validation
|
|
564
2072
|
* @since 4.0.0
|
|
565
2073
|
*/
|
|
566
|
-
export
|
|
2074
|
+
export const isLessThanOrEqualToBigIntReviver: FilterReviver<{
|
|
2075
|
+
readonly maximum: bigint
|
|
2076
|
+
}> = makeReviverFilter(
|
|
2077
|
+
"effect/schema/isLessThanOrEqualToBigInt",
|
|
2078
|
+
Schema.Struct({ maximum: Schema.BigInt }),
|
|
2079
|
+
({ annotations, payload }) => Schema.isLessThanOrEqualToBigInt(payload.maximum, annotations)
|
|
2080
|
+
)
|
|
567
2081
|
|
|
568
2082
|
/**
|
|
569
|
-
*
|
|
2083
|
+
* Reviver for persisted `isBetweenBigInt` checks.
|
|
570
2084
|
*
|
|
571
|
-
*
|
|
2085
|
+
* **When to use**
|
|
2086
|
+
*
|
|
2087
|
+
* Use when reconstructing documents that may contain checks created by {@link Schema.isBetweenBigInt}.
|
|
2088
|
+
*
|
|
2089
|
+
* @see {@link Schema.isBetweenBigInt} for creating the corresponding check
|
|
2090
|
+
*
|
|
2091
|
+
* @category validation
|
|
572
2092
|
* @since 4.0.0
|
|
573
2093
|
*/
|
|
574
|
-
export const
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
2094
|
+
export const isBetweenBigIntReviver: FilterReviver<{
|
|
2095
|
+
readonly minimum: bigint
|
|
2096
|
+
readonly maximum: bigint
|
|
2097
|
+
readonly exclusiveMinimum?: true | undefined
|
|
2098
|
+
readonly exclusiveMaximum?: true | undefined
|
|
2099
|
+
}> = makeReviverFilter(
|
|
2100
|
+
"effect/schema/isBetweenBigInt",
|
|
2101
|
+
Schema.Struct({
|
|
2102
|
+
minimum: Schema.BigInt,
|
|
2103
|
+
maximum: Schema.BigInt,
|
|
2104
|
+
exclusiveMinimum: Schema.optional(Schema.Literal(true)),
|
|
2105
|
+
exclusiveMaximum: Schema.optional(Schema.Literal(true))
|
|
2106
|
+
}),
|
|
2107
|
+
({ annotations, payload }) => Schema.isBetweenBigInt(payload, annotations)
|
|
2108
|
+
)
|
|
579
2109
|
|
|
580
2110
|
/**
|
|
581
|
-
*
|
|
2111
|
+
* Reviver for persisted `Json` declarations.
|
|
582
2112
|
*
|
|
583
|
-
*
|
|
2113
|
+
* **When to use**
|
|
2114
|
+
*
|
|
2115
|
+
* Use when reconstructing documents that may contain the {@link Schema.Json} schema.
|
|
2116
|
+
*
|
|
2117
|
+
* @see {@link Schema.Json} for the corresponding immutable JSON schema
|
|
2118
|
+
*
|
|
2119
|
+
* @category schemas
|
|
584
2120
|
* @since 4.0.0
|
|
585
2121
|
*/
|
|
586
|
-
export const
|
|
587
|
-
id: string,
|
|
588
|
-
payloadSchema: Schema.Decoder<P>,
|
|
589
|
-
revive: FilterReviver<P>["revive"]
|
|
590
|
-
) => FilterReviver<P> = InternalSchema.makeFilterReviver
|
|
2122
|
+
export const JsonReviver: DeclarationReviver<null> = makeFixedDeclarationReviver("effect/schema/Json", Schema.Json)
|
|
591
2123
|
|
|
592
2124
|
/**
|
|
593
|
-
*
|
|
2125
|
+
* Reviver for persisted `MutableJson` declarations.
|
|
594
2126
|
*
|
|
595
|
-
*
|
|
2127
|
+
* **When to use**
|
|
2128
|
+
*
|
|
2129
|
+
* Use when reconstructing documents that may contain the {@link Schema.MutableJson} schema.
|
|
2130
|
+
*
|
|
2131
|
+
* @see {@link Schema.MutableJson} for the corresponding mutable JSON schema
|
|
2132
|
+
*
|
|
2133
|
+
* @category schemas
|
|
596
2134
|
* @since 4.0.0
|
|
597
2135
|
*/
|
|
598
|
-
export const
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
2136
|
+
export const MutableJsonReviver: DeclarationReviver<null> = makeFixedDeclarationReviver(
|
|
2137
|
+
"effect/schema/MutableJson",
|
|
2138
|
+
Schema.MutableJson
|
|
2139
|
+
)
|
|
2140
|
+
|
|
2141
|
+
const jsonSchemaRevivers: ReadonlyArray<AnyReviver> = [
|
|
2142
|
+
JsonReviver,
|
|
2143
|
+
isPatternReviver,
|
|
2144
|
+
isFiniteReviver,
|
|
2145
|
+
isGreaterThanReviver,
|
|
2146
|
+
isGreaterThanOrEqualToReviver,
|
|
2147
|
+
isLessThanReviver,
|
|
2148
|
+
isLessThanOrEqualToReviver,
|
|
2149
|
+
isMultipleOfReviver,
|
|
2150
|
+
isIntReviver,
|
|
2151
|
+
isMinLengthReviver,
|
|
2152
|
+
isMaxLengthReviver,
|
|
2153
|
+
isMinPropertiesReviver,
|
|
2154
|
+
isMaxPropertiesReviver,
|
|
2155
|
+
isPropertyNamesReviver,
|
|
2156
|
+
isUniqueReviver
|
|
2157
|
+
]
|
|
603
2158
|
|
|
604
2159
|
/**
|
|
605
2160
|
* Options for importing JSON Schema Draft 2020-12 documents.
|
|
@@ -835,21 +2390,24 @@ export function toMultiDocument(document: Document): MultiDocument {
|
|
|
835
2390
|
*
|
|
836
2391
|
* **Details**
|
|
837
2392
|
*
|
|
838
|
-
*
|
|
839
|
-
*
|
|
840
|
-
*
|
|
2393
|
+
* The generated document is intended for preliminary validation. JSON Schema
|
|
2394
|
+
* and Effect checks do not always have identical semantics, so the Effect
|
|
2395
|
+
* decoder remains the final authority. Passing JSON Schema validation does not
|
|
2396
|
+
* guarantee that Effect decoding will succeed.
|
|
841
2397
|
*
|
|
842
2398
|
* **Gotchas**
|
|
843
2399
|
*
|
|
844
2400
|
* - Reference allocation is already fixed in the input `Document`. The inherited `referencePolicy` option has no effect
|
|
845
2401
|
* here; pass it to {@link toRepresentation} when creating the document.
|
|
846
|
-
* -
|
|
2402
|
+
* - String length, RegExp flags, decoded-object property checks, and `oneOf` can differ from Effect validation.
|
|
2403
|
+
* - Opaque declarations are represented by an unconstrained JSON Schema.
|
|
847
2404
|
* - Check callback results are used directly, and exceptions raised by a callback pass through unchanged. Callbacks
|
|
848
2405
|
* must treat their input schemas as immutable. Each returned value must be a valid JSON Schema object graph and must
|
|
849
|
-
* not be mutated after the callback returns.
|
|
2406
|
+
* not be mutated after the callback returns. The callback author is responsible for the emitted semantics.
|
|
850
2407
|
* - Local definition references returned by callbacks are resolved together with compiler-generated references.
|
|
851
|
-
*
|
|
852
|
-
*
|
|
2408
|
+
* Invalid JSON Pointer URI fragments throw an `Error`.
|
|
2409
|
+
* - The default `onExcessProperty: "ignore"` matches the decoder default. Use `onExcessProperty: "error"` in both
|
|
2410
|
+
* places when a closed object contract is required.
|
|
853
2411
|
*
|
|
854
2412
|
* @see {@link toJsonSchemaMultiDocument} for multiple roots sharing definitions
|
|
855
2413
|
*
|
|
@@ -877,7 +2435,9 @@ export function toJsonSchemaDocument(
|
|
|
877
2435
|
* - Every definition is compiled, including definitions that are not reachable from a root. Check callbacks must treat
|
|
878
2436
|
* their input schemas as immutable. Each returned value must be a valid JSON Schema object graph and must not be
|
|
879
2437
|
* mutated after the callback returns. Local definition references returned by callbacks are resolved together with
|
|
880
|
-
* compiler-generated references.
|
|
2438
|
+
* compiler-generated references. Invalid JSON Pointer URI fragments throw an `Error`.
|
|
2439
|
+
* - String length, RegExp flags, decoded-object property checks, `oneOf`, and custom check callbacks can differ from
|
|
2440
|
+
* Effect validation, as described by {@link toJsonSchemaDocument}.
|
|
881
2441
|
*
|
|
882
2442
|
* @see {@link toJsonSchemaDocument} for a single root
|
|
883
2443
|
*
|
|
@@ -936,10 +2496,12 @@ function pruneAnnotations(
|
|
|
936
2496
|
return Object.keys(out).length === 0 ? Option.none() : Option.some(out)
|
|
937
2497
|
}
|
|
938
2498
|
|
|
939
|
-
const AnnotationsSchema = Schema.optional(
|
|
2499
|
+
const AnnotationsSchema = Schema.optional(
|
|
2500
|
+
Schema.Record(Schema.String, Schema.Unknown)
|
|
2501
|
+
).pipe(
|
|
940
2502
|
Schema.encodeTo(Schema.optionalKey(Schema.JsonObject), {
|
|
941
|
-
decode:
|
|
942
|
-
encode:
|
|
2503
|
+
decode: InternalGetter.passthroughSubtype(),
|
|
2504
|
+
encode: InternalGetter.transformOptional((annotations) =>
|
|
943
2505
|
Option.isNone(annotations) || annotations.value === undefined
|
|
944
2506
|
? Option.none()
|
|
945
2507
|
: pruneAnnotations(annotations.value)
|
|
@@ -990,8 +2552,8 @@ const SuspendSchema = Schema.Struct({
|
|
|
990
2552
|
function makeValueSchema<Type extends string, Value>(type: Type, value: Schema.Codec<Value>) {
|
|
991
2553
|
return value.pipe(
|
|
992
2554
|
Schema.encodeTo(Schema.Struct({ type: Schema.tag(type), value }), {
|
|
993
|
-
decode:
|
|
994
|
-
encode:
|
|
2555
|
+
decode: InternalGetter.transform((encoded: { readonly type: Type; readonly value: Value }) => encoded.value),
|
|
2556
|
+
encode: InternalGetter.transform((value: Value) => ({ type, value }))
|
|
995
2557
|
})
|
|
996
2558
|
)
|
|
997
2559
|
}
|
|
@@ -1061,7 +2623,9 @@ const UnionSchema = Schema.Struct({
|
|
|
1061
2623
|
_tag: Schema.tag("Union"),
|
|
1062
2624
|
...KeywordFields,
|
|
1063
2625
|
types: RepresentationsSchema,
|
|
1064
|
-
|
|
2626
|
+
options: Schema.optionalKey(Schema.Struct({
|
|
2627
|
+
mode: Schema.optionalKey(Schema.Literals(["anyOf", "oneOf"]))
|
|
2628
|
+
}))
|
|
1065
2629
|
})
|
|
1066
2630
|
const ReferenceSchema = Schema.Struct({
|
|
1067
2631
|
_tag: Schema.tag("Reference"),
|
|
@@ -1277,8 +2841,18 @@ export function fromRepresentations(
|
|
|
1277
2841
|
*
|
|
1278
2842
|
* **Gotchas**
|
|
1279
2843
|
*
|
|
1280
|
-
* -
|
|
1281
|
-
*
|
|
2844
|
+
* - `$dynamicRef`, `contains`, `dependentRequired`, `dependentSchemas`, `not`, active `if` / `then` / `else`,
|
|
2845
|
+
* `unevaluatedItems`, and `unevaluatedProperties` throw an `Unsupported JSON Schema keyword` error. Inactive
|
|
2846
|
+
* conditional keywords and `minContains` / `maxContains` without `contains` have no validation effect and are ignored.
|
|
2847
|
+
* - Objects and arrays used as `const` values or `enum` members throw an `Unsupported structured JSON Schema value`
|
|
2848
|
+
* error.
|
|
2849
|
+
* - Intersections of overlapping unions are limited to disjoint root-type partitions and finite primitive `anyOf`
|
|
2850
|
+
* literal sets. Other union intersections, including cases that would duplicate a nested choice, throw an
|
|
2851
|
+
* `Unsupported intersection of overlapping unions` error.
|
|
2852
|
+
* - Unknown extension keywords are ignored and their semantics are not enforced.
|
|
2853
|
+
* - Only direct local references to top-level definitions in the form `#/$defs/<escaped-token>` are supported. Root
|
|
2854
|
+
* references, external references, and pointers below a definition throw an `Unsupported reference` error. A direct
|
|
2855
|
+
* reference to a missing definition throws an `Invalid reference` error.
|
|
1282
2856
|
* - Built-in declarations and checks are reconstructed with importer-owned revivers.
|
|
1283
2857
|
* - Pattern constraints reached during translation cause an error by default. Use `patterns: "apply"` only for trusted
|
|
1284
2858
|
* documents, or `patterns: "ignore"` to weaken validation explicitly; ignored patterns are outside the round-trip
|
|
@@ -1297,7 +2871,7 @@ export function fromJsonSchemaDocument(
|
|
|
1297
2871
|
document: JsonSchema.Document<"draft-2020-12">,
|
|
1298
2872
|
options?: FromJsonSchemaOptions
|
|
1299
2873
|
): Schema.Top {
|
|
1300
|
-
return InternalFromJsonSchemaDocument.fromJsonSchemaDocument(document, options)
|
|
2874
|
+
return InternalFromJsonSchemaDocument.fromJsonSchemaDocument(document, options, jsonSchemaRevivers)
|
|
1301
2875
|
}
|
|
1302
2876
|
|
|
1303
2877
|
/**
|
|
@@ -1309,9 +2883,20 @@ export function fromJsonSchemaDocument(
|
|
|
1309
2883
|
*
|
|
1310
2884
|
* **Gotchas**
|
|
1311
2885
|
*
|
|
1312
|
-
* Only definitions reachable from a root are translated.
|
|
1313
|
-
*
|
|
1314
|
-
*
|
|
2886
|
+
* - Only definitions reachable from a root are translated.
|
|
2887
|
+
* - Unsupported standard validation and applicator keywords throw an `Unsupported JSON Schema keyword` error. Unknown
|
|
2888
|
+
* extension keywords are ignored and their semantics are not enforced.
|
|
2889
|
+
* - Objects and arrays used as `const` values or `enum` members throw an `Unsupported structured JSON Schema value`
|
|
2890
|
+
* error.
|
|
2891
|
+
* - Intersections of overlapping unions are limited to disjoint root-type partitions and finite primitive `anyOf`
|
|
2892
|
+
* literal sets. Other union intersections, including cases that would duplicate a nested choice, throw an
|
|
2893
|
+
* `Unsupported intersection of overlapping unions` error.
|
|
2894
|
+
* - Only direct local references to top-level definitions in the form `#/$defs/<escaped-token>` are supported. Root
|
|
2895
|
+
* references, external references, and pointers below a definition throw an `Unsupported reference` error. A direct
|
|
2896
|
+
* reference to a missing definition throws an `Invalid reference` error.
|
|
2897
|
+
* - Pattern constraints reached during translation cause an error by default. Use `patterns: "apply"` only for trusted
|
|
2898
|
+
* documents, or `patterns: "ignore"` to weaken validation explicitly.
|
|
2899
|
+
* - Callback results are used directly, and exceptions raised by a callback pass through unchanged.
|
|
1315
2900
|
*
|
|
1316
2901
|
* @see {@link fromJsonSchemaDocument} for a single root
|
|
1317
2902
|
* @see {@link toRepresentations} for converting the returned schema ASTs to a representation document
|
|
@@ -1323,5 +2908,5 @@ export function fromJsonSchemaMultiDocument(
|
|
|
1323
2908
|
document: JsonSchema.MultiDocument<"draft-2020-12">,
|
|
1324
2909
|
options?: FromJsonSchemaOptions
|
|
1325
2910
|
): readonly [Schema.Top, ...Array<Schema.Top>] {
|
|
1326
|
-
return InternalFromJsonSchemaDocument.fromJsonSchemaMultiDocument(document, options)
|
|
2911
|
+
return InternalFromJsonSchemaDocument.fromJsonSchemaMultiDocument(document, options, jsonSchemaRevivers)
|
|
1327
2912
|
}
|