Files
fabric_trade_server/dist/notifications/notifications.service.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

62 lines
1.9 KiB
TypeScript

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