effect-cf 0.14.0 → 0.15.0
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/CHANGELOG.md +6 -0
- package/README.md +28 -1
- package/dist/index.d.mts +144 -93
- package/dist/index.mjs +146 -101
- package/package.json +1 -1
- package/src/Email.ts +134 -0
- package/src/index.ts +1 -0
package/dist/index.d.mts
CHANGED
|
@@ -16,7 +16,7 @@ import * as _$effect_Config0 from "effect/Config";
|
|
|
16
16
|
|
|
17
17
|
//#region src/WorkersAi.d.ts
|
|
18
18
|
declare namespace WorkersAi_d_exports {
|
|
19
|
-
export { LayerOptions$
|
|
19
|
+
export { LayerOptions$17 as LayerOptions, Tag$16 as Tag, TagClass$15 as TagClass, WorkersAiAsyncBatchResponse, WorkersAiBinding, WorkersAiClient, WorkersAiDefinition, WorkersAiEmbeddingInput, WorkersAiEmbeddingResponse, WorkersAiModelsSearchObject, WorkersAiModelsSearchParams, WorkersAiOperationError, WorkersAiOptions, WorkersAiService, embeddingResponse, isWorkersAiBinding, layer$14 as layer, make$15 as make, makeClient$11 as makeClient };
|
|
20
20
|
}
|
|
21
21
|
declare const WorkersAiOperationError_base: new <A extends Record<string, any> = {}>(args: _$effect_Types0.VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => _$effect_Cause0.YieldableError & {
|
|
22
22
|
readonly _tag: "WorkersAiOperationError";
|
|
@@ -75,24 +75,24 @@ interface WorkersAiService<Id extends string> {
|
|
|
75
75
|
readonly id: Id;
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
|
-
type LayerOptions$
|
|
78
|
+
type LayerOptions$17 = {
|
|
79
79
|
readonly binding: string;
|
|
80
80
|
};
|
|
81
|
-
interface TagClass$
|
|
81
|
+
interface TagClass$15<Self, Id extends string, ModelList extends AiModelListType = AiModels> extends Context.ServiceClass<Self, Id, WorkersAiClient<ModelList>> {
|
|
82
82
|
readonly id: Id;
|
|
83
|
-
readonly layer: (options: LayerOptions$
|
|
83
|
+
readonly layer: (options: LayerOptions$17) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
|
|
84
84
|
}
|
|
85
85
|
declare const isWorkersAiBinding: (value: unknown) => value is WorkersAiBinding;
|
|
86
86
|
declare const embeddingResponse: (value: {
|
|
87
87
|
readonly data?: ReadonlyArray<ReadonlyArray<number>>;
|
|
88
88
|
readonly shape?: ReadonlyArray<number>;
|
|
89
89
|
}) => WorkersAiEmbeddingResponse;
|
|
90
|
-
declare const makeClient$
|
|
91
|
-
declare const layer$
|
|
92
|
-
declare const make$
|
|
93
|
-
declare const Tag$
|
|
90
|
+
declare const makeClient$11: <ModelList extends AiModelListType = AiModels>(definition: WorkersAiDefinition) => (ai: WorkersAiBinding<ModelList>) => WorkersAiClient<ModelList>;
|
|
91
|
+
declare const layer$14: <Self, ModelList extends AiModelListType = AiModels>(tag: Context.Service<Self, WorkersAiClient<ModelList>>, definition: WorkersAiDefinition) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
|
|
92
|
+
declare const make$15: <Id extends string>(id: Id) => TagClass$15<WorkersAiService<Id>, Id, AiModels>;
|
|
93
|
+
declare const Tag$16: <Self>() => <Id extends string, ModelList extends AiModelListType = AiModels>(id: Id) => TagClass$15<Self, Id, ModelList>;
|
|
94
94
|
declare namespace AiGateway_d_exports {
|
|
95
|
-
export { AiGatewayBinding, AiGatewayClient, AiGatewayDefinition, AiGatewayFetchOptions, AiGatewayHeaders, AiGatewayLog, AiGatewayOperationError, AiGatewayPatchLog, AiGatewayProvider, AiGatewayRunOptions, AiGatewayService, AiGatewayUniversalRequest, LayerOptions$
|
|
95
|
+
export { AiGatewayBinding, AiGatewayClient, AiGatewayDefinition, AiGatewayFetchOptions, AiGatewayHeaders, AiGatewayLog, AiGatewayOperationError, AiGatewayPatchLog, AiGatewayProvider, AiGatewayRunOptions, AiGatewayService, AiGatewayUniversalRequest, LayerOptions$16 as LayerOptions, Tag$15 as Tag, TagClass$14 as TagClass, isAiGatewayBinding, layer$13 as layer, make$14 as make, makeClient$10 as makeClient, makeClientFromAi, makeHttpClient };
|
|
96
96
|
}
|
|
97
97
|
declare const AiGatewayOperationError_base: new <A extends Record<string, any> = {}>(args: _$effect_Types0.VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => _$effect_Cause0.YieldableError & {
|
|
98
98
|
readonly _tag: "AiGatewayOperationError";
|
|
@@ -141,17 +141,17 @@ interface AiGatewayService<Id extends string> {
|
|
|
141
141
|
readonly id: Id;
|
|
142
142
|
};
|
|
143
143
|
}
|
|
144
|
-
type LayerOptions$
|
|
144
|
+
type LayerOptions$16 = {
|
|
145
145
|
readonly binding: string;
|
|
146
146
|
readonly gatewayId: string;
|
|
147
147
|
readonly accountId?: string;
|
|
148
148
|
};
|
|
149
|
-
interface TagClass$
|
|
149
|
+
interface TagClass$14<Self, Id extends string> extends Context.ServiceClass<Self, Id, AiGatewayClient> {
|
|
150
150
|
readonly id: Id;
|
|
151
|
-
readonly layer: (options: LayerOptions$
|
|
151
|
+
readonly layer: (options: LayerOptions$16) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError | AiGatewayOperationError, WorkerEnvironment>;
|
|
152
152
|
}
|
|
153
153
|
declare const isAiGatewayBinding: (value: unknown) => value is WorkersAiBinding;
|
|
154
|
-
declare const makeClient$
|
|
154
|
+
declare const makeClient$10: (definition: AiGatewayDefinition, gateway: AiGatewayBinding) => {
|
|
155
155
|
definition: AiGatewayDefinition;
|
|
156
156
|
run: (data: _$_cloudflare_workers_types0.AIGatewayUniversalRequest | readonly _$_cloudflare_workers_types0.AIGatewayUniversalRequest[], options: {
|
|
157
157
|
gateway?: _$_cloudflare_workers_types0.UniversalGatewayOptions;
|
|
@@ -169,11 +169,11 @@ declare const makeHttpClient: (definition: Omit<AiGatewayDefinition, "binding">
|
|
|
169
169
|
readonly accountId: string;
|
|
170
170
|
readonly binding?: string;
|
|
171
171
|
}, request?: typeof fetch) => AiGatewayClient;
|
|
172
|
-
declare const layer$
|
|
173
|
-
declare const make$
|
|
174
|
-
declare const Tag$
|
|
172
|
+
declare const layer$13: <Self>(tag: Context.Service<Self, AiGatewayClient>, definition: AiGatewayDefinition) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
|
|
173
|
+
declare const make$14: <Id extends string>(id: Id) => TagClass$14<AiGatewayService<Id>, Id>;
|
|
174
|
+
declare const Tag$15: <Self>() => <Id extends string>(id: Id) => TagClass$14<Self, Id>;
|
|
175
175
|
declare namespace BrowserRendering_d_exports {
|
|
176
|
-
export { BrowserRenderingBinding, BrowserRenderingBrowserClient, BrowserRenderingBrowserLike, BrowserRenderingClient, BrowserRenderingConnect, BrowserRenderingDefinition, BrowserRenderingLaunch, BrowserRenderingOperationError, BrowserRenderingPageClient, BrowserRenderingPageLike, BrowserRenderingService, LayerOptions$
|
|
176
|
+
export { BrowserRenderingBinding, BrowserRenderingBrowserClient, BrowserRenderingBrowserLike, BrowserRenderingClient, BrowserRenderingConnect, BrowserRenderingDefinition, BrowserRenderingLaunch, BrowserRenderingOperationError, BrowserRenderingPageClient, BrowserRenderingPageLike, BrowserRenderingService, LayerOptions$15 as LayerOptions, Tag$14 as Tag, TagClass$13 as TagClass, isBrowserRenderingBinding, layer$12 as layer, make$13 as make, makeClient$9 as makeClient };
|
|
177
177
|
}
|
|
178
178
|
declare const BrowserRenderingOperationError_base: new <A extends Record<string, any> = {}>(args: _$effect_Types0.VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => _$effect_Cause0.YieldableError & {
|
|
179
179
|
readonly _tag: "BrowserRenderingOperationError";
|
|
@@ -237,18 +237,18 @@ interface BrowserRenderingService<Id extends string> {
|
|
|
237
237
|
readonly id: Id;
|
|
238
238
|
};
|
|
239
239
|
}
|
|
240
|
-
type LayerOptions$
|
|
240
|
+
type LayerOptions$15 = {
|
|
241
241
|
readonly binding: string;
|
|
242
242
|
};
|
|
243
|
-
interface TagClass$
|
|
243
|
+
interface TagClass$13<Self, Id extends string> extends Context.ServiceClass<Self, Id, BrowserRenderingClient> {
|
|
244
244
|
readonly id: Id;
|
|
245
|
-
readonly layer: (options: LayerOptions$
|
|
245
|
+
readonly layer: (options: LayerOptions$15) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
|
|
246
246
|
}
|
|
247
247
|
declare const isBrowserRenderingBinding: (value: unknown) => value is BrowserRenderingBinding;
|
|
248
|
-
declare const makeClient$
|
|
249
|
-
declare const layer$
|
|
250
|
-
declare const make$
|
|
251
|
-
declare const Tag$
|
|
248
|
+
declare const makeClient$9: <RawBinding extends BrowserRenderingBinding = BrowserRenderingBinding>(definition: BrowserRenderingDefinition) => (binding: RawBinding) => BrowserRenderingClient<RawBinding>;
|
|
249
|
+
declare const layer$12: <Self>(tag: Context.Service<Self, BrowserRenderingClient>, definition: BrowserRenderingDefinition) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
|
|
250
|
+
declare const make$13: <Id extends string>(id: Id) => TagClass$13<BrowserRenderingService<Id>, Id>;
|
|
251
|
+
declare const Tag$14: <Self>() => <Id extends string>(id: Id) => TagClass$13<Self, Id>;
|
|
252
252
|
declare namespace DurableObjectStorage_d_exports {
|
|
253
253
|
export { DurableObjectStorage, DurableObjectTransaction, SchemaBackedSyncKvStorage, SqlCursor, SqlStorage, SqlStorageValue, StorageOperationError, SyncKvDefinition, SyncKvStorage, fromDurableObjectStorage };
|
|
254
254
|
}
|
|
@@ -551,7 +551,7 @@ declare class DurableObjectState extends DurableObjectState_base {}
|
|
|
551
551
|
*/
|
|
552
552
|
declare const fromDurableObjectState: (state: globalThis.DurableObjectState) => DurableObjectStateService;
|
|
553
553
|
declare namespace CloudflareOtlp_d_exports {
|
|
554
|
-
export { DurableObjectLayerOptions, LayerOptions$
|
|
554
|
+
export { DurableObjectLayerOptions, LayerOptions$14 as LayerOptions, ResourceOptions, Serialization, Signal, WorkerLayerOptions, durableObjectLayer, layer$11 as layer, layerJson, layerProtobuf, workerLayer };
|
|
555
555
|
}
|
|
556
556
|
/** Telemetry signal groups supported by the Cloudflare OTLP layers. */
|
|
557
557
|
type Signal = "logs" | "traces" | "metrics";
|
|
@@ -567,7 +567,7 @@ interface ResourceOptions {
|
|
|
567
567
|
readonly attributes?: Record<string, unknown>;
|
|
568
568
|
}
|
|
569
569
|
/** Options shared by all Cloudflare OTLP telemetry layers. */
|
|
570
|
-
interface LayerOptions$
|
|
570
|
+
interface LayerOptions$14 {
|
|
571
571
|
/**
|
|
572
572
|
* Telemetry signals to export. Defaults to logs, traces, and metrics.
|
|
573
573
|
*
|
|
@@ -594,12 +594,12 @@ interface LayerOptions$13 {
|
|
|
594
594
|
readonly tracerContext?: <X>(primitive: Tracer.EffectPrimitive<X>, span: Tracer.AnySpan) => X;
|
|
595
595
|
}
|
|
596
596
|
/** Resource metadata specific to Cloudflare Workers. */
|
|
597
|
-
interface WorkerLayerOptions extends LayerOptions$
|
|
597
|
+
interface WorkerLayerOptions extends LayerOptions$14 {
|
|
598
598
|
/** Cloudflare Worker name to attach as `cloudflare.worker.name`. */
|
|
599
599
|
readonly workerName?: string;
|
|
600
600
|
}
|
|
601
601
|
/** Resource metadata specific to Cloudflare Durable Objects. */
|
|
602
|
-
interface DurableObjectLayerOptions extends LayerOptions$
|
|
602
|
+
interface DurableObjectLayerOptions extends LayerOptions$14 {
|
|
603
603
|
/** Durable Object class name to attach as `cloudflare.durable_object.class`. */
|
|
604
604
|
readonly className?: string;
|
|
605
605
|
/**
|
|
@@ -617,11 +617,11 @@ interface DurableObjectLayerOptions extends LayerOptions$13 {
|
|
|
617
617
|
* installed as the primary `ConfigProvider`; outside Cloudflare, the ambient
|
|
618
618
|
* Effect `ConfigProvider` remains the fallback.
|
|
619
619
|
*/
|
|
620
|
-
declare const layer$
|
|
620
|
+
declare const layer$11: (options?: LayerOptions$14) => Layer.Layer<never, never, never>;
|
|
621
621
|
/** Base OTLP telemetry layer forced to JSON serialization. */
|
|
622
|
-
declare const layerJson: (options?: Omit<LayerOptions$
|
|
622
|
+
declare const layerJson: (options?: Omit<LayerOptions$14, "serialization">) => Layer.Layer<never, never, never>;
|
|
623
623
|
/** Base OTLP telemetry layer forced to protobuf serialization. */
|
|
624
|
-
declare const layerProtobuf: (options?: Omit<LayerOptions$
|
|
624
|
+
declare const layerProtobuf: (options?: Omit<LayerOptions$14, "serialization">) => Layer.Layer<never, never, never>;
|
|
625
625
|
/**
|
|
626
626
|
* OTLP layer with Cloudflare Worker resource attributes.
|
|
627
627
|
*
|
|
@@ -638,7 +638,7 @@ declare const workerLayer: (options?: WorkerLayerOptions) => Layer.Layer<never,
|
|
|
638
638
|
*/
|
|
639
639
|
declare const durableObjectLayer: (options?: DurableObjectLayerOptions) => Layer.Layer<never, never, DurableObjectState>;
|
|
640
640
|
declare namespace D1_d_exports {
|
|
641
|
-
export { D1Definition, D1Service, D1SqlLayerOptions, Service$1 as Service, make$
|
|
641
|
+
export { D1Definition, D1Service, D1SqlLayerOptions, Service$1 as Service, make$12 as make };
|
|
642
642
|
}
|
|
643
643
|
/** Typed D1 binding definition. */
|
|
644
644
|
interface D1Definition {
|
|
@@ -657,7 +657,7 @@ interface D1Service<Id extends string> {
|
|
|
657
657
|
/**
|
|
658
658
|
* Creates a typed D1 service tag plus Effect helpers.
|
|
659
659
|
*/
|
|
660
|
-
declare const make$
|
|
660
|
+
declare const make$12: <Id extends string>(id: Id, definition: D1Definition) => BindingService<D1Service<Id>, Id, D1Database> & {
|
|
661
661
|
"effect-cf/D1": "effect-cf/D1";
|
|
662
662
|
definition: D1Definition;
|
|
663
663
|
sqlLayer: (options?: D1SqlLayerOptions) => Layer.Layer<D1Client.D1Client | _$effect_unstable_sql_SqlClient0.SqlClient, BindingNotFoundError | BindingValidationError | _$effect_Config0.ConfigError, WorkerEnvironment>;
|
|
@@ -707,7 +707,7 @@ declare const dispose: (value: unknown) => Effect.Effect<void>;
|
|
|
707
707
|
declare const resolve: <A>(value: A) => Effect.Effect<Awaited<A>, unknown>;
|
|
708
708
|
declare const scoped: <A>(value: A) => Effect.Effect<Awaited<A>, unknown, Scope.Scope>;
|
|
709
709
|
declare namespace RpcDefinition_d_exports {
|
|
710
|
-
export { Definition$9 as Definition, Method$5 as Method, Methods$4 as Methods, NoReservedMethods$4 as NoReservedMethods, ReservedMethodName$6 as ReservedMethodName, ReservedMethodNameError, RpcArgumentCountError, RpcArgumentDecodeError, RpcArgumentEncodeError, RpcReservedMethodNameError, RpcSuccessDecodeError, RpcSuccessEncodeError, ServiceFreeSchema$4 as ServiceFreeSchema, assertNoReservedMethodNames, assertNoReservedMethods, decodeArgs, decodeSuccess, encodeArgs, encodeSuccess, make$
|
|
710
|
+
export { Definition$9 as Definition, Method$5 as Method, Methods$4 as Methods, NoReservedMethods$4 as NoReservedMethods, ReservedMethodName$6 as ReservedMethodName, ReservedMethodNameError, RpcArgumentCountError, RpcArgumentDecodeError, RpcArgumentEncodeError, RpcReservedMethodNameError, RpcSuccessDecodeError, RpcSuccessEncodeError, ServiceFreeSchema$4 as ServiceFreeSchema, assertNoReservedMethodNames, assertNoReservedMethods, decodeArgs, decodeSuccess, encodeArgs, encodeSuccess, make$11 as make, method$4 as method, reservedMethodNames };
|
|
711
711
|
}
|
|
712
712
|
declare const RpcReservedMethodNameError_base: new <A extends Record<string, any> = {}>(args: _$effect_Types0.VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => _$effect_Cause0.YieldableError & {
|
|
713
713
|
readonly _tag: "RpcReservedMethodNameError";
|
|
@@ -806,9 +806,9 @@ declare const decodeArgs: <const Self extends Definition$9.Any, MethodName exten
|
|
|
806
806
|
declare const encodeArgs: <const Self extends Definition$9.Any, MethodName extends Definition$9.MethodNames<Self>>(definition: Self, methodName: MethodName, args: Method$5.Args<Self["methods"][MethodName]>) => Effect.Effect<Method$5.EncodedArgs<Self["methods"][MethodName]>, RpcArgumentCountError | RpcArgumentEncodeError>;
|
|
807
807
|
declare const encodeSuccess: <const Self extends Definition$9.Any, MethodName extends Definition$9.MethodNames<Self>>(definition: Self, methodName: MethodName, value: Method$5.Success<Self["methods"][MethodName]>) => Effect.Effect<Method$5.EncodedSuccess<Self["methods"][MethodName]>, RpcSuccessEncodeError>;
|
|
808
808
|
declare const decodeSuccess: <const Self extends Definition$9.Any, MethodName extends Definition$9.MethodNames<Self>>(definition: Self, methodName: MethodName, value: unknown) => Effect.Effect<Method$5.Success<Self["methods"][MethodName]>, RpcSuccessDecodeError>;
|
|
809
|
-
declare const make$
|
|
809
|
+
declare const make$11: <Id extends string, const MethodsShape extends Methods$4>(id: Id, methods: MethodsShape) => Definition$9<Id, MethodsShape>;
|
|
810
810
|
declare namespace QueueBinding_d_exports {
|
|
811
|
-
export { MessageSendRequest, QueueBindingClient, QueueBindingDefinition, QueueMetrics, QueueOperationError, QueueProducer, QueueSendBatchOptions, QueueSendBatchResponse, QueueSendOptions, QueueSendResponse, isQueue, layer$
|
|
811
|
+
export { MessageSendRequest, QueueBindingClient, QueueBindingDefinition, QueueMetrics, QueueOperationError, QueueProducer, QueueSendBatchOptions, QueueSendBatchResponse, QueueSendOptions, QueueSendResponse, isQueue, layer$10 as layer, makeClient$8 as makeClient };
|
|
812
812
|
}
|
|
813
813
|
type QueueSendOptions = CloudflareQueueSendOptions;
|
|
814
814
|
type QueueSendResponse = CloudflareQueueSendResponse;
|
|
@@ -839,10 +839,10 @@ declare class QueueOperationError extends QueueOperationError_base<{
|
|
|
839
839
|
readonly message: string;
|
|
840
840
|
}> {}
|
|
841
841
|
declare const isQueue: <Body>(value: unknown) => value is QueueProducer<Body>;
|
|
842
|
-
declare const makeClient$
|
|
843
|
-
declare const layer$
|
|
842
|
+
declare const makeClient$8: <Message extends ServiceFreeSchema$4>(definition: QueueBindingDefinition<Message>) => ((queue: QueueProducer<Schema.Codec.Encoded<Message>>) => QueueBindingClient<Message>);
|
|
843
|
+
declare const layer$10: <Self, Message extends ServiceFreeSchema$4>(tag: Context.Service<Self, QueueBindingClient<Message>>, definition: QueueBindingDefinition<Message>) => _$effect_Layer0.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
|
|
844
844
|
declare namespace QueueDefinition_d_exports {
|
|
845
|
-
export { Definition$8 as Definition, Handler$3 as Handler, LayerOptions$
|
|
845
|
+
export { Definition$8 as Definition, Handler$3 as Handler, LayerOptions$13 as LayerOptions, Options$7 as Options, Queue$1 as Queue, Tag$13 as Tag, TagClass$12 as TagClass, implement$7 as implement, make$10 as make };
|
|
846
846
|
}
|
|
847
847
|
interface Definition$8<Id extends string = string, Message extends ServiceFreeSchema$4 = ServiceFreeSchema$4> {
|
|
848
848
|
readonly id: Id;
|
|
@@ -856,31 +856,31 @@ interface Options$7<ROut, Self extends Definition$8.Any> extends Omit<WorkerOpti
|
|
|
856
856
|
readonly queue: Handler$3<ROut, Self>;
|
|
857
857
|
readonly rpc?: never;
|
|
858
858
|
}
|
|
859
|
-
type LayerOptions$
|
|
859
|
+
type LayerOptions$13 = {
|
|
860
860
|
readonly binding: string;
|
|
861
861
|
};
|
|
862
|
-
interface TagClass$
|
|
862
|
+
interface TagClass$12<Self, Id extends string, Message extends ServiceFreeSchema$4> extends Context.ServiceClass<Self, Id, QueueBindingClient<Message>> {
|
|
863
863
|
readonly id: Id;
|
|
864
864
|
readonly message: Message;
|
|
865
865
|
readonly make: <ROut, LayerError>(layer: Layer.Layer<ROut, LayerError, ExecutionContext | WorkerContext | WorkerEnvironment>, options: Options$7<ROut, Definition$8<Id, Message>>) => WorkerClass<Record<never, never>, ROut>;
|
|
866
|
-
readonly layer: (options: LayerOptions$
|
|
866
|
+
readonly layer: (options: LayerOptions$13) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
|
|
867
867
|
readonly send: (message: Schema.Schema.Type<Message>, options?: QueueSendOptions) => Effect.Effect<void, QueueOperationError | Schema.SchemaError, Self>;
|
|
868
868
|
readonly sendBatch: (messages: Iterable<MessageSendRequest<Schema.Schema.Type<Message>>>, options?: QueueSendBatchOptions) => Effect.Effect<void, QueueOperationError | Schema.SchemaError, Self>;
|
|
869
869
|
readonly metrics: () => Effect.Effect<QueueMetrics, QueueOperationError, Self>;
|
|
870
870
|
readonly unsafeRaw: () => Effect.Effect<globalThis.Queue<Schema.Codec.Encoded<Message>>, never, Self>;
|
|
871
871
|
}
|
|
872
|
-
declare const make$
|
|
872
|
+
declare const make$10: <Id extends string, Message extends ServiceFreeSchema$4>(id: Id, definition: {
|
|
873
873
|
readonly message: Message;
|
|
874
|
-
}) => TagClass$
|
|
875
|
-
declare const Tag$
|
|
874
|
+
}) => TagClass$12<Definition$8<Id, Message>, Id, Message>;
|
|
875
|
+
declare const Tag$13: <Self>() => <Id extends string, Message extends ServiceFreeSchema$4>(id: Id, definition: {
|
|
876
876
|
readonly message: Message;
|
|
877
|
-
}) => TagClass$
|
|
877
|
+
}) => TagClass$12<Self, Id, Message>;
|
|
878
878
|
declare const Queue$1: <Self>() => <Id extends string, Message extends ServiceFreeSchema$4>(id: Id, definition: {
|
|
879
879
|
readonly message: Message;
|
|
880
|
-
}) => TagClass$
|
|
880
|
+
}) => TagClass$12<Self, Id, Message>;
|
|
881
881
|
declare const implement$7: <ROut, const Self extends Definition$8.Any>(_definition: Self, handler: Handler$3<ROut, Self>) => Handler$3<ROut, Self>;
|
|
882
882
|
declare namespace Queue_d_exports {
|
|
883
|
-
export { Definition$7 as Definition, Handler$2 as Handler, LayerOptions$
|
|
883
|
+
export { Definition$7 as Definition, Handler$2 as Handler, LayerOptions$12 as LayerOptions, Options$6 as Options, QueueBatch, QueueHandler, QueueMessage, QueueMessageDecodeError, QueueOptions, Tag$12 as Tag, TagClass$11 as TagClass, decodeBatch, fromMessage, fromMessageBatch, implement$6 as implement };
|
|
884
884
|
}
|
|
885
885
|
interface QueueMessage<Body> {
|
|
886
886
|
readonly raw: globalThis.Message<unknown>;
|
|
@@ -929,16 +929,16 @@ type Definition$7<Id extends string = string, Message extends Definition$8.Any["
|
|
|
929
929
|
declare namespace Definition$7 {
|
|
930
930
|
type Any = Definition$8.Any;
|
|
931
931
|
}
|
|
932
|
-
type LayerOptions$
|
|
933
|
-
type TagClass$
|
|
934
|
-
declare const Tag$
|
|
932
|
+
type LayerOptions$12 = LayerOptions$13;
|
|
933
|
+
type TagClass$11<Self, Id extends string, Message extends Definition$8.Any["message"]> = TagClass$12<Self, Id, Message>;
|
|
934
|
+
declare const Tag$12: <Self>() => <Id extends string, Message extends Definition$8.Any["message"]>(id: Id, definition: {
|
|
935
935
|
readonly message: Message;
|
|
936
|
-
}) => TagClass$
|
|
936
|
+
}) => TagClass$11<Self, Id, Message>;
|
|
937
937
|
declare const implement$6: <ROut, const Self extends Definition$8.Any>(_definition: Self, handler: Handler$3<ROut, Self>) => Handler$3<ROut, Self>;
|
|
938
938
|
type Handler$2<ROut, Self extends Definition$8.Any> = Handler$3<ROut, Self>;
|
|
939
939
|
type Options$6<ROut, Self extends Definition$8.Any> = Options$7<ROut, Self>;
|
|
940
940
|
declare namespace WorkerDefinition_d_exports {
|
|
941
|
-
export { Api$3 as Api, Definition$6 as Definition, HandlerEffect$3 as HandlerEffect, Handlers$3 as Handlers, LayerOptions$
|
|
941
|
+
export { Api$3 as Api, Definition$6 as Definition, HandlerEffect$3 as HandlerEffect, Handlers$3 as Handlers, LayerOptions$11 as LayerOptions, Method$4 as Method, Methods$3 as Methods, NoReservedMethods$3 as NoReservedMethods, Options$5 as Options, ReservedMethodName$5 as ReservedMethodName, ServerApi$4 as ServerApi, ServiceFreeSchema$3 as ServiceFreeSchema, Tag$11 as Tag, TagClass$10 as TagClass, Worker, implement$5 as implement, make$9 as make, method$3 as method };
|
|
942
942
|
}
|
|
943
943
|
type ServiceFreeSchema$3 = Schema.Codec<any, any, never, never>;
|
|
944
944
|
interface Method$4<Args extends ReadonlyArray<ServiceFreeSchema$3> = ReadonlyArray<ServiceFreeSchema$3>, Success extends ServiceFreeSchema$3 = ServiceFreeSchema$3> {
|
|
@@ -986,14 +986,14 @@ type Handlers$3<ROut, Self extends Definition$6.Any> = { readonly [Key in keyof
|
|
|
986
986
|
interface Options$5<ROut, Self extends Definition$6.Any, REvent = never, EventLayerError = never> extends Omit<WorkerOptions<ROut, REvent, EventLayerError, Handlers$3<ROut | REvent, Self>>, "rpc"> {
|
|
987
987
|
readonly rpc: Handlers$3<ROut | REvent, Self>;
|
|
988
988
|
}
|
|
989
|
-
type LayerOptions$
|
|
989
|
+
type LayerOptions$11 = {
|
|
990
990
|
readonly binding: string;
|
|
991
991
|
};
|
|
992
|
-
type TagClass$
|
|
992
|
+
type TagClass$10<Self, Id extends string, MethodsShape extends Methods$3> = Context.ServiceClass<Self, Id, ServiceBindingEffectClient<Api$3<Definition$6<Id, MethodsShape>>, Definition$6<Id, MethodsShape>>> & ServiceBindingStaticClient<Self, Api$3<Definition$6<Id, MethodsShape>>, Definition$6<Id, MethodsShape>> & {
|
|
993
993
|
readonly id: Id;
|
|
994
994
|
readonly methods: MethodsShape;
|
|
995
995
|
readonly make: <ROut, LayerError, REvent = never, EventLayerError = never>(layer: Layer.Layer<ROut, LayerError, ExecutionContext | WorkerContext | WorkerEnvironment>, options: Options$5<ROut, Definition$6<Id, MethodsShape>, REvent, EventLayerError>) => WorkerClass<Handlers$3<ROut | REvent, Definition$6<Id, MethodsShape>>, ROut | REvent>;
|
|
996
|
-
readonly layer: (options: LayerOptions$
|
|
996
|
+
readonly layer: (options: LayerOptions$11) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
|
|
997
997
|
};
|
|
998
998
|
/**
|
|
999
999
|
* Defines a single RPC method schema in a worker definition.
|
|
@@ -1007,9 +1007,9 @@ declare const method$3: {
|
|
|
1007
1007
|
readonly success: Success;
|
|
1008
1008
|
}): Method$4<Args, Success>;
|
|
1009
1009
|
};
|
|
1010
|
-
declare const make$
|
|
1011
|
-
declare const Tag$
|
|
1012
|
-
declare const Worker: <Self>() => <Id extends string, const MethodsShape extends Methods$3>(id: Id, methods: MethodsShape & NoReservedMethods$3<MethodsShape>) => TagClass$
|
|
1010
|
+
declare const make$9: <Id extends string, const MethodsShape extends Methods$3>(id: Id, methods: MethodsShape & NoReservedMethods$3<MethodsShape>) => TagClass$10<Definition$6<Id, MethodsShape>, Id, MethodsShape>;
|
|
1011
|
+
declare const Tag$11: <Self>() => <Id extends string, const MethodsShape extends Methods$3>(id: Id, methods: MethodsShape & NoReservedMethods$3<MethodsShape>) => TagClass$10<Self, Id, MethodsShape>;
|
|
1012
|
+
declare const Worker: <Self>() => <Id extends string, const MethodsShape extends Methods$3>(id: Id, methods: MethodsShape & NoReservedMethods$3<MethodsShape>) => TagClass$10<Self, Id, MethodsShape>;
|
|
1013
1013
|
/**
|
|
1014
1014
|
* Helper for implementing handlers with the exact method shape of a definition.
|
|
1015
1015
|
*/
|
|
@@ -1026,7 +1026,7 @@ type AsyncMethodArgs<Api, Method extends keyof Api> = Api[Method] extends ((...a
|
|
|
1026
1026
|
type AsyncMethodSuccess<Api, Method extends keyof Api> = Api[Method] extends ((...args: AnyArgs) => Promise<infer A>) ? A : never;
|
|
1027
1027
|
type AsyncMethodCloudflareReturn<Api, Method extends keyof Api> = Result<AsyncMethodSuccess<Api, Method>>;
|
|
1028
1028
|
declare namespace ServiceBinding_d_exports {
|
|
1029
|
-
export { Service, ServiceBindingClient, ServiceBindingDefinition, ServiceBindingEffectClient, ServiceBindingFetchError, ServiceBindingRpcError, ServiceBindingStaticClient, ServiceFetcher, isServiceBindingClient, layer$
|
|
1029
|
+
export { Service, ServiceBindingClient, ServiceBindingDefinition, ServiceBindingEffectClient, ServiceBindingFetchError, ServiceBindingRpcError, ServiceBindingStaticClient, ServiceFetcher, isServiceBindingClient, layer$9 as layer, makeClient$7 as makeClient, makeDirectMethods$1 as makeDirectMethods };
|
|
1030
1030
|
}
|
|
1031
1031
|
declare const TypeId$1: "effect-cf/ServiceBinding";
|
|
1032
1032
|
/**
|
|
@@ -1172,8 +1172,8 @@ type ServiceBindingStaticClient<R, Api extends object, Definition extends Defini
|
|
|
1172
1172
|
readonly scopedCall: <Method extends ServiceMethodKey<Api>>(method: Method, ...args: ServiceMethodArgs<Api, Method>) => Effect.Effect<Awaited<ServiceMethodSuccess<Api, Method>>, unknown, Scope.Scope | R>;
|
|
1173
1173
|
};
|
|
1174
1174
|
declare const isServiceBindingClient: <Api extends object>(value: unknown) => value is ServiceBindingClient<Api>;
|
|
1175
|
-
declare const makeClient$
|
|
1176
|
-
declare const layer$
|
|
1175
|
+
declare const makeClient$7: <Api extends object, const Definition extends Definition$6.Any | undefined = undefined>(definition: ServiceBindingDefinition<Definition>) => ((service: ServiceBindingClient<Api>) => ServiceBindingEffectClient<Api, Definition>);
|
|
1176
|
+
declare const layer$9: <Self, Api extends object, const Definition extends Definition$6.Any | undefined = undefined>(tag: Context.Service<Self, ServiceBindingEffectClient<Api, Definition>>, definition: ServiceBindingDefinition<Definition>) => _$effect_Layer0.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
|
|
1177
1177
|
/**
|
|
1178
1178
|
* Creates a typed Effect service for a Worker service binding.
|
|
1179
1179
|
*
|
|
@@ -1213,7 +1213,7 @@ declare const Service: <Self, Api extends object = never>() => <Id extends strin
|
|
|
1213
1213
|
};
|
|
1214
1214
|
declare const makeDirectMethods$1: <R, Api, Definition extends Definition$6.Any | undefined>(rpcDefinition: Definition | undefined, call: ServiceCall<R, Api>) => DirectMethods$1<R, Definition>;
|
|
1215
1215
|
declare namespace Worker_d_exports {
|
|
1216
|
-
export { Api$2 as Api, Definition$5 as Definition, ExecutionContext, FetchHandler, FetchWorkerOptions, HandlerEffect$2 as HandlerEffect, Handlers$2 as Handlers, LayerOptions$
|
|
1216
|
+
export { Api$2 as Api, Definition$5 as Definition, ExecutionContext, FetchHandler, FetchWorkerOptions, HandlerEffect$2 as HandlerEffect, Handlers$2 as Handlers, LayerOptions$10 as LayerOptions, Method$3 as Method, Methods$2 as Methods, NativeRequest, NoReservedMethods$2 as NoReservedMethods, Options$4 as Options, ReservedMethodName$3 as ReservedMethodName, RpcHandlers$1 as RpcHandlers, ServerApi$3 as ServerApi, ServiceFreeSchema$2 as ServiceFreeSchema, Tag$10 as Tag, TagClass$9 as TagClass, TagFactory$1 as TagFactory, WorkerClass, WorkerContext, WorkerContextService, WorkerContextWaitUntilOptions, WorkerFetchSuccess, WorkerHandler, WorkerOptions, WorkerRpc, WorkerRpcHandler, WorkerRpcShape, implement$4 as implement, isWebSocketUpgrade, make$8 as make, makeFetchHandler, method$2 as method, renderHttpResponse };
|
|
1217
1217
|
}
|
|
1218
1218
|
declare const ExecutionContext_base: Context.ServiceClass<ExecutionContext, "effect-cf/ExecutionContext", globalThis.ExecutionContext<unknown>>;
|
|
1219
1219
|
declare class ExecutionContext extends ExecutionContext_base {}
|
|
@@ -1266,8 +1266,8 @@ interface FetchHandler<Env extends WorkerEnv = WorkerEnv> {
|
|
|
1266
1266
|
readonly fetch: (request: Request, env: Env, ctx: globalThis.ExecutionContext) => Promise<Response>;
|
|
1267
1267
|
}
|
|
1268
1268
|
declare const renderHttpResponse: <A extends HttpServerResponse.HttpServerResponse, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<Response, E, R>;
|
|
1269
|
-
declare function make$
|
|
1270
|
-
declare function make$
|
|
1269
|
+
declare function make$8<ROut, LayerError>(layer: Layer.Layer<ROut, LayerError, ExecutionContext | WorkerContext | WorkerEnvironment>, fetch: WorkerHandler<ROut>): WorkerClass<Record<never, never>, ROut>;
|
|
1270
|
+
declare function make$8<ROut, LayerError, REvent = never, EventLayerError = never, const Rpc extends WorkerRpc<ROut | REvent> = Record<never, never>>(layer: Layer.Layer<ROut, LayerError, ExecutionContext | WorkerContext | WorkerEnvironment>, options: WorkerOptions<ROut, REvent, EventLayerError, Rpc>): WorkerClass<Rpc, ROut | REvent>;
|
|
1271
1271
|
declare const makeFetchHandler: <ROut, LayerError, REvent = never, EventLayerError = never, Env extends WorkerEnv = WorkerEnv>(layer: Layer.Layer<ROut, LayerError, ExecutionContext | WorkerContext | WorkerEnvironment>, options: FetchWorkerOptions<ROut, REvent, EventLayerError>) => FetchHandler<Env>;
|
|
1272
1272
|
type ServiceFreeSchema$2 = Schema.Codec<any, any, never, never>;
|
|
1273
1273
|
interface Method$3<Args extends ReadonlyArray<ServiceFreeSchema$2> = ReadonlyArray<ServiceFreeSchema$2>, Success extends ServiceFreeSchema$2 = ServiceFreeSchema$2> {
|
|
@@ -1296,15 +1296,15 @@ type Handlers$2<ROut, Self extends Definition$5.Any> = { readonly [Key in keyof
|
|
|
1296
1296
|
interface Options$4<ROut, Self extends Definition$5.Any, REvent = never, EventLayerError = never> extends Omit<WorkerOptions<ROut, REvent, EventLayerError, Handlers$2<ROut | REvent, Self>>, "rpc"> {
|
|
1297
1297
|
readonly rpc: Handlers$2<ROut | REvent, Self>;
|
|
1298
1298
|
}
|
|
1299
|
-
type LayerOptions$
|
|
1300
|
-
type TagClass$
|
|
1299
|
+
type LayerOptions$10 = LayerOptions$11;
|
|
1300
|
+
type TagClass$9<Self, Id extends string, MethodsShape extends Methods$2> = Context.ServiceClass<Self, Id, ServiceBindingEffectClient<Api$2<Definition$5<Id, MethodsShape>>, Definition$5<Id, MethodsShape>>> & ServiceBindingStaticClient<Self, Api$2<Definition$5<Id, MethodsShape>>, Definition$5<Id, MethodsShape>> & {
|
|
1301
1301
|
readonly id: Id;
|
|
1302
1302
|
readonly methods: MethodsShape;
|
|
1303
1303
|
readonly make: <ROut, LayerError, REvent = never, EventLayerError = never>(layer: Layer.Layer<ROut, LayerError, ExecutionContext | WorkerContext | WorkerEnvironment>, options: Options$4<ROut, Definition$5<Id, MethodsShape>, REvent, EventLayerError>) => WorkerClass<Handlers$2<ROut | REvent, Definition$5<Id, MethodsShape>>, ROut | REvent>;
|
|
1304
|
-
readonly layer: (options: LayerOptions$
|
|
1304
|
+
readonly layer: (options: LayerOptions$10) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
|
|
1305
1305
|
};
|
|
1306
|
-
type TagFactory$1 = <Self>() => <Id extends string, const MethodsShape extends Methods$2>(id: Id, methods: MethodsShape & NoReservedMethods$2<MethodsShape>) => TagClass$
|
|
1307
|
-
declare const Tag$
|
|
1306
|
+
type TagFactory$1 = <Self>() => <Id extends string, const MethodsShape extends Methods$2>(id: Id, methods: MethodsShape & NoReservedMethods$2<MethodsShape>) => TagClass$9<Self, Id, MethodsShape>;
|
|
1307
|
+
declare const Tag$10: TagFactory$1;
|
|
1308
1308
|
declare const method$2: {
|
|
1309
1309
|
<Success extends ServiceFreeSchema$2>(definition: {
|
|
1310
1310
|
readonly success: Success;
|
|
@@ -1317,7 +1317,7 @@ declare const method$2: {
|
|
|
1317
1317
|
declare const implement$4: <ROut, const Self extends Definition$5.Any>(_definition: Self, handlers: Handlers$2<ROut, Self>) => Handlers$2<ROut, Self>;
|
|
1318
1318
|
type HandlerEffect$2<ROut, Self extends Definition$5.Any, Key extends keyof Self["methods"]> = WorkerRpcHandler<ROut, Method$3.Success<Self["methods"][Key]>>;
|
|
1319
1319
|
declare namespace DurableObjectNamespace_d_exports {
|
|
1320
|
-
export { DurableObjectFetchError, DurableObjectNamespaceBindingDefinition, DurableObjectNamespaceClient, DurableObjectNamespaceDefinition, DurableObjectNamespaceEffectClient, DurableObjectNamespaceStaticClient, DurableObjectRpcError, DurableObjectStubClient, isDurableObjectNamespaceClient, layer$
|
|
1320
|
+
export { DurableObjectFetchError, DurableObjectNamespaceBindingDefinition, DurableObjectNamespaceClient, DurableObjectNamespaceDefinition, DurableObjectNamespaceEffectClient, DurableObjectNamespaceStaticClient, DurableObjectRpcError, DurableObjectStubClient, isDurableObjectNamespaceClient, layer$8 as layer, makeClient$6 as makeClient, makeDirectMethods };
|
|
1321
1321
|
}
|
|
1322
1322
|
interface DurableObjectFetcher {
|
|
1323
1323
|
fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
|
|
@@ -1515,8 +1515,8 @@ type DurableObjectNamespaceStaticClient<R, Api extends object, Definition extend
|
|
|
1515
1515
|
readonly unsafeRaw: () => Effect.Effect<DurableObjectNamespaceClient<Api>, never, R>;
|
|
1516
1516
|
};
|
|
1517
1517
|
declare const isDurableObjectNamespaceClient: <Api extends object>(value: unknown) => value is DurableObjectNamespaceClient<Api>;
|
|
1518
|
-
declare const makeClient$
|
|
1519
|
-
declare const layer$
|
|
1518
|
+
declare const makeClient$6: <Api extends object, const Definition extends Definition$4.Any | undefined = undefined>(definition: DurableObjectNamespaceBindingDefinition<Definition>) => ((namespace: DurableObjectNamespaceClient<Api>) => DurableObjectNamespaceEffectClient<Api, Definition>);
|
|
1519
|
+
declare const layer$8: <Self, Api extends object, const Definition extends Definition$4.Any | undefined = undefined>(tag: Context.Service<Self, DurableObjectNamespaceEffectClient<Api, Definition>>, definition: DurableObjectNamespaceBindingDefinition<Definition>) => _$effect_Layer0.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
|
|
1520
1520
|
declare const makeDirectMethods: <R, Api extends object, Definition extends Definition$4.Any | undefined>(rpcDefinition: Definition | undefined, helpers: {
|
|
1521
1521
|
readonly call: StubCall<R, Api>;
|
|
1522
1522
|
readonly fetch: (stub: DurableObjectStubClient<Api>, input: RequestInfo | URL, init?: RequestInit) => Effect.Effect<globalThis.Response, DurableObjectFetchError, R>;
|
|
@@ -1524,7 +1524,7 @@ declare const makeDirectMethods: <R, Api extends object, Definition extends Defi
|
|
|
1524
1524
|
readonly getByName: (name: string, options?: globalThis.DurableObjectNamespaceGetDurableObjectOptions) => Effect.Effect<DurableObjectStubClient<Api>, never, R>;
|
|
1525
1525
|
}) => DirectMethods<R, Api, Definition>;
|
|
1526
1526
|
declare namespace DurableObjectDefinition_d_exports {
|
|
1527
|
-
export { Api$1 as Api, Definition$4 as Definition, DurableObject$1 as DurableObject, HandlerEffect$1 as HandlerEffect, Handlers$1 as Handlers, LayerOptions$
|
|
1527
|
+
export { Api$1 as Api, Definition$4 as Definition, DurableObject$1 as DurableObject, HandlerEffect$1 as HandlerEffect, Handlers$1 as Handlers, LayerOptions$9 as LayerOptions, Method$2 as Method, Methods$1 as Methods, NoReservedMethods$1 as NoReservedMethods, Options$3 as Options, ReservedMethodName$1 as ReservedMethodName, ServerApi$2 as ServerApi, ServiceFreeSchema$1 as ServiceFreeSchema, Tag$9 as Tag, TagClass$8 as TagClass, implement$3 as implement, make$7 as make, method$1 as method };
|
|
1528
1528
|
}
|
|
1529
1529
|
type ServiceFreeSchema$1 = Schema.Codec<any, any, never, never>;
|
|
1530
1530
|
interface Method$2<Args extends ReadonlyArray<ServiceFreeSchema$1> = ReadonlyArray<ServiceFreeSchema$1>, Success extends ServiceFreeSchema$1 = ServiceFreeSchema$1> {
|
|
@@ -1569,14 +1569,14 @@ type Handlers$1<ROut, Self extends Definition$4.Any> = { readonly [Key in keyof
|
|
|
1569
1569
|
interface Options$3<ROut, Self extends Definition$4.Any, REvent = never, EventLayerError = never> extends Omit<DurableObjectOptions<ROut, REvent, EventLayerError, Handlers$1<ROut | REvent, Self>>, "rpc"> {
|
|
1570
1570
|
readonly rpc: Handlers$1<ROut | REvent, Self>;
|
|
1571
1571
|
}
|
|
1572
|
-
type LayerOptions$
|
|
1572
|
+
type LayerOptions$9 = {
|
|
1573
1573
|
readonly binding: string;
|
|
1574
1574
|
};
|
|
1575
|
-
type TagClass$
|
|
1575
|
+
type TagClass$8<Self, Id extends string, MethodsShape extends Methods$1> = Context.ServiceClass<Self, Id, DurableObjectNamespaceEffectClient<Api$1<Definition$4<Id, MethodsShape>>, Definition$4<Id, MethodsShape>>> & DurableObjectNamespaceStaticClient<Self, Api$1<Definition$4<Id, MethodsShape>>, Definition$4<Id, MethodsShape>> & {
|
|
1576
1576
|
readonly id: Id;
|
|
1577
1577
|
readonly methods: MethodsShape;
|
|
1578
1578
|
readonly make: <ROut, LayerError, REvent = never, EventLayerError = never>(layer: Layer.Layer<ROut, LayerError, DurableObjectState | WorkerEnvironment>, options: Options$3<ROut, Definition$4<Id, MethodsShape>, REvent, EventLayerError>) => DurableObjectClass<Handlers$1<ROut | REvent, Definition$4<Id, MethodsShape>>, ROut | REvent>;
|
|
1579
|
-
readonly layer: (options: LayerOptions$
|
|
1579
|
+
readonly layer: (options: LayerOptions$9) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
|
|
1580
1580
|
};
|
|
1581
1581
|
/**
|
|
1582
1582
|
* Defines a single RPC method schema in a Durable Object definition.
|
|
@@ -1590,9 +1590,9 @@ declare const method$1: {
|
|
|
1590
1590
|
readonly success: Success;
|
|
1591
1591
|
}): Method$2<Args, Success>;
|
|
1592
1592
|
};
|
|
1593
|
-
declare const make$
|
|
1594
|
-
declare const Tag$
|
|
1595
|
-
declare const DurableObject$1: <Self>() => <Id extends string, const MethodsShape extends Methods$1>(id: Id, methods: MethodsShape & NoReservedMethods$1<MethodsShape>) => TagClass$
|
|
1593
|
+
declare const make$7: <Id extends string, const MethodsShape extends Methods$1>(id: Id, methods: MethodsShape & NoReservedMethods$1<MethodsShape>) => TagClass$8<Definition$4<Id, MethodsShape>, Id, MethodsShape>;
|
|
1594
|
+
declare const Tag$9: <Self>() => <Id extends string, const MethodsShape extends Methods$1>(id: Id, methods: MethodsShape & NoReservedMethods$1<MethodsShape>) => TagClass$8<Self, Id, MethodsShape>;
|
|
1595
|
+
declare const DurableObject$1: <Self>() => <Id extends string, const MethodsShape extends Methods$1>(id: Id, methods: MethodsShape & NoReservedMethods$1<MethodsShape>) => TagClass$8<Self, Id, MethodsShape>;
|
|
1596
1596
|
/**
|
|
1597
1597
|
* Helper for implementing handlers with the exact method shape of a definition.
|
|
1598
1598
|
*/
|
|
@@ -1602,7 +1602,7 @@ declare const implement$3: <ROut, const Self extends Definition$4.Any>(_definiti
|
|
|
1602
1602
|
*/
|
|
1603
1603
|
type HandlerEffect$1<ROut, Self extends Definition$4.Any, Key extends keyof Self["methods"]> = DurableObjectHandler<ROut, Method$2.Success<Self["methods"][Key]>>;
|
|
1604
1604
|
declare namespace DurableObject_d_exports {
|
|
1605
|
-
export { Api, Definition$3 as Definition, DurableObjectClass, DurableObjectHandler, DurableObjectOptions, DurableObjectRpc, DurableObjectRpcShape, HandlerEffect, Handlers, LayerOptions$
|
|
1605
|
+
export { Api, Definition$3 as Definition, DurableObjectClass, DurableObjectHandler, DurableObjectOptions, DurableObjectRpc, DurableObjectRpcShape, HandlerEffect, Handlers, LayerOptions$8 as LayerOptions, Method$1 as Method, Methods, NoReservedMethods, Options$2 as Options, ReservedMethodName, RpcHandlers, ServerApi$1 as ServerApi, ServiceFreeSchema, Tag$8 as Tag, TagClass$7 as TagClass, TagFactory, implement$2 as implement, make$6 as make, method };
|
|
1606
1606
|
}
|
|
1607
1607
|
type RuntimeContext$1<ROut> = DurableObjectState | WorkerEnvironment | ROut;
|
|
1608
1608
|
type HandlerContext<ROut> = RuntimeContext$1<ROut> | Scope.Scope;
|
|
@@ -1662,7 +1662,7 @@ type DurableObjectClass<Rpc extends DurableObjectRpc<ROut>, ROut> = new (state:
|
|
|
1662
1662
|
/**
|
|
1663
1663
|
* Creates a Durable Object class backed by a single managed Effect runtime.
|
|
1664
1664
|
*/
|
|
1665
|
-
declare const make$
|
|
1665
|
+
declare const make$6: <ROut, LayerError, REvent = never, EventLayerError = never, const Rpc extends DurableObjectRpc<ROut | REvent> = Record<never, never>>(layer: Layer.Layer<ROut, LayerError, DurableObjectState | WorkerEnvironment>, options?: DurableObjectOptions<ROut, REvent, EventLayerError, Rpc>) => DurableObjectClass<Rpc, ROut | REvent>;
|
|
1666
1666
|
type ServiceFreeSchema = Schema.Codec<any, any, never, never>;
|
|
1667
1667
|
interface Method$1<Args extends ReadonlyArray<ServiceFreeSchema> = ReadonlyArray<ServiceFreeSchema>, Success extends ServiceFreeSchema = ServiceFreeSchema> {
|
|
1668
1668
|
readonly args: Args;
|
|
@@ -1685,21 +1685,21 @@ interface Definition$3<Id extends string = string, MethodsShape extends Methods
|
|
|
1685
1685
|
declare namespace Definition$3 {
|
|
1686
1686
|
type Any = Definition$3<string, Methods>;
|
|
1687
1687
|
}
|
|
1688
|
-
type LayerOptions$
|
|
1688
|
+
type LayerOptions$8 = LayerOptions$9;
|
|
1689
1689
|
type ServerApi$1<Self extends Definition$3.Any> = { readonly [Key in keyof Self["methods"]]: (...args: Method$1.Args<Self["methods"][Key]>) => Promise<Method$1.Success<Self["methods"][Key]>> };
|
|
1690
1690
|
type Api<Self extends Definition$3.Any> = Provider<ServerApi$1<Self>, ReservedMethodName>;
|
|
1691
1691
|
type Handlers<ROut, Self extends Definition$3.Any> = { readonly [Key in keyof Self["methods"]]: (...args: Method$1.Args<Self["methods"][Key]>) => DurableObjectHandler<ROut, Method$1.Success<Self["methods"][Key]>> };
|
|
1692
1692
|
interface Options$2<ROut, Self extends Definition$3.Any, REvent = never, EventLayerError = never> extends Omit<DurableObjectOptions<ROut, REvent, EventLayerError, Handlers<ROut | REvent, Self>>, "rpc"> {
|
|
1693
1693
|
readonly rpc: Handlers<ROut | REvent, Self>;
|
|
1694
1694
|
}
|
|
1695
|
-
type TagClass$
|
|
1695
|
+
type TagClass$7<Self, Id extends string, MethodsShape extends Methods> = Context.ServiceClass<Self, Id, DurableObjectNamespaceEffectClient<Api<Definition$3<Id, MethodsShape>>, Definition$3<Id, MethodsShape>>> & DurableObjectNamespaceStaticClient<Self, Api<Definition$3<Id, MethodsShape>>, Definition$3<Id, MethodsShape>> & {
|
|
1696
1696
|
readonly id: Id;
|
|
1697
1697
|
readonly methods: MethodsShape;
|
|
1698
1698
|
readonly make: <ROut, LayerError, REvent = never, EventLayerError = never>(layer: Layer.Layer<ROut, LayerError, DurableObjectState | WorkerEnvironment>, options: Options$2<ROut, Definition$3<Id, MethodsShape>, REvent, EventLayerError>) => DurableObjectClass<Handlers<ROut | REvent, Definition$3<Id, MethodsShape>>, ROut | REvent>;
|
|
1699
|
-
readonly layer: (options: LayerOptions$
|
|
1699
|
+
readonly layer: (options: LayerOptions$8) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
|
|
1700
1700
|
};
|
|
1701
|
-
type TagFactory = <Self>() => <Id extends string, const MethodsShape extends Methods>(id: Id, methods: MethodsShape & NoReservedMethods<MethodsShape>) => TagClass$
|
|
1702
|
-
declare const Tag$
|
|
1701
|
+
type TagFactory = <Self>() => <Id extends string, const MethodsShape extends Methods>(id: Id, methods: MethodsShape & NoReservedMethods<MethodsShape>) => TagClass$7<Self, Id, MethodsShape>;
|
|
1702
|
+
declare const Tag$8: TagFactory;
|
|
1703
1703
|
declare const method: {
|
|
1704
1704
|
<Success extends ServiceFreeSchema>(definition: {
|
|
1705
1705
|
readonly success: Success;
|
|
@@ -2036,12 +2036,12 @@ declare class DurableObjectAlarm extends DurableObjectAlarm_base {
|
|
|
2036
2036
|
static readonly layer: Layer.Layer<DurableObjectAlarm, never, DurableObjectState>;
|
|
2037
2037
|
}
|
|
2038
2038
|
declare namespace DurableObjectRpcWebSocket_d_exports {
|
|
2039
|
-
export { DurableObjectRpcWebSocket, DurableObjectRpcWebSocketService, LayerOptions$
|
|
2039
|
+
export { DurableObjectRpcWebSocket, DurableObjectRpcWebSocketService, LayerOptions$7 as LayerOptions, NativeWebSocketMessage, layer$7 as layer };
|
|
2040
2040
|
}
|
|
2041
2041
|
/**
|
|
2042
2042
|
* Configuration for {@link layer}.
|
|
2043
2043
|
*/
|
|
2044
|
-
interface LayerOptions$
|
|
2044
|
+
interface LayerOptions$7 {
|
|
2045
2045
|
/** Tag used to select hibernated sockets. */
|
|
2046
2046
|
readonly tag?: string | undefined;
|
|
2047
2047
|
/** Socket attachment key used to persist client ids across hibernation. */
|
|
@@ -2066,9 +2066,9 @@ declare class DurableObjectRpcWebSocket extends DurableObjectRpcWebSocket_base {
|
|
|
2066
2066
|
/**
|
|
2067
2067
|
* Builds a layer that bridges Durable Object websocket events to `RpcServer.Protocol`.
|
|
2068
2068
|
*/
|
|
2069
|
-
declare const layer$
|
|
2069
|
+
declare const layer$7: (options?: LayerOptions$7) => Layer.Layer<DurableObjectRpcWebSocket | RpcServer.Protocol, never, DurableObjectState | RpcSerialization.RpcSerialization>;
|
|
2070
2070
|
declare namespace DurableObjectSqlite_d_exports {
|
|
2071
|
-
export { SqliteLayerOptions, layer$
|
|
2071
|
+
export { SqliteLayerOptions, layer$6 as layer };
|
|
2072
2072
|
}
|
|
2073
2073
|
/** Options forwarded to `@effect/sql-sqlite-do` when building a SQL client layer. */
|
|
2074
2074
|
type SqliteLayerOptions = Omit<SqliteClient.SqliteClientConfig, "db">;
|
|
@@ -2083,7 +2083,58 @@ type SqliteLayerOptions = Omit<SqliteClient.SqliteClientConfig, "db">;
|
|
|
2083
2083
|
* );
|
|
2084
2084
|
* ```
|
|
2085
2085
|
*/
|
|
2086
|
-
declare const layer$
|
|
2086
|
+
declare const layer$6: (options?: SqliteLayerOptions) => Layer.Layer<_$effect_unstable_sql_SqlClient0.SqlClient | SqliteClient.SqliteClient, never, DurableObjectState>;
|
|
2087
|
+
declare namespace Email_d_exports {
|
|
2088
|
+
export { EmailAddress, EmailAttachment, EmailBinding, EmailClient, EmailDefinition, EmailMessage, EmailMessageBuilder, EmailOperationError, EmailSendInput, EmailSendResult, EmailService, LayerOptions$6 as LayerOptions, Tag$7 as Tag, TagClass$6 as TagClass, isEmailBinding, layer$5 as layer, make$5 as make, makeClient$5 as makeClient };
|
|
2089
|
+
}
|
|
2090
|
+
declare const EmailOperationError_base: new <A extends Record<string, any> = {}>(args: _$effect_Types0.VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => _$effect_Cause0.YieldableError & {
|
|
2091
|
+
readonly _tag: "EmailOperationError";
|
|
2092
|
+
} & Readonly<A>;
|
|
2093
|
+
/** Error raised when a Cloudflare Send Email operation fails. */
|
|
2094
|
+
declare class EmailOperationError extends EmailOperationError_base<{
|
|
2095
|
+
readonly binding: string;
|
|
2096
|
+
readonly operation: string;
|
|
2097
|
+
readonly cause: unknown;
|
|
2098
|
+
}> {}
|
|
2099
|
+
/** Typed Cloudflare Send Email binding definition. */
|
|
2100
|
+
interface EmailDefinition {
|
|
2101
|
+
/** Binding name as configured in `wrangler.jsonc`. */
|
|
2102
|
+
readonly binding: string;
|
|
2103
|
+
}
|
|
2104
|
+
type EmailAddress = CloudflareEmailAddress;
|
|
2105
|
+
type EmailAttachment = CloudflareEmailAttachment;
|
|
2106
|
+
type EmailMessage = CloudflareEmailMessage;
|
|
2107
|
+
type EmailMessageBuilder = Parameters<CloudflareSendEmail["send"]>[0];
|
|
2108
|
+
type EmailSendInput = EmailMessage | EmailMessageBuilder;
|
|
2109
|
+
type EmailSendResult = CloudflareEmailSendResult;
|
|
2110
|
+
type EmailBinding = CloudflareSendEmail;
|
|
2111
|
+
interface EmailClient {
|
|
2112
|
+
readonly send: {
|
|
2113
|
+
(message: EmailMessage): Effect.Effect<EmailSendResult, EmailOperationError>;
|
|
2114
|
+
(builder: EmailMessageBuilder): Effect.Effect<EmailSendResult, EmailOperationError>;
|
|
2115
|
+
};
|
|
2116
|
+
readonly unsafeRaw: Effect.Effect<EmailBinding>;
|
|
2117
|
+
readonly definition: EmailDefinition;
|
|
2118
|
+
}
|
|
2119
|
+
declare const EmailServiceTypeId: unique symbol;
|
|
2120
|
+
/** Nominal service marker for Send Email services created with {@link make}. */
|
|
2121
|
+
interface EmailService<Id extends string> {
|
|
2122
|
+
readonly [EmailServiceTypeId]: {
|
|
2123
|
+
readonly id: Id;
|
|
2124
|
+
};
|
|
2125
|
+
}
|
|
2126
|
+
type LayerOptions$6 = {
|
|
2127
|
+
readonly binding: string;
|
|
2128
|
+
};
|
|
2129
|
+
interface TagClass$6<Self, Id extends string> extends Context.ServiceClass<Self, Id, EmailClient> {
|
|
2130
|
+
readonly id: Id;
|
|
2131
|
+
readonly layer: (options: LayerOptions$6) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
|
|
2132
|
+
}
|
|
2133
|
+
declare const isEmailBinding: (value: unknown) => value is EmailBinding;
|
|
2134
|
+
declare const makeClient$5: (definition: EmailDefinition) => (email: EmailBinding) => EmailClient;
|
|
2135
|
+
declare const layer$5: <Self>(tag: Context.Service<Self, EmailClient>, definition: EmailDefinition) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
|
|
2136
|
+
declare const make$5: <Id extends string>(id: Id) => TagClass$6<EmailService<Id>, Id>;
|
|
2137
|
+
declare const Tag$7: <Self>() => <Id extends string>(id: Id) => TagClass$6<Self, Id>;
|
|
2087
2138
|
declare namespace Images_d_exports {
|
|
2088
2139
|
export { DrawStepOptions, HostedImagesClient, ImageDrawOptions, ImageHandleClient, ImageInfoResponse, ImageInputOptions, ImageInputValue, ImageList, ImageListOptions, ImageMetadata, ImageOutputOptions, ImageTransform, ImageTransformationOutputOptions, ImageTransformationResult, ImageUpdateOptions, ImageUploadOptions, ImageUploadValue, ImagesClient, ImagesDefinition, ImagesOperationError, ImagesRuntimeBinding, ImagesService, ImagesTransformationResultClient, LayerOptions$5 as LayerOptions, ProcessOptions, Step, Steps, Tag$6 as Tag, TagClass$5 as TagClass, draw, empty, isImagesBinding, layer$4 as layer, make$4 as make, makeClient$4 as makeClient, transform };
|
|
2089
2140
|
}
|
|
@@ -2587,4 +2638,4 @@ declare const layer: <Self>(tag: Context.Service<Self, VectorizeClient>, definit
|
|
|
2587
2638
|
declare const make: <Id extends string>(id: Id) => TagClass<VectorizeService<Id>, Id>;
|
|
2588
2639
|
declare const Tag$1: <Self>() => <Id extends string>(id: Id) => TagClass<Self, Id>;
|
|
2589
2640
|
//#endregion
|
|
2590
|
-
export { AiGateway_d_exports as AiGateway, Binding_d_exports as Binding, BrowserRendering_d_exports as BrowserRendering, CloudflareOtlp_d_exports as CloudflareOtlp, D1_d_exports as D1, DurableObject_d_exports as DurableObject, DurableObjectAlarm_d_exports as DurableObjectAlarm, DurableObjectDefinition_d_exports as DurableObjectDefinition, DurableObjectNamespace_d_exports as DurableObjectNamespace, DurableObjectRpcWebSocket_d_exports as DurableObjectRpcWebSocket, DurableObjectSqlite_d_exports as DurableObjectSqlite, DurableObjectState_d_exports as DurableObjectState, DurableObjectStorage_d_exports as DurableObjectStorage, DurableObjectWebSocket_d_exports as DurableObjectWebSocket, Hyperdrive_d_exports as Hyperdrive, Images_d_exports as Images, Kv_d_exports as Kv, Queue_d_exports as Queue, QueueBinding_d_exports as QueueBinding, QueueDefinition_d_exports as QueueDefinition, R2_d_exports as R2, Rpc_d_exports as Rpc, RpcDefinition_d_exports as RpcDefinition, ServiceBinding_d_exports as ServiceBinding, Vectorize_d_exports as Vectorize, Worker_d_exports as Worker, WorkerConfig, WorkerDefinition_d_exports as WorkerDefinition, type WorkerEnv, WorkerEnvironment, WorkersAi_d_exports as WorkersAi, Workflow_d_exports as Workflow, WorkflowBinding_d_exports as WorkflowBinding, WorkflowDefinition_d_exports as WorkflowDefinition };
|
|
2641
|
+
export { AiGateway_d_exports as AiGateway, Binding_d_exports as Binding, BrowserRendering_d_exports as BrowserRendering, CloudflareOtlp_d_exports as CloudflareOtlp, D1_d_exports as D1, DurableObject_d_exports as DurableObject, DurableObjectAlarm_d_exports as DurableObjectAlarm, DurableObjectDefinition_d_exports as DurableObjectDefinition, DurableObjectNamespace_d_exports as DurableObjectNamespace, DurableObjectRpcWebSocket_d_exports as DurableObjectRpcWebSocket, DurableObjectSqlite_d_exports as DurableObjectSqlite, DurableObjectState_d_exports as DurableObjectState, DurableObjectStorage_d_exports as DurableObjectStorage, DurableObjectWebSocket_d_exports as DurableObjectWebSocket, Email_d_exports as Email, Hyperdrive_d_exports as Hyperdrive, Images_d_exports as Images, Kv_d_exports as Kv, Queue_d_exports as Queue, QueueBinding_d_exports as QueueBinding, QueueDefinition_d_exports as QueueDefinition, R2_d_exports as R2, Rpc_d_exports as Rpc, RpcDefinition_d_exports as RpcDefinition, ServiceBinding_d_exports as ServiceBinding, Vectorize_d_exports as Vectorize, Worker_d_exports as Worker, WorkerConfig, WorkerDefinition_d_exports as WorkerDefinition, type WorkerEnv, WorkerEnvironment, WorkersAi_d_exports as WorkersAi, Workflow_d_exports as Workflow, WorkflowBinding_d_exports as WorkflowBinding, WorkflowDefinition_d_exports as WorkflowDefinition };
|