1import type * as repostspace from "@distilled.cloud/aws/repostspace";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Space } from "./Space.ts";
5
6export interface BatchAddChannelRoleToAccessorsRequest extends Omit<
7 repostspace.BatchAddChannelRoleToAccessorsInput,
8 "spaceId"
9> {}
10
11/**
12 * Runtime binding for the `BatchAddChannelRoleToAccessors` operation (IAM
13 * action `repostspace:BatchAddChannelRoleToAccessors` on the space ARN).
14 *
15 * Grants a channel-level role (`ASKER`, `EXPERT`, `MODERATOR`, or
16 * `SUPPORTREQUESTOR`) to up to 100 users or groups in a channel of the
17 * bound {@link Space}. Per-accessor failures are reported in the output's
18 * `errors` list rather than failing the whole call.
19 * Provide the implementation with
20 * `Effect.provide(AWS.RePostSpace.BatchAddChannelRoleToAccessorsHttp)`.
21 * ### Managing Roles
22 * **Example:** Grant a channel role to users
23 * ```typescript
24 * const addChannelRole =
25 * yield* AWS.RePostSpace.BatchAddChannelRoleToAccessors(space);
26 *
27 * const result = yield* addChannelRole({
28 * channelId,
29 * accessorIds: ["94682c8d-1234-5678-9abc-e001c76e2c44"],
30 * channelRole: "EXPERT",
31 * });
32 * ```
33 *
34 * @binding
35 */
36export interface BatchAddChannelRoleToAccessors extends Binding.Service<
37 BatchAddChannelRoleToAccessors,
38 "AWS.RePostSpace.BatchAddChannelRoleToAccessors",
39 (
40 space: Space,
41 ) => Effect.Effect<
42 (
43 request: BatchAddChannelRoleToAccessorsRequest,
44 ) => Effect.Effect<
45 repostspace.BatchAddChannelRoleToAccessorsOutput,
46 repostspace.BatchAddChannelRoleToAccessorsError
47 >
48 >
49> {}
50export const BatchAddChannelRoleToAccessors =
51 Binding.Service<BatchAddChannelRoleToAccessors>(
52 "AWS.RePostSpace.BatchAddChannelRoleToAccessors",
53 );