effect-cf 0.45.0 → 0.46.1

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # effect-cf
2
2
 
3
+ ## 0.46.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#188](https://github.com/danieljvdm/effect-cf/pull/188) [`731938e`](https://github.com/danieljvdm/effect-cf/commit/731938ec635355c769f451b6153f8eb806ad98c1) Thanks [@limwa](https://github.com/limwa)! - Fix declaration portability by referencing consumer-provided Cloudflare Workers globals instead of importing `@cloudflare/workers-types`.
8
+
9
+ ## 0.46.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#186](https://github.com/danieljvdm/effect-cf/pull/186) [`d2b4d1f`](https://github.com/danieljvdm/effect-cf/commit/d2b4d1f1b376c1d7c33d798782d25c3e243140bf) Thanks [@danieljvdm](https://github.com/danieljvdm)! - Add opt-in `RunOptions.onFailure` observers for Worker, Durable Object, and Workflow entrypoints. Observe complete failure causes after event cleanup, including runtime acquisition failures, while preserving native rejection values. Workflow entrypoints now expose `RunSymbol` for instrumentation. Observer throws and rejections do not change the event outcome.
14
+
3
15
  ## 0.45.0
4
16
 
5
17
  ### Minor Changes
@@ -3,7 +3,6 @@ import { BindingNotFoundError, BindingValidationError } from "./Binding.mjs";
3
3
  import { WorkersAiBinding, isWorkersAiBinding } from "./WorkersAi.mjs";
4
4
  import * as Context$1 from "effect/Context";
5
5
  import * as Effect from "effect/Effect";
6
- import { AiGateway } from "@cloudflare/workers-types";
7
6
  import { Layer } from "effect";
