The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | import type * as mm from "@distilled.cloud/aws/mailmanager"; |
| 2 | import * as Binding from "alchemy/Binding"; |
| 3 | import type * as Effect from "effect/Effect"; |
| 4 | import type { Archive } from "./Archive.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `ses:GetArchiveMessageContent`. |
| 8 | * |
| 9 | * Fetches the parsed text/HTML body of one archived message (by |
| 10 | * `ArchivedMessageId` from a search result). IAM access is granted on |
| 11 | * the bound archive's ARN. Provide the implementation with |
| 12 | * `Effect.provide(AWS.MailManager.GetArchiveMessageContentHttp)`. |
| 13 | * ### Reading Archived Messages |
| 14 | * **Example:** Read a Message Body |
| 15 | * ```typescript |
| 16 | * const getMessageContent = yield* MailManager.GetArchiveMessageContent(archive); |
| 17 | * |
| 18 | * // runtime |
| 19 | * const { Body } = yield* getMessageContent({ ArchivedMessageId }); |
| 20 | * yield* Effect.log(Body?.Text ?? Body?.Html ?? "(malformed)"); |
| 21 | * ``` |
| 22 | * |
| 23 | * @binding |
| 24 | */ |
| 25 | export interface GetArchiveMessageContent extends Binding.Service< |
| 26 | GetArchiveMessageContent, |
| 27 | "AWS.MailManager.GetArchiveMessageContent", |
| 28 | ( |
| 29 | archive: Archive, |
| 30 | ) => Effect.Effect< |
| 31 | ( |
| 32 | request: mm.GetArchiveMessageContentRequest, |
| 33 | ) => Effect.Effect<mm.GetArchiveMessageContentResponse, mm.GetArchiveMessageContentError> |
| 34 | > |
| 35 | > {} |
| 36 | export const GetArchiveMessageContent = Binding.Service<GetArchiveMessageContent>( |
| 37 | "AWS.MailManager.GetArchiveMessageContent", |
| 38 | ); |