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, 04:45 UTC
| 1 | import type * as repostspace from "@distilled.cloud/aws/repostspace"; |
| 2 | import * as Binding from "alchemy/Binding"; |
| 3 | import type * as Effect from "effect/Effect"; |
| 4 | import type { Space } from "./Space.ts"; |
| 5 | |
| 6 | export interface BatchAddRoleRequest extends Omit<repostspace.BatchAddRoleInput, "spaceId"> {} |
| 7 | |
| 8 | /** |
| 9 | * Runtime binding for the `BatchAddRole` operation (IAM action |
| 10 | * `repostspace:BatchAddRole` on the space ARN). |
| 11 | * |
| 12 | * Grants a space-level role (`EXPERT`, `MODERATOR`, `ADMINISTRATOR`, or |
| 13 | * `SUPPORTREQUESTOR`) to up to 100 users or groups of the bound |
| 14 | * {@link Space} in one call. Per-accessor failures are reported in the |
| 15 | * output's `errors` list rather than failing the whole call. |
| 16 | * Provide the implementation with |
| 17 | * `Effect.provide(AWS.RePostSpace.BatchAddRoleHttp)`. |
| 18 | * ### Managing Roles |
| 19 | * **Example:** Grant the EXPERT role to users |
| 20 | * ```typescript |
| 21 | * const batchAddRole = yield* AWS.RePostSpace.BatchAddRole(space); |
| 22 | * |
| 23 | * const result = yield* batchAddRole({ |
| 24 | * accessorIds: ["94682c8d-1234-5678-9abc-e001c76e2c44"], |
| 25 | * role: "EXPERT", |
| 26 | * }); |
| 27 | * console.log(result.addedAccessorIds, result.errors); |
| 28 | * ``` |
| 29 | * |
| 30 | * @binding |
| 31 | */ |
| 32 | export interface BatchAddRole extends Binding.Service< |
| 33 | BatchAddRole, |
| 34 | "AWS.RePostSpace.BatchAddRole", |
| 35 | ( |
| 36 | space: Space, |
| 37 | ) => Effect.Effect< |
| 38 | ( |
| 39 | request: BatchAddRoleRequest, |
| 40 | ) => Effect.Effect<repostspace.BatchAddRoleOutput, repostspace.BatchAddRoleError> |
| 41 | > |
| 42 | > {} |
| 43 | export const BatchAddRole = Binding.Service<BatchAddRole>("AWS.RePostSpace.BatchAddRole"); |