/** * Reads each mounted app's transactional email catalog from the browser. * * Workspace apps are path-mounted on a single origin, so the browser can call * another app's action endpoint directly and its own session cookie carries the * caller's identity. Fanning out here rather than server-side keeps every app's * existing access checks in force — Dispatch never sees a catalog the signed-in * user could not have loaded themselves. */ export interface AppTransactionalEmail { id: string; app: string; name: string; trigger: string; recipient: string; recipientLabel: string; sender: string; senderLabel: string; /** null when the send log could not be read — not the same as zero sends. */ sent: number | null; failed: number | null; lastSentAt: number | null; } export interface AppEmailCatalog { appId: string; appName: string; appPath: string; emails: AppTransactionalEmail[]; /** Set when this app's catalog could not be read at all. */ error: string | null; /** Set when the catalog loaded but its send counts did not. */ statsError: string | null; } export interface LocalTransactionalEmailCatalog { app: string; statsAvailable: boolean; statsError: string | null; emails: AppTransactionalEmail[]; } export declare function aggregateSharedEmails(local: LocalTransactionalEmailCatalog, appCatalogs: AppEmailCatalog[]): { emails: AppTransactionalEmail[]; statsError: string | null; }; export declare function callAppAction(appPath: string, action: string, params: Record, method: "GET" | "POST"): Promise; export declare function fetchAppEmailCatalog(app: { id: string; name: string; path: string; }, windowDays: number): Promise; export interface EmailPreview { subject: string; html: string; text: string; } /** Render one email's preview with dummy data, from the owning app. */ export declare function fetchEmailPreview(appPath: string, id: string): Promise; //# sourceMappingURL=transactional-emails.d.ts.map