import { Address } from './address'; import { ID } from './id'; import { Item } from './item'; import { Mode } from './mode'; import { Rate } from './rate'; import { Tracker, TrackingStatus } from './tracker'; export interface Shipment { /** Unique identifier */ id?: ID; /** Developer App ID */ appId: ID; /** Account Id provided by Cognito */ accountId: ID; /** Third party Order number. */ platformOrderNumber?: string; /** "test" or "production" */ mode: Mode; /** true for cash on delivery */ cod: boolean; codAmount: number; /** The destination address */ toAddress: Address; /** The origin address */ fromAddress: Address; /** Courier Id unique identifier */ courierId: string; /** The shipper's address, defaults to from_address */ returnAddress?: Address; /** The buyer's address, defaults to to_address */ buyerAddress?: Address; /** The dimensions and weight of the package */ items: Item[]; /** Need to modify it to array as per ART feedback; need to review it */ /** All associated Rate objects */ rates?: Rate[]; /** The specific rate purchased for the shipment, or null if unpurchased or purchased through another mechanism */ selectedRate?: Rate; /** In Easyship rates are recalculated before creating shipment. */ /** delivery days for this service */ minDeliveryDays?: number; /** delivery days for this service */ maxDeliveryDays?: number; /** Set true to create as a return, discussed in more depth below */ isReturn: boolean; /** If purchased, the tracking code will appear here as well as within the Tracker object */ trackingCode?: string; checkpoints?: Tracker[]; /** The current tracking status of the shipment */ status?: TrackingStatus; /** The current status of the shipment refund process. Possible values are "submitted", "refunded", "rejected". */ refundStatus?: RefundStatus; /** user remarks */ remarks?: string; createdAt?: Date; updatedAt?: Date; } export enum RefundStatus { Submitted = 'Submitted', Rejected = 'Rejected', Refunded = 'Refunded' } export interface CancelRequest { trackingCode: string; } export interface UpdateStatusResponse { status: boolean; }