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

main
ts 43 lines 1.16 KB
Raw
1 import type * as S3 from "@distilled.cloud/aws/s3";
2 import * as Binding from "alchemy/Binding";
3 import type { RuntimeContext } from "alchemy/RuntimeContext";
4 import type * as Effect from "effect/Effect";
5 import type { Bucket } from "./Bucket.ts";
6 import type { TigrisCredentialsMissing } from "./Errors.ts";
7
8 export interface HeadObjectRequest extends Omit<S3.HeadObjectRequest, "Bucket"> {}
9
10 /**
11 * Runtime binding for Tigris `HeadObject` over the S3 API.
12 *
13 * Bind this operation to a {@link Bucket} in Service init. Provide
14 * {@link HeadObjectHttp}.
15 *
16 *
17 * ### Inspecting Objects
18 * **Example:** Check an Object's Metadata
19 * ```typescript
20 * const headObject = yield* Fly.HeadObject(Data);
21 * const head = yield* headObject({ Key: "hello.txt" });
22 * ```
23 *
24 * @binding
25 * @product Bucket
26 */
27 export interface HeadObject extends Binding.Service<
28 HeadObject,
29 "Fly.HeadObject",
30 (
31 bucket: Bucket,
32 ) => Effect.Effect<
33 (
34 request: HeadObjectRequest,
35 ) => Effect.Effect<
36 S3.HeadObjectOutput,
37 S3.HeadObjectError | TigrisCredentialsMissing,
38 RuntimeContext
39 >
40 >
41 > {}
42
43 export const HeadObject = Binding.Service<HeadObject>("Fly.HeadObject");