add GL operations for customs risk assignment, duty advising, and incident reporting

This commit is contained in:
Marshal
2026-06-28 16:09:45 +00:00
parent 7c744352d1
commit e1d54746c2
31 changed files with 1879 additions and 29 deletions

View File

@@ -263,6 +263,17 @@ export enum ContractDocPhase {
export type MilestoneStatus = "PENDING" | "COMPLETED" | "SKIPPED";
export const CUSTOMS_RISK_LEVELS = ["GREEN", "YELLOW", "RED"] as const;
export type CustomsRiskLevel = (typeof CUSTOMS_RISK_LEVELS)[number];
/** Structured payload carried by RISK_ASSIGNED / DUTY_TAXES_ADVISED milestones. */
export interface MilestoneMetadata {
riskLevel?: CustomsRiskLevel;
dutyAmount?: number;
dutyCurrency?: string;
declarationSerial?: string;
}
export interface IClearanceMilestone {
id: string;
bookingId?: string | null;
@@ -276,9 +287,31 @@ export interface IClearanceMilestone {
triggeredAt?: string | null;
triggeredByUserId?: string | null;
note?: string | null;
metadata?: MilestoneMetadata | null;
sortOrder: number;
}
// ── GL cargo exception / damage reports (doc §11 GL Import US-07) ────────────
export const INCIDENT_TYPES = [
"SEAL_BROKEN",
"CONTAINER_OPENED",
"CONTAINER_DAMAGED",
"FLUID_LEAKING",
] as const;
export type IncidentType = (typeof INCIDENT_TYPES)[number];
export interface IClearanceIncident {
id: string;
bookingId: string;
incidentType: IncidentType;
description: string;
photoFileIds: string[];
reportedByUserId?: string | null;
reportedAt: string;
createdAt: string;
}
export const IMPORT_MILESTONES = [
"IMPORT_DOCS_UPLOADED",
"PENDING_DOCUMENT_REVIEW",