-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathpublic.ts
158 lines (130 loc) · 2.86 KB
/
public.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
export type Params = { trackingNumber: string; carrierCode: string };
export type Result = TrackByCarrierCodeAndTrackingNumberResult;
/**
* The Tracking information and events associated with a label
* @see https://www.shipengine.com/docs/tracking/track-by-label-id/
*/
interface TrackByCarrierCodeAndTrackingNumberResult {
/**
* A tracking number for a package. The format depends on the carrier.
*/
trackingNumber: string;
/**
* Status Code
*/
statusCode: "AC" | "IT" | "DE" | "EX" | "AT" | "UN";
/**
* Status Description
*/
statusDescription:
| "Accepted"
| "Attempted Delivery"
| "Delivered"
| "Exception"
| "In Transit"
| "Unknown";
/**
* Carrier Detail Code
*/
carrierDetailCode: string | null;
/**
* Carrier Status Code
*/
carrierStatusCode: string;
/**
* Carrier Status Description
*/
carrierStatusDescription: string | null;
/**
* An ISO 8601 string that represents a date and time.
* @see https://en.wikipedia.org/wiki/ISO_8601
*/
shipDate: string | null;
/**
* An ISO 8601 string that represents a date and time.
* @see https://en.wikipedia.org/wiki/ISO_8601
*/
estimatedDeliveryDate: string;
/**
* An ISO 8601 string that represents a date and time.
* @see https://en.wikipedia.org/wiki/ISO_8601
*/
actualDeliveryDate: string | null;
/**
* Exception description
*/
exceptionDescription: string | null;
/**
* The events that have occured during the lifetime of this tracking number.
*/
events: TrackingEvent[];
}
/**
* The events that have occurred during the lifetime of this tracking number.
*
* @see https://www.shipengine.com/docs/tracking/track-by-label-id/
*/
interface TrackingEvent {
/**
* Timestamp for carrier event
*/
occurredAt: string;
/**
* Carrier timestamp for the event, it is assumed to be the local time of where the event occurred.
*/
carrierOccurredAt: string | null;
/**
* Event description
*/
description: string | null;
/**
* City Locality
*/
cityLocality: string;
/**
* State Province
*/
stateProvince: string;
/**
* Postal Code
*/
postalCode: string;
/**
* The ISO 3166 country code
*
* @see https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes
*/
countryCode: string | null;
/**
* Company Name
*/
companyName: string | null;
/**
* Signer information
*/
signer: string | null;
/**
* Event Code
*/
eventCode: string | null;
/**
* Event status code
*/
statusCode: string | null;
/**
* Carrier Status Code
*/
carrierStatusCode: string | null;
/**
* Carrier Detail Code
*/
carrierDetailCode: string | null;
/**
* Latitude coordinate of tracking event
*/
latitude: number | null;
/**
* Longitude coordinate of tracking event
*/
longitude: number | null;
}