@oway/sdk 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +992 -231
- package/dist/index.d.ts +992 -231
- package/dist/index.js +8 -2
- package/dist/index.mjs +8 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,114 +1,3 @@
|
|
|
1
|
-
interface OwayConfig {
|
|
2
|
-
/**
|
|
3
|
-
* M2M Client ID (REQUIRED for all integrations)
|
|
4
|
-
* Provided by Oway Sales Engineering team
|
|
5
|
-
*/
|
|
6
|
-
clientId: string;
|
|
7
|
-
/**
|
|
8
|
-
* M2M Client Secret (REQUIRED for all integrations)
|
|
9
|
-
* Provided by Oway Sales Engineering team
|
|
10
|
-
*/
|
|
11
|
-
clientSecret: string;
|
|
12
|
-
/**
|
|
13
|
-
* Default company API key (optional)
|
|
14
|
-
*
|
|
15
|
-
* Single-company: Set this to your company's API key
|
|
16
|
-
* Multi-company: Omit this and provide per-request
|
|
17
|
-
*
|
|
18
|
-
* Get from: https://app.oway.io/settings/api
|
|
19
|
-
*/
|
|
20
|
-
apiKey?: string;
|
|
21
|
-
/**
|
|
22
|
-
* Base URL for the Oway API
|
|
23
|
-
* @default "https://rest-api.sandbox.oway.io"
|
|
24
|
-
*/
|
|
25
|
-
baseUrl?: string;
|
|
26
|
-
/**
|
|
27
|
-
* Token endpoint for authentication
|
|
28
|
-
* @default "https://rest-api.sandbox.oway.io/v1/auth/token"
|
|
29
|
-
*/
|
|
30
|
-
tokenUrl?: string;
|
|
31
|
-
/**
|
|
32
|
-
* Maximum number of retry attempts for failed requests
|
|
33
|
-
* @default 3
|
|
34
|
-
*/
|
|
35
|
-
maxRetries?: number;
|
|
36
|
-
/**
|
|
37
|
-
* Timeout in milliseconds for API requests
|
|
38
|
-
* @default 30000
|
|
39
|
-
*/
|
|
40
|
-
timeout?: number;
|
|
41
|
-
/**
|
|
42
|
-
* Enable debug logging (logs sanitized request/response metadata)
|
|
43
|
-
* @default false
|
|
44
|
-
*/
|
|
45
|
-
debug?: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* Custom logger implementation
|
|
48
|
-
*/
|
|
49
|
-
logger?: {
|
|
50
|
-
debug: (msg: string, meta?: Record<string, any>) => void;
|
|
51
|
-
info: (msg: string, meta?: Record<string, any>) => void;
|
|
52
|
-
warn: (msg: string, meta?: Record<string, any>) => void;
|
|
53
|
-
error: (msg: string, meta?: Record<string, any>) => void;
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
declare class OwayError extends Error {
|
|
57
|
-
code?: string | undefined;
|
|
58
|
-
statusCode?: number | undefined;
|
|
59
|
-
requestId?: string | undefined;
|
|
60
|
-
constructor(message: string, code?: string | undefined, statusCode?: number | undefined, requestId?: string | undefined);
|
|
61
|
-
/**
|
|
62
|
-
* Determines if this error represents a transient failure that should be retried
|
|
63
|
-
*/
|
|
64
|
-
isRetryable(): boolean;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* HTTP client for making authenticated requests to the Oway API
|
|
68
|
-
*/
|
|
69
|
-
declare class HttpClient {
|
|
70
|
-
private config;
|
|
71
|
-
private accessToken;
|
|
72
|
-
private tokenExpiry;
|
|
73
|
-
private tokenRefreshPromise;
|
|
74
|
-
constructor(config: OwayConfig);
|
|
75
|
-
/**
|
|
76
|
-
* Internal logging with sanitization
|
|
77
|
-
*/
|
|
78
|
-
private log;
|
|
79
|
-
/**
|
|
80
|
-
* Sanitize objects for logging - remove sensitive fields
|
|
81
|
-
*/
|
|
82
|
-
private sanitizeForLogging;
|
|
83
|
-
/**
|
|
84
|
-
* Get or refresh the access token using the API key
|
|
85
|
-
* Handles concurrent requests by queuing them behind a single refresh
|
|
86
|
-
*/
|
|
87
|
-
private getAccessToken;
|
|
88
|
-
/**
|
|
89
|
-
* Perform the actual token refresh using M2M credentials
|
|
90
|
-
*/
|
|
91
|
-
private refreshToken;
|
|
92
|
-
/**
|
|
93
|
-
* Generate a unique request ID
|
|
94
|
-
*/
|
|
95
|
-
private generateRequestId;
|
|
96
|
-
/**
|
|
97
|
-
* Make an authenticated request to the Oway API
|
|
98
|
-
*/
|
|
99
|
-
request<T>(method: string, path: string, options?: {
|
|
100
|
-
query?: Record<string, string | number | boolean>;
|
|
101
|
-
body?: unknown;
|
|
102
|
-
headers?: Record<string, string>;
|
|
103
|
-
requestId?: string;
|
|
104
|
-
companyApiKey?: string;
|
|
105
|
-
}): Promise<T>;
|
|
106
|
-
get<T>(path: string, query?: Record<string, string | number | boolean>, companyApiKey?: string): Promise<T>;
|
|
107
|
-
post<T>(path: string, body?: unknown, companyApiKey?: string): Promise<T>;
|
|
108
|
-
put<T>(path: string, body?: unknown, companyApiKey?: string): Promise<T>;
|
|
109
|
-
delete<T>(path: string, companyApiKey?: string): Promise<T>;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
1
|
/**
|
|
113
2
|
* This file was auto-generated by openapi-typescript.
|
|
114
3
|
* Do not make direct changes to the file.
|
|
@@ -154,15 +43,15 @@ interface paths {
|
|
|
154
43
|
* - `palletCount` - Must be at least 1
|
|
155
44
|
* - `poundsWeight` - Must be between 1 and 2,500 lbs per pallet
|
|
156
45
|
* - `palletDimensions` - Must be valid dimensions within limits (subject to change, these are configurable):
|
|
157
|
-
* - Standard: max
|
|
158
|
-
* - Oversized maximum:
|
|
159
|
-
* - With liftgate: max
|
|
46
|
+
* - Standard: max 60x52x94 inches (LxWxH) - pallets exceeding these are charged as oversized
|
|
47
|
+
* - Oversized maximum: 95x95x96 inches - no pallet can exceed this
|
|
48
|
+
* - With liftgate: max 62x62x94 inches
|
|
160
49
|
*
|
|
161
50
|
* *Component Totals:*
|
|
162
51
|
* - Sum of component `palletCount` must equal order `totalPalletCount`
|
|
163
52
|
* - Sum of component `poundsWeight` must equal order `totalPoundsWeight`
|
|
164
53
|
*/
|
|
165
|
-
put: operations["
|
|
54
|
+
put: operations["confirmShipment"];
|
|
166
55
|
post?: never;
|
|
167
56
|
delete?: never;
|
|
168
57
|
options?: never;
|
|
@@ -182,7 +71,7 @@ interface paths {
|
|
|
182
71
|
* Cancel a shipment by order number
|
|
183
72
|
* @description Cancels an existing shipment using its order number (PRO number). Shipments can only be cancelled when they are in a cancellable state (e.g., before pickup).
|
|
184
73
|
*/
|
|
185
|
-
put: operations["
|
|
74
|
+
put: operations["cancelShipment"];
|
|
186
75
|
post?: never;
|
|
187
76
|
delete?: never;
|
|
188
77
|
options?: never;
|
|
@@ -240,6 +129,77 @@ interface paths {
|
|
|
240
129
|
patch?: never;
|
|
241
130
|
trace?: never;
|
|
242
131
|
};
|
|
132
|
+
"/v1/carrier/{carrierId}/trips": {
|
|
133
|
+
parameters: {
|
|
134
|
+
query?: never;
|
|
135
|
+
header?: never;
|
|
136
|
+
path?: never;
|
|
137
|
+
cookie?: never;
|
|
138
|
+
};
|
|
139
|
+
get?: never;
|
|
140
|
+
put?: never;
|
|
141
|
+
/**
|
|
142
|
+
* Submit trip data
|
|
143
|
+
* @description Submit trip data for carrier vehicles. Each trip must include vehicle ID, trip number, and legs with start/end coordinates and arrival windows.
|
|
144
|
+
*/
|
|
145
|
+
post: operations["addTrips"];
|
|
146
|
+
delete?: never;
|
|
147
|
+
options?: never;
|
|
148
|
+
head?: never;
|
|
149
|
+
patch?: never;
|
|
150
|
+
trace?: never;
|
|
151
|
+
};
|
|
152
|
+
"/v1/carrier/{carrierId}/gps-data": {
|
|
153
|
+
parameters: {
|
|
154
|
+
query?: never;
|
|
155
|
+
header?: never;
|
|
156
|
+
path?: never;
|
|
157
|
+
cookie?: never;
|
|
158
|
+
};
|
|
159
|
+
get?: never;
|
|
160
|
+
put?: never;
|
|
161
|
+
/**
|
|
162
|
+
* Submit GPS data
|
|
163
|
+
* @description Submit GPS location data for carrier vehicles. Each data point must include vehicle ID, coordinates, timestamp, heading, and speed.
|
|
164
|
+
*/
|
|
165
|
+
post: operations["addGpsData"];
|
|
166
|
+
delete?: never;
|
|
167
|
+
options?: never;
|
|
168
|
+
head?: never;
|
|
169
|
+
patch?: never;
|
|
170
|
+
trace?: never;
|
|
171
|
+
};
|
|
172
|
+
"/v1/auth/token": {
|
|
173
|
+
parameters: {
|
|
174
|
+
query?: never;
|
|
175
|
+
header?: never;
|
|
176
|
+
path?: never;
|
|
177
|
+
cookie?: never;
|
|
178
|
+
};
|
|
179
|
+
get?: never;
|
|
180
|
+
put?: never;
|
|
181
|
+
/**
|
|
182
|
+
* Obtain access token
|
|
183
|
+
* @description Exchange client credentials for an access token.
|
|
184
|
+
*
|
|
185
|
+
* The returned token includes scopes that determine API access:
|
|
186
|
+
* - `shipper` scope grants access to `/v1/shipper/**` endpoints
|
|
187
|
+
* - `carrier` scope grants access to `/v1/carrier/**` endpoints
|
|
188
|
+
* - Partners with both scopes can access both APIs with a single token
|
|
189
|
+
*
|
|
190
|
+
* The returned token should be included in subsequent API requests as a Bearer token
|
|
191
|
+
* in the authorization header: `authorization: Bearer {access_token}`
|
|
192
|
+
*
|
|
193
|
+
* Tokens are valid for the duration specified in `expires_in` (seconds).
|
|
194
|
+
* We recommend caching tokens and refreshing them before expiration.
|
|
195
|
+
*/
|
|
196
|
+
post: operations["getToken"];
|
|
197
|
+
delete?: never;
|
|
198
|
+
options?: never;
|
|
199
|
+
head?: never;
|
|
200
|
+
patch?: never;
|
|
201
|
+
trace?: never;
|
|
202
|
+
};
|
|
243
203
|
"/v1/shipper/shipment/{orderNumber}": {
|
|
244
204
|
parameters: {
|
|
245
205
|
query?: never;
|
|
@@ -251,7 +211,7 @@ interface paths {
|
|
|
251
211
|
* Get a shipment by order number
|
|
252
212
|
* @description Retrieves a shipment by its order number (PRO number). The order number is a 5-character alphanumeric code (e.g., ZKYQ5) that uniquely identifies the shipment.
|
|
253
213
|
*/
|
|
254
|
-
get: operations["
|
|
214
|
+
get: operations["getShipment"];
|
|
255
215
|
put?: never;
|
|
256
216
|
post?: never;
|
|
257
217
|
delete?: never;
|
|
@@ -271,7 +231,7 @@ interface paths {
|
|
|
271
231
|
* Track a shipment by order number
|
|
272
232
|
* @description Retrieves tracking information for a shipment by its order number (PRO number). Returns status and estimated/actual pickup and delivery dates.
|
|
273
233
|
*/
|
|
274
|
-
get: operations["
|
|
234
|
+
get: operations["trackShipment"];
|
|
275
235
|
put?: never;
|
|
276
236
|
post?: never;
|
|
277
237
|
delete?: never;
|
|
@@ -315,7 +275,7 @@ interface paths {
|
|
|
315
275
|
* Get a shipment document by order number
|
|
316
276
|
* @description Retrieves a download link for a shipment document using the order number (PRO number). Supported document types: BILL_OF_LADING, INVOICE, SHIPPING_LABEL.
|
|
317
277
|
*/
|
|
318
|
-
get: operations["
|
|
278
|
+
get: operations["getDocument"];
|
|
319
279
|
put?: never;
|
|
320
280
|
post?: never;
|
|
321
281
|
delete?: never;
|
|
@@ -344,6 +304,46 @@ interface paths {
|
|
|
344
304
|
patch?: never;
|
|
345
305
|
trace?: never;
|
|
346
306
|
};
|
|
307
|
+
"/v1/carrier/{carrierId}": {
|
|
308
|
+
parameters: {
|
|
309
|
+
query?: never;
|
|
310
|
+
header?: never;
|
|
311
|
+
path?: never;
|
|
312
|
+
cookie?: never;
|
|
313
|
+
};
|
|
314
|
+
/**
|
|
315
|
+
* Get carrier API configuration
|
|
316
|
+
* @description Retrieves the API configuration for a carrier including company name, API version, and available endpoints.
|
|
317
|
+
*/
|
|
318
|
+
get: operations["getCarrierApiConfig"];
|
|
319
|
+
put?: never;
|
|
320
|
+
post?: never;
|
|
321
|
+
delete?: never;
|
|
322
|
+
options?: never;
|
|
323
|
+
head?: never;
|
|
324
|
+
patch?: never;
|
|
325
|
+
trace?: never;
|
|
326
|
+
};
|
|
327
|
+
"/v1/carrier/{carrierId}/jobs": {
|
|
328
|
+
parameters: {
|
|
329
|
+
query?: never;
|
|
330
|
+
header?: never;
|
|
331
|
+
path?: never;
|
|
332
|
+
cookie?: never;
|
|
333
|
+
};
|
|
334
|
+
/**
|
|
335
|
+
* Get carrier jobs
|
|
336
|
+
* @description Retrieves jobs (offers with order data) for a carrier. Filter by active status and time range.
|
|
337
|
+
*/
|
|
338
|
+
get: operations["getJobs"];
|
|
339
|
+
put?: never;
|
|
340
|
+
post?: never;
|
|
341
|
+
delete?: never;
|
|
342
|
+
options?: never;
|
|
343
|
+
head?: never;
|
|
344
|
+
patch?: never;
|
|
345
|
+
trace?: never;
|
|
346
|
+
};
|
|
347
347
|
}
|
|
348
348
|
interface components {
|
|
349
349
|
schemas: {
|
|
@@ -470,7 +470,7 @@ interface components {
|
|
|
470
470
|
/** @description Request to create a new shipment */
|
|
471
471
|
CreateShipmentRequest: {
|
|
472
472
|
/**
|
|
473
|
-
* @description Optional ID of a previously generated quote.
|
|
473
|
+
* @description Optional ID of a previously generated quote.
|
|
474
474
|
* @example 507f1f77bcf86cd799439013
|
|
475
475
|
*/
|
|
476
476
|
quoteId?: string;
|
|
@@ -506,36 +506,22 @@ interface components {
|
|
|
506
506
|
*/
|
|
507
507
|
requiredDeliveryBy?: string;
|
|
508
508
|
};
|
|
509
|
-
/**
|
|
510
|
-
* @description Individual cargo component in a shipment.
|
|
511
|
-
*
|
|
512
|
-
* **Validation Rules:**
|
|
513
|
-
* - Total weight across all components must equal order totalPoundsWeight
|
|
514
|
-
* - Total pallet count across all components must equal order totalPalletCount
|
|
515
|
-
* - Weight must be between 1 and 2,500 lbs per pallet
|
|
516
|
-
* - Dimensions must be within limits (see palletDimensions field)
|
|
517
|
-
*/
|
|
509
|
+
/** @description A cargo component (pallet group) in a shipment */
|
|
518
510
|
OrderComponent: {
|
|
519
511
|
/**
|
|
520
512
|
* Format: int32
|
|
521
|
-
* @description Number of pallets
|
|
513
|
+
* @description Number of pallets in this component
|
|
522
514
|
* @example 2
|
|
523
515
|
*/
|
|
524
516
|
palletCount: number;
|
|
525
517
|
/**
|
|
526
|
-
* Format:
|
|
527
|
-
* @description
|
|
528
|
-
* @example
|
|
518
|
+
* Format: int32
|
|
519
|
+
* @description Weight per pallet in pounds
|
|
520
|
+
* @example 500
|
|
529
521
|
*/
|
|
530
522
|
poundsWeight: number;
|
|
531
523
|
/**
|
|
532
|
-
* @description Pallet dimensions
|
|
533
|
-
*
|
|
534
|
-
* **Dimension Limits:**
|
|
535
|
-
* - Standard shipments: max 95×95×94 inches
|
|
536
|
-
* - With liftgate accessorial: max 62×62×94 inches
|
|
537
|
-
* - Oversize rule: Both length AND width cannot exceed 60 inches
|
|
538
|
-
* - Minimum: 1×1×1 inches
|
|
524
|
+
* @description Pallet dimensions as [height, length, width] in inches
|
|
539
525
|
* @example [
|
|
540
526
|
* 48,
|
|
541
527
|
* 40,
|
|
@@ -548,14 +534,14 @@ interface components {
|
|
|
548
534
|
QuoteRequest: {
|
|
549
535
|
pickupAddress: components["schemas"]["Address"];
|
|
550
536
|
deliveryAddress: components["schemas"]["Address"];
|
|
551
|
-
/** @description List of pallets or freight pieces.
|
|
537
|
+
/** @description List of pallets or freight pieces. */
|
|
552
538
|
orderComponents: components["schemas"]["OrderComponent"][];
|
|
553
539
|
};
|
|
554
|
-
/** @description Response containing quote
|
|
540
|
+
/** @description Response containing a shipping quote */
|
|
555
541
|
QuoteResponse: {
|
|
556
542
|
/**
|
|
557
|
-
* @description Unique identifier
|
|
558
|
-
* @example
|
|
543
|
+
* @description Unique quote identifier
|
|
544
|
+
* @example 507f1f77bcf86cd799439013
|
|
559
545
|
*/
|
|
560
546
|
id?: string;
|
|
561
547
|
/**
|
|
@@ -566,11 +552,126 @@ interface components {
|
|
|
566
552
|
quotedPriceInCents?: number;
|
|
567
553
|
/**
|
|
568
554
|
* Format: date-time
|
|
569
|
-
* @description
|
|
570
|
-
* @example 2024-12-
|
|
555
|
+
* @description When this quote expires (ISO 8601 format). Quotes are valid for 2 days.
|
|
556
|
+
* @example 2024-12-20T15:30:00Z
|
|
571
557
|
*/
|
|
572
558
|
quoteExpirationTime?: string;
|
|
573
559
|
};
|
|
560
|
+
Trip: {
|
|
561
|
+
id?: string;
|
|
562
|
+
carrierId?: string;
|
|
563
|
+
vehicleId?: string;
|
|
564
|
+
tripNo?: string;
|
|
565
|
+
legs?: components["schemas"]["TripLeg"][];
|
|
566
|
+
/** Format: date-time */
|
|
567
|
+
createdAt?: string;
|
|
568
|
+
/** Format: date-time */
|
|
569
|
+
updatedAt?: string;
|
|
570
|
+
};
|
|
571
|
+
TripLeg: {
|
|
572
|
+
/** Format: double */
|
|
573
|
+
startLat?: number;
|
|
574
|
+
/** Format: double */
|
|
575
|
+
startLong?: number;
|
|
576
|
+
/** Format: date-time */
|
|
577
|
+
startTime?: string;
|
|
578
|
+
/** Format: double */
|
|
579
|
+
endLat?: number;
|
|
580
|
+
/** Format: double */
|
|
581
|
+
endLong?: number;
|
|
582
|
+
/** Format: date-time */
|
|
583
|
+
arrivalWindowStart?: string;
|
|
584
|
+
/** Format: date-time */
|
|
585
|
+
arrivalWindowEnd?: string;
|
|
586
|
+
availableForOffers?: boolean;
|
|
587
|
+
/** Format: int32 */
|
|
588
|
+
estDriveTimeMinutes?: number;
|
|
589
|
+
/** Format: int32 */
|
|
590
|
+
stopNumber?: number;
|
|
591
|
+
};
|
|
592
|
+
/** @description GPS location data point for a vehicle */
|
|
593
|
+
GpsData: {
|
|
594
|
+
/**
|
|
595
|
+
* @description Unique identifier for the vehicle
|
|
596
|
+
* @example TRUCK-001
|
|
597
|
+
*/
|
|
598
|
+
vehicleId: string;
|
|
599
|
+
/**
|
|
600
|
+
* Format: date-time
|
|
601
|
+
* @description Timestamp of the GPS reading (ISO 8601 format). Must not be in the future.
|
|
602
|
+
* @example 2025-02-20T17:33:15Z
|
|
603
|
+
*/
|
|
604
|
+
timestamp: string;
|
|
605
|
+
/**
|
|
606
|
+
* Format: double
|
|
607
|
+
* @description Latitude coordinate
|
|
608
|
+
* @example 33.787363
|
|
609
|
+
*/
|
|
610
|
+
latitude: number;
|
|
611
|
+
/**
|
|
612
|
+
* Format: double
|
|
613
|
+
* @description Longitude coordinate
|
|
614
|
+
* @example -118.163715
|
|
615
|
+
*/
|
|
616
|
+
longitude: number;
|
|
617
|
+
/**
|
|
618
|
+
* Format: int32
|
|
619
|
+
* @description Heading in degrees (0-359, where 0 is North)
|
|
620
|
+
* @example 270
|
|
621
|
+
*/
|
|
622
|
+
heading: number;
|
|
623
|
+
/**
|
|
624
|
+
* Format: int32
|
|
625
|
+
* @description Speed in km/h
|
|
626
|
+
* @example 65
|
|
627
|
+
*/
|
|
628
|
+
speed: number;
|
|
629
|
+
};
|
|
630
|
+
/** @description Token request containing client credentials */
|
|
631
|
+
TokenRequest: {
|
|
632
|
+
/**
|
|
633
|
+
* @description Client ID provided by Oway
|
|
634
|
+
* @example abc123def456
|
|
635
|
+
*/
|
|
636
|
+
clientId: string;
|
|
637
|
+
/**
|
|
638
|
+
* @description Client secret provided by Oway
|
|
639
|
+
* @example secret_xyz789
|
|
640
|
+
*/
|
|
641
|
+
clientSecret: string;
|
|
642
|
+
};
|
|
643
|
+
/** @description Error response for token requests */
|
|
644
|
+
TokenErrorResponse: {
|
|
645
|
+
/**
|
|
646
|
+
* @description Error code
|
|
647
|
+
* @example invalid_client
|
|
648
|
+
*/
|
|
649
|
+
error?: string;
|
|
650
|
+
/**
|
|
651
|
+
* @description Human-readable error description
|
|
652
|
+
* @example Invalid client credentials
|
|
653
|
+
*/
|
|
654
|
+
errorDescription?: string;
|
|
655
|
+
};
|
|
656
|
+
/** @description Successful token response */
|
|
657
|
+
TokenResponse: {
|
|
658
|
+
/**
|
|
659
|
+
* @description The access token to use for API requests
|
|
660
|
+
* @example eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
|
|
661
|
+
*/
|
|
662
|
+
accessToken?: string;
|
|
663
|
+
/**
|
|
664
|
+
* @description Token type (always 'Bearer')
|
|
665
|
+
* @example Bearer
|
|
666
|
+
*/
|
|
667
|
+
tokenType?: string;
|
|
668
|
+
/**
|
|
669
|
+
* Format: int32
|
|
670
|
+
* @description Token validity in seconds
|
|
671
|
+
* @example 86400
|
|
672
|
+
*/
|
|
673
|
+
expiresIn?: number;
|
|
674
|
+
};
|
|
574
675
|
/** @description Shipment tracking information */
|
|
575
676
|
Tracking: {
|
|
576
677
|
/**
|
|
@@ -614,51 +715,51 @@ interface components {
|
|
|
614
715
|
*/
|
|
615
716
|
estimatedDeliveryDate?: string;
|
|
616
717
|
};
|
|
617
|
-
/** @description
|
|
718
|
+
/** @description A charge on an invoice */
|
|
618
719
|
InvoiceCharge: {
|
|
619
720
|
/**
|
|
620
|
-
* @description Type of charge
|
|
621
|
-
* @example
|
|
721
|
+
* @description Type of charge
|
|
722
|
+
* @example BASE_FREIGHT
|
|
622
723
|
*/
|
|
623
724
|
chargeType?: string;
|
|
624
725
|
/**
|
|
625
726
|
* @description Human-readable description of the charge
|
|
626
|
-
* @example
|
|
727
|
+
* @example Base Freight
|
|
627
728
|
*/
|
|
628
729
|
description?: string;
|
|
629
730
|
/**
|
|
630
731
|
* Format: int32
|
|
631
|
-
* @description
|
|
632
|
-
* @example
|
|
732
|
+
* @description Amount in cents (USD)
|
|
733
|
+
* @example 100000
|
|
633
734
|
*/
|
|
634
735
|
amountInCents?: number;
|
|
635
736
|
};
|
|
636
|
-
/** @description A line item on
|
|
737
|
+
/** @description A line item on an invoice */
|
|
637
738
|
InvoiceLineItem: {
|
|
638
739
|
/**
|
|
639
|
-
* @description Description of the
|
|
740
|
+
* @description Description of the item
|
|
640
741
|
* @example General Freight
|
|
641
742
|
*/
|
|
642
743
|
description?: string;
|
|
643
744
|
/**
|
|
644
|
-
* @description Freight class
|
|
645
|
-
* @example
|
|
745
|
+
* @description Freight class
|
|
746
|
+
* @example 85
|
|
646
747
|
*/
|
|
647
748
|
freightClass?: string;
|
|
648
749
|
/**
|
|
649
750
|
* Format: int32
|
|
650
751
|
* @description Weight in pounds
|
|
651
|
-
* @example
|
|
752
|
+
* @example 500
|
|
652
753
|
*/
|
|
653
754
|
weight?: number;
|
|
654
755
|
/**
|
|
655
756
|
* Format: int32
|
|
656
757
|
* @description Number of pieces/pallets
|
|
657
|
-
* @example
|
|
758
|
+
* @example 2
|
|
658
759
|
*/
|
|
659
760
|
quantity?: number;
|
|
660
761
|
/**
|
|
661
|
-
* @description
|
|
762
|
+
* @description Package type
|
|
662
763
|
* @example PLT
|
|
663
764
|
*/
|
|
664
765
|
packageType?: string;
|
|
@@ -666,18 +767,18 @@ interface components {
|
|
|
666
767
|
/** @description Itemized invoice for a delivered shipment */
|
|
667
768
|
InvoiceResponse: {
|
|
668
769
|
/**
|
|
669
|
-
* @description
|
|
670
|
-
* @example
|
|
770
|
+
* @description Order ID
|
|
771
|
+
* @example 67b6c5fcfbf1be6b24127646
|
|
671
772
|
*/
|
|
672
773
|
orderId?: string;
|
|
673
774
|
/**
|
|
674
|
-
* @description
|
|
775
|
+
* @description Human-readable order number (PRO number)
|
|
675
776
|
* @example ZKYQ5
|
|
676
777
|
*/
|
|
677
778
|
orderNumber?: string;
|
|
678
779
|
/**
|
|
679
780
|
* Format: date-time
|
|
680
|
-
* @description Invoice date (
|
|
781
|
+
* @description Invoice date (typically same as delivery date)
|
|
681
782
|
* @example 2024-12-20T15:30:00Z
|
|
682
783
|
*/
|
|
683
784
|
invoiceDate?: string;
|
|
@@ -729,11 +830,11 @@ interface components {
|
|
|
729
830
|
consignee?: components["schemas"]["Address"];
|
|
730
831
|
billTo?: components["schemas"]["Address"];
|
|
731
832
|
};
|
|
732
|
-
/** @description Response containing document download
|
|
833
|
+
/** @description Response containing a document download link */
|
|
733
834
|
DocumentResponse: {
|
|
734
835
|
/**
|
|
735
836
|
* @description Name of the document file
|
|
736
|
-
* @example
|
|
837
|
+
* @example bol-ZKYQ5.pdf
|
|
737
838
|
*/
|
|
738
839
|
filename?: string;
|
|
739
840
|
/**
|
|
@@ -742,20 +843,258 @@ interface components {
|
|
|
742
843
|
*/
|
|
743
844
|
fileType?: string;
|
|
744
845
|
/**
|
|
745
|
-
* @description Pre-signed
|
|
746
|
-
* @example https://s3.amazonaws.com
|
|
846
|
+
* @description Pre-signed download URL (valid for limited time)
|
|
847
|
+
* @example https://s3.amazonaws.com/...
|
|
747
848
|
*/
|
|
748
849
|
downloadLink?: string;
|
|
749
850
|
};
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
851
|
+
/** @description Carrier API configuration response */
|
|
852
|
+
CarrierApiConfigResponse: {
|
|
853
|
+
/**
|
|
854
|
+
* @description Name of the carrier company
|
|
855
|
+
* @example ABC Logistics
|
|
856
|
+
*/
|
|
857
|
+
companyName?: string;
|
|
858
|
+
/**
|
|
859
|
+
* @description Whether the API is enabled for this carrier
|
|
860
|
+
* @example true
|
|
861
|
+
*/
|
|
862
|
+
apiEnabled?: boolean;
|
|
863
|
+
/**
|
|
864
|
+
* @description Current API version
|
|
865
|
+
* @example v0.2.1
|
|
866
|
+
*/
|
|
867
|
+
apiVersion?: string;
|
|
868
|
+
/** @description List of available API endpoints for this carrier */
|
|
869
|
+
availableEndpoints?: string[];
|
|
870
|
+
};
|
|
871
|
+
AddressAccessorialSnapshot: {
|
|
872
|
+
liftgateRequired?: boolean;
|
|
873
|
+
limitedAccess?: boolean;
|
|
874
|
+
residential?: boolean;
|
|
875
|
+
appointmentRequired?: boolean;
|
|
876
|
+
/** @enum {string} */
|
|
877
|
+
callAheadRequired?: "HALF_HOUR" | "ONE_HOUR" | "TWO_HOURS" | "START_OF_DAY" | "DAY_BEFORE";
|
|
878
|
+
/** Format: date-time */
|
|
879
|
+
createdAt?: string;
|
|
880
|
+
/** Format: date-time */
|
|
881
|
+
updatedAt?: string;
|
|
882
|
+
values?: {
|
|
883
|
+
[key: string]: boolean;
|
|
884
|
+
};
|
|
885
|
+
};
|
|
886
|
+
AppliedPricingRule: {
|
|
887
|
+
ruleId?: string;
|
|
888
|
+
/** @enum {string} */
|
|
889
|
+
type?: "add_on_margin" | "max_margin_cap";
|
|
890
|
+
/** Format: double */
|
|
891
|
+
ruleValue?: number;
|
|
892
|
+
/** Format: int32 */
|
|
893
|
+
adjustmentInCents?: number;
|
|
894
|
+
};
|
|
895
|
+
ComponentDetails: {
|
|
896
|
+
/** Format: int32 */
|
|
897
|
+
palletCount?: number;
|
|
898
|
+
/** Format: float */
|
|
899
|
+
poundsWeight?: number;
|
|
900
|
+
palletDimensions?: number[];
|
|
901
|
+
freightClass?: string;
|
|
902
|
+
};
|
|
903
|
+
OfferWithOrderDataDTO: {
|
|
904
|
+
id?: string;
|
|
905
|
+
driverId?: string;
|
|
906
|
+
carrierId?: string;
|
|
907
|
+
/** Format: date-time */
|
|
908
|
+
deadline?: string;
|
|
909
|
+
orderId?: string;
|
|
910
|
+
state?: string;
|
|
911
|
+
/** Format: date-time */
|
|
912
|
+
decidedAt?: string;
|
|
913
|
+
/** Format: int32 */
|
|
914
|
+
centsPayOut?: number;
|
|
915
|
+
routeId?: string;
|
|
916
|
+
/** Format: double */
|
|
917
|
+
routeScore?: number;
|
|
918
|
+
/** @enum {string} */
|
|
919
|
+
matchingMethod?: "MANUAL" | "REGION" | "LANE" | "TERMINAL" | "TRIP";
|
|
920
|
+
pickupPin?: string;
|
|
921
|
+
deliveryPin?: string;
|
|
922
|
+
contacted?: boolean;
|
|
923
|
+
communicationExpired?: boolean;
|
|
924
|
+
emailThreadId?: string;
|
|
925
|
+
/** Format: int32 */
|
|
926
|
+
manualCentsPayoutOverride?: number;
|
|
927
|
+
additionalPayoutsInCents?: {
|
|
928
|
+
[key: string]: number;
|
|
929
|
+
};
|
|
930
|
+
/** Format: int32 */
|
|
931
|
+
totalPayoutInCents?: number;
|
|
932
|
+
realTimeVehicleLocationSnapshots?: components["schemas"]["VehicleLocationSnapshot"][];
|
|
933
|
+
tripFragmentMatches?: components["schemas"]["TripFragmentMatch"][];
|
|
934
|
+
/** Format: date-time */
|
|
935
|
+
createdAt?: string;
|
|
936
|
+
/** Format: date-time */
|
|
937
|
+
updatedAt?: string;
|
|
938
|
+
orderData?: components["schemas"]["Order"];
|
|
939
|
+
pickupAddressData?: components["schemas"]["Address"];
|
|
940
|
+
dropoffAddressData?: components["schemas"]["Address"];
|
|
941
|
+
orderAccessorials?: components["schemas"]["OrderAccessorials"];
|
|
942
|
+
};
|
|
943
|
+
Order: {
|
|
944
|
+
id?: string;
|
|
945
|
+
customerId?: string;
|
|
946
|
+
companyId?: string;
|
|
947
|
+
additionalCustomerIds?: string[];
|
|
948
|
+
orderNumber?: string;
|
|
949
|
+
pickupAddressId?: string;
|
|
950
|
+
deliveryAddressId?: string;
|
|
951
|
+
logisticsId?: string;
|
|
952
|
+
/** Format: int32 */
|
|
953
|
+
totalPalletCount?: number;
|
|
954
|
+
/** Format: float */
|
|
955
|
+
totalPoundsWeight?: number;
|
|
956
|
+
description?: string;
|
|
957
|
+
ltlCode?: string;
|
|
958
|
+
quote?: components["schemas"]["Quote"];
|
|
959
|
+
billingAddressId?: string;
|
|
960
|
+
paid?: boolean;
|
|
961
|
+
/** Format: int32 */
|
|
962
|
+
amountDue?: number;
|
|
963
|
+
/** Format: date-time */
|
|
964
|
+
paidAt?: string;
|
|
965
|
+
paidBy?: string;
|
|
966
|
+
paymentMethod?: string;
|
|
967
|
+
paymentNotes?: string;
|
|
968
|
+
confirmed?: boolean;
|
|
969
|
+
state?: string;
|
|
970
|
+
/** @enum {string} */
|
|
971
|
+
cancellationReason?: "unspecified" | "customer_cancellation" | "shipment_entry_error" | "low_coverage" | "unacceptable_margin" | "expired" | "carrier_exception" | "shipper_exception";
|
|
972
|
+
orderComponents?: components["schemas"]["ComponentDetails"][];
|
|
973
|
+
poNumber?: string;
|
|
974
|
+
refNumber?: string;
|
|
975
|
+
emailThreadId?: string;
|
|
976
|
+
/** Format: date-time */
|
|
977
|
+
decidedAt?: string;
|
|
978
|
+
/** Format: date-time */
|
|
979
|
+
paymentDueAt?: string;
|
|
980
|
+
/** Format: date-time */
|
|
981
|
+
createdAt?: string;
|
|
982
|
+
/** Format: date-time */
|
|
983
|
+
updatedAt?: string;
|
|
984
|
+
searchMatches?: components["schemas"]["SearchMatch"][];
|
|
985
|
+
/** Format: double */
|
|
986
|
+
avgPoundsPerCubicFoot?: number;
|
|
987
|
+
/** Format: double */
|
|
988
|
+
totalCubicFeet?: number;
|
|
989
|
+
orderPreConfirmation?: boolean;
|
|
990
|
+
/** Format: int32 */
|
|
991
|
+
totalPriceInCents?: number;
|
|
992
|
+
/** Format: int32 */
|
|
993
|
+
totalPriceInCentsWithoutBrokerCharges?: number;
|
|
994
|
+
};
|
|
995
|
+
OrderAccessorials: {
|
|
996
|
+
pickupAccessorials?: components["schemas"]["AddressAccessorialSnapshot"];
|
|
997
|
+
deliveryAccessorials?: components["schemas"]["AddressAccessorialSnapshot"];
|
|
998
|
+
hazmat?: boolean;
|
|
999
|
+
reefer?: boolean;
|
|
1000
|
+
};
|
|
1001
|
+
Quote: {
|
|
1002
|
+
id?: string;
|
|
1003
|
+
customerId?: string;
|
|
1004
|
+
shipperId?: string;
|
|
1005
|
+
orderId?: string;
|
|
1006
|
+
pickupZip?: string;
|
|
1007
|
+
dropoffZip?: string;
|
|
1008
|
+
/** Format: int32 */
|
|
1009
|
+
numPallets?: number;
|
|
1010
|
+
/** Format: float */
|
|
1011
|
+
totalWeight?: number;
|
|
1012
|
+
/** Format: int32 */
|
|
1013
|
+
centsCharge?: number;
|
|
1014
|
+
/** Format: date-time */
|
|
1015
|
+
timeStamp?: string;
|
|
1016
|
+
exposePrice?: boolean;
|
|
1017
|
+
/** Format: int32 */
|
|
1018
|
+
suggestedCarrierPayoutCents?: number;
|
|
1019
|
+
/** Format: double */
|
|
1020
|
+
carrierProbability?: number;
|
|
1021
|
+
/** Format: double */
|
|
1022
|
+
shipperProbability?: number;
|
|
1023
|
+
/** Format: double */
|
|
1024
|
+
pickupScoreSurroundingNormalized?: number;
|
|
1025
|
+
/** Format: double */
|
|
1026
|
+
dropoffScoreSurroundingNormalized?: number;
|
|
1027
|
+
/** Format: double */
|
|
1028
|
+
originalPrice?: number;
|
|
1029
|
+
/** Format: double */
|
|
1030
|
+
miles?: number;
|
|
1031
|
+
additionalChargesInCents?: {
|
|
1032
|
+
[key: string]: number;
|
|
1033
|
+
};
|
|
1034
|
+
brokerChargesInCents?: {
|
|
1035
|
+
[key: string]: number;
|
|
1036
|
+
};
|
|
1037
|
+
/** Format: int32 */
|
|
1038
|
+
pricingRuleAdjustmentInCents?: number;
|
|
1039
|
+
appliedPricingRules?: components["schemas"]["AppliedPricingRule"][];
|
|
1040
|
+
/** Format: date-time */
|
|
1041
|
+
createdAt?: string;
|
|
1042
|
+
/** Format: date-time */
|
|
1043
|
+
updatedAt?: string;
|
|
1044
|
+
/** @enum {string} */
|
|
1045
|
+
status?: "open" | "display" | "price_locked" | "confirmed" | "rejected";
|
|
1046
|
+
/** @enum {string} */
|
|
1047
|
+
quoteSource?: "pricing_model" | "manual_entry" | "pricing_model_v2";
|
|
1048
|
+
};
|
|
1049
|
+
SearchMatch: {
|
|
1050
|
+
field?: string;
|
|
1051
|
+
value?: string;
|
|
1052
|
+
/** Format: int32 */
|
|
1053
|
+
startIndex?: number;
|
|
1054
|
+
/** Format: int32 */
|
|
1055
|
+
endIndex?: number;
|
|
1056
|
+
};
|
|
1057
|
+
TripDetour: {
|
|
1058
|
+
/** Format: int32 */
|
|
1059
|
+
totalDetourSeconds?: number;
|
|
1060
|
+
/** Format: int32 */
|
|
1061
|
+
pickupDetourSeconds?: number;
|
|
1062
|
+
/** Format: int32 */
|
|
1063
|
+
deliveryDetourSeconds?: number;
|
|
1064
|
+
};
|
|
1065
|
+
TripFragmentMatch: {
|
|
1066
|
+
tripId?: string;
|
|
1067
|
+
tripFragmentId?: string;
|
|
1068
|
+
vehicleId?: string;
|
|
1069
|
+
/** Format: int32 */
|
|
1070
|
+
pickupStopNumber?: number;
|
|
1071
|
+
/** Format: int32 */
|
|
1072
|
+
deliveryStopNumber?: number;
|
|
1073
|
+
tripDetour?: components["schemas"]["TripDetour"];
|
|
1074
|
+
};
|
|
1075
|
+
VehicleLocationSnapshot: {
|
|
1076
|
+
id?: string;
|
|
1077
|
+
vehicleId?: string;
|
|
1078
|
+
vehicleName?: string;
|
|
1079
|
+
location?: string;
|
|
1080
|
+
/** Format: int32 */
|
|
1081
|
+
heading?: number;
|
|
1082
|
+
/** Format: int32 */
|
|
1083
|
+
speed?: number;
|
|
1084
|
+
/** Format: date-time */
|
|
1085
|
+
lastUpdated?: string;
|
|
1086
|
+
/** Format: int32 */
|
|
1087
|
+
numHexesAwayFromPickup?: number;
|
|
1088
|
+
};
|
|
1089
|
+
};
|
|
1090
|
+
responses: never;
|
|
1091
|
+
parameters: never;
|
|
1092
|
+
requestBodies: never;
|
|
1093
|
+
headers: never;
|
|
1094
|
+
pathItems: never;
|
|
1095
|
+
}
|
|
757
1096
|
interface operations {
|
|
758
|
-
|
|
1097
|
+
confirmShipment: {
|
|
759
1098
|
parameters: {
|
|
760
1099
|
query?: never;
|
|
761
1100
|
header?: never;
|
|
@@ -776,7 +1115,7 @@ interface operations {
|
|
|
776
1115
|
[name: string]: unknown;
|
|
777
1116
|
};
|
|
778
1117
|
content: {
|
|
779
|
-
"application/
|
|
1118
|
+
"application/json": components["schemas"]["Shipment"];
|
|
780
1119
|
};
|
|
781
1120
|
};
|
|
782
1121
|
/** @description Invalid request: orderNumber is required, order is not in INITIALIZED state, or is missing a quote */
|
|
@@ -785,7 +1124,7 @@ interface operations {
|
|
|
785
1124
|
[name: string]: unknown;
|
|
786
1125
|
};
|
|
787
1126
|
content: {
|
|
788
|
-
"application/
|
|
1127
|
+
"application/json": components["schemas"]["Shipment"];
|
|
789
1128
|
};
|
|
790
1129
|
};
|
|
791
1130
|
/** @description Unauthorized: missing or invalid Bearer token (authentication failed) */
|
|
@@ -794,7 +1133,7 @@ interface operations {
|
|
|
794
1133
|
[name: string]: unknown;
|
|
795
1134
|
};
|
|
796
1135
|
content: {
|
|
797
|
-
"application/
|
|
1136
|
+
"application/json": components["schemas"]["Shipment"];
|
|
798
1137
|
};
|
|
799
1138
|
};
|
|
800
1139
|
/** @description Forbidden: missing/invalid API key, or shipment does not belong to your company */
|
|
@@ -803,7 +1142,7 @@ interface operations {
|
|
|
803
1142
|
[name: string]: unknown;
|
|
804
1143
|
};
|
|
805
1144
|
content: {
|
|
806
|
-
"application/
|
|
1145
|
+
"application/json": components["schemas"]["Shipment"];
|
|
807
1146
|
};
|
|
808
1147
|
};
|
|
809
1148
|
/** @description Shipment not found */
|
|
@@ -812,7 +1151,7 @@ interface operations {
|
|
|
812
1151
|
[name: string]: unknown;
|
|
813
1152
|
};
|
|
814
1153
|
content: {
|
|
815
|
-
"application/
|
|
1154
|
+
"application/json": components["schemas"]["Shipment"];
|
|
816
1155
|
};
|
|
817
1156
|
};
|
|
818
1157
|
/** @description Internal server error */
|
|
@@ -821,12 +1160,12 @@ interface operations {
|
|
|
821
1160
|
[name: string]: unknown;
|
|
822
1161
|
};
|
|
823
1162
|
content: {
|
|
824
|
-
"application/
|
|
1163
|
+
"application/json": components["schemas"]["Shipment"];
|
|
825
1164
|
};
|
|
826
1165
|
};
|
|
827
1166
|
};
|
|
828
1167
|
};
|
|
829
|
-
|
|
1168
|
+
cancelShipment: {
|
|
830
1169
|
parameters: {
|
|
831
1170
|
query?: never;
|
|
832
1171
|
header?: never;
|
|
@@ -847,7 +1186,7 @@ interface operations {
|
|
|
847
1186
|
[name: string]: unknown;
|
|
848
1187
|
};
|
|
849
1188
|
content: {
|
|
850
|
-
"application/
|
|
1189
|
+
"application/json": components["schemas"]["Shipment"];
|
|
851
1190
|
};
|
|
852
1191
|
};
|
|
853
1192
|
/** @description Invalid request: orderNumber is required, or order cannot be cancelled in its current state */
|
|
@@ -856,7 +1195,7 @@ interface operations {
|
|
|
856
1195
|
[name: string]: unknown;
|
|
857
1196
|
};
|
|
858
1197
|
content: {
|
|
859
|
-
"application/
|
|
1198
|
+
"application/json": components["schemas"]["Shipment"];
|
|
860
1199
|
};
|
|
861
1200
|
};
|
|
862
1201
|
/** @description Unauthorized: missing or invalid Bearer token (authentication failed) */
|
|
@@ -865,7 +1204,7 @@ interface operations {
|
|
|
865
1204
|
[name: string]: unknown;
|
|
866
1205
|
};
|
|
867
1206
|
content: {
|
|
868
|
-
"application/
|
|
1207
|
+
"application/json": components["schemas"]["Shipment"];
|
|
869
1208
|
};
|
|
870
1209
|
};
|
|
871
1210
|
/** @description Forbidden: missing/invalid API key, or shipment does not belong to your company */
|
|
@@ -874,7 +1213,7 @@ interface operations {
|
|
|
874
1213
|
[name: string]: unknown;
|
|
875
1214
|
};
|
|
876
1215
|
content: {
|
|
877
|
-
"application/
|
|
1216
|
+
"application/json": components["schemas"]["Shipment"];
|
|
878
1217
|
};
|
|
879
1218
|
};
|
|
880
1219
|
/** @description Shipment not found */
|
|
@@ -883,7 +1222,7 @@ interface operations {
|
|
|
883
1222
|
[name: string]: unknown;
|
|
884
1223
|
};
|
|
885
1224
|
content: {
|
|
886
|
-
"application/
|
|
1225
|
+
"application/json": components["schemas"]["Shipment"];
|
|
887
1226
|
};
|
|
888
1227
|
};
|
|
889
1228
|
/** @description Internal server error */
|
|
@@ -892,7 +1231,7 @@ interface operations {
|
|
|
892
1231
|
[name: string]: unknown;
|
|
893
1232
|
};
|
|
894
1233
|
content: {
|
|
895
|
-
"application/
|
|
1234
|
+
"application/json": components["schemas"]["Shipment"];
|
|
896
1235
|
};
|
|
897
1236
|
};
|
|
898
1237
|
};
|
|
@@ -916,7 +1255,7 @@ interface operations {
|
|
|
916
1255
|
[name: string]: unknown;
|
|
917
1256
|
};
|
|
918
1257
|
content: {
|
|
919
|
-
"application/
|
|
1258
|
+
"application/json": components["schemas"]["Shipment"];
|
|
920
1259
|
};
|
|
921
1260
|
};
|
|
922
1261
|
/** @description Invalid request: validation error, quote mismatch, or expired quote */
|
|
@@ -925,7 +1264,7 @@ interface operations {
|
|
|
925
1264
|
[name: string]: unknown;
|
|
926
1265
|
};
|
|
927
1266
|
content: {
|
|
928
|
-
"application/
|
|
1267
|
+
"application/json": components["schemas"]["Shipment"];
|
|
929
1268
|
};
|
|
930
1269
|
};
|
|
931
1270
|
/** @description Unauthorized: missing or invalid Bearer token (authentication failed) */
|
|
@@ -934,7 +1273,7 @@ interface operations {
|
|
|
934
1273
|
[name: string]: unknown;
|
|
935
1274
|
};
|
|
936
1275
|
content: {
|
|
937
|
-
"application/
|
|
1276
|
+
"application/json": components["schemas"]["Shipment"];
|
|
938
1277
|
};
|
|
939
1278
|
};
|
|
940
1279
|
/** @description Forbidden: missing/invalid API key, user not in company, or quote not owned by company */
|
|
@@ -943,7 +1282,7 @@ interface operations {
|
|
|
943
1282
|
[name: string]: unknown;
|
|
944
1283
|
};
|
|
945
1284
|
content: {
|
|
946
|
-
"application/
|
|
1285
|
+
"application/json": components["schemas"]["Shipment"];
|
|
947
1286
|
};
|
|
948
1287
|
};
|
|
949
1288
|
/** @description Internal server error */
|
|
@@ -952,7 +1291,7 @@ interface operations {
|
|
|
952
1291
|
[name: string]: unknown;
|
|
953
1292
|
};
|
|
954
1293
|
content: {
|
|
955
|
-
"application/
|
|
1294
|
+
"application/json": components["schemas"]["Shipment"];
|
|
956
1295
|
};
|
|
957
1296
|
};
|
|
958
1297
|
};
|
|
@@ -976,7 +1315,7 @@ interface operations {
|
|
|
976
1315
|
[name: string]: unknown;
|
|
977
1316
|
};
|
|
978
1317
|
content: {
|
|
979
|
-
"application/
|
|
1318
|
+
"application/json": components["schemas"]["QuoteResponse"];
|
|
980
1319
|
};
|
|
981
1320
|
};
|
|
982
1321
|
/** @description Invalid request: validation error */
|
|
@@ -985,7 +1324,7 @@ interface operations {
|
|
|
985
1324
|
[name: string]: unknown;
|
|
986
1325
|
};
|
|
987
1326
|
content: {
|
|
988
|
-
"application/
|
|
1327
|
+
"application/json": components["schemas"]["QuoteResponse"];
|
|
989
1328
|
};
|
|
990
1329
|
};
|
|
991
1330
|
/** @description Unauthorized: missing or invalid Bearer token (authentication failed) */
|
|
@@ -994,7 +1333,7 @@ interface operations {
|
|
|
994
1333
|
[name: string]: unknown;
|
|
995
1334
|
};
|
|
996
1335
|
content: {
|
|
997
|
-
"application/
|
|
1336
|
+
"application/json": components["schemas"]["QuoteResponse"];
|
|
998
1337
|
};
|
|
999
1338
|
};
|
|
1000
1339
|
/** @description Forbidden: missing/invalid API key, or user does not belong to the authorized company */
|
|
@@ -1003,7 +1342,151 @@ interface operations {
|
|
|
1003
1342
|
[name: string]: unknown;
|
|
1004
1343
|
};
|
|
1005
1344
|
content: {
|
|
1006
|
-
"application/
|
|
1345
|
+
"application/json": components["schemas"]["QuoteResponse"];
|
|
1346
|
+
};
|
|
1347
|
+
};
|
|
1348
|
+
/** @description Internal server error */
|
|
1349
|
+
500: {
|
|
1350
|
+
headers: {
|
|
1351
|
+
[name: string]: unknown;
|
|
1352
|
+
};
|
|
1353
|
+
content: {
|
|
1354
|
+
"application/json": components["schemas"]["QuoteResponse"];
|
|
1355
|
+
};
|
|
1356
|
+
};
|
|
1357
|
+
};
|
|
1358
|
+
};
|
|
1359
|
+
addTrips: {
|
|
1360
|
+
parameters: {
|
|
1361
|
+
query?: never;
|
|
1362
|
+
header?: never;
|
|
1363
|
+
path: {
|
|
1364
|
+
/** @description The unique identifier of the carrier */
|
|
1365
|
+
carrierId: string;
|
|
1366
|
+
};
|
|
1367
|
+
cookie?: never;
|
|
1368
|
+
};
|
|
1369
|
+
requestBody: {
|
|
1370
|
+
content: {
|
|
1371
|
+
"application/json": components["schemas"]["Trip"][];
|
|
1372
|
+
};
|
|
1373
|
+
};
|
|
1374
|
+
responses: {
|
|
1375
|
+
/** @description Trips accepted and processed; returns count of trips added */
|
|
1376
|
+
200: {
|
|
1377
|
+
headers: {
|
|
1378
|
+
[name: string]: unknown;
|
|
1379
|
+
};
|
|
1380
|
+
content: {
|
|
1381
|
+
"application/json": number;
|
|
1382
|
+
};
|
|
1383
|
+
};
|
|
1384
|
+
/** @description Invalid request: missing required fields or invalid trip data */
|
|
1385
|
+
400: {
|
|
1386
|
+
headers: {
|
|
1387
|
+
[name: string]: unknown;
|
|
1388
|
+
};
|
|
1389
|
+
content: {
|
|
1390
|
+
"application/json": number;
|
|
1391
|
+
};
|
|
1392
|
+
};
|
|
1393
|
+
/** @description Unauthorized: missing or invalid bearer token */
|
|
1394
|
+
401: {
|
|
1395
|
+
headers: {
|
|
1396
|
+
[name: string]: unknown;
|
|
1397
|
+
};
|
|
1398
|
+
content: {
|
|
1399
|
+
"application/json": number;
|
|
1400
|
+
};
|
|
1401
|
+
};
|
|
1402
|
+
/** @description Forbidden: API access is not enabled for this carrier */
|
|
1403
|
+
403: {
|
|
1404
|
+
headers: {
|
|
1405
|
+
[name: string]: unknown;
|
|
1406
|
+
};
|
|
1407
|
+
content: {
|
|
1408
|
+
"application/json": number;
|
|
1409
|
+
};
|
|
1410
|
+
};
|
|
1411
|
+
/** @description Carrier not found */
|
|
1412
|
+
404: {
|
|
1413
|
+
headers: {
|
|
1414
|
+
[name: string]: unknown;
|
|
1415
|
+
};
|
|
1416
|
+
content: {
|
|
1417
|
+
"application/json": number;
|
|
1418
|
+
};
|
|
1419
|
+
};
|
|
1420
|
+
/** @description Internal server error */
|
|
1421
|
+
500: {
|
|
1422
|
+
headers: {
|
|
1423
|
+
[name: string]: unknown;
|
|
1424
|
+
};
|
|
1425
|
+
content: {
|
|
1426
|
+
"application/json": number;
|
|
1427
|
+
};
|
|
1428
|
+
};
|
|
1429
|
+
};
|
|
1430
|
+
};
|
|
1431
|
+
addGpsData: {
|
|
1432
|
+
parameters: {
|
|
1433
|
+
query?: never;
|
|
1434
|
+
header?: never;
|
|
1435
|
+
path: {
|
|
1436
|
+
/** @description The unique identifier of the carrier */
|
|
1437
|
+
carrierId: string;
|
|
1438
|
+
};
|
|
1439
|
+
cookie?: never;
|
|
1440
|
+
};
|
|
1441
|
+
requestBody: {
|
|
1442
|
+
content: {
|
|
1443
|
+
"application/json": components["schemas"]["GpsData"][];
|
|
1444
|
+
};
|
|
1445
|
+
};
|
|
1446
|
+
responses: {
|
|
1447
|
+
/** @description GPS data accepted and processed; returns count of data points added */
|
|
1448
|
+
200: {
|
|
1449
|
+
headers: {
|
|
1450
|
+
[name: string]: unknown;
|
|
1451
|
+
};
|
|
1452
|
+
content: {
|
|
1453
|
+
"application/json": number;
|
|
1454
|
+
};
|
|
1455
|
+
};
|
|
1456
|
+
/** @description Invalid request: malformed JSON, missing fields, or invalid data */
|
|
1457
|
+
400: {
|
|
1458
|
+
headers: {
|
|
1459
|
+
[name: string]: unknown;
|
|
1460
|
+
};
|
|
1461
|
+
content: {
|
|
1462
|
+
"application/json": number;
|
|
1463
|
+
};
|
|
1464
|
+
};
|
|
1465
|
+
/** @description Unauthorized: missing or invalid bearer token */
|
|
1466
|
+
401: {
|
|
1467
|
+
headers: {
|
|
1468
|
+
[name: string]: unknown;
|
|
1469
|
+
};
|
|
1470
|
+
content: {
|
|
1471
|
+
"application/json": number;
|
|
1472
|
+
};
|
|
1473
|
+
};
|
|
1474
|
+
/** @description Forbidden: API access is not enabled for this carrier */
|
|
1475
|
+
403: {
|
|
1476
|
+
headers: {
|
|
1477
|
+
[name: string]: unknown;
|
|
1478
|
+
};
|
|
1479
|
+
content: {
|
|
1480
|
+
"application/json": number;
|
|
1481
|
+
};
|
|
1482
|
+
};
|
|
1483
|
+
/** @description Carrier not found */
|
|
1484
|
+
404: {
|
|
1485
|
+
headers: {
|
|
1486
|
+
[name: string]: unknown;
|
|
1487
|
+
};
|
|
1488
|
+
content: {
|
|
1489
|
+
"application/json": number;
|
|
1007
1490
|
};
|
|
1008
1491
|
};
|
|
1009
1492
|
/** @description Internal server error */
|
|
@@ -1012,12 +1495,54 @@ interface operations {
|
|
|
1012
1495
|
[name: string]: unknown;
|
|
1013
1496
|
};
|
|
1014
1497
|
content: {
|
|
1015
|
-
"application/
|
|
1498
|
+
"application/json": number;
|
|
1016
1499
|
};
|
|
1017
1500
|
};
|
|
1018
1501
|
};
|
|
1019
1502
|
};
|
|
1020
|
-
|
|
1503
|
+
getToken: {
|
|
1504
|
+
parameters: {
|
|
1505
|
+
query?: never;
|
|
1506
|
+
header?: never;
|
|
1507
|
+
path?: never;
|
|
1508
|
+
cookie?: never;
|
|
1509
|
+
};
|
|
1510
|
+
requestBody: {
|
|
1511
|
+
content: {
|
|
1512
|
+
"application/json": components["schemas"]["TokenRequest"];
|
|
1513
|
+
};
|
|
1514
|
+
};
|
|
1515
|
+
responses: {
|
|
1516
|
+
/** @description Token successfully generated */
|
|
1517
|
+
200: {
|
|
1518
|
+
headers: {
|
|
1519
|
+
[name: string]: unknown;
|
|
1520
|
+
};
|
|
1521
|
+
content: {
|
|
1522
|
+
"application/json": components["schemas"]["TokenResponse"];
|
|
1523
|
+
};
|
|
1524
|
+
};
|
|
1525
|
+
/** @description Invalid request: missing required fields */
|
|
1526
|
+
400: {
|
|
1527
|
+
headers: {
|
|
1528
|
+
[name: string]: unknown;
|
|
1529
|
+
};
|
|
1530
|
+
content: {
|
|
1531
|
+
"application/json": components["schemas"]["TokenErrorResponse"];
|
|
1532
|
+
};
|
|
1533
|
+
};
|
|
1534
|
+
/** @description Unauthorized: invalid credentials */
|
|
1535
|
+
401: {
|
|
1536
|
+
headers: {
|
|
1537
|
+
[name: string]: unknown;
|
|
1538
|
+
};
|
|
1539
|
+
content: {
|
|
1540
|
+
"application/json": components["schemas"]["TokenErrorResponse"];
|
|
1541
|
+
};
|
|
1542
|
+
};
|
|
1543
|
+
};
|
|
1544
|
+
};
|
|
1545
|
+
getShipment: {
|
|
1021
1546
|
parameters: {
|
|
1022
1547
|
query?: never;
|
|
1023
1548
|
header?: never;
|
|
@@ -1038,7 +1563,7 @@ interface operations {
|
|
|
1038
1563
|
[name: string]: unknown;
|
|
1039
1564
|
};
|
|
1040
1565
|
content: {
|
|
1041
|
-
"application/
|
|
1566
|
+
"application/json": components["schemas"]["Shipment"];
|
|
1042
1567
|
};
|
|
1043
1568
|
};
|
|
1044
1569
|
/** @description Invalid request: orderNumber is required */
|
|
@@ -1047,7 +1572,7 @@ interface operations {
|
|
|
1047
1572
|
[name: string]: unknown;
|
|
1048
1573
|
};
|
|
1049
1574
|
content: {
|
|
1050
|
-
"application/
|
|
1575
|
+
"application/json": components["schemas"]["Shipment"];
|
|
1051
1576
|
};
|
|
1052
1577
|
};
|
|
1053
1578
|
/** @description Unauthorized: missing or invalid Bearer token (authentication failed) */
|
|
@@ -1056,7 +1581,7 @@ interface operations {
|
|
|
1056
1581
|
[name: string]: unknown;
|
|
1057
1582
|
};
|
|
1058
1583
|
content: {
|
|
1059
|
-
"application/
|
|
1584
|
+
"application/json": components["schemas"]["Shipment"];
|
|
1060
1585
|
};
|
|
1061
1586
|
};
|
|
1062
1587
|
/** @description Forbidden: missing/invalid API key, or shipment does not belong to your company */
|
|
@@ -1065,7 +1590,7 @@ interface operations {
|
|
|
1065
1590
|
[name: string]: unknown;
|
|
1066
1591
|
};
|
|
1067
1592
|
content: {
|
|
1068
|
-
"application/
|
|
1593
|
+
"application/json": components["schemas"]["Shipment"];
|
|
1069
1594
|
};
|
|
1070
1595
|
};
|
|
1071
1596
|
/** @description Shipment not found */
|
|
@@ -1074,12 +1599,12 @@ interface operations {
|
|
|
1074
1599
|
[name: string]: unknown;
|
|
1075
1600
|
};
|
|
1076
1601
|
content: {
|
|
1077
|
-
"application/
|
|
1602
|
+
"application/json": components["schemas"]["Shipment"];
|
|
1078
1603
|
};
|
|
1079
1604
|
};
|
|
1080
1605
|
};
|
|
1081
1606
|
};
|
|
1082
|
-
|
|
1607
|
+
trackShipment: {
|
|
1083
1608
|
parameters: {
|
|
1084
1609
|
query?: never;
|
|
1085
1610
|
header?: never;
|
|
@@ -1100,7 +1625,7 @@ interface operations {
|
|
|
1100
1625
|
[name: string]: unknown;
|
|
1101
1626
|
};
|
|
1102
1627
|
content: {
|
|
1103
|
-
"application/
|
|
1628
|
+
"application/json": components["schemas"]["Tracking"];
|
|
1104
1629
|
};
|
|
1105
1630
|
};
|
|
1106
1631
|
/** @description Invalid request: orderNumber is required */
|
|
@@ -1109,7 +1634,7 @@ interface operations {
|
|
|
1109
1634
|
[name: string]: unknown;
|
|
1110
1635
|
};
|
|
1111
1636
|
content: {
|
|
1112
|
-
"application/
|
|
1637
|
+
"application/json": components["schemas"]["Tracking"];
|
|
1113
1638
|
};
|
|
1114
1639
|
};
|
|
1115
1640
|
/** @description Unauthorized: missing or invalid Bearer token (authentication failed) */
|
|
@@ -1118,7 +1643,7 @@ interface operations {
|
|
|
1118
1643
|
[name: string]: unknown;
|
|
1119
1644
|
};
|
|
1120
1645
|
content: {
|
|
1121
|
-
"application/
|
|
1646
|
+
"application/json": components["schemas"]["Tracking"];
|
|
1122
1647
|
};
|
|
1123
1648
|
};
|
|
1124
1649
|
/** @description Forbidden: missing/invalid API key, or shipment does not belong to your company */
|
|
@@ -1127,7 +1652,7 @@ interface operations {
|
|
|
1127
1652
|
[name: string]: unknown;
|
|
1128
1653
|
};
|
|
1129
1654
|
content: {
|
|
1130
|
-
"application/
|
|
1655
|
+
"application/json": components["schemas"]["Tracking"];
|
|
1131
1656
|
};
|
|
1132
1657
|
};
|
|
1133
1658
|
/** @description Shipment not found */
|
|
@@ -1136,7 +1661,7 @@ interface operations {
|
|
|
1136
1661
|
[name: string]: unknown;
|
|
1137
1662
|
};
|
|
1138
1663
|
content: {
|
|
1139
|
-
"application/
|
|
1664
|
+
"application/json": components["schemas"]["Tracking"];
|
|
1140
1665
|
};
|
|
1141
1666
|
};
|
|
1142
1667
|
};
|
|
@@ -1162,7 +1687,7 @@ interface operations {
|
|
|
1162
1687
|
[name: string]: unknown;
|
|
1163
1688
|
};
|
|
1164
1689
|
content: {
|
|
1165
|
-
"application/
|
|
1690
|
+
"application/json": components["schemas"]["InvoiceResponse"];
|
|
1166
1691
|
};
|
|
1167
1692
|
};
|
|
1168
1693
|
/** @description Invalid request: orderNumber is required, or shipment is not in DELIVERED state */
|
|
@@ -1171,7 +1696,7 @@ interface operations {
|
|
|
1171
1696
|
[name: string]: unknown;
|
|
1172
1697
|
};
|
|
1173
1698
|
content: {
|
|
1174
|
-
"application/
|
|
1699
|
+
"application/json": components["schemas"]["InvoiceResponse"];
|
|
1175
1700
|
};
|
|
1176
1701
|
};
|
|
1177
1702
|
/** @description Unauthorized: missing or invalid Bearer token (authentication failed) */
|
|
@@ -1180,7 +1705,7 @@ interface operations {
|
|
|
1180
1705
|
[name: string]: unknown;
|
|
1181
1706
|
};
|
|
1182
1707
|
content: {
|
|
1183
|
-
"application/
|
|
1708
|
+
"application/json": components["schemas"]["InvoiceResponse"];
|
|
1184
1709
|
};
|
|
1185
1710
|
};
|
|
1186
1711
|
/** @description Forbidden: missing/invalid API key, or shipment does not belong to your company */
|
|
@@ -1189,7 +1714,7 @@ interface operations {
|
|
|
1189
1714
|
[name: string]: unknown;
|
|
1190
1715
|
};
|
|
1191
1716
|
content: {
|
|
1192
|
-
"application/
|
|
1717
|
+
"application/json": components["schemas"]["InvoiceResponse"];
|
|
1193
1718
|
};
|
|
1194
1719
|
};
|
|
1195
1720
|
/** @description Shipment not found */
|
|
@@ -1198,12 +1723,12 @@ interface operations {
|
|
|
1198
1723
|
[name: string]: unknown;
|
|
1199
1724
|
};
|
|
1200
1725
|
content: {
|
|
1201
|
-
"application/
|
|
1726
|
+
"application/json": components["schemas"]["InvoiceResponse"];
|
|
1202
1727
|
};
|
|
1203
1728
|
};
|
|
1204
1729
|
};
|
|
1205
1730
|
};
|
|
1206
|
-
|
|
1731
|
+
getDocument: {
|
|
1207
1732
|
parameters: {
|
|
1208
1733
|
query?: never;
|
|
1209
1734
|
header?: never;
|
|
@@ -1226,7 +1751,7 @@ interface operations {
|
|
|
1226
1751
|
[name: string]: unknown;
|
|
1227
1752
|
};
|
|
1228
1753
|
content: {
|
|
1229
|
-
"application/
|
|
1754
|
+
"application/json": components["schemas"]["DocumentResponse"];
|
|
1230
1755
|
};
|
|
1231
1756
|
};
|
|
1232
1757
|
/** @description Invalid request: orderNumber and documentType are required */
|
|
@@ -1235,7 +1760,7 @@ interface operations {
|
|
|
1235
1760
|
[name: string]: unknown;
|
|
1236
1761
|
};
|
|
1237
1762
|
content: {
|
|
1238
|
-
"application/
|
|
1763
|
+
"application/json": components["schemas"]["DocumentResponse"];
|
|
1239
1764
|
};
|
|
1240
1765
|
};
|
|
1241
1766
|
/** @description Unauthorized: missing or invalid Bearer token (authentication failed) */
|
|
@@ -1244,7 +1769,7 @@ interface operations {
|
|
|
1244
1769
|
[name: string]: unknown;
|
|
1245
1770
|
};
|
|
1246
1771
|
content: {
|
|
1247
|
-
"application/
|
|
1772
|
+
"application/json": components["schemas"]["DocumentResponse"];
|
|
1248
1773
|
};
|
|
1249
1774
|
};
|
|
1250
1775
|
/** @description Forbidden: missing/invalid API key, or shipment does not belong to your company */
|
|
@@ -1253,7 +1778,7 @@ interface operations {
|
|
|
1253
1778
|
[name: string]: unknown;
|
|
1254
1779
|
};
|
|
1255
1780
|
content: {
|
|
1256
|
-
"application/
|
|
1781
|
+
"application/json": components["schemas"]["DocumentResponse"];
|
|
1257
1782
|
};
|
|
1258
1783
|
};
|
|
1259
1784
|
/** @description Shipment or document not found */
|
|
@@ -1262,7 +1787,7 @@ interface operations {
|
|
|
1262
1787
|
[name: string]: unknown;
|
|
1263
1788
|
};
|
|
1264
1789
|
content: {
|
|
1265
|
-
"application/
|
|
1790
|
+
"application/json": components["schemas"]["DocumentResponse"];
|
|
1266
1791
|
};
|
|
1267
1792
|
};
|
|
1268
1793
|
/** @description Internal server error */
|
|
@@ -1271,7 +1796,7 @@ interface operations {
|
|
|
1271
1796
|
[name: string]: unknown;
|
|
1272
1797
|
};
|
|
1273
1798
|
content: {
|
|
1274
|
-
"application/
|
|
1799
|
+
"application/json": components["schemas"]["DocumentResponse"];
|
|
1275
1800
|
};
|
|
1276
1801
|
};
|
|
1277
1802
|
};
|
|
@@ -1294,7 +1819,7 @@ interface operations {
|
|
|
1294
1819
|
[name: string]: unknown;
|
|
1295
1820
|
};
|
|
1296
1821
|
content: {
|
|
1297
|
-
"application/
|
|
1822
|
+
"application/json": components["schemas"]["QuoteResponse"];
|
|
1298
1823
|
};
|
|
1299
1824
|
};
|
|
1300
1825
|
/** @description Invalid request: quote ID format is invalid */
|
|
@@ -1303,7 +1828,7 @@ interface operations {
|
|
|
1303
1828
|
[name: string]: unknown;
|
|
1304
1829
|
};
|
|
1305
1830
|
content: {
|
|
1306
|
-
"application/
|
|
1831
|
+
"application/json": components["schemas"]["QuoteResponse"];
|
|
1307
1832
|
};
|
|
1308
1833
|
};
|
|
1309
1834
|
/** @description Unauthorized: missing or invalid Bearer token (authentication failed) */
|
|
@@ -1312,7 +1837,7 @@ interface operations {
|
|
|
1312
1837
|
[name: string]: unknown;
|
|
1313
1838
|
};
|
|
1314
1839
|
content: {
|
|
1315
|
-
"application/
|
|
1840
|
+
"application/json": components["schemas"]["QuoteResponse"];
|
|
1316
1841
|
};
|
|
1317
1842
|
};
|
|
1318
1843
|
/** @description Forbidden: missing, invalid, or expired API key (authorization failed) */
|
|
@@ -1321,7 +1846,7 @@ interface operations {
|
|
|
1321
1846
|
[name: string]: unknown;
|
|
1322
1847
|
};
|
|
1323
1848
|
content: {
|
|
1324
|
-
"application/
|
|
1849
|
+
"application/json": components["schemas"]["QuoteResponse"];
|
|
1325
1850
|
};
|
|
1326
1851
|
};
|
|
1327
1852
|
/** @description Quote not found */
|
|
@@ -1330,23 +1855,259 @@ interface operations {
|
|
|
1330
1855
|
[name: string]: unknown;
|
|
1331
1856
|
};
|
|
1332
1857
|
content: {
|
|
1333
|
-
"application/
|
|
1858
|
+
"application/json": components["schemas"]["QuoteResponse"];
|
|
1859
|
+
};
|
|
1860
|
+
};
|
|
1861
|
+
};
|
|
1862
|
+
};
|
|
1863
|
+
getCarrierApiConfig: {
|
|
1864
|
+
parameters: {
|
|
1865
|
+
query?: never;
|
|
1866
|
+
header?: never;
|
|
1867
|
+
path: {
|
|
1868
|
+
/** @description The unique identifier of the carrier */
|
|
1869
|
+
carrierId: string;
|
|
1870
|
+
};
|
|
1871
|
+
cookie?: never;
|
|
1872
|
+
};
|
|
1873
|
+
requestBody?: never;
|
|
1874
|
+
responses: {
|
|
1875
|
+
/** @description Configuration retrieved successfully */
|
|
1876
|
+
200: {
|
|
1877
|
+
headers: {
|
|
1878
|
+
[name: string]: unknown;
|
|
1879
|
+
};
|
|
1880
|
+
content: {
|
|
1881
|
+
"application/json": components["schemas"]["CarrierApiConfigResponse"];
|
|
1882
|
+
};
|
|
1883
|
+
};
|
|
1884
|
+
/** @description Unauthorized: missing or invalid bearer token */
|
|
1885
|
+
401: {
|
|
1886
|
+
headers: {
|
|
1887
|
+
[name: string]: unknown;
|
|
1888
|
+
};
|
|
1889
|
+
content: {
|
|
1890
|
+
"application/json": components["schemas"]["CarrierApiConfigResponse"];
|
|
1891
|
+
};
|
|
1892
|
+
};
|
|
1893
|
+
/** @description Forbidden: API access is not enabled for this carrier */
|
|
1894
|
+
403: {
|
|
1895
|
+
headers: {
|
|
1896
|
+
[name: string]: unknown;
|
|
1897
|
+
};
|
|
1898
|
+
content: {
|
|
1899
|
+
"application/json": components["schemas"]["CarrierApiConfigResponse"];
|
|
1900
|
+
};
|
|
1901
|
+
};
|
|
1902
|
+
/** @description Carrier not found */
|
|
1903
|
+
404: {
|
|
1904
|
+
headers: {
|
|
1905
|
+
[name: string]: unknown;
|
|
1906
|
+
};
|
|
1907
|
+
content: {
|
|
1908
|
+
"application/json": components["schemas"]["CarrierApiConfigResponse"];
|
|
1909
|
+
};
|
|
1910
|
+
};
|
|
1911
|
+
/** @description Internal server error */
|
|
1912
|
+
500: {
|
|
1913
|
+
headers: {
|
|
1914
|
+
[name: string]: unknown;
|
|
1915
|
+
};
|
|
1916
|
+
content: {
|
|
1917
|
+
"application/json": components["schemas"]["CarrierApiConfigResponse"];
|
|
1918
|
+
};
|
|
1919
|
+
};
|
|
1920
|
+
};
|
|
1921
|
+
};
|
|
1922
|
+
getJobs: {
|
|
1923
|
+
parameters: {
|
|
1924
|
+
query?: {
|
|
1925
|
+
/** @description If true, only return currently active jobs */
|
|
1926
|
+
activeOnly?: boolean;
|
|
1927
|
+
/** @description Filter jobs created after this time (ISO 8601 format) */
|
|
1928
|
+
startTime?: string;
|
|
1929
|
+
/** @description Filter jobs created before this time (ISO 8601 format) */
|
|
1930
|
+
endTime?: string;
|
|
1931
|
+
};
|
|
1932
|
+
header?: never;
|
|
1933
|
+
path: {
|
|
1934
|
+
/** @description The unique identifier of the carrier */
|
|
1935
|
+
carrierId: string;
|
|
1936
|
+
};
|
|
1937
|
+
cookie?: never;
|
|
1938
|
+
};
|
|
1939
|
+
requestBody?: never;
|
|
1940
|
+
responses: {
|
|
1941
|
+
/** @description Jobs retrieved successfully */
|
|
1942
|
+
200: {
|
|
1943
|
+
headers: {
|
|
1944
|
+
[name: string]: unknown;
|
|
1945
|
+
};
|
|
1946
|
+
content: {
|
|
1947
|
+
"application/json": components["schemas"]["OfferWithOrderDataDTO"][];
|
|
1948
|
+
};
|
|
1949
|
+
};
|
|
1950
|
+
/** @description Unauthorized: missing or invalid bearer token */
|
|
1951
|
+
401: {
|
|
1952
|
+
headers: {
|
|
1953
|
+
[name: string]: unknown;
|
|
1954
|
+
};
|
|
1955
|
+
content: {
|
|
1956
|
+
"application/json": components["schemas"]["OfferWithOrderDataDTO"][];
|
|
1957
|
+
};
|
|
1958
|
+
};
|
|
1959
|
+
/** @description Forbidden: API access is not enabled for this carrier */
|
|
1960
|
+
403: {
|
|
1961
|
+
headers: {
|
|
1962
|
+
[name: string]: unknown;
|
|
1963
|
+
};
|
|
1964
|
+
content: {
|
|
1965
|
+
"application/json": components["schemas"]["OfferWithOrderDataDTO"][];
|
|
1966
|
+
};
|
|
1967
|
+
};
|
|
1968
|
+
/** @description Carrier not found */
|
|
1969
|
+
404: {
|
|
1970
|
+
headers: {
|
|
1971
|
+
[name: string]: unknown;
|
|
1972
|
+
};
|
|
1973
|
+
content: {
|
|
1974
|
+
"application/json": components["schemas"]["OfferWithOrderDataDTO"][];
|
|
1975
|
+
};
|
|
1976
|
+
};
|
|
1977
|
+
/** @description Internal server error */
|
|
1978
|
+
500: {
|
|
1979
|
+
headers: {
|
|
1980
|
+
[name: string]: unknown;
|
|
1981
|
+
};
|
|
1982
|
+
content: {
|
|
1983
|
+
"application/json": components["schemas"]["OfferWithOrderDataDTO"][];
|
|
1334
1984
|
};
|
|
1335
1985
|
};
|
|
1336
1986
|
};
|
|
1337
1987
|
};
|
|
1338
1988
|
}
|
|
1339
1989
|
|
|
1990
|
+
interface OwayConfig {
|
|
1991
|
+
/**
|
|
1992
|
+
* M2M Client ID (REQUIRED for all integrations)
|
|
1993
|
+
* Provided by Oway Sales Engineering team
|
|
1994
|
+
*/
|
|
1995
|
+
clientId: string;
|
|
1996
|
+
/**
|
|
1997
|
+
* M2M Client Secret (REQUIRED for all integrations)
|
|
1998
|
+
* Provided by Oway Sales Engineering team
|
|
1999
|
+
*/
|
|
2000
|
+
clientSecret: string;
|
|
2001
|
+
/**
|
|
2002
|
+
* Default company API key (optional)
|
|
2003
|
+
*
|
|
2004
|
+
* Single-company: Set this to your company's API key
|
|
2005
|
+
* Multi-company: Omit this and provide per-request
|
|
2006
|
+
*
|
|
2007
|
+
* Get from: https://app.oway.io/settings/api
|
|
2008
|
+
*/
|
|
2009
|
+
apiKey?: string;
|
|
2010
|
+
/**
|
|
2011
|
+
* Base URL for the Oway API
|
|
2012
|
+
* @default "https://rest-api.sandbox.oway.io"
|
|
2013
|
+
*/
|
|
2014
|
+
baseUrl?: string;
|
|
2015
|
+
/**
|
|
2016
|
+
* Token endpoint for authentication
|
|
2017
|
+
* @default "https://rest-api.sandbox.oway.io/v1/auth/token"
|
|
2018
|
+
*/
|
|
2019
|
+
tokenUrl?: string;
|
|
2020
|
+
/**
|
|
2021
|
+
* Maximum number of retry attempts for failed requests
|
|
2022
|
+
* @default 3
|
|
2023
|
+
*/
|
|
2024
|
+
maxRetries?: number;
|
|
2025
|
+
/**
|
|
2026
|
+
* Timeout in milliseconds for API requests
|
|
2027
|
+
* @default 30000
|
|
2028
|
+
*/
|
|
2029
|
+
timeout?: number;
|
|
2030
|
+
/**
|
|
2031
|
+
* Enable debug logging (logs sanitized request/response metadata)
|
|
2032
|
+
* @default false
|
|
2033
|
+
*/
|
|
2034
|
+
debug?: boolean;
|
|
2035
|
+
/**
|
|
2036
|
+
* Custom logger implementation
|
|
2037
|
+
*/
|
|
2038
|
+
logger?: {
|
|
2039
|
+
debug: (msg: string, meta?: Record<string, any>) => void;
|
|
2040
|
+
info: (msg: string, meta?: Record<string, any>) => void;
|
|
2041
|
+
warn: (msg: string, meta?: Record<string, any>) => void;
|
|
2042
|
+
error: (msg: string, meta?: Record<string, any>) => void;
|
|
2043
|
+
};
|
|
2044
|
+
}
|
|
2045
|
+
declare class OwayError extends Error {
|
|
2046
|
+
code?: string | undefined;
|
|
2047
|
+
statusCode?: number | undefined;
|
|
2048
|
+
requestId?: string | undefined;
|
|
2049
|
+
constructor(message: string, code?: string | undefined, statusCode?: number | undefined, requestId?: string | undefined);
|
|
2050
|
+
/**
|
|
2051
|
+
* Determines if this error represents a transient failure that should be retried
|
|
2052
|
+
*/
|
|
2053
|
+
isRetryable(): boolean;
|
|
2054
|
+
}
|
|
2055
|
+
/**
|
|
2056
|
+
* HTTP client for making authenticated requests to the Oway API
|
|
2057
|
+
*/
|
|
2058
|
+
declare class HttpClient {
|
|
2059
|
+
private config;
|
|
2060
|
+
private accessToken;
|
|
2061
|
+
private tokenExpiry;
|
|
2062
|
+
private tokenRefreshPromise;
|
|
2063
|
+
constructor(config: OwayConfig);
|
|
2064
|
+
/**
|
|
2065
|
+
* Internal logging with sanitization
|
|
2066
|
+
*/
|
|
2067
|
+
private log;
|
|
2068
|
+
/**
|
|
2069
|
+
* Sanitize objects for logging - remove sensitive fields
|
|
2070
|
+
*/
|
|
2071
|
+
private sanitizeForLogging;
|
|
2072
|
+
/**
|
|
2073
|
+
* Get or refresh the access token using the API key
|
|
2074
|
+
* Handles concurrent requests by queuing them behind a single refresh
|
|
2075
|
+
*/
|
|
2076
|
+
private getAccessToken;
|
|
2077
|
+
/**
|
|
2078
|
+
* Perform the actual token refresh using M2M credentials
|
|
2079
|
+
*/
|
|
2080
|
+
private refreshToken;
|
|
2081
|
+
/**
|
|
2082
|
+
* Generate a unique request ID
|
|
2083
|
+
*/
|
|
2084
|
+
private generateRequestId;
|
|
2085
|
+
/**
|
|
2086
|
+
* Make an authenticated request to the Oway API
|
|
2087
|
+
*/
|
|
2088
|
+
request<T>(method: string, path: string, options?: {
|
|
2089
|
+
query?: Record<string, string | number | boolean>;
|
|
2090
|
+
body?: unknown;
|
|
2091
|
+
headers?: Record<string, string>;
|
|
2092
|
+
requestId?: string;
|
|
2093
|
+
companyApiKey?: string;
|
|
2094
|
+
}): Promise<T>;
|
|
2095
|
+
get<T>(path: string, query?: Record<string, string | number | boolean>, companyApiKey?: string): Promise<T>;
|
|
2096
|
+
post<T>(path: string, body?: unknown, companyApiKey?: string): Promise<T>;
|
|
2097
|
+
put<T>(path: string, body?: unknown, companyApiKey?: string): Promise<T>;
|
|
2098
|
+
delete<T>(path: string, companyApiKey?: string): Promise<T>;
|
|
2099
|
+
}
|
|
2100
|
+
|
|
1340
2101
|
/**
|
|
1341
2102
|
* Clean type aliases for the Oway SDK
|
|
1342
2103
|
*/
|
|
1343
2104
|
|
|
1344
2105
|
type QuoteRequest = paths['/v1/shipper/quote']['post']['requestBody']['content']['application/json'];
|
|
1345
2106
|
type ShipmentRequest = paths['/v1/shipper/shipment']['post']['requestBody']['content']['application/json'];
|
|
1346
|
-
type Quote = paths['/v1/shipper/quote']['post']['responses']['200']['content']['application/
|
|
1347
|
-
type Shipment = paths['/v1/shipper/shipment']['post']['responses']['200']['content']['application/
|
|
1348
|
-
type Tracking = paths['/v1/shipper/shipment/{orderNumber}/tracking']['get']['responses']['200']['content']['application/
|
|
1349
|
-
type Invoice = paths['/v1/shipper/shipment/{orderNumber}/invoice']['get']['responses']['200']['content']['application/
|
|
2107
|
+
type Quote = paths['/v1/shipper/quote']['post']['responses']['200']['content']['application/json'];
|
|
2108
|
+
type Shipment = paths['/v1/shipper/shipment']['post']['responses']['200']['content']['application/json'];
|
|
2109
|
+
type Tracking = paths['/v1/shipper/shipment/{orderNumber}/tracking']['get']['responses']['200']['content']['application/json'];
|
|
2110
|
+
type Invoice = paths['/v1/shipper/shipment/{orderNumber}/invoice']['get']['responses']['200']['content']['application/json'];
|
|
1350
2111
|
type Address = components['schemas']['Address'];
|
|
1351
2112
|
|
|
1352
2113
|
declare class Quotes {
|