@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

main
ts 37 lines 1.22 KB
Raw
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:GetArchiveMessage`.
8 *
9 * Fetches a pre-signed download link, envelope, and ingress metadata
10 * for one archived message (by `ArchivedMessageId` from a search
11 * result). IAM access is granted on the bound archive's ARN. Provide the implementation with
12 * `Effect.provide(AWS.MailManager.GetArchiveMessageHttp)`.
13 * ### Reading Archived Messages
14 * **Example:** Download an Archived Message
15 * ```typescript
16 * const getMessage = yield* MailManager.GetArchiveMessage(archive);
17 *
18 * // runtime
19 * const { MessageDownloadLink, Envelope } = yield* getMessage({ ArchivedMessageId });
20 * ```
21 *
22 * @binding
23 */
24 export interface GetArchiveMessage extends Binding.Service<
25 GetArchiveMessage,
26 "AWS.MailManager.GetArchiveMessage",
27 (
28 archive: Archive,
29 ) => Effect.Effect<
30 (
31 request: mm.GetArchiveMessageRequest,
32 ) => Effect.Effect<mm.GetArchiveMessageResponse, mm.GetArchiveMessageError>
33 >
34 > {}
35 export const GetArchiveMessage = Binding.Service<GetArchiveMessage>(
36 "AWS.MailManager.GetArchiveMessage",
37 );