import { AutoEncoder } from '@simonbackx/simple-encoding'; import { CartReservedSeat } from '../SeatingPlan.js'; import { CartItem } from './CartItem.js'; import { Order } from './Order.js'; import { Webshop, WebshopPreview } from './Webshop.js'; export declare class Ticket extends AutoEncoder { id: string; scannedAt: Date | null; createdAt: Date; updatedAt: Date; /** * Unique secret (per webshop) that is printed on the ticket and is required for lookups * + inside QR-code */ secret: string; index: number; total: number; seat: CartReservedSeat | null; originalSeat: CartReservedSeat | null; } /** * Ticket extended with the order data. This is * required because the user doesn't have access * to the order. So we need to add the relevant data * */ export declare class TicketPublic extends Ticket { items: CartItem[]; get isSingle(): boolean; getPrice(order?: Order | null): number; getTitle(): string; getChangedSeatString(webshop: Webshop | WebshopPreview, isCustomer: boolean): string | null; getIndexDescriptionString(webshop: Webshop | WebshopPreview): string; getIndexDescription(webshop: Webshop | WebshopPreview): { title: string; value: string; }[]; getSeatingPlanId(): string | null; getIndexText(): string | null; static sort(a: TicketPublic, b: TicketPublic): number; get isValid(): boolean; } /** * Structure if you do have access to the order (needs proof first: be an admin or pass the order id along the request) */ export declare class TicketOrder extends Ticket { /** * The orderId is private for every ticket because it provides access to the order */ orderId: string; /** * itemId is private because access to the order is needed to be able to look it up. */ itemId: string | null; getPublic(order: Order): TicketPublic; } export declare class TicketPublicPrivate extends TicketPublic { /** * Private information */ scannedBy: string | null; deletedAt: Date | null; getPublic(): TicketPublicPrivate; } /** * Structure if you do have access to the order (needs proof first: be an admin or pass the order id along the request) */ export declare class TicketPrivate extends TicketOrder { /** * Private information */ scannedBy: string | null; deletedAt: Date | null; getPublic(order: Order): TicketPublicPrivate; } //# sourceMappingURL=Ticket.d.ts.map