| 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 SendInvitesRequest extends Omit< |
| 7 | repostspace.SendInvitesInput, |
| 8 | "spaceId" |
| 9 | > {} |
| 10 | |
| 11 | /** |
| 12 | * Runtime binding for the `SendInvites` operation (IAM action |
| 13 | * `repostspace:SendInvites` on the space ARN). |
| 14 | * |
| 15 | * Sends invitation emails (with a custom title and body) to users or |
| 16 | * groups of the bound {@link Space}, identified by their IAM Identity |
| 17 | * Center accessor ids. |
| 18 | * Provide the implementation with |
| 19 | * `Effect.provide(AWS.RePostSpace.SendInvitesHttp)`. |
| 20 | * ### Inviting Users |
| 21 | * **Example:** Invite users to the private re:Post |
| 22 | * ```typescript |
| 23 | * const sendInvites = yield* AWS.RePostSpace.SendInvites(space); |
| 24 | * |
| 25 | * yield* sendInvites({ |
| 26 | * accessorIds: ["94682c8d-1234-5678-9abc-e001c76e2c44"], |
| 27 | * title: "Join our internal re:Post", |
| 28 | * body: "Ask and answer questions about our AWS workloads.", |
| 29 | * }); |
| 30 | * ``` |
| 31 | * |
| 32 | * @binding |
| 33 | */ |
| 34 | export interface SendInvites extends Binding.Service< |
| 35 | SendInvites, |
| 36 | "AWS.RePostSpace.SendInvites", |
| 37 | ( |
| 38 | space: Space, |
| 39 | ) => Effect.Effect< |
| 40 | ( |
| 41 | request: SendInvitesRequest, |
| 42 | ) => Effect.Effect< |
| 43 | repostspace.SendInvitesResponse, |
| 44 | repostspace.SendInvitesError |
| 45 | > |
| 46 | > |
| 47 | > {} |
| 48 | export const SendInvites = Binding.Service<SendInvites>( |
| 49 | "AWS.RePostSpace.SendInvites", |
| 50 | ); |