The best way to control Claude Code, Codex and more from any computer or phone

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