| 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 | * `UpdateUser` request with `applicationId` injected from the bound application. |
| 8 | */ |
| 9 | export interface UpdateUserRequest extends Omit< |
| 10 | qbusiness.UpdateUserRequest, |
| 11 | "applicationId" |
| 12 | > {} |
| 13 | |
| 14 | /** |
| 15 | * Runtime binding for the `UpdateUser` operation (IAM action |
| 16 | * `qbusiness:UpdateUser`), scoped to one {@link Application}. |
| 17 | * |
| 18 | * Adds and removes alias mappings for a user. |
| 19 | * Provide the implementation with |
| 20 | * `Effect.provide(AWS.QBusiness.UpdateUserHttp)`. |
| 21 | * |
| 22 | * ### User Management |
| 23 | * **Example:** Update a User's Aliases |
| 24 | * ```typescript |
| 25 | * const updateUser = yield* AWS.QBusiness.UpdateUser(app); |
| 26 | * |
| 27 | * yield* updateUser({ |
| 28 | * userId: "user@example.com", |
| 29 | * userAliasesToUpdate: [{ userId: "corp\\user" }], |
| 30 | * }); |
| 31 | * ``` |
| 32 | * |
| 33 | * @binding |
| 34 | */ |
| 35 | export interface UpdateUser extends Binding.Service< |
| 36 | UpdateUser, |
| 37 | "AWS.QBusiness.UpdateUser", |
| 38 | ( |
| 39 | application: Application, |
| 40 | ) => Effect.Effect< |
| 41 | ( |
| 42 | request: UpdateUserRequest, |
| 43 | ) => Effect.Effect<qbusiness.UpdateUserResponse, qbusiness.UpdateUserError> |
| 44 | > |
| 45 | > {} |
| 46 | export const UpdateUser = Binding.Service<UpdateUser>( |
| 47 | "AWS.QBusiness.UpdateUser", |
| 48 | ); |