| 1 | import type * as qbusiness from "@distilled.cloud/aws/qbusiness"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Application } from "./Application.ts"; |
| 5 | |
| 6 | /** |
| 7 | * `GetUser` request with `applicationId` injected from the bound application. |
| 8 | */ |
| 9 | export interface GetUserRequest extends Omit< |
| 10 | qbusiness.GetUserRequest, |
| 11 | "applicationId" |
| 12 | > {} |
| 13 | |
| 14 | /** |
| 15 | * Runtime binding for the `GetUser` operation (IAM action |
| 16 | * `qbusiness:GetUser`), scoped to one {@link Application}. |
| 17 | * |
| 18 | * Reads a user's alias mappings from the application user store. |
| 19 | * Provide the implementation with |
| 20 | * `Effect.provide(AWS.QBusiness.GetUserHttp)`. |
| 21 | * |
| 22 | * ### User Management |
| 23 | * **Example:** Read a User |
| 24 | * ```typescript |
| 25 | * const getUser = yield* AWS.QBusiness.GetUser(app); |
| 26 | * |
| 27 | * const { userAliases } = yield* getUser({ userId: "user@example.com" }); |
| 28 | * ``` |
| 29 | * |
| 30 | * @binding |
| 31 | */ |
| 32 | export interface GetUser extends Binding.Service< |
| 33 | GetUser, |
| 34 | "AWS.QBusiness.GetUser", |
| 35 | ( |
| 36 | application: Application, |
| 37 | ) => Effect.Effect< |
| 38 | ( |
| 39 | request: GetUserRequest, |
| 40 | ) => Effect.Effect<qbusiness.GetUserResponse, qbusiness.GetUserError> |
| 41 | > |
| 42 | > {} |
| 43 | export const GetUser = Binding.Service<GetUser>("AWS.QBusiness.GetUser"); |