8
7
  declare namespace AiGateway_d_exports {
9
8
  export { AiGatewayBinding, AiGatewayClient, AiGatewayDefinition, AiGatewayFetchOptions, AiGatewayHeaders, AiGatewayLog, AiGatewayOperationError, AiGatewayPatchLog, AiGatewayProvider, AiGatewayRunOptions, AiGatewayService, AiGatewayUniversalRequest, BindingNotFoundError, BindingValidationError, LayerOptions, Tag, TagClass, isAiGatewayBinding, layer, make, makeClient, makeClientFromAi, makeHttpClient };
@@ -30,7 +29,7 @@ type AiGatewayLog = Awaited<ReturnType<AiGatewayBinding["getLog"]>>;
30
29
  type AiGatewayProvider = NonNullable<Parameters<AiGatewayBinding["getUrl"]>[0]>;
31
30
  type AiGatewayUniversalRequest = Exclude<AiGatewayRunData, ReadonlyArray<unknown>>;
32
31
  type AiGatewayHeaders = NonNullable<AiGatewayUniversalRequest["headers"]>;
33
- type AiGatewayRunOptions = Parameters<AiGateway["run"]>[1];
32
+ type AiGatewayRunOptions = Parameters<AiGatewayBinding["run"]>[1];
34
33
  type AiGatewayBindingCandidate = Parameters<typeof isWorkersAiBinding>[0];
35
34
  interface AiGatewayFetchOptions {
36
35
  readonly provider?: AiGatewayProvider;
@@ -64,15 +63,15 @@ interface TagClass<Self, Id extends string> extends Context$1.ServiceClass<Self,
64
63
  declare const isAiGatewayBinding: (value: AiGatewayBindingCandidate) => value is WorkersAiBinding;
65
64
  declare const makeClient: (definition: AiGatewayDefinition, gateway: AiGatewayBinding) => {
66
65
  definition: AiGatewayDefinition;
67
- run: (data: import("@cloudflare/workers-types").AIGatewayUniversalRequest | readonly import("@cloudflare/workers-types").AIGatewayUniversalRequest[], options?: {
68
- gateway?: import("@cloudflare/workers-types").UniversalGatewayOptions;
66
+ run: (data: AIGatewayUniversalRequest | readonly AIGatewayUniversalRequest[], options?: {
67
+ gateway?: UniversalGatewayOptions;
69
68
  extraHeaders?: object;
70
- signal?: import("@cloudflare/workers-types").AbortSignal;
71
- } | undefined) => Effect.Effect<import("@cloudflare/workers-types").Response, AiGatewayOperationError, never>;
69
+ signal?: AbortSignal;
70
+ } | undefined) => Effect.Effect<Response, AiGatewayOperationError, never>;
72
71
  getUrl: (provider?: string | undefined) => Effect.Effect<string, AiGatewayOperationError, never>;
73
72
  fetch: (options: AiGatewayFetchOptions) => Effect.Effect<Response, AiGatewayOperationError, never>;
74
- patchLog: (logId: string, data: import("@cloudflare/workers-types").AiGatewayPatchLog) => Effect.Effect<void, AiGatewayOperationError, never>;
75
- getLog: (logId: string) => Effect.Effect<import("@cloudflare/workers-types").AiGatewayLog, AiGatewayOperationError, never>;
73
+ patchLog: (logId: string, data: globalThis.AiGatewayPatchLog) => Effect.Effect<void, AiGatewayOperationError, never>;
74
+ getLog: (logId: string) => Effect.Effect<globalThis.AiGatewayLog, AiGatewayOperationError, never>;
76
75
  rawUnsafe: Effect.Effect<AiGateway, never, never>;
77
76
  };
78
77
  declare const makeClientFromAi: (definition: AiGatewayDefinition, ai: WorkersAiBinding) => AiGatewayClient;
@@ -7,11 +7,10 @@ import * as Layer$1 from "effect/Layer";
7
7
  import * as Config$1 from "effect/Config";
8
8
  import * as Option from "effect/Option";
9
9
  import * as HttpClient from "effect/unstable/http/HttpClient";
10
- import { AnalyticsEngineDataPoint, AnalyticsEngineDataset } from "@cloudflare/workers-types";
11
10
  import { Redacted } from "effect";
12
11
  import { Headers, HttpClientResponse } from "effect/unstable/http";
13
12
  declare namespace AnalyticsEngine_d_exports {
14
- export { AnalyticsEngineBinding, AnalyticsEngineClient, AnalyticsEngineDataPoint$1 as AnalyticsEngineDataPoint, AnalyticsEngineDataPointSchema, AnalyticsEngineDefinition, AnalyticsEngineFieldValue, AnalyticsEngineFieldValueSchema, AnalyticsEngineInvalidWritePolicy, AnalyticsEngineOperationError, AnalyticsEngineQueryClient, AnalyticsEngineQueryColumn, AnalyticsEngineQueryDefinition, AnalyticsEngineQueryError, AnalyticsEngineQueryOptions, AnalyticsEngineQueryResult, AnalyticsEngineQueryRow, AnalyticsEngineQueryService, AnalyticsEngineService, AnalyticsEngineWriteError, AnalyticsEngineWriteOptions, AnalyticsEngineWritePolicy, AnalyticsEngineWriteValidationError, AnalyticsEngineWriteViolation, BindingNotFoundError, BindingValidationError, LayerOptions, QueryConfigOptions, QueryTag, QueryTagClass, Tag, TagClass, isAnalyticsEngineDataset, layer, layerFetch, layerFetchConfig, make, makeClient, makeQuery, makeQueryClient, queryConfig, queryLayer, queryLayerConfig, writeLimits };
13
+ export { AnalyticsEngineBinding, AnalyticsEngineClient, AnalyticsEngineDataPoint, AnalyticsEngineDataPointSchema, AnalyticsEngineDefinition, AnalyticsEngineFieldValue, AnalyticsEngineFieldValueSchema, AnalyticsEngineInvalidWritePolicy, AnalyticsEngineOperationError, AnalyticsEngineQueryClient, AnalyticsEngineQueryColumn, AnalyticsEngineQueryDefinition, AnalyticsEngineQueryError, AnalyticsEngineQueryOptions, AnalyticsEngineQueryResult, AnalyticsEngineQueryRow, AnalyticsEngineQueryService, AnalyticsEngineService, AnalyticsEngineWriteError, AnalyticsEngineWriteOptions, AnalyticsEngineWritePolicy, AnalyticsEngineWriteValidationError, AnalyticsEngineWriteViolation, BindingNotFoundError, BindingValidationError, LayerOptions, QueryConfigOptions, QueryTag, QueryTagClass, Tag, TagClass, isAnalyticsEngineDataset, layer, layerFetch, layerFetchConfig, make, makeClient, makeQuery, makeQueryClient, queryConfig, queryLayer, queryLayerConfig, writeLimits };
15
14
  }
16
15
  declare const writeLimits: {
17
16
  readonly maxBlobs: 20;
@@ -74,7 +73,7 @@ interface AnalyticsEngineDefinition {
74
73
  readonly binding: string;
75
74
  }
76
75
  type AnalyticsEngineBinding = AnalyticsEngineDataset;
77
- type AnalyticsEngineDataPoint$1 = AnalyticsEngineDataPoint;
76
+ type AnalyticsEngineDataPoint = globalThis.AnalyticsEngineDataPoint;
78
77
  type AnalyticsEngineFieldValue = ArrayBuffer | string | null;
79
78
  type AnalyticsEngineWriteError = AnalyticsEngineOperationError | AnalyticsEngineWriteValidationError;
80
79
  type AnalyticsEngineInvalidWritePolicy = "error" | "drop";
@@ -104,8 +103,8 @@ interface AnalyticsEngineQueryOptions {
104
103
  readonly headers?: Headers.Input;
105
104
  }
106
105
  interface AnalyticsEngineClient {
107
- readonly writeDataPoint: (dataPoint?: AnalyticsEngineDataPoint$1, options?: AnalyticsEngineWriteOptions) => Effect.Effect<void, AnalyticsEngineWriteError>;
108
- readonly writeDataPoints: (dataPoints: ReadonlyArray<AnalyticsEngineDataPoint$1>, options?: AnalyticsEngineWriteOptions) => Effect.Effect<void, AnalyticsEngineWriteError>;
106
+ readonly writeDataPoint: (dataPoint?: AnalyticsEngineDataPoint, options?: AnalyticsEngineWriteOptions) => Effect.Effect<void, AnalyticsEngineWriteError>;
107
+ readonly writeDataPoints: (dataPoints: ReadonlyArray<AnalyticsEngineDataPoint>, options?: AnalyticsEngineWriteOptions) => Effect.Effect<void, AnalyticsEngineWriteError>;
109
108
  readonly rawUnsafe: Effect.Effect<AnalyticsEngineBinding>;
110
109
  readonly definition: AnalyticsEngineDefinition;
111
110
  }
@@ -168,4 +167,4 @@ declare const makeQuery: <Id extends string>(id: Id) => QueryTagClass<AnalyticsE
168
167
  declare const Tag: <Self>() => <Id extends string>(id: Id) => TagClass<Self, Id>;
169
168
  declare const QueryTag: <Self>() => <Id extends string>(id: Id) => QueryTagClass<Self, Id>;
170
169
  //#endregion
171
- export { AnalyticsEngineBinding, AnalyticsEngineClient, AnalyticsEngineDataPoint$1 as AnalyticsEngineDataPoint, AnalyticsEngineDataPointSchema, AnalyticsEngineDefinition, AnalyticsEngineFieldValue, AnalyticsEngineFieldValueSchema, AnalyticsEngineInvalidWritePolicy, AnalyticsEngineOperationError, AnalyticsEngineQueryClient, AnalyticsEngineQueryColumn, AnalyticsEngineQueryDefinition, AnalyticsEngineQueryError, AnalyticsEngineQueryOptions, AnalyticsEngineQueryResult, AnalyticsEngineQueryRow, AnalyticsEngineQueryService, AnalyticsEngineService, AnalyticsEngineWriteError, AnalyticsEngineWriteOptions, AnalyticsEngineWritePolicy, AnalyticsEngineWriteValidationError, AnalyticsEngineWriteViolation, AnalyticsEngine_d_exports, type BindingNotFoundError, type BindingValidationError, LayerOptions, QueryConfigOptions, QueryTag, QueryTagClass, Tag, TagClass, isAnalyticsEngineDataset, layer, layerFetch, layerFetchConfig, make, makeClient, makeQuery, makeQueryClient, queryConfig, queryLayer, queryLayerConfig, writeLimits };
170
+ export { AnalyticsEngineBinding, AnalyticsEngineClient, AnalyticsEngineDataPoint, AnalyticsEngineDataPointSchema, AnalyticsEngineDefinition, AnalyticsEngineFieldValue, AnalyticsEngineFieldValueSchema, AnalyticsEngineInvalidWritePolicy, AnalyticsEngineOperationError, AnalyticsEngineQueryClient, AnalyticsEngineQueryColumn, AnalyticsEngineQueryDefinition, AnalyticsEngineQueryError, AnalyticsEngineQueryOptions, AnalyticsEngineQueryResult, AnalyticsEngineQueryRow, AnalyticsEngineQueryService, AnalyticsEngineService, AnalyticsEngineWriteError, AnalyticsEngineWriteOptions, AnalyticsEngineWritePolicy, AnalyticsEngineWriteValidationError, AnalyticsEngineWriteViolation, AnalyticsEngine_d_exports, type BindingNotFoundError, type BindingValidationError, LayerOptions, QueryConfigOptions, QueryTag, QueryTagClass, Tag, TagClass, isAnalyticsEngineDataset, layer, layerFetch, layerFetchConfig, make, makeClient, makeQuery, makeQueryClient, queryConfig, queryLayer, queryLayerConfig, writeLimits };
@@ -2,10 +2,9 @@ import { WorkerEnvironment } from "./Environment.mjs";
2
2
  import { BindingNotFoundError, BindingValidationError } from "./Binding.mjs";
3
3
  import * as Context$1 from "effect/Context";
4
4
  import * as Effect from "effect/Effect";
5
- import { ArtifactsCreateRepoResult, ArtifactsCreateTokenResult, ArtifactsErrorCode, ArtifactsRepoInfo, ArtifactsTokenInfo, ArtifactsTokenListResult } from "@cloudflare/workers-types";
6
5
  import { Layer } from "effect";
7
6
  declare namespace Artifacts_d_exports {
8
- export { ArtifactsBinding, ArtifactsClient, ArtifactsCommit, ArtifactsCommitIdentity, ArtifactsCreateOptions, ArtifactsCreateRepoResult$1 as ArtifactsCreateRepoResult, ArtifactsCreateTokenResult$1 as ArtifactsCreateTokenResult, ArtifactsDefinition, ArtifactsErrorCode$1 as ArtifactsErrorCode, ArtifactsForkOptions, ArtifactsImportParams, ArtifactsImportSource, ArtifactsImportTarget, ArtifactsImportTargetOptions, ArtifactsListOptions, ArtifactsLogOptions, ArtifactsLogResult, ArtifactsOperation, ArtifactsOperationError, ArtifactsRepoBinding, ArtifactsRepoClient, ArtifactsRepoInfo$1 as ArtifactsRepoInfo, ArtifactsRepoListEntry, ArtifactsRepoListResult, ArtifactsRepoStatus, ArtifactsService, ArtifactsTokenInfo$1 as ArtifactsTokenInfo, ArtifactsTokenListResult$1 as ArtifactsTokenListResult, ArtifactsTokenScope, ArtifactsTokenState, ArtifactsTree, BindingNotFoundError, BindingValidationError, Cursor, LayerOptions, RepoName, Tag, TagClass, artifactsErrorCodes, artifactsErrorNumericCodes, isArtifactsBinding, isArtifactsRepoBinding, layer, make, makeClient };
7
+ export { ArtifactsBinding, ArtifactsClient, ArtifactsCommit, ArtifactsCommitIdentity, ArtifactsCreateOptions, ArtifactsCreateRepoResult, ArtifactsCreateTokenResult, ArtifactsDefinition, ArtifactsErrorCode, ArtifactsForkOptions, ArtifactsImportParams, ArtifactsImportSource, ArtifactsImportTarget, ArtifactsImportTargetOptions, ArtifactsListOptions, ArtifactsLogOptions, ArtifactsLogResult, ArtifactsOperation, ArtifactsOperationError, ArtifactsRepoBinding, ArtifactsRepoClient, ArtifactsRepoInfo, ArtifactsRepoListEntry, ArtifactsRepoListResult, ArtifactsRepoStatus, ArtifactsService, ArtifactsTokenInfo, ArtifactsTokenListResult, ArtifactsTokenScope, ArtifactsTokenState, ArtifactsTree, BindingNotFoundError, BindingValidationError, Cursor, LayerOptions, RepoName, Tag, TagClass, artifactsErrorCodes, artifactsErrorNumericCodes, isArtifactsBinding, isArtifactsRepoBinding, layer, make, makeClient };
9
8
  }
10
9
  type ArtifactsOperation = "createClient" | "create" | "get" | "import" | "list" | "delete" | "createToken" | "listTokens" | "getToken" | "revokeToken" | "fork" | "info" | "log" | "readCommit" | "readTree" | "cli";
11
10
  declare const artifactsErrorCodes: readonly ["ALREADY_EXISTS", "NOT_FOUND", "IMPORT_IN_PROGRESS", "FORK_IN_PROGRESS", "INVALID_INPUT", "INVALID_REPO_NAME", "INVALID_TTL", "INVALID_URL", "REMOTE_AUTH_REQUIRED", "UPSTREAM_UNAVAILABLE", "MEMORY_LIMIT", "INTERNAL_ERROR"];
@@ -23,7 +22,7 @@ declare const artifactsErrorNumericCodes: {
23
22
  readonly MEMORY_LIMIT: 10402;
24
23
  readonly INTERNAL_ERROR: 10400;
25
24
  };
26
- type ArtifactsErrorCode$1 = ArtifactsErrorCode;
25
+ type ArtifactsErrorCode = globalThis.ArtifactsErrorCode;
27
26
  declare const ArtifactsOperationError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
28
27
  readonly _tag: "ArtifactsOperationError";
29
28
  } & Readonly<A>;
@@ -31,7 +30,7 @@ declare class ArtifactsOperationError extends ArtifactsOperationError_base<{
31
30
  readonly binding: string;
32
31
  readonly operation: ArtifactsOperation;
33
32
  readonly cause: unknown;
34
- readonly code?: ArtifactsErrorCode$1 | (string & {});
33
+ readonly code?: ArtifactsErrorCode | (string & {});
35
34
  readonly numericCode?: number;
36
35
  }> {
37
36
  get message(): string;
@@ -46,9 +45,9 @@ type ArtifactsTokenScope = "read" | "write";
46
45
  /** Lifecycle state of a repository token. */
47
46
  type ArtifactsTokenState = "active" | "expired" | "revoked";
48
47
  type ArtifactsRepoStatus = "ready" | "importing" | "forking";
49
- type ArtifactsRepoInfo$1 = ArtifactsRepoInfo;
50
- type ArtifactsCreateRepoResult$1 = Readonly<ArtifactsCreateRepoResult>;
51
- interface ArtifactsRepoListEntry extends ArtifactsRepoInfo$1 {
48
+ type ArtifactsRepoInfo = globalThis.ArtifactsRepoInfo;
49
+ type ArtifactsCreateRepoResult = Readonly<globalThis.ArtifactsCreateRepoResult>;
50
+ interface ArtifactsRepoListEntry extends ArtifactsRepoInfo {
52
51
  readonly status: ArtifactsRepoStatus;
53
52
  }
54
53
  interface ArtifactsRepoListResult {
@@ -57,11 +56,11 @@ interface ArtifactsRepoListResult {
57
56
  readonly cursor?: Cursor;
58
57
  }
59
58
  /** Result of creating a repository token. */
60
- type ArtifactsCreateTokenResult$1 = ArtifactsCreateTokenResult;
59
+ type ArtifactsCreateTokenResult = globalThis.ArtifactsCreateTokenResult;
61
60
  /** Repository token metadata, excluding its plaintext secret. */
62
- type ArtifactsTokenInfo$1 = ArtifactsTokenInfo;
61
+ type ArtifactsTokenInfo = globalThis.ArtifactsTokenInfo;
63
62
  /** Repository token list result. */
64
- type ArtifactsTokenListResult$1 = ArtifactsTokenListResult;
63
+ type ArtifactsTokenListResult = globalThis.ArtifactsTokenListResult;
65
64
  /** Identity recorded for a Git commit author or committer. */
66
65
  interface ArtifactsCommitIdentity {
67
66
  readonly name: string;
@@ -126,7 +125,7 @@ interface ArtifactsLogOptions {
126
125
  readonly limit?: number;
127
126
  readonly offset?: number;
128
127
  }
129
- interface ArtifactsRepoBinding extends Partial<ArtifactsRepoInfo$1> {
128
+ interface ArtifactsRepoBinding extends Partial<ArtifactsRepoInfo> {
130
129
  /**
131
130
  * Read repository metadata.
132
131
  *
@@ -134,49 +133,49 @@ interface ArtifactsRepoBinding extends Partial<ArtifactsRepoInfo$1> {
134
133
  * through this method. It is optional solely for compatibility with older
135
134
  * local handles that expose metadata as data properties.
136
135
  */
137
- readonly info?: () => Promise<ArtifactsRepoInfo$1>;
136
+ readonly info?: () => Promise<ArtifactsRepoInfo>;
138
137
  /**
139
138
  * Create a Git token for the repository.
140
139
  *
141
140
  * Scope defaults to `"write"`. TTL is measured in seconds, defaults to
142
141
  * 86,400, and must be between 60 and 31,536,000.
143
142
  */
144
- readonly createToken: (scope?: ArtifactsTokenScope, ttl?: number) => Promise<ArtifactsCreateTokenResult$1>;
145
- readonly listTokens: () => Promise<ArtifactsTokenListResult$1>;
143
+ readonly createToken: (scope?: ArtifactsTokenScope, ttl?: number) => Promise<ArtifactsCreateTokenResult>;
144
+ readonly listTokens: () => Promise<ArtifactsTokenListResult>;
146
145
  readonly revokeToken: (tokenOrId: string) => Promise<boolean>;
147
- readonly fork: (name: RepoName, options?: ArtifactsForkOptions) => Promise<ArtifactsCreateRepoResult$1>;
146
+ readonly fork: (name: RepoName, options?: ArtifactsForkOptions) => Promise<ArtifactsCreateRepoResult>;
148
147
  readonly log: (options?: ArtifactsLogOptions) => Promise<ArtifactsLogResult>;
149
148
  readonly readCommit: (hash: string) => Promise<ArtifactsCommit>;
150
149
  readonly readTree: (hash: string) => Promise<ArtifactsTree>;
151
150
  }
152
151
  interface ArtifactsBinding {
153
- readonly create: (name: RepoName, options?: ArtifactsCreateOptions) => Promise<ArtifactsCreateRepoResult$1>;
152
+ readonly create: (name: RepoName, options?: ArtifactsCreateOptions) => Promise<ArtifactsCreateRepoResult>;
154
153
  readonly get: (name: RepoName) => Promise<ArtifactsRepoBinding>;
155
- readonly import: (params: ArtifactsImportParams) => Promise<ArtifactsCreateRepoResult$1>;
154
+ readonly import: (params: ArtifactsImportParams) => Promise<ArtifactsCreateRepoResult>;
156
155
  readonly list: (options?: ArtifactsListOptions) => Promise<ArtifactsRepoListResult>;
157
156
  readonly delete: (name: RepoName) => Promise<boolean>;
158
157
  }
159
- interface ArtifactsRepoClient extends ArtifactsRepoInfo$1 {
160
- readonly info: () => Effect.Effect<ArtifactsRepoInfo$1, ArtifactsOperationError>;
158
+ interface ArtifactsRepoClient extends ArtifactsRepoInfo {
159
+ readonly info: () => Effect.Effect<ArtifactsRepoInfo, ArtifactsOperationError>;
161
160
  /**
162
161
  * Create a Git token for the repository.
163
162
  *
164
163
  * Scope defaults to `"write"`. TTL is measured in seconds, defaults to
165
164
  * 86,400, and must be between 60 and 31,536,000.
166
165
  */
167
- readonly createToken: (scope?: ArtifactsTokenScope, ttl?: number) => Effect.Effect<ArtifactsCreateTokenResult$1, ArtifactsOperationError>;
168
- readonly listTokens: Effect.Effect<ArtifactsTokenListResult$1, ArtifactsOperationError>;
166
+ readonly createToken: (scope?: ArtifactsTokenScope, ttl?: number) => Effect.Effect<ArtifactsCreateTokenResult, ArtifactsOperationError>;
167
+ readonly listTokens: Effect.Effect<ArtifactsTokenListResult, ArtifactsOperationError>;
169
168
  readonly revokeToken: (tokenOrId: string) => Effect.Effect<boolean, ArtifactsOperationError>;
170
- readonly fork: (name: RepoName, options?: ArtifactsForkOptions) => Effect.Effect<ArtifactsCreateRepoResult$1, ArtifactsOperationError>;
169
+ readonly fork: (name: RepoName, options?: ArtifactsForkOptions) => Effect.Effect<ArtifactsCreateRepoResult, ArtifactsOperationError>;
171
170
  readonly log: (options?: ArtifactsLogOptions) => Effect.Effect<ArtifactsLogResult, ArtifactsOperationError>;
172
171
  readonly readCommit: (hash: string) => Effect.Effect<ArtifactsCommit, ArtifactsOperationError>;
173
172
  readonly readTree: (hash: string) => Effect.Effect<ArtifactsTree, ArtifactsOperationError>;
174
173
  readonly raw: ArtifactsRepoBinding;
175
174
  }
176
175
  interface ArtifactsClient {
177
- readonly create: (name: RepoName, options?: ArtifactsCreateOptions) => Effect.Effect<ArtifactsCreateRepoResult$1, ArtifactsOperationError>;
176
+ readonly create: (name: RepoName, options?: ArtifactsCreateOptions) => Effect.Effect<ArtifactsCreateRepoResult, ArtifactsOperationError>;
178
177
  readonly get: (name: RepoName) => Effect.Effect<ArtifactsRepoClient, ArtifactsOperationError>;
179
- readonly import: (params: ArtifactsImportParams) => Effect.Effect<ArtifactsCreateRepoResult$1, ArtifactsOperationError>;
178
+ readonly import: (params: ArtifactsImportParams) => Effect.Effect<ArtifactsCreateRepoResult, ArtifactsOperationError>;
180
179
  readonly list: (options?: ArtifactsListOptions) => Effect.Effect<ArtifactsRepoListResult, ArtifactsOperationError>;
181
180
  readonly delete: (name: RepoName) => Effect.Effect<boolean, ArtifactsOperationError>;
182
181
  readonly rawUnsafe: Effect.Effect<ArtifactsBinding>;
@@ -202,4 +201,4 @@ declare const layer: <Self>(tag: Context$1.Service<Self, ArtifactsClient>, defin
202
201
  declare const make: <Id extends string>(id: Id) => TagClass<ArtifactsService<Id>, Id>;
203
202
  declare const Tag: <Self>() => <Id extends string>(id: Id) => TagClass<Self, Id>;
204
203
  //#endregion
205
- export { ArtifactsBinding, ArtifactsClient, ArtifactsCommit, ArtifactsCommitIdentity, ArtifactsCreateOptions, ArtifactsCreateRepoResult$1 as ArtifactsCreateRepoResult, ArtifactsCreateTokenResult$1 as ArtifactsCreateTokenResult, ArtifactsDefinition, ArtifactsErrorCode$1 as ArtifactsErrorCode, ArtifactsForkOptions, ArtifactsImportParams, ArtifactsImportSource, ArtifactsImportTarget, ArtifactsImportTargetOptions, ArtifactsListOptions, ArtifactsLogOptions, ArtifactsLogResult, ArtifactsOperation, ArtifactsOperationError, ArtifactsRepoBinding, ArtifactsRepoClient, ArtifactsRepoInfo$1 as ArtifactsRepoInfo, ArtifactsRepoListEntry, ArtifactsRepoListResult, ArtifactsRepoStatus, ArtifactsService, ArtifactsTokenInfo$1 as ArtifactsTokenInfo, ArtifactsTokenListResult$1 as ArtifactsTokenListResult, ArtifactsTokenScope, ArtifactsTokenState, ArtifactsTree, Artifacts_d_exports, type BindingNotFoundError, type BindingValidationError, Cursor, LayerOptions, RepoName, Tag, TagClass, artifactsErrorCodes, artifactsErrorNumericCodes, isArtifactsBinding, isArtifactsRepoBinding, layer, make, makeClient };
204
+ export { ArtifactsBinding, ArtifactsClient, ArtifactsCommit, ArtifactsCommitIdentity, ArtifactsCreateOptions, ArtifactsCreateRepoResult, ArtifactsCreateTokenResult, ArtifactsDefinition, ArtifactsErrorCode, ArtifactsForkOptions, ArtifactsImportParams, ArtifactsImportSource, ArtifactsImportTarget, ArtifactsImportTargetOptions, ArtifactsListOptions, ArtifactsLogOptions, ArtifactsLogResult, ArtifactsOperation, ArtifactsOperationError, ArtifactsRepoBinding, ArtifactsRepoClient, ArtifactsRepoInfo, ArtifactsRepoListEntry, ArtifactsRepoListResult, ArtifactsRepoStatus, ArtifactsService, ArtifactsTokenInfo, ArtifactsTokenListResult, ArtifactsTokenScope, ArtifactsTokenState, ArtifactsTree, Artifacts_d_exports, type BindingNotFoundError, type BindingValidationError, Cursor, LayerOptions, RepoName, Tag, TagClass, artifactsErrorCodes, artifactsErrorNumericCodes, isArtifactsBinding, isArtifactsRepoBinding, layer, make, makeClient };
package/dist/Cache.d.mts CHANGED
@@ -2,12 +2,11 @@ import * as Context from "effect/Context";
2
2
  import * as Effect from "effect/Effect";
3
3
  import * as Layer from "effect/Layer";
4
4
  import * as Option from "effect/Option";
5
- import { Cache, CacheQueryOptions, CacheStorage, RequestInfo } from "@cloudflare/workers-types";
6
5
  declare namespace Cache_d_exports {
7
- export { CacheClient, CacheOperation, CacheOperationError, CacheQueryOptions$1 as CacheQueryOptions, CacheRequest, CacheStorage$1 as CacheStorage, CacheStorageClient, layer, layerFrom, makeCacheClient, makeClient };
6
+ export { CacheClient, CacheOperation, CacheOperationError, CacheQueryOptions, CacheRequest, CacheStorage, CacheStorageClient, layer, layerFrom, makeCacheClient, makeClient };
8
7
  }
9
8
  type CacheRequest = RequestInfo | URL;
10
- type CacheQueryOptions$1 = CacheQueryOptions;
9
+ type CacheQueryOptions = globalThis.CacheQueryOptions;
11
10
  type CacheOperation = "open" | "match" | "put" | "delete";
12
11
  declare const CacheOperationError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
13
12
  readonly _tag: "CacheOperationError";
@@ -21,21 +20,21 @@ declare class CacheOperationError extends CacheOperationError_base<{
21
20
  }
22
21
  interface CacheClient {
23
22
  readonly name: string;
24
- readonly match: (request: CacheRequest, options?: CacheQueryOptions$1) => Effect.Effect<Option.Option<Response>, CacheOperationError>;
23
+ readonly match: (request: CacheRequest, options?: CacheQueryOptions) => Effect.Effect<Option.Option<Response>, CacheOperationError>;
25
24
  readonly put: (request: CacheRequest, response: Response) => Effect.Effect<void, CacheOperationError>;
26
- readonly delete: (request: CacheRequest, options?: CacheQueryOptions$1) => Effect.Effect<boolean, CacheOperationError>;
25
+ readonly delete: (request: CacheRequest, options?: CacheQueryOptions) => Effect.Effect<boolean, CacheOperationError>;
27
26
  readonly rawUnsafe: Effect.Effect<Cache>;
28
27
  }
29
28
  interface CacheStorageClient {
30
29
  readonly default: CacheClient;
31
30
  readonly open: (name: string) => Effect.Effect<CacheClient, CacheOperationError>;
32
- readonly rawUnsafe: Effect.Effect<CacheStorage>;
31
+ readonly rawUnsafe: Effect.Effect<globalThis.CacheStorage>;
33
32
  }
34
- declare const CacheStorage_base: Context.ServiceClass<CacheStorage$1, "effect-cf/CacheStorage", CacheStorageClient>;
35
- declare class CacheStorage$1 extends CacheStorage_base {}
33
+ declare const CacheStorage_base: Context.ServiceClass<CacheStorage, "effect-cf/CacheStorage", CacheStorageClient>;
34
+ declare class CacheStorage extends CacheStorage_base {}
36
35
  declare const makeCacheClient: (cache: Cache, name?: string) => CacheClient;
37
- declare const makeClient: (storage: CacheStorage) => CacheStorageClient;
38
- declare const layerFrom: (storage: CacheStorage) => Layer.Layer<CacheStorage$1>;
39
- declare const layer: Layer.Layer<CacheStorage$1>;
36
+ declare const makeClient: (storage: globalThis.CacheStorage) => CacheStorageClient;
37
+ declare const layerFrom: (storage: globalThis.CacheStorage) => Layer.Layer<CacheStorage>;
38
+ declare const layer: Layer.Layer<CacheStorage>;
40
39
  //#endregion
41
- export { CacheClient, CacheOperation, CacheOperationError, CacheQueryOptions$1 as CacheQueryOptions, CacheRequest, CacheStorage$1 as CacheStorage, CacheStorageClient, Cache_d_exports, layer, layerFrom, makeCacheClient, makeClient };
40
+ export { CacheClient, CacheOperation, CacheOperationError, CacheQueryOptions, CacheRequest, CacheStorage, CacheStorageClient, Cache_d_exports, layer, layerFrom, makeCacheClient, makeClient };
@@ -2,6 +2,7 @@ import { WorkerEnv, WorkerEnvironment } from "./Environment.mjs";
2
2
  import { BindingNotFoundError, BindingValidationError } from "./Binding.mjs";
3
3
  import { DurableWebSocket } from "./DurableObjectWebSocket.mjs";
4
4
  import { ReceiverOptions, RpcInvocationInfo } from "./RpcTracing.mjs";
5
+ import { RunOptions as RunOptions$1 } from "./internal/Runtime.mjs";
5
6
  import { NativeRequest } from "./Worker.mjs";
6
7
  import { DurableObjectState } from "./DurableObjectState.mjs";
7
8
  import { AlarmRegistration, AlarmService, DurableObjectAlarm } from "./DurableObjectAlarm.mjs";
@@ -18,7 +19,7 @@ type RuntimeContext<ROut> = DurableObjectState | DurableObjectAlarm | WorkerEnvi
18
19
  type HandlerContext<ROut> = RuntimeContext<ROut> | Scope.Scope;
19
20
  type FetchContext<ROut> = HandlerContext<ROut> | NativeRequest;
20
21
  /** Metadata available before an event effect or its event layer starts. */
21
- interface RunOptions {
22
+ interface RunOptions extends RunOptions$1 {
22
23
  readonly eventLayer?: boolean;
23
24
  readonly event?: "fetch" | "rpc" | "alarm" | "webSocketMessage" | "webSocketClose" | "webSocketError";
24
25
  readonly rpc?: RpcInvocationInfo;
@@ -46,8 +46,8 @@ function make(layer, options = {}) {
46
46
  const eventLayer = runOptions.eventLayer === false ? void 0 : options.eventLayer;
47
47
  const parent = runOptions.rpc?.parent;
48
48
  const parentSpan = parent === void 0 ? void 0 : Tracer.externalSpan(parent);
49
- if (eventLayer === void 0) return runEventPromise(this.runtime, effect, void 0, parentSpan);
50
- return runEventPromise(this.runtime, effect, eventLayer, parentSpan);
49
+ if (eventLayer === void 0) return runEventPromise(this.runtime, effect, void 0, parentSpan, runOptions.onFailure);
50
+ return runEventPromise(this.runtime, effect, eventLayer, parentSpan, runOptions.onFailure);
51
51
  }
52
52
  fetch(request) {
53
53
  const fetchHandler = options.fetch;
package/dist/Email.d.mts CHANGED
@@ -2,10 +2,9 @@ import { WorkerEnvironment } from "./Environment.mjs";
2
2
  import { BindingNotFoundError, BindingValidationError } from "./Binding.mjs";
3
3
  import * as Context$1 from "effect/Context";
4
4
  import * as Effect from "effect/Effect";
5
- import { EmailAddress, EmailAttachment, EmailSendResult, SendEmail } from "@cloudflare/workers-types";
6
5
  import { Layer } from "effect";
7
6
  declare namespace Email_d_exports {
8
- export { BindingNotFoundError, BindingValidationError, EmailAddress$1 as EmailAddress, EmailAttachment$1 as EmailAttachment, EmailBinding, EmailClient, EmailDefinition, EmailErrorCode, EmailMessageBuilder, EmailOperationError, EmailRecipients, EmailSendError, EmailSendOptions, EmailSendResult$1 as EmailSendResult, EmailService, EmailValidationError, EmailViolation, LayerOptions, Tag, TagClass, emailErrorCodes, isEmailBinding, layer, make, makeClient, sendLimits, validateMessage };
7
+ export { BindingNotFoundError, BindingValidationError, EmailAddress, EmailAttachment, EmailBinding, EmailClient, EmailDefinition, EmailErrorCode, EmailMessageBuilder, EmailOperationError, EmailRecipients, EmailSendError, EmailSendOptions, EmailSendResult, EmailService, EmailValidationError, EmailViolation, LayerOptions, Tag, TagClass, emailErrorCodes, isEmailBinding, layer, make, makeClient, sendLimits, validateMessage };
9
8
  }
10
9
  declare const sendLimits: {
11
10
  readonly maxRecipients: 50;
@@ -63,18 +62,18 @@ declare class EmailValidationError extends EmailValidationError_base<{
63
62
  interface EmailDefinition {
64
63
  readonly binding: string;
65
64
  }
66
- type EmailAddress$1 = EmailAddress;
67
- type EmailAttachment$1 = EmailAttachment;
65
+ type EmailAddress = globalThis.EmailAddress;
66
+ type EmailAttachment = globalThis.EmailAttachment;
67
+ type EmailSendResult = globalThis.EmailSendResult;
68
68
  type EmailMessageBuilder = Parameters<SendEmail["send"]>[0];
69
- type EmailSendResult$1 = EmailSendResult;
70
69
  type EmailBinding = SendEmail;
71
- type EmailRecipients = string | EmailAddress$1 | ReadonlyArray<string | EmailAddress$1>;
70
+ type EmailRecipients = string | EmailAddress | ReadonlyArray<string | EmailAddress>;
72
71
  type EmailSendError = EmailOperationError | EmailValidationError;
73
72
  interface EmailSendOptions {
74
73
  readonly validate?: boolean;
75
74
  }
76
75
  interface EmailClient {
77
- readonly send: (message: EmailMessageBuilder) => Effect.Effect<EmailSendResult$1, EmailSendError>;
76
+ readonly send: (message: EmailMessageBuilder) => Effect.Effect<EmailSendResult, EmailSendError>;
78
77
  readonly rawUnsafe: Effect.Effect<EmailBinding>;
79
78
  readonly definition: EmailDefinition;
80
79
  }
@@ -104,4 +103,4 @@ declare const layer: <Self>(tag: Context$1.Service<Self, EmailClient>, definitio
104
103
  declare const make: <Id extends string>(id: Id) => TagClass<EmailService<Id>, Id>;
105
104
  declare const Tag: <Self>() => <Id extends string>(id: Id) => TagClass<Self, Id>;
106
105
  //#endregion
107
- export { type BindingNotFoundError, type BindingValidationError, EmailAddress$1 as EmailAddress, EmailAttachment$1 as EmailAttachment, EmailBinding, EmailClient, EmailDefinition, EmailErrorCode, EmailMessageBuilder, EmailOperationError, EmailRecipients, EmailSendError, EmailSendOptions, EmailSendResult$1 as EmailSendResult, EmailService, EmailValidationError, EmailViolation, Email_d_exports, LayerOptions, Tag, TagClass, emailErrorCodes, isEmailBinding, layer, make, makeClient, sendLimits, validateMessage };
106
+ export { type BindingNotFoundError, type BindingValidationError, EmailAddress, EmailAttachment, EmailBinding, EmailClient, EmailDefinition, EmailErrorCode, EmailMessageBuilder, EmailOperationError, EmailRecipients, EmailSendError, EmailSendOptions, EmailSendResult, EmailService, EmailValidationError, EmailViolation, Email_d_exports, LayerOptions, Tag, TagClass, emailErrorCodes, isEmailBinding, layer, make, makeClient, sendLimits, validateMessage };
package/dist/Images.d.mts CHANGED
@@ -4,10 +4,9 @@ import * as Context$1 from "effect/Context";
4
4
  import * as Data from "effect/Data";
5
5
  import * as Effect from "effect/Effect";
6
6
  import * as Option from "effect/Option";
7
- import { HostedImagesBinding, ImageDirectUploadOptions, ImageDirectUploadResult, ImageDrawOptions, ImageHandle, ImageInfoResponse, ImageInputOptions, ImageList, ImageListOptions, ImageMetadata, ImageOutputOptions, ImageSignedUrlOptions, ImageTransform, ImageTransformationOutputOptions, ImageTransformationResponseOptions, ImageTransformationResult, ImageTransformer, ImageUpdateOptions, ImageUploadOptions, Response, TextOptions } from "@cloudflare/workers-types";
8
7
  import { Layer } from "effect";
9
8
  declare namespace Images_d_exports {
10
- export { BindingNotFoundError, BindingValidationError, DrawStepOptions, HostedImagesClient, ImageDirectUploadOptions$1 as ImageDirectUploadOptions, ImageDirectUploadResult$1 as ImageDirectUploadResult, ImageDrawOptions$1 as ImageDrawOptions, ImageHandleClient, ImageInfoResponse$1 as ImageInfoResponse, ImageInputOptions$1 as ImageInputOptions, ImageInputValue, ImageList$1 as ImageList, ImageListOptions$1 as ImageListOptions, ImageMetadata$1 as ImageMetadata, ImageOutputOptions$1 as ImageOutputOptions, ImageSignedUrlOptions$1 as ImageSignedUrlOptions, ImageTransform$1 as ImageTransform, ImageTransformationOutputOptions$1 as ImageTransformationOutputOptions, ImageTransformationResponseOptions$1 as ImageTransformationResponseOptions, ImageTransformationResult$1 as ImageTransformationResult, ImageUpdateOptions$1 as ImageUpdateOptions, ImageUploadOptions$1 as ImageUploadOptions, ImageUploadValue, ImagesClient, ImagesDefinition, ImagesOperationError, ImagesRuntimeBinding, ImagesService, ImagesTransformationResultClient, LayerOptions, ProcessOptions, Step, Steps, Tag, TagClass, TextOptions$1 as TextOptions, TypeId, draw, empty, isImagesBinding, layer, make, makeClient, transform };
9
+ export { BindingNotFoundError, BindingValidationError, DrawStepOptions, HostedImagesClient, ImageDirectUploadOptions, ImageDirectUploadResult, ImageDrawOptions, ImageHandleClient, ImageInfoResponse, ImageInputOptions, ImageInputValue, ImageList, ImageListOptions, ImageMetadata, ImageOutputOptions, ImageSignedUrlOptions, ImageTransform, ImageTransformationOutputOptions, ImageTransformationResponseOptions, ImageTransformationResult, ImageUpdateOptions, ImageUploadOptions, ImageUploadValue, ImagesClient, ImagesDefinition, ImagesOperationError, ImagesRuntimeBinding, ImagesService, ImagesTransformationResultClient, LayerOptions, ProcessOptions, Step, Steps, Tag, TagClass, TextOptions, TypeId, draw, empty, isImagesBinding, layer, make, makeClient, transform };
11
10
  }
12
11
  declare const TypeId: "~effect-cf/Images/Steps";
13
12
  type TypeId = typeof TypeId;
@@ -24,32 +23,32 @@ declare class ImagesOperationError extends ImagesOperationError_base<{
24
23
  interface ImagesDefinition {
25
24
  readonly binding: string;
26
25
  }
27
- type ImageInfoResponse$1 = ImageInfoResponse;
28
- type ImageTransform$1 = ImageTransform;
29
- type ImageDrawOptions$1 = ImageDrawOptions;
30
- type ImageInputOptions$1 = ImageInputOptions;
31
- type ImageOutputOptions$1 = ImageOutputOptions;
32
- type ImageTransformationOutputOptions$1 = ImageTransformationOutputOptions;
33
- type ImageTransformationResponseOptions$1 = ImageTransformationResponseOptions;
34
- type ImageTransformationResult$1 = ImageTransformationResult;
35
- type ImageUploadOptions$1 = ImageUploadOptions;
36
- type ImageUpdateOptions$1 = ImageUpdateOptions;
37
- type ImageListOptions$1 = ImageListOptions;
38
- type ImageList$1 = ImageList;
39
- type ImageMetadata$1 = ImageMetadata;
40
- type ImageSignedUrlOptions$1 = ImageSignedUrlOptions;
41
- type ImageDirectUploadOptions$1 = ImageDirectUploadOptions;
42
- type ImageDirectUploadResult$1 = ImageDirectUploadResult;
43
- type TextOptions$1 = TextOptions;
26
+ type ImageDirectUploadOptions = globalThis.ImageDirectUploadOptions;
27
+ type ImageDirectUploadResult = globalThis.ImageDirectUploadResult;
28
+ type ImageDrawOptions = globalThis.ImageDrawOptions;
29
+ type ImageInfoResponse = globalThis.ImageInfoResponse;
30
+ type ImageInputOptions = globalThis.ImageInputOptions;
31
+ type ImageList = globalThis.ImageList;
32
+ type ImageListOptions = globalThis.ImageListOptions;
33
+ type ImageMetadata = globalThis.ImageMetadata;
34
+ type ImageOutputOptions = globalThis.ImageOutputOptions;
35
+ type ImageSignedUrlOptions = globalThis.ImageSignedUrlOptions;
36
+ type ImageTransform = globalThis.ImageTransform;
37
+ type ImageTransformationOutputOptions = globalThis.ImageTransformationOutputOptions;
38
+ type ImageTransformationResponseOptions = globalThis.ImageTransformationResponseOptions;
39
+ type ImageTransformationResult = globalThis.ImageTransformationResult;
40
+ type ImageUpdateOptions = globalThis.ImageUpdateOptions;
41
+ type ImageUploadOptions = globalThis.ImageUploadOptions;
42
+ type TextOptions = globalThis.TextOptions;
44
43
  type ImageInputValue = ReadableStream<Uint8Array> | ArrayBuffer;
45
44
  type ImageUploadValue = ReadableStream<Uint8Array> | ArrayBuffer;
46
45
  interface DrawStepOptions {
47
46
  readonly image: ReadableStream<Uint8Array> | ImageTransformer;
48
- readonly options?: ImageDrawOptions$1;
47
+ readonly options?: ImageDrawOptions;
49
48
  }
50
49
  type Step = Data.TaggedEnum<{
51
50
  readonly Transform: {
52
- readonly transform: ImageTransform$1;
51
+ readonly transform: ImageTransform;
53
52
  };
54
53
  readonly Draw: DrawStepOptions;
55
54
  }>;
@@ -57,12 +56,12 @@ declare const Step: {
57
56
  readonly $is: <Tag extends "Draw" | "Transform">(tag: Tag) => (u: unknown) => u is Extract<{
58
57
  readonly _tag: "Draw";
59
58
  readonly image: ReadableStream<Uint8Array> | ImageTransformer;
60
- readonly options?: ImageDrawOptions$1;
59
+ readonly options?: ImageDrawOptions;
61
60
  }, {
62
61
  readonly _tag: Tag;
63
62
  }> | Extract<{
64
63
  readonly _tag: "Transform";
65
- readonly transform: ImageTransform$1;
64
+ readonly transform: ImageTransform;
66
65
  }, {
67
66
  readonly _tag: Tag;
68
67
  }>;
@@ -70,46 +69,46 @@ declare const Step: {
70
69
  <Cases extends { readonly [Tag in "Draw" | "Transform"]: (args: Extract<{
71
70
  readonly _tag: "Draw";
72
71
  readonly image: ReadableStream<Uint8Array> | ImageTransformer;
73
- readonly options?: ImageDrawOptions$1;
72
+ readonly options?: ImageDrawOptions;
74
73
  } | {
75
74
  readonly _tag: "Transform";
76
- readonly transform: ImageTransform$1;
75
+ readonly transform: ImageTransform;
77
76
  }, {
78
77
  readonly _tag: Tag;
79
78
  }>) => any; }>(cases: Cases): (value: {
80
79
  readonly _tag: "Draw";
81
80
  readonly image: ReadableStream<Uint8Array> | ImageTransformer;
82
- readonly options?: ImageDrawOptions$1;
81
+ readonly options?: ImageDrawOptions;
83
82
  } | {
84
83
  readonly _tag: "Transform";
85
- readonly transform: ImageTransform$1;
84
+ readonly transform: ImageTransform;
86
85
  }) => import("effect/Unify").Unify<ReturnType<Cases["Draw" | "Transform"]>>;
87
86
  <Cases extends { readonly [Tag in "Draw" | "Transform"]: (args: Extract<{
88
87
  readonly _tag: "Draw";
89
88
  readonly image: ReadableStream<Uint8Array> | ImageTransformer;
90
- readonly options?: ImageDrawOptions$1;
89
+ readonly options?: ImageDrawOptions;
91
90
  } | {
92
91
  readonly _tag: "Transform";
93
- readonly transform: ImageTransform$1;
92
+ readonly transform: ImageTransform;
94
93
  }, {
95
94
  readonly _tag: Tag;
96
95
  }>) => any; }>(value: {
97
96
  readonly _tag: "Draw";
98
97
  readonly image: ReadableStream<Uint8Array> | ImageTransformer;
99
- readonly options?: ImageDrawOptions$1;
98
+ readonly options?: ImageDrawOptions;
100
99
  } | {
101
100
  readonly _tag: "Transform";
102
- readonly transform: ImageTransform$1;
101
+ readonly transform: ImageTransform;
103
102
  }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Draw" | "Transform"]>>;
104
103
  };
105
104
  readonly Draw: Data.TaggedEnum.ConstructorFrom<{
106
105
  readonly _tag: "Draw";
107
106
  readonly image: ReadableStream<Uint8Array> | ImageTransformer;
108
- readonly options?: ImageDrawOptions$1;
107
+ readonly options?: ImageDrawOptions;
109
108
  }, "_tag">;
110
109
  readonly Transform: Data.TaggedEnum.ConstructorFrom<{
111
110
  readonly _tag: "Transform";
112
- readonly transform: ImageTransform$1;
111
+ readonly transform: ImageTransform;
113
112
  }, "_tag">;
114
113
  };
115
114
  interface Steps {
@@ -118,44 +117,44 @@ interface Steps {
118
117
  }
119
118
  type ProcessOptions = {
120
119
  readonly stream: ImageInputValue;
121
- readonly inputOptions?: ImageInputOptions$1;
122
- readonly outputOptions: ImageOutputOptions$1;
120
+ readonly inputOptions?: ImageInputOptions;
121
+ readonly outputOptions: ImageOutputOptions;
123
122
  } | {
124
123
  readonly text: string;
125
- readonly textOptions: TextOptions$1;
126
- readonly outputOptions: ImageOutputOptions$1;
124
+ readonly textOptions: TextOptions;
125
+ readonly outputOptions: ImageOutputOptions;
127
126
  };
128
127
  interface ImagesTransformationResultClient {
129
128
  readonly raw: ImageTransformationResult;
130
- readonly response: (options?: ImageTransformationResponseOptions$1) => Effect.Effect<Response, ImagesOperationError>;
129
+ readonly response: (options?: ImageTransformationResponseOptions) => Effect.Effect<Response, ImagesOperationError>;
131
130
  readonly contentType: Effect.Effect<string, ImagesOperationError>;
132
- readonly image: (options?: ImageTransformationOutputOptions$1) => Effect.Effect<ReadableStream<Uint8Array>, ImagesOperationError>;
131
+ readonly image: (options?: ImageTransformationOutputOptions) => Effect.Effect<ReadableStream<Uint8Array>, ImagesOperationError>;
133
132
  }
134
133
  interface ImageHandleClient {
135
134
  readonly raw: ImageHandle;
136
- readonly details: Effect.Effect<Option.Option<ImageMetadata$1>, ImagesOperationError>;
135
+ readonly details: Effect.Effect<Option.Option<ImageMetadata>, ImagesOperationError>;
137
136
  readonly bytes: Effect.Effect<Option.Option<ReadableStream<Uint8Array>>, ImagesOperationError>;
138
- readonly signedUrl: (options: ImageSignedUrlOptions$1) => Effect.Effect<string, ImagesOperationError>;
139
- readonly update: (options: ImageUpdateOptions$1) => Effect.Effect<ImageMetadata$1, ImagesOperationError>;
137
+ readonly signedUrl: (options: ImageSignedUrlOptions) => Effect.Effect<string, ImagesOperationError>;
138
+ readonly update: (options: ImageUpdateOptions) => Effect.Effect<ImageMetadata, ImagesOperationError>;
140
139
  readonly delete: Effect.Effect<boolean, ImagesOperationError>;
141
140
  }
142
141
  interface HostedImagesClient {
143
142
  readonly image: (imageId: string) => ImageHandleClient;
144
- readonly upload: (image: ImageUploadValue, options?: ImageUploadOptions$1) => Effect.Effect<ImageMetadata$1, ImagesOperationError>;
145
- readonly list: (options?: ImageListOptions$1) => Effect.Effect<ImageList$1, ImagesOperationError>;
146
- readonly createDirectUpload: (options?: ImageDirectUploadOptions$1) => Effect.Effect<ImageDirectUploadResult$1, ImagesOperationError>;
143
+ readonly upload: (image: ImageUploadValue, options?: ImageUploadOptions) => Effect.Effect<ImageMetadata, ImagesOperationError>;
144
+ readonly list: (options?: ImageListOptions) => Effect.Effect<ImageList, ImagesOperationError>;
145
+ readonly createDirectUpload: (options?: ImageDirectUploadOptions) => Effect.Effect<ImageDirectUploadResult, ImagesOperationError>;
147
146
  readonly rawUnsafe: Effect.Effect<HostedImagesBinding>;
148
147
  }
149
148
  interface ImagesRuntimeBinding {
150
- readonly info: (image: ImageInputValue, options?: ImageInputOptions$1) => Promise<ImageInfoResponse$1>;
151
- readonly input: (image: ImageInputValue, options?: ImageInputOptions$1) => ImageTransformer;
152
- readonly text?: (content: string, options: TextOptions$1) => ImageTransformer;
149
+ readonly info: (image: ImageInputValue, options?: ImageInputOptions) => Promise<ImageInfoResponse>;
150
+ readonly input: (image: ImageInputValue, options?: ImageInputOptions) => ImageTransformer;
151
+ readonly text?: (content: string, options: TextOptions) => ImageTransformer;
153
152
  readonly hosted?: HostedImagesBinding;
154
153
  }
155
154
  interface ImagesClient {
156
- readonly info: (image: ImageInputValue, options?: ImageInputOptions$1) => Effect.Effect<ImageInfoResponse$1, ImagesOperationError>;
157
- readonly input: (image: ImageInputValue, options?: ImageInputOptions$1) => Effect.Effect<ImageTransformer, ImagesOperationError>;
158
- readonly text: (content: string, options: TextOptions$1) => Effect.Effect<ImageTransformer, ImagesOperationError>;
155
+ readonly info: (image: ImageInputValue, options?: ImageInputOptions) => Effect.Effect<ImageInfoResponse, ImagesOperationError>;
156
+ readonly input: (image: ImageInputValue, options?: ImageInputOptions) => Effect.Effect<ImageTransformer, ImagesOperationError>;
157
+ readonly text: (content: string, options: TextOptions) => Effect.Effect<ImageTransformer, ImagesOperationError>;
159
158
  readonly process: (steps: Steps, options: ProcessOptions) => Effect.Effect<ImagesTransformationResultClient, ImagesOperationError>;
160
159
  readonly hosted: Option.Option<HostedImagesClient>;
161
160
  readonly rawUnsafe: Effect.Effect<ImagesRuntimeBinding>;
@@ -176,8 +175,8 @@ interface TagClass<Self, Id extends string> extends Context$1.ServiceClass<Self,
176
175
  }
177
176
  declare const empty: Steps;
178
177
  declare const transform: {
179
- (transform: ImageTransform$1): (steps: Steps) => Steps;
180
- (steps: Steps, transform: ImageTransform$1): Steps;
178
+ (transform: ImageTransform): (steps: Steps) => Steps;
179
+ (steps: Steps, transform: ImageTransform): Steps;
181
180
  };
182
181
  declare const draw: {
183
182
  (draw: DrawStepOptions): (steps: Steps) => Steps;
@@ -189,4 +188,4 @@ declare const layer: <Self>(tag: Context$1.Service<Self, ImagesClient>, definiti
189
188
  declare const make: <Id extends string>(id: Id) => TagClass<ImagesService<Id>, Id>;
190
189
  declare const Tag: <Self>() => <Id extends string>(id: Id) => TagClass<Self, Id>;
191
190
  //#endregion
192
- export { type BindingNotFoundError, type BindingValidationError, DrawStepOptions, HostedImagesClient, ImageDirectUploadOptions$1 as ImageDirectUploadOptions, ImageDirectUploadResult$1 as ImageDirectUploadResult, ImageDrawOptions$1 as ImageDrawOptions, ImageHandleClient, ImageInfoResponse$1 as ImageInfoResponse, ImageInputOptions$1 as ImageInputOptions, ImageInputValue, ImageList$1 as ImageList, ImageListOptions$1 as ImageListOptions, ImageMetadata$1 as ImageMetadata, ImageOutputOptions$1 as ImageOutputOptions, ImageSignedUrlOptions$1 as ImageSignedUrlOptions, ImageTransform$1 as ImageTransform, ImageTransformationOutputOptions$1 as ImageTransformationOutputOptions, ImageTransformationResponseOptions$1 as ImageTransformationResponseOptions, ImageTransformationResult$1 as ImageTransformationResult, ImageUpdateOptions$1 as ImageUpdateOptions, ImageUploadOptions$1 as ImageUploadOptions, ImageUploadValue, ImagesClient, ImagesDefinition, ImagesOperationError, ImagesRuntimeBinding, ImagesService, ImagesTransformationResultClient, Images_d_exports, LayerOptions, ProcessOptions, Step, Steps, Tag, TagClass, TextOptions$1 as TextOptions, TypeId, draw, empty, isImagesBinding, layer, make, makeClient, transform };
191
+ export { type BindingNotFoundError, type BindingValidationError, DrawStepOptions, HostedImagesClient, ImageDirectUploadOptions, ImageDirectUploadResult, ImageDrawOptions, ImageHandleClient, ImageInfoResponse, ImageInputOptions, ImageInputValue, ImageList, ImageListOptions, ImageMetadata, ImageOutputOptions, ImageSignedUrlOptions, ImageTransform, ImageTransformationOutputOptions, ImageTransformationResponseOptions, ImageTransformationResult, ImageUpdateOptions, ImageUploadOptions, ImageUploadValue, ImagesClient, ImagesDefinition, ImagesOperationError, ImagesRuntimeBinding, ImagesService, ImagesTransformationResultClient, Images_d_exports, LayerOptions, ProcessOptions, Step, Steps, Tag, TagClass, TextOptions, TypeId, draw, empty, isImagesBinding, layer, make, makeClient, transform };
package/dist/Kv.d.mts CHANGED
@@ -4,7 +4,6 @@ import * as Context$1 from "effect/Context";
4
4
  import * as Effect from "effect/Effect";
5
5
  import * as S from "effect/Schema";
6
6
  import * as Option from "effect/Option";
7
- import { KVNamespaceListOptions, KVNamespacePutOptions } from "@cloudflare/workers-types";
8
7
  import { Layer } from "effect";
9
8
  declare namespace Kv_d_exports {
10
9
  export { BindingNotFoundError, BindingValidationError, Definition, KvClient, KvDefinition, KvListKey, KvListOptions, KvListResult, KvOperation, KvOperationError, KvPutOptions, KvWithMetadata, LayerOptions, Tag, TagClass, isKvNamespace, layer, makeClient };