effect 4.0.0-beta.72 → 4.0.0-beta.74
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 +16 -16
- package/dist/Array.js +4 -4
- package/dist/Boolean.d.ts +2 -2
- package/dist/Boolean.js +2 -2
- package/dist/Channel.d.ts +63 -63
- package/dist/Channel.js +25 -25
- package/dist/Chunk.d.ts +17 -17
- package/dist/Chunk.js +5 -5
- package/dist/Context.d.ts +3 -3
- package/dist/Context.js +1 -1
- package/dist/Cron.d.ts +4 -4
- package/dist/Cron.js +4 -4
- package/dist/Deferred.d.ts +37 -37
- package/dist/Deferred.js +13 -13
- package/dist/Duration.d.ts +6 -6
- package/dist/Duration.js +2 -2
- package/dist/Effect.d.ts +58 -58
- package/dist/Effect.js +39 -39
- package/dist/Equal.d.ts +2 -2
- package/dist/Equal.js +2 -2
- package/dist/Equivalence.d.ts +1 -1
- package/dist/Equivalence.js +1 -1
- package/dist/ExecutionPlan.d.ts +2 -2
- package/dist/ExecutionPlan.js +1 -1
- package/dist/FileSystem.d.ts +6 -6
- package/dist/FileSystem.js +2 -2
- package/dist/Function.d.ts +5 -5
- package/dist/Function.js +5 -5
- package/dist/Graph.d.ts +11 -11
- package/dist/Graph.js +5 -5
- package/dist/HKT.d.ts +1 -1
- package/dist/HashMap.d.ts +3 -3
- package/dist/HashSet.d.ts +1 -1
- package/dist/Iterable.d.ts +15 -15
- package/dist/Iterable.js +5 -5
- package/dist/Layer.d.ts +16 -16
- package/dist/Layer.js +5 -5
- package/dist/Logger.d.ts +5 -5
- package/dist/Logger.js +4 -4
- package/dist/ManagedRuntime.d.ts +2 -2
- package/dist/Match.d.ts +20 -20
- package/dist/Match.js +16 -16
- package/dist/Metric.d.ts +16 -16
- package/dist/Metric.js +3 -3
- package/dist/Option.d.ts +36 -36
- package/dist/Option.js +17 -17
- package/dist/Order.d.ts +1 -1
- package/dist/Order.js +1 -1
- package/dist/Path.d.ts +1 -1
- package/dist/Path.js +1 -1
- package/dist/Pipeable.d.ts +1 -1
- package/dist/Pipeable.js +1 -1
- package/dist/Predicate.d.ts +5 -5
- package/dist/PubSub.d.ts +9 -9
- package/dist/PubSub.js +5 -5
- package/dist/Queue.d.ts +24 -24
- package/dist/Queue.js +20 -20
- package/dist/Record.d.ts +15 -15
- package/dist/Record.js +5 -5
- package/dist/Redacted.d.ts +2 -2
- package/dist/Redacted.js +1 -1
- package/dist/Ref.d.ts +6 -6
- package/dist/Ref.js +6 -6
- package/dist/RegExp.d.ts +1 -1
- package/dist/RegExp.js +1 -1
- package/dist/Request.d.ts +4 -4
- package/dist/RequestResolver.d.ts +6 -6
- package/dist/RequestResolver.js +2 -2
- package/dist/Resource.d.ts +1 -1
- package/dist/Resource.js +1 -1
- package/dist/Result.d.ts +18 -18
- package/dist/Result.js +11 -11
- package/dist/Schedule.d.ts +44 -44
- package/dist/Schedule.js +18 -18
- package/dist/Schema.d.ts +177 -459
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +25 -25
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +1 -1
- package/dist/SchemaGetter.d.ts +13 -13
- package/dist/SchemaGetter.js +12 -12
- package/dist/SchemaParser.d.ts +3 -3
- package/dist/SchemaParser.js +3 -3
- package/dist/Scope.d.ts +1 -1
- package/dist/Scope.js +1 -1
- package/dist/Sink.d.ts +5 -5
- package/dist/Sink.js +3 -3
- package/dist/Stream.d.ts +55 -55
- package/dist/Stream.js +21 -21
- package/dist/String.d.ts +5 -5
- package/dist/String.js +3 -3
- package/dist/Struct.d.ts +8 -8
- package/dist/Struct.js +3 -3
- package/dist/SynchronizedRef.d.ts +57 -57
- package/dist/SynchronizedRef.js +19 -19
- package/dist/Terminal.d.ts +1 -1
- package/dist/Terminal.js +1 -1
- package/dist/Tracer.d.ts +5 -5
- package/dist/Tracer.js +2 -2
- package/dist/Tuple.d.ts +14 -14
- package/dist/Tuple.js +6 -6
- package/dist/TxHashMap.d.ts +3 -3
- package/dist/TxHashSet.d.ts +1 -1
- package/dist/Unify.d.ts +7 -7
- package/dist/Unify.js +1 -1
- package/dist/testing/TestClock.d.ts +5 -5
- package/dist/testing/TestClock.js +4 -4
- package/dist/testing/TestConsole.d.ts +3 -3
- package/dist/testing/TestConsole.js +3 -3
- package/dist/unstable/ai/Chat.d.ts +2 -2
- package/dist/unstable/ai/Chat.js +2 -2
- package/dist/unstable/ai/EmbeddingModel.d.ts +1 -1
- package/dist/unstable/ai/IdGenerator.d.ts +2 -2
- package/dist/unstable/ai/IdGenerator.js +1 -1
- package/dist/unstable/ai/LanguageModel.d.ts +4 -4
- package/dist/unstable/ai/LanguageModel.js +1 -1
- package/dist/unstable/ai/Prompt.d.ts +15 -15
- package/dist/unstable/ai/Prompt.js +1 -1
- package/dist/unstable/ai/Telemetry.d.ts +5 -5
- package/dist/unstable/ai/Telemetry.js +2 -2
- package/dist/unstable/ai/Tokenizer.d.ts +1 -1
- package/dist/unstable/ai/Tokenizer.js +1 -1
- package/dist/unstable/ai/Tool.d.ts +6 -6
- package/dist/unstable/ai/Tool.js +6 -6
- package/dist/unstable/cli/Command.d.ts.map +1 -1
- package/dist/unstable/cli/Command.js +1 -1
- package/dist/unstable/cli/Command.js.map +1 -1
- package/dist/unstable/cli/Param.d.ts +1 -1
- package/dist/unstable/cli/Primitive.d.ts +3 -3
- package/dist/unstable/cli/Primitive.js +1 -1
- package/dist/unstable/cli/Prompt.d.ts +11 -11
- package/dist/unstable/cli/internal/parser.js +145 -10
- package/dist/unstable/cli/internal/parser.js.map +1 -1
- package/dist/unstable/cluster/Entity.d.ts +1 -1
- package/dist/unstable/cluster/Entity.js +1 -1
- package/dist/unstable/cluster/EntityResource.d.ts +1 -0
- package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityResource.js +5 -3
- package/dist/unstable/cluster/EntityResource.js.map +1 -1
- package/dist/unstable/cluster/HttpRunner.d.ts +2 -2
- package/dist/unstable/cluster/HttpRunner.js +2 -2
- package/dist/unstable/cluster/K8sHttpClient.d.ts +1 -1
- package/dist/unstable/cluster/K8sHttpClient.js +1 -1
- package/dist/unstable/cluster/Runners.d.ts +1 -1
- package/dist/unstable/cluster/Runners.js +1 -1
- package/dist/unstable/cluster/Sharding.d.ts +1 -1
- package/dist/unstable/cluster/Sharding.js +1 -1
- package/dist/unstable/cluster/SingletonAddress.d.ts +1 -1
- package/dist/unstable/cluster/SingletonAddress.js +1 -1
- package/dist/unstable/cluster/Snowflake.d.ts +5 -5
- package/dist/unstable/cluster/Snowflake.js +5 -5
- package/dist/unstable/devtools/DevToolsClient.d.ts +1 -1
- package/dist/unstable/devtools/DevToolsClient.js +1 -1
- package/dist/unstable/eventlog/EventLog.d.ts +1 -1
- package/dist/unstable/eventlog/EventLog.js +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.d.ts +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.js +1 -1
- package/dist/unstable/eventlog/EventLogRemote.d.ts +1 -1
- package/dist/unstable/eventlog/EventLogRemote.js +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +3 -3
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js +3 -3
- package/dist/unstable/http/Cookies.d.ts +1 -1
- package/dist/unstable/http/Etag.d.ts +1 -1
- package/dist/unstable/http/Etag.js +1 -1
- package/dist/unstable/http/FetchHttpClient.d.ts +2 -2
- package/dist/unstable/http/FetchHttpClient.js +2 -2
- package/dist/unstable/http/HttpClient.d.ts +1 -1
- package/dist/unstable/http/HttpClient.js +1 -1
- package/dist/unstable/http/HttpClientRequest.d.ts +2 -2
- package/dist/unstable/http/HttpMiddleware.d.ts +1 -1
- package/dist/unstable/http/HttpMiddleware.js +1 -1
- package/dist/unstable/http/HttpPlatform.d.ts +1 -1
- package/dist/unstable/http/HttpPlatform.js +1 -1
- package/dist/unstable/http/HttpRouter.d.ts +4 -4
- package/dist/unstable/http/HttpRouter.js +4 -4
- package/dist/unstable/http/HttpServerResponse.d.ts +3 -3
- package/dist/unstable/http/Url.d.ts +33 -33
- package/dist/unstable/http/Url.js +11 -11
- package/dist/unstable/httpapi/HttpApi.d.ts +1 -1
- package/dist/unstable/httpapi/HttpApi.js +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js +2 -3
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts +13 -13
- package/dist/unstable/httpapi/HttpApiError.js +13 -13
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts +27 -5
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.js +26 -3
- package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
- package/dist/unstable/httpapi/OpenApi.js +2 -2
- package/dist/unstable/httpapi/OpenApi.js.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.d.ts +4 -4
- package/dist/unstable/observability/PrometheusMetrics.js +2 -2
- package/dist/unstable/persistence/KeyValueStore.d.ts +3 -3
- package/dist/unstable/persistence/KeyValueStore.js +1 -1
- package/dist/unstable/persistence/Persistable.d.ts +2 -2
- package/dist/unstable/persistence/Persistable.js +2 -2
- package/dist/unstable/persistence/PersistedQueue.d.ts +8 -8
- package/dist/unstable/persistence/PersistedQueue.js +8 -8
- package/dist/unstable/persistence/RateLimiter.d.ts +1 -1
- package/dist/unstable/persistence/RateLimiter.js +1 -1
- package/dist/unstable/process/ChildProcess.d.ts +5 -5
- package/dist/unstable/process/ChildProcess.js +2 -2
- package/dist/unstable/reactivity/AsyncResult.d.ts +4 -4
- package/dist/unstable/reactivity/AsyncResult.js +1 -1
- package/dist/unstable/reactivity/Atom.d.ts +1 -1
- package/dist/unstable/reactivity/Atom.js +1 -1
- package/dist/unstable/reactivity/AtomRegistry.d.ts +1 -1
- package/dist/unstable/reactivity/AtomRegistry.js +1 -1
- package/dist/unstable/reactivity/Reactivity.d.ts +1 -1
- package/dist/unstable/reactivity/Reactivity.js +1 -1
- package/dist/unstable/rpc/Rpc.d.ts +5 -5
- package/dist/unstable/rpc/Rpc.js +1 -1
- package/dist/unstable/rpc/RpcMiddleware.d.ts +1 -1
- package/dist/unstable/rpc/RpcMiddleware.js +1 -1
- package/dist/unstable/rpc/RpcSchema.d.ts +3 -3
- package/dist/unstable/rpc/RpcSchema.js +2 -2
- package/dist/unstable/schema/Model.d.ts +2 -2
- package/dist/unstable/schema/Model.js +1 -1
- package/dist/unstable/socket/Socket.d.ts +3 -3
- package/dist/unstable/socket/Socket.js +3 -3
- package/dist/unstable/socket/SocketServer.d.ts +1 -1
- package/dist/unstable/socket/SocketServer.js +1 -1
- package/dist/unstable/sql/Migrator.d.ts +1 -1
- package/dist/unstable/sql/SqlClient.d.ts +3 -3
- package/dist/unstable/sql/SqlClient.js +2 -2
- package/dist/unstable/sql/SqlConnection.d.ts +1 -1
- package/dist/unstable/sql/SqlConnection.js +1 -1
- package/dist/unstable/sql/Statement.d.ts +2 -2
- package/dist/unstable/sql/Statement.js +2 -2
- package/dist/unstable/workers/Transferable.d.ts +1 -1
- package/dist/unstable/workers/Transferable.js +1 -1
- package/dist/unstable/workers/Worker.d.ts +1 -1
- package/dist/unstable/workers/Worker.js +1 -1
- package/dist/unstable/workflow/Activity.d.ts +1 -1
- package/dist/unstable/workflow/Activity.js +1 -1
- package/dist/unstable/workflow/DurableDeferred.d.ts +1 -1
- package/dist/unstable/workflow/DurableDeferred.js +1 -1
- package/package.json +1 -1
- package/src/Array.ts +16 -16
- package/src/Boolean.ts +2 -2
- package/src/Channel.ts +67 -67
- package/src/Chunk.ts +18 -18
- package/src/Context.ts +4 -4
- package/src/Cron.ts +4 -4
- package/src/Deferred.ts +37 -37
- package/src/Duration.ts +6 -6
- package/src/Effect.ts +58 -58
- package/src/Equal.ts +2 -2
- package/src/Equivalence.ts +1 -1
- package/src/ExecutionPlan.ts +2 -2
- package/src/FileSystem.ts +6 -6
- package/src/Function.ts +5 -5
- package/src/Graph.ts +11 -11
- package/src/HKT.ts +1 -1
- package/src/HashMap.ts +3 -3
- package/src/HashSet.ts +1 -1
- package/src/Iterable.ts +15 -15
- package/src/Layer.ts +16 -16
- package/src/Logger.ts +7 -7
- package/src/ManagedRuntime.ts +2 -2
- package/src/Match.ts +20 -20
- package/src/Metric.ts +20 -20
- package/src/Option.ts +36 -36
- package/src/Order.ts +1 -1
- package/src/Path.ts +1 -1
- package/src/Pipeable.ts +1 -1
- package/src/Predicate.ts +5 -5
- package/src/PubSub.ts +9 -9
- package/src/Queue.ts +24 -24
- package/src/Record.ts +15 -15
- package/src/Redacted.ts +2 -2
- package/src/Ref.ts +18 -18
- package/src/RegExp.ts +1 -1
- package/src/Request.ts +4 -4
- package/src/RequestResolver.ts +8 -8
- package/src/Resource.ts +1 -1
- package/src/Result.ts +18 -18
- package/src/Schedule.ts +45 -45
- package/src/Schema.ts +177 -459
- package/src/SchemaAST.ts +1 -1
- package/src/SchemaGetter.ts +13 -13
- package/src/SchemaParser.ts +3 -3
- package/src/Scope.ts +1 -1
- package/src/Sink.ts +5 -5
- package/src/Stream.ts +57 -57
- package/src/String.ts +5 -5
- package/src/Struct.ts +8 -8
- package/src/SynchronizedRef.ts +57 -57
- package/src/Terminal.ts +1 -1
- package/src/Tracer.ts +5 -5
- package/src/Tuple.ts +14 -14
- package/src/TxHashMap.ts +3 -3
- package/src/TxHashSet.ts +1 -1
- package/src/Unify.ts +7 -7
- package/src/testing/TestClock.ts +5 -5
- package/src/testing/TestConsole.ts +3 -3
- package/src/unstable/ai/Chat.ts +2 -2
- package/src/unstable/ai/EmbeddingModel.ts +1 -1
- package/src/unstable/ai/IdGenerator.ts +2 -2
- package/src/unstable/ai/LanguageModel.ts +4 -4
- package/src/unstable/ai/Prompt.ts +15 -15
- package/src/unstable/ai/Telemetry.ts +5 -5
- package/src/unstable/ai/Tokenizer.ts +1 -1
- package/src/unstable/ai/Tool.ts +6 -6
- package/src/unstable/cli/Command.ts +5 -1
- package/src/unstable/cli/Param.ts +1 -1
- package/src/unstable/cli/Primitive.ts +3 -3
- package/src/unstable/cli/Prompt.ts +11 -11
- package/src/unstable/cli/internal/parser.ts +204 -10
- package/src/unstable/cluster/Entity.ts +1 -1
- package/src/unstable/cluster/EntityResource.ts +8 -4
- package/src/unstable/cluster/HttpRunner.ts +2 -2
- package/src/unstable/cluster/K8sHttpClient.ts +1 -1
- package/src/unstable/cluster/Runners.ts +1 -1
- package/src/unstable/cluster/Sharding.ts +1 -1
- package/src/unstable/cluster/SingletonAddress.ts +1 -1
- package/src/unstable/cluster/Snowflake.ts +5 -5
- package/src/unstable/devtools/DevToolsClient.ts +1 -1
- package/src/unstable/eventlog/EventLog.ts +1 -1
- package/src/unstable/eventlog/EventLogEncryption.ts +1 -1
- package/src/unstable/eventlog/EventLogRemote.ts +1 -1
- package/src/unstable/eventlog/EventLogServerUnencrypted.ts +3 -3
- package/src/unstable/http/Cookies.ts +1 -1
- package/src/unstable/http/Etag.ts +1 -1
- package/src/unstable/http/FetchHttpClient.ts +2 -2
- package/src/unstable/http/HttpClient.ts +1 -1
- package/src/unstable/http/HttpClientRequest.ts +2 -2
- package/src/unstable/http/HttpMiddleware.ts +1 -1
- package/src/unstable/http/HttpPlatform.ts +1 -1
- package/src/unstable/http/HttpRouter.ts +4 -4
- package/src/unstable/http/HttpServerResponse.ts +3 -3
- package/src/unstable/http/Url.ts +33 -33
- package/src/unstable/httpapi/HttpApi.ts +1 -1
- package/src/unstable/httpapi/HttpApiBuilder.ts +2 -3
- package/src/unstable/httpapi/HttpApiError.ts +13 -13
- package/src/unstable/httpapi/HttpApiSecurity.ts +36 -8
- package/src/unstable/httpapi/OpenApi.ts +2 -2
- package/src/unstable/observability/PrometheusMetrics.ts +4 -4
- package/src/unstable/persistence/KeyValueStore.ts +3 -3
- package/src/unstable/persistence/Persistable.ts +2 -2
- package/src/unstable/persistence/PersistedQueue.ts +8 -8
- package/src/unstable/persistence/RateLimiter.ts +1 -1
- package/src/unstable/process/ChildProcess.ts +5 -5
- package/src/unstable/reactivity/AsyncResult.ts +4 -4
- package/src/unstable/reactivity/Atom.ts +1 -1
- package/src/unstable/reactivity/AtomRegistry.ts +1 -1
- package/src/unstable/reactivity/Reactivity.ts +1 -1
- package/src/unstable/rpc/Rpc.ts +5 -5
- package/src/unstable/rpc/RpcMiddleware.ts +1 -1
- package/src/unstable/rpc/RpcSchema.ts +3 -3
- package/src/unstable/schema/Model.ts +2 -2
- package/src/unstable/socket/Socket.ts +3 -3
- package/src/unstable/socket/SocketServer.ts +1 -1
- package/src/unstable/sql/Migrator.ts +1 -1
- package/src/unstable/sql/SqlClient.ts +3 -3
- package/src/unstable/sql/SqlConnection.ts +1 -1
- package/src/unstable/sql/Statement.ts +2 -2
- package/src/unstable/workers/Transferable.ts +1 -1
- package/src/unstable/workers/Worker.ts +1 -1
- package/src/unstable/workflow/Activity.ts +1 -1
- package/src/unstable/workflow/DurableDeferred.ts +1 -1
|
@@ -302,7 +302,7 @@ export const RouterConfig = Context.Reference<Partial<FindMyWay.RouterConfig>>(
|
|
|
302
302
|
* It provides the route definition and the path parameters captured by the route
|
|
303
303
|
* matcher.
|
|
304
304
|
*
|
|
305
|
-
* @category
|
|
305
|
+
* @category services
|
|
306
306
|
* @since 4.0.0
|
|
307
307
|
*/
|
|
308
308
|
export class RouteContext extends Context.Service<RouteContext, {
|
|
@@ -313,7 +313,7 @@ export class RouteContext extends Context.Service<RouteContext, {
|
|
|
313
313
|
/**
|
|
314
314
|
* Effect that returns the path parameters captured for the current matched route.
|
|
315
315
|
*
|
|
316
|
-
* @category
|
|
316
|
+
* @category getters
|
|
317
317
|
* @since 4.0.0
|
|
318
318
|
*/
|
|
319
319
|
export const params: Effect.Effect<
|
|
@@ -1293,7 +1293,7 @@ export const provideRequest =
|
|
|
1293
1293
|
/**
|
|
1294
1294
|
* Runs the provided application layer as an HTTP server.
|
|
1295
1295
|
*
|
|
1296
|
-
* @category
|
|
1296
|
+
* @category server
|
|
1297
1297
|
* @since 4.0.0
|
|
1298
1298
|
*/
|
|
1299
1299
|
export const serve = <A, E, R, HE, HR = Request.Only<"Requires", R> | Request.Only<"GlobalRequires", R>>(
|
|
@@ -1357,7 +1357,7 @@ export const serve = <A, E, R, HE, HR = Request.Only<"Requires", R> | Request.On
|
|
|
1357
1357
|
* Web `Response` values and a `dispose` function for releasing the layer
|
|
1358
1358
|
* resources.
|
|
1359
1359
|
*
|
|
1360
|
-
* @category
|
|
1360
|
+
* @category server
|
|
1361
1361
|
* @since 4.0.0
|
|
1362
1362
|
*/
|
|
1363
1363
|
export const toWebHandler = <
|
|
@@ -95,7 +95,7 @@ export interface HttpServerResponse extends Inspectable.Inspectable, Pipeable, E
|
|
|
95
95
|
/**
|
|
96
96
|
* Common options accepted by HTTP server response constructors.
|
|
97
97
|
*
|
|
98
|
-
* @category
|
|
98
|
+
* @category options
|
|
99
99
|
* @since 4.0.0
|
|
100
100
|
*/
|
|
101
101
|
export interface Options {
|
|
@@ -118,7 +118,7 @@ export declare namespace Options {
|
|
|
118
118
|
* Response options for constructors whose body determines its own content type
|
|
119
119
|
* and content length.
|
|
120
120
|
*
|
|
121
|
-
* @category
|
|
121
|
+
* @category options
|
|
122
122
|
* @since 4.0.0
|
|
123
123
|
*/
|
|
124
124
|
export interface WithContent extends Omit<Options, "contentType" | "contentLength"> {}
|
|
@@ -127,7 +127,7 @@ export declare namespace Options {
|
|
|
127
127
|
* Response options for constructors that allow overriding the content type while
|
|
128
128
|
* deriving the content length from the body.
|
|
129
129
|
*
|
|
130
|
-
* @category
|
|
130
|
+
* @category options
|
|
131
131
|
* @since 4.0.0
|
|
132
132
|
*/
|
|
133
133
|
export interface WithContentType extends Omit<Options, "contentLength"> {}
|
package/src/unstable/http/Url.ts
CHANGED
|
@@ -234,21 +234,21 @@ const immutableURLSetter = <P extends keyof URL, A = never>(property: P): {
|
|
|
234
234
|
/**
|
|
235
235
|
* Updates the hash fragment of the URL.
|
|
236
236
|
*
|
|
237
|
-
* @category
|
|
237
|
+
* @category setters
|
|
238
238
|
* @since 4.0.0
|
|
239
239
|
*/
|
|
240
240
|
export const setHash: {
|
|
241
241
|
/**
|
|
242
242
|
* Updates the hash fragment of the URL.
|
|
243
243
|
*
|
|
244
|
-
* @category
|
|
244
|
+
* @category setters
|
|
245
245
|
* @since 4.0.0
|
|
246
246
|
*/
|
|
247
247
|
(hash: string): (url: URL) => URL
|
|
248
248
|
/**
|
|
249
249
|
* Updates the hash fragment of the URL.
|
|
250
250
|
*
|
|
251
|
-
* @category
|
|
251
|
+
* @category setters
|
|
252
252
|
* @since 4.0.0
|
|
253
253
|
*/
|
|
254
254
|
(url: URL, hash: string): URL
|
|
@@ -257,21 +257,21 @@ export const setHash: {
|
|
|
257
257
|
/**
|
|
258
258
|
* Updates the host (domain and port) of the URL.
|
|
259
259
|
*
|
|
260
|
-
* @category
|
|
260
|
+
* @category setters
|
|
261
261
|
* @since 4.0.0
|
|
262
262
|
*/
|
|
263
263
|
export const setHost: {
|
|
264
264
|
/**
|
|
265
265
|
* Updates the host (domain and port) of the URL.
|
|
266
266
|
*
|
|
267
|
-
* @category
|
|
267
|
+
* @category setters
|
|
268
268
|
* @since 4.0.0
|
|
269
269
|
*/
|
|
270
270
|
(host: string): (url: URL) => URL
|
|
271
271
|
/**
|
|
272
272
|
* Updates the host (domain and port) of the URL.
|
|
273
273
|
*
|
|
274
|
-
* @category
|
|
274
|
+
* @category setters
|
|
275
275
|
* @since 4.0.0
|
|
276
276
|
*/
|
|
277
277
|
(url: URL, host: string): URL
|
|
@@ -280,21 +280,21 @@ export const setHost: {
|
|
|
280
280
|
/**
|
|
281
281
|
* Updates the domain of the URL without modifying the port.
|
|
282
282
|
*
|
|
283
|
-
* @category
|
|
283
|
+
* @category setters
|
|
284
284
|
* @since 4.0.0
|
|
285
285
|
*/
|
|
286
286
|
export const setHostname: {
|
|
287
287
|
/**
|
|
288
288
|
* Updates the domain of the URL without modifying the port.
|
|
289
289
|
*
|
|
290
|
-
* @category
|
|
290
|
+
* @category setters
|
|
291
291
|
* @since 4.0.0
|
|
292
292
|
*/
|
|
293
293
|
(hostname: string): (url: URL) => URL
|
|
294
294
|
/**
|
|
295
295
|
* Updates the domain of the URL without modifying the port.
|
|
296
296
|
*
|
|
297
|
-
* @category
|
|
297
|
+
* @category setters
|
|
298
298
|
* @since 4.0.0
|
|
299
299
|
*/
|
|
300
300
|
(url: URL, hostname: string): URL
|
|
@@ -303,21 +303,21 @@ export const setHostname: {
|
|
|
303
303
|
/**
|
|
304
304
|
* Replaces the entire URL string.
|
|
305
305
|
*
|
|
306
|
-
* @category
|
|
306
|
+
* @category setters
|
|
307
307
|
* @since 4.0.0
|
|
308
308
|
*/
|
|
309
309
|
export const setHref: {
|
|
310
310
|
/**
|
|
311
311
|
* Replaces the entire URL string.
|
|
312
312
|
*
|
|
313
|
-
* @category
|
|
313
|
+
* @category setters
|
|
314
314
|
* @since 4.0.0
|
|
315
315
|
*/
|
|
316
316
|
(href: string): (url: URL) => URL
|
|
317
317
|
/**
|
|
318
318
|
* Replaces the entire URL string.
|
|
319
319
|
*
|
|
320
|
-
* @category
|
|
320
|
+
* @category setters
|
|
321
321
|
* @since 4.0.0
|
|
322
322
|
*/
|
|
323
323
|
(url: URL, href: string): URL
|
|
@@ -326,21 +326,21 @@ export const setHref: {
|
|
|
326
326
|
/**
|
|
327
327
|
* Updates the password used for authentication.
|
|
328
328
|
*
|
|
329
|
-
* @category
|
|
329
|
+
* @category setters
|
|
330
330
|
* @since 4.0.0
|
|
331
331
|
*/
|
|
332
332
|
export const setPassword: {
|
|
333
333
|
/**
|
|
334
334
|
* Updates the password used for authentication.
|
|
335
335
|
*
|
|
336
|
-
* @category
|
|
336
|
+
* @category setters
|
|
337
337
|
* @since 4.0.0
|
|
338
338
|
*/
|
|
339
339
|
(password: string | Redacted.Redacted): (url: URL) => URL
|
|
340
340
|
/**
|
|
341
341
|
* Updates the password used for authentication.
|
|
342
342
|
*
|
|
343
|
-
* @category
|
|
343
|
+
* @category setters
|
|
344
344
|
* @since 4.0.0
|
|
345
345
|
*/
|
|
346
346
|
(url: URL, password: string | Redacted.Redacted): URL
|
|
@@ -354,21 +354,21 @@ export const setPassword: {
|
|
|
354
354
|
/**
|
|
355
355
|
* Updates the path of the URL.
|
|
356
356
|
*
|
|
357
|
-
* @category
|
|
357
|
+
* @category setters
|
|
358
358
|
* @since 4.0.0
|
|
359
359
|
*/
|
|
360
360
|
export const setPathname: {
|
|
361
361
|
/**
|
|
362
362
|
* Updates the path of the URL.
|
|
363
363
|
*
|
|
364
|
-
* @category
|
|
364
|
+
* @category setters
|
|
365
365
|
* @since 4.0.0
|
|
366
366
|
*/
|
|
367
367
|
(pathname: string): (url: URL) => URL
|
|
368
368
|
/**
|
|
369
369
|
* Updates the path of the URL.
|
|
370
370
|
*
|
|
371
|
-
* @category
|
|
371
|
+
* @category setters
|
|
372
372
|
* @since 4.0.0
|
|
373
373
|
*/
|
|
374
374
|
(url: URL, pathname: string): URL
|
|
@@ -377,21 +377,21 @@ export const setPathname: {
|
|
|
377
377
|
/**
|
|
378
378
|
* Updates the port of the URL.
|
|
379
379
|
*
|
|
380
|
-
* @category
|
|
380
|
+
* @category setters
|
|
381
381
|
* @since 4.0.0
|
|
382
382
|
*/
|
|
383
383
|
export const setPort: {
|
|
384
384
|
/**
|
|
385
385
|
* Updates the port of the URL.
|
|
386
386
|
*
|
|
387
|
-
* @category
|
|
387
|
+
* @category setters
|
|
388
388
|
* @since 4.0.0
|
|
389
389
|
*/
|
|
390
390
|
(port: string | number): (url: URL) => URL
|
|
391
391
|
/**
|
|
392
392
|
* Updates the port of the URL.
|
|
393
393
|
*
|
|
394
|
-
* @category
|
|
394
|
+
* @category setters
|
|
395
395
|
* @since 4.0.0
|
|
396
396
|
*/
|
|
397
397
|
(url: URL, port: string | number): URL
|
|
@@ -400,21 +400,21 @@ export const setPort: {
|
|
|
400
400
|
/**
|
|
401
401
|
* Updates the protocol (e.g., `http`, `https`).
|
|
402
402
|
*
|
|
403
|
-
* @category
|
|
403
|
+
* @category setters
|
|
404
404
|
* @since 4.0.0
|
|
405
405
|
*/
|
|
406
406
|
export const setProtocol: {
|
|
407
407
|
/**
|
|
408
408
|
* Updates the protocol (e.g., `http`, `https`).
|
|
409
409
|
*
|
|
410
|
-
* @category
|
|
410
|
+
* @category setters
|
|
411
411
|
* @since 4.0.0
|
|
412
412
|
*/
|
|
413
413
|
(protocol: string): (url: URL) => URL
|
|
414
414
|
/**
|
|
415
415
|
* Updates the protocol (e.g., `http`, `https`).
|
|
416
416
|
*
|
|
417
|
-
* @category
|
|
417
|
+
* @category setters
|
|
418
418
|
* @since 4.0.0
|
|
419
419
|
*/
|
|
420
420
|
(url: URL, protocol: string): URL
|
|
@@ -423,21 +423,21 @@ export const setProtocol: {
|
|
|
423
423
|
/**
|
|
424
424
|
* Updates the query string of the URL.
|
|
425
425
|
*
|
|
426
|
-
* @category
|
|
426
|
+
* @category setters
|
|
427
427
|
* @since 4.0.0
|
|
428
428
|
*/
|
|
429
429
|
export const setSearch: {
|
|
430
430
|
/**
|
|
431
431
|
* Updates the query string of the URL.
|
|
432
432
|
*
|
|
433
|
-
* @category
|
|
433
|
+
* @category setters
|
|
434
434
|
* @since 4.0.0
|
|
435
435
|
*/
|
|
436
436
|
(search: string): (url: URL) => URL
|
|
437
437
|
/**
|
|
438
438
|
* Updates the query string of the URL.
|
|
439
439
|
*
|
|
440
|
-
* @category
|
|
440
|
+
* @category setters
|
|
441
441
|
* @since 4.0.0
|
|
442
442
|
*/
|
|
443
443
|
(url: URL, search: string): URL
|
|
@@ -446,21 +446,21 @@ export const setSearch: {
|
|
|
446
446
|
/**
|
|
447
447
|
* Updates the username used for authentication.
|
|
448
448
|
*
|
|
449
|
-
* @category
|
|
449
|
+
* @category setters
|
|
450
450
|
* @since 4.0.0
|
|
451
451
|
*/
|
|
452
452
|
export const setUsername: {
|
|
453
453
|
/**
|
|
454
454
|
* Updates the username used for authentication.
|
|
455
455
|
*
|
|
456
|
-
* @category
|
|
456
|
+
* @category setters
|
|
457
457
|
* @since 4.0.0
|
|
458
458
|
*/
|
|
459
459
|
(username: string): (url: URL) => URL
|
|
460
460
|
/**
|
|
461
461
|
* Updates the username used for authentication.
|
|
462
462
|
*
|
|
463
|
-
* @category
|
|
463
|
+
* @category setters
|
|
464
464
|
* @since 4.0.0
|
|
465
465
|
*/
|
|
466
466
|
(url: URL, username: string): URL
|
|
@@ -492,7 +492,7 @@ export const setUsername: {
|
|
|
492
492
|
* // Output: https://example.com/?key=value
|
|
493
493
|
* ```
|
|
494
494
|
*
|
|
495
|
-
* @category
|
|
495
|
+
* @category setters
|
|
496
496
|
* @since 4.0.0
|
|
497
497
|
*/
|
|
498
498
|
export const setUrlParams: {
|
|
@@ -522,7 +522,7 @@ export const setUrlParams: {
|
|
|
522
522
|
* // Output: https://example.com/?key=value
|
|
523
523
|
* ```
|
|
524
524
|
*
|
|
525
|
-
* @category
|
|
525
|
+
* @category setters
|
|
526
526
|
* @since 4.0.0
|
|
527
527
|
*/
|
|
528
528
|
(urlParams: UrlParams.UrlParams): (url: URL) => URL
|
|
@@ -552,7 +552,7 @@ export const setUrlParams: {
|
|
|
552
552
|
* // Output: https://example.com/?key=value
|
|
553
553
|
* ```
|
|
554
554
|
*
|
|
555
|
-
* @category
|
|
555
|
+
* @category setters
|
|
556
556
|
* @since 4.0.0
|
|
557
557
|
*/
|
|
558
558
|
(url: URL, urlParams: UrlParams.UrlParams): URL
|
|
@@ -345,7 +345,7 @@ const extractResponseContent = (
|
|
|
345
345
|
* Adds additional schemas to components/schemas.
|
|
346
346
|
* The provided schemas must have a `identifier` annotation.
|
|
347
347
|
*
|
|
348
|
-
* @category
|
|
348
|
+
* @category services
|
|
349
349
|
* @since 4.0.0
|
|
350
350
|
*/
|
|
351
351
|
export class AdditionalSchemas extends Context.Service<
|
|
@@ -443,10 +443,10 @@ export const securityDecode = <Security extends HttpApiSecurity.HttpApiSecurity>
|
|
|
443
443
|
HttpServerRequest | Request.ParsedSearchParams
|
|
444
444
|
> => {
|
|
445
445
|
switch (self._tag) {
|
|
446
|
-
case "
|
|
446
|
+
case "Http": {
|
|
447
447
|
return Effect.map(
|
|
448
448
|
HttpServerRequest,
|
|
449
|
-
(request) => Redacted.make((request.headers.authorization ?? "").slice(
|
|
449
|
+
(request) => Redacted.make((request.headers.authorization ?? "").slice(self.schemeLength)) as any
|
|
450
450
|
)
|
|
451
451
|
}
|
|
452
452
|
case "ApiKey": {
|
|
@@ -521,7 +521,6 @@ export const securitySetCookie = (
|
|
|
521
521
|
// Internal
|
|
522
522
|
// -----------------------------------------------------------------------------
|
|
523
523
|
|
|
524
|
-
const bearerLen = `Bearer `.length
|
|
525
524
|
const basicLen = `Basic `.length
|
|
526
525
|
|
|
527
526
|
const HandlersProto = {
|
|
@@ -66,7 +66,7 @@ const serviceUnavailableResponse = HttpServerResponse.empty({ status: 503 })
|
|
|
66
66
|
* Built-in HTTP API error for a `400 Bad Request` response. When used directly as
|
|
67
67
|
* a server response, it renders as an empty response with status 400.
|
|
68
68
|
*
|
|
69
|
-
* @category
|
|
69
|
+
* @category errors
|
|
70
70
|
* @since 4.0.0
|
|
71
71
|
*/
|
|
72
72
|
export class BadRequest extends Schema.ErrorClass<BadRequest>("effect/HttpApiError/BadRequest")({
|
|
@@ -97,7 +97,7 @@ export const BadRequestNoContent = BadRequest.pipe(HttpApiSchema.asNoContent({
|
|
|
97
97
|
* Built-in HTTP API error for a `401 Unauthorized` response. When used directly as
|
|
98
98
|
* a server response, it renders as an empty response with status 401.
|
|
99
99
|
*
|
|
100
|
-
* @category
|
|
100
|
+
* @category errors
|
|
101
101
|
* @since 4.0.0
|
|
102
102
|
*/
|
|
103
103
|
export class Unauthorized extends Schema.ErrorClass<Unauthorized>("effect/HttpApiError/Unauthorized")({
|
|
@@ -127,7 +127,7 @@ export const UnauthorizedNoContent = Unauthorized.pipe(HttpApiSchema.asNoContent
|
|
|
127
127
|
* Built-in HTTP API error for a `403 Forbidden` response. When used directly as a
|
|
128
128
|
* server response, it renders as an empty response with status 403.
|
|
129
129
|
*
|
|
130
|
-
* @category
|
|
130
|
+
* @category errors
|
|
131
131
|
* @since 4.0.0
|
|
132
132
|
*/
|
|
133
133
|
export class Forbidden extends Schema.ErrorClass<Forbidden>("effect/HttpApiError/Forbidden")({
|
|
@@ -157,7 +157,7 @@ export const ForbiddenNoContent = Forbidden.pipe(HttpApiSchema.asNoContent({
|
|
|
157
157
|
* Built-in HTTP API error for a `404 Not Found` response. When used directly as a
|
|
158
158
|
* server response, it renders as an empty response with status 404.
|
|
159
159
|
*
|
|
160
|
-
* @category
|
|
160
|
+
* @category errors
|
|
161
161
|
* @since 4.0.0
|
|
162
162
|
*/
|
|
163
163
|
export class NotFound extends Schema.ErrorClass<NotFound>("effect/HttpApiError/NotFound")({
|
|
@@ -187,7 +187,7 @@ export const NotFoundNoContent = NotFound.pipe(HttpApiSchema.asNoContent({
|
|
|
187
187
|
* Built-in HTTP API error for a `405 Method Not Allowed` response. When used
|
|
188
188
|
* directly as a server response, it renders as an empty response with status 405.
|
|
189
189
|
*
|
|
190
|
-
* @category
|
|
190
|
+
* @category errors
|
|
191
191
|
* @since 4.0.0
|
|
192
192
|
*/
|
|
193
193
|
export class MethodNotAllowed extends Schema.ErrorClass<MethodNotAllowed>("effect/HttpApiError/MethodNotAllowed")({
|
|
@@ -217,7 +217,7 @@ export const MethodNotAllowedNoContent = MethodNotAllowed.pipe(HttpApiSchema.asN
|
|
|
217
217
|
* Built-in HTTP API error for a `406 Not Acceptable` response. When used directly
|
|
218
218
|
* as a server response, it renders as an empty response with status 406.
|
|
219
219
|
*
|
|
220
|
-
* @category
|
|
220
|
+
* @category errors
|
|
221
221
|
* @since 4.0.0
|
|
222
222
|
*/
|
|
223
223
|
export class NotAcceptable extends Schema.ErrorClass<NotAcceptable>("effect/HttpApiError/NotAcceptable")({
|
|
@@ -247,7 +247,7 @@ export const NotAcceptableNoContent = NotAcceptable.pipe(HttpApiSchema.asNoConte
|
|
|
247
247
|
* Built-in HTTP API error for a `408 Request Timeout` response. When used directly
|
|
248
248
|
* as a server response, it renders as an empty response with status 408.
|
|
249
249
|
*
|
|
250
|
-
* @category
|
|
250
|
+
* @category errors
|
|
251
251
|
* @since 4.0.0
|
|
252
252
|
*/
|
|
253
253
|
export class RequestTimeout extends Schema.ErrorClass<RequestTimeout>("effect/HttpApiError/RequestTimeout")({
|
|
@@ -277,7 +277,7 @@ export const RequestTimeoutNoContent = RequestTimeout.pipe(HttpApiSchema.asNoCon
|
|
|
277
277
|
* Built-in HTTP API error for a `409 Conflict` response. When used directly as a
|
|
278
278
|
* server response, it renders as an empty response with status 409.
|
|
279
279
|
*
|
|
280
|
-
* @category
|
|
280
|
+
* @category errors
|
|
281
281
|
* @since 4.0.0
|
|
282
282
|
*/
|
|
283
283
|
export class Conflict extends Schema.ErrorClass<Conflict>("effect/HttpApiError/Conflict")({
|
|
@@ -307,7 +307,7 @@ export const ConflictNoContent = Conflict.pipe(HttpApiSchema.asNoContent({
|
|
|
307
307
|
* Built-in HTTP API error for a `410 Gone` response. When used directly as a
|
|
308
308
|
* server response, it renders as an empty response with status 410.
|
|
309
309
|
*
|
|
310
|
-
* @category
|
|
310
|
+
* @category errors
|
|
311
311
|
* @since 4.0.0
|
|
312
312
|
*/
|
|
313
313
|
export class Gone extends Schema.ErrorClass<Gone>("effect/HttpApiError/Gone")({
|
|
@@ -337,7 +337,7 @@ export const GoneNoContent = Gone.pipe(HttpApiSchema.asNoContent({
|
|
|
337
337
|
* Built-in HTTP API error for a `500 Internal Server Error` response. When used
|
|
338
338
|
* directly as a server response, it renders as an empty response with status 500.
|
|
339
339
|
*
|
|
340
|
-
* @category
|
|
340
|
+
* @category errors
|
|
341
341
|
* @since 4.0.0
|
|
342
342
|
*/
|
|
343
343
|
export class InternalServerError
|
|
@@ -368,7 +368,7 @@ export const InternalServerErrorNoContent = InternalServerError.pipe(HttpApiSche
|
|
|
368
368
|
* Built-in HTTP API error for a `501 Not Implemented` response. When used directly
|
|
369
369
|
* as a server response, it renders as an empty response with status 501.
|
|
370
370
|
*
|
|
371
|
-
* @category
|
|
371
|
+
* @category errors
|
|
372
372
|
* @since 4.0.0
|
|
373
373
|
*/
|
|
374
374
|
export class NotImplemented extends Schema.ErrorClass<NotImplemented>("effect/HttpApiError/NotImplemented")({
|
|
@@ -397,7 +397,7 @@ export const NotImplementedNoContent = NotImplemented.pipe(HttpApiSchema.asNoCon
|
|
|
397
397
|
* Built-in HTTP API error for a `503 Service Unavailable` response. When used
|
|
398
398
|
* directly as a server response, it renders as an empty response with status 503.
|
|
399
399
|
*
|
|
400
|
-
* @category
|
|
400
|
+
* @category errors
|
|
401
401
|
* @since 4.0.0
|
|
402
402
|
*/
|
|
403
403
|
export class ServiceUnavailable
|
|
@@ -445,7 +445,7 @@ export const HttpApiSchemaErrorTypeId: HttpApiSchemaErrorTypeId = "~effect/httpa
|
|
|
445
445
|
* which component failed and responds as an empty `400 Bad Request` when rendered
|
|
446
446
|
* as a server response.
|
|
447
447
|
*
|
|
448
|
-
* @category
|
|
448
|
+
* @category errors
|
|
449
449
|
* @since 4.0.0
|
|
450
450
|
*/
|
|
451
451
|
export class HttpApiSchemaError extends Data.TaggedClass("HttpApiSchemaError")<{
|
|
@@ -51,7 +51,7 @@ const TypeId = "~effect/httpapi/HttpApiSecurity"
|
|
|
51
51
|
* @category models
|
|
52
52
|
* @since 4.0.0
|
|
53
53
|
*/
|
|
54
|
-
export type HttpApiSecurity =
|
|
54
|
+
export type HttpApiSecurity = Http | ApiKey | Basic
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
57
|
* Helper types for HTTP API security schemes.
|
|
@@ -82,13 +82,16 @@ export declare namespace HttpApiSecurity {
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
|
-
*
|
|
85
|
+
* Http token security scheme whose decoded credential is a redacted token.
|
|
86
86
|
*
|
|
87
87
|
* @category models
|
|
88
88
|
* @since 4.0.0
|
|
89
89
|
*/
|
|
90
|
-
export interface
|
|
91
|
-
readonly _tag: "
|
|
90
|
+
export interface Http extends HttpApiSecurity.Proto<Redacted> {
|
|
91
|
+
readonly _tag: "Http"
|
|
92
|
+
readonly scheme: string
|
|
93
|
+
/** @internal */
|
|
94
|
+
readonly schemeLength: number
|
|
92
95
|
}
|
|
93
96
|
|
|
94
97
|
/**
|
|
@@ -131,6 +134,34 @@ const Proto = {
|
|
|
131
134
|
}
|
|
132
135
|
}
|
|
133
136
|
|
|
137
|
+
/**
|
|
138
|
+
* Creates a Http token security scheme.
|
|
139
|
+
*
|
|
140
|
+
* **When to use**
|
|
141
|
+
*
|
|
142
|
+
* Use to require `Authorization: scheme ...` credentials for an HTTP API group
|
|
143
|
+
* or endpoint.
|
|
144
|
+
*
|
|
145
|
+
* **Details**
|
|
146
|
+
*
|
|
147
|
+
* Use `HttpApiBuilder.middlewareSecurity` to implement API middleware for this
|
|
148
|
+
* security scheme.
|
|
149
|
+
*
|
|
150
|
+
* @see {@link apiKey} for an API-key security scheme
|
|
151
|
+
* @see {@link basic} for an HTTP Basic security scheme
|
|
152
|
+
* @category constructors
|
|
153
|
+
* @since 4.0.0
|
|
154
|
+
*/
|
|
155
|
+
export const http = (options: {
|
|
156
|
+
readonly scheme: string
|
|
157
|
+
}): Http =>
|
|
158
|
+
Object.assign(Object.create(Proto), {
|
|
159
|
+
_tag: "Http",
|
|
160
|
+
scheme: options.scheme,
|
|
161
|
+
schemeLength: options.scheme.length,
|
|
162
|
+
annotations: Context.empty()
|
|
163
|
+
})
|
|
164
|
+
|
|
134
165
|
/**
|
|
135
166
|
* Creates a Bearer token security scheme.
|
|
136
167
|
*
|
|
@@ -149,10 +180,7 @@ const Proto = {
|
|
|
149
180
|
* @category constructors
|
|
150
181
|
* @since 4.0.0
|
|
151
182
|
*/
|
|
152
|
-
export const bearer:
|
|
153
|
-
_tag: "Bearer",
|
|
154
|
-
annotations: Context.empty()
|
|
155
|
-
})
|
|
183
|
+
export const bearer: Http = http({ scheme: "Bearer" })
|
|
156
184
|
|
|
157
185
|
/**
|
|
158
186
|
* Creates an API key security scheme.
|
|
@@ -730,7 +730,7 @@ const makeSecurityScheme = (security: HttpApiSecurity): OpenAPISecurityScheme =>
|
|
|
730
730
|
scheme: "basic"
|
|
731
731
|
}
|
|
732
732
|
}
|
|
733
|
-
case "
|
|
733
|
+
case "Http": {
|
|
734
734
|
const format = Context.getOption(security.annotations, Format).pipe(
|
|
735
735
|
Option.map((format) => ({ bearerFormat: format })),
|
|
736
736
|
Option.getOrUndefined
|
|
@@ -738,7 +738,7 @@ const makeSecurityScheme = (security: HttpApiSecurity): OpenAPISecurityScheme =>
|
|
|
738
738
|
return {
|
|
739
739
|
...meta,
|
|
740
740
|
type: "http",
|
|
741
|
-
scheme:
|
|
741
|
+
scheme: security.scheme,
|
|
742
742
|
...format
|
|
743
743
|
}
|
|
744
744
|
}
|
|
@@ -72,7 +72,7 @@ export type MetricNameMapper = (name: string) => string
|
|
|
72
72
|
/**
|
|
73
73
|
* Options for formatting metrics.
|
|
74
74
|
*
|
|
75
|
-
* @category
|
|
75
|
+
* @category options
|
|
76
76
|
* @since 4.0.0
|
|
77
77
|
*/
|
|
78
78
|
export interface FormatOptions {
|
|
@@ -90,7 +90,7 @@ export interface FormatOptions {
|
|
|
90
90
|
/**
|
|
91
91
|
* Options for exporting Prometheus metrics over HTTP.
|
|
92
92
|
*
|
|
93
|
-
* @category
|
|
93
|
+
* @category options
|
|
94
94
|
* @since 4.0.0
|
|
95
95
|
*/
|
|
96
96
|
export interface HttpOptions extends FormatOptions {
|
|
@@ -128,7 +128,7 @@ export interface HttpOptions extends FormatOptions {
|
|
|
128
128
|
* })
|
|
129
129
|
* ```
|
|
130
130
|
*
|
|
131
|
-
* @category
|
|
131
|
+
* @category formatting
|
|
132
132
|
* @since 4.0.0
|
|
133
133
|
*/
|
|
134
134
|
export const format: (options?: FormatOptions | undefined) => Effect.Effect<string> = Effect.fnUntraced(
|
|
@@ -146,7 +146,7 @@ export const format: (options?: FormatOptions | undefined) => Effect.Effect<stri
|
|
|
146
146
|
* Use when you use this low-level function when you already have access to the context. Most
|
|
147
147
|
* users should use `format` instead.
|
|
148
148
|
*
|
|
149
|
-
* @category
|
|
149
|
+
* @category formatting
|
|
150
150
|
* @since 4.0.0
|
|
151
151
|
*/
|
|
152
152
|
export const formatUnsafe = (
|
|
@@ -114,7 +114,7 @@ export interface KeyValueStore {
|
|
|
114
114
|
* Primitive operations are required, while helpers such as `has`, `isEmpty`,
|
|
115
115
|
* and `modify` can be supplied to override the defaults.
|
|
116
116
|
*
|
|
117
|
-
* @category
|
|
117
|
+
* @category options
|
|
118
118
|
* @since 4.0.0
|
|
119
119
|
*/
|
|
120
120
|
export type MakeOptions = Partial<KeyValueStore> & {
|
|
@@ -153,7 +153,7 @@ export type MakeOptions = Partial<KeyValueStore> & {
|
|
|
153
153
|
* Implementation callbacks for adapting a string-only backing store into a
|
|
154
154
|
* `KeyValueStore`.
|
|
155
155
|
*
|
|
156
|
-
* @category
|
|
156
|
+
* @category options
|
|
157
157
|
* @since 4.0.0
|
|
158
158
|
*/
|
|
159
159
|
export type MakeStringOptions = Partial<Omit<KeyValueStore, "set">> & {
|
|
@@ -214,7 +214,7 @@ export class KeyValueStoreError extends Data.TaggedError("KeyValueStoreError")<{
|
|
|
214
214
|
* Use to access or provide the persistence store used for lightweight durable
|
|
215
215
|
* state.
|
|
216
216
|
*
|
|
217
|
-
* @category
|
|
217
|
+
* @category services
|
|
218
218
|
* @since 4.0.0
|
|
219
219
|
*/
|
|
220
220
|
export const KeyValueStore: Context.Service<
|
|
@@ -235,7 +235,7 @@ const exitSchemaCache = new WeakMap<Persistable<any, any>, Schema.Exit<any, any,
|
|
|
235
235
|
* Encodes an `Exit` for a persistable request using its success and error
|
|
236
236
|
* schemas.
|
|
237
237
|
*
|
|
238
|
-
* @category
|
|
238
|
+
* @category serialization
|
|
239
239
|
* @since 4.0.0
|
|
240
240
|
*/
|
|
241
241
|
export const serializeExit = <A extends Schema.Top, E extends Schema.Top>(
|
|
@@ -250,7 +250,7 @@ export const serializeExit = <A extends Schema.Top, E extends Schema.Top>(
|
|
|
250
250
|
* Decodes a persisted value into an `Exit` for a persistable request using its
|
|
251
251
|
* success and error schemas.
|
|
252
252
|
*
|
|
253
|
-
* @category
|
|
253
|
+
* @category serialization
|
|
254
254
|
* @since 4.0.0
|
|
255
255
|
*/
|
|
256
256
|
export const deserializeExit = <A extends Schema.Top, E extends Schema.Top>(
|