effect-cf 0.15.0 → 0.17.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 +12 -0
- package/README.md +124 -1
- package/dist/index.d.mts +333 -38
- package/dist/index.mjs +427 -49
- package/package.json +2 -1
- package/src/AnalyticsEngine.ts +846 -0
- package/src/ContainerNamespace.ts +337 -0
- package/src/index.ts +2 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as BindingService, c as WorkerConfig, i as BindingNotFoundError, l as WorkerEnv, o as BindingValidationError, s as Binding_d_exports, t as Hyperdrive_d_exports, u as WorkerEnvironment } from "./Hyperdrive-C0vfrPeG.mjs";
|
|
2
|
-
import { Cause, Context, Data, DateTime, Duration, Effect, Layer, Option, Schema, Scope } from "effect";
|
|
3
|
-
import { Headers as Headers$1, HttpServerRequest, HttpServerResponse } from "effect/unstable/http";
|
|
2
|
+
import { Cause, Config, Context, Data, DateTime, Duration, Effect, Layer, Option, Redacted, Schema, Scope } from "effect";
|
|
3
|
+
import { Headers as Headers$1, HttpClient, HttpClientResponse, HttpServerRequest, HttpServerResponse } from "effect/unstable/http";
|
|
4
4
|
import { D1Client } from "@effect/sql-d1";
|
|
5
5
|
import { DurableObject, RpcStub, RpcTarget, WorkerEntrypoint, WorkflowEntrypoint, WorkflowEvent, WorkflowSleepDuration, WorkflowStep, WorkflowStepConfig, WorkflowStepContext, WorkflowStepEvent, WorkflowTimeoutDuration } from "cloudflare:workers";
|
|
6
6
|
import * as RpcSerialization from "effect/unstable/rpc/RpcSerialization";
|
|
@@ -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$19 as LayerOptions, Tag$18 as Tag, TagClass$17 as TagClass, WorkersAiAsyncBatchResponse, WorkersAiBinding, WorkersAiClient, WorkersAiDefinition, WorkersAiEmbeddingInput, WorkersAiEmbeddingResponse, WorkersAiModelsSearchObject, WorkersAiModelsSearchParams, WorkersAiOperationError, WorkersAiOptions, WorkersAiService, embeddingResponse, isWorkersAiBinding, layer$16 as layer, make$17 as make, makeClient$13 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$19 = {
|
|
79
79
|
readonly binding: string;
|
|
80
80
|
};
|
|
81
|
-
interface TagClass$
|
|
81
|
+
interface TagClass$17<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$19) => 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$13: <ModelList extends AiModelListType = AiModels>(definition: WorkersAiDefinition) => (ai: WorkersAiBinding<ModelList>) => WorkersAiClient<ModelList>;
|
|
91
|
+
declare const layer$16: <Self, ModelList extends AiModelListType = AiModels>(tag: Context.Service<Self, WorkersAiClient<ModelList>>, definition: WorkersAiDefinition) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
|
|
92
|
+
declare const make$17: <Id extends string>(id: Id) => TagClass$17<WorkersAiService<Id>, Id, AiModels>;
|
|
93
|
+
declare const Tag$18: <Self>() => <Id extends string, ModelList extends AiModelListType = AiModels>(id: Id) => TagClass$17<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$18 as LayerOptions, Tag$17 as Tag, TagClass$16 as TagClass, isAiGatewayBinding, layer$15 as layer, make$16 as make, makeClient$12 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$18 = {
|
|
145
145
|
readonly binding: string;
|
|
146
146
|
readonly gatewayId: string;
|
|
147
147
|
readonly accountId?: string;
|
|
148
148
|
};
|
|
149
|
-
interface TagClass$
|
|
149
|
+
interface TagClass$16<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$18) => 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$12: (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,182 @@ 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$15: <Self>(tag: Context.Service<Self, AiGatewayClient>, definition: AiGatewayDefinition) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
|
|
173
|
+
declare const make$16: <Id extends string>(id: Id) => TagClass$16<AiGatewayService<Id>, Id>;
|
|
174
|
+
declare const Tag$17: <Self>() => <Id extends string>(id: Id) => TagClass$16<Self, Id>;
|
|
175
|
+
declare namespace AnalyticsEngine_d_exports {
|
|
176
|
+
export { AnalyticsEngineBinding, AnalyticsEngineClient, AnalyticsEngineDataPoint, AnalyticsEngineDataPointSchema, AnalyticsEngineDefinition, AnalyticsEngineFieldValue, AnalyticsEngineFieldValueSchema, AnalyticsEngineInvalidWritePolicy, AnalyticsEngineOperationError, AnalyticsEngineQueryClient, AnalyticsEngineQueryColumn, AnalyticsEngineQueryDefinition, AnalyticsEngineQueryError, AnalyticsEngineQueryOptions, AnalyticsEngineQueryResult, AnalyticsEngineQueryRow, AnalyticsEngineQueryService, AnalyticsEngineService, AnalyticsEngineWriteBatchOptions, AnalyticsEngineWriteError, AnalyticsEngineWriteOptions, AnalyticsEngineWritePolicy, AnalyticsEngineWriteValidationError, AnalyticsEngineWriteViolation, LayerOptions$17 as LayerOptions, QueryConfigOptions, QueryTag, QueryTagClass, Tag$16 as Tag, TagClass$15 as TagClass, isAnalyticsEngineDataset, layer$14 as layer, make$15 as make, makeClient$11 as makeClient, makeQuery, makeQueryClient, queryConfig, queryFetchLayer, queryFetchLayerConfig, queryLayer, queryLayerConfig, writeLimits };
|
|
177
|
+
}
|
|
178
|
+
declare const writeLimits: {
|
|
179
|
+
readonly maxBlobs: 20;
|
|
180
|
+
readonly maxDoubles: 20;
|
|
181
|
+
readonly maxIndexes: 1;
|
|
182
|
+
readonly maxBlobBytes: number;
|
|
183
|
+
readonly maxIndexBytes: 96;
|
|
184
|
+
readonly maxDataPointsPerInvocation: 250;
|
|
185
|
+
};
|
|
186
|
+
declare const queryColumnSchema: Schema.Struct<{
|
|
187
|
+
readonly name: Schema.String;
|
|
188
|
+
readonly type: Schema.String;
|
|
189
|
+
}>;
|
|
190
|
+
declare const queryRowSchema: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
191
|
+
declare const AnalyticsEngineFieldValueSchema: Schema.NullOr<Schema.Union<readonly [Schema.String, Schema.instanceOf<ArrayBuffer, unknown>]>>;
|
|
192
|
+
declare const AnalyticsEngineDataPointSchema: Schema.Struct<{
|
|
193
|
+
readonly indexes: Schema.optional<Schema.$Array<Schema.NullOr<Schema.Union<readonly [Schema.String, Schema.instanceOf<ArrayBuffer, unknown>]>>>>;
|
|
194
|
+
readonly doubles: Schema.optional<Schema.$Array<Schema.Finite>>;
|
|
195
|
+
readonly blobs: Schema.optional<Schema.$Array<Schema.NullOr<Schema.Union<readonly [Schema.String, Schema.instanceOf<ArrayBuffer, unknown>]>>>>;
|
|
196
|
+
}>;
|
|
197
|
+
declare const AnalyticsEngineOperationError_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 & {
|
|
198
|
+
readonly _tag: "AnalyticsEngineOperationError";
|
|
199
|
+
} & Readonly<A>;
|
|
200
|
+
/** Error raised when an Analytics Engine operation fails. */
|
|
201
|
+
declare class AnalyticsEngineOperationError extends AnalyticsEngineOperationError_base<{
|
|
202
|
+
readonly binding: string;
|
|
203
|
+
readonly operation: string;
|
|
204
|
+
readonly cause: unknown;
|
|
205
|
+
}> {}
|
|
206
|
+
interface AnalyticsEngineWriteViolation {
|
|
207
|
+
readonly path: string;
|
|
208
|
+
readonly message: string;
|
|
209
|
+
readonly limit?: number;
|
|
210
|
+
readonly actual?: number;
|
|
211
|
+
}
|
|
212
|
+
declare const AnalyticsEngineWriteValidationError_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 & {
|
|
213
|
+
readonly _tag: "AnalyticsEngineWriteValidationError";
|
|
214
|
+
} & Readonly<A>;
|
|
215
|
+
/** Error raised when an Analytics Engine write input violates Cloudflare limits. */
|
|
216
|
+
declare class AnalyticsEngineWriteValidationError extends AnalyticsEngineWriteValidationError_base<{
|
|
217
|
+
readonly binding: string;
|
|
218
|
+
readonly operation: string;
|
|
219
|
+
readonly violations: ReadonlyArray<AnalyticsEngineWriteViolation>;
|
|
220
|
+
readonly cause?: unknown;
|
|
221
|
+
}> {}
|
|
222
|
+
declare const AnalyticsEngineQueryError_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 & {
|
|
223
|
+
readonly _tag: "AnalyticsEngineQueryError";
|
|
224
|
+
} & Readonly<A>;
|
|
225
|
+
/** Error raised when an Analytics Engine SQL API query fails. */
|
|
226
|
+
declare class AnalyticsEngineQueryError extends AnalyticsEngineQueryError_base<{
|
|
227
|
+
readonly operation: string;
|
|
228
|
+
readonly accountId: string;
|
|
229
|
+
readonly message: string;
|
|
230
|
+
readonly status?: number;
|
|
231
|
+
readonly body?: string;
|
|
232
|
+
readonly cause?: unknown;
|
|
233
|
+
}> {}
|
|
234
|
+
/** Typed Analytics Engine dataset binding definition. */
|
|
235
|
+
interface AnalyticsEngineDefinition {
|
|
236
|
+
/** Binding name as configured in `wrangler.jsonc`. */
|
|
237
|
+
readonly binding: string;
|
|
238
|
+
}
|
|
239
|
+
type AnalyticsEngineBinding = CloudflareAnalyticsEngineDataset;
|
|
240
|
+
type AnalyticsEngineDataPoint = CloudflareAnalyticsEngineDataPoint;
|
|
241
|
+
type AnalyticsEngineFieldValue = ArrayBuffer | string | null;
|
|
242
|
+
type AnalyticsEngineWriteError = AnalyticsEngineOperationError | AnalyticsEngineWriteValidationError;
|
|
243
|
+
type AnalyticsEngineInvalidWritePolicy = "error" | "drop";
|
|
244
|
+
type AnalyticsEngineQueryColumn = Schema.Schema.Type<typeof queryColumnSchema>;
|
|
245
|
+
type AnalyticsEngineQueryRow = Schema.Schema.Type<typeof queryRowSchema>;
|
|
246
|
+
interface AnalyticsEngineWriteOptions {
|
|
247
|
+
/**
|
|
248
|
+
* Controls invalid write behavior. The default is `"error"`, which fails with
|
|
249
|
+
* `AnalyticsEngineWriteValidationError`. `"drop"` skips invalid points.
|
|
250
|
+
*/
|
|
251
|
+
readonly onInvalid?: AnalyticsEngineInvalidWritePolicy;
|
|
252
|
+
}
|
|
253
|
+
interface AnalyticsEngineWriteBatchOptions extends AnalyticsEngineWriteOptions {
|
|
254
|
+
/**
|
|
255
|
+
* Maximum points per native batch call. Values are clamped to Cloudflare's
|
|
256
|
+
* per-invocation limit.
|
|
257
|
+
*/
|
|
258
|
+
readonly batchSize?: number;
|
|
259
|
+
}
|
|
260
|
+
type AnalyticsEngineWritePolicy = AnalyticsEngineWriteBatchOptions;
|
|
261
|
+
interface AnalyticsEngineQueryResult<Row = AnalyticsEngineQueryRow> {
|
|
262
|
+
readonly meta: ReadonlyArray<AnalyticsEngineQueryColumn>;
|
|
263
|
+
readonly data: ReadonlyArray<Row>;
|
|
264
|
+
readonly rows: number;
|
|
265
|
+
}
|
|
266
|
+
interface AnalyticsEngineQueryDefinition {
|
|
267
|
+
/** Cloudflare account id that owns the Analytics Engine datasets. */
|
|
268
|
+
readonly accountId: string;
|
|
269
|
+
/** API token with Account Analytics Read permission. */
|
|
270
|
+
readonly apiToken: Redacted.Redacted<string>;
|
|
271
|
+
/** Base Cloudflare API URL. Defaults to `https://api.cloudflare.com/client/v4`. */
|
|
272
|
+
readonly apiBaseUrl?: string | URL;
|
|
273
|
+
}
|
|
274
|
+
interface AnalyticsEngineQueryOptions {
|
|
275
|
+
/** Additional request headers. Authorization is always derived from `apiToken`. */
|
|
276
|
+
readonly headers?: Headers$1.Input;
|
|
277
|
+
}
|
|
278
|
+
interface AnalyticsEngineClient {
|
|
279
|
+
readonly writeDataPoint: (dataPoint?: AnalyticsEngineDataPoint, options?: AnalyticsEngineWriteOptions) => Effect.Effect<void, AnalyticsEngineWriteError>;
|
|
280
|
+
readonly write: (dataPoint?: AnalyticsEngineDataPoint, options?: AnalyticsEngineWriteOptions) => Effect.Effect<void, AnalyticsEngineWriteError>;
|
|
281
|
+
readonly writeDataPoints: (dataPoints: ReadonlyArray<AnalyticsEngineDataPoint>, options?: AnalyticsEngineWriteBatchOptions) => Effect.Effect<void, AnalyticsEngineWriteError>;
|
|
282
|
+
readonly writeBatch: (dataPoints: ReadonlyArray<AnalyticsEngineDataPoint>, options?: AnalyticsEngineWriteBatchOptions) => Effect.Effect<void, AnalyticsEngineWriteError>;
|
|
283
|
+
readonly unsafeRaw: Effect.Effect<AnalyticsEngineBinding>;
|
|
284
|
+
readonly definition: AnalyticsEngineDefinition;
|
|
285
|
+
}
|
|
286
|
+
interface AnalyticsEngineQueryClient {
|
|
287
|
+
readonly query: (sql: string, options?: AnalyticsEngineQueryOptions) => Effect.Effect<AnalyticsEngineQueryResult, AnalyticsEngineQueryError | Schema.SchemaError>;
|
|
288
|
+
readonly queryResult: <Row>(row: Schema.Codec<Row, unknown>, sql: string, options?: AnalyticsEngineQueryOptions) => Effect.Effect<AnalyticsEngineQueryResult<Row>, AnalyticsEngineQueryError | Schema.SchemaError>;
|
|
289
|
+
readonly queryRows: <Row>(row: Schema.Codec<Row, unknown>, sql: string, options?: AnalyticsEngineQueryOptions) => Effect.Effect<ReadonlyArray<Row>, AnalyticsEngineQueryError | Schema.SchemaError>;
|
|
290
|
+
readonly queryOne: <Row>(row: Schema.Codec<Row, unknown>, sql: string, options?: AnalyticsEngineQueryOptions) => Effect.Effect<Option.Option<Row>, AnalyticsEngineQueryError | Schema.SchemaError>;
|
|
291
|
+
readonly queryText: (sql: string, options?: AnalyticsEngineQueryOptions) => Effect.Effect<string, AnalyticsEngineQueryError>;
|
|
292
|
+
readonly raw: (sql: string, options?: AnalyticsEngineQueryOptions) => Effect.Effect<HttpClientResponse.HttpClientResponse, AnalyticsEngineQueryError>;
|
|
293
|
+
readonly definition: AnalyticsEngineQueryDefinition;
|
|
294
|
+
}
|
|
295
|
+
declare const AnalyticsEngineServiceTypeId: unique symbol;
|
|
296
|
+
declare const AnalyticsEngineQueryServiceTypeId: unique symbol;
|
|
297
|
+
/** Nominal service marker for Analytics Engine services created with {@link make}. */
|
|
298
|
+
interface AnalyticsEngineService<Id extends string> {
|
|
299
|
+
readonly [AnalyticsEngineServiceTypeId]: {
|
|
300
|
+
readonly id: Id;
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
/** Nominal service marker for Analytics Engine query services created with {@link makeQuery}. */
|
|
304
|
+
interface AnalyticsEngineQueryService<Id extends string> {
|
|
305
|
+
readonly [AnalyticsEngineQueryServiceTypeId]: {
|
|
306
|
+
readonly id: Id;
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
type LayerOptions$17 = {
|
|
310
|
+
readonly binding: string;
|
|
311
|
+
readonly write?: AnalyticsEngineWritePolicy;
|
|
312
|
+
};
|
|
313
|
+
type QueryConfigOptions = {
|
|
314
|
+
readonly accountId?: Config.Config<string>;
|
|
315
|
+
readonly apiToken?: Config.Config<Redacted.Redacted<string>>;
|
|
316
|
+
readonly apiBaseUrl?: Config.Config<string>;
|
|
317
|
+
};
|
|
318
|
+
interface TagClass$15<Self, Id extends string> extends Context.ServiceClass<Self, Id, AnalyticsEngineClient> {
|
|
319
|
+
readonly id: Id;
|
|
320
|
+
readonly layer: (options: LayerOptions$17) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
|
|
321
|
+
}
|
|
322
|
+
interface QueryTagClass<Self, Id extends string> extends Context.ServiceClass<Self, Id, AnalyticsEngineQueryClient> {
|
|
323
|
+
readonly id: Id;
|
|
324
|
+
readonly layer: (definition: AnalyticsEngineQueryDefinition) => Layer.Layer<Self, never, HttpClient.HttpClient>;
|
|
325
|
+
readonly fetchLayer: (definition: AnalyticsEngineQueryDefinition) => Layer.Layer<Self>;
|
|
326
|
+
readonly layerConfig: (config?: Config.Config<AnalyticsEngineQueryDefinition>) => Layer.Layer<Self, Config.ConfigError, HttpClient.HttpClient>;
|
|
327
|
+
readonly fetchLayerConfig: (config?: Config.Config<AnalyticsEngineQueryDefinition>) => Layer.Layer<Self, Config.ConfigError>;
|
|
328
|
+
}
|
|
329
|
+
declare const makeQueryClient: (definition: AnalyticsEngineQueryDefinition) => Effect.Effect<AnalyticsEngineQueryClient, never, HttpClient.HttpClient>;
|
|
330
|
+
declare const isAnalyticsEngineDataset: (value: unknown) => value is AnalyticsEngineBinding;
|
|
331
|
+
declare const makeClient$11: (definition: AnalyticsEngineDefinition, defaults?: AnalyticsEngineWritePolicy) => (dataset: AnalyticsEngineBinding) => AnalyticsEngineClient;
|
|
332
|
+
declare const queryConfig: (options?: QueryConfigOptions) => Config.Config<{
|
|
333
|
+
accountId: string;
|
|
334
|
+
apiToken: Redacted.Redacted<string>;
|
|
335
|
+
apiBaseUrl: string;
|
|
336
|
+
}>;
|
|
337
|
+
declare const queryLayer: <Self>(tag: Context.Service<Self, AnalyticsEngineQueryClient>, definition: AnalyticsEngineQueryDefinition) => Layer.Layer<Self, never, HttpClient.HttpClient>;
|
|
338
|
+
declare const queryFetchLayer: <Self>(tag: Context.Service<Self, AnalyticsEngineQueryClient>, definition: AnalyticsEngineQueryDefinition) => Layer.Layer<Self, never, never>;
|
|
339
|
+
declare const queryLayerConfig: <Self>(tag: Context.Service<Self, AnalyticsEngineQueryClient>, config?: Config.Config<AnalyticsEngineQueryDefinition>) => Layer.Layer<Self, Config.ConfigError, HttpClient.HttpClient>;
|
|
340
|
+
declare const queryFetchLayerConfig: <Self>(tag: Context.Service<Self, AnalyticsEngineQueryClient>, config?: Config.Config<AnalyticsEngineQueryDefinition>) => Layer.Layer<Self, Config.ConfigError, never>;
|
|
341
|
+
declare const layer$14: <Self>(tag: Context.Service<Self, AnalyticsEngineClient>, definition: LayerOptions$17) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
|
|
342
|
+
declare const make$15: <Id extends string>(id: Id) => TagClass$15<AnalyticsEngineService<Id>, Id>;
|
|
343
|
+
declare const makeQuery: <Id extends string>(id: Id) => QueryTagClass<AnalyticsEngineQueryService<Id>, Id>;
|
|
344
|
+
declare const Tag$16: <Self>() => <Id extends string>(id: Id) => TagClass$15<Self, Id>;
|
|
345
|
+
declare const QueryTag: <Self>() => <Id extends string>(id: Id) => QueryTagClass<Self, Id>;
|
|
175
346
|
declare namespace BrowserRendering_d_exports {
|
|
176
|
-
export { BrowserRenderingBinding, BrowserRenderingBrowserClient, BrowserRenderingBrowserLike, BrowserRenderingClient, BrowserRenderingConnect, BrowserRenderingDefinition, BrowserRenderingLaunch, BrowserRenderingOperationError, BrowserRenderingPageClient, BrowserRenderingPageLike, BrowserRenderingService, LayerOptions$
|
|
347
|
+
export { BrowserRenderingBinding, BrowserRenderingBrowserClient, BrowserRenderingBrowserLike, BrowserRenderingClient, BrowserRenderingConnect, BrowserRenderingDefinition, BrowserRenderingLaunch, BrowserRenderingOperationError, BrowserRenderingPageClient, BrowserRenderingPageLike, BrowserRenderingService, LayerOptions$16 as LayerOptions, Tag$15 as Tag, TagClass$14 as TagClass, isBrowserRenderingBinding, layer$13 as layer, make$14 as make, makeClient$10 as makeClient };
|
|
177
348
|
}
|
|
178
349
|
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
350
|
readonly _tag: "BrowserRenderingOperationError";
|
|
@@ -237,18 +408,18 @@ interface BrowserRenderingService<Id extends string> {
|
|
|
237
408
|
readonly id: Id;
|
|
238
409
|
};
|
|
239
410
|
}
|
|
240
|
-
type LayerOptions$
|
|
411
|
+
type LayerOptions$16 = {
|
|
241
412
|
readonly binding: string;
|
|
242
413
|
};
|
|
243
|
-
interface TagClass$
|
|
414
|
+
interface TagClass$14<Self, Id extends string> extends Context.ServiceClass<Self, Id, BrowserRenderingClient> {
|
|
244
415
|
readonly id: Id;
|
|
245
|
-
readonly layer: (options: LayerOptions$
|
|
416
|
+
readonly layer: (options: LayerOptions$16) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
|
|
246
417
|
}
|
|
247
418
|
declare const isBrowserRenderingBinding: (value: unknown) => value is BrowserRenderingBinding;
|
|
248
|
-
declare const makeClient$
|
|
249
|
-
declare const layer$
|
|
250
|
-
declare const make$
|
|
251
|
-
declare const Tag$
|
|
419
|
+
declare const makeClient$10: <RawBinding extends BrowserRenderingBinding = BrowserRenderingBinding>(definition: BrowserRenderingDefinition) => (binding: RawBinding) => BrowserRenderingClient<RawBinding>;
|
|
420
|
+
declare const layer$13: <Self>(tag: Context.Service<Self, BrowserRenderingClient>, definition: BrowserRenderingDefinition) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
|
|
421
|
+
declare const make$14: <Id extends string>(id: Id) => TagClass$14<BrowserRenderingService<Id>, Id>;
|
|
422
|
+
declare const Tag$15: <Self>() => <Id extends string>(id: Id) => TagClass$14<Self, Id>;
|
|
252
423
|
declare namespace DurableObjectStorage_d_exports {
|
|
253
424
|
export { DurableObjectStorage, DurableObjectTransaction, SchemaBackedSyncKvStorage, SqlCursor, SqlStorage, SqlStorageValue, StorageOperationError, SyncKvDefinition, SyncKvStorage, fromDurableObjectStorage };
|
|
254
425
|
}
|
|
@@ -551,7 +722,7 @@ declare class DurableObjectState extends DurableObjectState_base {}
|
|
|
551
722
|
*/
|
|
552
723
|
declare const fromDurableObjectState: (state: globalThis.DurableObjectState) => DurableObjectStateService;
|
|
553
724
|
declare namespace CloudflareOtlp_d_exports {
|
|
554
|
-
export { DurableObjectLayerOptions, LayerOptions$
|
|
725
|
+
export { DurableObjectLayerOptions, LayerOptions$15 as LayerOptions, ResourceOptions, Serialization, Signal, WorkerLayerOptions, durableObjectLayer, layer$12 as layer, layerJson, layerProtobuf, workerLayer };
|
|
555
726
|
}
|
|
556
727
|
/** Telemetry signal groups supported by the Cloudflare OTLP layers. */
|
|
557
728
|
type Signal = "logs" | "traces" | "metrics";
|
|
@@ -567,7 +738,7 @@ interface ResourceOptions {
|
|
|
567
738
|
readonly attributes?: Record<string, unknown>;
|
|
568
739
|
}
|
|
569
740
|
/** Options shared by all Cloudflare OTLP telemetry layers. */
|
|
570
|
-
interface LayerOptions$
|
|
741
|
+
interface LayerOptions$15 {
|
|
571
742
|
/**
|
|
572
743
|
* Telemetry signals to export. Defaults to logs, traces, and metrics.
|
|
573
744
|
*
|
|
@@ -594,12 +765,12 @@ interface LayerOptions$14 {
|
|
|
594
765
|
readonly tracerContext?: <X>(primitive: Tracer.EffectPrimitive<X>, span: Tracer.AnySpan) => X;
|
|
595
766
|
}
|
|
596
767
|
/** Resource metadata specific to Cloudflare Workers. */
|
|
597
|
-
interface WorkerLayerOptions extends LayerOptions$
|
|
768
|
+
interface WorkerLayerOptions extends LayerOptions$15 {
|
|
598
769
|
/** Cloudflare Worker name to attach as `cloudflare.worker.name`. */
|
|
599
770
|
readonly workerName?: string;
|
|
600
771
|
}
|
|
601
772
|
/** Resource metadata specific to Cloudflare Durable Objects. */
|
|
602
|
-
interface DurableObjectLayerOptions extends LayerOptions$
|
|
773
|
+
interface DurableObjectLayerOptions extends LayerOptions$15 {
|
|
603
774
|
/** Durable Object class name to attach as `cloudflare.durable_object.class`. */
|
|
604
775
|
readonly className?: string;
|
|
605
776
|
/**
|
|
@@ -617,11 +788,11 @@ interface DurableObjectLayerOptions extends LayerOptions$14 {
|
|
|
617
788
|
* installed as the primary `ConfigProvider`; outside Cloudflare, the ambient
|
|
618
789
|
* Effect `ConfigProvider` remains the fallback.
|
|
619
790
|
*/
|
|
620
|
-
declare const layer$
|
|
791
|
+
declare const layer$12: (options?: LayerOptions$15) => Layer.Layer<never, never, never>;
|
|
621
792
|
/** Base OTLP telemetry layer forced to JSON serialization. */
|
|
622
|
-
declare const layerJson: (options?: Omit<LayerOptions$
|
|
793
|
+
declare const layerJson: (options?: Omit<LayerOptions$15, "serialization">) => Layer.Layer<never, never, never>;
|
|
623
794
|
/** Base OTLP telemetry layer forced to protobuf serialization. */
|
|
624
|
-
declare const layerProtobuf: (options?: Omit<LayerOptions$
|
|
795
|
+
declare const layerProtobuf: (options?: Omit<LayerOptions$15, "serialization">) => Layer.Layer<never, never, never>;
|
|
625
796
|
/**
|
|
626
797
|
* OTLP layer with Cloudflare Worker resource attributes.
|
|
627
798
|
*
|
|
@@ -637,6 +808,130 @@ declare const workerLayer: (options?: WorkerLayerOptions) => Layer.Layer<never,
|
|
|
637
808
|
* backend can tolerate high-cardinality resource attributes.
|
|
638
809
|
*/
|
|
639
810
|
declare const durableObjectLayer: (options?: DurableObjectLayerOptions) => Layer.Layer<never, never, DurableObjectState>;
|
|
811
|
+
declare namespace ContainerNamespace_d_exports {
|
|
812
|
+
export { ContainerInstanceClient, ContainerNamespace, ContainerNamespaceClient, ContainerNamespaceDefinition, ContainerNamespaceResource, ContainerNamespaceService, ContainerNamespaceStaticClient, ContainerOperationError, ContainerReadinessOptions, ContainerSignal, ContainerStartAndWaitForPortsOptions, ContainerStartOptions, ContainerState, ContainerStub, ContainerWaitOptions, LayerOptions$14 as LayerOptions, Tag$14 as Tag, TagClass$13 as TagClass, isContainerNamespaceResource, layer$11 as layer, make$13 as make, makeClient$9 as makeClient };
|
|
813
|
+
}
|
|
814
|
+
/** Signal accepted by Cloudflare Container instances. */
|
|
815
|
+
type ContainerSignal = "SIGKILL" | "SIGINT" | "SIGTERM";
|
|
816
|
+
/** Per-instance Container startup configuration. */
|
|
817
|
+
interface ContainerStartOptions {
|
|
818
|
+
readonly envVars?: Record<string, string>;
|
|
819
|
+
readonly entrypoint?: Array<string>;
|
|
820
|
+
readonly enableInternet?: boolean;
|
|
821
|
+
readonly labels?: Record<string, string>;
|
|
822
|
+
}
|
|
823
|
+
/** Serializable retry settings used while starting a Container. */
|
|
824
|
+
interface ContainerWaitOptions {
|
|
825
|
+
readonly portToCheck: number;
|
|
826
|
+
readonly retries?: number;
|
|
827
|
+
readonly waitInterval?: number;
|
|
828
|
+
}
|
|
829
|
+
/** Serializable timeout settings used while waiting for Container ports. */
|
|
830
|
+
interface ContainerReadinessOptions {
|
|
831
|
+
readonly instanceGetTimeoutMS?: number;
|
|
832
|
+
readonly portReadyTimeoutMS?: number;
|
|
833
|
+
readonly waitInterval?: number;
|
|
834
|
+
}
|
|
835
|
+
/** Options for starting a Container and waiting for its ports. */
|
|
836
|
+
interface ContainerStartAndWaitForPortsOptions {
|
|
837
|
+
readonly startOptions?: ContainerStartOptions;
|
|
838
|
+
readonly ports?: number | Array<number>;
|
|
839
|
+
readonly cancellationOptions?: ContainerReadinessOptions;
|
|
840
|
+
}
|
|
841
|
+
/** Serializable state reported by a Cloudflare Container instance. */
|
|
842
|
+
declare const ContainerState: Schema.Union<readonly [Schema.Struct<{
|
|
843
|
+
readonly lastChange: Schema.Finite;
|
|
844
|
+
readonly status: Schema.Literals<readonly ["running", "stopping", "stopped", "healthy"]>;
|
|
845
|
+
}>, Schema.Struct<{
|
|
846
|
+
readonly lastChange: Schema.Finite;
|
|
847
|
+
readonly status: Schema.Literal<"stopped_with_code">;
|
|
848
|
+
readonly exitCode: Schema.optionalKey<Schema.Int>;
|
|
849
|
+
}>]>;
|
|
850
|
+
type ContainerState = typeof ContainerState.Type;
|
|
851
|
+
/**
|
|
852
|
+
* Native Container stub shape exposed by a Container namespace binding.
|
|
853
|
+
*
|
|
854
|
+
* This is structural so using Container bindings does not make
|
|
855
|
+
* `@cloudflare/containers` a runtime dependency of effect-cf.
|
|
856
|
+
*/
|
|
857
|
+
interface ContainerStub {
|
|
858
|
+
fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
|
|
859
|
+
getState(): Promise<ContainerState>;
|
|
860
|
+
start(options?: ContainerStartOptions, waitOptions?: ContainerWaitOptions): Promise<void>;
|
|
861
|
+
startAndWaitForPorts(options?: ContainerStartAndWaitForPortsOptions): Promise<void>;
|
|
862
|
+
stop(signal?: ContainerSignal): Promise<void>;
|
|
863
|
+
destroy(): Promise<void>;
|
|
864
|
+
}
|
|
865
|
+
/** Native Container namespace binding shape. */
|
|
866
|
+
interface ContainerNamespaceResource {
|
|
867
|
+
getByName(name: string, options?: globalThis.DurableObjectNamespaceGetDurableObjectOptions): ContainerStub;
|
|
868
|
+
}
|
|
869
|
+
/** Container namespace binding metadata. */
|
|
870
|
+
interface ContainerNamespaceDefinition {
|
|
871
|
+
/** Binding name as configured in `wrangler.jsonc`. */
|
|
872
|
+
readonly binding: string;
|
|
873
|
+
}
|
|
874
|
+
declare const ContainerOperationError_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 & {
|
|
875
|
+
readonly _tag: "ContainerOperationError";
|
|
876
|
+
} & Readonly<A>;
|
|
877
|
+
/** Failure raised when invoking a named Container operation. */
|
|
878
|
+
declare class ContainerOperationError extends ContainerOperationError_base<{
|
|
879
|
+
readonly binding: string;
|
|
880
|
+
readonly instance: string;
|
|
881
|
+
readonly operation: string;
|
|
882
|
+
readonly cause: unknown;
|
|
883
|
+
}> {}
|
|
884
|
+
/** Effect-wrapped client for one named Container instance. */
|
|
885
|
+
interface ContainerInstanceClient {
|
|
886
|
+
readonly unsafeRaw: Effect.Effect<ContainerStub, ContainerOperationError>;
|
|
887
|
+
readonly state: Effect.Effect<ContainerState, ContainerOperationError>;
|
|
888
|
+
readonly fetch: (input: RequestInfo | URL, init?: RequestInit) => Effect.Effect<Response, ContainerOperationError>;
|
|
889
|
+
readonly start: (options?: ContainerStartOptions, waitOptions?: ContainerWaitOptions) => Effect.Effect<void, ContainerOperationError>;
|
|
890
|
+
readonly startAndWaitForPorts: (options?: ContainerStartAndWaitForPortsOptions) => Effect.Effect<void, ContainerOperationError>;
|
|
891
|
+
readonly stop: (signal?: ContainerSignal) => Effect.Effect<void, ContainerOperationError>;
|
|
892
|
+
readonly destroy: Effect.Effect<void, ContainerOperationError>;
|
|
893
|
+
}
|
|
894
|
+
/** Effect client for a Container namespace binding. */
|
|
895
|
+
interface ContainerNamespaceClient {
|
|
896
|
+
readonly definition: ContainerNamespaceDefinition;
|
|
897
|
+
readonly getByName: (name: string, options?: globalThis.DurableObjectNamespaceGetDurableObjectOptions) => Effect.Effect<ContainerInstanceClient, ContainerOperationError>;
|
|
898
|
+
readonly byName: (name: string, options?: globalThis.DurableObjectNamespaceGetDurableObjectOptions) => ContainerInstanceClient;
|
|
899
|
+
readonly unsafeRaw: Effect.Effect<ContainerNamespaceResource>;
|
|
900
|
+
}
|
|
901
|
+
type ContainerNamespaceStaticClient<R> = {
|
|
902
|
+
readonly getByName: (name: string, options?: globalThis.DurableObjectNamespaceGetDurableObjectOptions) => Effect.Effect<ContainerInstanceClient, ContainerOperationError, R>;
|
|
903
|
+
readonly byName: (name: string, options?: globalThis.DurableObjectNamespaceGetDurableObjectOptions) => {
|
|
904
|
+
readonly state: Effect.Effect<ContainerState, ContainerOperationError, R>;
|
|
905
|
+
readonly fetch: (input: RequestInfo | URL, init?: RequestInit) => Effect.Effect<Response, ContainerOperationError, R>;
|
|
906
|
+
readonly start: (options?: ContainerStartOptions, waitOptions?: ContainerWaitOptions) => Effect.Effect<void, ContainerOperationError, R>;
|
|
907
|
+
readonly startAndWaitForPorts: (options?: ContainerStartAndWaitForPortsOptions) => Effect.Effect<void, ContainerOperationError, R>;
|
|
908
|
+
readonly stop: (signal?: ContainerSignal) => Effect.Effect<void, ContainerOperationError, R>;
|
|
909
|
+
readonly destroy: Effect.Effect<void, ContainerOperationError, R>;
|
|
910
|
+
readonly unsafeRaw: Effect.Effect<ContainerStub, ContainerOperationError, R>;
|
|
911
|
+
};
|
|
912
|
+
readonly unsafeRaw: () => Effect.Effect<ContainerNamespaceResource, never, R>;
|
|
913
|
+
};
|
|
914
|
+
type LayerOptions$14 = {
|
|
915
|
+
readonly binding: string;
|
|
916
|
+
};
|
|
917
|
+
interface TagClass$13<Self, Id extends string> extends Context.ServiceClass<Self, Id, ContainerNamespaceClient>, ContainerNamespaceStaticClient<Self> {
|
|
918
|
+
readonly id: Id;
|
|
919
|
+
readonly layer: (options: LayerOptions$14) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
|
|
920
|
+
}
|
|
921
|
+
declare const isContainerNamespaceResource: (value: unknown) => value is ContainerNamespaceResource;
|
|
922
|
+
declare const makeClient$9: (definition: ContainerNamespaceDefinition) => (namespace: ContainerNamespaceResource) => ContainerNamespaceClient;
|
|
923
|
+
declare const layer$11: <Self>(tag: Context.Service<Self, ContainerNamespaceClient>, definition: ContainerNamespaceDefinition) => Layer.Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
|
|
924
|
+
declare const make$13: <Id extends string>(id: Id) => TagClass$13<ContainerNamespaceService<Id>, Id>;
|
|
925
|
+
declare const ContainerNamespaceServiceTypeId: unique symbol;
|
|
926
|
+
/** Nominal service marker for Container namespaces created with {@link make}. */
|
|
927
|
+
interface ContainerNamespaceService<Id extends string> {
|
|
928
|
+
readonly [ContainerNamespaceServiceTypeId]: {
|
|
929
|
+
readonly id: Id;
|
|
930
|
+
};
|
|
931
|
+
}
|
|
932
|
+
/** Creates a typed Effect service for a Cloudflare Container namespace. */
|
|
933
|
+
declare const Tag$14: <Self>() => <Id extends string>(id: Id) => TagClass$13<Self, Id>;
|
|
934
|
+
declare const ContainerNamespace: <Self>() => <Id extends string>(id: Id) => TagClass$13<Self, Id>;
|
|
640
935
|
declare namespace D1_d_exports {
|
|
641
936
|
export { D1Definition, D1Service, D1SqlLayerOptions, Service$1 as Service, make$12 as make };
|
|
642
937
|
}
|
|
@@ -683,7 +978,7 @@ declare const Service$1: <Self>() => <Id extends string>(id: Id, definition: D1D
|
|
|
683
978
|
sqlLayer: (options?: D1SqlLayerOptions) => Layer.Layer<D1Client.D1Client | _$effect_unstable_sql_SqlClient0.SqlClient, BindingNotFoundError | BindingValidationError | _$effect_Config0.ConfigError, WorkerEnvironment | Exclude<Exclude<Self, _$effect_Scope0.Scope>, Self>>;
|
|
684
979
|
};
|
|
685
980
|
declare namespace Rpc_d_exports {
|
|
686
|
-
export { DisposableValue, MethodArgs, MethodKey, MethodReturn, Provider, Result, RpcStub, RpcTarget, Serializable, Stub, Stubable, Stubify, dispose, isDisposable, resolve, scoped };
|
|
981
|
+
export { DisposableValue, MethodArgs, MethodKey, MethodReturn, Provider, Result$1 as Result, RpcStub, RpcTarget, Serializable, Stub, Stubable, Stubify, dispose, isDisposable, resolve, scoped };
|
|
687
982
|
}
|
|
688
983
|
type Stubable = Rpc.Stubable;
|
|
689
984
|
type Stub<T extends Stubable> = Rpc.Stub<T>;
|
|
@@ -695,7 +990,7 @@ type Stubify<T> = T extends Stubable ? Stub<T> : T extends Map<infer Key, infer
|
|
|
695
990
|
} ? { [Key in keyof T]: Stubify<T[Key]> } : T;
|
|
696
991
|
type MaybeProvider<T> = T extends object ? Provider<T> : unknown;
|
|
697
992
|
type MaybeDisposable<T> = T extends object ? Disposable : unknown;
|
|
698
|
-
type Result<T> = T extends Stubable ? Promise<Stub<T>> & Provider<T> : T extends Serializable<T> ? Promise<Stubify<T> & MaybeDisposable<T>> & MaybeProvider<T> : never;
|
|
993
|
+
type Result$1<T> = T extends Stubable ? Promise<Stub<T>> & Provider<T> : T extends Serializable<T> ? Promise<Stubify<T> & MaybeDisposable<T>> & MaybeProvider<T> : never;
|
|
699
994
|
type MethodKey<Api> = { [Key in keyof Api]-?: Key extends string ? Api[Key] extends ((...args: Array<any>) => unknown) ? Key : never : never }[keyof Api];
|
|
700
995
|
type MethodArgs<Api, Method extends keyof Api> = Api[Method] extends ((...args: infer Args) => unknown) ? Args : never;
|
|
701
996
|
type MethodReturn<Api, Method extends keyof Api> = Api[Method] extends ((...args: Array<any>) => infer Return) ? Return : never;
|
|
@@ -1024,7 +1319,7 @@ type AnyArgs = Array<any>;
|
|
|
1024
1319
|
type AsyncMethodKey<Api> = { [Key in keyof Api]-?: Key extends string ? Api[Key] extends ((...args: AnyArgs) => Promise<unknown>) ? Key : never : never }[keyof Api];
|
|
1025
1320
|
type AsyncMethodArgs<Api, Method extends keyof Api> = Api[Method] extends ((...args: infer Args) => Promise<unknown>) ? Args : never;
|
|
1026
1321
|
type AsyncMethodSuccess<Api, Method extends keyof Api> = Api[Method] extends ((...args: AnyArgs) => Promise<infer A>) ? A : never;
|
|
1027
|
-
type AsyncMethodCloudflareReturn<Api, Method extends keyof Api> = Result<AsyncMethodSuccess<Api, Method>>;
|
|
1322
|
+
type AsyncMethodCloudflareReturn<Api, Method extends keyof Api> = Result$1<AsyncMethodSuccess<Api, Method>>;
|
|
1028
1323
|
declare namespace ServiceBinding_d_exports {
|
|
1029
1324
|
export { Service, ServiceBindingClient, ServiceBindingDefinition, ServiceBindingEffectClient, ServiceBindingFetchError, ServiceBindingRpcError, ServiceBindingStaticClient, ServiceFetcher, isServiceBindingClient, layer$9 as layer, makeClient$7 as makeClient, makeDirectMethods$1 as makeDirectMethods };
|
|
1030
1325
|
}
|
|
@@ -1207,7 +1502,7 @@ declare const Service: <Self, Api extends object = never>() => <Id extends strin
|
|
|
1207
1502
|
readonly [TypeId$1]: typeof TypeId$1;
|
|
1208
1503
|
readonly definition: ServiceBindingDefinition<Definition>;
|
|
1209
1504
|
readonly fetch: (input: RequestInfo | URL, init?: RequestInit) => Effect.Effect<Response, ServiceBindingFetchError, Self>;
|
|
1210
|
-
readonly rpc: <Method extends ServiceMethodKey<ApiOrDefinition<Api, Definition>>>(method: Method, ...args: ServiceMethodArgs<ApiOrDefinition<Api, Definition>, Method>) => Effect.Effect<Result<AsyncMethodSuccess<ApiOrDefinition<Api, Definition>, Method>>, ServiceBindingRpcError, Self>;
|
|
1505
|
+
readonly rpc: <Method extends ServiceMethodKey<ApiOrDefinition<Api, Definition>>>(method: Method, ...args: ServiceMethodArgs<ApiOrDefinition<Api, Definition>, Method>) => Effect.Effect<Result$1<AsyncMethodSuccess<ApiOrDefinition<Api, Definition>, Method>>, ServiceBindingRpcError, Self>;
|
|
1211
1506
|
readonly call: <Method extends ServiceMethodKey<ApiOrDefinition<Api, Definition>>>(method: Method, ...args: ServiceMethodArgs<ApiOrDefinition<Api, Definition>, Method>) => Effect.Effect<AsyncMethodSuccess<ApiOrDefinition<Api, Definition>, Method>, ServiceBindingRpcError, Self>;
|
|
1212
1507
|
readonly scopedCall: <Method extends ServiceMethodKey<ApiOrDefinition<Api, Definition>>>(method: Method, ...args: ServiceMethodArgs<ApiOrDefinition<Api, Definition>, Method>) => Effect.Effect<Awaited<AsyncMethodSuccess<ApiOrDefinition<Api, Definition>, Method>>, unknown, Self | Scope.Scope>;
|
|
1213
1508
|
};
|
|
@@ -2638,4 +2933,4 @@ declare const layer: <Self>(tag: Context.Service<Self, VectorizeClient>, definit
|
|
|
2638
2933
|
declare const make: <Id extends string>(id: Id) => TagClass<VectorizeService<Id>, Id>;
|
|
2639
2934
|
declare const Tag$1: <Self>() => <Id extends string>(id: Id) => TagClass<Self, Id>;
|
|
2640
2935
|
//#endregion
|
|
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 };
|
|
2936
|
+
export { AiGateway_d_exports as AiGateway, AnalyticsEngine_d_exports as AnalyticsEngine, Binding_d_exports as Binding, BrowserRendering_d_exports as BrowserRendering, CloudflareOtlp_d_exports as CloudflareOtlp, ContainerNamespace_d_exports as ContainerNamespace, 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 };
|