import { type Token } from "../core.js"; import { type DomainRef, type FolderRef } from "../refs.js"; import type { DomainHandle } from "./domain.js"; import type { FolderHandle } from "./folder.js"; /** SMTP-deliverable mailbox flavours. `outlook` is refused by the create API. */ export type MailboxType = "google" | "shared" | "private"; export type MailboxSpec = { /** Sending domain this mailbox lives on — a handle or a `domainRef(uuid)`. */ domain: DomainHandle | DomainRef; type: MailboxType; /** * Local part of the address (`jane` in `jane@acme-outreach.com`). Defaults * to the slug. Letters, digits, dots, dashes and underscores; 1–64 chars. */ username?: string; /** Sender first name shown in the From header. */ firstName: string; /** Sender last name shown in the From header. */ lastName: string; /** HTML signature stored on the mailbox. Omit to leave whatever is live. */ signature?: string; /** Folder of kind `mailbox`, or a `folderRef(uuid)`. */ folder?: FolderHandle | FolderRef; /** * Bind to the mailbox this workspace already owns at `username@domain` * instead of provisioning a new one — for a mailbox created in the Cargo UI, * or by an earlier deploy whose state file was lost. `destroy` then releases * it rather than deleting an inbox the deploy never paid for. Fails when * nothing holds that address: adopting never falls back to creating. */ adopt?: boolean; }; export type MailboxHandle = { readonly slug: string; readonly uuid: Token; readonly resource: "mailbox"; }; export declare function defineMailbox(slug: string, spec: MailboxSpec): MailboxHandle; //# sourceMappingURL=mailbox.d.ts.map