@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 52 lines 1.45 KB
Raw
1 import type * as qapps from "@distilled.cloud/aws/qapps";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { QApp } from "./QApp.ts";
5
6 /**
7 * Request for {@link CreatePresignedUrl} — `instanceId` and `appId` are injected from the bound Q App.
8 */
9 export interface CreatePresignedUrlRequest extends Omit<
10 qapps.CreatePresignedUrlInput,
11 "instanceId" | "appId"
12 > {}
13
14 /**
15 * Runtime binding for `qapps:CreatePresignedUrl`.
16 *
17 * Creates a presigned upload URL for a file-upload card of the bound Q App. Provide the implementation with
18 * `Effect.provide(AWS.QApps.CreatePresignedUrlHttp)`.
19 * ### Files
20 * **Example:** Create a Presigned Upload URL
21 * ```typescript
22 * // init — bind the operation to the Q App
23 * const createPresignedUrl = yield* AWS.QApps.CreatePresignedUrl(app);
24 *
25 * // runtime
26 * const upload = yield* createPresignedUrl({
27 * cardId,
28 * fileContentsSha256,
29 * fileName: "report.pdf",
30 * scope: "SESSION",
31 * sessionId,
32 * });
33 * console.log(upload.presignedUrl);
34 * ```
35 *
36 * @binding
37 */
38 export interface CreatePresignedUrl extends Binding.Service<
39 CreatePresignedUrl,
40 "AWS.QApps.CreatePresignedUrl",
41 (
42 app: QApp,
43 ) => Effect.Effect<
44 (
45 request: CreatePresignedUrlRequest,
46 ) => Effect.Effect<qapps.CreatePresignedUrlOutput, qapps.CreatePresignedUrlError>
47 >
48 > {}
49
50 export const CreatePresignedUrl = Binding.Service<CreatePresignedUrl>(
51 "AWS.QApps.CreatePresignedUrl",
52 );