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 CreateChannelRequest extends Omit<
7 repostspace.CreateChannelInput,
8 "spaceId"
9> {}
10
11/**
12 * Runtime binding for the `CreateChannel` operation (IAM action
13 * `repostspace:CreateChannel` on the space ARN).
14 *
15 * Creates a channel — a topic-scoped area for questions and articles —
16 * inside the bound {@link Space}. Channels are content organization and
17 * cannot be deleted (the re:Post Private API has no `DeleteChannel`), so
18 * they are modeled as a runtime capability rather than a Resource.
19 * Provide the implementation with
20 * `Effect.provide(AWS.RePostSpace.CreateChannelHttp)`.
21 * ### Managing Channels
22 * **Example:** Create a channel in the private re:Post
23 * ```typescript
24 * const createChannel = yield* AWS.RePostSpace.CreateChannel(space);
25 *
26 * const { channelId } = yield* createChannel({
27 * channelName: "Networking",
28 * channelDescription: "VPC, DNS, and connectivity questions",
29 * });
30 * ```
31 *
32 * @binding
33 */
34export interface CreateChannel extends Binding.Service<
35 CreateChannel,
36 "AWS.RePostSpace.CreateChannel",
37 (
38 space: Space,
39 ) => Effect.Effect<
40 (
41 request: CreateChannelRequest,
42 ) => Effect.Effect<
43 repostspace.CreateChannelOutput,
44 repostspace.CreateChannelError
45 >
46 >
47> {}
48export const CreateChannel = Binding.Service<CreateChannel>(
49 "AWS.RePostSpace.CreateChannel",
50);