| 1 | import type * as chatbot from "@distilled.cloud/aws/chatbot"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `chatbot:DescribeSlackWorkspaces`. |
| 7 | * |
| 8 | * Lists the Slack workspaces authorized with AWS Chatbot in the account — |
| 9 | * useful for identity/workspace audit automation. Provide the |
| 10 | * implementation with |
| 11 | * `Effect.provide(AWS.Chatbot.DescribeSlackWorkspacesHttp)`. |
| 12 | * ### Slack Identity Management |
| 13 | * **Example:** List authorized Slack workspaces |
| 14 | * ```typescript |
| 15 | * const describeSlackWorkspaces = |
| 16 | * yield* AWS.Chatbot.DescribeSlackWorkspaces(); |
| 17 | * const result = yield* describeSlackWorkspaces(); |
| 18 | * const teamIds = (result.SlackWorkspaces ?? []).map((w) => w.SlackTeamId); |
| 19 | * ``` |
| 20 | * |
| 21 | * @binding |
| 22 | */ |
| 23 | export interface DescribeSlackWorkspaces extends Binding.Service< |
| 24 | DescribeSlackWorkspaces, |
| 25 | "AWS.Chatbot.DescribeSlackWorkspaces", |
| 26 | () => Effect.Effect< |
| 27 | ( |
| 28 | request?: chatbot.DescribeSlackWorkspacesRequest, |
| 29 | ) => Effect.Effect< |
| 30 | chatbot.DescribeSlackWorkspacesResult, |
| 31 | chatbot.DescribeSlackWorkspacesError |
| 32 | > |
| 33 | > |
| 34 | > {} |
| 35 | |
| 36 | export const DescribeSlackWorkspaces = Binding.Service<DescribeSlackWorkspaces>( |
| 37 | "AWS.Chatbot.DescribeSlackWorkspaces", |
| 38 | ); |