-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathpublic-result.ts
91 lines (82 loc) · 1.97 KB
/
public-result.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
export type Result = Label;
type LabelStatus = "processing" | "completed" | "error" | "voided";
type Currency = "usd" | "cad" | "aud" | "gbp" | "eur" | "nzd";
type LabelChargeEvent =
| "carrier_default"
| "on_creation"
| "on_carrier_acceptance";
type LabelFormat = "pdf" | "png" | "zpl";
type DisplayScheme = "label" | "qr_code";
type LabelLayout = "4x6" | "letter";
type TrackingStatus = "unknown" | "in_transit" | "error" | "delivered";
type WeightUnit = "pound" | "ounce" | "gram" | "kilogram";
type DimensionUnit = "inch" | "centimeter";
interface Label {
labelId: string;
status: LabelStatus;
shipmentId: string;
shipDate: string;
createdAt: string;
shipmentCost: MonetaryValue;
insuranceCost: MonetaryValue;
trackingNumber: string;
isReturnLabel: boolean;
rmaNumber: string | null;
isInternational: boolean;
batchId: string;
carrierId: string;
chargeEvent: LabelChargeEvent;
serviceCode: string;
packageCode: string;
voided: boolean;
voidedAt: string;
labelFormat: LabelFormat;
displayScheme: DisplayScheme;
labelLayout: LabelLayout;
trackable: boolean;
labelImageId: string | null;
carrierCode: string;
trackingStatus: TrackingStatus;
labelDownload: LabelDownload;
formDownload: Link | null;
insuranceClaim: Link | null;
packages: Package[];
}
interface MonetaryValue {
currency: Currency;
amount: number;
}
interface LabelDownload {
href: string;
pdf: string;
png: string;
zpl: string;
}
interface Link {
href: string;
type: string;
}
interface Package {
packageCode: string;
weight: Weight;
dimensions: Dimensions;
insuredValue: MonetaryValue;
trackingNumber: string;
labelMessages: LabelMessages;
externalPackageId: string;
}
interface Weight {
value: number;
unit: WeightUnit;
}
interface Dimensions {
unit: DimensionUnit;
length: number;
width: number;
height: number;
}
interface LabelMessages {
reference1: string | null;
reference2: string | null;
reference3: string | null;
}