@artaio/node-api 0.32.3 → 1.0.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/README.md +9 -5
- package/dist/package.json +1 -1
- package/package.json +1 -1
- package/dist/schemas/generate.d.ts +0 -1
- package/dist/schemas/generate.js +0 -51
- package/dist/schemas/index.d.ts +0 -3204
- package/dist/schemas/index.js +0 -733
- package/dist/test-integration/index.d.ts +0 -2
- package/dist/test-integration/index.js +0 -7
- package/dist/test-integration/keys.test.d.ts +0 -1
- package/dist/test-integration/keys.test.js +0 -71
- package/dist/test-integration/requests.test.d.ts +0 -1
- package/dist/test-integration/requests.test.js +0 -87
- package/dist/test-integration/shipments.test.d.ts +0 -1
- package/dist/test-integration/shipments.test.js +0 -114
package/dist/schemas/index.js
DELETED
|
@@ -1,733 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.uploadSchema = exports.mimeTypeSchema = exports.documentTypeSchema = exports.trackingSchema = exports.trackingEventSchema = exports.carrierSchema = exports.organizationSchema = exports.logSchema = exports.invoiceSchema = exports.invoicePaymentSchema = exports.hostedSessionSchema = exports.emailSubscriptionSchema = exports.emailRuleSchema = exports.recipientSchema = exports.emailNotificationIdSchema = exports.attatchmentSchema = exports.shipmentSchema = exports.shipmentStatusSchema = exports.eeiFormStatusSchema = exports.shipmentTrackingSchema = exports.shipmentScheduleSchema = exports.shipmentExceptionSchema = exports.shipmentExceptionTypeIdSchema = exports.packageSchema = exports.packageStatusSechema = exports.shipmentExceptionStatusSchema = exports.paymentSchema = exports.paymentContextSchema = exports.requestSchema = exports.requestListItemSchema = exports.quoteSchema = exports.artaServiceSchema = exports.insurancePolicySchema = exports.artaTrackingServiceSubSubTypeSchema = exports.disqualificationSchema = exports.artaLocationSchema = exports.artaObjectSchema = exports.detailsSchema = exports.contactSchema = exports.quoteRequestStatusSchema = exports.paymentProcessSchema = exports.insuranceSchema = exports.disqualificationResonSchema = exports.quoteTypeSchema = exports.accessRetrictionSchema = exports.additionalServiceSchema = exports.supportedCurrencySchema = exports.keySchema = exports.createPaginatedResponseSchema = exports.datedSchema = void 0;
|
|
4
|
-
exports.webhookSchema = exports.webhookDeliverySchema = exports.webhookDeliveryTypeSchema = exports.webhookDeliveryStatusSchema = exports.webhookResourceTypeSchema = void 0;
|
|
5
|
-
var zod_1 = require("zod");
|
|
6
|
-
exports.datedSchema = zod_1.z.object({
|
|
7
|
-
updated_at: zod_1.z.date(),
|
|
8
|
-
created_at: zod_1.z.date(),
|
|
9
|
-
});
|
|
10
|
-
function createPaginatedResponseSchema(itemSchema) {
|
|
11
|
-
return zod_1.z.object({
|
|
12
|
-
metadata: zod_1.z.object({
|
|
13
|
-
page: zod_1.z.number(),
|
|
14
|
-
page_size: zod_1.z.number(),
|
|
15
|
-
total_count: zod_1.z.number(),
|
|
16
|
-
}),
|
|
17
|
-
items: zod_1.z.array(itemSchema),
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
exports.createPaginatedResponseSchema = createPaginatedResponseSchema;
|
|
21
|
-
;
|
|
22
|
-
var numId = zod_1.z.number().int().positive();
|
|
23
|
-
exports.keySchema = exports.datedSchema.extend({
|
|
24
|
-
id: numId,
|
|
25
|
-
name: zod_1.z.string().nullable(),
|
|
26
|
-
is_testing: zod_1.z.boolean(),
|
|
27
|
-
token: zod_1.z.string(),
|
|
28
|
-
});
|
|
29
|
-
exports.supportedCurrencySchema = zod_1.z.enum(['CAD', 'EUR', 'GBP', 'HKD', 'USD']);
|
|
30
|
-
exports.additionalServiceSchema = zod_1.z.enum([
|
|
31
|
-
'assembly',
|
|
32
|
-
'debris_disposal',
|
|
33
|
-
'deinstallation',
|
|
34
|
-
'destination_additional_labor',
|
|
35
|
-
'destination_building_coi',
|
|
36
|
-
'destination_condition_check',
|
|
37
|
-
'destination_full_condition_report',
|
|
38
|
-
'destination_unpacking',
|
|
39
|
-
'double_blind_bols',
|
|
40
|
-
'installation',
|
|
41
|
-
'origin_building_coi',
|
|
42
|
-
'origin_condition_check',
|
|
43
|
-
'origin_full_condition_report',
|
|
44
|
-
'placement',
|
|
45
|
-
'signature_delivery',
|
|
46
|
-
'tarmac_supervision',
|
|
47
|
-
]);
|
|
48
|
-
exports.accessRetrictionSchema = zod_1.z.enum(['elevator_only',
|
|
49
|
-
'freight_elevator',
|
|
50
|
-
'loading_dock',
|
|
51
|
-
'loading_dock_low',
|
|
52
|
-
'low_clearance',
|
|
53
|
-
'non_paved',
|
|
54
|
-
'stairs_only',
|
|
55
|
-
'steep_gradient'
|
|
56
|
-
]);
|
|
57
|
-
var packingSubTypeSchema = zod_1.z.enum([
|
|
58
|
-
'alcohol_case',
|
|
59
|
-
'lay_flat_wine_box',
|
|
60
|
-
'blanket',
|
|
61
|
-
'wardrobe_box',
|
|
62
|
-
'cardboard_box',
|
|
63
|
-
'chandelier_box',
|
|
64
|
-
'chair_box',
|
|
65
|
-
'cbin_closed',
|
|
66
|
-
'cbin_open',
|
|
67
|
-
'ply_box',
|
|
68
|
-
'fine_art_econo_crate',
|
|
69
|
-
'fine_art_international_crate',
|
|
70
|
-
'econo_crate',
|
|
71
|
-
'international_econo_crate',
|
|
72
|
-
'furniture_crate',
|
|
73
|
-
'international_furniture_crate',
|
|
74
|
-
'parcel_crate',
|
|
75
|
-
'museum_crate',
|
|
76
|
-
'international_museum_crate',
|
|
77
|
-
'foam_lined_box',
|
|
78
|
-
'cavity_box',
|
|
79
|
-
'strongbox',
|
|
80
|
-
'double_box',
|
|
81
|
-
'travel_frame',
|
|
82
|
-
'travel_frame_art',
|
|
83
|
-
'travel_frame_other',
|
|
84
|
-
'a_frame',
|
|
85
|
-
'slat_crate',
|
|
86
|
-
'tri_wall_crate',
|
|
87
|
-
'lockbox',
|
|
88
|
-
'no_packing',
|
|
89
|
-
'pallet',
|
|
90
|
-
'international_pallet',
|
|
91
|
-
'portfolio',
|
|
92
|
-
'rug_rolled',
|
|
93
|
-
'shadow_box',
|
|
94
|
-
'slipcase',
|
|
95
|
-
'slipcase_glass_tape',
|
|
96
|
-
'poly_cardboard',
|
|
97
|
-
'bubble_cardboard',
|
|
98
|
-
'garment_bag',
|
|
99
|
-
'poly_only',
|
|
100
|
-
'dartek_only',
|
|
101
|
-
'bubble_only',
|
|
102
|
-
'cling_wrap',
|
|
103
|
-
'cbin_communal',
|
|
104
|
-
'sonotube',
|
|
105
|
-
'stabilizing_box',
|
|
106
|
-
'shipping_tube_small',
|
|
107
|
-
'shipping_tube_large',
|
|
108
|
-
]);
|
|
109
|
-
var objectMaterialSchema = zod_1.z.enum([
|
|
110
|
-
'stone_marble',
|
|
111
|
-
'precious_stones',
|
|
112
|
-
'fiber_synthetic',
|
|
113
|
-
'fabric_natural',
|
|
114
|
-
'taxidermy',
|
|
115
|
-
'carbon_fiber',
|
|
116
|
-
'live_animal',
|
|
117
|
-
'paper',
|
|
118
|
-
'glass',
|
|
119
|
-
'presious_metals',
|
|
120
|
-
'particleboard',
|
|
121
|
-
'styrofoam',
|
|
122
|
-
'wood',
|
|
123
|
-
'photo_film',
|
|
124
|
-
'sand',
|
|
125
|
-
'metal',
|
|
126
|
-
'plexiglass',
|
|
127
|
-
'aquatic_life',
|
|
128
|
-
'canvas',
|
|
129
|
-
'drywall',
|
|
130
|
-
'hard_plastic',
|
|
131
|
-
'vinyl',
|
|
132
|
-
'soft_plastic',
|
|
133
|
-
'leather',
|
|
134
|
-
'rubber',
|
|
135
|
-
'concreate',
|
|
136
|
-
'paint',
|
|
137
|
-
'electronics',
|
|
138
|
-
'fiber_natural',
|
|
139
|
-
'gas',
|
|
140
|
-
'fabric_synthetic',
|
|
141
|
-
'CITES',
|
|
142
|
-
'liquids',
|
|
143
|
-
'salts',
|
|
144
|
-
]);
|
|
145
|
-
var objectSubTypeSchema = zod_1.z.enum([
|
|
146
|
-
'painting_unframed',
|
|
147
|
-
'painting_framed',
|
|
148
|
-
'painting_framed_plexi',
|
|
149
|
-
'painting_framed_glass',
|
|
150
|
-
'work_on_paper_unframed',
|
|
151
|
-
'work_on_paper_framed',
|
|
152
|
-
'work_on_paper_framed_plexi',
|
|
153
|
-
'work_on_paper_framed_glass',
|
|
154
|
-
'mixed_media_unframed',
|
|
155
|
-
'mixed_media_framed',
|
|
156
|
-
'mixed_media_framed_plexi',
|
|
157
|
-
'mixed_media_framed_glass',
|
|
158
|
-
'photograph_unframed',
|
|
159
|
-
'photograph_framed',
|
|
160
|
-
'photograph_framed_plexi',
|
|
161
|
-
'photograph_framed_glass',
|
|
162
|
-
'new_media',
|
|
163
|
-
'sculpture',
|
|
164
|
-
'pedestal',
|
|
165
|
-
'pedestal_case_glass',
|
|
166
|
-
'pedestal_case_plexi',
|
|
167
|
-
'ceramic',
|
|
168
|
-
'neon',
|
|
169
|
-
'tapestry',
|
|
170
|
-
'other_art',
|
|
171
|
-
'table',
|
|
172
|
-
'chair',
|
|
173
|
-
'sofa_loveseat_chaise',
|
|
174
|
-
'floor_lamp',
|
|
175
|
-
'floor_lamp_shade',
|
|
176
|
-
'table_lamp',
|
|
177
|
-
'table_lamp_shade',
|
|
178
|
-
'sconce',
|
|
179
|
-
'ottoman',
|
|
180
|
-
'bookcase_storage',
|
|
181
|
-
'nightstand',
|
|
182
|
-
'armoire_dresser',
|
|
183
|
-
'carpet_rug',
|
|
184
|
-
'mirror',
|
|
185
|
-
'chandelier',
|
|
186
|
-
'bedframe',
|
|
187
|
-
'headboard',
|
|
188
|
-
'desk_vanity',
|
|
189
|
-
'media_console',
|
|
190
|
-
'other_furniture',
|
|
191
|
-
'earrings',
|
|
192
|
-
'necklace',
|
|
193
|
-
'bracelet',
|
|
194
|
-
'ring',
|
|
195
|
-
'brooch',
|
|
196
|
-
'watch',
|
|
197
|
-
'cufflinks',
|
|
198
|
-
'eyeglasses',
|
|
199
|
-
'set',
|
|
200
|
-
'precious_stones',
|
|
201
|
-
'snuff_box_cigarette_case',
|
|
202
|
-
'other_jewelry',
|
|
203
|
-
'vase_vessel',
|
|
204
|
-
'bowl',
|
|
205
|
-
'plaque',
|
|
206
|
-
'object_of_vertu',
|
|
207
|
-
'candelabra_candlestick',
|
|
208
|
-
'dinnerware',
|
|
209
|
-
'flatware',
|
|
210
|
-
'glassware',
|
|
211
|
-
'serveware',
|
|
212
|
-
'porcelain_plate',
|
|
213
|
-
'porcelain_bowl',
|
|
214
|
-
'tabletop_accessory',
|
|
215
|
-
'clock',
|
|
216
|
-
'other_decorative_arts',
|
|
217
|
-
'stamp',
|
|
218
|
-
'book',
|
|
219
|
-
'coin',
|
|
220
|
-
'document_manuscript',
|
|
221
|
-
'toy',
|
|
222
|
-
'miniature_model',
|
|
223
|
-
'figurine_doll',
|
|
224
|
-
'neon_sign',
|
|
225
|
-
'memorabilia',
|
|
226
|
-
'camera_electrical',
|
|
227
|
-
'other_collectibles',
|
|
228
|
-
'wine_bottle',
|
|
229
|
-
'spirits_bottle',
|
|
230
|
-
'beer_bottle',
|
|
231
|
-
'wine_case',
|
|
232
|
-
'spirits_case',
|
|
233
|
-
'beer_case',
|
|
234
|
-
'wine_barrel',
|
|
235
|
-
'spirits_barrel',
|
|
236
|
-
'beer_barrel',
|
|
237
|
-
'other_alcohols',
|
|
238
|
-
'car',
|
|
239
|
-
'motorcycle',
|
|
240
|
-
'bus',
|
|
241
|
-
'van',
|
|
242
|
-
'limousine',
|
|
243
|
-
'carriage',
|
|
244
|
-
'trailer',
|
|
245
|
-
'sidecar',
|
|
246
|
-
'other_automotive',
|
|
247
|
-
'clothing',
|
|
248
|
-
'footwear',
|
|
249
|
-
'handbag',
|
|
250
|
-
'accessories',
|
|
251
|
-
'other_fashion',
|
|
252
|
-
'musical_instrument',
|
|
253
|
-
'firearm_weapon',
|
|
254
|
-
'hunting_fishing',
|
|
255
|
-
'medical_equipment',
|
|
256
|
-
'other',
|
|
257
|
-
]);
|
|
258
|
-
exports.quoteTypeSchema = zod_1.z.enum(['parcel', 'premium', 'select', 'self_ship']);
|
|
259
|
-
exports.disqualificationResonSchema = zod_1.z.enum([
|
|
260
|
-
'cannot_be_packed',
|
|
261
|
-
'client_timeout_reached',
|
|
262
|
-
'external_service_unavailable',
|
|
263
|
-
'object_not_supported',
|
|
264
|
-
'out_of_network',
|
|
265
|
-
'over_size',
|
|
266
|
-
'over_value',
|
|
267
|
-
'over_volume',
|
|
268
|
-
'over_weight',
|
|
269
|
-
'requested_service_unavailable',
|
|
270
|
-
'too_many_items',
|
|
271
|
-
'under_value',
|
|
272
|
-
'under_volume',
|
|
273
|
-
'under_weight'
|
|
274
|
-
]);
|
|
275
|
-
exports.insuranceSchema = zod_1.z.enum(['arta_transit_insurance', 'no_arta_insurance']);
|
|
276
|
-
exports.paymentProcessSchema = zod_1.z.enum(['checkout', 'checkout_direct', 'invoicing']);
|
|
277
|
-
exports.quoteRequestStatusSchema = zod_1.z.enum([
|
|
278
|
-
'cancelled',
|
|
279
|
-
'closed',
|
|
280
|
-
'disqualified',
|
|
281
|
-
'expired',
|
|
282
|
-
'in_progress',
|
|
283
|
-
'pending',
|
|
284
|
-
'quoted',
|
|
285
|
-
]);
|
|
286
|
-
exports.contactSchema = zod_1.z.object({
|
|
287
|
-
name: zod_1.z.string(),
|
|
288
|
-
email_address: zod_1.z.string().nullish(),
|
|
289
|
-
phone_number: zod_1.z.string().nullish(),
|
|
290
|
-
});
|
|
291
|
-
exports.detailsSchema = zod_1.z.object({
|
|
292
|
-
materials: zod_1.z.array(objectMaterialSchema).nullish(),
|
|
293
|
-
creation_date: zod_1.z.string().nullish(),
|
|
294
|
-
creator: zod_1.z.string().nullish(),
|
|
295
|
-
notes: zod_1.z.string().nullish(),
|
|
296
|
-
title: zod_1.z.string().nullish(),
|
|
297
|
-
is_fragile: zod_1.z.boolean().nullish(),
|
|
298
|
-
is_cites: zod_1.z.boolean().nullish(),
|
|
299
|
-
});
|
|
300
|
-
var zodNumberOrString = zod_1.z.union([zod_1.z.number(), zod_1.z.string()]);
|
|
301
|
-
exports.artaObjectSchema = zod_1.z.object({
|
|
302
|
-
internal_reference: zod_1.z.string().nullish(),
|
|
303
|
-
current_packing: zod_1.z.array(packingSubTypeSchema).nullish(),
|
|
304
|
-
details: exports.detailsSchema.nullish(),
|
|
305
|
-
height: zodNumberOrString,
|
|
306
|
-
width: zodNumberOrString,
|
|
307
|
-
weight: zodNumberOrString.nullish(),
|
|
308
|
-
value: zodNumberOrString,
|
|
309
|
-
depth: zodNumberOrString.nullish(),
|
|
310
|
-
images: zod_1.z.array(zod_1.z.string()).nullish(),
|
|
311
|
-
public_reference: zod_1.z.string().nullish(),
|
|
312
|
-
subtype: objectSubTypeSchema,
|
|
313
|
-
unit_of_measurement: zod_1.z.string().nullish(),
|
|
314
|
-
weight_unit: zod_1.z.string().nullish(),
|
|
315
|
-
value_currency: exports.supportedCurrencySchema,
|
|
316
|
-
});
|
|
317
|
-
exports.artaLocationSchema = zod_1.z.object({
|
|
318
|
-
access_restrictions: zod_1.z.array(exports.accessRetrictionSchema).nullish(),
|
|
319
|
-
address_line_1: zod_1.z.string().nullish(),
|
|
320
|
-
address_line_2: zod_1.z.string().nullish(),
|
|
321
|
-
address_line_3: zod_1.z.string().nullish(),
|
|
322
|
-
city: zod_1.z.string().nullish(),
|
|
323
|
-
region: zod_1.z.string().nullish(),
|
|
324
|
-
postal_code: zod_1.z.string().nullish(),
|
|
325
|
-
country: zod_1.z.string(),
|
|
326
|
-
title: zod_1.z.string().nullish(),
|
|
327
|
-
contacts: zod_1.z.array(exports.contactSchema).nullish(),
|
|
328
|
-
estimated_country: zod_1.z.string().optional(),
|
|
329
|
-
estimated_region: zod_1.z.string().optional(),
|
|
330
|
-
estimated_city: zod_1.z.string().optional(),
|
|
331
|
-
});
|
|
332
|
-
exports.disqualificationSchema = zod_1.z.object({
|
|
333
|
-
quote_types: zod_1.z.array(exports.quoteTypeSchema),
|
|
334
|
-
reason: zod_1.z.string().nullish(),
|
|
335
|
-
reason_code: exports.disqualificationResonSchema,
|
|
336
|
-
});
|
|
337
|
-
exports.artaTrackingServiceSubSubTypeSchema = zod_1.z.string();
|
|
338
|
-
var artaTrackingServiceTypeSchema = zod_1.z.enum([
|
|
339
|
-
'transport',
|
|
340
|
-
'location',
|
|
341
|
-
'handling',
|
|
342
|
-
'packing',
|
|
343
|
-
'storage',
|
|
344
|
-
'administration',
|
|
345
|
-
'taxes_duties_fees',
|
|
346
|
-
'security',
|
|
347
|
-
'equipment',
|
|
348
|
-
]);
|
|
349
|
-
var artaTrackingServiceSubTypeSchema = zod_1.z.enum([
|
|
350
|
-
'specialized',
|
|
351
|
-
'consolidated',
|
|
352
|
-
'freight',
|
|
353
|
-
'parcel',
|
|
354
|
-
'collection',
|
|
355
|
-
'delivery',
|
|
356
|
-
'location',
|
|
357
|
-
'unpacking',
|
|
358
|
-
'condition',
|
|
359
|
-
'installation',
|
|
360
|
-
'deinstallation',
|
|
361
|
-
'debris_disposal',
|
|
362
|
-
'site_visit',
|
|
363
|
-
'handling',
|
|
364
|
-
'packing',
|
|
365
|
-
'packing_materials',
|
|
366
|
-
'receive_release',
|
|
367
|
-
'warehouse',
|
|
368
|
-
'customs',
|
|
369
|
-
'coi',
|
|
370
|
-
'administration',
|
|
371
|
-
'taxes_duties',
|
|
372
|
-
'fees',
|
|
373
|
-
'security',
|
|
374
|
-
'equipment',
|
|
375
|
-
]);
|
|
376
|
-
exports.insurancePolicySchema = zod_1.z.object({
|
|
377
|
-
amount: zod_1.z.number(),
|
|
378
|
-
amount_currency: exports.supportedCurrencySchema,
|
|
379
|
-
id: zod_1.z.string(),
|
|
380
|
-
insured_value: zod_1.z.number(),
|
|
381
|
-
insured_value_currency: exports.supportedCurrencySchema,
|
|
382
|
-
});
|
|
383
|
-
exports.artaServiceSchema = zod_1.z.object({
|
|
384
|
-
amount: zod_1.z.number(),
|
|
385
|
-
amount_currency: exports.supportedCurrencySchema,
|
|
386
|
-
is_requested: zod_1.z.boolean().optional(),
|
|
387
|
-
is_required: zod_1.z.boolean().optional(),
|
|
388
|
-
name: zod_1.z.string(),
|
|
389
|
-
sub_subtype: exports.artaTrackingServiceSubSubTypeSchema,
|
|
390
|
-
subtype: artaTrackingServiceSubTypeSchema,
|
|
391
|
-
type: artaTrackingServiceTypeSchema,
|
|
392
|
-
included_services: zod_1.z.array(zod_1.z.any()),
|
|
393
|
-
});
|
|
394
|
-
exports.quoteSchema = zod_1.z.object({
|
|
395
|
-
id: zod_1.z.number(),
|
|
396
|
-
included_services: zod_1.z.array(exports.artaServiceSchema),
|
|
397
|
-
included_insurance_policy: exports.insurancePolicySchema.nullish(),
|
|
398
|
-
optional_services: zod_1.z.array(exports.artaServiceSchema),
|
|
399
|
-
quote_type: exports.quoteTypeSchema,
|
|
400
|
-
status: zod_1.z.string(),
|
|
401
|
-
total: zod_1.z.number(),
|
|
402
|
-
total_currency: exports.supportedCurrencySchema,
|
|
403
|
-
});
|
|
404
|
-
exports.requestListItemSchema = exports.datedSchema.extend({
|
|
405
|
-
id: zod_1.z.string().uuid(),
|
|
406
|
-
bookable: zod_1.z.object({
|
|
407
|
-
missing: zod_1.z.array(zod_1.z.string()),
|
|
408
|
-
ready: zod_1.z.boolean(),
|
|
409
|
-
}),
|
|
410
|
-
destination: exports.artaLocationSchema,
|
|
411
|
-
hosted_session_id: zod_1.z.number().nullable(),
|
|
412
|
-
insurance: exports.insuranceSchema.nullable(),
|
|
413
|
-
internal_reference: zod_1.z.string().nullable(),
|
|
414
|
-
log_request_id: zod_1.z.string(),
|
|
415
|
-
object_count: zod_1.z.number().nullable(),
|
|
416
|
-
origin: exports.artaLocationSchema,
|
|
417
|
-
public_reference: zod_1.z.string().nullish(),
|
|
418
|
-
quote_types: zod_1.z.array(exports.quoteTypeSchema),
|
|
419
|
-
shortcode: zod_1.z.string(),
|
|
420
|
-
status: exports.quoteRequestStatusSchema,
|
|
421
|
-
tags: zod_1.z.any() // TODO!!!
|
|
422
|
-
});
|
|
423
|
-
exports.requestSchema = exports.requestListItemSchema.extend({
|
|
424
|
-
currency: exports.supportedCurrencySchema,
|
|
425
|
-
additional_services: zod_1.z.array(exports.additionalServiceSchema),
|
|
426
|
-
disqualifications: zod_1.z.array(exports.disqualificationSchema),
|
|
427
|
-
objects: zod_1.z.array(exports.artaObjectSchema),
|
|
428
|
-
payment_process: exports.paymentProcessSchema,
|
|
429
|
-
preferred_quote_types: zod_1.z.array(exports.quoteTypeSchema).nullish(),
|
|
430
|
-
shipping_notes: zod_1.z.string().nullish(),
|
|
431
|
-
quotes: zod_1.z.array(exports.quoteSchema),
|
|
432
|
-
});
|
|
433
|
-
exports.paymentContextSchema = zod_1.z.enum(['hosted_checkout', 'invoiced']);
|
|
434
|
-
exports.paymentSchema = exports.datedSchema.extend({
|
|
435
|
-
id: numId,
|
|
436
|
-
amount: zod_1.z.number(),
|
|
437
|
-
amount_currency: exports.supportedCurrencySchema,
|
|
438
|
-
context: exports.paymentContextSchema,
|
|
439
|
-
paid_on: zod_1.z.date(),
|
|
440
|
-
});
|
|
441
|
-
exports.shipmentExceptionStatusSchema = zod_1.z.enum(['in_progress', 'new', 'resolved']);
|
|
442
|
-
exports.packageStatusSechema = zod_1.z.enum(['pending',
|
|
443
|
-
'transit',
|
|
444
|
-
'out_for_delivery',
|
|
445
|
-
'delivered',
|
|
446
|
-
'unknown',
|
|
447
|
-
'notfound',
|
|
448
|
-
'undelivered',
|
|
449
|
-
'exception',
|
|
450
|
-
'expired'
|
|
451
|
-
]);
|
|
452
|
-
exports.packageSchema = zod_1.z.object({
|
|
453
|
-
depth: zod_1.z.number(),
|
|
454
|
-
eta: zod_1.z.string().nullish(),
|
|
455
|
-
handle_with_care: zod_1.z.boolean(),
|
|
456
|
-
height: zod_1.z.number(),
|
|
457
|
-
id: numId,
|
|
458
|
-
is_sufficiently_packed: zod_1.z.boolean(),
|
|
459
|
-
objects: zod_1.z.array(exports.artaObjectSchema),
|
|
460
|
-
packing_materials: zod_1.z.array(packingSubTypeSchema),
|
|
461
|
-
status: exports.packageStatusSechema.nullish(),
|
|
462
|
-
unit_of_measurement: zod_1.z.string().nullish(),
|
|
463
|
-
weight: zod_1.z.number(),
|
|
464
|
-
weight_unit: zod_1.z.string(),
|
|
465
|
-
width: zod_1.z.number(),
|
|
466
|
-
});
|
|
467
|
-
exports.shipmentExceptionTypeIdSchema = zod_1.z.enum([
|
|
468
|
-
'change_of_address_request',
|
|
469
|
-
'customs_information_required',
|
|
470
|
-
'damaged_items',
|
|
471
|
-
'direct_payment_required',
|
|
472
|
-
'held_at_customs',
|
|
473
|
-
'inaccurate_object_details',
|
|
474
|
-
'incorrect_address',
|
|
475
|
-
'lost_in_transit',
|
|
476
|
-
'not_ready_for_delivery',
|
|
477
|
-
'not_ready_for_release',
|
|
478
|
-
'other',
|
|
479
|
-
'prepayment_required',
|
|
480
|
-
'requested_hold_to_collect',
|
|
481
|
-
'requested_hold_to_deliver',
|
|
482
|
-
'wrong_item'
|
|
483
|
-
]);
|
|
484
|
-
exports.shipmentExceptionSchema = exports.datedSchema.extend({
|
|
485
|
-
exception_type_label: zod_1.z.string().nullish(),
|
|
486
|
-
id: zod_1.z.string().uuid(),
|
|
487
|
-
package_id: zod_1.z.number().nullish(),
|
|
488
|
-
resolution: zod_1.z.string().nullish(),
|
|
489
|
-
status: exports.shipmentExceptionStatusSchema,
|
|
490
|
-
type: exports.shipmentExceptionTypeIdSchema,
|
|
491
|
-
});
|
|
492
|
-
exports.shipmentScheduleSchema = zod_1.z.object({
|
|
493
|
-
delivery_end: zod_1.z.date().nullish(),
|
|
494
|
-
delivery_start: zod_1.z.date().nullish(),
|
|
495
|
-
delivery_window_modifier: zod_1.z.string(),
|
|
496
|
-
pickup_end: zod_1.z.date().nullish(),
|
|
497
|
-
pickup_start: zod_1.z.date().nullish(),
|
|
498
|
-
pickup_window_modifier: zod_1.z.string()
|
|
499
|
-
});
|
|
500
|
-
exports.shipmentTrackingSchema = zod_1.z.object({
|
|
501
|
-
carrier_name: zod_1.z.string(),
|
|
502
|
-
label_url: zod_1.z.string().nullish(),
|
|
503
|
-
package_id: zod_1.z.number(),
|
|
504
|
-
tracking_number: zod_1.z.string(),
|
|
505
|
-
url: zod_1.z.string(),
|
|
506
|
-
});
|
|
507
|
-
exports.eeiFormStatusSchema = zod_1.z.enum([
|
|
508
|
-
'pending',
|
|
509
|
-
'cleared',
|
|
510
|
-
'approved',
|
|
511
|
-
'rejected',
|
|
512
|
-
'submitted'
|
|
513
|
-
]);
|
|
514
|
-
exports.shipmentStatusSchema = zod_1.z.enum([
|
|
515
|
-
'pending',
|
|
516
|
-
'confirmed',
|
|
517
|
-
'collected',
|
|
518
|
-
'in_transit',
|
|
519
|
-
'completed'
|
|
520
|
-
]);
|
|
521
|
-
exports.shipmentSchema = exports.datedSchema.extend({
|
|
522
|
-
id: zod_1.z.string().uuid(),
|
|
523
|
-
destination: exports.artaLocationSchema,
|
|
524
|
-
eei_form_status: exports.eeiFormStatusSchema.nullish(),
|
|
525
|
-
emissions: zod_1.z.number().nullish(),
|
|
526
|
-
emissions_unit: zod_1.z.string().nullish(),
|
|
527
|
-
exceptions: zod_1.z.array(exports.shipmentExceptionSchema).nullish(),
|
|
528
|
-
hosted_session_id: zod_1.z.number().nullish(),
|
|
529
|
-
insurance_policy: exports.insurancePolicySchema.nullish(),
|
|
530
|
-
internal_reference: zod_1.z.string().nullish(),
|
|
531
|
-
log_request_id: zod_1.z.string().nullish(),
|
|
532
|
-
object_count: zod_1.z.number(),
|
|
533
|
-
origin: exports.artaLocationSchema,
|
|
534
|
-
package_count: zod_1.z.number(),
|
|
535
|
-
packages: zod_1.z.array(exports.packageSchema).nullish(),
|
|
536
|
-
payment_process: exports.paymentProcessSchema.nullish(),
|
|
537
|
-
public_reference: zod_1.z.string().nullish(),
|
|
538
|
-
quote_type: exports.quoteTypeSchema,
|
|
539
|
-
schedule: exports.shipmentScheduleSchema.nullish(),
|
|
540
|
-
services: zod_1.z.array(exports.artaServiceSchema).nullish(),
|
|
541
|
-
shipping_notes: zod_1.z.string().nullish(),
|
|
542
|
-
shortcode: zod_1.z.string(),
|
|
543
|
-
status: exports.shipmentStatusSchema,
|
|
544
|
-
total: zod_1.z.number(),
|
|
545
|
-
total_currency: exports.supportedCurrencySchema,
|
|
546
|
-
url: zod_1.z.string().nullish(),
|
|
547
|
-
tracking: zod_1.z.array(exports.shipmentTrackingSchema).nullish(),
|
|
548
|
-
});
|
|
549
|
-
exports.attatchmentSchema = exports.datedSchema.extend({
|
|
550
|
-
id: numId,
|
|
551
|
-
upload_id: numId,
|
|
552
|
-
request_id: zod_1.z.string().nullish(),
|
|
553
|
-
shipment_id: zod_1.z.string().nullish(),
|
|
554
|
-
});
|
|
555
|
-
exports.emailNotificationIdSchema = zod_1.z.enum([
|
|
556
|
-
'booking',
|
|
557
|
-
'cancelled',
|
|
558
|
-
'collected',
|
|
559
|
-
'collection',
|
|
560
|
-
'complete',
|
|
561
|
-
'custom_quoted_dashboard',
|
|
562
|
-
'in_transit',
|
|
563
|
-
'invoice',
|
|
564
|
-
'self_ship_label',
|
|
565
|
-
'payment',
|
|
566
|
-
'scheduling',
|
|
567
|
-
'eei'
|
|
568
|
-
]);
|
|
569
|
-
exports.recipientSchema = zod_1.z.enum(['payer', 'origin', 'destination']);
|
|
570
|
-
exports.emailRuleSchema = exports.datedSchema.extend({
|
|
571
|
-
id: numId,
|
|
572
|
-
email_notification_id: exports.emailNotificationIdSchema,
|
|
573
|
-
recipients: zod_1.z.array(exports.recipientSchema),
|
|
574
|
-
});
|
|
575
|
-
exports.emailSubscriptionSchema = exports.datedSchema.extend({
|
|
576
|
-
id: numId,
|
|
577
|
-
email_notification_ids: zod_1.z.array(exports.emailNotificationIdSchema),
|
|
578
|
-
email_address: zod_1.z.string(),
|
|
579
|
-
name: zod_1.z.string().nullish(),
|
|
580
|
-
});
|
|
581
|
-
exports.hostedSessionSchema = exports.datedSchema.extend({
|
|
582
|
-
id: numId,
|
|
583
|
-
additional_services: zod_1.z.array(exports.additionalServiceSchema).nullish(),
|
|
584
|
-
cancel_url: zod_1.z.string().nullish(),
|
|
585
|
-
destination: exports.artaLocationSchema.nullish(),
|
|
586
|
-
insurance: exports.insuranceSchema.nullish(),
|
|
587
|
-
internal_reference: zod_1.z.string().nullish(),
|
|
588
|
-
objects: zod_1.z.array(exports.artaObjectSchema),
|
|
589
|
-
origin: exports.artaLocationSchema,
|
|
590
|
-
preferred_quote_types: zod_1.z.array(exports.quoteTypeSchema).nullish(),
|
|
591
|
-
public_reference: zod_1.z.string().nullish(),
|
|
592
|
-
shipping_notes: zod_1.z.string().nullish(),
|
|
593
|
-
success_url: zod_1.z.string().nullish(),
|
|
594
|
-
payment_process: exports.paymentProcessSchema,
|
|
595
|
-
private_token: zod_1.z.string(),
|
|
596
|
-
shortcode: zod_1.z.string(),
|
|
597
|
-
status: exports.quoteRequestStatusSchema,
|
|
598
|
-
url: zod_1.z.string().nullish()
|
|
599
|
-
});
|
|
600
|
-
exports.invoicePaymentSchema = exports.datedSchema.extend({
|
|
601
|
-
id: numId,
|
|
602
|
-
amount: zod_1.z.number(),
|
|
603
|
-
amount_currency: exports.supportedCurrencySchema,
|
|
604
|
-
credit_id: zod_1.z.string().nullish(),
|
|
605
|
-
invoice_id: zod_1.z.string().nullish(),
|
|
606
|
-
paid_on: zod_1.z.date(),
|
|
607
|
-
payment_id: zod_1.z.string().nullish(),
|
|
608
|
-
shipment_id: zod_1.z.string().nullish()
|
|
609
|
-
});
|
|
610
|
-
exports.invoiceSchema = exports.datedSchema.extend({
|
|
611
|
-
id: numId,
|
|
612
|
-
amount_owed: zod_1.z.number(),
|
|
613
|
-
amount_owed_currency: exports.supportedCurrencySchema,
|
|
614
|
-
amount_paid: zod_1.z.number(),
|
|
615
|
-
amount_paid_currency: exports.supportedCurrencySchema,
|
|
616
|
-
issued_on: zod_1.z.date().nullish(),
|
|
617
|
-
shipment_id: zod_1.z.string().nullish(),
|
|
618
|
-
status: zod_1.z.string(),
|
|
619
|
-
updated_at: zod_1.z.date(),
|
|
620
|
-
invoice_url: zod_1.z.string().nullish(),
|
|
621
|
-
});
|
|
622
|
-
exports.logSchema = exports.datedSchema.extend({
|
|
623
|
-
id: numId,
|
|
624
|
-
api_key_id: numId,
|
|
625
|
-
arta_version: zod_1.z.string(),
|
|
626
|
-
end_at: zod_1.z.date(),
|
|
627
|
-
method: zod_1.z.string(),
|
|
628
|
-
path: zod_1.z.string(),
|
|
629
|
-
query_params: zod_1.z.string(),
|
|
630
|
-
request_body: zod_1.z.string().nullish(),
|
|
631
|
-
request_id: zod_1.z.string(),
|
|
632
|
-
response_body: zod_1.z.string().nullish(),
|
|
633
|
-
start_at: zod_1.z.date(),
|
|
634
|
-
status: zod_1.z.number(),
|
|
635
|
-
});
|
|
636
|
-
exports.organizationSchema = exports.datedSchema.extend({
|
|
637
|
-
api_version: zod_1.z.string(),
|
|
638
|
-
id: numId,
|
|
639
|
-
name: zod_1.z.string(),
|
|
640
|
-
billing_terms: zod_1.z.string().nullish(),
|
|
641
|
-
company_name: zod_1.z.string().nullish(),
|
|
642
|
-
display_name: zod_1.z.string().nullish(),
|
|
643
|
-
shortcode: zod_1.z.string().nullish(),
|
|
644
|
-
status: zod_1.z.string().nullish(),
|
|
645
|
-
stripe_customer_id: zod_1.z.string().nullish(),
|
|
646
|
-
});
|
|
647
|
-
exports.carrierSchema = zod_1.z.object({
|
|
648
|
-
code: zod_1.z.string(),
|
|
649
|
-
name: zod_1.z.string(),
|
|
650
|
-
phone_number: zod_1.z.string(),
|
|
651
|
-
url: zod_1.z.string(),
|
|
652
|
-
});
|
|
653
|
-
exports.trackingEventSchema = zod_1.z.object({
|
|
654
|
-
date: zod_1.z.date(),
|
|
655
|
-
location: zod_1.z.string(),
|
|
656
|
-
summary: zod_1.z.string(),
|
|
657
|
-
});
|
|
658
|
-
exports.trackingSchema = zod_1.z.object({
|
|
659
|
-
carrier: exports.carrierSchema,
|
|
660
|
-
events: zod_1.z.array(exports.trackingEventSchema),
|
|
661
|
-
status: zod_1.z.string(),
|
|
662
|
-
tracking_number: zod_1.z.string(),
|
|
663
|
-
});
|
|
664
|
-
exports.documentTypeSchema = zod_1.z.enum([
|
|
665
|
-
'bill_of_lading',
|
|
666
|
-
'certificate_of_insurance',
|
|
667
|
-
'certificate_of_insurance_template',
|
|
668
|
-
'condition_report',
|
|
669
|
-
'condition_check',
|
|
670
|
-
'image',
|
|
671
|
-
'instructions',
|
|
672
|
-
'airway_bill',
|
|
673
|
-
'commercial_invoice',
|
|
674
|
-
'power_of_attorney',
|
|
675
|
-
'proof_of_export',
|
|
676
|
-
'proof_of_delivery',
|
|
677
|
-
'quote',
|
|
678
|
-
'shipping_label',
|
|
679
|
-
'other',
|
|
680
|
-
]);
|
|
681
|
-
exports.mimeTypeSchema = zod_1.z.enum([
|
|
682
|
-
'application/pdf',
|
|
683
|
-
'application/vnd.ms-excel',
|
|
684
|
-
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
685
|
-
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
686
|
-
'image/jpeg',
|
|
687
|
-
'image/png',
|
|
688
|
-
'text/csv',
|
|
689
|
-
'video/mp4',
|
|
690
|
-
'video/quicktime',
|
|
691
|
-
'application/msword',
|
|
692
|
-
]);
|
|
693
|
-
exports.uploadSchema = exports.datedSchema.extend({
|
|
694
|
-
id: numId,
|
|
695
|
-
document_type: exports.documentTypeSchema,
|
|
696
|
-
document_type_label: zod_1.z.string().nullish(),
|
|
697
|
-
download_url: zod_1.z.string().nullish(),
|
|
698
|
-
file_name: zod_1.z.string(),
|
|
699
|
-
mime_type: exports.mimeTypeSchema,
|
|
700
|
-
size: zod_1.z.number(),
|
|
701
|
-
status: zod_1.z.string(),
|
|
702
|
-
presigned_url: zod_1.z.string(),
|
|
703
|
-
});
|
|
704
|
-
exports.webhookResourceTypeSchema = zod_1.z.enum(['ping', 'request', 'shipment']);
|
|
705
|
-
exports.webhookDeliveryStatusSchema = zod_1.z.enum(['delivered', 'failed']);
|
|
706
|
-
exports.webhookDeliveryTypeSchema = zod_1.z.enum([
|
|
707
|
-
'request.created',
|
|
708
|
-
'request.status.updated',
|
|
709
|
-
'shipment.created',
|
|
710
|
-
'shipment.eei_form_status.updated',
|
|
711
|
-
'shipment.schedule.updated',
|
|
712
|
-
'shipment.status.updated',
|
|
713
|
-
'shipment.tracking.updated',
|
|
714
|
-
'ping',
|
|
715
|
-
]);
|
|
716
|
-
exports.webhookDeliverySchema = exports.datedSchema.extend({
|
|
717
|
-
id: zod_1.z.string().uuid(),
|
|
718
|
-
resource_id: numId,
|
|
719
|
-
resource_type: exports.webhookResourceTypeSchema,
|
|
720
|
-
response_status_code: zod_1.z.number(),
|
|
721
|
-
status: exports.webhookDeliveryStatusSchema,
|
|
722
|
-
type: exports.webhookDeliveryTypeSchema,
|
|
723
|
-
webhook_id: numId,
|
|
724
|
-
webhook_url: zod_1.z.string(),
|
|
725
|
-
next_retry: zod_1.z.string().nullish(),
|
|
726
|
-
request_body: zod_1.z.string().nullish(),
|
|
727
|
-
response_body: zod_1.z.string().nullish()
|
|
728
|
-
});
|
|
729
|
-
exports.webhookSchema = exports.datedSchema.extend({
|
|
730
|
-
id: numId,
|
|
731
|
-
name: zod_1.z.string(),
|
|
732
|
-
url: zod_1.z.string(),
|
|
733
|
-
});
|