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>
83 lines
2.7 KiB
TypeScript
83 lines
2.7 KiB
TypeScript
import { ShipmentStatus } from '@prisma/client';
|
|
import { PrismaService } from '../prisma/prisma.service';
|
|
import { AdvanceShipmentStatusDto, CreateShipmentDto, UpdateShipmentDto } from './dto/shipment.dto';
|
|
import { NotificationsService } from '../notifications/notifications.service';
|
|
export declare class ShipmentsService {
|
|
private readonly prisma;
|
|
private readonly notifications;
|
|
constructor(prisma: PrismaService, notifications: NotificationsService);
|
|
findAll(status?: ShipmentStatus): Promise<{
|
|
id: string;
|
|
orderId: string;
|
|
orderNumber: string;
|
|
customerName: string;
|
|
carrier: string;
|
|
trackingNumber: string;
|
|
meterage: number;
|
|
status: import("@prisma/client").$Enums.ShipmentStatus;
|
|
shippedAt: string | null;
|
|
deliveredAt: string | null;
|
|
createdAt: string;
|
|
updatedAt: string;
|
|
}[]>;
|
|
findOne(id: string): Promise<{
|
|
id: string;
|
|
orderId: string;
|
|
orderNumber: string;
|
|
customerName: string;
|
|
carrier: string;
|
|
trackingNumber: string;
|
|
meterage: number;
|
|
status: import("@prisma/client").$Enums.ShipmentStatus;
|
|
shippedAt: string | null;
|
|
deliveredAt: string | null;
|
|
createdAt: string;
|
|
updatedAt: string;
|
|
}>;
|
|
create(adminId: string, dto: CreateShipmentDto): Promise<{
|
|
id: string;
|
|
orderId: string;
|
|
orderNumber: string;
|
|
customerName: string;
|
|
carrier: string;
|
|
trackingNumber: string;
|
|
meterage: number;
|
|
status: import("@prisma/client").$Enums.ShipmentStatus;
|
|
shippedAt: string | null;
|
|
deliveredAt: string | null;
|
|
createdAt: string;
|
|
updatedAt: string;
|
|
}>;
|
|
update(id: string, dto: UpdateShipmentDto): Promise<{
|
|
id: string;
|
|
orderId: string;
|
|
orderNumber: string;
|
|
customerName: string;
|
|
carrier: string;
|
|
trackingNumber: string;
|
|
meterage: number;
|
|
status: import("@prisma/client").$Enums.ShipmentStatus;
|
|
shippedAt: string | null;
|
|
deliveredAt: string | null;
|
|
createdAt: string;
|
|
updatedAt: string;
|
|
}>;
|
|
advanceStatus(id: string, adminId: string, dto: AdvanceShipmentStatusDto): Promise<{
|
|
id: string;
|
|
orderId: string;
|
|
orderNumber: string;
|
|
customerName: string;
|
|
carrier: string;
|
|
trackingNumber: string;
|
|
meterage: number;
|
|
status: import("@prisma/client").$Enums.ShipmentStatus;
|
|
shippedAt: string | null;
|
|
deliveredAt: string | null;
|
|
createdAt: string;
|
|
updatedAt: string;
|
|
}>;
|
|
private notifyOrderStatus;
|
|
private ensure;
|
|
private map;
|
|
}
|