effect 4.0.0-beta.100 → 4.0.0-beta.102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Array.d.ts.map +1 -1
- package/dist/Array.js +81 -5
- package/dist/Array.js.map +1 -1
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +27 -9
- package/dist/Channel.js.map +1 -1
- package/dist/Config.d.ts +1 -1
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js +6 -5
- package/dist/Config.js.map +1 -1
- package/dist/ConfigProvider.js +7 -7
- package/dist/ConfigProvider.js.map +1 -1
- package/dist/Data.d.ts.map +1 -1
- package/dist/Data.js +2 -1
- package/dist/Data.js.map +1 -1
- package/dist/Effect.d.ts +61 -100
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +66 -39
- package/dist/Effect.js.map +1 -1
- package/dist/FiberHandle.d.ts.map +1 -1
- package/dist/FiberHandle.js +3 -2
- package/dist/FiberHandle.js.map +1 -1
- package/dist/Iterable.d.ts.map +1 -1
- package/dist/Iterable.js +2 -1
- package/dist/Iterable.js.map +1 -1
- package/dist/JsonPatch.d.ts.map +1 -1
- package/dist/JsonPatch.js +4 -3
- package/dist/JsonPatch.js.map +1 -1
- package/dist/JsonSchema.d.ts.map +1 -1
- package/dist/JsonSchema.js +9 -11
- package/dist/JsonSchema.js.map +1 -1
- package/dist/Logger.d.ts.map +1 -1
- package/dist/Logger.js +3 -2
- package/dist/Logger.js.map +1 -1
- package/dist/ManagedRuntime.d.ts +9 -0
- package/dist/ManagedRuntime.d.ts.map +1 -1
- package/dist/ManagedRuntime.js +3 -0
- package/dist/ManagedRuntime.js.map +1 -1
- package/dist/Metric.d.ts.map +1 -1
- package/dist/Metric.js +4 -3
- package/dist/Metric.js.map +1 -1
- package/dist/MutableList.d.ts.map +1 -1
- package/dist/MutableList.js +4 -0
- package/dist/MutableList.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.map +1 -1
- package/dist/Option.js +2 -1
- package/dist/Option.js.map +1 -1
- package/dist/PartitionedSemaphore.d.ts.map +1 -1
- package/dist/PartitionedSemaphore.js +1 -4
- package/dist/PartitionedSemaphore.js.map +1 -1
- package/dist/Record.d.ts +93 -1
- package/dist/Record.d.ts.map +1 -1
- package/dist/Record.js +57 -19
- package/dist/Record.js.map +1 -1
- package/dist/References.d.ts +0 -45
- package/dist/References.d.ts.map +1 -1
- package/dist/References.js +0 -45
- package/dist/References.js.map +1 -1
- package/dist/Request.d.ts.map +1 -1
- package/dist/Request.js +9 -6
- package/dist/Request.js.map +1 -1
- package/dist/Result.d.ts.map +1 -1
- package/dist/Result.js +2 -1
- package/dist/Result.js.map +1 -1
- package/dist/Schema.d.ts +1269 -496
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +2308 -614
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +2 -2
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +189 -130
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaError.js +1 -1
- package/dist/SchemaError.js.map +1 -1
- package/dist/SchemaGetter.d.ts +13 -11
- package/dist/SchemaGetter.d.ts.map +1 -1
- package/dist/SchemaGetter.js +34 -24
- package/dist/SchemaGetter.js.map +1 -1
- package/dist/SchemaIssue.js +1 -1
- package/dist/SchemaIssue.js.map +1 -1
- package/dist/SchemaParser.d.ts.map +1 -1
- package/dist/SchemaParser.js +1 -12
- package/dist/SchemaParser.js.map +1 -1
- package/dist/SchemaRepresentation.d.ts +403 -1504
- package/dist/SchemaRepresentation.d.ts.map +1 -1
- package/dist/SchemaRepresentation.js +294 -2852
- package/dist/SchemaRepresentation.js.map +1 -1
- package/dist/SchemaTransformation.d.ts +2 -2
- package/dist/SchemaTransformation.js +3 -3
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/Semaphore.d.ts +5 -3
- package/dist/Semaphore.d.ts.map +1 -1
- package/dist/Semaphore.js.map +1 -1
- package/dist/Stream.d.ts +15 -9
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +46 -16
- package/dist/Stream.js.map +1 -1
- package/dist/Struct.d.ts.map +1 -1
- package/dist/Struct.js +5 -4
- package/dist/Struct.js.map +1 -1
- package/dist/Types.d.ts +1 -3
- package/dist/Types.d.ts.map +1 -1
- package/dist/index.d.ts +0 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -4
- package/dist/index.js.map +1 -1
- package/dist/internal/core.js +3 -2
- package/dist/internal/core.js.map +1 -1
- package/dist/internal/effect.js +119 -53
- package/dist/internal/effect.js.map +1 -1
- package/dist/internal/matcher.js +1 -1
- package/dist/internal/matcher.js.map +1 -1
- package/dist/internal/record.d.ts +0 -3
- package/dist/internal/record.d.ts.map +1 -1
- package/dist/internal/record.js +10 -5
- package/dist/internal/record.js.map +1 -1
- package/dist/internal/references.js +0 -4
- package/dist/internal/references.js.map +1 -1
- package/dist/internal/schema/annotations.js +12 -0
- package/dist/internal/schema/annotations.js.map +1 -1
- package/dist/internal/schema/fromJsonSchemaDocument.d.ts +2 -0
- package/dist/internal/schema/fromJsonSchemaDocument.d.ts.map +1 -0
- package/dist/internal/schema/fromJsonSchemaDocument.js +743 -0
- package/dist/internal/schema/fromJsonSchemaDocument.js.map +1 -0
- package/dist/internal/schema/fromRepresentation.d.ts +2 -0
- package/dist/internal/schema/fromRepresentation.d.ts.map +1 -0
- package/dist/internal/schema/fromRepresentation.js +252 -0
- package/dist/internal/schema/fromRepresentation.js.map +1 -0
- package/dist/internal/schema/schema.js +28 -40
- package/dist/internal/schema/schema.js.map +1 -1
- package/dist/internal/schema/{arbitrary.d.ts → toArbitrary.d.ts} +1 -1
- package/dist/internal/schema/toArbitrary.d.ts.map +1 -0
- package/dist/internal/schema/{arbitrary.js → toArbitrary.js} +8 -9
- package/dist/internal/schema/toArbitrary.js.map +1 -0
- package/dist/internal/schema/toCodeDocument.d.ts +2 -0
- package/dist/internal/schema/toCodeDocument.d.ts.map +1 -0
- package/dist/internal/schema/toCodeDocument.js +438 -0
- package/dist/internal/schema/toCodeDocument.js.map +1 -0
- package/dist/internal/schema/toEquivalence.d.ts +2 -0
- package/dist/internal/schema/toEquivalence.d.ts.map +1 -0
- package/dist/internal/schema/{equivalence.js → toEquivalence.js} +15 -13
- package/dist/internal/schema/toEquivalence.js.map +1 -0
- package/dist/internal/schema/toJsonSchemaDocument.d.ts +2 -0
- package/dist/internal/schema/toJsonSchemaDocument.d.ts.map +1 -0
- package/dist/internal/schema/toJsonSchemaDocument.js +466 -0
- package/dist/internal/schema/toJsonSchemaDocument.js.map +1 -0
- package/dist/internal/schema/toRepresentation.d.ts +2 -0
- package/dist/internal/schema/toRepresentation.d.ts.map +1 -0
- package/dist/internal/schema/toRepresentation.js +369 -0
- package/dist/internal/schema/toRepresentation.js.map +1 -0
- package/dist/internal/stackTraceLimit.js +3 -6
- package/dist/internal/stackTraceLimit.js.map +1 -1
- package/dist/testing/TestClock.js +4 -1
- package/dist/testing/TestClock.js.map +1 -1
- package/dist/unstable/ai/AiError.d.ts +26 -26
- package/dist/unstable/ai/AiError.d.ts.map +1 -1
- package/dist/unstable/ai/AiError.js +5 -4
- package/dist/unstable/ai/AiError.js.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.d.ts +21 -6
- package/dist/unstable/ai/AnthropicStructuredOutput.d.ts.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.js +86 -316
- package/dist/unstable/ai/AnthropicStructuredOutput.js.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.d.ts +1 -1
- package/dist/unstable/ai/EmbeddingModel.js +1 -1
- package/dist/unstable/ai/EmbeddingModel.js.map +1 -1
- package/dist/unstable/ai/LanguageModel.d.ts +4 -1
- package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
- package/dist/unstable/ai/LanguageModel.js +19 -17
- package/dist/unstable/ai/LanguageModel.js.map +1 -1
- package/dist/unstable/ai/McpSchema.d.ts +197 -197
- package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
- package/dist/unstable/ai/McpSchema.js +13 -13
- package/dist/unstable/ai/McpSchema.js.map +1 -1
- package/dist/unstable/ai/McpServer.d.ts +4 -4
- package/dist/unstable/ai/McpServer.d.ts.map +1 -1
- package/dist/unstable/ai/McpServer.js +116 -49
- package/dist/unstable/ai/McpServer.js.map +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.d.ts +32 -10
- package/dist/unstable/ai/OpenAiStructuredOutput.d.ts.map +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.js +193 -377
- package/dist/unstable/ai/OpenAiStructuredOutput.js.map +1 -1
- package/dist/unstable/ai/Response.d.ts +19 -19
- package/dist/unstable/ai/Response.d.ts.map +1 -1
- package/dist/unstable/ai/Response.js +14 -14
- package/dist/unstable/ai/Response.js.map +1 -1
- package/dist/unstable/ai/Tool.d.ts +4 -0
- package/dist/unstable/ai/Tool.d.ts.map +1 -1
- package/dist/unstable/ai/Tool.js +11 -3
- package/dist/unstable/ai/Tool.js.map +1 -1
- package/dist/unstable/ai/Toolkit.d.ts +9 -1
- package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
- package/dist/unstable/ai/Toolkit.js +14 -10
- package/dist/unstable/ai/Toolkit.js.map +1 -1
- package/dist/unstable/ai/internal/codec-transformer.js +15 -12
- package/dist/unstable/ai/internal/codec-transformer.js.map +1 -1
- package/dist/unstable/ai/internal/structured-output.d.ts +2 -0
- package/dist/unstable/ai/internal/structured-output.d.ts.map +1 -0
- package/dist/unstable/ai/internal/structured-output.js +316 -0
- package/dist/unstable/ai/internal/structured-output.js.map +1 -0
- package/dist/unstable/cli/CliError.d.ts +40 -2
- package/dist/unstable/cli/CliError.d.ts.map +1 -1
- package/dist/unstable/cli/CliError.js +45 -6
- package/dist/unstable/cli/CliError.js.map +1 -1
- package/dist/unstable/cli/Command.js +14 -5
- package/dist/unstable/cli/Command.js.map +1 -1
- package/dist/unstable/cli/Param.js +3 -3
- package/dist/unstable/cli/Param.js.map +1 -1
- package/dist/unstable/cli/Primitive.js +1 -1
- package/dist/unstable/cli/Primitive.js.map +1 -1
- package/dist/unstable/cli/internal/command.d.ts +3 -1
- package/dist/unstable/cli/internal/command.d.ts.map +1 -1
- package/dist/unstable/cli/internal/command.js +11 -4
- package/dist/unstable/cli/internal/command.js.map +1 -1
- package/dist/unstable/cli/internal/config.d.ts +0 -48
- package/dist/unstable/cli/internal/config.d.ts.map +1 -1
- package/dist/unstable/cli/internal/config.js +8 -10
- package/dist/unstable/cli/internal/config.js.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.js +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/unstable/cluster/Entity.js +1 -1
- package/dist/unstable/cluster/Entity.js.map +1 -1
- package/dist/unstable/cluster/Envelope.d.ts.map +1 -1
- package/dist/unstable/cluster/Envelope.js +2 -1
- package/dist/unstable/cluster/Envelope.js.map +1 -1
- package/dist/unstable/cluster/Reply.js +1 -1
- package/dist/unstable/cluster/Reply.js.map +1 -1
- package/dist/unstable/cluster/Runner.d.ts +1 -1
- package/dist/unstable/cluster/Runner.js +1 -1
- package/dist/unstable/cluster/Runner.js.map +1 -1
- package/dist/unstable/cluster/RunnerAddress.d.ts +1 -1
- package/dist/unstable/cluster/RunnerAddress.js +1 -1
- package/dist/unstable/cluster/RunnerAddress.js.map +1 -1
- package/dist/unstable/cluster/ShardId.js +1 -1
- package/dist/unstable/cluster/ShardId.js.map +1 -1
- package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
- package/dist/unstable/cluster/Sharding.js +125 -24
- package/dist/unstable/cluster/Sharding.js.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.d.ts +10 -2
- package/dist/unstable/cluster/ShardingConfig.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
- package/dist/unstable/cluster/SingleRunner.d.ts +4 -2
- package/dist/unstable/cluster/SingleRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/SingleRunner.js +2 -1
- package/dist/unstable/cluster/SingleRunner.js.map +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.d.ts +7 -4
- package/dist/unstable/cluster/SqlMessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.js +55 -24
- 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 +109 -62
- package/dist/unstable/cluster/SqlRunnerStorage.js.map +1 -1
- package/dist/unstable/cluster/internal/entityManager.js +19 -7
- package/dist/unstable/cluster/internal/entityManager.js.map +1 -1
- package/dist/unstable/cluster/internal/shardLock.d.ts +2 -0
- package/dist/unstable/cluster/internal/shardLock.d.ts.map +1 -0
- package/dist/unstable/cluster/internal/shardLock.js +4 -0
- package/dist/unstable/cluster/internal/shardLock.js.map +1 -0
- package/dist/unstable/devtools/DevToolsSchema.d.ts +20 -20
- package/dist/unstable/devtools/DevToolsSchema.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsSchema.js +8 -5
- package/dist/unstable/devtools/DevToolsSchema.js.map +1 -1
- package/dist/unstable/eventlog/EventJournal.d.ts +1 -1
- package/dist/unstable/eventlog/EventJournal.js +1 -1
- package/dist/unstable/eventlog/EventJournal.js.map +1 -1
- package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLog.js +15 -11
- package/dist/unstable/eventlog/EventLog.js.map +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.d.ts +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.js +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.js.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.d.ts +26 -26
- package/dist/unstable/eventlog/EventLogMessage.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.js +8 -3
- package/dist/unstable/eventlog/EventLogMessage.js.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.d.ts +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.js +2 -2
- package/dist/unstable/eventlog/SqlEventJournal.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js +3 -3
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/http/Cookies.d.ts.map +1 -1
- package/dist/unstable/http/Cookies.js +24 -22
- package/dist/unstable/http/Cookies.js.map +1 -1
- package/dist/unstable/http/Headers.js +8 -8
- package/dist/unstable/http/Headers.js.map +1 -1
- package/dist/unstable/http/HttpClientRequest.d.ts +44 -0
- package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientRequest.js +14 -0
- package/dist/unstable/http/HttpClientRequest.js.map +1 -1
- package/dist/unstable/http/HttpRouter.d.ts +2 -2
- package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
- package/dist/unstable/http/HttpRouter.js.map +1 -1
- package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRequest.js +5 -4
- package/dist/unstable/http/HttpServerRequest.js.map +1 -1
- package/dist/unstable/http/Multipart.d.ts.map +1 -1
- package/dist/unstable/http/Multipart.js +17 -15
- package/dist/unstable/http/Multipart.js.map +1 -1
- package/dist/unstable/http/Template.js +1 -1
- package/dist/unstable/http/Template.js.map +1 -1
- package/dist/unstable/http/UrlParams.d.ts.map +1 -1
- package/dist/unstable/http/UrlParams.js +17 -14
- package/dist/unstable/http/UrlParams.js.map +1 -1
- package/dist/unstable/httpapi/HttpApi.js +3 -3
- package/dist/unstable/httpapi/HttpApi.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.js +5 -5
- package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.js +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.js.map +1 -1
- package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/OpenApi.js +37 -24
- package/dist/unstable/httpapi/OpenApi.js.map +1 -1
- package/dist/unstable/observability/OtlpExporter.d.ts +72 -1
- package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpExporter.js +69 -4
- package/dist/unstable/observability/OtlpExporter.js.map +1 -1
- package/dist/unstable/observability/OtlpLogger.d.ts +4 -3
- package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpLogger.js +2 -2
- package/dist/unstable/observability/OtlpLogger.js.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.d.ts +7 -3
- package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.js +5 -2
- package/dist/unstable/observability/OtlpMetrics.js.map +1 -1
- package/dist/unstable/observability/OtlpTracer.d.ts +4 -3
- package/dist/unstable/observability/OtlpTracer.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpTracer.js +2 -2
- package/dist/unstable/observability/OtlpTracer.js.map +1 -1
- package/dist/unstable/persistence/Persistable.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistable.js +2 -1
- package/dist/unstable/persistence/Persistable.js.map +1 -1
- package/dist/unstable/persistence/RateLimiter.d.ts +2 -2
- package/dist/unstable/persistence/RateLimiter.js +2 -2
- package/dist/unstable/persistence/RateLimiter.js.map +1 -1
- package/dist/unstable/persistence/Redis.d.ts.map +1 -1
- package/dist/unstable/persistence/Redis.js +2 -2
- package/dist/unstable/persistence/Redis.js.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.js +3 -1
- package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
- package/dist/unstable/reactivity/AsyncResult.d.ts.map +1 -1
- package/dist/unstable/reactivity/AsyncResult.js +4 -3
- package/dist/unstable/reactivity/AsyncResult.js.map +1 -1
- package/dist/unstable/reactivity/Atom.d.ts +83 -0
- package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
- package/dist/unstable/reactivity/Atom.js +31 -0
- package/dist/unstable/reactivity/Atom.js.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.js +1 -1
- package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
- package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClient.js +2 -1
- package/dist/unstable/rpc/RpcClient.js.map +1 -1
- package/dist/unstable/schema/VariantSchema.d.ts +1 -2
- package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
- package/dist/unstable/schema/VariantSchema.js +13 -10
- package/dist/unstable/schema/VariantSchema.js.map +1 -1
- package/dist/unstable/socket/Socket.d.ts +1 -1
- package/dist/unstable/socket/Socket.js +1 -1
- package/dist/unstable/socket/Socket.js.map +1 -1
- package/dist/unstable/sql/SqlError.d.ts +2 -2
- package/dist/unstable/sql/SqlError.js +2 -2
- package/dist/unstable/sql/SqlError.js.map +1 -1
- package/dist/unstable/sql/Statement.d.ts.map +1 -1
- package/dist/unstable/sql/Statement.js +7 -6
- package/dist/unstable/sql/Statement.js.map +1 -1
- package/package.json +1 -1
- package/src/Array.ts +86 -25
- package/src/Channel.ts +32 -14
- package/src/Config.ts +6 -5
- package/src/ConfigProvider.ts +7 -7
- package/src/Data.ts +3 -2
- package/src/Effect.ts +70 -116
- package/src/FiberHandle.ts +3 -2
- package/src/Iterable.ts +2 -1
- package/src/JsonPatch.ts +4 -3
- package/src/JsonSchema.ts +9 -11
- package/src/Logger.ts +3 -2
- package/src/ManagedRuntime.ts +13 -0
- package/src/Metric.ts +4 -3
- package/src/MutableList.ts +4 -0
- package/src/Optic.ts +5 -4
- package/src/Option.ts +2 -1
- package/src/PartitionedSemaphore.ts +1 -4
- package/src/Record.ts +119 -22
- package/src/References.ts +0 -46
- package/src/Request.ts +5 -7
- package/src/Result.ts +2 -1
- package/src/Schema.ts +2538 -987
- package/src/SchemaAST.ts +228 -149
- package/src/SchemaError.ts +1 -1
- package/src/SchemaGetter.ts +36 -29
- package/src/SchemaIssue.ts +1 -1
- package/src/SchemaParser.ts +1 -25
- package/src/SchemaRepresentation.ts +697 -3398
- package/src/SchemaTransformation.ts +3 -3
- package/src/Semaphore.ts +5 -3
- package/src/Stream.ts +63 -19
- package/src/Struct.ts +5 -4
- package/src/Types.ts +1 -3
- package/src/index.ts +0 -5
- package/src/internal/core.ts +4 -3
- package/src/internal/effect.ts +132 -70
- package/src/internal/matcher.ts +1 -1
- package/src/internal/record.ts +11 -7
- package/src/internal/references.ts +0 -5
- package/src/internal/schema/annotations.ts +44 -0
- package/src/internal/schema/fromJsonSchemaDocument.ts +957 -0
- package/src/internal/schema/fromRepresentation.ts +345 -0
- package/src/internal/schema/schema.ts +45 -46
- package/src/internal/schema/{arbitrary.ts → toArbitrary.ts} +8 -10
- package/src/internal/schema/toCodeDocument.ts +572 -0
- package/src/internal/schema/{equivalence.ts → toEquivalence.ts} +12 -7
- package/src/internal/schema/toJsonSchemaDocument.ts +475 -0
- package/src/internal/schema/toRepresentation.ts +401 -0
- package/src/internal/stackTraceLimit.ts +3 -7
- package/src/testing/TestClock.ts +1 -1
- package/src/unstable/ai/AiError.ts +5 -4
- package/src/unstable/ai/AnthropicStructuredOutput.ts +102 -333
- package/src/unstable/ai/EmbeddingModel.ts +1 -1
- package/src/unstable/ai/LanguageModel.ts +30 -28
- package/src/unstable/ai/McpSchema.ts +15 -15
- package/src/unstable/ai/McpServer.ts +172 -56
- package/src/unstable/ai/OpenAiStructuredOutput.ts +230 -395
- package/src/unstable/ai/Response.ts +24 -24
- package/src/unstable/ai/Tool.ts +22 -4
- package/src/unstable/ai/Toolkit.ts +19 -7
- package/src/unstable/ai/internal/codec-transformer.ts +13 -7
- package/src/unstable/ai/internal/structured-output.ts +458 -0
- package/src/unstable/cli/CliError.ts +51 -5
- package/src/unstable/cli/Command.ts +4 -4
- package/src/unstable/cli/Param.ts +3 -3
- package/src/unstable/cli/Primitive.ts +1 -1
- package/src/unstable/cli/internal/command.ts +13 -5
- package/src/unstable/cli/internal/config.ts +8 -10
- package/src/unstable/cluster/ClusterWorkflowEngine.ts +3 -3
- package/src/unstable/cluster/Entity.ts +1 -1
- package/src/unstable/cluster/Envelope.ts +2 -1
- package/src/unstable/cluster/Reply.ts +1 -1
- package/src/unstable/cluster/Runner.ts +1 -1
- package/src/unstable/cluster/RunnerAddress.ts +1 -1
- package/src/unstable/cluster/ShardId.ts +1 -1
- package/src/unstable/cluster/Sharding.ts +161 -34
- package/src/unstable/cluster/ShardingConfig.ts +5 -1
- package/src/unstable/cluster/SingleRunner.ts +4 -2
- package/src/unstable/cluster/SqlMessageStorage.ts +83 -35
- package/src/unstable/cluster/SqlRunnerStorage.ts +186 -116
- package/src/unstable/cluster/internal/entityManager.ts +31 -10
- package/src/unstable/cluster/internal/shardLock.ts +9 -0
- package/src/unstable/devtools/DevToolsSchema.ts +10 -5
- package/src/unstable/eventlog/EventJournal.ts +1 -1
- package/src/unstable/eventlog/EventLog.ts +21 -11
- package/src/unstable/eventlog/EventLogEncryption.ts +1 -1
- package/src/unstable/eventlog/EventLogMessage.ts +10 -3
- package/src/unstable/eventlog/SqlEventJournal.ts +2 -2
- package/src/unstable/eventlog/SqlEventLogServerEncrypted.ts +1 -1
- package/src/unstable/eventlog/SqlEventLogServerUnencrypted.ts +6 -3
- package/src/unstable/http/Cookies.ts +29 -24
- package/src/unstable/http/Headers.ts +8 -8
- package/src/unstable/http/HttpClientRequest.ts +57 -0
- package/src/unstable/http/HttpRouter.ts +6 -3
- package/src/unstable/http/HttpServerRequest.ts +5 -4
- package/src/unstable/http/Multipart.ts +16 -13
- package/src/unstable/http/Template.ts +1 -1
- package/src/unstable/http/UrlParams.ts +17 -14
- package/src/unstable/httpapi/HttpApi.ts +3 -3
- package/src/unstable/httpapi/HttpApiClient.ts +5 -5
- package/src/unstable/httpapi/HttpApiGroup.ts +1 -1
- package/src/unstable/httpapi/OpenApi.ts +52 -28
- package/src/unstable/observability/OtlpExporter.ts +109 -5
- package/src/unstable/observability/OtlpLogger.ts +5 -5
- package/src/unstable/observability/OtlpMetrics.ts +8 -4
- package/src/unstable/observability/OtlpTracer.ts +8 -4
- package/src/unstable/persistence/Persistable.ts +3 -2
- package/src/unstable/persistence/RateLimiter.ts +2 -2
- package/src/unstable/persistence/Redis.ts +2 -2
- package/src/unstable/process/ChildProcessSpawner.ts +1 -1
- package/src/unstable/reactivity/AsyncResult.ts +4 -3
- package/src/unstable/reactivity/Atom.ts +92 -0
- package/src/unstable/reactivity/AtomRegistry.ts +1 -1
- package/src/unstable/rpc/RpcClient.ts +2 -1
- package/src/unstable/schema/VariantSchema.ts +14 -24
- package/src/unstable/socket/Socket.ts +1 -1
- package/src/unstable/sql/SqlError.ts +2 -2
- package/src/unstable/sql/Statement.ts +7 -6
- package/dist/SchemaUtils.d.ts +0 -28
- package/dist/SchemaUtils.d.ts.map +0 -1
- package/dist/SchemaUtils.js +0 -45
- package/dist/SchemaUtils.js.map +0 -1
- package/dist/internal/schema/arbitrary.d.ts.map +0 -1
- package/dist/internal/schema/arbitrary.js.map +0 -1
- package/dist/internal/schema/equivalence.d.ts +0 -2
- package/dist/internal/schema/equivalence.d.ts.map +0 -1
- package/dist/internal/schema/equivalence.js.map +0 -1
- package/dist/internal/schema/representation.d.ts +0 -2
- package/dist/internal/schema/representation.d.ts.map +0 -1
- package/dist/internal/schema/representation.js +0 -865
- package/dist/internal/schema/representation.js.map +0 -1
- package/src/SchemaUtils.ts +0 -51
- package/src/internal/schema/representation.ts +0 -795
package/dist/Schema.d.ts
CHANGED
|
@@ -84,8 +84,8 @@ export type ConstructorDefault = "no-default" | "with-default";
|
|
|
84
84
|
* Use when passing `disableChecks: true` to skip validation when you trust the data.
|
|
85
85
|
* - Pass `parseOptions` to control error reporting behavior.
|
|
86
86
|
*
|
|
87
|
-
* @see {@link
|
|
88
|
-
* @see {@link
|
|
87
|
+
* @see {@link BottomWithoutNew.makeEffect}
|
|
88
|
+
* @see {@link BottomWithoutNew.make}
|
|
89
89
|
*
|
|
90
90
|
* @category options
|
|
91
91
|
* @since 3.13.4
|
|
@@ -101,19 +101,19 @@ export interface MakeOptions {
|
|
|
101
101
|
readonly disableChecks?: boolean | undefined;
|
|
102
102
|
}
|
|
103
103
|
/**
|
|
104
|
-
* The fully-parameterized
|
|
105
|
-
* parameters controlling type inference, mutability,
|
|
106
|
-
* transformation behavior.
|
|
104
|
+
* The fully-parameterized schema interface without a construct signature.
|
|
105
|
+
* Exposes all 14 type parameters controlling type inference, mutability,
|
|
106
|
+
* optionality, services, and transformation behavior.
|
|
107
107
|
*
|
|
108
108
|
* **When to use**
|
|
109
109
|
*
|
|
110
|
-
* Use
|
|
111
|
-
*
|
|
110
|
+
* Use as the base for schema interfaces that provide a specialized construct
|
|
111
|
+
* signature.
|
|
112
112
|
*
|
|
113
113
|
* @category models
|
|
114
114
|
* @since 4.0.0
|
|
115
115
|
*/
|
|
116
|
-
export interface
|
|
116
|
+
export interface BottomWithoutNew<out T, out E, out RD, out RE, out Ast extends SchemaAST.AST, out Rebuild extends Top, out TypeMakeIn = T, out Iso = T, in out TypeParameters extends ReadonlyArray<Constraint> = readonly [], out TypeMake = TypeMakeIn, out TypeMutability extends Mutability = "readonly", out TypeOptionality extends Optionality = "required", out TypeConstructorDefault extends ConstructorDefault = "no-default", out EncodedMutability extends Mutability = "readonly", out EncodedOptionality extends Optionality = "required"> extends Pipeable.Pipeable {
|
|
117
117
|
readonly [TypeId]: typeof TypeId;
|
|
118
118
|
readonly "ast": Ast;
|
|
119
119
|
readonly "Rebuild": Rebuild;
|
|
@@ -154,8 +154,8 @@ export interface Bottom<out T, out E, out RD, out RE, out Ast extends SchemaAST.
|
|
|
154
154
|
* Causes that contain defects, interruptions, or other non-schema reasons
|
|
155
155
|
* throw with the underlying `Cause` attached instead.
|
|
156
156
|
*
|
|
157
|
-
* @see {@link
|
|
158
|
-
* @see {@link
|
|
157
|
+
* @see {@link BottomWithoutNew.makeOption} — construct synchronously and discard validation details
|
|
158
|
+
* @see {@link BottomWithoutNew.makeEffect} — construct through `Effect` when validation failure should stay in the error channel
|
|
159
159
|
*/
|
|
160
160
|
make(input: this["~type.make.in"], options?: MakeOptions): this["Type"];
|
|
161
161
|
/**
|
|
@@ -178,8 +178,8 @@ export interface Bottom<out T, out E, out RD, out RE, out Ast extends SchemaAST.
|
|
|
178
178
|
* that contain defects, interruptions, or other non-schema reasons throw
|
|
179
179
|
* instead.
|
|
180
180
|
*
|
|
181
|
-
* @see {@link
|
|
182
|
-
* @see {@link
|
|
181
|
+
* @see {@link BottomWithoutNew.make} — construct synchronously when validation failure should throw
|
|
182
|
+
* @see {@link BottomWithoutNew.makeEffect} — construct through `Effect` when validation details should stay in the error channel
|
|
183
183
|
*/
|
|
184
184
|
makeOption(input: this["~type.make.in"], options?: MakeOptions): Option_.Option<this["Type"]>;
|
|
185
185
|
/**
|
|
@@ -191,37 +191,82 @@ export interface Bottom<out T, out E, out RD, out RE, out Ast extends SchemaAST.
|
|
|
191
191
|
* Use when constructor input may fail validation and you want to
|
|
192
192
|
* compose that failure with other `Effect` operations instead of throwing.
|
|
193
193
|
*
|
|
194
|
-
* @see {@link
|
|
195
|
-
* @see {@link
|
|
194
|
+
* @see {@link BottomWithoutNew.make} — construct synchronously when validation failure should throw
|
|
195
|
+
* @see {@link BottomWithoutNew.makeOption} — construct synchronously and discard validation details
|
|
196
196
|
*/
|
|
197
197
|
makeEffect(input: this["~type.make.in"], options?: MakeOptions): Effect.Effect<this["Type"], SchemaError>;
|
|
198
198
|
}
|
|
199
199
|
/**
|
|
200
|
-
*
|
|
201
|
-
*
|
|
200
|
+
* Fully-parameterized base interface for schemas that can be extended directly
|
|
201
|
+
* by TypeScript classes.
|
|
202
202
|
*
|
|
203
203
|
* **When to use**
|
|
204
204
|
*
|
|
205
|
-
* Use as
|
|
206
|
-
* `
|
|
207
|
-
*
|
|
205
|
+
* Use as the base for concrete schema interfaces whose runtime values support
|
|
206
|
+
* `class ... extends schema`.
|
|
207
|
+
*
|
|
208
|
+
* **Details**
|
|
209
|
+
*
|
|
210
|
+
* Extends {@link BottomWithoutNew} with a construct signature that accepts `never`. The
|
|
211
|
+
* signature enables class extension without making ordinary schemas directly
|
|
212
|
+
* constructible.
|
|
213
|
+
*
|
|
214
|
+
* @see {@link BottomWithoutNew} for the schema protocol without a construct signature
|
|
215
|
+
*
|
|
216
|
+
* @category utility types
|
|
217
|
+
* @since 4.0.0
|
|
218
|
+
*/
|
|
219
|
+
export interface Bottom<out T, out E, out RD, out RE, out Ast extends SchemaAST.AST, out Rebuild extends Top, out TypeMakeIn = T, out Iso = T, in out TypeParameters extends ReadonlyArray<Constraint> = readonly [], out TypeMake = TypeMakeIn, out TypeMutability extends Mutability = "readonly", out TypeOptionality extends Optionality = "required", out TypeConstructorDefault extends ConstructorDefault = "no-default", out EncodedMutability extends Mutability = "readonly", out EncodedOptionality extends Optionality = "required"> extends BottomWithoutNew<T, E, RD, RE, Ast, Rebuild, TypeMakeIn, Iso, TypeParameters, TypeMake, TypeMutability, TypeOptionality, TypeConstructorDefault, EncodedMutability, EncodedOptionality> {
|
|
220
|
+
new (_: never): {};
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Lazy `BottomWithoutNew` variant for schema implementations that
|
|
224
|
+
* compute their public views on demand.
|
|
225
|
+
*
|
|
226
|
+
* **When to use**
|
|
227
|
+
*
|
|
228
|
+
* Use as the base for lazy schema interfaces that provide a specialized
|
|
229
|
+
* construct signature.
|
|
208
230
|
*
|
|
209
231
|
* **Details**
|
|
210
232
|
*
|
|
211
233
|
* The laziness is purely type-level; runtime behavior is unchanged.
|
|
212
|
-
* `
|
|
213
|
-
* erases the expensive schema views to
|
|
214
|
-
* then redeclare the precise views
|
|
215
|
-
* `Struct` and `Union` cheaper when
|
|
216
|
-
* preserving their exact public types.
|
|
234
|
+
* `BottomLazyWithoutNew` keeps the structural operations inherited from
|
|
235
|
+
* `BottomWithoutNew`, but erases the expensive schema views to
|
|
236
|
+
* `unknown`. Concrete schema interfaces can then redeclare the precise views
|
|
237
|
+
* they expose. This keeps wide schemas such as `Struct` and `Union` cheaper when
|
|
238
|
+
* generic code reads a single view, while preserving their exact public types.
|
|
217
239
|
*
|
|
218
|
-
* @see {@link
|
|
240
|
+
* @see {@link BottomWithoutNew} for the fully parameterized schema interface when every
|
|
219
241
|
* view must be supplied directly.
|
|
220
242
|
*
|
|
221
243
|
* @category utility types
|
|
222
244
|
* @since 4.0.0
|
|
223
245
|
*/
|
|
224
|
-
export interface
|
|
246
|
+
export interface BottomLazyWithoutNew<out Ast extends SchemaAST.AST, out Rebuild extends Top, in out TypeParameters extends ReadonlyArray<Constraint> = readonly [], out TypeMutability extends Mutability = "readonly", out TypeOptionality extends Optionality = "required", out TypeConstructorDefault extends ConstructorDefault = "no-default", out EncodedMutability extends Mutability = "readonly", out EncodedOptionality extends Optionality = "required"> extends BottomWithoutNew<unknown, unknown, unknown, unknown, Ast, Rebuild, unknown, unknown, TypeParameters, unknown, TypeMutability, TypeOptionality, TypeConstructorDefault, EncodedMutability, EncodedOptionality> {
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Lazy `Bottom` variant for schemas that can be extended directly by TypeScript
|
|
250
|
+
* classes.
|
|
251
|
+
*
|
|
252
|
+
* **When to use**
|
|
253
|
+
*
|
|
254
|
+
* Use as the base for concrete lazy schema interfaces whose runtime values
|
|
255
|
+
* support `class ... extends schema`.
|
|
256
|
+
*
|
|
257
|
+
* **Details**
|
|
258
|
+
*
|
|
259
|
+
* Extends {@link BottomLazyWithoutNew} with a construct signature that accepts `never`.
|
|
260
|
+
* The signature enables class extension without making ordinary schemas
|
|
261
|
+
* directly constructible.
|
|
262
|
+
*
|
|
263
|
+
* @see {@link BottomLazyWithoutNew} for the lazy schema protocol without a construct signature
|
|
264
|
+
*
|
|
265
|
+
* @category utility types
|
|
266
|
+
* @since 4.0.0
|
|
267
|
+
*/
|
|
268
|
+
export interface BottomLazy<out Ast extends SchemaAST.AST, out Rebuild extends Top, in out TypeParameters extends ReadonlyArray<Constraint> = readonly [], out TypeMutability extends Mutability = "readonly", out TypeOptionality extends Optionality = "required", out TypeConstructorDefault extends ConstructorDefault = "no-default", out EncodedMutability extends Mutability = "readonly", out EncodedOptionality extends Optionality = "required"> extends BottomLazyWithoutNew<Ast, Rebuild, TypeParameters, TypeMutability, TypeOptionality, TypeConstructorDefault, EncodedMutability, EncodedOptionality> {
|
|
269
|
+
new (_: never): {};
|
|
225
270
|
}
|
|
226
271
|
/**
|
|
227
272
|
* Type-level representation returned by {@link declareConstructor}.
|
|
@@ -372,7 +417,7 @@ export declare function revealBottom<S extends Top>(bottom: S): Bottom<S["Type"]
|
|
|
372
417
|
* ```ts
|
|
373
418
|
* import { Schema } from "effect"
|
|
374
419
|
*
|
|
375
|
-
* const Age = Schema.
|
|
420
|
+
* const Age = Schema.Natural.pipe(
|
|
376
421
|
* Schema.annotate({
|
|
377
422
|
* title: "Age",
|
|
378
423
|
* description: "A non-negative integer representing age in years"
|
|
@@ -934,7 +979,7 @@ SchemaError };
|
|
|
934
979
|
* // Create a standard schema from a regular schema
|
|
935
980
|
* const PersonSchema = Schema.Struct({
|
|
936
981
|
* name: Schema.NonEmptyString,
|
|
937
|
-
* age: Schema.
|
|
982
|
+
* age: Schema.Finite.check(Schema.isBetween({ minimum: 0, maximum: 150 }))
|
|
938
983
|
* })
|
|
939
984
|
*
|
|
940
985
|
* const standardSchema = Schema.toStandardSchemaV1(PersonSchema, {
|
|
@@ -1754,30 +1799,6 @@ export declare const encodeSync: <S extends ConstraintEncoder<unknown>>(schema:
|
|
|
1754
1799
|
* @since 3.10.0
|
|
1755
1800
|
*/
|
|
1756
1801
|
export declare const make: <S extends Constraint>(ast: S["ast"], options?: object) => S;
|
|
1757
|
-
/**
|
|
1758
|
-
* Transforms a schema into a class that can be extended with `extends`. The
|
|
1759
|
-
* resulting class inherits the full schema API (e.g. `annotate`) and can define
|
|
1760
|
-
* static methods that reference `this`.
|
|
1761
|
-
*
|
|
1762
|
-
* **Example** (Wrapping a primitive schema)
|
|
1763
|
-
*
|
|
1764
|
-
* ```ts
|
|
1765
|
-
* import { Schema } from "effect"
|
|
1766
|
-
*
|
|
1767
|
-
* class MyString extends Schema.asClass(Schema.String) {
|
|
1768
|
-
* static readonly decodeUnknownSync = Schema.decodeUnknownSync(this)
|
|
1769
|
-
* }
|
|
1770
|
-
*
|
|
1771
|
-
* console.log(MyString.decodeUnknownSync("a"))
|
|
1772
|
-
* // "a"
|
|
1773
|
-
* ```
|
|
1774
|
-
*
|
|
1775
|
-
* @category constructors
|
|
1776
|
-
* @since 4.0.0
|
|
1777
|
-
*/
|
|
1778
|
-
export declare function asClass<S extends Top>(schema: S): S & {
|
|
1779
|
-
new (_: never): {};
|
|
1780
|
-
};
|
|
1781
1802
|
/**
|
|
1782
1803
|
* Checks whether a value is a `Schema`.
|
|
1783
1804
|
*
|
|
@@ -2579,7 +2600,7 @@ export declare namespace Struct {
|
|
|
2579
2600
|
type ReadonlySide<F extends Fields, S extends Side> = {
|
|
2580
2601
|
readonly [K in keyof F]: F[K][S];
|
|
2581
2602
|
};
|
|
2582
|
-
type View<F extends Fields, S extends Side, O extends keyof F = SideOptionalKeys<F, S>, M extends keyof F = SideMutableKeys<F, S>> = [O | M] extends [never] ? ReadonlySide<F, S
|
|
2603
|
+
type View<F extends Fields, S extends Side, O extends keyof F = SideOptionalKeys<F, S>, M extends keyof F = SideMutableKeys<F, S>> = [O | M] extends [never] ? Simplify<ReadonlySide<F, S>> : [M] extends [never] ? Simplify<SetOptional<ReadonlySide<F, S>, O>> : [O] extends [never] ? Simplify<SetMutable<ReadonlySide<F, S>, M>> : Simplify<SetMutable<SetOptional<ReadonlySide<F, S>, O>, Extract<keyof SetOptional<ReadonlySide<F, S>, O>, M>>>;
|
|
2583
2604
|
/**
|
|
2584
2605
|
* Computes the decoded object type for a struct field map.
|
|
2585
2606
|
*
|
|
@@ -3979,7 +4000,7 @@ export declare function suspend<S extends Constraint>(f: () => S): suspend<S>;
|
|
|
3979
4000
|
* ```ts
|
|
3980
4001
|
* import { Schema } from "effect"
|
|
3981
4002
|
*
|
|
3982
|
-
* const AgeSchema = Schema.
|
|
4003
|
+
* const AgeSchema = Schema.Finite.pipe(
|
|
3983
4004
|
* Schema.check(Schema.isGreaterThanOrEqualTo(0), Schema.isLessThanOrEqualTo(120))
|
|
3984
4005
|
* )
|
|
3985
4006
|
* ```
|
|
@@ -4931,7 +4952,7 @@ export declare function TaggedUnion<const CasesByTag extends Record<string, Stru
|
|
|
4931
4952
|
* @category models
|
|
4932
4953
|
* @since 4.0.0
|
|
4933
4954
|
*/
|
|
4934
|
-
export interface Opaque<Self, S extends Top, Brand> extends
|
|
4955
|
+
export interface Opaque<Self, S extends Top, Brand> extends BottomLazyWithoutNew<S["ast"], S["Rebuild"], S["~type.parameters"], S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
|
|
4935
4956
|
readonly "Type": Self;
|
|
4936
4957
|
readonly "Encoded": S["Encoded"];
|
|
4937
4958
|
readonly "DecodingServices": S["DecodingServices"];
|
|
@@ -5137,6 +5158,19 @@ export declare function makeFilterGroup<T>(checks: readonly [SchemaAST.Check<T>,
|
|
|
5137
5158
|
* @since 4.0.0
|
|
5138
5159
|
*/
|
|
5139
5160
|
export declare function isTrimmed(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
|
|
5161
|
+
/**
|
|
5162
|
+
* Reviver for persisted `isTrimmed` checks.
|
|
5163
|
+
*
|
|
5164
|
+
* **When to use**
|
|
5165
|
+
*
|
|
5166
|
+
* Use when reconstructing documents that may contain checks created by {@link isTrimmed}.
|
|
5167
|
+
*
|
|
5168
|
+
* @see {@link isTrimmed} for creating the corresponding check
|
|
5169
|
+
*
|
|
5170
|
+
* @category String checks
|
|
5171
|
+
* @since 4.0.0
|
|
5172
|
+
*/
|
|
5173
|
+
export declare const isTrimmedReviver: SchemaRepresentation.FilterReviver<null>;
|
|
5140
5174
|
/**
|
|
5141
5175
|
* Validates that a string matches the specified regular expression pattern.
|
|
5142
5176
|
*
|
|
@@ -5154,7 +5188,23 @@ export declare function isTrimmed(annotations?: Annotations.Filter): SchemaAST.F
|
|
|
5154
5188
|
* @category String checks
|
|
5155
5189
|
* @since 4.0.0
|
|
5156
5190
|
*/
|
|
5157
|
-
export declare
|
|
5191
|
+
export declare function isPattern(regExp: globalThis.RegExp, annotations?: Annotations.Filter): SchemaAST.Filter<string>;
|
|
5192
|
+
/**
|
|
5193
|
+
* Reviver for persisted `isPattern` checks.
|
|
5194
|
+
*
|
|
5195
|
+
* **When to use**
|
|
5196
|
+
*
|
|
5197
|
+
* Use when reconstructing documents that may contain checks created by {@link isPattern}.
|
|
5198
|
+
*
|
|
5199
|
+
* @see {@link isPattern} for creating the corresponding check
|
|
5200
|
+
*
|
|
5201
|
+
* @category String checks
|
|
5202
|
+
* @since 4.0.0
|
|
5203
|
+
*/
|
|
5204
|
+
export declare const isPatternReviver: SchemaRepresentation.FilterReviver<{
|
|
5205
|
+
readonly source: string;
|
|
5206
|
+
readonly flags: string;
|
|
5207
|
+
}>;
|
|
5158
5208
|
/**
|
|
5159
5209
|
* Validates that a string represents a finite number.
|
|
5160
5210
|
*
|
|
@@ -5173,7 +5223,20 @@ export declare const isPattern: (regExp: globalThis.RegExp, annotations?: Annota
|
|
|
5173
5223
|
* @category String checks
|
|
5174
5224
|
* @since 4.0.0
|
|
5175
5225
|
*/
|
|
5176
|
-
export declare
|
|
5226
|
+
export declare function isStringFinite(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
|
|
5227
|
+
/**
|
|
5228
|
+
* Reviver for persisted `isStringFinite` checks.
|
|
5229
|
+
*
|
|
5230
|
+
* **When to use**
|
|
5231
|
+
*
|
|
5232
|
+
* Use when reconstructing documents that may contain checks created by {@link isStringFinite}.
|
|
5233
|
+
*
|
|
5234
|
+
* @see {@link isStringFinite} for creating the corresponding check
|
|
5235
|
+
*
|
|
5236
|
+
* @category String checks
|
|
5237
|
+
* @since 4.0.0
|
|
5238
|
+
*/
|
|
5239
|
+
export declare const isStringFiniteReviver: SchemaRepresentation.FilterReviver<null>;
|
|
5177
5240
|
/**
|
|
5178
5241
|
* Validates that a string is a signed base-10 integer literal for Effect's
|
|
5179
5242
|
* BigInt string encoding.
|
|
@@ -5191,7 +5254,20 @@ export declare const isStringFinite: (annotations?: Annotations.Filter) => Schem
|
|
|
5191
5254
|
* @category String checks
|
|
5192
5255
|
* @since 4.0.0
|
|
5193
5256
|
*/
|
|
5194
|
-
export declare
|
|
5257
|
+
export declare function isStringBigInt(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
|
|
5258
|
+
/**
|
|
5259
|
+
* Reviver for persisted `isStringBigInt` checks.
|
|
5260
|
+
*
|
|
5261
|
+
* **When to use**
|
|
5262
|
+
*
|
|
5263
|
+
* Use when reconstructing documents that may contain checks created by {@link isStringBigInt}.
|
|
5264
|
+
*
|
|
5265
|
+
* @see {@link isStringBigInt} for creating the corresponding check
|
|
5266
|
+
*
|
|
5267
|
+
* @category String checks
|
|
5268
|
+
* @since 4.0.0
|
|
5269
|
+
*/
|
|
5270
|
+
export declare const isStringBigIntReviver: SchemaRepresentation.FilterReviver<null>;
|
|
5195
5271
|
/**
|
|
5196
5272
|
* Validates that a string has the `Symbol(description)` format used by Effect's
|
|
5197
5273
|
* symbol string encoding.
|
|
@@ -5204,7 +5280,20 @@ export declare const isStringBigInt: (annotations?: Annotations.Filter) => Schem
|
|
|
5204
5280
|
* @category String checks
|
|
5205
5281
|
* @since 4.0.0
|
|
5206
5282
|
*/
|
|
5207
|
-
export declare
|
|
5283
|
+
export declare function isStringSymbol(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
|
|
5284
|
+
/**
|
|
5285
|
+
* Reviver for persisted `isStringSymbol` checks.
|
|
5286
|
+
*
|
|
5287
|
+
* **When to use**
|
|
5288
|
+
*
|
|
5289
|
+
* Use when reconstructing documents that may contain checks created by {@link isStringSymbol}.
|
|
5290
|
+
*
|
|
5291
|
+
* @see {@link isStringSymbol} for creating the corresponding check
|
|
5292
|
+
*
|
|
5293
|
+
* @category String checks
|
|
5294
|
+
* @since 4.0.0
|
|
5295
|
+
*/
|
|
5296
|
+
export declare const isStringSymbolReviver: SchemaRepresentation.FilterReviver<null>;
|
|
5208
5297
|
/**
|
|
5209
5298
|
* Validates that a string is a strict Universally Unique Identifier (UUID).
|
|
5210
5299
|
*
|
|
@@ -5236,6 +5325,21 @@ export declare const isStringSymbol: (annotations?: Annotations.Filter) => Schem
|
|
|
5236
5325
|
* @since 4.0.0
|
|
5237
5326
|
*/
|
|
5238
5327
|
export declare function isUUID(version?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8, annotations?: Annotations.Filter): SchemaAST.Filter<string>;
|
|
5328
|
+
/**
|
|
5329
|
+
* Reviver for persisted `isUUID` checks.
|
|
5330
|
+
*
|
|
5331
|
+
* **When to use**
|
|
5332
|
+
*
|
|
5333
|
+
* Use when reconstructing documents that may contain checks created by {@link isUUID}.
|
|
5334
|
+
*
|
|
5335
|
+
* @see {@link isUUID} for creating the corresponding check
|
|
5336
|
+
*
|
|
5337
|
+
* @category String checks
|
|
5338
|
+
* @since 4.0.0
|
|
5339
|
+
*/
|
|
5340
|
+
export declare const isUUIDReviver: SchemaRepresentation.FilterReviver<{
|
|
5341
|
+
readonly version: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | null;
|
|
5342
|
+
}>;
|
|
5239
5343
|
/**
|
|
5240
5344
|
* Validates that a string has the GUID / UUID textual shape.
|
|
5241
5345
|
*
|
|
@@ -5261,6 +5365,19 @@ export declare function isUUID(version?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8, annotati
|
|
|
5261
5365
|
* @since 4.0.0
|
|
5262
5366
|
*/
|
|
5263
5367
|
export declare function isGUID(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
|
|
5368
|
+
/**
|
|
5369
|
+
* Reviver for persisted `isGUID` checks.
|
|
5370
|
+
*
|
|
5371
|
+
* **When to use**
|
|
5372
|
+
*
|
|
5373
|
+
* Use when reconstructing documents that may contain checks created by {@link isGUID}.
|
|
5374
|
+
*
|
|
5375
|
+
* @see {@link isGUID} for creating the corresponding check
|
|
5376
|
+
*
|
|
5377
|
+
* @category String checks
|
|
5378
|
+
* @since 4.0.0
|
|
5379
|
+
*/
|
|
5380
|
+
export declare const isGUIDReviver: SchemaRepresentation.FilterReviver<null>;
|
|
5264
5381
|
/**
|
|
5265
5382
|
* Validates that a string is a valid ULID (Universally Unique Lexicographically
|
|
5266
5383
|
* Sortable Identifier).
|
|
@@ -5281,6 +5398,19 @@ export declare function isGUID(annotations?: Annotations.Filter): SchemaAST.Filt
|
|
|
5281
5398
|
* @since 4.0.0
|
|
5282
5399
|
*/
|
|
5283
5400
|
export declare function isULID(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
|
|
5401
|
+
/**
|
|
5402
|
+
* Reviver for persisted `isULID` checks.
|
|
5403
|
+
*
|
|
5404
|
+
* **When to use**
|
|
5405
|
+
*
|
|
5406
|
+
* Use when reconstructing documents that may contain checks created by {@link isULID}.
|
|
5407
|
+
*
|
|
5408
|
+
* @see {@link isULID} for creating the corresponding check
|
|
5409
|
+
*
|
|
5410
|
+
* @category String checks
|
|
5411
|
+
* @since 4.0.0
|
|
5412
|
+
*/
|
|
5413
|
+
export declare const isULIDReviver: SchemaRepresentation.FilterReviver<null>;
|
|
5284
5414
|
/**
|
|
5285
5415
|
* Validates that a string is valid Base64 encoded data.
|
|
5286
5416
|
*
|
|
@@ -5300,6 +5430,19 @@ export declare function isULID(annotations?: Annotations.Filter): SchemaAST.Filt
|
|
|
5300
5430
|
* @since 4.0.0
|
|
5301
5431
|
*/
|
|
5302
5432
|
export declare function isBase64(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
|
|
5433
|
+
/**
|
|
5434
|
+
* Reviver for persisted `isBase64` checks.
|
|
5435
|
+
*
|
|
5436
|
+
* **When to use**
|
|
5437
|
+
*
|
|
5438
|
+
* Use when reconstructing documents that may contain checks created by {@link isBase64}.
|
|
5439
|
+
*
|
|
5440
|
+
* @see {@link isBase64} for creating the corresponding check
|
|
5441
|
+
*
|
|
5442
|
+
* @category String checks
|
|
5443
|
+
* @since 4.0.0
|
|
5444
|
+
*/
|
|
5445
|
+
export declare const isBase64Reviver: SchemaRepresentation.FilterReviver<null>;
|
|
5303
5446
|
/**
|
|
5304
5447
|
* Validates that a string is valid Base64URL encoded data (Base64 with URL-safe
|
|
5305
5448
|
* characters).
|
|
@@ -5320,48 +5463,101 @@ export declare function isBase64(annotations?: Annotations.Filter): SchemaAST.Fi
|
|
|
5320
5463
|
* @since 4.0.0
|
|
5321
5464
|
*/
|
|
5322
5465
|
export declare function isBase64Url(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
|
|
5466
|
+
/**
|
|
5467
|
+
* Reviver for persisted `isBase64Url` checks.
|
|
5468
|
+
*
|
|
5469
|
+
* **When to use**
|
|
5470
|
+
*
|
|
5471
|
+
* Use when reconstructing documents that may contain checks created by {@link isBase64Url}.
|
|
5472
|
+
*
|
|
5473
|
+
* @see {@link isBase64Url} for creating the corresponding check
|
|
5474
|
+
*
|
|
5475
|
+
* @category String checks
|
|
5476
|
+
* @since 4.0.0
|
|
5477
|
+
*/
|
|
5478
|
+
export declare const isBase64UrlReviver: SchemaRepresentation.FilterReviver<null>;
|
|
5323
5479
|
/**
|
|
5324
5480
|
* Validates at runtime that a string starts with the specified literal prefix.
|
|
5325
5481
|
*
|
|
5326
5482
|
* **Details**
|
|
5327
5483
|
*
|
|
5328
|
-
*
|
|
5329
|
-
*
|
|
5330
|
-
* escaping regexp metacharacters. If the prefix contains regexp syntax, generated
|
|
5331
|
-
* patterns may not be equivalent to the runtime `startsWith` check.
|
|
5484
|
+
* RegExp metacharacters in the prefix are escaped in JSON Schema and arbitrary
|
|
5485
|
+
* metadata so that the generated patterns retain literal `startsWith` semantics.
|
|
5332
5486
|
*
|
|
5333
5487
|
* @category String checks
|
|
5334
5488
|
* @since 4.0.0
|
|
5335
5489
|
*/
|
|
5336
5490
|
export declare function isStartsWith(startsWith: string, annotations?: Annotations.Filter): SchemaAST.Filter<string>;
|
|
5491
|
+
/**
|
|
5492
|
+
* Reviver for persisted `isStartsWith` checks.
|
|
5493
|
+
*
|
|
5494
|
+
* **When to use**
|
|
5495
|
+
*
|
|
5496
|
+
* Use when reconstructing documents that may contain checks created by {@link isStartsWith}.
|
|
5497
|
+
*
|
|
5498
|
+
* @see {@link isStartsWith} for creating the corresponding check
|
|
5499
|
+
*
|
|
5500
|
+
* @category String checks
|
|
5501
|
+
* @since 4.0.0
|
|
5502
|
+
*/
|
|
5503
|
+
export declare const isStartsWithReviver: SchemaRepresentation.FilterReviver<{
|
|
5504
|
+
readonly startsWith: string;
|
|
5505
|
+
}>;
|
|
5337
5506
|
/**
|
|
5338
5507
|
* Validates at runtime that a string ends with the specified literal suffix.
|
|
5339
5508
|
*
|
|
5340
5509
|
* **Details**
|
|
5341
5510
|
*
|
|
5342
|
-
*
|
|
5343
|
-
*
|
|
5344
|
-
* escaping regexp metacharacters. If the suffix contains regexp syntax, generated
|
|
5345
|
-
* patterns may not be equivalent to the runtime `endsWith` check.
|
|
5511
|
+
* RegExp metacharacters in the suffix are escaped in JSON Schema and arbitrary
|
|
5512
|
+
* metadata so that the generated patterns retain literal `endsWith` semantics.
|
|
5346
5513
|
*
|
|
5347
5514
|
* @category String checks
|
|
5348
5515
|
* @since 4.0.0
|
|
5349
5516
|
*/
|
|
5350
5517
|
export declare function isEndsWith(endsWith: string, annotations?: Annotations.Filter): SchemaAST.Filter<string>;
|
|
5518
|
+
/**
|
|
5519
|
+
* Reviver for persisted `isEndsWith` checks.
|
|
5520
|
+
*
|
|
5521
|
+
* **When to use**
|
|
5522
|
+
*
|
|
5523
|
+
* Use when reconstructing documents that may contain checks created by {@link isEndsWith}.
|
|
5524
|
+
*
|
|
5525
|
+
* @see {@link isEndsWith} for creating the corresponding check
|
|
5526
|
+
*
|
|
5527
|
+
* @category String checks
|
|
5528
|
+
* @since 4.0.0
|
|
5529
|
+
*/
|
|
5530
|
+
export declare const isEndsWithReviver: SchemaRepresentation.FilterReviver<{
|
|
5531
|
+
readonly endsWith: string;
|
|
5532
|
+
}>;
|
|
5351
5533
|
/**
|
|
5352
5534
|
* Validates at runtime that a string contains the specified literal substring.
|
|
5353
5535
|
*
|
|
5354
5536
|
* **Details**
|
|
5355
5537
|
*
|
|
5356
|
-
*
|
|
5357
|
-
*
|
|
5358
|
-
*
|
|
5359
|
-
* equivalent to the runtime `includes` check.
|
|
5538
|
+
* RegExp metacharacters in the substring are escaped in JSON Schema and
|
|
5539
|
+
* arbitrary metadata so that the generated patterns retain literal `includes`
|
|
5540
|
+
* semantics.
|
|
5360
5541
|
*
|
|
5361
5542
|
* @category String checks
|
|
5362
5543
|
* @since 4.0.0
|
|
5363
5544
|
*/
|
|
5364
5545
|
export declare function isIncludes(includes: string, annotations?: Annotations.Filter): SchemaAST.Filter<string>;
|
|
5546
|
+
/**
|
|
5547
|
+
* Reviver for persisted `isIncludes` checks.
|
|
5548
|
+
*
|
|
5549
|
+
* **When to use**
|
|
5550
|
+
*
|
|
5551
|
+
* Use when reconstructing documents that may contain checks created by {@link isIncludes}.
|
|
5552
|
+
*
|
|
5553
|
+
* @see {@link isIncludes} for creating the corresponding check
|
|
5554
|
+
*
|
|
5555
|
+
* @category String checks
|
|
5556
|
+
* @since 4.0.0
|
|
5557
|
+
*/
|
|
5558
|
+
export declare const isIncludesReviver: SchemaRepresentation.FilterReviver<{
|
|
5559
|
+
readonly includes: string;
|
|
5560
|
+
}>;
|
|
5365
5561
|
/**
|
|
5366
5562
|
* Validates that a string is unchanged by JavaScript's `toUpperCase()`.
|
|
5367
5563
|
*
|
|
@@ -5375,6 +5571,19 @@ export declare function isIncludes(includes: string, annotations?: Annotations.F
|
|
|
5375
5571
|
* @since 4.0.0
|
|
5376
5572
|
*/
|
|
5377
5573
|
export declare function isUppercased(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
|
|
5574
|
+
/**
|
|
5575
|
+
* Reviver for persisted `isUppercased` checks.
|
|
5576
|
+
*
|
|
5577
|
+
* **When to use**
|
|
5578
|
+
*
|
|
5579
|
+
* Use when reconstructing documents that may contain checks created by {@link isUppercased}.
|
|
5580
|
+
*
|
|
5581
|
+
* @see {@link isUppercased} for creating the corresponding check
|
|
5582
|
+
*
|
|
5583
|
+
* @category String checks
|
|
5584
|
+
* @since 4.0.0
|
|
5585
|
+
*/
|
|
5586
|
+
export declare const isUppercasedReviver: SchemaRepresentation.FilterReviver<null>;
|
|
5378
5587
|
/**
|
|
5379
5588
|
* Validates that a string is unchanged by JavaScript's `toLowerCase()`.
|
|
5380
5589
|
*
|
|
@@ -5388,6 +5597,19 @@ export declare function isUppercased(annotations?: Annotations.Filter): SchemaAS
|
|
|
5388
5597
|
* @since 4.0.0
|
|
5389
5598
|
*/
|
|
5390
5599
|
export declare function isLowercased(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
|
|
5600
|
+
/**
|
|
5601
|
+
* Reviver for persisted `isLowercased` checks.
|
|
5602
|
+
*
|
|
5603
|
+
* **When to use**
|
|
5604
|
+
*
|
|
5605
|
+
* Use when reconstructing documents that may contain checks created by {@link isLowercased}.
|
|
5606
|
+
*
|
|
5607
|
+
* @see {@link isLowercased} for creating the corresponding check
|
|
5608
|
+
*
|
|
5609
|
+
* @category String checks
|
|
5610
|
+
* @since 4.0.0
|
|
5611
|
+
*/
|
|
5612
|
+
export declare const isLowercasedReviver: SchemaRepresentation.FilterReviver<null>;
|
|
5391
5613
|
/**
|
|
5392
5614
|
* Validates that the first character of a string is unchanged by
|
|
5393
5615
|
* `toUpperCase()`.
|
|
@@ -5401,6 +5623,19 @@ export declare function isLowercased(annotations?: Annotations.Filter): SchemaAS
|
|
|
5401
5623
|
* @since 4.0.0
|
|
5402
5624
|
*/
|
|
5403
5625
|
export declare function isCapitalized(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
|
|
5626
|
+
/**
|
|
5627
|
+
* Reviver for persisted `isCapitalized` checks.
|
|
5628
|
+
*
|
|
5629
|
+
* **When to use**
|
|
5630
|
+
*
|
|
5631
|
+
* Use when reconstructing documents that may contain checks created by {@link isCapitalized}.
|
|
5632
|
+
*
|
|
5633
|
+
* @see {@link isCapitalized} for creating the corresponding check
|
|
5634
|
+
*
|
|
5635
|
+
* @category String checks
|
|
5636
|
+
* @since 4.0.0
|
|
5637
|
+
*/
|
|
5638
|
+
export declare const isCapitalizedReviver: SchemaRepresentation.FilterReviver<null>;
|
|
5404
5639
|
/**
|
|
5405
5640
|
* Validates that the first character of a string is unchanged by
|
|
5406
5641
|
* `toLowerCase()`.
|
|
@@ -5414,6 +5649,35 @@ export declare function isCapitalized(annotations?: Annotations.Filter): SchemaA
|
|
|
5414
5649
|
* @since 4.0.0
|
|
5415
5650
|
*/
|
|
5416
5651
|
export declare function isUncapitalized(annotations?: Annotations.Filter): SchemaAST.Filter<string>;
|
|
5652
|
+
/**
|
|
5653
|
+
* Reviver for persisted `isUncapitalized` checks.
|
|
5654
|
+
*
|
|
5655
|
+
* **When to use**
|
|
5656
|
+
*
|
|
5657
|
+
* Use when reconstructing documents that may contain checks created by {@link isUncapitalized}.
|
|
5658
|
+
*
|
|
5659
|
+
* @see {@link isUncapitalized} for creating the corresponding check
|
|
5660
|
+
*
|
|
5661
|
+
* @category String checks
|
|
5662
|
+
* @since 4.0.0
|
|
5663
|
+
*/
|
|
5664
|
+
export declare const isUncapitalizedReviver: SchemaRepresentation.FilterReviver<null>;
|
|
5665
|
+
/**
|
|
5666
|
+
* Type-level representation of {@link Finite}.
|
|
5667
|
+
*
|
|
5668
|
+
* @category Number
|
|
5669
|
+
* @since 3.10.0
|
|
5670
|
+
*/
|
|
5671
|
+
export interface Finite extends Number {
|
|
5672
|
+
readonly "Rebuild": Finite;
|
|
5673
|
+
}
|
|
5674
|
+
/**
|
|
5675
|
+
* Schema for finite numbers, rejecting `NaN`, `Infinity`, and `-Infinity`.
|
|
5676
|
+
*
|
|
5677
|
+
* @category Number
|
|
5678
|
+
* @since 3.10.0
|
|
5679
|
+
*/
|
|
5680
|
+
export declare const Finite: Finite;
|
|
5417
5681
|
/**
|
|
5418
5682
|
* Validates that a number is finite (not `Infinity`, `-Infinity`, or `NaN`).
|
|
5419
5683
|
*
|
|
@@ -5432,7 +5696,20 @@ export declare function isUncapitalized(annotations?: Annotations.Filter): Schem
|
|
|
5432
5696
|
* @category Number checks
|
|
5433
5697
|
* @since 4.0.0
|
|
5434
5698
|
*/
|
|
5435
|
-
export declare
|
|
5699
|
+
export declare const isFinite: (annotations?: Annotations.Filter) => SchemaAST.Filter<number>;
|
|
5700
|
+
/**
|
|
5701
|
+
* Reviver for persisted `isFinite` checks.
|
|
5702
|
+
*
|
|
5703
|
+
* **When to use**
|
|
5704
|
+
*
|
|
5705
|
+
* Use when reconstructing documents that may contain checks created by {@link isFinite}.
|
|
5706
|
+
*
|
|
5707
|
+
* @see {@link isFinite} for creating the corresponding check
|
|
5708
|
+
*
|
|
5709
|
+
* @category Number checks
|
|
5710
|
+
* @since 4.0.0
|
|
5711
|
+
*/
|
|
5712
|
+
export declare const isFiniteReviver: SchemaRepresentation.FilterReviver<null>;
|
|
5436
5713
|
/**
|
|
5437
5714
|
* Creates a greater-than (`>`) check for any ordered type from an
|
|
5438
5715
|
* `Order.Order` instance.
|
|
@@ -5535,6 +5812,21 @@ export declare function makeIsMultipleOf<T>(options: {
|
|
|
5535
5812
|
* @since 4.0.0
|
|
5536
5813
|
*/
|
|
5537
5814
|
export declare const isGreaterThan: (exclusiveMinimum: number, annotations?: Annotations.Filter) => SchemaAST.Filter<number>;
|
|
5815
|
+
/**
|
|
5816
|
+
* Reviver for persisted `isGreaterThan` checks.
|
|
5817
|
+
*
|
|
5818
|
+
* **When to use**
|
|
5819
|
+
*
|
|
5820
|
+
* Use when reconstructing documents that may contain checks created by {@link isGreaterThan}.
|
|
5821
|
+
*
|
|
5822
|
+
* @see {@link isGreaterThan} for creating the corresponding check
|
|
5823
|
+
*
|
|
5824
|
+
* @category Number checks
|
|
5825
|
+
* @since 4.0.0
|
|
5826
|
+
*/
|
|
5827
|
+
export declare const isGreaterThanReviver: SchemaRepresentation.FilterReviver<{
|
|
5828
|
+
readonly exclusiveMinimum: number;
|
|
5829
|
+
}>;
|
|
5538
5830
|
/**
|
|
5539
5831
|
* Validates that a number is greater than or equal to the specified value
|
|
5540
5832
|
* (inclusive).
|
|
@@ -5554,6 +5846,21 @@ export declare const isGreaterThan: (exclusiveMinimum: number, annotations?: Ann
|
|
|
5554
5846
|
* @since 4.0.0
|
|
5555
5847
|
*/
|
|
5556
5848
|
export declare const isGreaterThanOrEqualTo: (minimum: number, annotations?: Annotations.Filter) => SchemaAST.Filter<number>;
|
|
5849
|
+
/**
|
|
5850
|
+
* Reviver for persisted `isGreaterThanOrEqualTo` checks.
|
|
5851
|
+
*
|
|
5852
|
+
* **When to use**
|
|
5853
|
+
*
|
|
5854
|
+
* Use when reconstructing documents that may contain checks created by {@link isGreaterThanOrEqualTo}.
|
|
5855
|
+
*
|
|
5856
|
+
* @see {@link isGreaterThanOrEqualTo} for creating the corresponding check
|
|
5857
|
+
*
|
|
5858
|
+
* @category Number checks
|
|
5859
|
+
* @since 4.0.0
|
|
5860
|
+
*/
|
|
5861
|
+
export declare const isGreaterThanOrEqualToReviver: SchemaRepresentation.FilterReviver<{
|
|
5862
|
+
readonly minimum: number;
|
|
5863
|
+
}>;
|
|
5557
5864
|
/**
|
|
5558
5865
|
* Validates that a number is less than the specified value (exclusive).
|
|
5559
5866
|
*
|
|
@@ -5574,24 +5881,54 @@ export declare const isGreaterThanOrEqualTo: (minimum: number, annotations?: Ann
|
|
|
5574
5881
|
*/
|
|
5575
5882
|
export declare const isLessThan: (exclusiveMaximum: number, annotations?: Annotations.Filter) => SchemaAST.Filter<number>;
|
|
5576
5883
|
/**
|
|
5577
|
-
*
|
|
5578
|
-
* (inclusive).
|
|
5579
|
-
*
|
|
5580
|
-
* **Details**
|
|
5884
|
+
* Reviver for persisted `isLessThan` checks.
|
|
5581
5885
|
*
|
|
5582
|
-
*
|
|
5886
|
+
* **When to use**
|
|
5583
5887
|
*
|
|
5584
|
-
*
|
|
5888
|
+
* Use when reconstructing documents that may contain checks created by {@link isLessThan}.
|
|
5585
5889
|
*
|
|
5586
|
-
*
|
|
5890
|
+
* @see {@link isLessThan} for creating the corresponding check
|
|
5587
5891
|
*
|
|
5588
|
-
*
|
|
5892
|
+
* @category Number checks
|
|
5893
|
+
* @since 4.0.0
|
|
5894
|
+
*/
|
|
5895
|
+
export declare const isLessThanReviver: SchemaRepresentation.FilterReviver<{
|
|
5896
|
+
readonly exclusiveMaximum: number;
|
|
5897
|
+
}>;
|
|
5898
|
+
/**
|
|
5899
|
+
* Validates that a number is less than or equal to the specified value
|
|
5900
|
+
* (inclusive).
|
|
5901
|
+
*
|
|
5902
|
+
* **Details**
|
|
5903
|
+
*
|
|
5904
|
+
* JSON Schema:
|
|
5905
|
+
*
|
|
5906
|
+
* This check corresponds to the `maximum` constraint in JSON Schema.
|
|
5907
|
+
*
|
|
5908
|
+
* Arbitrary:
|
|
5909
|
+
*
|
|
5910
|
+
* When generating test data with fast-check, this applies a `maximum` constraint
|
|
5589
5911
|
* to ensure generated numbers are less than or equal to the specified value.
|
|
5590
5912
|
*
|
|
5591
5913
|
* @category Number checks
|
|
5592
5914
|
* @since 4.0.0
|
|
5593
5915
|
*/
|
|
5594
5916
|
export declare const isLessThanOrEqualTo: (maximum: number, annotations?: Annotations.Filter) => SchemaAST.Filter<number>;
|
|
5917
|
+
/**
|
|
5918
|
+
* Reviver for persisted `isLessThanOrEqualTo` checks.
|
|
5919
|
+
*
|
|
5920
|
+
* **When to use**
|
|
5921
|
+
*
|
|
5922
|
+
* Use when reconstructing documents that may contain checks created by {@link isLessThanOrEqualTo}.
|
|
5923
|
+
*
|
|
5924
|
+
* @see {@link isLessThanOrEqualTo} for creating the corresponding check
|
|
5925
|
+
*
|
|
5926
|
+
* @category Number checks
|
|
5927
|
+
* @since 4.0.0
|
|
5928
|
+
*/
|
|
5929
|
+
export declare const isLessThanOrEqualToReviver: SchemaRepresentation.FilterReviver<{
|
|
5930
|
+
readonly maximum: number;
|
|
5931
|
+
}>;
|
|
5595
5932
|
/**
|
|
5596
5933
|
* Validates that a number is within a specified range. The range boundaries can
|
|
5597
5934
|
* be inclusive or exclusive based on the provided options.
|
|
@@ -5619,6 +5956,24 @@ export declare const isBetween: (options: {
|
|
|
5619
5956
|
readonly exclusiveMinimum?: boolean | undefined;
|
|
5620
5957
|
readonly exclusiveMaximum?: boolean | undefined;
|
|
5621
5958
|
}, annotations?: Annotations.Filter) => SchemaAST.Filter<number>;
|
|
5959
|
+
/**
|
|
5960
|
+
* Reviver for persisted `isBetween` checks.
|
|
5961
|
+
*
|
|
5962
|
+
* **When to use**
|
|
5963
|
+
*
|
|
5964
|
+
* Use when reconstructing documents that may contain checks created by {@link isBetween}.
|
|
5965
|
+
*
|
|
5966
|
+
* @see {@link isBetween} for creating the corresponding check
|
|
5967
|
+
*
|
|
5968
|
+
* @category Number checks
|
|
5969
|
+
* @since 4.0.0
|
|
5970
|
+
*/
|
|
5971
|
+
export declare const isBetweenReviver: SchemaRepresentation.FilterReviver<{
|
|
5972
|
+
readonly minimum: number;
|
|
5973
|
+
readonly maximum: number;
|
|
5974
|
+
readonly exclusiveMinimum?: true | undefined;
|
|
5975
|
+
readonly exclusiveMaximum?: true | undefined;
|
|
5976
|
+
}>;
|
|
5622
5977
|
/**
|
|
5623
5978
|
* Validates that a number is a multiple of the specified divisor.
|
|
5624
5979
|
*
|
|
@@ -5637,6 +5992,21 @@ export declare const isBetween: (options: {
|
|
|
5637
5992
|
* @since 4.0.0
|
|
5638
5993
|
*/
|
|
5639
5994
|
export declare const isMultipleOf: (divisor: number, annotations?: Annotations.Filter) => SchemaAST.Filter<number>;
|
|
5995
|
+
/**
|
|
5996
|
+
* Reviver for persisted `isMultipleOf` checks.
|
|
5997
|
+
*
|
|
5998
|
+
* **When to use**
|
|
5999
|
+
*
|
|
6000
|
+
* Use when reconstructing documents that may contain checks created by {@link isMultipleOf}.
|
|
6001
|
+
*
|
|
6002
|
+
* @see {@link isMultipleOf} for creating the corresponding check
|
|
6003
|
+
*
|
|
6004
|
+
* @category Number checks
|
|
6005
|
+
* @since 4.0.0
|
|
6006
|
+
*/
|
|
6007
|
+
export declare const isMultipleOfReviver: SchemaRepresentation.FilterReviver<{
|
|
6008
|
+
readonly divisor: number;
|
|
6009
|
+
}>;
|
|
5640
6010
|
/**
|
|
5641
6011
|
* Validates that a number is a safe integer (within the safe integer range
|
|
5642
6012
|
* that can be exactly represented in JavaScript).
|
|
@@ -5656,6 +6026,57 @@ export declare const isMultipleOf: (divisor: number, annotations?: Annotations.F
|
|
|
5656
6026
|
* @since 4.0.0
|
|
5657
6027
|
*/
|
|
5658
6028
|
export declare function isInt(annotations?: Annotations.Filter): SchemaAST.Filter<number>;
|
|
6029
|
+
/**
|
|
6030
|
+
* Reviver for persisted `isInt` checks.
|
|
6031
|
+
*
|
|
6032
|
+
* **When to use**
|
|
6033
|
+
*
|
|
6034
|
+
* Use when reconstructing documents that may contain checks created by {@link isInt}.
|
|
6035
|
+
*
|
|
6036
|
+
* @see {@link isInt} for creating the corresponding check
|
|
6037
|
+
*
|
|
6038
|
+
* @category Integer checks
|
|
6039
|
+
* @since 4.0.0
|
|
6040
|
+
*/
|
|
6041
|
+
export declare const isIntReviver: SchemaRepresentation.FilterReviver<null>;
|
|
6042
|
+
/**
|
|
6043
|
+
* Type-level representation of {@link Int}.
|
|
6044
|
+
*
|
|
6045
|
+
* @category Number
|
|
6046
|
+
* @since 3.10.0
|
|
6047
|
+
*/
|
|
6048
|
+
export interface Int extends Number {
|
|
6049
|
+
readonly "Rebuild": Int;
|
|
6050
|
+
}
|
|
6051
|
+
/**
|
|
6052
|
+
* Schema for integers, rejecting `NaN`, `Infinity`, and `-Infinity`.
|
|
6053
|
+
*
|
|
6054
|
+
* @category Number
|
|
6055
|
+
* @since 3.10.0
|
|
6056
|
+
*/
|
|
6057
|
+
export declare const Int: Int;
|
|
6058
|
+
/**
|
|
6059
|
+
* Type-level representation of {@link Natural}.
|
|
6060
|
+
*
|
|
6061
|
+
* @category Number
|
|
6062
|
+
* @since 4.0.0
|
|
6063
|
+
*/
|
|
6064
|
+
export interface Natural extends Int {
|
|
6065
|
+
readonly "Rebuild": Natural;
|
|
6066
|
+
}
|
|
6067
|
+
/**
|
|
6068
|
+
* Schema for non-negative safe integers, including zero.
|
|
6069
|
+
*
|
|
6070
|
+
* **When to use**
|
|
6071
|
+
*
|
|
6072
|
+
* Use when you need a count, index, or size that cannot be negative.
|
|
6073
|
+
*
|
|
6074
|
+
* @see {@link Int} for safe integers that may be negative
|
|
6075
|
+
*
|
|
6076
|
+
* @category Number
|
|
6077
|
+
* @since 4.0.0
|
|
6078
|
+
*/
|
|
6079
|
+
export declare const Natural: Natural;
|
|
5659
6080
|
/**
|
|
5660
6081
|
* Validates that a number is a 32-bit signed integer (range: -2,147,483,648 to
|
|
5661
6082
|
* 2,147,483,647).
|
|
@@ -5696,26 +6117,6 @@ export declare function isInt32(annotations?: Annotations.Filter): SchemaAST.Fil
|
|
|
5696
6117
|
* @since 4.0.0
|
|
5697
6118
|
*/
|
|
5698
6119
|
export declare function isUint32(annotations?: Annotations.Filter): SchemaAST.FilterGroup<number>;
|
|
5699
|
-
/**
|
|
5700
|
-
* Validates that a Date object represents a valid date (not an invalid date
|
|
5701
|
-
* like `new Date("invalid")`).
|
|
5702
|
-
*
|
|
5703
|
-
* **Details**
|
|
5704
|
-
*
|
|
5705
|
-
* JSON Schema:
|
|
5706
|
-
*
|
|
5707
|
-
* This check does not have a direct JSON Schema equivalent, as JSON Schema
|
|
5708
|
-
* validates date strings, not Date objects.
|
|
5709
|
-
*
|
|
5710
|
-
* Arbitrary:
|
|
5711
|
-
*
|
|
5712
|
-
* When generating test data with fast-check, this applies a `valid: true`
|
|
5713
|
-
* constraint to ensure generated Date objects are valid.
|
|
5714
|
-
*
|
|
5715
|
-
* @category Date checks
|
|
5716
|
-
* @since 4.0.0
|
|
5717
|
-
*/
|
|
5718
|
-
export declare function isDateValid(annotations?: Annotations.Filter): SchemaAST.Filter<globalThis.Date>;
|
|
5719
6120
|
/**
|
|
5720
6121
|
* Validates that a Date is greater than the specified value (exclusive).
|
|
5721
6122
|
*
|
|
@@ -5976,6 +6377,21 @@ export declare const isBetweenBigDecimal: (options: {
|
|
|
5976
6377
|
export declare function isMinLength(minLength: number, annotations?: Annotations.Filter): SchemaAST.Filter<{
|
|
5977
6378
|
readonly length: number;
|
|
5978
6379
|
}>;
|
|
6380
|
+
/**
|
|
6381
|
+
* Reviver for persisted `isMinLength` checks.
|
|
6382
|
+
*
|
|
6383
|
+
* **When to use**
|
|
6384
|
+
*
|
|
6385
|
+
* Use when reconstructing documents that may contain checks created by {@link isMinLength}.
|
|
6386
|
+
*
|
|
6387
|
+
* @see {@link isMinLength} for creating the corresponding check
|
|
6388
|
+
*
|
|
6389
|
+
* @category Length checks
|
|
6390
|
+
* @since 4.0.0
|
|
6391
|
+
*/
|
|
6392
|
+
export declare const isMinLengthReviver: SchemaRepresentation.FilterReviver<{
|
|
6393
|
+
readonly minLength: number;
|
|
6394
|
+
}>;
|
|
5979
6395
|
/**
|
|
5980
6396
|
* Validates that a value has at least one element. Works with strings and arrays.
|
|
5981
6397
|
* This is equivalent to `isMinLength(1)`.
|
|
@@ -6021,6 +6437,21 @@ export declare function isNonEmpty(annotations?: Annotations.Filter): SchemaAST.
|
|
|
6021
6437
|
export declare function isMaxLength(maxLength: number, annotations?: Annotations.Filter): SchemaAST.Filter<{
|
|
6022
6438
|
readonly length: number;
|
|
6023
6439
|
}>;
|
|
6440
|
+
/**
|
|
6441
|
+
* Reviver for persisted `isMaxLength` checks.
|
|
6442
|
+
*
|
|
6443
|
+
* **When to use**
|
|
6444
|
+
*
|
|
6445
|
+
* Use when reconstructing documents that may contain checks created by {@link isMaxLength}.
|
|
6446
|
+
*
|
|
6447
|
+
* @see {@link isMaxLength} for creating the corresponding check
|
|
6448
|
+
*
|
|
6449
|
+
* @category Length checks
|
|
6450
|
+
* @since 4.0.0
|
|
6451
|
+
*/
|
|
6452
|
+
export declare const isMaxLengthReviver: SchemaRepresentation.FilterReviver<{
|
|
6453
|
+
readonly maxLength: number;
|
|
6454
|
+
}>;
|
|
6024
6455
|
/**
|
|
6025
6456
|
* Validates that a value's length is within the specified range. Works with
|
|
6026
6457
|
* strings and arrays.
|
|
@@ -6044,6 +6475,22 @@ export declare function isMaxLength(maxLength: number, annotations?: Annotations
|
|
|
6044
6475
|
export declare function isLengthBetween(minimum: number, maximum: number, annotations?: Annotations.Filter): SchemaAST.Filter<{
|
|
6045
6476
|
readonly length: number;
|
|
6046
6477
|
}>;
|
|
6478
|
+
/**
|
|
6479
|
+
* Reviver for persisted `isLengthBetween` checks.
|
|
6480
|
+
*
|
|
6481
|
+
* **When to use**
|
|
6482
|
+
*
|
|
6483
|
+
* Use when reconstructing documents that may contain checks created by {@link isLengthBetween}.
|
|
6484
|
+
*
|
|
6485
|
+
* @see {@link isLengthBetween} for creating the corresponding check
|
|
6486
|
+
*
|
|
6487
|
+
* @category Length checks
|
|
6488
|
+
* @since 4.0.0
|
|
6489
|
+
*/
|
|
6490
|
+
export declare const isLengthBetweenReviver: SchemaRepresentation.FilterReviver<{
|
|
6491
|
+
readonly minimum: number;
|
|
6492
|
+
readonly maximum: number;
|
|
6493
|
+
}>;
|
|
6047
6494
|
/**
|
|
6048
6495
|
* Validates that a value has at least the specified size. Works with values
|
|
6049
6496
|
* that have a `size` property, such as `Set` or `Map`.
|
|
@@ -6067,6 +6514,21 @@ export declare function isLengthBetween(minimum: number, maximum: number, annota
|
|
|
6067
6514
|
export declare function isMinSize(minSize: number, annotations?: Annotations.Filter): SchemaAST.Filter<{
|
|
6068
6515
|
readonly size: number;
|
|
6069
6516
|
}>;
|
|
6517
|
+
/**
|
|
6518
|
+
* Reviver for persisted `isMinSize` checks.
|
|
6519
|
+
*
|
|
6520
|
+
* **When to use**
|
|
6521
|
+
*
|
|
6522
|
+
* Use when reconstructing documents that may contain checks created by {@link isMinSize}.
|
|
6523
|
+
*
|
|
6524
|
+
* @see {@link isMinSize} for creating the corresponding check
|
|
6525
|
+
*
|
|
6526
|
+
* @category Size checks
|
|
6527
|
+
* @since 4.0.0
|
|
6528
|
+
*/
|
|
6529
|
+
export declare const isMinSizeReviver: SchemaRepresentation.FilterReviver<{
|
|
6530
|
+
readonly minSize: number;
|
|
6531
|
+
}>;
|
|
6070
6532
|
/**
|
|
6071
6533
|
* Validates that a value has at most the specified size. Works with values
|
|
6072
6534
|
* that have a `size` property, such as `Set` or `Map`.
|
|
@@ -6090,6 +6552,21 @@ export declare function isMinSize(minSize: number, annotations?: Annotations.Fil
|
|
|
6090
6552
|
export declare function isMaxSize(maxSize: number, annotations?: Annotations.Filter): SchemaAST.Filter<{
|
|
6091
6553
|
readonly size: number;
|
|
6092
6554
|
}>;
|
|
6555
|
+
/**
|
|
6556
|
+
* Reviver for persisted `isMaxSize` checks.
|
|
6557
|
+
*
|
|
6558
|
+
* **When to use**
|
|
6559
|
+
*
|
|
6560
|
+
* Use when reconstructing documents that may contain checks created by {@link isMaxSize}.
|
|
6561
|
+
*
|
|
6562
|
+
* @see {@link isMaxSize} for creating the corresponding check
|
|
6563
|
+
*
|
|
6564
|
+
* @category Size checks
|
|
6565
|
+
* @since 4.0.0
|
|
6566
|
+
*/
|
|
6567
|
+
export declare const isMaxSizeReviver: SchemaRepresentation.FilterReviver<{
|
|
6568
|
+
readonly maxSize: number;
|
|
6569
|
+
}>;
|
|
6093
6570
|
/**
|
|
6094
6571
|
* Validates that a value's size is within the specified range. Works with
|
|
6095
6572
|
* values that have a `size` property, such as `Set` or `Map`.
|
|
@@ -6113,6 +6590,22 @@ export declare function isMaxSize(maxSize: number, annotations?: Annotations.Fil
|
|
|
6113
6590
|
export declare function isSizeBetween(minimum: number, maximum: number, annotations?: Annotations.Filter): SchemaAST.Filter<{
|
|
6114
6591
|
readonly size: number;
|
|
6115
6592
|
}>;
|
|
6593
|
+
/**
|
|
6594
|
+
* Reviver for persisted `isSizeBetween` checks.
|
|
6595
|
+
*
|
|
6596
|
+
* **When to use**
|
|
6597
|
+
*
|
|
6598
|
+
* Use when reconstructing documents that may contain checks created by {@link isSizeBetween}.
|
|
6599
|
+
*
|
|
6600
|
+
* @see {@link isSizeBetween} for creating the corresponding check
|
|
6601
|
+
*
|
|
6602
|
+
* @category Size checks
|
|
6603
|
+
* @since 4.0.0
|
|
6604
|
+
*/
|
|
6605
|
+
export declare const isSizeBetweenReviver: SchemaRepresentation.FilterReviver<{
|
|
6606
|
+
readonly minimum: number;
|
|
6607
|
+
readonly maximum: number;
|
|
6608
|
+
}>;
|
|
6116
6609
|
/**
|
|
6117
6610
|
* Validates that an object contains at least the specified number of
|
|
6118
6611
|
* properties. This includes both string and symbol keys when counting
|
|
@@ -6134,6 +6627,21 @@ export declare function isSizeBetween(minimum: number, maximum: number, annotati
|
|
|
6134
6627
|
* @since 4.0.0
|
|
6135
6628
|
*/
|
|
6136
6629
|
export declare function isMinProperties(minProperties: number, annotations?: Annotations.Filter): SchemaAST.Filter<object>;
|
|
6630
|
+
/**
|
|
6631
|
+
* Reviver for persisted `isMinProperties` checks.
|
|
6632
|
+
*
|
|
6633
|
+
* **When to use**
|
|
6634
|
+
*
|
|
6635
|
+
* Use when reconstructing documents that may contain checks created by {@link isMinProperties}.
|
|
6636
|
+
*
|
|
6637
|
+
* @see {@link isMinProperties} for creating the corresponding check
|
|
6638
|
+
*
|
|
6639
|
+
* @category Object checks
|
|
6640
|
+
* @since 4.0.0
|
|
6641
|
+
*/
|
|
6642
|
+
export declare const isMinPropertiesReviver: SchemaRepresentation.FilterReviver<{
|
|
6643
|
+
readonly minProperties: number;
|
|
6644
|
+
}>;
|
|
6137
6645
|
/**
|
|
6138
6646
|
* Validates that an object contains at most the specified number of properties.
|
|
6139
6647
|
* This includes both string and symbol keys when counting properties.
|
|
@@ -6154,6 +6662,21 @@ export declare function isMinProperties(minProperties: number, annotations?: Ann
|
|
|
6154
6662
|
* @since 4.0.0
|
|
6155
6663
|
*/
|
|
6156
6664
|
export declare function isMaxProperties(maxProperties: number, annotations?: Annotations.Filter): SchemaAST.Filter<object>;
|
|
6665
|
+
/**
|
|
6666
|
+
* Reviver for persisted `isMaxProperties` checks.
|
|
6667
|
+
*
|
|
6668
|
+
* **When to use**
|
|
6669
|
+
*
|
|
6670
|
+
* Use when reconstructing documents that may contain checks created by {@link isMaxProperties}.
|
|
6671
|
+
*
|
|
6672
|
+
* @see {@link isMaxProperties} for creating the corresponding check
|
|
6673
|
+
*
|
|
6674
|
+
* @category Object checks
|
|
6675
|
+
* @since 4.0.0
|
|
6676
|
+
*/
|
|
6677
|
+
export declare const isMaxPropertiesReviver: SchemaRepresentation.FilterReviver<{
|
|
6678
|
+
readonly maxProperties: number;
|
|
6679
|
+
}>;
|
|
6157
6680
|
/**
|
|
6158
6681
|
* Validates that an object contains between `minimum` and `maximum` properties (inclusive).
|
|
6159
6682
|
* This includes both string and symbol keys when counting properties.
|
|
@@ -6175,6 +6698,22 @@ export declare function isMaxProperties(maxProperties: number, annotations?: Ann
|
|
|
6175
6698
|
* @since 4.0.0
|
|
6176
6699
|
*/
|
|
6177
6700
|
export declare function isPropertiesLengthBetween(minimum: number, maximum: number, annotations?: Annotations.Filter): SchemaAST.Filter<object>;
|
|
6701
|
+
/**
|
|
6702
|
+
* Reviver for persisted `isPropertiesLengthBetween` checks.
|
|
6703
|
+
*
|
|
6704
|
+
* **When to use**
|
|
6705
|
+
*
|
|
6706
|
+
* Use when reconstructing documents that may contain checks created by {@link isPropertiesLengthBetween}.
|
|
6707
|
+
*
|
|
6708
|
+
* @see {@link isPropertiesLengthBetween} for creating the corresponding check
|
|
6709
|
+
*
|
|
6710
|
+
* @category Object checks
|
|
6711
|
+
* @since 4.0.0
|
|
6712
|
+
*/
|
|
6713
|
+
export declare const isPropertiesLengthBetweenReviver: SchemaRepresentation.FilterReviver<{
|
|
6714
|
+
readonly minimum: number;
|
|
6715
|
+
readonly maximum: number;
|
|
6716
|
+
}>;
|
|
6178
6717
|
/**
|
|
6179
6718
|
* Validates that every own property key of an object satisfies the encoded side
|
|
6180
6719
|
* of the provided key schema.
|
|
@@ -6192,6 +6731,19 @@ export declare function isPropertiesLengthBetween(minimum: number, maximum: numb
|
|
|
6192
6731
|
* @since 4.0.0
|
|
6193
6732
|
*/
|
|
6194
6733
|
export declare function isPropertyNames(keySchema: Constraint, annotations?: Annotations.Filter): SchemaAST.Filter<object>;
|
|
6734
|
+
/**
|
|
6735
|
+
* Reviver for persisted `isPropertyNames` checks.
|
|
6736
|
+
*
|
|
6737
|
+
* **When to use**
|
|
6738
|
+
*
|
|
6739
|
+
* Use when reconstructing documents that may contain checks created by {@link isPropertyNames}.
|
|
6740
|
+
*
|
|
6741
|
+
* @see {@link isPropertyNames} for creating the corresponding check
|
|
6742
|
+
*
|
|
6743
|
+
* @category Object checks
|
|
6744
|
+
* @since 4.0.0
|
|
6745
|
+
*/
|
|
6746
|
+
export declare const isPropertyNamesReviver: SchemaRepresentation.FilterReviver<null>;
|
|
6195
6747
|
/**
|
|
6196
6748
|
* Validates that all items in an array are unique according to Effect equality.
|
|
6197
6749
|
*
|
|
@@ -6209,6 +6761,19 @@ export declare function isPropertyNames(keySchema: Constraint, annotations?: Ann
|
|
|
6209
6761
|
* @since 4.0.0
|
|
6210
6762
|
*/
|
|
6211
6763
|
export declare function isUnique<T>(annotations?: Annotations.Filter): SchemaAST.Filter<readonly T[]>;
|
|
6764
|
+
/**
|
|
6765
|
+
* Reviver for persisted `isUnique` checks.
|
|
6766
|
+
*
|
|
6767
|
+
* **When to use**
|
|
6768
|
+
*
|
|
6769
|
+
* Use when reconstructing documents that may contain checks created by {@link isUnique}.
|
|
6770
|
+
*
|
|
6771
|
+
* @see {@link isUnique} for creating the corresponding check
|
|
6772
|
+
*
|
|
6773
|
+
* @category Array checks
|
|
6774
|
+
* @since 4.0.0
|
|
6775
|
+
*/
|
|
6776
|
+
export declare const isUniqueReviver: SchemaRepresentation.FilterReviver<null>;
|
|
6212
6777
|
/**
|
|
6213
6778
|
* Type-level representation of {@link NonEmptyString}.
|
|
6214
6779
|
*
|
|
@@ -6289,6 +6854,19 @@ export type OptionIso<A extends Constraint> = {
|
|
|
6289
6854
|
* @since 3.10.0
|
|
6290
6855
|
*/
|
|
6291
6856
|
export declare function Option<A extends Constraint>(value: A): Option<A>;
|
|
6857
|
+
/**
|
|
6858
|
+
* Reviver for persisted `Option` declarations.
|
|
6859
|
+
*
|
|
6860
|
+
* **When to use**
|
|
6861
|
+
*
|
|
6862
|
+
* Use when reconstructing documents that may contain schemas created by {@link Option}.
|
|
6863
|
+
*
|
|
6864
|
+
* @see {@link Option} for creating the corresponding schema
|
|
6865
|
+
*
|
|
6866
|
+
* @category Option
|
|
6867
|
+
* @since 4.0.0
|
|
6868
|
+
*/
|
|
6869
|
+
export declare const OptionReviver: SchemaRepresentation.DeclarationReviver<null>;
|
|
6292
6870
|
/**
|
|
6293
6871
|
* Type-level representation returned by {@link OptionFromNullOr}.
|
|
6294
6872
|
*
|
|
@@ -6463,6 +7041,19 @@ export type ResultIso<A extends Constraint, E extends Constraint> = {
|
|
|
6463
7041
|
* @since 4.0.0
|
|
6464
7042
|
*/
|
|
6465
7043
|
export declare function Result<A extends Constraint, E extends Constraint>(success: A, failure: E): Result<A, E>;
|
|
7044
|
+
/**
|
|
7045
|
+
* Reviver for persisted {@link Result} declarations.
|
|
7046
|
+
*
|
|
7047
|
+
* **When to use**
|
|
7048
|
+
*
|
|
7049
|
+
* Use when reconstructing documents that may contain schemas created by {@link Result}.
|
|
7050
|
+
*
|
|
7051
|
+
* @see {@link Result} for creating the corresponding schema
|
|
7052
|
+
*
|
|
7053
|
+
* @category schemas
|
|
7054
|
+
* @since 4.0.0
|
|
7055
|
+
*/
|
|
7056
|
+
export declare const ResultReviver: SchemaRepresentation.DeclarationReviver<null>;
|
|
6466
7057
|
/**
|
|
6467
7058
|
* Type-level representation returned by {@link Redacted}.
|
|
6468
7059
|
*
|
|
@@ -6473,6 +7064,12 @@ export interface Redacted<S extends Constraint> extends declareConstructor<Redac
|
|
|
6473
7064
|
readonly "Rebuild": Redacted<S>;
|
|
6474
7065
|
readonly value: S;
|
|
6475
7066
|
}
|
|
7067
|
+
type RedactedRepresentationOptions = {
|
|
7068
|
+
readonly label?: string | undefined;
|
|
7069
|
+
readonly disallowJsonEncode?: true | undefined;
|
|
7070
|
+
};
|
|
7071
|
+
type RedactedRepresentationPayload = RedactedRepresentationOptions | null;
|
|
7072
|
+
declare const RedactedRepresentationPayload: Decoder<RedactedRepresentationPayload>;
|
|
6476
7073
|
/**
|
|
6477
7074
|
* Schema for values that hide sensitive information from error output and
|
|
6478
7075
|
* inspection.
|
|
@@ -6501,6 +7098,19 @@ export declare function Redacted<S extends Constraint>(value: S, options?: {
|
|
|
6501
7098
|
readonly label?: string | undefined;
|
|
6502
7099
|
readonly disallowJsonEncode?: boolean | undefined;
|
|
6503
7100
|
}): Redacted<S>;
|
|
7101
|
+
/**
|
|
7102
|
+
* Reviver for persisted {@link Redacted} declarations.
|
|
7103
|
+
*
|
|
7104
|
+
* **When to use**
|
|
7105
|
+
*
|
|
7106
|
+
* Use when reconstructing documents that may contain schemas created by {@link Redacted}.
|
|
7107
|
+
*
|
|
7108
|
+
* @see {@link Redacted} for creating the corresponding schema
|
|
7109
|
+
*
|
|
7110
|
+
* @category Redacted
|
|
7111
|
+
* @since 4.0.0
|
|
7112
|
+
*/
|
|
7113
|
+
export declare const RedactedReviver: SchemaRepresentation.DeclarationReviver<RedactedRepresentationPayload>;
|
|
6504
7114
|
/**
|
|
6505
7115
|
* Type-level representation returned by {@link RedactedFromValue}.
|
|
6506
7116
|
*
|
|
@@ -6584,6 +7194,19 @@ export type CauseReasonIso<E extends Constraint, D extends Constraint> = {
|
|
|
6584
7194
|
* @since 4.0.0
|
|
6585
7195
|
*/
|
|
6586
7196
|
export declare function CauseReason<E extends Constraint, D extends Constraint>(error: E, defect: D): CauseReason<E, D>;
|
|
7197
|
+
/**
|
|
7198
|
+
* Reviver for persisted `CauseReason` declarations.
|
|
7199
|
+
*
|
|
7200
|
+
* **When to use**
|
|
7201
|
+
*
|
|
7202
|
+
* Use when reconstructing documents that may contain schemas created by {@link CauseReason}.
|
|
7203
|
+
*
|
|
7204
|
+
* @see {@link CauseReason} for creating the corresponding schema
|
|
7205
|
+
*
|
|
7206
|
+
* @category CauseReason
|
|
7207
|
+
* @since 4.0.0
|
|
7208
|
+
*/
|
|
7209
|
+
export declare const CauseReasonReviver: SchemaRepresentation.DeclarationReviver<null>;
|
|
6587
7210
|
/**
|
|
6588
7211
|
* Type-level representation returned by {@link Cause}.
|
|
6589
7212
|
*
|
|
@@ -6633,6 +7256,19 @@ export type CauseIso<E extends Constraint, D extends Constraint> = ReadonlyArray
|
|
|
6633
7256
|
* @since 3.10.0
|
|
6634
7257
|
*/
|
|
6635
7258
|
export declare function Cause<E extends Constraint, D extends Constraint>(error: E, defect: D): Cause<E, D>;
|
|
7259
|
+
/**
|
|
7260
|
+
* Reviver for persisted `Cause` declarations.
|
|
7261
|
+
*
|
|
7262
|
+
* **When to use**
|
|
7263
|
+
*
|
|
7264
|
+
* Use when reconstructing documents that may contain schemas created by {@link Cause}.
|
|
7265
|
+
*
|
|
7266
|
+
* @see {@link Cause} for creating the corresponding schema
|
|
7267
|
+
*
|
|
7268
|
+
* @category Cause
|
|
7269
|
+
* @since 4.0.0
|
|
7270
|
+
*/
|
|
7271
|
+
export declare const CauseReviver: SchemaRepresentation.DeclarationReviver<null>;
|
|
6636
7272
|
/**
|
|
6637
7273
|
* Type-level representation of {@link Error}.
|
|
6638
7274
|
*
|
|
@@ -6663,6 +7299,12 @@ export interface ErrorOptions {
|
|
|
6663
7299
|
*/
|
|
6664
7300
|
readonly excludeCause?: boolean | undefined;
|
|
6665
7301
|
}
|
|
7302
|
+
type ErrorRepresentationOptions = {
|
|
7303
|
+
readonly includeStack?: true | undefined;
|
|
7304
|
+
readonly excludeCause?: true | undefined;
|
|
7305
|
+
};
|
|
7306
|
+
type ErrorRepresentationPayload = ErrorRepresentationOptions | null;
|
|
7307
|
+
declare const ErrorRepresentationPayload: Decoder<ErrorRepresentationPayload>;
|
|
6666
7308
|
/**
|
|
6667
7309
|
* Schema for JavaScript `Error` objects.
|
|
6668
7310
|
*
|
|
@@ -6679,6 +7321,19 @@ export interface ErrorOptions {
|
|
|
6679
7321
|
* @since 4.0.0
|
|
6680
7322
|
*/
|
|
6681
7323
|
export declare function Error(options?: ErrorOptions): Error;
|
|
7324
|
+
/**
|
|
7325
|
+
* Reviver for persisted {@link Error} declarations.
|
|
7326
|
+
*
|
|
7327
|
+
* **When to use**
|
|
7328
|
+
*
|
|
7329
|
+
* Use when reconstructing documents that may contain schemas created by {@link Error}.
|
|
7330
|
+
*
|
|
7331
|
+
* @see {@link Error} for creating the corresponding schema
|
|
7332
|
+
*
|
|
7333
|
+
* @category Error
|
|
7334
|
+
* @since 4.0.0
|
|
7335
|
+
*/
|
|
7336
|
+
export declare const ErrorReviver: SchemaRepresentation.DeclarationReviver<ErrorRepresentationPayload>;
|
|
6682
7337
|
/**
|
|
6683
7338
|
* Type-level representation of {@link Defect}.
|
|
6684
7339
|
*
|
|
@@ -6773,6 +7428,19 @@ export type ExitIso<A extends Constraint, E extends Constraint, D extends Constr
|
|
|
6773
7428
|
* @since 3.10.0
|
|
6774
7429
|
*/
|
|
6775
7430
|
export declare function Exit<A extends Constraint, E extends Constraint, D extends Constraint>(value: A, error: E, defect: D): Exit<A, E, D>;
|
|
7431
|
+
/**
|
|
7432
|
+
* Reviver for persisted `Exit` declarations.
|
|
7433
|
+
*
|
|
7434
|
+
* **When to use**
|
|
7435
|
+
*
|
|
7436
|
+
* Use when reconstructing documents that may contain schemas created by {@link Exit}.
|
|
7437
|
+
*
|
|
7438
|
+
* @see {@link Exit} for creating the corresponding schema
|
|
7439
|
+
*
|
|
7440
|
+
* @category Exit
|
|
7441
|
+
* @since 4.0.0
|
|
7442
|
+
*/
|
|
7443
|
+
export declare const ExitReviver: SchemaRepresentation.DeclarationReviver<null>;
|
|
6776
7444
|
/**
|
|
6777
7445
|
* Type-level representation returned by {@link ReadonlyMap}.
|
|
6778
7446
|
*
|
|
@@ -6800,6 +7468,19 @@ export type ReadonlyMapIso<Key extends Constraint, Value extends Constraint> = R
|
|
|
6800
7468
|
* @since 3.10.0
|
|
6801
7469
|
*/
|
|
6802
7470
|
export declare function ReadonlyMap<Key extends Constraint, Value extends Constraint>(key: Key, value: Value): $ReadonlyMap<Key, Value>;
|
|
7471
|
+
/**
|
|
7472
|
+
* Reviver for persisted {@link ReadonlyMap} declarations.
|
|
7473
|
+
*
|
|
7474
|
+
* **When to use**
|
|
7475
|
+
*
|
|
7476
|
+
* Use when reconstructing documents that may contain schemas created by {@link ReadonlyMap}.
|
|
7477
|
+
*
|
|
7478
|
+
* @see {@link ReadonlyMap} for creating the corresponding schema
|
|
7479
|
+
*
|
|
7480
|
+
* @category ReadonlyMap
|
|
7481
|
+
* @since 4.0.0
|
|
7482
|
+
*/
|
|
7483
|
+
export declare const ReadonlyMapReviver: SchemaRepresentation.DeclarationReviver<null>;
|
|
6803
7484
|
/**
|
|
6804
7485
|
* Type-level representation returned by {@link HashMap}.
|
|
6805
7486
|
*
|
|
@@ -6826,6 +7507,19 @@ export type HashMapIso<Key extends Constraint, Value extends Constraint> = Reado
|
|
|
6826
7507
|
* @since 3.10.0
|
|
6827
7508
|
*/
|
|
6828
7509
|
export declare function HashMap<Key extends Constraint, Value extends Constraint>(key: Key, value: Value): HashMap<Key, Value>;
|
|
7510
|
+
/**
|
|
7511
|
+
* Reviver for persisted `HashMap` declarations.
|
|
7512
|
+
*
|
|
7513
|
+
* **When to use**
|
|
7514
|
+
*
|
|
7515
|
+
* Use when reconstructing documents that may contain schemas created by {@link HashMap}.
|
|
7516
|
+
*
|
|
7517
|
+
* @see {@link HashMap} for creating the corresponding schema
|
|
7518
|
+
*
|
|
7519
|
+
* @category HashMap
|
|
7520
|
+
* @since 4.0.0
|
|
7521
|
+
*/
|
|
7522
|
+
export declare const HashMapReviver: SchemaRepresentation.DeclarationReviver<null>;
|
|
6829
7523
|
/**
|
|
6830
7524
|
* Type-level representation returned by {@link ReadonlySet}.
|
|
6831
7525
|
*
|
|
@@ -6851,6 +7545,19 @@ export type ReadonlySetIso<Value extends Constraint> = ReadonlyArray<Value["Iso"
|
|
|
6851
7545
|
* @since 3.10.0
|
|
6852
7546
|
*/
|
|
6853
7547
|
export declare function ReadonlySet<Value extends Constraint>(value: Value): $ReadonlySet<Value>;
|
|
7548
|
+
/**
|
|
7549
|
+
* Reviver for persisted {@link ReadonlySet} declarations.
|
|
7550
|
+
*
|
|
7551
|
+
* **When to use**
|
|
7552
|
+
*
|
|
7553
|
+
* Use when reconstructing documents that may contain schemas created by {@link ReadonlySet}.
|
|
7554
|
+
*
|
|
7555
|
+
* @see {@link ReadonlySet} for creating the corresponding schema
|
|
7556
|
+
*
|
|
7557
|
+
* @category ReadonlySet
|
|
7558
|
+
* @since 4.0.0
|
|
7559
|
+
*/
|
|
7560
|
+
export declare const ReadonlySetReviver: SchemaRepresentation.DeclarationReviver<null>;
|
|
6854
7561
|
/**
|
|
6855
7562
|
* Type-level representation returned by {@link HashSet}.
|
|
6856
7563
|
*
|
|
@@ -6876,6 +7583,19 @@ export type HashSetIso<Value extends Constraint> = ReadonlyArray<Value["Iso"]>;
|
|
|
6876
7583
|
* @since 3.10.0
|
|
6877
7584
|
*/
|
|
6878
7585
|
export declare function HashSet<Value extends Constraint>(value: Value): HashSet<Value>;
|
|
7586
|
+
/**
|
|
7587
|
+
* Reviver for persisted `HashSet` declarations.
|
|
7588
|
+
*
|
|
7589
|
+
* **When to use**
|
|
7590
|
+
*
|
|
7591
|
+
* Use when reconstructing documents that may contain schemas created by {@link HashSet}.
|
|
7592
|
+
*
|
|
7593
|
+
* @see {@link HashSet} for creating the corresponding schema
|
|
7594
|
+
*
|
|
7595
|
+
* @category HashSet
|
|
7596
|
+
* @since 4.0.0
|
|
7597
|
+
*/
|
|
7598
|
+
export declare const HashSetReviver: SchemaRepresentation.DeclarationReviver<null>;
|
|
6879
7599
|
/**
|
|
6880
7600
|
* Type-level representation returned by {@link Chunk}.
|
|
6881
7601
|
*
|
|
@@ -6908,6 +7628,19 @@ export type ChunkIso<Value extends Constraint> = ReadonlyArray<Value["Iso"]>;
|
|
|
6908
7628
|
* @since 3.10.0
|
|
6909
7629
|
*/
|
|
6910
7630
|
export declare function Chunk<Value extends Constraint>(value: Value): Chunk<Value>;
|
|
7631
|
+
/**
|
|
7632
|
+
* Reviver for persisted {@link Chunk} declarations.
|
|
7633
|
+
*
|
|
7634
|
+
* **When to use**
|
|
7635
|
+
*
|
|
7636
|
+
* Use when reconstructing documents that may contain schemas created by {@link Chunk}.
|
|
7637
|
+
*
|
|
7638
|
+
* @see {@link Chunk} for creating the corresponding schema
|
|
7639
|
+
*
|
|
7640
|
+
* @category Chunk
|
|
7641
|
+
* @since 4.0.0
|
|
7642
|
+
*/
|
|
7643
|
+
export declare const ChunkReviver: SchemaRepresentation.DeclarationReviver<null>;
|
|
6911
7644
|
/**
|
|
6912
7645
|
* Type-level representation of {@link RegExp}.
|
|
6913
7646
|
*
|
|
@@ -6928,6 +7661,19 @@ export interface RegExp extends instanceOf<globalThis.RegExp> {
|
|
|
6928
7661
|
* @since 4.0.0
|
|
6929
7662
|
*/
|
|
6930
7663
|
export declare const RegExp: RegExp;
|
|
7664
|
+
/**
|
|
7665
|
+
* Reviver for persisted `RegExp` declarations.
|
|
7666
|
+
*
|
|
7667
|
+
* **When to use**
|
|
7668
|
+
*
|
|
7669
|
+
* Use when reconstructing documents that may contain the {@link RegExp} schema.
|
|
7670
|
+
*
|
|
7671
|
+
* @see {@link RegExp} for the corresponding schema
|
|
7672
|
+
*
|
|
7673
|
+
* @category RegExp
|
|
7674
|
+
* @since 4.0.0
|
|
7675
|
+
*/
|
|
7676
|
+
export declare const RegExpReviver: SchemaRepresentation.DeclarationReviver<null>;
|
|
6931
7677
|
/**
|
|
6932
7678
|
* Type-level representation of {@link URL}.
|
|
6933
7679
|
*
|
|
@@ -6950,6 +7696,19 @@ export interface URL extends instanceOf<globalThis.URL> {
|
|
|
6950
7696
|
* @since 4.0.0
|
|
6951
7697
|
*/
|
|
6952
7698
|
export declare const URL: URL;
|
|
7699
|
+
/**
|
|
7700
|
+
* Reviver for persisted `URL` declarations.
|
|
7701
|
+
*
|
|
7702
|
+
* **When to use**
|
|
7703
|
+
*
|
|
7704
|
+
* Use when reconstructing documents that may contain the {@link URL} schema.
|
|
7705
|
+
*
|
|
7706
|
+
* @see {@link URL} for the corresponding schema
|
|
7707
|
+
*
|
|
7708
|
+
* @category URL
|
|
7709
|
+
* @since 4.0.0
|
|
7710
|
+
*/
|
|
7711
|
+
export declare const URLReviver: SchemaRepresentation.DeclarationReviver<null>;
|
|
6953
7712
|
/**
|
|
6954
7713
|
* Type-level representation of {@link URLFromString}.
|
|
6955
7714
|
*
|
|
@@ -6980,22 +7739,21 @@ export declare const URLFromString: URLFromString;
|
|
|
6980
7739
|
* @category Date
|
|
6981
7740
|
* @since 4.0.0
|
|
6982
7741
|
*/
|
|
6983
|
-
export interface Date extends
|
|
7742
|
+
export interface Date extends declare<globalThis.Date> {
|
|
6984
7743
|
readonly "Rebuild": Date;
|
|
6985
7744
|
}
|
|
6986
7745
|
/**
|
|
6987
|
-
* Schema for JavaScript `Date` objects.
|
|
7746
|
+
* Schema for valid JavaScript `Date` objects.
|
|
6988
7747
|
*
|
|
6989
7748
|
* **When to use**
|
|
6990
7749
|
*
|
|
6991
|
-
* Use to validate in-memory values that must already be JavaScript date
|
|
7750
|
+
* Use to validate in-memory values that must already be valid JavaScript date
|
|
6992
7751
|
* objects.
|
|
6993
7752
|
*
|
|
6994
7753
|
* **Details**
|
|
6995
7754
|
*
|
|
6996
|
-
* This schema accepts
|
|
6997
|
-
* JSON serializer encodes
|
|
6998
|
-
* as `"Invalid Date"`.
|
|
7755
|
+
* This schema accepts `Date` instances whose timestamp is not `NaN`. The
|
|
7756
|
+
* default JSON serializer encodes dates as ISO 8601 strings.
|
|
6999
7757
|
*
|
|
7000
7758
|
* **Example** (Defining a Date schema)
|
|
7001
7759
|
*
|
|
@@ -7006,7 +7764,6 @@ export interface Date extends instanceOf<globalThis.Date> {
|
|
|
7006
7764
|
* // => Date { 2024-01-01T00:00:00.000Z }
|
|
7007
7765
|
* ```
|
|
7008
7766
|
*
|
|
7009
|
-
* @see {@link DateValid} for accepting only valid Date instances
|
|
7010
7767
|
* @see {@link DateFromString} for decoding strings into Date instances
|
|
7011
7768
|
* @see {@link DateFromMillis} for decoding epoch milliseconds into Date instances
|
|
7012
7769
|
*
|
|
@@ -7014,6 +7771,19 @@ export interface Date extends instanceOf<globalThis.Date> {
|
|
|
7014
7771
|
* @since 4.0.0
|
|
7015
7772
|
*/
|
|
7016
7773
|
export declare const Date: Date;
|
|
7774
|
+
/**
|
|
7775
|
+
* Reviver for persisted `Date` declarations.
|
|
7776
|
+
*
|
|
7777
|
+
* **When to use**
|
|
7778
|
+
*
|
|
7779
|
+
* Use when reconstructing documents that may contain the {@link Date} schema.
|
|
7780
|
+
*
|
|
7781
|
+
* @see {@link Date} for the corresponding schema
|
|
7782
|
+
*
|
|
7783
|
+
* @category Date
|
|
7784
|
+
* @since 4.0.0
|
|
7785
|
+
*/
|
|
7786
|
+
export declare const DateReviver: SchemaRepresentation.DeclarationReviver<null>;
|
|
7017
7787
|
/**
|
|
7018
7788
|
* Type-level representation of {@link DateFromString}.
|
|
7019
7789
|
*
|
|
@@ -7037,17 +7807,13 @@ export interface DateFromString extends decodeTo<Date, String> {
|
|
|
7037
7807
|
* The string is passed to JavaScript `Date` construction.
|
|
7038
7808
|
*
|
|
7039
7809
|
* Encoding:
|
|
7040
|
-
* A
|
|
7041
|
-
* `"Invalid Date"`.
|
|
7042
|
-
*
|
|
7043
|
-
* **Gotchas**
|
|
7810
|
+
* A `Date` is encoded as an ISO string.
|
|
7044
7811
|
*
|
|
7045
|
-
* Invalid date strings
|
|
7812
|
+
* Invalid date strings fail decoding.
|
|
7046
7813
|
*
|
|
7047
7814
|
* @see {@link DateFromMillis} for decoding epoch milliseconds into Date instances
|
|
7048
7815
|
* @see {@link DateTimeUtcFromString} for decoding date-time strings into UTC values
|
|
7049
7816
|
* @see {@link Date} for accepting Date instances directly
|
|
7050
|
-
* @see {@link DateValid} for rejecting invalid Date instances
|
|
7051
7817
|
*
|
|
7052
7818
|
* @category Date
|
|
7053
7819
|
* @since 3.10.0
|
|
@@ -7059,7 +7825,7 @@ export declare const DateFromString: DateFromString;
|
|
|
7059
7825
|
* @category Date
|
|
7060
7826
|
* @since 4.0.0
|
|
7061
7827
|
*/
|
|
7062
|
-
export interface DateFromMillis extends decodeTo<Date,
|
|
7828
|
+
export interface DateFromMillis extends decodeTo<Date, Int> {
|
|
7063
7829
|
readonly "Rebuild": DateFromMillis;
|
|
7064
7830
|
}
|
|
7065
7831
|
/**
|
|
@@ -7073,15 +7839,16 @@ export interface DateFromMillis extends decodeTo<Date, Number> {
|
|
|
7073
7839
|
* **Details**
|
|
7074
7840
|
*
|
|
7075
7841
|
* Decoding:
|
|
7076
|
-
* A number of milliseconds since the Unix epoch is decoded as a
|
|
7842
|
+
* A safe integer number of milliseconds since the Unix epoch is decoded as a
|
|
7843
|
+
* `Date`.
|
|
7077
7844
|
*
|
|
7078
7845
|
* Encoding:
|
|
7079
7846
|
* A `Date` is encoded as its millisecond timestamp.
|
|
7080
7847
|
*
|
|
7081
7848
|
* **Gotchas**
|
|
7082
7849
|
*
|
|
7083
|
-
*
|
|
7084
|
-
*
|
|
7850
|
+
* JavaScript `Date` supports a narrower range than safe integers, so integers
|
|
7851
|
+
* outside the supported `Date` range fail decoding.
|
|
7085
7852
|
*
|
|
7086
7853
|
* @see {@link DateFromString} for decoding string-encoded dates
|
|
7087
7854
|
* @see {@link DateTimeUtcFromMillis} for decoding epoch milliseconds into UTC values
|
|
@@ -7090,27 +7857,6 @@ export interface DateFromMillis extends decodeTo<Date, Number> {
|
|
|
7090
7857
|
* @since 4.0.0
|
|
7091
7858
|
*/
|
|
7092
7859
|
export declare const DateFromMillis: DateFromMillis;
|
|
7093
|
-
/**
|
|
7094
|
-
* Type-level representation of {@link DateValid}.
|
|
7095
|
-
*
|
|
7096
|
-
* @category Date
|
|
7097
|
-
* @since 4.0.0
|
|
7098
|
-
*/
|
|
7099
|
-
export interface DateValid extends Date {
|
|
7100
|
-
readonly "Rebuild": DateValid;
|
|
7101
|
-
}
|
|
7102
|
-
/**
|
|
7103
|
-
* Schema for **valid** JavaScript `Date` objects.
|
|
7104
|
-
*
|
|
7105
|
-
* **Details**
|
|
7106
|
-
*
|
|
7107
|
-
* This schema accepts `Date` instances but rejects invalid dates (such as `new
|
|
7108
|
-
* Date("invalid")`).
|
|
7109
|
-
*
|
|
7110
|
-
* @category Date
|
|
7111
|
-
* @since 4.0.0
|
|
7112
|
-
*/
|
|
7113
|
-
export declare const DateValid: DateValid;
|
|
7114
7860
|
/**
|
|
7115
7861
|
* Type-level representation of {@link Duration}.
|
|
7116
7862
|
*
|
|
@@ -7142,6 +7888,19 @@ export interface Duration extends declare<Duration_.Duration> {
|
|
|
7142
7888
|
* @since 3.10.0
|
|
7143
7889
|
*/
|
|
7144
7890
|
export declare const Duration: Duration;
|
|
7891
|
+
/**
|
|
7892
|
+
* Reviver for persisted {@link Duration} declarations.
|
|
7893
|
+
*
|
|
7894
|
+
* **When to use**
|
|
7895
|
+
*
|
|
7896
|
+
* Use when reconstructing documents that may contain the {@link Duration} schema.
|
|
7897
|
+
*
|
|
7898
|
+
* @see {@link Duration} for the corresponding schema
|
|
7899
|
+
*
|
|
7900
|
+
* @category Duration
|
|
7901
|
+
* @since 4.0.0
|
|
7902
|
+
*/
|
|
7903
|
+
export declare const DurationReviver: SchemaRepresentation.DeclarationReviver<null>;
|
|
7145
7904
|
/**
|
|
7146
7905
|
* Type-level representation of {@link DurationFromString}.
|
|
7147
7906
|
*
|
|
@@ -7177,18 +7936,18 @@ export interface DurationFromNanos extends decodeTo<Duration, BigInt> {
|
|
|
7177
7936
|
readonly "Rebuild": DurationFromNanos;
|
|
7178
7937
|
}
|
|
7179
7938
|
/**
|
|
7180
|
-
* Schema that decodes a
|
|
7181
|
-
*
|
|
7939
|
+
* Schema that decodes a `bigint` into a `Duration`, treating the bigint as
|
|
7940
|
+
* nanoseconds.
|
|
7182
7941
|
*
|
|
7183
7942
|
* **Details**
|
|
7184
7943
|
*
|
|
7185
7944
|
* Decoding:
|
|
7186
|
-
* A
|
|
7945
|
+
* A `bigint` representing nanoseconds is decoded as a `Duration`.
|
|
7187
7946
|
*
|
|
7188
7947
|
* Encoding:
|
|
7189
|
-
* Finite durations are encoded as a
|
|
7190
|
-
*
|
|
7191
|
-
* `Duration.infinity`.
|
|
7948
|
+
* Finite durations are encoded as a `bigint` number of nanoseconds. Encoding
|
|
7949
|
+
* fails when the duration cannot be represented as nanoseconds, such as
|
|
7950
|
+
* `Duration.infinity` or `Duration.negativeInfinity`.
|
|
7192
7951
|
*
|
|
7193
7952
|
* @category Duration
|
|
7194
7953
|
* @since 3.10.0
|
|
@@ -7204,19 +7963,20 @@ export interface DurationFromMillis extends decodeTo<Duration, Number> {
|
|
|
7204
7963
|
readonly "Rebuild": DurationFromMillis;
|
|
7205
7964
|
}
|
|
7206
7965
|
/**
|
|
7207
|
-
* Schema that decodes a
|
|
7208
|
-
* integer into a `Duration`, treating the integer value as the duration in
|
|
7966
|
+
* Schema that decodes a number into a `Duration`, treating the number as
|
|
7209
7967
|
* milliseconds.
|
|
7210
7968
|
*
|
|
7211
7969
|
* **Details**
|
|
7212
7970
|
*
|
|
7213
7971
|
* Decoding:
|
|
7214
|
-
* - A
|
|
7215
|
-
* decoded as a `Duration`
|
|
7972
|
+
* - A finite or infinite number is decoded as a `Duration`
|
|
7216
7973
|
*
|
|
7217
7974
|
* Encoding:
|
|
7218
|
-
* - A `Duration` is encoded to a
|
|
7219
|
-
*
|
|
7975
|
+
* - A `Duration` is encoded to a finite or infinite number of milliseconds
|
|
7976
|
+
*
|
|
7977
|
+
* **Gotchas**
|
|
7978
|
+
*
|
|
7979
|
+
* `NaN` is decoded as `Duration.zero`, matching `Duration.millis`.
|
|
7220
7980
|
*
|
|
7221
7981
|
* @category Duration
|
|
7222
7982
|
* @since 3.10.0
|
|
@@ -7251,6 +8011,19 @@ export interface BigDecimal extends declare<BigDecimal_.BigDecimal> {
|
|
|
7251
8011
|
* @since 3.10.0
|
|
7252
8012
|
*/
|
|
7253
8013
|
export declare const BigDecimal: BigDecimal;
|
|
8014
|
+
/**
|
|
8015
|
+
* Reviver for persisted {@link BigDecimal} declarations.
|
|
8016
|
+
*
|
|
8017
|
+
* **When to use**
|
|
8018
|
+
*
|
|
8019
|
+
* Use when reconstructing documents that may contain the {@link BigDecimal} schema.
|
|
8020
|
+
*
|
|
8021
|
+
* @see {@link BigDecimal} for the corresponding schema
|
|
8022
|
+
*
|
|
8023
|
+
* @category BigDecimal
|
|
8024
|
+
* @since 4.0.0
|
|
8025
|
+
*/
|
|
8026
|
+
export declare const BigDecimalReviver: SchemaRepresentation.DeclarationReviver<null>;
|
|
7254
8027
|
/**
|
|
7255
8028
|
* Type-level representation of {@link BigDecimalFromString}.
|
|
7256
8029
|
*
|
|
@@ -7344,12 +8117,6 @@ export interface fromJsonString<S extends Constraint> extends decodeTo<S, String
|
|
|
7344
8117
|
* The resulting schema first parses the input string as JSON, and then runs the
|
|
7345
8118
|
* provided schema on the parsed result.
|
|
7346
8119
|
*
|
|
7347
|
-
* JSON Schema generation:
|
|
7348
|
-
*
|
|
7349
|
-
* When using `fromJsonString` with `draft-2020-12` or `openApi3.1`, the
|
|
7350
|
-
* resulting schema will be a JSON Schema with a `contentSchema` property that
|
|
7351
|
-
* contains the JSON Schema for the given schema.
|
|
7352
|
-
*
|
|
7353
8120
|
* **Example** (Decoding JSON strings with a schema)
|
|
7354
8121
|
*
|
|
7355
8122
|
* ```ts
|
|
@@ -7362,39 +8129,6 @@ export interface fromJsonString<S extends Constraint> extends decodeTo<S, String
|
|
|
7362
8129
|
* // => { a: 1 }
|
|
7363
8130
|
* ```
|
|
7364
8131
|
*
|
|
7365
|
-
* **Example** (Emitting JSON Schema for a JSON string decoder)
|
|
7366
|
-
*
|
|
7367
|
-
* ```ts
|
|
7368
|
-
* import { Schema } from "effect"
|
|
7369
|
-
*
|
|
7370
|
-
* const original = Schema.Struct({ a: Schema.String })
|
|
7371
|
-
* const schema = Schema.fromJsonString(original)
|
|
7372
|
-
*
|
|
7373
|
-
* const document = Schema.toJsonSchemaDocument(schema)
|
|
7374
|
-
*
|
|
7375
|
-
* console.log(JSON.stringify(document, null, 2))
|
|
7376
|
-
* // {
|
|
7377
|
-
* // "source": "draft-2020-12",
|
|
7378
|
-
* // "schema": {
|
|
7379
|
-
* // "type": "string",
|
|
7380
|
-
* // "contentMediaType": "application/json",
|
|
7381
|
-
* // "contentSchema": {
|
|
7382
|
-
* // "type": "object",
|
|
7383
|
-
* // "properties": {
|
|
7384
|
-
* // "a": {
|
|
7385
|
-
* // "type": "string"
|
|
7386
|
-
* // }
|
|
7387
|
-
* // },
|
|
7388
|
-
* // "required": [
|
|
7389
|
-
* // "a"
|
|
7390
|
-
* // ],
|
|
7391
|
-
* // "additionalProperties": false
|
|
7392
|
-
* // }
|
|
7393
|
-
* // },
|
|
7394
|
-
* // "definitions": {}
|
|
7395
|
-
* // }
|
|
7396
|
-
* ```
|
|
7397
|
-
*
|
|
7398
8132
|
* @category constructors
|
|
7399
8133
|
* @since 4.0.0
|
|
7400
8134
|
*/
|
|
@@ -7420,6 +8154,19 @@ export interface File extends instanceOf<globalThis.File> {
|
|
|
7420
8154
|
* @since 4.0.0
|
|
7421
8155
|
*/
|
|
7422
8156
|
export declare const File: File;
|
|
8157
|
+
/**
|
|
8158
|
+
* Reviver for persisted `File` declarations.
|
|
8159
|
+
*
|
|
8160
|
+
* **When to use**
|
|
8161
|
+
*
|
|
8162
|
+
* Use when reconstructing documents that may contain the {@link File} schema.
|
|
8163
|
+
*
|
|
8164
|
+
* @see {@link File} for the corresponding schema
|
|
8165
|
+
*
|
|
8166
|
+
* @category file
|
|
8167
|
+
* @since 4.0.0
|
|
8168
|
+
*/
|
|
8169
|
+
export declare const FileReviver: SchemaRepresentation.DeclarationReviver<null>;
|
|
7423
8170
|
/**
|
|
7424
8171
|
* Type-level representation of {@link FormData}.
|
|
7425
8172
|
*
|
|
@@ -7441,6 +8188,19 @@ export interface FormData extends instanceOf<globalThis.FormData> {
|
|
|
7441
8188
|
* @since 4.0.0
|
|
7442
8189
|
*/
|
|
7443
8190
|
export declare const FormData: FormData;
|
|
8191
|
+
/**
|
|
8192
|
+
* Reviver for persisted `FormData` declarations.
|
|
8193
|
+
*
|
|
8194
|
+
* **When to use**
|
|
8195
|
+
*
|
|
8196
|
+
* Use when reconstructing documents that may contain the {@link FormData} schema.
|
|
8197
|
+
*
|
|
8198
|
+
* @see {@link FormData} for the corresponding schema
|
|
8199
|
+
*
|
|
8200
|
+
* @category FormData
|
|
8201
|
+
* @since 4.0.0
|
|
8202
|
+
*/
|
|
8203
|
+
export declare const FormDataReviver: SchemaRepresentation.DeclarationReviver<null>;
|
|
7444
8204
|
/**
|
|
7445
8205
|
* Type-level representation returned by {@link fromFormData}.
|
|
7446
8206
|
*
|
|
@@ -7556,6 +8316,19 @@ export interface URLSearchParams extends instanceOf<globalThis.URLSearchParams>
|
|
|
7556
8316
|
* @since 4.0.0
|
|
7557
8317
|
*/
|
|
7558
8318
|
export declare const URLSearchParams: URLSearchParams;
|
|
8319
|
+
/**
|
|
8320
|
+
* Reviver for persisted `URLSearchParams` declarations.
|
|
8321
|
+
*
|
|
8322
|
+
* **When to use**
|
|
8323
|
+
*
|
|
8324
|
+
* Use when reconstructing documents that may contain the {@link URLSearchParams} schema.
|
|
8325
|
+
*
|
|
8326
|
+
* @see {@link URLSearchParams} for the corresponding schema
|
|
8327
|
+
*
|
|
8328
|
+
* @category search params
|
|
8329
|
+
* @since 4.0.0
|
|
8330
|
+
*/
|
|
8331
|
+
export declare const URLSearchParamsReviver: SchemaRepresentation.DeclarationReviver<null>;
|
|
7559
8332
|
/**
|
|
7560
8333
|
* Type-level representation returned by {@link fromURLSearchParams}.
|
|
7561
8334
|
*
|
|
@@ -7646,45 +8419,13 @@ export interface fromURLSearchParams<S extends Constraint> extends decodeTo<S, U
|
|
|
7646
8419
|
* @since 4.0.0
|
|
7647
8420
|
*/
|
|
7648
8421
|
export declare function fromURLSearchParams<S extends Constraint>(schema: S): fromURLSearchParams<S>;
|
|
7649
|
-
/**
|
|
7650
|
-
* Type-level representation of {@link Finite}.
|
|
7651
|
-
*
|
|
7652
|
-
* @category Number
|
|
7653
|
-
* @since 3.10.0
|
|
7654
|
-
*/
|
|
7655
|
-
export interface Finite extends Number {
|
|
7656
|
-
readonly "Rebuild": Finite;
|
|
7657
|
-
}
|
|
7658
|
-
/**
|
|
7659
|
-
* Schema for finite numbers, rejecting `NaN`, `Infinity`, and `-Infinity`.
|
|
7660
|
-
*
|
|
7661
|
-
* @category Number
|
|
7662
|
-
* @since 3.10.0
|
|
7663
|
-
*/
|
|
7664
|
-
export declare const Finite: Finite;
|
|
7665
|
-
/**
|
|
7666
|
-
* Type-level representation of {@link Int}.
|
|
7667
|
-
*
|
|
7668
|
-
* @category Number
|
|
7669
|
-
* @since 3.10.0
|
|
7670
|
-
*/
|
|
7671
|
-
export interface Int extends Number {
|
|
7672
|
-
readonly "Rebuild": Int;
|
|
7673
|
-
}
|
|
7674
|
-
/**
|
|
7675
|
-
* Schema for integers, rejecting `NaN`, `Infinity`, and `-Infinity`.
|
|
7676
|
-
*
|
|
7677
|
-
* @category Number
|
|
7678
|
-
* @since 3.10.0
|
|
7679
|
-
*/
|
|
7680
|
-
export declare const Int: Int;
|
|
7681
8422
|
/**
|
|
7682
8423
|
* Type-level representation of {@link NumberFromString}.
|
|
7683
8424
|
*
|
|
7684
8425
|
* @category Number
|
|
7685
8426
|
* @since 3.10.0
|
|
7686
8427
|
*/
|
|
7687
|
-
export interface NumberFromString extends decodeTo<
|
|
8428
|
+
export interface NumberFromString extends decodeTo<Number, String> {
|
|
7688
8429
|
readonly "Rebuild": NumberFromString;
|
|
7689
8430
|
}
|
|
7690
8431
|
/**
|
|
@@ -8001,6 +8742,19 @@ export interface Uint8Array extends instanceOf<globalThis.Uint8Array<ArrayBuffer
|
|
|
8001
8742
|
* @since 4.0.0
|
|
8002
8743
|
*/
|
|
8003
8744
|
export declare const Uint8Array: Uint8Array;
|
|
8745
|
+
/**
|
|
8746
|
+
* Reviver for persisted `Uint8Array` declarations.
|
|
8747
|
+
*
|
|
8748
|
+
* **When to use**
|
|
8749
|
+
*
|
|
8750
|
+
* Use when reconstructing documents that may contain the {@link Uint8Array} schema.
|
|
8751
|
+
*
|
|
8752
|
+
* @see {@link Uint8Array} for the corresponding schema
|
|
8753
|
+
*
|
|
8754
|
+
* @category Uint8Array
|
|
8755
|
+
* @since 4.0.0
|
|
8756
|
+
*/
|
|
8757
|
+
export declare const Uint8ArrayReviver: SchemaRepresentation.DeclarationReviver<null>;
|
|
8004
8758
|
/**
|
|
8005
8759
|
* Type-level representation of {@link Uint8ArrayFromBase64}.
|
|
8006
8760
|
*
|
|
@@ -8107,6 +8861,19 @@ export interface DateTimeUtc extends declare<DateTime.Utc> {
|
|
|
8107
8861
|
* @since 3.10.0
|
|
8108
8862
|
*/
|
|
8109
8863
|
export declare const DateTimeUtc: DateTimeUtc;
|
|
8864
|
+
/**
|
|
8865
|
+
* Reviver for persisted {@link DateTimeUtc} declarations.
|
|
8866
|
+
*
|
|
8867
|
+
* **When to use**
|
|
8868
|
+
*
|
|
8869
|
+
* Use when reconstructing documents that may contain the {@link DateTimeUtc} schema.
|
|
8870
|
+
*
|
|
8871
|
+
* @see {@link DateTimeUtc} for the corresponding schema
|
|
8872
|
+
*
|
|
8873
|
+
* @category DateTime
|
|
8874
|
+
* @since 4.0.0
|
|
8875
|
+
*/
|
|
8876
|
+
export declare const DateTimeUtcReviver: SchemaRepresentation.DeclarationReviver<null>;
|
|
8110
8877
|
/**
|
|
8111
8878
|
* Type-level representation of {@link DateTimeUtcFromDate}.
|
|
8112
8879
|
*
|
|
@@ -8135,7 +8902,7 @@ export interface DateTimeUtcFromDate extends decodeTo<DateTimeUtc, Date> {
|
|
|
8135
8902
|
* @see {@link DateTimeUtc} for validating values that are already `DateTime.Utc`
|
|
8136
8903
|
* @see {@link DateTimeUtcFromString} for decoding date-time strings into UTC values
|
|
8137
8904
|
* @see {@link DateTimeUtcFromMillis} for decoding epoch milliseconds into UTC values
|
|
8138
|
-
* @see {@link
|
|
8905
|
+
* @see {@link Date} for validating Date instances without converting them
|
|
8139
8906
|
*
|
|
8140
8907
|
* @category DateTime
|
|
8141
8908
|
* @since 3.12.0
|
|
@@ -8178,7 +8945,7 @@ export declare const DateTimeUtcFromString: DateTimeUtcFromString;
|
|
|
8178
8945
|
* @category DateTime
|
|
8179
8946
|
* @since 4.0.0
|
|
8180
8947
|
*/
|
|
8181
|
-
export interface DateTimeUtcFromMillis extends decodeTo<instanceOf<DateTime.Utc>,
|
|
8948
|
+
export interface DateTimeUtcFromMillis extends decodeTo<instanceOf<DateTime.Utc>, Int> {
|
|
8182
8949
|
readonly "Rebuild": DateTimeUtcFromMillis;
|
|
8183
8950
|
}
|
|
8184
8951
|
/**
|
|
@@ -8219,9 +8986,22 @@ export interface TimeZoneOffset extends declare<DateTime.TimeZone.Offset> {
|
|
|
8219
8986
|
* - encodes `DateTime.TimeZone.Offset` as a number (offset in milliseconds)
|
|
8220
8987
|
*
|
|
8221
8988
|
* @category DateTime
|
|
8222
|
-
* @since 3.10.0
|
|
8989
|
+
* @since 3.10.0
|
|
8990
|
+
*/
|
|
8991
|
+
export declare const TimeZoneOffset: TimeZoneOffset;
|
|
8992
|
+
/**
|
|
8993
|
+
* Reviver for persisted {@link TimeZoneOffset} declarations.
|
|
8994
|
+
*
|
|
8995
|
+
* **When to use**
|
|
8996
|
+
*
|
|
8997
|
+
* Use when reconstructing documents that may contain the {@link TimeZoneOffset} schema.
|
|
8998
|
+
*
|
|
8999
|
+
* @see {@link TimeZoneOffset} for the corresponding schema
|
|
9000
|
+
*
|
|
9001
|
+
* @category DateTime
|
|
9002
|
+
* @since 4.0.0
|
|
8223
9003
|
*/
|
|
8224
|
-
export declare const
|
|
9004
|
+
export declare const TimeZoneOffsetReviver: SchemaRepresentation.DeclarationReviver<null>;
|
|
8225
9005
|
/**
|
|
8226
9006
|
* Type-level representation of {@link TimeZoneNamed}.
|
|
8227
9007
|
*
|
|
@@ -8244,6 +9024,19 @@ export interface TimeZoneNamed extends declare<DateTime.TimeZone.Named> {
|
|
|
8244
9024
|
* @since 3.10.0
|
|
8245
9025
|
*/
|
|
8246
9026
|
export declare const TimeZoneNamed: TimeZoneNamed;
|
|
9027
|
+
/**
|
|
9028
|
+
* Reviver for persisted {@link TimeZoneNamed} declarations.
|
|
9029
|
+
*
|
|
9030
|
+
* **When to use**
|
|
9031
|
+
*
|
|
9032
|
+
* Use when reconstructing documents that may contain the {@link TimeZoneNamed} schema.
|
|
9033
|
+
*
|
|
9034
|
+
* @see {@link TimeZoneNamed} for the corresponding schema
|
|
9035
|
+
*
|
|
9036
|
+
* @category DateTime
|
|
9037
|
+
* @since 4.0.0
|
|
9038
|
+
*/
|
|
9039
|
+
export declare const TimeZoneNamedReviver: SchemaRepresentation.DeclarationReviver<null>;
|
|
8247
9040
|
/**
|
|
8248
9041
|
* Type-level representation of {@link TimeZoneNamedFromString}.
|
|
8249
9042
|
*
|
|
@@ -8291,6 +9084,19 @@ export interface TimeZone extends declare<DateTime.TimeZone> {
|
|
|
8291
9084
|
* @since 3.10.0
|
|
8292
9085
|
*/
|
|
8293
9086
|
export declare const TimeZone: TimeZone;
|
|
9087
|
+
/**
|
|
9088
|
+
* Reviver for persisted {@link TimeZone} declarations.
|
|
9089
|
+
*
|
|
9090
|
+
* **When to use**
|
|
9091
|
+
*
|
|
9092
|
+
* Use when reconstructing documents that may contain the {@link TimeZone} schema.
|
|
9093
|
+
*
|
|
9094
|
+
* @see {@link TimeZone} for the corresponding schema
|
|
9095
|
+
*
|
|
9096
|
+
* @category DateTime
|
|
9097
|
+
* @since 4.0.0
|
|
9098
|
+
*/
|
|
9099
|
+
export declare const TimeZoneReviver: SchemaRepresentation.DeclarationReviver<null>;
|
|
8294
9100
|
/**
|
|
8295
9101
|
* Type-level representation of {@link TimeZoneFromString}.
|
|
8296
9102
|
*
|
|
@@ -8340,6 +9146,19 @@ export interface DateTimeZoned extends declare<DateTime.Zoned> {
|
|
|
8340
9146
|
* @since 3.10.0
|
|
8341
9147
|
*/
|
|
8342
9148
|
export declare const DateTimeZoned: DateTimeZoned;
|
|
9149
|
+
/**
|
|
9150
|
+
* Reviver for persisted {@link DateTimeZoned} declarations.
|
|
9151
|
+
*
|
|
9152
|
+
* **When to use**
|
|
9153
|
+
*
|
|
9154
|
+
* Use when reconstructing documents that may contain the {@link DateTimeZoned} schema.
|
|
9155
|
+
*
|
|
9156
|
+
* @see {@link DateTimeZoned} for the corresponding schema
|
|
9157
|
+
*
|
|
9158
|
+
* @category DateTime
|
|
9159
|
+
* @since 4.0.0
|
|
9160
|
+
*/
|
|
9161
|
+
export declare const DateTimeZonedReviver: SchemaRepresentation.DeclarationReviver<null>;
|
|
8343
9162
|
/**
|
|
8344
9163
|
* Type-level representation of {@link DateTimeZonedFromString}.
|
|
8345
9164
|
*
|
|
@@ -8372,7 +9191,7 @@ export declare const DateTimeZonedFromString: DateTimeZonedFromString;
|
|
|
8372
9191
|
*/
|
|
8373
9192
|
export interface Class<Self, S extends Constraint & {
|
|
8374
9193
|
readonly fields: Struct.Fields;
|
|
8375
|
-
}, Inherited> extends
|
|
9194
|
+
}, Inherited> extends BottomLazyWithoutNew<SchemaAST.Declaration, decodeTo<declareConstructor<Self, S["Encoded"], readonly [S], S["Iso"]>, S>, readonly [S], S["~type.mutability"], S["~type.optionality"], S["~type.constructor.default"], S["~encoded.mutability"], S["~encoded.optionality"]> {
|
|
8376
9195
|
readonly "Type": Self;
|
|
8377
9196
|
readonly "Encoded": S["Encoded"];
|
|
8378
9197
|
readonly "DecodingServices": S["DecodingServices"];
|
|
@@ -9134,9 +9953,12 @@ export declare function overrideToEquivalence<S extends Top>(toEquivalence: () =
|
|
|
9134
9953
|
*/
|
|
9135
9954
|
export declare function toEquivalence<T>(schema: Schema<T>): Equivalence.Equivalence<T>;
|
|
9136
9955
|
/**
|
|
9137
|
-
* Derives an intermediate `SchemaRepresentation.Document` from
|
|
9138
|
-
*
|
|
9139
|
-
*
|
|
9956
|
+
* Derives an intermediate `SchemaRepresentation.Document` from the encoded
|
|
9957
|
+
* side of a schema.
|
|
9958
|
+
*
|
|
9959
|
+
* **Details**
|
|
9960
|
+
*
|
|
9961
|
+
* Use {@link toType} before this function to represent the type side instead.
|
|
9140
9962
|
*
|
|
9141
9963
|
* @category Representation
|
|
9142
9964
|
* @since 4.0.0
|
|
@@ -9222,14 +10044,16 @@ export interface ToJsonSchemaOptions {
|
|
|
9222
10044
|
*
|
|
9223
10045
|
* The `options` parameter controls generation details such as additional
|
|
9224
10046
|
* properties and synthesized check descriptions; it does not change the draft
|
|
9225
|
-
* target.
|
|
10047
|
+
* target. Declarations are lowered through their `toCodecJson` or `toCodec`
|
|
10048
|
+
* annotation when available before the representation document is compiled.
|
|
9226
10049
|
*
|
|
9227
10050
|
* **Gotchas**
|
|
9228
10051
|
*
|
|
9229
10052
|
* JSON Schema generation is best-effort. Some Effect schema semantics cannot
|
|
9230
10053
|
* be represented exactly in JSON Schema, and importing an emitted JSON Schema
|
|
9231
10054
|
* may produce an equivalent approximation rather than the original schema
|
|
9232
|
-
* shape.
|
|
10055
|
+
* shape. Opaque declarations without a structural codec are represented by an
|
|
10056
|
+
* unconstrained JSON Schema.
|
|
9233
10057
|
*
|
|
9234
10058
|
* @category converting
|
|
9235
10059
|
* @since 4.0.0
|
|
@@ -9255,6 +10079,14 @@ export interface toCodecJson<S extends Constraint> extends BottomLazy<S["ast"],
|
|
|
9255
10079
|
* Derives a canonical JSON codec from a schema. The encoded form is `Json`, and
|
|
9256
10080
|
* decoding produces the schema's `Type`.
|
|
9257
10081
|
*
|
|
10082
|
+
* **Gotchas**
|
|
10083
|
+
*
|
|
10084
|
+
* Declarations without a `toCodecJson` or `toCodec` annotation use `Json` as
|
|
10085
|
+
* their encoded schema. This keeps codec construction total, but encoding or
|
|
10086
|
+
* decoding can still fail when declaration values are not JSON values. A
|
|
10087
|
+
* `toCodecJson` callback can return `undefined` when the declaration is already
|
|
10088
|
+
* in canonical JSON form.
|
|
10089
|
+
*
|
|
9258
10090
|
* @category Canonical Codecs
|
|
9259
10091
|
* @since 4.0.0
|
|
9260
10092
|
*/
|
|
@@ -9295,10 +10127,11 @@ export interface toCodecStringTree<S extends Constraint> extends BottomLazy<S["a
|
|
|
9295
10127
|
* Converts a schema to the StringTree canonical codec, where every leaf value
|
|
9296
10128
|
* becomes a string while preserving the original structure.
|
|
9297
10129
|
*
|
|
9298
|
-
* **
|
|
10130
|
+
* **Gotchas**
|
|
9299
10131
|
*
|
|
9300
|
-
* Declarations
|
|
9301
|
-
* `
|
|
10132
|
+
* Declarations must provide a structural `toCodecStringTree`, `toCodecJson`, or
|
|
10133
|
+
* `toCodec` encoding. A callback can return `undefined` when the declaration is
|
|
10134
|
+
* already in canonical StringTree form.
|
|
9302
10135
|
*
|
|
9303
10136
|
* @category Canonical Codecs
|
|
9304
10137
|
* @since 4.0.0
|
|
@@ -9363,6 +10196,162 @@ type XmlEncoderOptions = {
|
|
|
9363
10196
|
* @since 4.0.0
|
|
9364
10197
|
*/
|
|
9365
10198
|
export declare function toEncoderXml<T, RE>(codec: ConstraintCodec<T, unknown, unknown, RE>, options?: XmlEncoderOptions): (t: T) => Effect.Effect<string, SchemaError, RE>;
|
|
10199
|
+
/**
|
|
10200
|
+
* Reviver for persisted `isGreaterThanDate` checks.
|
|
10201
|
+
*
|
|
10202
|
+
* **When to use**
|
|
10203
|
+
*
|
|
10204
|
+
* Use when reconstructing documents that may contain checks created by {@link isGreaterThanDate}.
|
|
10205
|
+
*
|
|
10206
|
+
* @see {@link isGreaterThanDate} for creating the corresponding check
|
|
10207
|
+
*
|
|
10208
|
+
* @category Date checks
|
|
10209
|
+
* @since 4.0.0
|
|
10210
|
+
*/
|
|
10211
|
+
export declare const isGreaterThanDateReviver: SchemaRepresentation.FilterReviver<{
|
|
10212
|
+
readonly exclusiveMinimum: globalThis.Date;
|
|
10213
|
+
}>;
|
|
10214
|
+
/**
|
|
10215
|
+
* Reviver for persisted `isGreaterThanOrEqualToDate` checks.
|
|
10216
|
+
*
|
|
10217
|
+
* **When to use**
|
|
10218
|
+
*
|
|
10219
|
+
* Use when reconstructing documents that may contain checks created by {@link isGreaterThanOrEqualToDate}.
|
|
10220
|
+
*
|
|
10221
|
+
* @see {@link isGreaterThanOrEqualToDate} for creating the corresponding check
|
|
10222
|
+
*
|
|
10223
|
+
* @category Date checks
|
|
10224
|
+
* @since 4.0.0
|
|
10225
|
+
*/
|
|
10226
|
+
export declare const isGreaterThanOrEqualToDateReviver: SchemaRepresentation.FilterReviver<{
|
|
10227
|
+
readonly minimum: globalThis.Date;
|
|
10228
|
+
}>;
|
|
10229
|
+
/**
|
|
10230
|
+
* Reviver for persisted `isLessThanDate` checks.
|
|
10231
|
+
*
|
|
10232
|
+
* **When to use**
|
|
10233
|
+
*
|
|
10234
|
+
* Use when reconstructing documents that may contain checks created by {@link isLessThanDate}.
|
|
10235
|
+
*
|
|
10236
|
+
* @see {@link isLessThanDate} for creating the corresponding check
|
|
10237
|
+
*
|
|
10238
|
+
* @category Date checks
|
|
10239
|
+
* @since 4.0.0
|
|
10240
|
+
*/
|
|
10241
|
+
export declare const isLessThanDateReviver: SchemaRepresentation.FilterReviver<{
|
|
10242
|
+
readonly exclusiveMaximum: globalThis.Date;
|
|
10243
|
+
}>;
|
|
10244
|
+
/**
|
|
10245
|
+
* Reviver for persisted `isLessThanOrEqualToDate` checks.
|
|
10246
|
+
*
|
|
10247
|
+
* **When to use**
|
|
10248
|
+
*
|
|
10249
|
+
* Use when reconstructing documents that may contain checks created by {@link isLessThanOrEqualToDate}.
|
|
10250
|
+
*
|
|
10251
|
+
* @see {@link isLessThanOrEqualToDate} for creating the corresponding check
|
|
10252
|
+
*
|
|
10253
|
+
* @category Date checks
|
|
10254
|
+
* @since 4.0.0
|
|
10255
|
+
*/
|
|
10256
|
+
export declare const isLessThanOrEqualToDateReviver: SchemaRepresentation.FilterReviver<{
|
|
10257
|
+
readonly maximum: globalThis.Date;
|
|
10258
|
+
}>;
|
|
10259
|
+
/**
|
|
10260
|
+
* Reviver for persisted `isBetweenDate` checks.
|
|
10261
|
+
*
|
|
10262
|
+
* **When to use**
|
|
10263
|
+
*
|
|
10264
|
+
* Use when reconstructing documents that may contain checks created by {@link isBetweenDate}.
|
|
10265
|
+
*
|
|
10266
|
+
* @see {@link isBetweenDate} for creating the corresponding check
|
|
10267
|
+
*
|
|
10268
|
+
* @category Date checks
|
|
10269
|
+
* @since 4.0.0
|
|
10270
|
+
*/
|
|
10271
|
+
export declare const isBetweenDateReviver: SchemaRepresentation.FilterReviver<{
|
|
10272
|
+
readonly minimum: globalThis.Date;
|
|
10273
|
+
readonly maximum: globalThis.Date;
|
|
10274
|
+
readonly exclusiveMinimum?: true | undefined;
|
|
10275
|
+
readonly exclusiveMaximum?: true | undefined;
|
|
10276
|
+
}>;
|
|
10277
|
+
/**
|
|
10278
|
+
* Reviver for persisted `isGreaterThanBigInt` checks.
|
|
10279
|
+
*
|
|
10280
|
+
* **When to use**
|
|
10281
|
+
*
|
|
10282
|
+
* Use when reconstructing documents that may contain checks created by {@link isGreaterThanBigInt}.
|
|
10283
|
+
*
|
|
10284
|
+
* @see {@link isGreaterThanBigInt} for creating the corresponding check
|
|
10285
|
+
*
|
|
10286
|
+
* @category BigInt checks
|
|
10287
|
+
* @since 4.0.0
|
|
10288
|
+
*/
|
|
10289
|
+
export declare const isGreaterThanBigIntReviver: SchemaRepresentation.FilterReviver<{
|
|
10290
|
+
readonly exclusiveMinimum: bigint;
|
|
10291
|
+
}>;
|
|
10292
|
+
/**
|
|
10293
|
+
* Reviver for persisted `isGreaterThanOrEqualToBigInt` checks.
|
|
10294
|
+
*
|
|
10295
|
+
* **When to use**
|
|
10296
|
+
*
|
|
10297
|
+
* Use when reconstructing documents that may contain checks created by {@link isGreaterThanOrEqualToBigInt}.
|
|
10298
|
+
*
|
|
10299
|
+
* @see {@link isGreaterThanOrEqualToBigInt} for creating the corresponding check
|
|
10300
|
+
*
|
|
10301
|
+
* @category BigInt checks
|
|
10302
|
+
* @since 4.0.0
|
|
10303
|
+
*/
|
|
10304
|
+
export declare const isGreaterThanOrEqualToBigIntReviver: SchemaRepresentation.FilterReviver<{
|
|
10305
|
+
readonly minimum: bigint;
|
|
10306
|
+
}>;
|
|
10307
|
+
/**
|
|
10308
|
+
* Reviver for persisted `isLessThanBigInt` checks.
|
|
10309
|
+
*
|
|
10310
|
+
* **When to use**
|
|
10311
|
+
*
|
|
10312
|
+
* Use when reconstructing documents that may contain checks created by {@link isLessThanBigInt}.
|
|
10313
|
+
*
|
|
10314
|
+
* @see {@link isLessThanBigInt} for creating the corresponding check
|
|
10315
|
+
*
|
|
10316
|
+
* @category BigInt checks
|
|
10317
|
+
* @since 4.0.0
|
|
10318
|
+
*/
|
|
10319
|
+
export declare const isLessThanBigIntReviver: SchemaRepresentation.FilterReviver<{
|
|
10320
|
+
readonly exclusiveMaximum: bigint;
|
|
10321
|
+
}>;
|
|
10322
|
+
/**
|
|
10323
|
+
* Reviver for persisted `isLessThanOrEqualToBigInt` checks.
|
|
10324
|
+
*
|
|
10325
|
+
* **When to use**
|
|
10326
|
+
*
|
|
10327
|
+
* Use when reconstructing documents that may contain checks created by {@link isLessThanOrEqualToBigInt}.
|
|
10328
|
+
*
|
|
10329
|
+
* @see {@link isLessThanOrEqualToBigInt} for creating the corresponding check
|
|
10330
|
+
*
|
|
10331
|
+
* @category BigInt checks
|
|
10332
|
+
* @since 4.0.0
|
|
10333
|
+
*/
|
|
10334
|
+
export declare const isLessThanOrEqualToBigIntReviver: SchemaRepresentation.FilterReviver<{
|
|
10335
|
+
readonly maximum: bigint;
|
|
10336
|
+
}>;
|
|
10337
|
+
/**
|
|
10338
|
+
* Reviver for persisted `isBetweenBigInt` checks.
|
|
10339
|
+
*
|
|
10340
|
+
* **When to use**
|
|
10341
|
+
*
|
|
10342
|
+
* Use when reconstructing documents that may contain checks created by {@link isBetweenBigInt}.
|
|
10343
|
+
*
|
|
10344
|
+
* @see {@link isBetweenBigInt} for creating the corresponding check
|
|
10345
|
+
*
|
|
10346
|
+
* @category BigInt checks
|
|
10347
|
+
* @since 4.0.0
|
|
10348
|
+
*/
|
|
10349
|
+
export declare const isBetweenBigIntReviver: SchemaRepresentation.FilterReviver<{
|
|
10350
|
+
readonly minimum: bigint;
|
|
10351
|
+
readonly maximum: bigint;
|
|
10352
|
+
readonly exclusiveMinimum?: true | undefined;
|
|
10353
|
+
readonly exclusiveMaximum?: true | undefined;
|
|
10354
|
+
}>;
|
|
9366
10355
|
/**
|
|
9367
10356
|
* Derives an `Iso` optic from a schema that isomorphically converts between
|
|
9368
10357
|
* the schema's `Type` and its `Iso` (intermediate / serialized form).
|
|
@@ -9501,6 +10490,19 @@ export interface JsonObject {
|
|
|
9501
10490
|
* @since 4.0.0
|
|
9502
10491
|
*/
|
|
9503
10492
|
export declare const Json: Codec<Json>;
|
|
10493
|
+
/**
|
|
10494
|
+
* Reviver for persisted `Json` declarations.
|
|
10495
|
+
*
|
|
10496
|
+
* **When to use**
|
|
10497
|
+
*
|
|
10498
|
+
* Use when reconstructing documents that may contain the {@link Json} schema.
|
|
10499
|
+
*
|
|
10500
|
+
* @see {@link Json} for the corresponding immutable JSON schema
|
|
10501
|
+
*
|
|
10502
|
+
* @category schemas
|
|
10503
|
+
* @since 4.0.0
|
|
10504
|
+
*/
|
|
10505
|
+
export declare const JsonReviver: SchemaRepresentation.DeclarationReviver<null>;
|
|
9504
10506
|
/**
|
|
9505
10507
|
* Recursive TypeScript type for mutable JSON values: `null`, `number`,
|
|
9506
10508
|
* `boolean`, `string`, mutable arrays, or mutable string-keyed records.
|
|
@@ -9534,6 +10536,19 @@ export interface MutableJsonObject {
|
|
|
9534
10536
|
* @since 4.0.0
|
|
9535
10537
|
*/
|
|
9536
10538
|
export declare const MutableJson: Codec<MutableJson>;
|
|
10539
|
+
/**
|
|
10540
|
+
* Reviver for persisted `MutableJson` declarations.
|
|
10541
|
+
*
|
|
10542
|
+
* **When to use**
|
|
10543
|
+
*
|
|
10544
|
+
* Use when reconstructing documents that may contain the {@link MutableJson} schema.
|
|
10545
|
+
*
|
|
10546
|
+
* @see {@link MutableJson} for the corresponding mutable JSON schema
|
|
10547
|
+
*
|
|
10548
|
+
* @category schemas
|
|
10549
|
+
* @since 4.0.0
|
|
10550
|
+
*/
|
|
10551
|
+
export declare const MutableJsonReviver: SchemaRepresentation.DeclarationReviver<null>;
|
|
9537
10552
|
/**
|
|
9538
10553
|
* Resolves the typed annotations from a schema. The term "resolve" (rather
|
|
9539
10554
|
* than "get") reflects the lookup strategy: if the schema has checks, the
|
|
@@ -9640,6 +10655,7 @@ export declare namespace Annotations {
|
|
|
9640
10655
|
readonly format?: string | undefined;
|
|
9641
10656
|
readonly contentEncoding?: string | undefined;
|
|
9642
10657
|
readonly contentMediaType?: string | undefined;
|
|
10658
|
+
readonly contentSchema?: Json | undefined;
|
|
9643
10659
|
}
|
|
9644
10660
|
/**
|
|
9645
10661
|
* Extends {@link Augment} with type-parametric `default` and `examples` fields.
|
|
@@ -9707,10 +10723,6 @@ export declare namespace Annotations {
|
|
|
9707
10723
|
*/
|
|
9708
10724
|
readonly identifier?: string | undefined;
|
|
9709
10725
|
readonly parseOptions?: SchemaAST.ParseOptions | undefined;
|
|
9710
|
-
/**
|
|
9711
|
-
* Optional metadata used to identify or extend the filter with custom data.
|
|
9712
|
-
*/
|
|
9713
|
-
readonly meta?: Meta | undefined;
|
|
9714
10726
|
/**
|
|
9715
10727
|
* Accumulated brands when multiple brands are added with `Schema.brand`.
|
|
9716
10728
|
*/
|
|
@@ -9755,22 +10767,23 @@ export declare namespace Annotations {
|
|
|
9755
10767
|
* @since 4.0.0
|
|
9756
10768
|
*/
|
|
9757
10769
|
interface Declaration<T, TypeParameters extends ReadonlyArray<Constraint> = readonly []> extends Bottom<T, TypeParameters> {
|
|
10770
|
+
readonly representation?: SchemaRepresentation.RepresentationAnnotation | undefined;
|
|
9758
10771
|
readonly toCodec?: ((typeParameters: TypeParameters.Encoded<TypeParameters>) => SchemaAST.Link) | undefined;
|
|
9759
|
-
readonly toCodecJson?: ((typeParameters: TypeParameters.Encoded<TypeParameters>) => SchemaAST.Link) | undefined;
|
|
10772
|
+
readonly toCodecJson?: ((typeParameters: TypeParameters.Encoded<TypeParameters>) => SchemaAST.Link | undefined) | undefined;
|
|
10773
|
+
readonly toCodecStringTree?: ((typeParameters: TypeParameters.Encoded<TypeParameters>) => SchemaAST.Link | undefined) | undefined;
|
|
9760
10774
|
readonly toCodecIso?: ((typeParameters: TypeParameters.Type<TypeParameters>) => SchemaAST.Link) | undefined;
|
|
9761
10775
|
readonly toArbitrary?: ToArbitrary.Declaration<T, TypeParameters> | undefined;
|
|
9762
10776
|
readonly toEquivalence?: ToEquivalence.Declaration<T, TypeParameters> | undefined;
|
|
9763
10777
|
readonly toFormatter?: ToFormatter.Declaration<T, TypeParameters> | undefined;
|
|
9764
|
-
readonly
|
|
9765
|
-
|
|
9766
|
-
|
|
9767
|
-
|
|
9768
|
-
|
|
9769
|
-
|
|
9770
|
-
|
|
9771
|
-
|
|
9772
|
-
|
|
9773
|
-
} | undefined;
|
|
10778
|
+
readonly toCode?: SchemaRepresentation.Generation.Declaration | undefined;
|
|
10779
|
+
/**
|
|
10780
|
+
* Used to collect sentinels from a Declaration SchemaAST.
|
|
10781
|
+
*
|
|
10782
|
+
* **Details**
|
|
10783
|
+
*
|
|
10784
|
+
* Reserved to internal use only.
|
|
10785
|
+
*/
|
|
10786
|
+
readonly "~sentinels"?: ReadonlyArray<SchemaAST.Sentinel> | undefined;
|
|
9774
10787
|
}
|
|
9775
10788
|
/**
|
|
9776
10789
|
* Annotations for filter schema nodes (created via `Schema.filter`). Extends
|
|
@@ -9781,6 +10794,9 @@ export declare namespace Annotations {
|
|
|
9781
10794
|
* @since 4.0.0
|
|
9782
10795
|
*/
|
|
9783
10796
|
interface Filter extends Augment {
|
|
10797
|
+
readonly representation?: SchemaRepresentation.CheckRepresentationAnnotation<SchemaAST.AST> | undefined;
|
|
10798
|
+
readonly toJsonSchema?: SchemaRepresentation.ToJsonSchema.Check | undefined;
|
|
10799
|
+
readonly toCode?: SchemaRepresentation.Generation.Check | undefined;
|
|
9784
10800
|
/**
|
|
9785
10801
|
* Complete message to use when this filter or refinement fails.
|
|
9786
10802
|
*
|
|
@@ -9801,10 +10817,6 @@ export declare namespace Annotations {
|
|
|
9801
10817
|
* `message`.
|
|
9802
10818
|
*/
|
|
9803
10819
|
readonly identifier?: string | undefined;
|
|
9804
|
-
/**
|
|
9805
|
-
* Optional metadata used to identify or extend the filter with custom data.
|
|
9806
|
-
*/
|
|
9807
|
-
readonly meta?: Meta | undefined;
|
|
9808
10820
|
/**
|
|
9809
10821
|
* Optional hints used by arbitrary derivation for this filter.
|
|
9810
10822
|
*
|
|
@@ -9822,6 +10834,8 @@ export declare namespace Annotations {
|
|
|
9822
10834
|
*
|
|
9823
10835
|
* **Details**
|
|
9824
10836
|
*
|
|
10837
|
+
* Reserved to internal use only.
|
|
10838
|
+
*
|
|
9825
10839
|
* Example: `minLength` on an array is a structural filter.
|
|
9826
10840
|
*/
|
|
9827
10841
|
readonly "~structural"?: boolean | undefined;
|
|
@@ -9904,7 +10918,7 @@ export declare namespace Annotations {
|
|
|
9904
10918
|
* length for strings, array length for arrays, final own-property count for
|
|
9905
10919
|
* objects, and final size/cardinality for sets, maps, hash collections, and
|
|
9906
10920
|
* chunks. `patterns` are concatenated and used by string generators.
|
|
9907
|
-
* `integer`, `noNaN`, `noInfinity`,
|
|
10921
|
+
* `integer`, `noNaN`, `noInfinity`, and `unique` are true when any
|
|
9908
10922
|
* contributing filter sets them. Range bounds live in `ordered` so ordered
|
|
9909
10923
|
* values can share the same representation.
|
|
9910
10924
|
*
|
|
@@ -9918,7 +10932,6 @@ export declare namespace Annotations {
|
|
|
9918
10932
|
readonly integer?: boolean | undefined;
|
|
9919
10933
|
readonly noInfinity?: boolean | undefined;
|
|
9920
10934
|
readonly noNaN?: boolean | undefined;
|
|
9921
|
-
readonly valid?: boolean | undefined;
|
|
9922
10935
|
readonly unique?: boolean | undefined;
|
|
9923
10936
|
readonly ordered?: OrderedConstraint<any> | undefined;
|
|
9924
10937
|
}
|
|
@@ -10127,245 +11140,5 @@ export declare namespace Annotations {
|
|
|
10127
11140
|
interface Issue extends Annotations {
|
|
10128
11141
|
readonly message?: string | undefined;
|
|
10129
11142
|
}
|
|
10130
|
-
/**
|
|
10131
|
-
* Registry of metadata payloads emitted by built-in schema filters and checks.
|
|
10132
|
-
*
|
|
10133
|
-
* **Details**
|
|
10134
|
-
*
|
|
10135
|
-
* Do not augment this interface with custom metadata; extend `MetaDefinitions`
|
|
10136
|
-
* instead.
|
|
10137
|
-
*
|
|
10138
|
-
* @category models
|
|
10139
|
-
* @since 4.0.0
|
|
10140
|
-
*/
|
|
10141
|
-
interface BuiltInMetaDefinitions {
|
|
10142
|
-
readonly isStringFinite: {
|
|
10143
|
-
readonly _tag: "isStringFinite";
|
|
10144
|
-
readonly regExp: globalThis.RegExp;
|
|
10145
|
-
};
|
|
10146
|
-
readonly isStringBigInt: {
|
|
10147
|
-
readonly _tag: "isStringBigInt";
|
|
10148
|
-
readonly regExp: globalThis.RegExp;
|
|
10149
|
-
};
|
|
10150
|
-
readonly isStringSymbol: {
|
|
10151
|
-
readonly _tag: "isStringSymbol";
|
|
10152
|
-
readonly regExp: globalThis.RegExp;
|
|
10153
|
-
};
|
|
10154
|
-
readonly isMinLength: {
|
|
10155
|
-
readonly _tag: "isMinLength";
|
|
10156
|
-
readonly minLength: number;
|
|
10157
|
-
};
|
|
10158
|
-
readonly isMaxLength: {
|
|
10159
|
-
readonly _tag: "isMaxLength";
|
|
10160
|
-
readonly maxLength: number;
|
|
10161
|
-
};
|
|
10162
|
-
readonly isLengthBetween: {
|
|
10163
|
-
readonly _tag: "isLengthBetween";
|
|
10164
|
-
readonly minimum: number;
|
|
10165
|
-
readonly maximum: number;
|
|
10166
|
-
};
|
|
10167
|
-
readonly isPattern: {
|
|
10168
|
-
readonly _tag: "isPattern";
|
|
10169
|
-
readonly regExp: globalThis.RegExp;
|
|
10170
|
-
};
|
|
10171
|
-
readonly isTrimmed: {
|
|
10172
|
-
readonly _tag: "isTrimmed";
|
|
10173
|
-
readonly regExp: globalThis.RegExp;
|
|
10174
|
-
};
|
|
10175
|
-
readonly isUUID: {
|
|
10176
|
-
readonly _tag: "isUUID";
|
|
10177
|
-
readonly regExp: globalThis.RegExp;
|
|
10178
|
-
readonly version: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | undefined;
|
|
10179
|
-
};
|
|
10180
|
-
readonly isGUID: {
|
|
10181
|
-
readonly _tag: "isGUID";
|
|
10182
|
-
readonly regExp: globalThis.RegExp;
|
|
10183
|
-
};
|
|
10184
|
-
readonly isULID: {
|
|
10185
|
-
readonly _tag: "isULID";
|
|
10186
|
-
readonly regExp: globalThis.RegExp;
|
|
10187
|
-
};
|
|
10188
|
-
readonly isBase64: {
|
|
10189
|
-
readonly _tag: "isBase64";
|
|
10190
|
-
readonly regExp: globalThis.RegExp;
|
|
10191
|
-
};
|
|
10192
|
-
readonly isBase64Url: {
|
|
10193
|
-
readonly _tag: "isBase64Url";
|
|
10194
|
-
readonly regExp: globalThis.RegExp;
|
|
10195
|
-
};
|
|
10196
|
-
readonly isStartsWith: {
|
|
10197
|
-
readonly _tag: "isStartsWith";
|
|
10198
|
-
readonly startsWith: string;
|
|
10199
|
-
readonly regExp: globalThis.RegExp;
|
|
10200
|
-
};
|
|
10201
|
-
readonly isEndsWith: {
|
|
10202
|
-
readonly _tag: "isEndsWith";
|
|
10203
|
-
readonly endsWith: string;
|
|
10204
|
-
readonly regExp: globalThis.RegExp;
|
|
10205
|
-
};
|
|
10206
|
-
readonly isIncludes: {
|
|
10207
|
-
readonly _tag: "isIncludes";
|
|
10208
|
-
readonly includes: string;
|
|
10209
|
-
readonly regExp: globalThis.RegExp;
|
|
10210
|
-
};
|
|
10211
|
-
readonly isUppercased: {
|
|
10212
|
-
readonly _tag: "isUppercased";
|
|
10213
|
-
readonly regExp: globalThis.RegExp;
|
|
10214
|
-
};
|
|
10215
|
-
readonly isLowercased: {
|
|
10216
|
-
readonly _tag: "isLowercased";
|
|
10217
|
-
readonly regExp: globalThis.RegExp;
|
|
10218
|
-
};
|
|
10219
|
-
readonly isCapitalized: {
|
|
10220
|
-
readonly _tag: "isCapitalized";
|
|
10221
|
-
readonly regExp: globalThis.RegExp;
|
|
10222
|
-
};
|
|
10223
|
-
readonly isUncapitalized: {
|
|
10224
|
-
readonly _tag: "isUncapitalized";
|
|
10225
|
-
readonly regExp: globalThis.RegExp;
|
|
10226
|
-
};
|
|
10227
|
-
readonly isFinite: {
|
|
10228
|
-
readonly _tag: "isFinite";
|
|
10229
|
-
};
|
|
10230
|
-
readonly isInt: {
|
|
10231
|
-
readonly _tag: "isInt";
|
|
10232
|
-
};
|
|
10233
|
-
readonly isMultipleOf: {
|
|
10234
|
-
readonly _tag: "isMultipleOf";
|
|
10235
|
-
readonly divisor: number;
|
|
10236
|
-
};
|
|
10237
|
-
readonly isGreaterThan: {
|
|
10238
|
-
readonly _tag: "isGreaterThan";
|
|
10239
|
-
readonly exclusiveMinimum: number;
|
|
10240
|
-
};
|
|
10241
|
-
readonly isGreaterThanOrEqualTo: {
|
|
10242
|
-
readonly _tag: "isGreaterThanOrEqualTo";
|
|
10243
|
-
readonly minimum: number;
|
|
10244
|
-
};
|
|
10245
|
-
readonly isLessThan: {
|
|
10246
|
-
readonly _tag: "isLessThan";
|
|
10247
|
-
readonly exclusiveMaximum: number;
|
|
10248
|
-
};
|
|
10249
|
-
readonly isLessThanOrEqualTo: {
|
|
10250
|
-
readonly _tag: "isLessThanOrEqualTo";
|
|
10251
|
-
readonly maximum: number;
|
|
10252
|
-
};
|
|
10253
|
-
readonly isBetween: {
|
|
10254
|
-
readonly _tag: "isBetween";
|
|
10255
|
-
readonly minimum: number;
|
|
10256
|
-
readonly maximum: number;
|
|
10257
|
-
readonly exclusiveMinimum?: boolean | undefined;
|
|
10258
|
-
readonly exclusiveMaximum?: boolean | undefined;
|
|
10259
|
-
};
|
|
10260
|
-
readonly isGreaterThanBigInt: {
|
|
10261
|
-
readonly _tag: "isGreaterThanBigInt";
|
|
10262
|
-
readonly exclusiveMinimum: bigint;
|
|
10263
|
-
};
|
|
10264
|
-
readonly isGreaterThanOrEqualToBigInt: {
|
|
10265
|
-
readonly _tag: "isGreaterThanOrEqualToBigInt";
|
|
10266
|
-
readonly minimum: bigint;
|
|
10267
|
-
};
|
|
10268
|
-
readonly isLessThanBigInt: {
|
|
10269
|
-
readonly _tag: "isLessThanBigInt";
|
|
10270
|
-
readonly exclusiveMaximum: bigint;
|
|
10271
|
-
};
|
|
10272
|
-
readonly isLessThanOrEqualToBigInt: {
|
|
10273
|
-
readonly _tag: "isLessThanOrEqualToBigInt";
|
|
10274
|
-
readonly maximum: bigint;
|
|
10275
|
-
};
|
|
10276
|
-
readonly isBetweenBigInt: {
|
|
10277
|
-
readonly _tag: "isBetweenBigInt";
|
|
10278
|
-
readonly minimum: bigint;
|
|
10279
|
-
readonly maximum: bigint;
|
|
10280
|
-
readonly exclusiveMinimum?: boolean | undefined;
|
|
10281
|
-
readonly exclusiveMaximum?: boolean | undefined;
|
|
10282
|
-
};
|
|
10283
|
-
readonly isDateValid: {
|
|
10284
|
-
readonly _tag: "isDateValid";
|
|
10285
|
-
};
|
|
10286
|
-
readonly isGreaterThanDate: {
|
|
10287
|
-
readonly _tag: "isGreaterThanDate";
|
|
10288
|
-
readonly exclusiveMinimum: globalThis.Date;
|
|
10289
|
-
};
|
|
10290
|
-
readonly isGreaterThanOrEqualToDate: {
|
|
10291
|
-
readonly _tag: "isGreaterThanOrEqualToDate";
|
|
10292
|
-
readonly minimum: globalThis.Date;
|
|
10293
|
-
};
|
|
10294
|
-
readonly isLessThanDate: {
|
|
10295
|
-
readonly _tag: "isLessThanDate";
|
|
10296
|
-
readonly exclusiveMaximum: globalThis.Date;
|
|
10297
|
-
};
|
|
10298
|
-
readonly isLessThanOrEqualToDate: {
|
|
10299
|
-
readonly _tag: "isLessThanOrEqualToDate";
|
|
10300
|
-
readonly maximum: globalThis.Date;
|
|
10301
|
-
};
|
|
10302
|
-
readonly isBetweenDate: {
|
|
10303
|
-
readonly _tag: "isBetweenDate";
|
|
10304
|
-
readonly minimum: globalThis.Date;
|
|
10305
|
-
readonly maximum: globalThis.Date;
|
|
10306
|
-
readonly exclusiveMinimum?: boolean | undefined;
|
|
10307
|
-
readonly exclusiveMaximum?: boolean | undefined;
|
|
10308
|
-
};
|
|
10309
|
-
readonly isMinProperties: {
|
|
10310
|
-
readonly _tag: "isMinProperties";
|
|
10311
|
-
readonly minProperties: number;
|
|
10312
|
-
};
|
|
10313
|
-
readonly isMaxProperties: {
|
|
10314
|
-
readonly _tag: "isMaxProperties";
|
|
10315
|
-
readonly maxProperties: number;
|
|
10316
|
-
};
|
|
10317
|
-
readonly isPropertiesLengthBetween: {
|
|
10318
|
-
readonly _tag: "isPropertiesLengthBetween";
|
|
10319
|
-
readonly minimum: number;
|
|
10320
|
-
readonly maximum: number;
|
|
10321
|
-
};
|
|
10322
|
-
readonly isPropertyNames: {
|
|
10323
|
-
readonly _tag: "isPropertyNames";
|
|
10324
|
-
readonly propertyNames: SchemaAST.AST;
|
|
10325
|
-
};
|
|
10326
|
-
readonly isUnique: {
|
|
10327
|
-
readonly _tag: "isUnique";
|
|
10328
|
-
};
|
|
10329
|
-
readonly isMinSize: {
|
|
10330
|
-
readonly _tag: "isMinSize";
|
|
10331
|
-
readonly minSize: number;
|
|
10332
|
-
};
|
|
10333
|
-
readonly isMaxSize: {
|
|
10334
|
-
readonly _tag: "isMaxSize";
|
|
10335
|
-
readonly maxSize: number;
|
|
10336
|
-
};
|
|
10337
|
-
readonly isSizeBetween: {
|
|
10338
|
-
readonly _tag: "isSizeBetween";
|
|
10339
|
-
readonly minimum: number;
|
|
10340
|
-
readonly maximum: number;
|
|
10341
|
-
};
|
|
10342
|
-
}
|
|
10343
|
-
/**
|
|
10344
|
-
* Union of all metadata payloads defined by `BuiltInMetaDefinitions`.
|
|
10345
|
-
*
|
|
10346
|
-
* @category utility types
|
|
10347
|
-
* @since 4.0.0
|
|
10348
|
-
*/
|
|
10349
|
-
type BuiltInMeta = BuiltInMetaDefinitions[keyof BuiltInMetaDefinitions];
|
|
10350
|
-
/**
|
|
10351
|
-
* Augmentable registry of schema filter metadata payloads.
|
|
10352
|
-
*
|
|
10353
|
-
* **Details**
|
|
10354
|
-
*
|
|
10355
|
-
* Extend this interface to add custom values accepted by annotation `meta`
|
|
10356
|
-
* fields.
|
|
10357
|
-
*
|
|
10358
|
-
* @category models
|
|
10359
|
-
* @since 4.0.0
|
|
10360
|
-
*/
|
|
10361
|
-
interface MetaDefinitions extends BuiltInMetaDefinitions {
|
|
10362
|
-
}
|
|
10363
|
-
/**
|
|
10364
|
-
* Union of built-in and user-augmented schema filter metadata payloads.
|
|
10365
|
-
*
|
|
10366
|
-
* @category utility types
|
|
10367
|
-
* @since 4.0.0
|
|
10368
|
-
*/
|
|
10369
|
-
type Meta = MetaDefinitions[keyof MetaDefinitions];
|
|
10370
11143
|
}
|
|
10371
11144
|
//# sourceMappingURL=Schema.d.ts.map
|