mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 14:08:11 +00:00
Merge branch 'dev' into freight/feat/fixes-v1
This commit is contained in:
@@ -2,6 +2,9 @@ export interface TelebirrWebhookPayload {
|
||||
merch_order_id: string;
|
||||
payment_order_id: string;
|
||||
trade_status: string;
|
||||
/** Telebirr's webhook (notify) sends the transaction id as camelCase `transId`;
|
||||
* the queryOrder/status-query biz_content uses snake_case `trans_id`. Support both. */
|
||||
transId?: string;
|
||||
trans_id?: string;
|
||||
total_amount?: string;
|
||||
trans_currency?: string;
|
||||
|
||||
@@ -407,6 +407,8 @@ export interface ContractClearanceView {
|
||||
/** Customs risk level assigned by GL ET (import; visible to the customer). */
|
||||
riskLevel?: string | null;
|
||||
riskAssignedAt?: string | null;
|
||||
/** Every risk decision, oldest first; the last entry is the current level. */
|
||||
riskHistory?: RiskAssignmentRecord[];
|
||||
/** Post-arrival additional duty/tax round (import). */
|
||||
secondDuty?: ClearanceSecondDuty | null;
|
||||
importReleaseGranted?: boolean;
|
||||
@@ -440,9 +442,27 @@ export type MilestoneStatus = "PENDING" | "COMPLETED" | "SKIPPED";
|
||||
export const CUSTOMS_RISK_LEVELS = ["GREEN", "YELLOW", "RED"] as const;
|
||||
export type CustomsRiskLevel = (typeof CUSTOMS_RISK_LEVELS)[number];
|
||||
|
||||
/**
|
||||
* One customs risk decision. The level stays correctable until duty is advised
|
||||
* off it and is customer-visible, so every assignment is kept rather than
|
||||
* overwritten.
|
||||
*/
|
||||
export interface RiskAssignmentRecord {
|
||||
level: CustomsRiskLevel;
|
||||
/** The level this replaced; absent on the first assignment. */
|
||||
previousLevel?: CustomsRiskLevel;
|
||||
assignedAt: string;
|
||||
assignedByUserId?: string | null;
|
||||
/** Display name resolved at assignment time, so the trail never shows a UUID. */
|
||||
assignedBy?: string | null;
|
||||
note?: string | null;
|
||||
}
|
||||
|
||||
/** Structured payload carried by RISK_ASSIGNED / DUTY_TAXES_ADVISED milestones. */
|
||||
export interface MilestoneMetadata {
|
||||
riskLevel?: CustomsRiskLevel;
|
||||
/** Every risk decision, oldest first; the last entry matches `riskLevel`. */
|
||||
riskHistory?: RiskAssignmentRecord[];
|
||||
dutyAmount?: number;
|
||||
dutyCurrency?: string;
|
||||
declarationSerial?: string;
|
||||
@@ -729,14 +749,22 @@ export interface CreateContainerUnitDto {
|
||||
containerNumber: string;
|
||||
sealNumber?: string;
|
||||
vgmTons: number;
|
||||
/** Per-container handling opt-ins, entered alongside this container's VGM. */
|
||||
isHazardous?: boolean;
|
||||
isReefer?: boolean;
|
||||
/** This container ships back empty (equipment return). */
|
||||
isReturn?: boolean;
|
||||
}
|
||||
|
||||
export interface CreateBookingContainerLineDto {
|
||||
/** "20ft" | "40ft" — must be in the contract's cargo scope. */
|
||||
containerSize: string;
|
||||
quantity: number;
|
||||
/**
|
||||
* Line totals, derived from the per-unit switches above. The API recomputes
|
||||
* them from `units` whenever any unit carries a flag, so they are only
|
||||
* authoritative for callers that don't send per-unit flags.
|
||||
*/
|
||||
hazardousQuantity?: number;
|
||||
reeferQuantity?: number;
|
||||
/**
|
||||
|
||||
@@ -137,6 +137,8 @@ export enum TrainStatus {
|
||||
InService = "IN_SERVICE",
|
||||
UnderMaintenance = "UNDER_MAINTENANCE",
|
||||
OutOfService = "OUT_OF_SERVICE",
|
||||
/** Parked indefinitely by staff; only allowed with no active schedule. */
|
||||
Deactivated = "DEACTIVATED",
|
||||
}
|
||||
|
||||
export enum CargoType {
|
||||
@@ -779,6 +781,8 @@ export interface ClearanceView {
|
||||
/** Customs risk level assigned by GL ET (import; visible to the customer). */
|
||||
riskLevel?: string | null;
|
||||
riskAssignedAt?: string | null;
|
||||
/** Every risk decision, oldest first; the last entry is the current level. */
|
||||
riskHistory?: import("./contracts").RiskAssignmentRecord[];
|
||||
/** Post-arrival additional duty/tax round (import). */
|
||||
secondDuty?: import("./contracts").ClearanceSecondDuty | null;
|
||||
importReleaseGranted?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user