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

main
ts 46 lines 1.34 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 UpdateQAppSession} — `instanceId` is injected from the bound Q App.
8 */
9 export interface UpdateQAppSessionRequest extends Omit<
10 qapps.UpdateQAppSessionInput,
11 "instanceId" | "appId"
12 > {}
13
14 /**
15 * Runtime binding for `qapps:UpdateQAppSession`.
16 *
17 * Submits new card values into a running Q App session (e.g. answers a text-input card). Provide the implementation with
18 * `Effect.provide(AWS.QApps.UpdateQAppSessionHttp)`.
19 * ### Sessions
20 * **Example:** Submit Card Values
21 * ```typescript
22 * // init — bind the operation to the Q App
23 * const updateQAppSession = yield* AWS.QApps.UpdateQAppSession(app);
24 *
25 * // runtime
26 * yield* updateQAppSession({
27 * sessionId,
28 * values: [{ cardId, value: "Hello, Q Apps!" }],
29 * });
30 * ```
31 *
32 * @binding
33 */
34 export interface UpdateQAppSession extends Binding.Service<
35 UpdateQAppSession,
36 "AWS.QApps.UpdateQAppSession",
37 (
38 app: QApp,
39 ) => Effect.Effect<
40 (
41 request: UpdateQAppSessionRequest,
42 ) => Effect.Effect<qapps.UpdateQAppSessionOutput, qapps.UpdateQAppSessionError>
43 >
44 > {}
45
46 export const UpdateQAppSession = Binding.Service<UpdateQAppSession>("AWS.QApps.UpdateQAppSession");