| 1 | import type * as qapps from "@distilled.cloud/aws/qapps"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { QApp } from "./QApp.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Request for {@link ListQApps} — `instanceId` is injected from the bound Q App. |
| 8 | */ |
| 9 | export interface ListQAppsRequest extends Omit< |
| 10 | qapps.ListQAppsInput, |
| 11 | "instanceId" |
| 12 | > {} |
| 13 | |
| 14 | /** |
| 15 | * Runtime binding for `qapps:ListQApps`. |
| 16 | * |
| 17 | * Lists the calling identity's Q Apps in the bound app's Q Business application environment instance. Provide the implementation with |
| 18 | * `Effect.provide(AWS.QApps.ListQAppsHttp)`. |
| 19 | * ### User Inventory |
| 20 | * **Example:** List the User's Q Apps |
| 21 | * ```typescript |
| 22 | * // init — bind the operation to the Q App |
| 23 | * const listQApps = yield* AWS.QApps.ListQApps(app); |
| 24 | * |
| 25 | * // runtime |
| 26 | * const page = yield* listQApps({ limit: 25 }); |
| 27 | * console.log(page.apps.map((a) => a.title)); |
| 28 | * ``` |
| 29 | * |
| 30 | * @binding |
| 31 | */ |
| 32 | export interface ListQApps extends Binding.Service< |
| 33 | ListQApps, |
| 34 | "AWS.QApps.ListQApps", |
| 35 | ( |
| 36 | app: QApp, |
| 37 | ) => Effect.Effect< |
| 38 | ( |
| 39 | request?: ListQAppsRequest, |
| 40 | ) => Effect.Effect<qapps.ListQAppsOutput, qapps.ListQAppsError> |
| 41 | > |
| 42 | > {} |
| 43 | |
| 44 | export const ListQApps = Binding.Service<ListQApps>("AWS.QApps.ListQApps"); |