effect-cf 0.46.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 +6 -0
- package/dist/AiGateway.d.mts +7 -8
- package/dist/AnalyticsEngine.d.mts +5 -6
- package/dist/Artifacts.d.mts +24 -25
- package/dist/Cache.d.mts +11 -12
- package/dist/Email.d.mts +7 -8
- package/dist/Images.d.mts +53 -54
- package/dist/Kv.d.mts +0 -1
- package/dist/QueueBinding.d.mts +11 -12
- package/dist/R2.d.mts +14 -15
- package/dist/Vectorize.d.mts +17 -18
- package/dist/WebTransport.d.mts +0 -1
- package/dist/WebTransport.mjs +31 -0
- package/dist/WorkersAi.d.mts +0 -1
- package/dist/WorkflowBinding.d.mts +14 -15
- package/package.json +1 -1
- package/src/AiGateway.ts +2 -3
- package/src/AnalyticsEngine.ts +2 -6
- package/src/Artifacts.ts +8 -16
- package/src/Cache.ts +7 -13
- package/src/Email.ts +5 -11
- package/src/Images.ts +31 -60
- package/src/Kv.ts +2 -6
- package/src/QueueBinding.ts +8 -17
- package/src/R2.ts +29 -49
- package/src/Vectorize.ts +11 -29
- package/src/WebTransport.ts +2 -4
- package/src/WorkersAi.ts +2 -17
- package/src/WorkflowBinding.ts +14 -26
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
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
|
+
|
|
3
9
|
## 0.46.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/dist/AiGateway.d.mts
CHANGED
|
@@ -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<
|
|
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:
|
|
68
|
-
gateway?:
|
|
66
|
+
run: (data: AIGatewayUniversalRequest | readonly AIGatewayUniversalRequest[], options?: {
|
|
67
|
+
gateway?: UniversalGatewayOptions;
|
|
69
68
|
extraHeaders?: object;
|
|
70
|
-
signal?:
|
|
71
|
-
} | undefined) => Effect.Effect<
|
|
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:
|
|
75
|
-
getLog: (logId: string) => Effect.Effect<
|
|
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
|
|
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
|
|
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
|
|
108
|
-
readonly writeDataPoints: (dataPoints: ReadonlyArray<AnalyticsEngineDataPoint
|
|
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
|
|
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 };
|
package/dist/Artifacts.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 { 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
|
|
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
|
|
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
|
|
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
|
|
50
|
-
type ArtifactsCreateRepoResult
|
|
51
|
-
interface ArtifactsRepoListEntry extends ArtifactsRepoInfo
|
|
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
|
|
59
|
+
type ArtifactsCreateTokenResult = globalThis.ArtifactsCreateTokenResult;
|
|
61
60
|
/** Repository token metadata, excluding its plaintext secret. */
|
|
62
|
-
type ArtifactsTokenInfo
|
|
61
|
+
type ArtifactsTokenInfo = globalThis.ArtifactsTokenInfo;
|
|
63
62
|
/** Repository token list result. */
|
|
64
|
-
type 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
|
|
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
|
|
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
|
|
145
|
-
readonly listTokens: () => Promise<ArtifactsTokenListResult
|
|
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
|
|
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
|
|
152
|
+
readonly create: (name: RepoName, options?: ArtifactsCreateOptions) => Promise<ArtifactsCreateRepoResult>;
|
|
154
153
|
readonly get: (name: RepoName) => Promise<ArtifactsRepoBinding>;
|
|
155
|
-
readonly import: (params: ArtifactsImportParams) => Promise<ArtifactsCreateRepoResult
|
|
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
|
|
160
|
-
readonly info: () => Effect.Effect<ArtifactsRepoInfo
|
|
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
|
|
168
|
-
readonly listTokens: Effect.Effect<ArtifactsTokenListResult
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
6
|
+
export { CacheClient, CacheOperation, CacheOperationError, CacheQueryOptions, CacheRequest, CacheStorage, CacheStorageClient, layer, layerFrom, makeCacheClient, makeClient };
|
|
8
7
|
}
|
|
9
8
|
type CacheRequest = RequestInfo | URL;
|
|
10
|
-
type 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
|
|
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
|
|
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
|
|
35
|
-
declare class CacheStorage
|
|
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
|
|
39
|
-
declare const layer: Layer.Layer<CacheStorage
|
|
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
|
|
40
|
+
export { CacheClient, CacheOperation, CacheOperationError, CacheQueryOptions, CacheRequest, CacheStorage, CacheStorageClient, Cache_d_exports, layer, layerFrom, makeCacheClient, makeClient };
|
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
|
|
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
|
|
67
|
-
type 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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
28
|
-
type
|
|
29
|
-
type ImageDrawOptions
|
|
30
|
-
type
|
|
31
|
-
type
|
|
32
|
-
type
|
|
33
|
-
type
|
|
34
|
-
type
|
|
35
|
-
type
|
|
36
|
-
type
|
|
37
|
-
type
|
|
38
|
-
type
|
|
39
|
-
type
|
|
40
|
-
type
|
|
41
|
-
type
|
|
42
|
-
type
|
|
43
|
-
type 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
|
|
47
|
+
readonly options?: ImageDrawOptions;
|
|
49
48
|
}
|
|
50
49
|
type Step = Data.TaggedEnum<{
|
|
51
50
|
readonly Transform: {
|
|
52
|
-
readonly transform: ImageTransform
|
|
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
|
|
59
|
+
readonly options?: ImageDrawOptions;
|
|
61
60
|
}, {
|
|
62
61
|
readonly _tag: Tag;
|
|
63
62
|
}> | Extract<{
|
|
64
63
|
readonly _tag: "Transform";
|
|
65
|
-
readonly transform: ImageTransform
|
|
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
|
|
72
|
+
readonly options?: ImageDrawOptions;
|
|
74
73
|
} | {
|
|
75
74
|
readonly _tag: "Transform";
|
|
76
|
-
readonly transform: ImageTransform
|
|
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
|
|
81
|
+
readonly options?: ImageDrawOptions;
|
|
83
82
|
} | {
|
|
84
83
|
readonly _tag: "Transform";
|
|
85
|
-
readonly transform: ImageTransform
|
|
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
|
|
89
|
+
readonly options?: ImageDrawOptions;
|
|
91
90
|
} | {
|
|
92
91
|
readonly _tag: "Transform";
|
|
93
|
-
readonly transform: ImageTransform
|
|
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
|
|
98
|
+
readonly options?: ImageDrawOptions;
|
|
100
99
|
} | {
|
|
101
100
|
readonly _tag: "Transform";
|
|
102
|
-
readonly transform: ImageTransform
|
|
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
|
|
107
|
+
readonly options?: ImageDrawOptions;
|
|
109
108
|
}, "_tag">;
|
|
110
109
|
readonly Transform: Data.TaggedEnum.ConstructorFrom<{
|
|
111
110
|
readonly _tag: "Transform";
|
|
112
|
-
readonly transform: ImageTransform
|
|
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
|
|
122
|
-
readonly outputOptions: ImageOutputOptions
|
|
120
|
+
readonly inputOptions?: ImageInputOptions;
|
|
121
|
+
readonly outputOptions: ImageOutputOptions;
|
|
123
122
|
} | {
|
|
124
123
|
readonly text: string;
|
|
125
|
-
readonly textOptions: TextOptions
|
|
126
|
-
readonly outputOptions: ImageOutputOptions
|
|
124
|
+
readonly textOptions: TextOptions;
|
|
125
|
+
readonly outputOptions: ImageOutputOptions;
|
|
127
126
|
};
|
|
128
127
|
interface ImagesTransformationResultClient {
|
|
129
128
|
readonly raw: ImageTransformationResult;
|
|
130
|
-
readonly response: (options?: ImageTransformationResponseOptions
|
|
129
|
+
readonly response: (options?: ImageTransformationResponseOptions) => Effect.Effect<Response, ImagesOperationError>;
|
|
131
130
|
readonly contentType: Effect.Effect<string, ImagesOperationError>;
|
|
132
|
-
readonly image: (options?: ImageTransformationOutputOptions
|
|
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
|
|
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
|
|
139
|
-
readonly update: (options: ImageUpdateOptions
|
|
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
|
|
145
|
-
readonly list: (options?: ImageListOptions
|
|
146
|
-
readonly createDirectUpload: (options?: ImageDirectUploadOptions
|
|
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
|
|
151
|
-
readonly input: (image: ImageInputValue, options?: ImageInputOptions
|
|
152
|
-
readonly text?: (content: string, options: TextOptions
|
|
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
|
|
157
|
-
readonly input: (image: ImageInputValue, options?: ImageInputOptions
|
|
158
|
-
readonly text: (content: string, options: TextOptions
|
|
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
|
|
180
|
-
(steps: Steps, transform: ImageTransform
|
|
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
|
|
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 };
|
package/dist/QueueBinding.d.mts
CHANGED
|
@@ -4,17 +4,16 @@ import { ServiceFreeSchema } from "./RpcDefinition.mjs";
|
|
|
4
4
|
import * as Effect from "effect/Effect";
|
|
5
5
|
import * as S from "effect/Schema";
|
|
6
6
|
import * as Predicate from "effect/Predicate";
|
|
7
|
-
import { MessageSendRequest, Queue, QueueMetrics, QueueSendBatchOptions, QueueSendBatchResponse, QueueSendOptions, QueueSendResponse } from "@cloudflare/workers-types";
|
|
8
7
|
import { Context } from "effect";
|
|
9
8
|
declare namespace QueueBinding_d_exports {
|
|
10
|
-
export { MessageSendRequest
|
|
9
|
+
export { MessageSendRequest, QueueBindingClient, QueueBindingDefinition, QueueMetrics, QueueOperationError, QueueProducer, QueueSendBatchOptions, QueueSendBatchResponse, QueueSendOptions, QueueSendResponse, isQueue, layer, makeClient };
|
|
11
10
|
}
|
|
12
|
-
type
|
|
13
|
-
type
|
|
14
|
-
type QueueSendBatchOptions
|
|
15
|
-
type QueueSendBatchResponse
|
|
16
|
-
type
|
|
17
|
-
type
|
|
11
|
+
type MessageSendRequest<Body> = globalThis.MessageSendRequest<Body>;
|
|
12
|
+
type QueueMetrics = globalThis.QueueMetrics;
|
|
13
|
+
type QueueSendBatchOptions = globalThis.QueueSendBatchOptions;
|
|
14
|
+
type QueueSendBatchResponse = globalThis.QueueSendBatchResponse;
|
|
15
|
+
type QueueSendOptions = globalThis.QueueSendOptions;
|
|
16
|
+
type QueueSendResponse = globalThis.QueueSendResponse;
|
|
18
17
|
type QueueProducer<Body> = Pick<Queue<Body>, "send"> & Partial<Pick<Queue<Body>, "sendBatch" | "metrics">>;
|
|
19
18
|
type QueueCandidate = Parameters<typeof Predicate.isUnknown>[0];
|
|
20
19
|
interface QueueBindingDefinition<Message extends ServiceFreeSchema> {
|
|
@@ -22,9 +21,9 @@ interface QueueBindingDefinition<Message extends ServiceFreeSchema> {
|
|
|
22
21
|
readonly message: Message;
|
|
23
22
|
}
|
|
24
23
|
interface QueueBindingClient<Message extends ServiceFreeSchema> {
|
|
25
|
-
readonly send: (message: S.Schema.Type<Message>, options?: QueueSendOptions
|
|
26
|
-
readonly sendBatch: (messages: Iterable<MessageSendRequest
|
|
27
|
-
readonly metrics: () => Effect.Effect<QueueMetrics
|
|
24
|
+
readonly send: (message: S.Schema.Type<Message>, options?: QueueSendOptions) => Effect.Effect<void, QueueOperationError | S.SchemaError>;
|
|
25
|
+
readonly sendBatch: (messages: Iterable<MessageSendRequest<S.Schema.Type<Message>>>, options?: QueueSendBatchOptions) => Effect.Effect<void, QueueOperationError | S.SchemaError>;
|
|
26
|
+
readonly metrics: () => Effect.Effect<QueueMetrics, QueueOperationError>;
|
|
28
27
|
readonly rawUnsafe: Effect.Effect<QueueProducer<S.Codec.Encoded<Message>>>;
|
|
29
28
|
}
|
|
30
29
|
declare const QueueOperationError_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 & {
|
|
@@ -40,4 +39,4 @@ declare const isQueue: <Body>(value: QueueCandidate) => value is QueueProducer<B
|
|
|
40
39
|
declare const makeClient: <Message extends ServiceFreeSchema>(definition: QueueBindingDefinition<Message>) => ((queue: QueueProducer<S.Codec.Encoded<Message>>) => QueueBindingClient<Message>);
|
|
41
40
|
declare const layer: <Self, Message extends ServiceFreeSchema>(tag: Context.Service<Self, QueueBindingClient<Message>>, definition: QueueBindingDefinition<Message>) => import("effect/Layer").Layer<Self, BindingNotFoundError | BindingValidationError, WorkerEnvironment>;
|
|
42
41
|
//#endregion
|
|
43
|
-
export { MessageSendRequest
|
|
42
|
+
export { MessageSendRequest, QueueBindingClient, QueueBindingDefinition, QueueBinding_d_exports, QueueMetrics, QueueOperationError, QueueProducer, QueueSendBatchOptions, QueueSendBatchResponse, QueueSendOptions, QueueSendResponse, isQueue, layer, makeClient };
|