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

main
ts 41 lines 1.28 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 GetLibraryItem} — `instanceId` is injected from the bound Q App.
8 */
9 export interface GetLibraryItemRequest extends Omit<qapps.GetLibraryItemInput, "instanceId"> {}
10
11 /**
12 * Runtime binding for `qapps:GetLibraryItem`.
13 *
14 * Retrieves a library item — its published app version, categories, status, and rating counts. Provide the implementation with
15 * `Effect.provide(AWS.QApps.GetLibraryItemHttp)`.
16 * ### Library Items
17 * **Example:** Read a Library Item
18 * ```typescript
19 * // init — bind the operation to the Q App
20 * const getLibraryItem = yield* AWS.QApps.GetLibraryItem(app);
21 *
22 * // runtime
23 * const item = yield* getLibraryItem({ libraryItemId });
24 * console.log(item.ratingCount);
25 * ```
26 *
27 * @binding
28 */
29 export interface GetLibraryItem extends Binding.Service<
30 GetLibraryItem,
31 "AWS.QApps.GetLibraryItem",
32 (
33 app: QApp,
34 ) => Effect.Effect<
35 (
36 request: GetLibraryItemRequest,
37 ) => Effect.Effect<qapps.GetLibraryItemOutput, qapps.GetLibraryItemError>
38 >
39 > {}
40
41 export const GetLibraryItem = Binding.Service<GetLibraryItem>("AWS.QApps.GetLibraryItem");