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>
This commit is contained in:
+61
@@ -0,0 +1,61 @@
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
import { NotificationTone } from '@prisma/client';
|
||||
import { PrismaService } from '../prisma/prisma.service';
|
||||
import { SmsService } from '../sms/sms.service';
|
||||
import { type CustomerEvent } from './notification-events';
|
||||
type NotifyOptions = {
|
||||
amount?: number | null;
|
||||
note?: string | null;
|
||||
carrier?: string | null;
|
||||
trackingNumber?: string | null;
|
||||
};
|
||||
export declare class NotificationsService {
|
||||
private readonly prisma;
|
||||
private readonly sms;
|
||||
private readonly config;
|
||||
private readonly logger;
|
||||
constructor(prisma: PrismaService, sms: SmsService, config: ConfigService);
|
||||
notifyOrderEvent(orderId: string, event: CustomerEvent, options?: NotifyOptions): Promise<void>;
|
||||
dispatchOrderEvent(orderId: string, event: CustomerEvent, options?: NotifyOptions): void;
|
||||
notifyAdmin(input: {
|
||||
title: string;
|
||||
body: string;
|
||||
tone?: NotificationTone;
|
||||
link?: string;
|
||||
}): Promise<void>;
|
||||
dispatchAdmin(input: {
|
||||
title: string;
|
||||
body: string;
|
||||
tone?: NotificationTone;
|
||||
link?: string;
|
||||
}): void;
|
||||
listForCustomer(customerId: string, limit?: number): Promise<{
|
||||
id: string;
|
||||
orderId: string | undefined;
|
||||
event: string;
|
||||
title: string;
|
||||
body: string;
|
||||
tone: import("@prisma/client").$Enums.NotificationTone;
|
||||
link: string | undefined;
|
||||
isRead: boolean;
|
||||
sentAt: string;
|
||||
}[]>;
|
||||
unreadCount(customerId: string): Promise<{
|
||||
count: number;
|
||||
}>;
|
||||
markRead(customerId: string, id: string): Promise<{
|
||||
count: number;
|
||||
}>;
|
||||
markAllRead(customerId: string): Promise<{
|
||||
count: number;
|
||||
}>;
|
||||
markAdminRead(id: string): Promise<{
|
||||
ok: boolean;
|
||||
}>;
|
||||
markAllAdminRead(): Promise<{
|
||||
ok: boolean;
|
||||
}>;
|
||||
private appName;
|
||||
private isSmsEventEnabled;
|
||||
}
|
||||
export {};
|
||||
Reference in New Issue
Block a user