Files
@kirill.komarov 876513a75e
Deploy / deploy (push) Successful in 17s
еуые
2026-06-15 15:47:19 +05:00

18 lines
636 B
TypeScript
Executable File

export declare const ORDER_STATUSES: readonly [
'DRAFT',
'PENDING_PAYMENT',
'PAID',
'IN_PROGRESS',
'SHIPPED',
'READY_FOR_PICKUP',
'DONE',
'CANCELLED',
]
export type OrderStatus = (typeof ORDER_STATUSES)[number]
export declare const ADMIN_ORDER_TRANSITIONS: Record<string, readonly string[] | { readonly delivery: readonly string[]; readonly pickup: readonly string[] }>
export declare function getNextAdminStatuses(from: string, deliveryType: 'delivery' | 'pickup'): string[]
export declare function canTransitionAdminOrderStatus(order: { status: string; deliveryType: 'delivery' | 'pickup' }, next: string): boolean