1import type * as mm from "@distilled.cloud/aws/mailmanager";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import 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 */
24export 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> {}
35export const GetArchiveMessage = Binding.Service<GetArchiveMessage>(
36 "AWS.MailManager.GetArchiveMessage",
37);