With InvoiceXpress set up (account and API key, sealed), a paid order queues an invoice that the worker issues: created as a draft with our id as proprietary_uid (no duplicates), finalized, emailed to the buyer. Retried with backoff; rejected data or a bad key fails at once and notifies admins. Reverse-charged orders carry the exemption code from the settings (M40 by default). The number and link show on the order in the app and on the buyer's order page; Vendas -> Faturas lists them with a retry. Claude-Session: https://claude.ai/code/session_01HT6iXLYUUp9pJz5Kza9xCW
14 lines
449 B
TypeScript
14 lines
449 B
TypeScript
/** The bell in the app (apps/api/src/notifications). */
|
|
export type NotificationType = "photo_sold" | "order_paid" | "comment_pending" | "payout_paid" | "delivery_failed" | "invoice_failed";
|
|
|
|
export interface NotificationView {
|
|
id: string;
|
|
type: NotificationType;
|
|
organizationId: string | null;
|
|
/** Similar unread notices folded into this one. */
|
|
count: number;
|
|
payload: Record<string, unknown>;
|
|
read: boolean;
|
|
createdAt: string;
|
|
}
|