The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 06:00 UTC
| 1 | import type * as qbusiness from "@distilled.cloud/aws/qbusiness"; |
| 2 | import * as Binding from "alchemy/Binding"; |
| 3 | import type * as Effect from "effect/Effect"; |
| 4 | import type { Application } from "./Application.ts"; |
| 5 | |
| 6 | /** |
| 7 | * `CreateUser` request with `applicationId` injected from the bound application. |
| 8 | */ |
| 9 | export interface CreateUserRequest extends Omit<qbusiness.CreateUserRequest, "applicationId"> {} |
| 10 | |
| 11 | /** |
| 12 | * Runtime binding for the `CreateUser` operation (IAM action |
| 13 | * `qbusiness:CreateUser`), scoped to one {@link Application}. |
| 14 | * |
| 15 | * Creates a user in the application's user store, mapping the user |
| 16 | * id to data-source-specific aliases used for document access |
| 17 | * control. |
| 18 | * Provide the implementation with |
| 19 | * `Effect.provide(AWS.QBusiness.CreateUserHttp)`. |
| 20 | * |
| 21 | * ### User Management |
| 22 | * **Example:** Create a User with Aliases |
| 23 | * ```typescript |
| 24 | * const createUser = yield* AWS.QBusiness.CreateUser(app); |
| 25 | * |
| 26 | * yield* createUser({ |
| 27 | * userId: "user@example.com", |
| 28 | * userAliases: [{ userId: "corp\\user" }], |
| 29 | * }); |
| 30 | * ``` |
| 31 | * |
| 32 | * @binding |
| 33 | */ |
| 34 | export interface CreateUser extends Binding.Service< |
| 35 | CreateUser, |
| 36 | "AWS.QBusiness.CreateUser", |
| 37 | ( |
| 38 | application: Application, |
| 39 | ) => Effect.Effect< |
| 40 | ( |
| 41 | request: CreateUserRequest, |
| 42 | ) => Effect.Effect<qbusiness.CreateUserResponse, qbusiness.CreateUserError> |
| 43 | > |
| 44 | > {} |
| 45 | export const CreateUser = Binding.Service<CreateUser>("AWS.QBusiness.CreateUser"); |