Files
fabric_trade_server/dist/notifications/notification-events.d.ts
T
mohmdsdgandCursor d4aaa8e997 Rebuild order flow: settle after pricing, notifications, and invoice expiry.
Hide prices until admin sends the invoice, enforce status transitions, add customer/admin SMS+in-app notifications, schedule cash invoice reminders, and ship updated dist/prisma-client/deploy-bundle for git-pull deploys.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-09 12:00:13 +03:30

23 lines
1.1 KiB
TypeScript

import { NotificationTone, OrderStatus } from '@prisma/client';
export type CustomerEvent = 'order_submitted' | 'invoice_priced' | 'checks_approved' | 'checks_need_fix' | 'receipt_approved' | 'receipt_rejected' | 'cash_invoice_reminder' | 'cash_invoice_expired' | 'order_preparing' | 'order_ready_to_ship' | 'order_shipped' | 'order_delivered' | 'order_cancelled';
type SmsSwitch = 'smsOrderRegistered' | 'smsPricingReady' | 'smsPaymentReminder' | 'smsCheckReview' | 'smsShippingUpdate' | null;
export type CustomerEventTemplate = {
title: string;
body: (ctx: EventContext) => string;
sms?: (ctx: EventContext) => string;
tone: NotificationTone;
smsSwitch: SmsSwitch;
};
export type EventContext = {
orderNumber: string;
appName: string;
amount?: number | null;
note?: string | null;
deadline?: string | null;
carrier?: string | null;
trackingNumber?: string | null;
};
export declare function eventForStatus(status: OrderStatus): CustomerEvent | null;
export declare const CUSTOMER_EVENTS: Record<CustomerEvent, CustomerEventTemplate>;
export {};