@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 47 lines 1.42 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 CreateLibraryItem} — `instanceId` and `appId` are injected from the bound Q App.
8 */
9 export interface CreateLibraryItemRequest extends Omit<
10 qapps.CreateLibraryItemInput,
11 "instanceId" | "appId"
12 > {}
13
14 /**
15 * Runtime binding for `qapps:CreateLibraryItem`.
16 *
17 * Publishes a version of the bound Q App into the instance's library so other users can discover and run it. Provide the implementation with
18 * `Effect.provide(AWS.QApps.CreateLibraryItemHttp)`.
19 * ### Library Items
20 * **Example:** Publish the App to the Library
21 * ```typescript
22 * // init — bind the operation to the Q App
23 * const createLibraryItem = yield* AWS.QApps.CreateLibraryItem(app);
24 *
25 * // runtime
26 * const item = yield* createLibraryItem({
27 * appVersion: 1,
28 * categories: [categoryId],
29 * });
30 * console.log(item.libraryItemId);
31 * ```
32 *
33 * @binding
34 */
35 export interface CreateLibraryItem extends Binding.Service<
36 CreateLibraryItem,
37 "AWS.QApps.CreateLibraryItem",
38 (
39 app: QApp,
40 ) => Effect.Effect<
41 (
42 request: CreateLibraryItemRequest,
43 ) => Effect.Effect<qapps.CreateLibraryItemOutput, qapps.CreateLibraryItemError>
44 >
45 > {}
46
47 export const CreateLibraryItem = Binding.Service<CreateLibraryItem>("AWS.QApps.CreateLibraryItem");