1import type * as qapps from "@distilled.cloud/aws/qapps";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { QApp } from "./QApp.ts";
5
6/**
7 * Request for {@link ListLibraryItems} — `instanceId` is injected from the bound Q App.
8 */
9export interface ListLibraryItemsRequest extends Omit<
10 qapps.ListLibraryItemsInput,
11 "instanceId"
12> {}
13
14/**
15 * Runtime binding for `qapps:ListLibraryItems`.
16 *
17 * Lists the library items published in the bound app's Q Business application environment instance. Provide the implementation with
18 * `Effect.provide(AWS.QApps.ListLibraryItemsHttp)`.
19 * ### Library Items
20 * **Example:** List Library Items
21 * ```typescript
22 * // init — bind the operation to the Q App
23 * const listLibraryItems = yield* AWS.QApps.ListLibraryItems(app);
24 *
25 * // runtime
26 * const page = yield* listLibraryItems({ limit: 25 });
27 * console.log(page.libraryItems?.length);
28 * ```
29 *
30 * @binding
31 */
32export interface ListLibraryItems extends Binding.Service<
33 ListLibraryItems,
34 "AWS.QApps.ListLibraryItems",
35 (
36 app: QApp,
37 ) => Effect.Effect<
38 (
39 request?: ListLibraryItemsRequest,
40 ) => Effect.Effect<
41 qapps.ListLibraryItemsOutput,
42 qapps.ListLibraryItemsError
43 >
44 >
45> {}
46
47export const ListLibraryItems = Binding.Service<ListLibraryItems>(
48 "AWS.QApps.ListLibraryItems",
49);