| 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 AssociateQAppWithUser} — `instanceId` and `appId` are injected from the bound Q App. |
| 8 | */ |
| 9 | export interface AssociateQAppWithUserRequest extends Omit< |
| 10 | qapps.AssociateQAppWithUserInput, |
| 11 | "instanceId" | "appId" |
| 12 | > {} |
| 13 | |
| 14 | /** |
| 15 | * Runtime binding for `qapps:AssociateQAppWithUser`. |
| 16 | * |
| 17 | * Links the calling identity to the bound Q App, marking it as a favorite in the user's inventory. Provide the implementation with |
| 18 | * `Effect.provide(AWS.QApps.AssociateQAppWithUserHttp)`. |
| 19 | * ### User Inventory |
| 20 | * **Example:** Favorite the App |
| 21 | * ```typescript |
| 22 | * // init — bind the operation to the Q App |
| 23 | * const associateQAppWithUser = yield* AWS.QApps.AssociateQAppWithUser(app); |
| 24 | * |
| 25 | * // runtime |
| 26 | * yield* associateQAppWithUser(); |
| 27 | * ``` |
| 28 | * |
| 29 | * @binding |
| 30 | */ |
| 31 | export interface AssociateQAppWithUser extends Binding.Service< |
| 32 | AssociateQAppWithUser, |
| 33 | "AWS.QApps.AssociateQAppWithUser", |
| 34 | ( |
| 35 | app: QApp, |
| 36 | ) => Effect.Effect< |
| 37 | ( |
| 38 | request?: AssociateQAppWithUserRequest, |
| 39 | ) => Effect.Effect< |
| 40 | qapps.AssociateQAppWithUserResponse, |
| 41 | qapps.AssociateQAppWithUserError |
| 42 | > |
| 43 | > |
| 44 | > {} |
| 45 | |
| 46 | export const AssociateQAppWithUser = Binding.Service<AssociateQAppWithUser>( |
| 47 | "AWS.QApps.AssociateQAppWithUser", |
| 48 | ); |