Files
photoreport/packages/contracts/src/notifications.ts
spark 78dfd5cc3d
ci / rust (push) Successful in 7m1s
ci / typescript (push) Failing after 9m5s
Invoicing through InvoiceXpress: a certified invoice-receipt for every paid order
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
2026-10-13 04:46:09 +01:00

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;
}