| 1 | import type * as repostspace from "@distilled.cloud/aws/repostspace"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Space } from "./Space.ts"; |
| 5 | |
| 6 | export interface GetChannelRequest extends Omit< |
| 7 | repostspace.GetChannelInput, |
| 8 | "spaceId" |
| 9 | > {} |
| 10 | |
| 11 | /** |
| 12 | * Runtime binding for the `GetChannel` operation (IAM action |
| 13 | * `repostspace:GetChannel` on the space ARN). |
| 14 | * |
| 15 | * Reads a channel of the bound {@link Space} — its name, description, |
| 16 | * status, and per-accessor channel roles. |
| 17 | * Provide the implementation with |
| 18 | * `Effect.provide(AWS.RePostSpace.GetChannelHttp)`. |
| 19 | * ### Managing Channels |
| 20 | * **Example:** Read a channel |
| 21 | * ```typescript |
| 22 | * const getChannel = yield* AWS.RePostSpace.GetChannel(space); |
| 23 | * |
| 24 | * const channel = yield* getChannel({ channelId }); |
| 25 | * console.log(channel.channelName, channel.channelStatus); |
| 26 | * ``` |
| 27 | * |
| 28 | * @binding |
| 29 | */ |
| 30 | export interface GetChannel extends Binding.Service< |
| 31 | GetChannel, |
| 32 | "AWS.RePostSpace.GetChannel", |
| 33 | ( |
| 34 | space: Space, |
| 35 | ) => Effect.Effect< |
| 36 | ( |
| 37 | request: GetChannelRequest, |
| 38 | ) => Effect.Effect< |
| 39 | repostspace.GetChannelOutput, |
| 40 | repostspace.GetChannelError |
| 41 | > |
| 42 | > |
| 43 | > {} |
| 44 | export const GetChannel = Binding.Service<GetChannel>( |
| 45 | "AWS.RePostSpace.GetChannel", |
| 46 | ); |