@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 28 lines 1.04 KB
Raw
1 import * as Binding from "alchemy/Binding";
2 import * as Effect from "effect/Effect";
3 import type { Bucket } from "./Bucket.ts";
4 import type { ReadBucketClient } from "./ReadBucket.ts";
5 import type { StorageBindingOptions } from "./StorageBinding.ts";
6 import type { WriteBucketClient } from "./WriteBucket.ts";
7
8 export interface ReadWriteBucketClient extends ReadBucketClient, WriteBucketClient {}
9 /**
10 * Read and mutate a bucket with one credential granting storage:read and
11 * storage:write, or the Function's injected credentials. No per-bucket policy
12 * is manufactured.
13 *
14 * ### Read and Write
15 * **Example:** Bind uploads during Function initialization
16 * ```typescript
17 * const files = yield* Neon.ReadWriteBucket(uploads);
18 * ```
19 *
20 * @binding
21 * @product Bucket
22 */
23 export interface ReadWriteBucket extends Binding.Service<
24 ReadWriteBucket,
25 "Neon.ReadWriteBucket",
26 (bucket: Bucket, options?: StorageBindingOptions) => Effect.Effect<ReadWriteBucketClient>
27 > {}
28 export const ReadWriteBucket = Binding.Service<ReadWriteBucket>("Neon.ReadWriteBucket");