| 1 | import type * as notifications from "@distilled.cloud/aws/notifications"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { NotificationConfiguration } from "./NotificationConfiguration.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Request for {@link ListChannels} — the bound configuration's ARN is |
| 8 | * injected automatically. |
| 9 | */ |
| 10 | export interface ListChannelsRequest extends Omit< |
| 11 | notifications.ListChannelsRequest, |
| 12 | "notificationConfigurationArn" |
| 13 | > {} |
| 14 | |
| 15 | /** |
| 16 | * Runtime binding for `notifications:ListChannels`. |
| 17 | * |
| 18 | * List the delivery channel ARNs associated with a notification |
| 19 | * configuration. Provide the implementation with |
| 20 | * `Effect.provide(AWS.Notifications.ListChannelsHttp)`. |
| 21 | * ### Reading Configuration Channels |
| 22 | * **Example:** List a Configuration's Channels |
| 23 | * ```typescript |
| 24 | * // init — bind the operation to the configuration |
| 25 | * const listChannels = yield* AWS.Notifications.ListChannels(config); |
| 26 | * |
| 27 | * // runtime |
| 28 | * const result = yield* listChannels(); |
| 29 | * const channelArns = result.channels; |
| 30 | * ``` |
| 31 | * |
| 32 | * @binding |
| 33 | */ |
| 34 | export interface ListChannels extends Binding.Service< |
| 35 | ListChannels, |
| 36 | "AWS.Notifications.ListChannels", |
| 37 | ( |
| 38 | configuration: NotificationConfiguration, |
| 39 | ) => Effect.Effect< |
| 40 | ( |
| 41 | request?: ListChannelsRequest, |
| 42 | ) => Effect.Effect< |
| 43 | notifications.ListChannelsResponse, |
| 44 | notifications.ListChannelsError |
| 45 | > |
| 46 | > |
| 47 | > {} |
| 48 | |
| 49 | export const ListChannels = Binding.Service<ListChannels>( |
| 50 | "AWS.Notifications.ListChannels", |
| 51 | ); |