effect 4.0.0-beta.94 → 4.0.0-beta.98
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/BigDecimal.d.ts.map +1 -1
- package/dist/BigDecimal.js.map +1 -1
- package/dist/BigInt.d.ts.map +1 -1
- package/dist/Boolean.d.ts.map +1 -1
- package/dist/Brand.d.ts.map +1 -1
- package/dist/Cache.d.ts.map +1 -1
- package/dist/Cause.d.ts.map +1 -1
- package/dist/Channel.d.ts.map +1 -1
- package/dist/ChannelSchema.d.ts.map +1 -1
- package/dist/Chunk.d.ts.map +1 -1
- package/dist/Combiner.d.ts.map +1 -1
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js.map +1 -1
- package/dist/ConfigProvider.d.ts +44 -6
- package/dist/ConfigProvider.d.ts.map +1 -1
- package/dist/ConfigProvider.js +63 -24
- package/dist/ConfigProvider.js.map +1 -1
- package/dist/Console.d.ts.map +1 -1
- package/dist/Context.d.ts.map +1 -1
- package/dist/Cron.d.ts +4 -1
- package/dist/Cron.d.ts.map +1 -1
- package/dist/Cron.js +98 -53
- package/dist/Cron.js.map +1 -1
- package/dist/Crypto.d.ts.map +1 -1
- package/dist/Data.d.ts.map +1 -1
- package/dist/DateTime.d.ts +12 -12
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/Deferred.d.ts.map +1 -1
- package/dist/Duration.d.ts.map +1 -1
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effectable.d.ts.map +1 -1
- package/dist/Encoding.d.ts.map +1 -1
- package/dist/Equal.d.ts.map +1 -1
- package/dist/Equivalence.d.ts.map +1 -1
- package/dist/ErrorReporter.d.ts.map +1 -1
- package/dist/ExecutionPlan.d.ts +2 -2
- package/dist/ExecutionPlan.d.ts.map +1 -1
- package/dist/Fiber.d.ts.map +1 -1
- package/dist/FiberHandle.d.ts +8 -8
- package/dist/FiberHandle.d.ts.map +1 -1
- package/dist/FiberMap.d.ts +8 -8
- package/dist/FiberMap.d.ts.map +1 -1
- package/dist/FiberSet.d.ts +4 -4
- package/dist/FiberSet.d.ts.map +1 -1
- package/dist/FileSystem.d.ts.map +1 -1
- package/dist/Filter.d.ts.map +1 -1
- package/dist/Function.d.ts.map +1 -1
- package/dist/Graph.d.ts.map +1 -1
- package/dist/Graph.js.map +1 -1
- package/dist/Hash.d.ts.map +1 -1
- package/dist/HashMap.d.ts.map +1 -1
- package/dist/HashRing.d.ts.map +1 -1
- package/dist/Inspectable.d.ts.map +1 -1
- package/dist/Inspectable.js.map +1 -1
- package/dist/Iterable.d.ts.map +1 -1
- package/dist/Latch.d.ts.map +1 -1
- package/dist/Layer.d.ts.map +1 -1
- package/dist/LayerMap.d.ts.map +1 -1
- package/dist/LayerRef.d.ts +5 -7
- package/dist/LayerRef.d.ts.map +1 -1
- package/dist/LayerRef.js +4 -6
- package/dist/LayerRef.js.map +1 -1
- package/dist/LogLevel.d.ts.map +1 -1
- package/dist/Logger.d.ts.map +1 -1
- package/dist/ManagedRuntime.d.ts.map +1 -1
- package/dist/Metric.d.ts.map +1 -1
- package/dist/MutableHashMap.d.ts.map +1 -1
- package/dist/MutableHashSet.d.ts.map +1 -1
- package/dist/MutableList.d.ts.map +1 -1
- package/dist/MutableRef.d.ts.map +1 -1
- package/dist/NonEmptyIterable.d.ts.map +1 -1
- package/dist/Number.d.ts.map +1 -1
- package/dist/Number.js +28 -10
- package/dist/Number.js.map +1 -1
- package/dist/Optic.d.ts.map +1 -1
- package/dist/Option.d.ts.map +1 -1
- package/dist/Order.d.ts.map +1 -1
- package/dist/Ordering.d.ts.map +1 -1
- package/dist/PartitionedSemaphore.d.ts.map +1 -1
- package/dist/Pipeable.d.ts.map +1 -1
- package/dist/PlatformError.d.ts.map +1 -1
- package/dist/Pool.d.ts.map +1 -1
- package/dist/PrimaryKey.d.ts.map +1 -1
- package/dist/PubSub.d.ts.map +1 -1
- package/dist/Pull.d.ts.map +1 -1
- package/dist/Queue.d.ts.map +1 -1
- package/dist/Random.d.ts.map +1 -1
- package/dist/RcMap.d.ts.map +1 -1
- package/dist/Record.d.ts.map +1 -1
- package/dist/Redactable.d.ts.map +1 -1
- package/dist/Redacted.d.ts.map +1 -1
- package/dist/Ref.d.ts.map +1 -1
- package/dist/RegExp.d.ts.map +1 -1
- package/dist/Request.d.ts +1 -1
- package/dist/Request.d.ts.map +1 -1
- package/dist/RequestResolver.d.ts.map +1 -1
- package/dist/Resource.d.ts.map +1 -1
- package/dist/Result.d.ts.map +1 -1
- package/dist/Runtime.d.ts.map +1 -1
- package/dist/Schedule.d.ts +1206 -4013
- package/dist/Schedule.d.ts.map +1 -1
- package/dist/Schedule.js +244 -1348
- package/dist/Schedule.js.map +1 -1
- package/dist/Scheduler.d.ts.map +1 -1
- package/dist/Scheduler.js.map +1 -1
- package/dist/Schema.d.ts +71 -22
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +76 -33
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +25 -10
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaError.d.ts +53 -0
- package/dist/SchemaError.d.ts.map +1 -0
- package/dist/SchemaError.js +61 -0
- package/dist/SchemaError.js.map +1 -0
- package/dist/SchemaGetter.d.ts.map +1 -1
- package/dist/SchemaGetter.js +17 -12
- package/dist/SchemaGetter.js.map +1 -1
- package/dist/SchemaIssue.d.ts.map +1 -1
- package/dist/SchemaIssue.js.map +1 -1
- package/dist/SchemaParser.d.ts.map +1 -1
- package/dist/SchemaRepresentation.d.ts +106 -106
- package/dist/SchemaRepresentation.d.ts.map +1 -1
- package/dist/SchemaRepresentation.js +186 -224
- package/dist/SchemaRepresentation.js.map +1 -1
- package/dist/SchemaTransformation.d.ts +38 -2
- package/dist/SchemaTransformation.d.ts.map +1 -1
- package/dist/SchemaTransformation.js +38 -2
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/ScopedCache.d.ts.map +1 -1
- package/dist/ScopedRef.d.ts.map +1 -1
- package/dist/Semaphore.d.ts.map +1 -1
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Stdio.d.ts.map +1 -1
- package/dist/Stream.d.ts +2 -2
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +1 -1
- package/dist/String.d.ts.map +1 -1
- package/dist/String.js.map +1 -1
- package/dist/Struct.d.ts.map +1 -1
- package/dist/SubscriptionRef.d.ts.map +1 -1
- package/dist/SynchronizedRef.d.ts.map +1 -1
- package/dist/Take.d.ts.map +1 -1
- package/dist/Terminal.d.ts.map +1 -1
- package/dist/Tracer.d.ts.map +1 -1
- package/dist/Trie.d.ts.map +1 -1
- package/dist/Tuple.d.ts.map +1 -1
- package/dist/TxChunk.d.ts.map +1 -1
- package/dist/TxDeferred.d.ts.map +1 -1
- package/dist/TxHashMap.d.ts.map +1 -1
- package/dist/TxHashSet.d.ts.map +1 -1
- package/dist/TxPriorityQueue.d.ts.map +1 -1
- package/dist/TxPubSub.d.ts.map +1 -1
- package/dist/TxQueue.d.ts.map +1 -1
- package/dist/TxReentrantLock.d.ts.map +1 -1
- package/dist/TxRef.d.ts.map +1 -1
- package/dist/TxSemaphore.d.ts.map +1 -1
- package/dist/TxSubscriptionRef.d.ts.map +1 -1
- package/dist/Types.d.ts +1 -1
- package/dist/Types.d.ts.map +1 -1
- package/dist/UndefinedOr.d.ts.map +1 -1
- package/dist/Utils.d.ts.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/internal/effect.js +26 -8
- package/dist/internal/effect.js.map +1 -1
- package/dist/internal/schema/equivalence.js +1 -2
- package/dist/internal/schema/equivalence.js.map +1 -1
- package/dist/internal/schema/representation.js +1 -3
- package/dist/internal/schema/representation.js.map +1 -1
- package/dist/internal/schema/schema.d.ts +0 -13
- package/dist/internal/schema/schema.d.ts.map +1 -1
- package/dist/internal/schema/schema.js +4 -29
- package/dist/internal/schema/schema.js.map +1 -1
- package/dist/testing/TestClock.d.ts.map +1 -1
- package/dist/testing/TestConsole.d.ts.map +1 -1
- package/dist/testing/TestSchema.d.ts.map +1 -1
- package/dist/unstable/ai/AiError.d.ts +1 -1
- package/dist/unstable/ai/AiError.d.ts.map +1 -1
- package/dist/unstable/ai/Chat.d.ts +1 -1
- package/dist/unstable/ai/Chat.d.ts.map +1 -1
- package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
- package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
- package/dist/unstable/ai/McpSchema.d.ts +278 -278
- package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
- package/dist/unstable/ai/McpServer.d.ts.map +1 -1
- package/dist/unstable/ai/Model.d.ts.map +1 -1
- package/dist/unstable/ai/Prompt.d.ts.map +1 -1
- package/dist/unstable/ai/Response.d.ts.map +1 -1
- package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
- package/dist/unstable/ai/Tokenizer.d.ts.map +1 -1
- package/dist/unstable/ai/Tool.d.ts.map +1 -1
- package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
- package/dist/unstable/cli/Argument.d.ts.map +1 -1
- package/dist/unstable/cli/CliError.d.ts +8 -16
- package/dist/unstable/cli/CliError.d.ts.map +1 -1
- package/dist/unstable/cli/CliError.js +8 -16
- package/dist/unstable/cli/CliError.js.map +1 -1
- package/dist/unstable/cli/CliOutput.d.ts.map +1 -1
- package/dist/unstable/cli/Command.d.ts +4 -3
- package/dist/unstable/cli/Command.d.ts.map +1 -1
- package/dist/unstable/cli/Command.js +3 -3
- package/dist/unstable/cli/Command.js.map +1 -1
- package/dist/unstable/cli/Completions.d.ts.map +1 -1
- package/dist/unstable/cli/Flag.d.ts.map +1 -1
- package/dist/unstable/cli/GlobalFlag.d.ts +6 -8
- package/dist/unstable/cli/GlobalFlag.d.ts.map +1 -1
- package/dist/unstable/cli/GlobalFlag.js +6 -6
- package/dist/unstable/cli/GlobalFlag.js.map +1 -1
- package/dist/unstable/cli/Param.d.ts.map +1 -1
- package/dist/unstable/cli/Primitive.d.ts.map +1 -1
- package/dist/unstable/cli/Prompt.d.ts.map +1 -1
- package/dist/unstable/cli/Prompt.js.map +1 -1
- package/dist/unstable/cli/internal/ansi.d.ts.map +1 -1
- package/dist/unstable/cli/internal/ansi.js.map +1 -1
- package/dist/unstable/cli/internal/command.d.ts.map +1 -1
- package/dist/unstable/cli/internal/help.d.ts.map +1 -1
- package/dist/unstable/cli/internal/parser.js.map +1 -1
- package/dist/unstable/cluster/ClusterCron.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterCron.js +1 -1
- package/dist/unstable/cluster/ClusterCron.js.map +1 -1
- package/dist/unstable/cluster/ClusterError.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.d.ts +1 -1
- package/dist/unstable/cluster/ClusterSchema.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.js +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/unstable/cluster/DeliverAt.d.ts.map +1 -1
- package/dist/unstable/cluster/Entity.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityAddress.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityId.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityProxy.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.d.ts +1 -1
- package/dist/unstable/cluster/EntityProxyServer.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.js +2 -4
- package/dist/unstable/cluster/EntityProxyServer.js.map +1 -1
- package/dist/unstable/cluster/EntityType.d.ts.map +1 -1
- package/dist/unstable/cluster/Envelope.d.ts.map +1 -1
- package/dist/unstable/cluster/HttpRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/MachineId.d.ts.map +1 -1
- package/dist/unstable/cluster/Message.d.ts.map +1 -1
- package/dist/unstable/cluster/MessageStorage.d.ts +25 -29
- package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/Reply.d.ts.map +1 -1
- package/dist/unstable/cluster/Runner.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerAddress.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerServer.d.ts +1 -1
- package/dist/unstable/cluster/RunnerStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/Runners.d.ts +8 -8
- package/dist/unstable/cluster/ShardId.d.ts.map +1 -1
- package/dist/unstable/cluster/Sharding.js +3 -4
- package/dist/unstable/cluster/Sharding.js.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts +6 -8
- package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts.map +1 -1
- package/dist/unstable/cluster/SingleRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/Singleton.d.ts.map +1 -1
- package/dist/unstable/cluster/SingletonAddress.d.ts.map +1 -1
- package/dist/unstable/cluster/Snowflake.d.ts +1 -1
- package/dist/unstable/cluster/Snowflake.d.ts.map +1 -1
- package/dist/unstable/cluster/Snowflake.js +1 -1
- package/dist/unstable/cluster/Snowflake.js.map +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/SqlRunnerStorage.d.ts +1 -1
- package/dist/unstable/cluster/SqlRunnerStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/internal/entityManager.js +26 -24
- package/dist/unstable/cluster/internal/entityManager.js.map +1 -1
- package/dist/unstable/devtools/DevTools.d.ts.map +1 -1
- package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
- package/dist/unstable/encoding/Ndjson.d.ts.map +1 -1
- package/dist/unstable/encoding/Sse.d.ts.map +1 -1
- package/dist/unstable/eventlog/Event.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventGroup.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventJournal.d.ts.map +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 +2 -2
- package/dist/unstable/eventlog/EventLog.js.map +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.d.ts +21 -21
- package/dist/unstable/eventlog/EventLogServer.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +3 -4
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts.map +1 -1
- package/dist/unstable/http/Cookies.d.ts +1 -1
- package/dist/unstable/http/Cookies.d.ts.map +1 -1
- package/dist/unstable/http/Etag.d.ts.map +1 -1
- package/dist/unstable/http/Headers.d.ts.map +1 -1
- package/dist/unstable/http/HttpBody.d.ts.map +1 -1
- package/dist/unstable/http/HttpClient.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientError.d.ts +1 -1
- package/dist/unstable/http/HttpClientError.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpEffect.d.ts.map +1 -1
- package/dist/unstable/http/HttpIncomingMessage.d.ts.map +1 -1
- package/dist/unstable/http/HttpMethod.d.ts.map +1 -1
- package/dist/unstable/http/HttpMiddleware.d.ts +1 -1
- package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
- package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
- package/dist/unstable/http/HttpServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerError.d.ts +1 -1
- package/dist/unstable/http/HttpServerError.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRequest.d.ts +2 -2
- package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRespondable.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpStaticServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpTraceContext.d.ts.map +1 -1
- package/dist/unstable/http/Multipart.d.ts +2 -1
- package/dist/unstable/http/Multipart.d.ts.map +1 -1
- package/dist/unstable/http/Url.d.ts.map +1 -1
- package/dist/unstable/http/UrlParams.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApi.d.ts +36 -15
- package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApi.js +19 -20
- package/dist/unstable/httpapi/HttpApi.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts +51 -62
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js +68 -58
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.d.ts +53 -53
- package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.js +40 -30
- package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +171 -170
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.js +31 -19
- package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts +23 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.js +31 -0
- package/dist/unstable/httpapi/HttpApiError.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.d.ts +55 -30
- package/dist/unstable/httpapi/HttpApiGroup.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.js +22 -29
- package/dist/unstable/httpapi/HttpApiGroup.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +8 -8
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.d.ts +2 -2
- package/dist/unstable/httpapi/HttpApiScalar.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.js +4 -3
- package/dist/unstable/httpapi/HttpApiScalar.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.d.ts +8 -0
- package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSwagger.d.ts +1 -1
- package/dist/unstable/httpapi/HttpApiSwagger.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSwagger.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiTest.d.ts +4 -4
- package/dist/unstable/httpapi/HttpApiTest.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiTest.js +9 -8
- package/dist/unstable/httpapi/HttpApiTest.js.map +1 -1
- package/dist/unstable/httpapi/OpenApi.d.ts +1 -1
- package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/OpenApi.js +77 -37
- package/dist/unstable/httpapi/OpenApi.js.map +1 -1
- package/dist/unstable/httpapi/internal/html.js +6 -2
- package/dist/unstable/httpapi/internal/html.js.map +1 -1
- package/dist/unstable/httpapi/internal/mediaType.d.ts +2 -0
- package/dist/unstable/httpapi/internal/mediaType.d.ts.map +1 -0
- package/dist/unstable/httpapi/internal/mediaType.js +7 -0
- package/dist/unstable/httpapi/internal/mediaType.js.map +1 -0
- package/dist/unstable/observability/Otlp.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpExporter.js +3 -1
- package/dist/unstable/observability/OtlpExporter.js.map +1 -1
- package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpResource.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpTracer.d.ts.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/internal/otlpEnv.d.ts.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.d.ts.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
- package/dist/unstable/persistence/Persistable.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.d.ts +1 -1
- package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.js +16 -12
- package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
- package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
- package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
- package/dist/unstable/persistence/Redis.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcess.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcess.js.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
- package/dist/unstable/reactivity/AsyncResult.d.ts +2 -2
- package/dist/unstable/reactivity/AsyncResult.d.ts.map +1 -1
- package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
- package/dist/unstable/reactivity/Atom.js +1 -1
- package/dist/unstable/reactivity/Atom.js.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.d.ts +7 -7
- package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.js +3 -2
- package/dist/unstable/reactivity/AtomHttpApi.js.map +1 -1
- package/dist/unstable/reactivity/AtomRef.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.d.ts +2 -2
- package/dist/unstable/reactivity/AtomRegistry.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.js +28 -37
- package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.d.ts.map +1 -1
- package/dist/unstable/reactivity/Hydration.d.ts.map +1 -1
- package/dist/unstable/reactivity/Reactivity.d.ts.map +1 -1
- package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClient.d.ts +2 -1
- package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClient.js +5 -5
- package/dist/unstable/rpc/RpcClient.js.map +1 -1
- package/dist/unstable/rpc/RpcGroup.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMessage.d.ts +7 -7
- package/dist/unstable/rpc/RpcMessage.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMessage.js +2 -2
- package/dist/unstable/rpc/RpcMessage.js.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSchema.d.ts +1 -1
- package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.js +8 -8
- package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
- package/dist/unstable/rpc/RpcServer.d.ts +5 -3
- package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcServer.js +11 -8
- package/dist/unstable/rpc/RpcServer.js.map +1 -1
- package/dist/unstable/rpc/RpcWorker.d.ts.map +1 -1
- package/dist/unstable/rpc/Utils.d.ts.map +1 -1
- package/dist/unstable/schema/Model.d.ts +24 -38
- package/dist/unstable/schema/Model.d.ts.map +1 -1
- package/dist/unstable/schema/VariantSchema.d.ts +1 -1
- package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
- package/dist/unstable/socket/Socket.d.ts +1 -1
- package/dist/unstable/socket/Socket.d.ts.map +1 -1
- package/dist/unstable/socket/SocketServer.d.ts.map +1 -1
- package/dist/unstable/sql/Migrator.d.ts.map +1 -1
- package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
- package/dist/unstable/sql/SqlError.d.ts +2 -2
- package/dist/unstable/sql/SqlError.d.ts.map +1 -1
- package/dist/unstable/sql/SqlError.js.map +1 -1
- package/dist/unstable/sql/SqlModel.d.ts.map +1 -1
- package/dist/unstable/sql/SqlResolver.d.ts.map +1 -1
- package/dist/unstable/sql/SqlSchema.d.ts.map +1 -1
- package/dist/unstable/sql/SqlStream.d.ts.map +1 -1
- package/dist/unstable/sql/Statement.d.ts.map +1 -1
- package/dist/unstable/workers/Transferable.d.ts.map +1 -1
- package/dist/unstable/workers/Worker.d.ts.map +1 -1
- package/dist/unstable/workers/WorkerError.d.ts.map +1 -1
- package/dist/unstable/workflow/Activity.d.ts +1 -1
- package/dist/unstable/workflow/Activity.d.ts.map +1 -1
- package/dist/unstable/workflow/Activity.js +1 -1
- package/dist/unstable/workflow/Activity.js.map +1 -1
- package/dist/unstable/workflow/DurableClock.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.js +1 -1
- package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
- package/dist/unstable/workflow/DurableQueue.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableQueue.js +1 -1
- package/dist/unstable/workflow/DurableQueue.js.map +1 -1
- package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
- package/dist/unstable/workflow/WorkflowProxy.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowProxyServer.d.ts +1 -1
- package/dist/unstable/workflow/WorkflowProxyServer.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowProxyServer.js +1 -2
- package/dist/unstable/workflow/WorkflowProxyServer.js.map +1 -1
- package/package.json +11 -12
- package/src/ConfigProvider.ts +79 -27
- package/src/Cron.ts +109 -57
- package/src/LayerRef.ts +4 -6
- package/src/Number.ts +29 -10
- package/src/Schedule.ts +1437 -4445
- package/src/Schema.ts +95 -34
- package/src/SchemaAST.ts +25 -13
- package/src/SchemaError.ts +64 -0
- package/src/SchemaGetter.ts +22 -16
- package/src/SchemaRepresentation.ts +165 -202
- package/src/SchemaTransformation.ts +42 -2
- package/src/Stream.ts +1 -1
- package/src/index.ts +10 -0
- package/src/internal/effect.ts +39 -22
- package/src/internal/schema/equivalence.ts +1 -2
- package/src/internal/schema/representation.ts +4 -4
- package/src/internal/schema/schema.ts +4 -37
- package/src/unstable/cli/CliError.ts +24 -16
- package/src/unstable/cli/Command.ts +8 -8
- package/src/unstable/cli/GlobalFlag.ts +22 -33
- package/src/unstable/cluster/ClusterCron.ts +4 -3
- package/src/unstable/cluster/ClusterWorkflowEngine.ts +4 -3
- package/src/unstable/cluster/EntityProxyServer.ts +15 -17
- package/src/unstable/cluster/Sharding.ts +4 -4
- package/src/unstable/cluster/Snowflake.ts +2 -2
- package/src/unstable/cluster/internal/entityManager.ts +61 -47
- package/src/unstable/eventlog/EventLog.ts +4 -3
- package/src/unstable/httpapi/HttpApi.ts +72 -47
- package/src/unstable/httpapi/HttpApiBuilder.ts +320 -217
- package/src/unstable/httpapi/HttpApiClient.ts +196 -151
- package/src/unstable/httpapi/HttpApiEndpoint.ts +251 -447
- package/src/unstable/httpapi/HttpApiError.ts +33 -0
- package/src/unstable/httpapi/HttpApiGroup.ts +95 -74
- package/src/unstable/httpapi/HttpApiMiddleware.ts +10 -7
- package/src/unstable/httpapi/HttpApiScalar.ts +15 -12
- package/src/unstable/httpapi/HttpApiSchema.ts +8 -0
- package/src/unstable/httpapi/HttpApiSwagger.ts +2 -2
- package/src/unstable/httpapi/HttpApiTest.ts +15 -14
- package/src/unstable/httpapi/OpenApi.ts +74 -36
- package/src/unstable/httpapi/internal/html.ts +9 -2
- package/src/unstable/httpapi/internal/mediaType.ts +6 -0
- package/src/unstable/observability/OtlpExporter.ts +1 -1
- package/src/unstable/persistence/PersistedQueue.ts +16 -14
- package/src/unstable/reactivity/Atom.ts +1 -1
- package/src/unstable/reactivity/AtomHttpApi.ts +164 -162
- package/src/unstable/reactivity/AtomRegistry.ts +35 -44
- package/src/unstable/rpc/RpcClient.ts +10 -9
- package/src/unstable/rpc/RpcMessage.ts +8 -9
- package/src/unstable/rpc/RpcSerialization.ts +16 -16
- package/src/unstable/rpc/RpcServer.ts +15 -9
- package/src/unstable/workflow/Activity.ts +6 -5
- package/src/unstable/workflow/DurableDeferred.ts +1 -1
- package/src/unstable/workflow/DurableQueue.ts +4 -3
- package/src/unstable/workflow/WorkflowEngine.ts +4 -3
- package/src/unstable/workflow/WorkflowProxyServer.ts +11 -12
|
@@ -15,6 +15,7 @@ import * as Cause from "../../Cause.ts"
|
|
|
15
15
|
import type * as Context from "../../Context.ts"
|
|
16
16
|
import * as Effect from "../../Effect.ts"
|
|
17
17
|
import { identity } from "../../Function.ts"
|
|
18
|
+
import * as internalRecord from "../../internal/record.ts"
|
|
18
19
|
import * as Option from "../../Option.ts"
|
|
19
20
|
import * as Predicate from "../../Predicate.ts"
|
|
20
21
|
import * as Schema from "../../Schema.ts"
|
|
@@ -37,6 +38,7 @@ import * as HttpApiEndpoint from "./HttpApiEndpoint.ts"
|
|
|
37
38
|
import type * as HttpApiGroup from "./HttpApiGroup.ts"
|
|
38
39
|
import type * as HttpApiMiddleware from "./HttpApiMiddleware.ts"
|
|
39
40
|
import * as HttpApiSchema from "./HttpApiSchema.ts"
|
|
41
|
+
import * as MediaType from "./internal/mediaType.ts"
|
|
40
42
|
|
|
41
43
|
/**
|
|
42
44
|
* The type-safe client shape generated from HTTP API groups, with non-top-level
|
|
@@ -45,18 +47,15 @@ import * as HttpApiSchema from "./HttpApiSchema.ts"
|
|
|
45
47
|
* @category models
|
|
46
48
|
* @since 4.0.0
|
|
47
49
|
*/
|
|
48
|
-
export type Client<Groups extends HttpApiGroup.
|
|
50
|
+
export type Client<Groups extends HttpApiGroup.Constraint, E = never, R = never> = Simplify<
|
|
49
51
|
& {
|
|
50
|
-
readonly [Group in Extract<Groups, { readonly topLevel: false }> as HttpApiGroup.
|
|
52
|
+
readonly [Group in Extract<Groups, { readonly topLevel: false }> as HttpApiGroup.Identifier<Group>]: Client.Group<
|
|
51
53
|
Group,
|
|
52
|
-
Group["identifier"],
|
|
53
54
|
E,
|
|
54
55
|
R
|
|
55
56
|
>
|
|
56
57
|
}
|
|
57
|
-
&
|
|
58
|
-
readonly [Method in Client.TopLevelMethods<Groups, E, R> as Method[0]]: Method[1]
|
|
59
|
-
}
|
|
58
|
+
& Client.TopLevelMethods<Groups, E, R>
|
|
60
59
|
>
|
|
61
60
|
|
|
62
61
|
/**
|
|
@@ -66,7 +65,7 @@ export type Client<Groups extends HttpApiGroup.Any, E = never, R = never> = Simp
|
|
|
66
65
|
* @category models
|
|
67
66
|
* @since 4.0.0
|
|
68
67
|
*/
|
|
69
|
-
export type ForApi<Api extends HttpApi.
|
|
68
|
+
export type ForApi<Api extends HttpApi.Constraint, E = never, R = never> = Api extends
|
|
70
69
|
HttpApi.HttpApi<infer _Id, infer Groups> ? Client<Groups, E, R> :
|
|
71
70
|
never
|
|
72
71
|
|
|
@@ -122,19 +121,43 @@ export declare namespace Client {
|
|
|
122
121
|
: [Mode] extends ["response-only"] ? HttpClientResponse.HttpClientResponse
|
|
123
122
|
: Success
|
|
124
123
|
|
|
124
|
+
type GroupByEndpoint<Group extends HttpApiGroup.Constraint, E, R> = Group["endpoints"] extends
|
|
125
|
+
infer Endpoints extends Readonly<Record<string, HttpApiEndpoint.ConstraintRequest>> ? {
|
|
126
|
+
readonly [Identifier in keyof Endpoints]: Method<Endpoints[Identifier], E, R>
|
|
127
|
+
}
|
|
128
|
+
: {}
|
|
129
|
+
|
|
125
130
|
/**
|
|
126
|
-
* The client object for one API group, mapping each endpoint
|
|
127
|
-
* its typed client method.
|
|
131
|
+
* The client object for one API group, mapping each endpoint identifier in that
|
|
132
|
+
* group to its typed client method.
|
|
128
133
|
*
|
|
129
134
|
* @category models
|
|
130
135
|
* @since 4.0.0
|
|
131
136
|
*/
|
|
132
|
-
export type Group<
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
137
|
+
export type Group<Group extends HttpApiGroup.Constraint, E, R> = GroupByEndpoint<Group, E, R>
|
|
138
|
+
|
|
139
|
+
type MethodReturn<
|
|
140
|
+
Endpoint extends HttpApiEndpoint.ConstraintRequest,
|
|
141
|
+
E,
|
|
142
|
+
R,
|
|
143
|
+
Mode extends ResponseMode
|
|
144
|
+
> = Effect.Effect<
|
|
145
|
+
Response<SuccessType<Endpoint["~Success"]>, Mode>,
|
|
146
|
+
| HttpApiMiddleware.Error<Endpoint["~Middleware"]>
|
|
147
|
+
| HttpApiMiddleware.ClientError<Endpoint["~Middleware"]>
|
|
148
|
+
| E
|
|
149
|
+
| HttpClientError.HttpClientError
|
|
150
|
+
| ([Mode] extends ["response-only"] ? never : Endpoint["~Error"]["Type"] | Schema.SchemaError),
|
|
151
|
+
| R
|
|
152
|
+
| Endpoint["~Params"]["EncodingServices"]
|
|
153
|
+
| Endpoint["~Query"]["EncodingServices"]
|
|
154
|
+
| Endpoint["~Payload"]["EncodingServices"]
|
|
155
|
+
| Endpoint["~Headers"]["EncodingServices"]
|
|
156
|
+
| ([Mode] extends ["response-only"] ? never
|
|
157
|
+
:
|
|
158
|
+
| SuccessDecodingServices<Endpoint["~Success"]>
|
|
159
|
+
| Endpoint["~Error"]["DecodingServices"])
|
|
160
|
+
>
|
|
138
161
|
|
|
139
162
|
/**
|
|
140
163
|
* The typed function generated for an endpoint, accepting the endpoint request
|
|
@@ -144,40 +167,21 @@ export declare namespace Client {
|
|
|
144
167
|
* @category models
|
|
145
168
|
* @since 4.0.0
|
|
146
169
|
*/
|
|
147
|
-
export type Method<
|
|
148
|
-
HttpApiEndpoint.
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
170
|
+
export type Method<
|
|
171
|
+
Endpoint extends HttpApiEndpoint.ConstraintRequest,
|
|
172
|
+
E,
|
|
173
|
+
R
|
|
174
|
+
> = <Mode extends ResponseMode = ResponseMode>(
|
|
175
|
+
request: Simplify<
|
|
176
|
+
HttpApiEndpoint.ClientRequest<
|
|
177
|
+
Endpoint["~Params"],
|
|
178
|
+
Endpoint["~Query"],
|
|
179
|
+
Endpoint["~Payload"],
|
|
180
|
+
Endpoint["~Headers"],
|
|
181
|
+
Mode
|
|
182
|
+
>
|
|
160
183
|
>
|
|
161
|
-
|
|
162
|
-
request: Simplify<HttpApiEndpoint.ClientRequest<_Params, _Query, _Payload, _Headers, Mode>>
|
|
163
|
-
) => Effect.Effect<
|
|
164
|
-
Response<SuccessType<_Success>, Mode>,
|
|
165
|
-
| HttpApiMiddleware.Error<_Middleware>
|
|
166
|
-
| HttpApiMiddleware.ClientError<_Middleware>
|
|
167
|
-
| E
|
|
168
|
-
| HttpClientError.HttpClientError
|
|
169
|
-
| ([Mode] extends ["response-only"] ? never : _Error["Type"] | Schema.SchemaError),
|
|
170
|
-
| R
|
|
171
|
-
| _Params["EncodingServices"]
|
|
172
|
-
| _Query["EncodingServices"]
|
|
173
|
-
| _Payload["EncodingServices"]
|
|
174
|
-
| _Headers["EncodingServices"]
|
|
175
|
-
| ([Mode] extends ["response-only"] ? never
|
|
176
|
-
:
|
|
177
|
-
| SuccessDecodingServices<_Success>
|
|
178
|
-
| _Error["DecodingServices"])
|
|
179
|
-
> :
|
|
180
|
-
never
|
|
184
|
+
) => MethodReturn<Endpoint, E, R, Mode>
|
|
181
185
|
|
|
182
186
|
/**
|
|
183
187
|
* Extracts client methods for endpoints in top-level groups so they can be exposed
|
|
@@ -186,25 +190,31 @@ export declare namespace Client {
|
|
|
186
190
|
* @category models
|
|
187
191
|
* @since 4.0.0
|
|
188
192
|
*/
|
|
189
|
-
export type TopLevelMethods<Groups extends HttpApiGroup.
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
193
|
+
export type TopLevelMethods<Groups extends HttpApiGroup.Constraint, E, R> = {
|
|
194
|
+
readonly [
|
|
195
|
+
Endpoint in Extract<
|
|
196
|
+
HttpApiGroup.Endpoints<Extract<Groups, { readonly topLevel: true }>>,
|
|
197
|
+
HttpApiEndpoint.ConstraintRequest
|
|
198
|
+
> as Endpoint["identifier"]
|
|
199
|
+
]: Method<Endpoint, E, R>
|
|
200
|
+
}
|
|
195
201
|
}
|
|
196
202
|
|
|
197
|
-
type
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
203
|
+
type UrlBuilderRequestPart<Key extends string, Value> = [Value] extends [never] ? {}
|
|
204
|
+
: { readonly [K in Key]: Value }
|
|
205
|
+
|
|
206
|
+
type UrlBuilderRequest<
|
|
207
|
+
Endpoint extends HttpApiEndpoint.Constraint,
|
|
208
|
+
Params = HttpApiEndpoint.Params<Endpoint>["Type"],
|
|
209
|
+
Query = HttpApiEndpoint.Query<Endpoint>["Type"]
|
|
210
|
+
> = (
|
|
211
|
+
& UrlBuilderRequestPart<"params", Params>
|
|
212
|
+
& UrlBuilderRequestPart<"query", Query>
|
|
202
213
|
) extends infer Request ? keyof Request extends never ? void | undefined : Request
|
|
203
214
|
: never
|
|
204
215
|
|
|
205
|
-
type UrlBuilderArgs<
|
|
206
|
-
[request
|
|
207
|
-
: [request: UrlBuilderRequest<Endpoint>]
|
|
216
|
+
type UrlBuilderArgs<Request> = [Request] extends [void | undefined] ? [request?: Request]
|
|
217
|
+
: [request: Request]
|
|
208
218
|
|
|
209
219
|
/**
|
|
210
220
|
* The type-safe URL builder shape for an HTTP API, mirroring the generated client
|
|
@@ -213,49 +223,50 @@ type UrlBuilderArgs<Endpoint extends HttpApiEndpoint.Any> = [UrlBuilderRequest<E
|
|
|
213
223
|
* @category models
|
|
214
224
|
* @since 4.0.0
|
|
215
225
|
*/
|
|
216
|
-
export type UrlBuilder<Api extends HttpApi.
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
>
|
|
221
|
-
}
|
|
222
|
-
& {
|
|
223
|
-
readonly [Method in UrlBuilderTopLevelMethods<Groups> as Method[0]]: Method[1]
|
|
224
|
-
}
|
|
225
|
-
>
|
|
226
|
+
export type UrlBuilder<Api extends HttpApi.Constraint> = Api extends HttpApi.HttpApi<infer _ApiId, infer Groups> ?
|
|
227
|
+
[Extract<Groups, { readonly topLevel: true }>] extends [never] ? UrlBuilderGroups<Groups>
|
|
228
|
+
: [Extract<Groups, { readonly topLevel: false }>] extends [never] ? UrlBuilderTopLevelMethods<Groups>
|
|
229
|
+
: Simplify<UrlBuilderGroups<Groups> & UrlBuilderTopLevelMethods<Groups>>
|
|
226
230
|
: never
|
|
227
231
|
|
|
228
|
-
type
|
|
229
|
-
readonly [
|
|
232
|
+
type UrlBuilderGroups<Groups extends HttpApiGroup.Constraint> = {
|
|
233
|
+
readonly [Group in Extract<Groups, { readonly topLevel: false }> as HttpApiGroup.Identifier<Group>]: UrlBuilderGroup<
|
|
234
|
+
HttpApiGroup.Endpoints<Group>
|
|
235
|
+
>
|
|
230
236
|
}
|
|
231
237
|
|
|
232
|
-
type
|
|
233
|
-
|
|
238
|
+
type UrlBuilderGroup<Endpoints extends HttpApiEndpoint.Constraint> = {
|
|
239
|
+
readonly [Endpoint in Endpoints as HttpApiEndpoint.Identifier<Endpoint>]: UrlBuilderMethod<Endpoint>
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
type UrlBuilderMethod<Endpoint extends HttpApiEndpoint.Constraint> = (
|
|
243
|
+
...args: UrlBuilderArgs<UrlBuilderRequest<Endpoint>>
|
|
234
244
|
) => string
|
|
235
245
|
|
|
236
|
-
type UrlBuilderTopLevelMethods<Groups extends HttpApiGroup.
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
246
|
+
type UrlBuilderTopLevelMethods<Groups extends HttpApiGroup.Constraint> = {
|
|
247
|
+
readonly [
|
|
248
|
+
Endpoint in HttpApiGroup.Endpoints<Extract<Groups, { readonly topLevel: true }>> as HttpApiEndpoint.Identifier<
|
|
249
|
+
Endpoint
|
|
250
|
+
>
|
|
251
|
+
]: UrlBuilderMethod<Endpoint>
|
|
252
|
+
}
|
|
242
253
|
|
|
243
254
|
/** @internal */
|
|
244
|
-
export const makeClient = <ApiId extends string, Groups extends HttpApiGroup.
|
|
255
|
+
export const makeClient = <ApiId extends string, Groups extends HttpApiGroup.Constraint, E, R>(
|
|
245
256
|
api: HttpApi.HttpApi<ApiId, Groups>,
|
|
246
257
|
options: {
|
|
247
258
|
readonly httpClient: HttpClient.HttpClient.With<E, R>
|
|
248
259
|
readonly predicate?: Predicate.Predicate<{
|
|
249
|
-
readonly endpoint: HttpApiEndpoint.
|
|
250
|
-
readonly group: HttpApiGroup.
|
|
260
|
+
readonly endpoint: HttpApiEndpoint.Top
|
|
261
|
+
readonly group: HttpApiGroup.Top
|
|
251
262
|
}>
|
|
252
263
|
readonly onGroup?: (options: {
|
|
253
|
-
readonly group: HttpApiGroup.
|
|
264
|
+
readonly group: HttpApiGroup.Top
|
|
254
265
|
readonly mergedAnnotations: Context.Context<never>
|
|
255
266
|
}) => void
|
|
256
267
|
readonly onEndpoint: (options: {
|
|
257
|
-
readonly group: HttpApiGroup.
|
|
258
|
-
readonly endpoint: HttpApiEndpoint.
|
|
268
|
+
readonly group: HttpApiGroup.Top
|
|
269
|
+
readonly endpoint: HttpApiEndpoint.Top
|
|
259
270
|
readonly mergedAnnotations: Context.Context<never>
|
|
260
271
|
readonly middleware: ReadonlySet<HttpApiMiddleware.AnyService>
|
|
261
272
|
readonly successes: ReadonlyMap<number, readonly [Schema.Top, ...Array<Schema.Top>]>
|
|
@@ -280,8 +291,8 @@ export const makeClient = <ApiId extends string, Groups extends HttpApiGroup.Any
|
|
|
280
291
|
)
|
|
281
292
|
|
|
282
293
|
function executeMiddleware(
|
|
283
|
-
group: HttpApiGroup.
|
|
284
|
-
endpoint: HttpApiEndpoint.
|
|
294
|
+
group: HttpApiGroup.Top,
|
|
295
|
+
endpoint: HttpApiEndpoint.Top,
|
|
285
296
|
request: HttpClientRequest.HttpClientRequest,
|
|
286
297
|
middlewareKeys: ReadonlyArray<string>,
|
|
287
298
|
index: number
|
|
@@ -321,9 +332,15 @@ export const makeClient = <ApiId extends string, Groups extends HttpApiGroup.Any
|
|
|
321
332
|
(response: HttpClientResponse.HttpClientResponse) => Effect.Effect<unknown, unknown, unknown>
|
|
322
333
|
> = { orElse: statusOrElse }
|
|
323
334
|
const decodeResponse = HttpClientResponse.matchStatus(decodeMap)
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
const
|
|
335
|
+
const errorAlternatives = new Map<number, Array<ResponseAlternative>>()
|
|
336
|
+
for (const [status, schemas] of errors.entries()) {
|
|
337
|
+
const grouped = groupSchemasByContentType(schemas)
|
|
338
|
+
for (const [contentType, schemas] of grouped.entries()) {
|
|
339
|
+
addResponseAlternative(errorAlternatives, status, contentType, schemasToResponse(schemas))
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
for (const [status, alternatives] of errorAlternatives.entries()) {
|
|
343
|
+
const decode = makeResponseDecoder(alternatives)
|
|
327
344
|
decodeMap[status] = (response) =>
|
|
328
345
|
Effect.flatMap(
|
|
329
346
|
Effect.catchCause(decode(response), (cause) =>
|
|
@@ -340,7 +357,7 @@ export const makeClient = <ApiId extends string, Groups extends HttpApiGroup.Any
|
|
|
340
357
|
))),
|
|
341
358
|
Effect.fail
|
|
342
359
|
)
|
|
343
|
-
}
|
|
360
|
+
}
|
|
344
361
|
|
|
345
362
|
const successAlternatives = new Map<number, Array<ResponseAlternative>>()
|
|
346
363
|
for (const [status, schemas] of successes.entries()) {
|
|
@@ -456,7 +473,7 @@ export const makeClient = <ApiId extends string, Groups extends HttpApiGroup.Any
|
|
|
456
473
|
* @category constructors
|
|
457
474
|
* @since 4.0.0
|
|
458
475
|
*/
|
|
459
|
-
export const make = <ApiId extends string, Groups extends HttpApiGroup.
|
|
476
|
+
export const make = <ApiId extends string, Groups extends HttpApiGroup.Constraint>(
|
|
460
477
|
api: HttpApi.HttpApi<ApiId, Groups>,
|
|
461
478
|
options?: {
|
|
462
479
|
readonly transformClient?: ((client: HttpClient.HttpClient) => HttpClient.HttpClient) | undefined
|
|
@@ -484,7 +501,7 @@ export const make = <ApiId extends string, Groups extends HttpApiGroup.Any>(
|
|
|
484
501
|
* @category constructors
|
|
485
502
|
* @since 4.0.0
|
|
486
503
|
*/
|
|
487
|
-
export const makeWith = <ApiId extends string, Groups extends HttpApiGroup.
|
|
504
|
+
export const makeWith = <ApiId extends string, Groups extends HttpApiGroup.Constraint, E, R>(
|
|
488
505
|
api: HttpApi.HttpApi<ApiId, Groups>,
|
|
489
506
|
options: {
|
|
490
507
|
readonly httpClient: HttpClient.HttpClient.With<E, R>
|
|
@@ -493,16 +510,24 @@ export const makeWith = <ApiId extends string, Groups extends HttpApiGroup.Any,
|
|
|
493
510
|
| undefined
|
|
494
511
|
readonly baseUrl?: URL | string | undefined
|
|
495
512
|
}
|
|
496
|
-
): Effect.Effect<
|
|
513
|
+
): Effect.Effect<
|
|
514
|
+
Client<Groups, Exclude<E, HttpClientError.HttpClientError>, R>,
|
|
515
|
+
never,
|
|
516
|
+
HttpApiGroup.MiddlewareClient<Groups>
|
|
517
|
+
> => {
|
|
497
518
|
const client: Record<string, Record<string, any>> = {}
|
|
498
519
|
return makeClient(api, {
|
|
499
520
|
...options,
|
|
500
521
|
onGroup({ group }) {
|
|
501
522
|
if (group.topLevel) return
|
|
502
|
-
client
|
|
523
|
+
internalRecord.set(client, group.identifier, {})
|
|
503
524
|
},
|
|
504
525
|
onEndpoint({ endpoint, endpointFn, group }) {
|
|
505
|
-
|
|
526
|
+
internalRecord.set(
|
|
527
|
+
group.topLevel ? client : client[group.identifier],
|
|
528
|
+
endpoint.identifier,
|
|
529
|
+
endpointFn
|
|
530
|
+
)
|
|
506
531
|
}
|
|
507
532
|
}).pipe(Effect.as(client)) as any
|
|
508
533
|
}
|
|
@@ -516,14 +541,14 @@ export const makeWith = <ApiId extends string, Groups extends HttpApiGroup.Any,
|
|
|
516
541
|
*/
|
|
517
542
|
export const group = <
|
|
518
543
|
ApiId extends string,
|
|
519
|
-
Groups extends HttpApiGroup.
|
|
520
|
-
const
|
|
544
|
+
Groups extends HttpApiGroup.Constraint,
|
|
545
|
+
const GroupIdentifier extends HttpApiGroup.Identifier<Groups>,
|
|
521
546
|
E,
|
|
522
547
|
R
|
|
523
548
|
>(
|
|
524
549
|
api: HttpApi.HttpApi<ApiId, Groups>,
|
|
525
550
|
options: {
|
|
526
|
-
readonly group:
|
|
551
|
+
readonly group: GroupIdentifier
|
|
527
552
|
readonly httpClient: HttpClient.HttpClient.With<E, R>
|
|
528
553
|
readonly transformResponse?:
|
|
529
554
|
| ((effect: Effect.Effect<unknown, unknown, unknown>) => Effect.Effect<unknown, unknown, unknown>)
|
|
@@ -531,20 +556,32 @@ export const group = <
|
|
|
531
556
|
readonly baseUrl?: URL | string | undefined
|
|
532
557
|
}
|
|
533
558
|
): Effect.Effect<
|
|
534
|
-
Client.Group<Groups,
|
|
559
|
+
Client.Group<HttpApiGroup.WithIdentifier<Groups, GroupIdentifier>, E, R>,
|
|
535
560
|
never,
|
|
536
|
-
HttpApiGroup.MiddlewareClient<HttpApiGroup.
|
|
561
|
+
HttpApiGroup.MiddlewareClient<HttpApiGroup.WithIdentifier<Groups, GroupIdentifier>>
|
|
537
562
|
> => {
|
|
538
563
|
const client: Record<string, any> = {}
|
|
539
564
|
return makeClient(api, {
|
|
540
565
|
...options,
|
|
541
566
|
predicate: ({ group }) => group.identifier === options.group,
|
|
542
567
|
onEndpoint({ endpoint, endpointFn }) {
|
|
543
|
-
client
|
|
568
|
+
internalRecord.set(client, endpoint.identifier, endpointFn)
|
|
544
569
|
}
|
|
545
570
|
}).pipe(Effect.map(() => client)) as any
|
|
546
571
|
}
|
|
547
572
|
|
|
573
|
+
type EndpointReturn<
|
|
574
|
+
Groups extends HttpApiGroup.Constraint,
|
|
575
|
+
GroupIdentifier extends HttpApiGroup.Identifier<Groups>,
|
|
576
|
+
EndpointIdentifier extends HttpApiGroup.EndpointsWithIdentifier<Groups, GroupIdentifier>["identifier"],
|
|
577
|
+
E,
|
|
578
|
+
R,
|
|
579
|
+
Endpoint extends HttpApiEndpoint.ConstraintRequest = Extract<
|
|
580
|
+
HttpApiEndpoint.WithIdentifier<HttpApiGroup.EndpointsWithIdentifier<Groups, GroupIdentifier>, EndpointIdentifier>,
|
|
581
|
+
HttpApiEndpoint.ConstraintRequest
|
|
582
|
+
>
|
|
583
|
+
> = Effect.Effect<Client.Method<Endpoint, E, R>, never, HttpApiEndpoint.MiddlewareClient<Endpoint>>
|
|
584
|
+
|
|
548
585
|
/**
|
|
549
586
|
* Builds the typed client method for one endpoint in one API group, using the
|
|
550
587
|
* supplied `HttpClient` and endpoint metadata.
|
|
@@ -554,38 +591,33 @@ export const group = <
|
|
|
554
591
|
*/
|
|
555
592
|
export const endpoint = <
|
|
556
593
|
ApiId extends string,
|
|
557
|
-
Groups extends HttpApiGroup.
|
|
558
|
-
const
|
|
559
|
-
const
|
|
594
|
+
Groups extends HttpApiGroup.Constraint,
|
|
595
|
+
const GroupIdentifier extends HttpApiGroup.Identifier<Groups>,
|
|
596
|
+
const EndpointIdentifier extends HttpApiGroup.EndpointsWithIdentifier<Groups, GroupIdentifier>["identifier"],
|
|
560
597
|
E,
|
|
561
598
|
R
|
|
562
599
|
>(
|
|
563
600
|
api: HttpApi.HttpApi<ApiId, Groups>,
|
|
564
601
|
options: {
|
|
565
|
-
readonly group:
|
|
566
|
-
readonly endpoint:
|
|
602
|
+
readonly group: GroupIdentifier
|
|
603
|
+
readonly endpoint: EndpointIdentifier
|
|
567
604
|
readonly httpClient: HttpClient.HttpClient.With<E, R>
|
|
568
|
-
readonly transformClient?:
|
|
605
|
+
readonly transformClient?:
|
|
606
|
+
| ((client: HttpClient.HttpClient.With<E, R>) => HttpClient.HttpClient.With<E, R>)
|
|
607
|
+
| undefined
|
|
569
608
|
readonly transformResponse?:
|
|
570
609
|
| ((effect: Effect.Effect<unknown, unknown, unknown>) => Effect.Effect<unknown, unknown, unknown>)
|
|
571
610
|
| undefined
|
|
572
611
|
readonly baseUrl?: URL | string | undefined
|
|
573
612
|
}
|
|
574
|
-
):
|
|
575
|
-
Client.Method<
|
|
576
|
-
HttpApiEndpoint.WithName<HttpApiGroup.Endpoints<HttpApiGroup.WithName<Groups, GroupName>>, EndpointName>,
|
|
577
|
-
E,
|
|
578
|
-
R
|
|
579
|
-
>,
|
|
580
|
-
never,
|
|
581
|
-
HttpApiEndpoint.MiddlewareClient<
|
|
582
|
-
HttpApiEndpoint.WithName<HttpApiGroup.Endpoints<HttpApiGroup.WithName<Groups, GroupName>>, EndpointName>
|
|
583
|
-
>
|
|
584
|
-
> => {
|
|
613
|
+
): EndpointReturn<Groups, GroupIdentifier, EndpointIdentifier, E, R> => {
|
|
585
614
|
let client: any = undefined
|
|
586
615
|
return makeClient(api, {
|
|
587
616
|
...options,
|
|
588
|
-
|
|
617
|
+
httpClient: options.transformClient
|
|
618
|
+
? options.transformClient(options.httpClient)
|
|
619
|
+
: options.httpClient,
|
|
620
|
+
predicate: ({ endpoint, group }) => group.identifier === options.group && endpoint.identifier === options.endpoint,
|
|
589
621
|
onEndpoint({ endpointFn }) {
|
|
590
622
|
client = endpointFn
|
|
591
623
|
}
|
|
@@ -622,15 +654,15 @@ export const endpoint = <
|
|
|
622
654
|
* @category constructors
|
|
623
655
|
* @since 4.0.0
|
|
624
656
|
*/
|
|
625
|
-
export const urlBuilder = <Api extends HttpApi.
|
|
657
|
+
export const urlBuilder = <Api extends HttpApi.Constraint>(api: Api, options?: {
|
|
626
658
|
readonly baseUrl?: URL | string | undefined
|
|
627
659
|
}): UrlBuilder<Api> => {
|
|
628
660
|
const builder: Record<string, any> = {}
|
|
629
661
|
|
|
630
|
-
HttpApi.reflect(api as unknown as HttpApi.
|
|
662
|
+
HttpApi.reflect(api as unknown as HttpApi.Top, {
|
|
631
663
|
onGroup({ group }) {
|
|
632
664
|
if (group.topLevel) return
|
|
633
|
-
builder
|
|
665
|
+
internalRecord.set(builder, group.identifier, {})
|
|
634
666
|
},
|
|
635
667
|
onEndpoint({ group, endpoint }) {
|
|
636
668
|
const makeUrl = compilePath(endpoint.path)
|
|
@@ -656,7 +688,11 @@ export const urlBuilder = <Api extends HttpApi.Any>(api: Api, options?: {
|
|
|
656
688
|
const url = query === "" ? path : `${path}?${query}`
|
|
657
689
|
return options?.baseUrl === undefined ? url : new URL(url, options.baseUrl.toString()).toString()
|
|
658
690
|
}
|
|
659
|
-
|
|
691
|
+
internalRecord.set(
|
|
692
|
+
group.topLevel ? builder : builder[group.identifier],
|
|
693
|
+
endpoint.identifier,
|
|
694
|
+
endpointBuilder
|
|
695
|
+
)
|
|
660
696
|
}
|
|
661
697
|
})
|
|
662
698
|
|
|
@@ -706,7 +742,7 @@ function addResponseAlternative(
|
|
|
706
742
|
contentType: string,
|
|
707
743
|
decode: ResponseDecoder
|
|
708
744
|
) {
|
|
709
|
-
const normalizedContentType =
|
|
745
|
+
const normalizedContentType = MediaType.normalize(contentType)
|
|
710
746
|
const alternatives = map.get(status)
|
|
711
747
|
if (alternatives === undefined) {
|
|
712
748
|
map.set(status, [{ contentType: normalizedContentType, decode }])
|
|
@@ -721,7 +757,7 @@ function makeResponseDecoder(alternatives: ReadonlyArray<ResponseAlternative>):
|
|
|
721
757
|
return first.decode
|
|
722
758
|
}
|
|
723
759
|
return (response) => {
|
|
724
|
-
const contentType =
|
|
760
|
+
const contentType = MediaType.normalize(response.headers["content-type"] ?? "")
|
|
725
761
|
const alternative = alternatives.find((alternative) => alternative.contentType === contentType)
|
|
726
762
|
return alternative === undefined
|
|
727
763
|
? failUnsupportedContentType(response, contentType, alternatives)
|
|
@@ -734,7 +770,9 @@ function groupSchemasByContentType(
|
|
|
734
770
|
): Map<string, Arr.NonEmptyReadonlyArray<Schema.Top>> {
|
|
735
771
|
const grouped = new Map<string, [Schema.Top, ...Array<Schema.Top>]>()
|
|
736
772
|
for (const schema of schemas) {
|
|
737
|
-
const contentType = HttpApiSchema.
|
|
773
|
+
const contentType = HttpApiSchema.isNoContent(schema.ast)
|
|
774
|
+
? ""
|
|
775
|
+
: MediaType.normalize(HttpApiSchema.getResponseEncoding(schema.ast).contentType)
|
|
738
776
|
const existing = grouped.get(contentType)
|
|
739
777
|
if (existing === undefined) {
|
|
740
778
|
grouped.set(contentType, [schema])
|
|
@@ -745,12 +783,6 @@ function groupSchemasByContentType(
|
|
|
745
783
|
return grouped
|
|
746
784
|
}
|
|
747
785
|
|
|
748
|
-
function normalizeContentType(contentType: string): string {
|
|
749
|
-
const normalized = contentType.toLowerCase().trim()
|
|
750
|
-
const index = normalized.indexOf(";")
|
|
751
|
-
return index === -1 ? normalized : normalized.slice(0, index).trim()
|
|
752
|
-
}
|
|
753
|
-
|
|
754
786
|
function failUnsupportedContentType(
|
|
755
787
|
response: HttpClientResponse.HttpClientResponse,
|
|
756
788
|
contentType: string,
|
|
@@ -772,7 +804,7 @@ function failUnsupportedContentType(
|
|
|
772
804
|
|
|
773
805
|
const reservedStreamFailureEvent = "effect/httpapi/stream/failure"
|
|
774
806
|
|
|
775
|
-
function getStreamSuccessSchemas(endpoint: HttpApiEndpoint.
|
|
807
|
+
function getStreamSuccessSchemas(endpoint: HttpApiEndpoint.Top): Array<HttpApiSchema.StreamSchema> {
|
|
776
808
|
const schemas: Array<HttpApiSchema.StreamSchema> = []
|
|
777
809
|
for (const schema of endpoint.success) {
|
|
778
810
|
if (HttpApiSchema.isStreamSchema(schema)) {
|
|
@@ -783,47 +815,60 @@ function getStreamSuccessSchemas(endpoint: HttpApiEndpoint.AnyWithProps): Array<
|
|
|
783
815
|
}
|
|
784
816
|
|
|
785
817
|
function streamToResponse(streamSchema: HttpApiSchema.StreamSchema) {
|
|
818
|
+
const sse = HttpApiSchema.isStreamUint8Array(streamSchema)
|
|
819
|
+
? undefined
|
|
820
|
+
: {
|
|
821
|
+
declaration: streamSchema,
|
|
822
|
+
decoder: makeSseDecoder(streamSchema)
|
|
823
|
+
}
|
|
786
824
|
return (response: HttpClientResponse.HttpClientResponse) =>
|
|
787
825
|
Effect.map(Effect.context<never>(), (context) =>
|
|
788
826
|
Stream.provideContext(
|
|
789
|
-
|
|
827
|
+
sse === undefined ?
|
|
790
828
|
response.stream :
|
|
791
|
-
decodeSseStream(response.stream,
|
|
829
|
+
decodeSseStream(response.stream, sse.declaration, sse.decoder),
|
|
792
830
|
context as Context.Context<unknown>
|
|
793
831
|
))
|
|
794
832
|
}
|
|
795
833
|
|
|
796
|
-
function
|
|
797
|
-
stream: Stream.Stream<Uint8Array, HttpClientError.HttpClientError>,
|
|
834
|
+
function makeSseDecoder(
|
|
798
835
|
declaration: HttpApiSchema.StreamSse<Sse.EventCodec, Schema.Constraint, unknown>
|
|
799
|
-
)
|
|
836
|
+
) {
|
|
800
837
|
const Event = Schema.Union([
|
|
801
|
-
declaration.events,
|
|
802
838
|
Schema.Struct({
|
|
803
839
|
event: Schema.Literal(reservedStreamFailureEvent),
|
|
804
840
|
data: Schema.fromJsonString(Schema.toCodecJson(Schema.Cause(declaration.error, Schema.Defect())))
|
|
805
|
-
})
|
|
841
|
+
}),
|
|
842
|
+
declaration.events
|
|
806
843
|
])
|
|
844
|
+
return Sse.decodeSchema(Event)
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
function decodeSseStream(
|
|
848
|
+
stream: Stream.Stream<Uint8Array, HttpClientError.HttpClientError>,
|
|
849
|
+
declaration: HttpApiSchema.StreamSse<Sse.EventCodec, Schema.Constraint, unknown>,
|
|
850
|
+
decoder: ReturnType<typeof makeSseDecoder>
|
|
851
|
+
): Stream.Stream<unknown, unknown, unknown> {
|
|
807
852
|
const events = Stream.transformPull(
|
|
808
853
|
stream.pipe(
|
|
809
854
|
Stream.decodeText,
|
|
810
|
-
Stream.pipeThroughChannel(
|
|
855
|
+
Stream.pipeThroughChannel(decoder)
|
|
811
856
|
),
|
|
812
857
|
(pull) =>
|
|
813
858
|
Effect.sync(() => {
|
|
814
|
-
let
|
|
859
|
+
let pendingFailureCause: Cause.Cause<unknown> | undefined = undefined
|
|
815
860
|
return Effect.suspend(() => {
|
|
816
|
-
if (
|
|
817
|
-
return Effect.failCause(
|
|
861
|
+
if (pendingFailureCause !== undefined) {
|
|
862
|
+
return Effect.failCause(pendingFailureCause)
|
|
818
863
|
}
|
|
819
864
|
return Effect.flatMap(pull, (events) => {
|
|
820
865
|
for (let i = 0; i < events.length; i++) {
|
|
821
866
|
const event = events[i]
|
|
822
|
-
if (event.event === reservedStreamFailureEvent) {
|
|
867
|
+
if (event.event === reservedStreamFailureEvent && Cause.isCause(event.data)) {
|
|
823
868
|
if (i === 0) {
|
|
824
869
|
return Effect.failCause(event.data)
|
|
825
870
|
}
|
|
826
|
-
|
|
871
|
+
pendingFailureCause = event.data
|
|
827
872
|
events = events.slice(0, i) as any
|
|
828
873
|
break
|
|
829
874
|
}
|
|
@@ -986,7 +1031,7 @@ function getEncodePayloadSchemaFromBody(
|
|
|
986
1031
|
if (!Predicate.isObject(t)) {
|
|
987
1032
|
return Effect.fail(new SchemaIssue.InvalidValue(Option.some(t), { message: "Expected a record" }))
|
|
988
1033
|
}
|
|
989
|
-
return Effect.succeed(HttpBody.urlParams(UrlParams.fromInput(t as any)))
|
|
1034
|
+
return Effect.succeed(HttpBody.urlParams(UrlParams.fromInput(t as any), encoding.contentType))
|
|
990
1035
|
}
|
|
991
1036
|
case "Uint8Array": {
|
|
992
1037
|
if (!(t instanceof Uint8Array)) {
|