@shopickup/adapters-foxpost 0.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.
Files changed (47) hide show
  1. package/README.md +48 -0
  2. package/dist/capabilities/index.d.ts +9 -0
  3. package/dist/capabilities/index.d.ts.map +1 -0
  4. package/dist/capabilities/index.js +8 -0
  5. package/dist/capabilities/label.d.ts +27 -0
  6. package/dist/capabilities/label.d.ts.map +1 -0
  7. package/dist/capabilities/label.js +370 -0
  8. package/dist/capabilities/parcels.d.ts +21 -0
  9. package/dist/capabilities/parcels.d.ts.map +1 -0
  10. package/dist/capabilities/parcels.js +233 -0
  11. package/dist/capabilities/pickup-points.d.ts +38 -0
  12. package/dist/capabilities/pickup-points.d.ts.map +1 -0
  13. package/dist/capabilities/pickup-points.js +225 -0
  14. package/dist/capabilities/track.d.ts +16 -0
  15. package/dist/capabilities/track.d.ts.map +1 -0
  16. package/dist/capabilities/track.js +99 -0
  17. package/dist/client/index.d.ts +17 -0
  18. package/dist/client/index.d.ts.map +1 -0
  19. package/dist/client/index.js +30 -0
  20. package/dist/errors.d.ts +34 -0
  21. package/dist/errors.d.ts.map +1 -0
  22. package/dist/errors.js +165 -0
  23. package/dist/index.d.ts +119 -0
  24. package/dist/index.d.ts.map +1 -0
  25. package/dist/index.js +151 -0
  26. package/dist/mappers/index.d.ts +108 -0
  27. package/dist/mappers/index.d.ts.map +1 -0
  28. package/dist/mappers/index.js +270 -0
  29. package/dist/mappers/trackStatus.d.ts +58 -0
  30. package/dist/mappers/trackStatus.d.ts.map +1 -0
  31. package/dist/mappers/trackStatus.js +290 -0
  32. package/dist/types/generated.d.ts +177 -0
  33. package/dist/types/generated.d.ts.map +1 -0
  34. package/dist/types/generated.js +9 -0
  35. package/dist/types/index.d.ts +7 -0
  36. package/dist/types/index.d.ts.map +1 -0
  37. package/dist/types/index.js +6 -0
  38. package/dist/utils/httpUtils.d.ts +18 -0
  39. package/dist/utils/httpUtils.d.ts.map +1 -0
  40. package/dist/utils/httpUtils.js +33 -0
  41. package/dist/utils/resolveBaseUrl.d.ts +23 -0
  42. package/dist/utils/resolveBaseUrl.d.ts.map +1 -0
  43. package/dist/utils/resolveBaseUrl.js +19 -0
  44. package/dist/validation.d.ts +1723 -0
  45. package/dist/validation.d.ts.map +1 -0
  46. package/dist/validation.js +799 -0
  47. package/package.json +68 -0
@@ -0,0 +1,1723 @@
1
+ import { z } from 'zod';
2
+ import type { CreateParcelRequest as CoreCreateParcelRequest, CreateParcelsRequest as CoreCreateParcelsRequest, CreateLabelRequest as CoreCreateLabelRequest, CreateLabelsRequest as CoreCreateLabelsRequest } from '@shopickup/core';
3
+ /**
4
+ * Foxpost-specific credentials
5
+ * Requires both API key and basic auth together
6
+ * Extends Record<string, unknown> for compatibility with core types
7
+ */
8
+ export interface FoxpostCredentials extends Record<string, unknown> {
9
+ apiKey: string;
10
+ basicUsername: string;
11
+ basicPassword: string;
12
+ }
13
+ /**
14
+ * Foxpost package size schema (used in both HD and APM)
15
+ */
16
+ declare const FoxpostPackageSizeSchema: z.ZodEnum<{
17
+ XS: "XS";
18
+ S: "S";
19
+ 1: "1";
20
+ M: "M";
21
+ 2: "2";
22
+ L: "L";
23
+ 3: "3";
24
+ XL: "XL";
25
+ 4: "4";
26
+ 5: "5";
27
+ }>;
28
+ export type FoxpostPackageSize = z.infer<typeof FoxpostPackageSizeSchema>;
29
+ /**
30
+ * Home Delivery parcel schema with discriminator
31
+ */
32
+ declare const FoxpostParcelHDSchema: z.ZodObject<{
33
+ type: z.ZodLiteral<"HD">;
34
+ cod: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
35
+ comment: z.ZodOptional<z.ZodString>;
36
+ deliveryNote: z.ZodOptional<z.ZodString>;
37
+ fragile: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
38
+ label: z.ZodOptional<z.ZodBoolean>;
39
+ recipientAddress: z.ZodString;
40
+ recipientCity: z.ZodString;
41
+ recipientCountry: z.ZodOptional<z.ZodString>;
42
+ recipientEmail: z.ZodEmail;
43
+ recipientName: z.ZodString;
44
+ recipientPhone: z.ZodString;
45
+ recipientZip: z.ZodString;
46
+ refCode: z.ZodOptional<z.ZodString>;
47
+ size: z.ZodEnum<{
48
+ XS: "XS";
49
+ S: "S";
50
+ 1: "1";
51
+ M: "M";
52
+ 2: "2";
53
+ L: "L";
54
+ 3: "3";
55
+ XL: "XL";
56
+ 4: "4";
57
+ 5: "5";
58
+ }>;
59
+ }, z.core.$strict>;
60
+ /**
61
+ * APM (Automated Parcel Machine) parcel schema with discriminator
62
+ */
63
+ declare const FoxpostParcelAPMSchema: z.ZodObject<{
64
+ type: z.ZodLiteral<"APM">;
65
+ cod: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
66
+ comment: z.ZodOptional<z.ZodString>;
67
+ destination: z.ZodString;
68
+ label: z.ZodOptional<z.ZodBoolean>;
69
+ recipientEmail: z.ZodEmail;
70
+ recipientName: z.ZodString;
71
+ recipientPhone: z.ZodString;
72
+ refCode: z.ZodOptional<z.ZodString>;
73
+ size: z.ZodEnum<{
74
+ XS: "XS";
75
+ S: "S";
76
+ 1: "1";
77
+ M: "M";
78
+ 2: "2";
79
+ L: "L";
80
+ 3: "3";
81
+ XL: "XL";
82
+ 4: "4";
83
+ 5: "5";
84
+ }>;
85
+ uniqueBarcode: z.ZodOptional<z.ZodString>;
86
+ }, z.core.$strict>;
87
+ /**
88
+ * Discriminated union of HD and APM parcel types
89
+ */
90
+ export declare const FoxpostParcelSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
91
+ type: z.ZodLiteral<"HD">;
92
+ cod: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
93
+ comment: z.ZodOptional<z.ZodString>;
94
+ deliveryNote: z.ZodOptional<z.ZodString>;
95
+ fragile: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
96
+ label: z.ZodOptional<z.ZodBoolean>;
97
+ recipientAddress: z.ZodString;
98
+ recipientCity: z.ZodString;
99
+ recipientCountry: z.ZodOptional<z.ZodString>;
100
+ recipientEmail: z.ZodEmail;
101
+ recipientName: z.ZodString;
102
+ recipientPhone: z.ZodString;
103
+ recipientZip: z.ZodString;
104
+ refCode: z.ZodOptional<z.ZodString>;
105
+ size: z.ZodEnum<{
106
+ XS: "XS";
107
+ S: "S";
108
+ 1: "1";
109
+ M: "M";
110
+ 2: "2";
111
+ L: "L";
112
+ 3: "3";
113
+ XL: "XL";
114
+ 4: "4";
115
+ 5: "5";
116
+ }>;
117
+ }, z.core.$strict>, z.ZodObject<{
118
+ type: z.ZodLiteral<"APM">;
119
+ cod: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
120
+ comment: z.ZodOptional<z.ZodString>;
121
+ destination: z.ZodString;
122
+ label: z.ZodOptional<z.ZodBoolean>;
123
+ recipientEmail: z.ZodEmail;
124
+ recipientName: z.ZodString;
125
+ recipientPhone: z.ZodString;
126
+ refCode: z.ZodOptional<z.ZodString>;
127
+ size: z.ZodEnum<{
128
+ XS: "XS";
129
+ S: "S";
130
+ 1: "1";
131
+ M: "M";
132
+ 2: "2";
133
+ L: "L";
134
+ 3: "3";
135
+ XL: "XL";
136
+ 4: "4";
137
+ 5: "5";
138
+ }>;
139
+ uniqueBarcode: z.ZodOptional<z.ZodString>;
140
+ }, z.core.$strict>], "type">;
141
+ /**
142
+ * Exported types inferred from Zod schemas (single source of truth)
143
+ */
144
+ export type FoxpostParcel = z.infer<typeof FoxpostParcelSchema>;
145
+ export type FoxpostParcelHD = z.infer<typeof FoxpostParcelHDSchema>;
146
+ export type FoxpostParcelAPM = z.infer<typeof FoxpostParcelAPMSchema>;
147
+ /**
148
+ * Foxpost-specific CreateParcelRequest (narrowed credentials)
149
+ */
150
+ export interface CreateParcelRequestFoxpost extends CoreCreateParcelRequest {
151
+ credentials: FoxpostCredentials;
152
+ }
153
+ /**
154
+ * Foxpost-specific CreateParcelsRequest (narrowed credentials)
155
+ */
156
+ export interface CreateParcelsRequestFoxpost extends CoreCreateParcelsRequest {
157
+ credentials: FoxpostCredentials;
158
+ }
159
+ /**
160
+ * Foxpost-specific CreateLabelRequest (narrowed credentials + nested foxpost options)
161
+ */
162
+ export interface CreateLabelRequestFoxpost extends CoreCreateLabelRequest {
163
+ credentials: FoxpostCredentials;
164
+ options?: {
165
+ useTestApi?: boolean;
166
+ size?: 'A6' | 'A7' | '_85X85';
167
+ foxpost?: {
168
+ startPos?: number;
169
+ isPortrait?: boolean;
170
+ };
171
+ };
172
+ }
173
+ /**
174
+ * Foxpost-specific CreateLabelsRequest (narrowed credentials + nested foxpost options)
175
+ */
176
+ export interface CreateLabelsRequestFoxpost extends CoreCreateLabelsRequest {
177
+ credentials: FoxpostCredentials;
178
+ options?: {
179
+ useTestApi?: boolean;
180
+ size?: 'A6' | 'A7' | '_85X85';
181
+ foxpost?: {
182
+ startPos?: number;
183
+ isPortrait?: boolean;
184
+ };
185
+ };
186
+ }
187
+ /**
188
+ * CreateParcelRequest Zod schema
189
+ */
190
+ export declare const CreateParcelRequestFoxpostSchema: z.ZodObject<{
191
+ parcel: z.ZodObject<{
192
+ id: z.ZodString;
193
+ shipper: z.ZodObject<{
194
+ contact: z.ZodObject<{
195
+ name: z.ZodString;
196
+ phone: z.ZodOptional<z.ZodString>;
197
+ email: z.ZodOptional<z.ZodString>;
198
+ company: z.ZodOptional<z.ZodString>;
199
+ }, z.core.$strip>;
200
+ address: z.ZodObject<{
201
+ name: z.ZodString;
202
+ street: z.ZodString;
203
+ city: z.ZodString;
204
+ postalCode: z.ZodString;
205
+ country: z.ZodString;
206
+ phone: z.ZodOptional<z.ZodString>;
207
+ email: z.ZodOptional<z.ZodEmail>;
208
+ company: z.ZodOptional<z.ZodString>;
209
+ province: z.ZodOptional<z.ZodString>;
210
+ isPoBox: z.ZodOptional<z.ZodBoolean>;
211
+ }, z.core.$strip>;
212
+ }, z.core.$strip>;
213
+ recipient: z.ZodObject<{
214
+ contact: z.ZodObject<{
215
+ name: z.ZodString;
216
+ phone: z.ZodOptional<z.ZodString>;
217
+ email: z.ZodOptional<z.ZodString>;
218
+ company: z.ZodOptional<z.ZodString>;
219
+ }, z.core.$strip>;
220
+ delivery: z.ZodDiscriminatedUnion<[z.ZodObject<{
221
+ method: z.ZodLiteral<"HOME">;
222
+ address: z.ZodObject<{
223
+ name: z.ZodString;
224
+ street: z.ZodString;
225
+ city: z.ZodString;
226
+ postalCode: z.ZodString;
227
+ country: z.ZodString;
228
+ phone: z.ZodOptional<z.ZodString>;
229
+ email: z.ZodOptional<z.ZodEmail>;
230
+ company: z.ZodOptional<z.ZodString>;
231
+ province: z.ZodOptional<z.ZodString>;
232
+ isPoBox: z.ZodOptional<z.ZodBoolean>;
233
+ }, z.core.$strip>;
234
+ instructions: z.ZodOptional<z.ZodString>;
235
+ }, z.core.$strip>, z.ZodObject<{
236
+ method: z.ZodLiteral<"PICKUP_POINT">;
237
+ pickupPoint: z.ZodObject<{
238
+ id: z.ZodString;
239
+ provider: z.ZodOptional<z.ZodString>;
240
+ name: z.ZodOptional<z.ZodString>;
241
+ address: z.ZodOptional<z.ZodObject<{
242
+ name: z.ZodString;
243
+ street: z.ZodString;
244
+ city: z.ZodString;
245
+ postalCode: z.ZodString;
246
+ country: z.ZodString;
247
+ phone: z.ZodOptional<z.ZodString>;
248
+ email: z.ZodOptional<z.ZodEmail>;
249
+ company: z.ZodOptional<z.ZodString>;
250
+ province: z.ZodOptional<z.ZodString>;
251
+ isPoBox: z.ZodOptional<z.ZodBoolean>;
252
+ }, z.core.$strip>>;
253
+ type: z.ZodOptional<z.ZodEnum<{
254
+ LOCKER: "LOCKER";
255
+ SHOP: "SHOP";
256
+ POST_OFFICE: "POST_OFFICE";
257
+ OTHER: "OTHER";
258
+ }>>;
259
+ }, z.core.$strip>;
260
+ instructions: z.ZodOptional<z.ZodString>;
261
+ }, z.core.$strip>], "method">;
262
+ }, z.core.$strip>;
263
+ carrierIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
264
+ service: z.ZodEnum<{
265
+ standard: "standard";
266
+ express: "express";
267
+ economy: "economy";
268
+ overnight: "overnight";
269
+ }>;
270
+ carrierServiceCode: z.ZodOptional<z.ZodString>;
271
+ package: z.ZodObject<{
272
+ weightGrams: z.ZodNumber;
273
+ dimensionsCm: z.ZodOptional<z.ZodObject<{
274
+ length: z.ZodNumber;
275
+ width: z.ZodNumber;
276
+ height: z.ZodNumber;
277
+ }, z.core.$strip>>;
278
+ }, z.core.$strip>;
279
+ handling: z.ZodOptional<z.ZodObject<{
280
+ fragile: z.ZodOptional<z.ZodBoolean>;
281
+ perishables: z.ZodOptional<z.ZodBoolean>;
282
+ batteries: z.ZodOptional<z.ZodEnum<{
283
+ NONE: "NONE";
284
+ LITHIUM_ION: "LITHIUM_ION";
285
+ LITHIUM_METAL: "LITHIUM_METAL";
286
+ }>>;
287
+ }, z.core.$strip>>;
288
+ cod: z.ZodOptional<z.ZodObject<{
289
+ amount: z.ZodObject<{
290
+ amount: z.ZodNumber;
291
+ currency: z.ZodString;
292
+ }, z.core.$strip>;
293
+ reference: z.ZodOptional<z.ZodString>;
294
+ }, z.core.$strip>>;
295
+ declaredValue: z.ZodOptional<z.ZodObject<{
296
+ amount: z.ZodNumber;
297
+ currency: z.ZodString;
298
+ }, z.core.$strip>>;
299
+ insurance: z.ZodOptional<z.ZodObject<{
300
+ amount: z.ZodObject<{
301
+ amount: z.ZodNumber;
302
+ currency: z.ZodString;
303
+ }, z.core.$strip>;
304
+ }, z.core.$strip>>;
305
+ references: z.ZodOptional<z.ZodObject<{
306
+ orderId: z.ZodOptional<z.ZodString>;
307
+ customerReference: z.ZodOptional<z.ZodString>;
308
+ }, z.core.$strip>>;
309
+ items: z.ZodOptional<z.ZodArray<z.ZodObject<{
310
+ sku: z.ZodOptional<z.ZodString>;
311
+ quantity: z.ZodNumber;
312
+ description: z.ZodOptional<z.ZodString>;
313
+ weight: z.ZodOptional<z.ZodNumber>;
314
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
315
+ }, z.core.$strip>>>;
316
+ status: z.ZodOptional<z.ZodEnum<{
317
+ draft: "draft";
318
+ created: "created";
319
+ closed: "closed";
320
+ label_generated: "label_generated";
321
+ shipped: "shipped";
322
+ delivered: "delivered";
323
+ exception: "exception";
324
+ }>>;
325
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
326
+ createdAt: z.ZodOptional<z.ZodDate>;
327
+ updatedAt: z.ZodOptional<z.ZodDate>;
328
+ }, z.core.$strict>;
329
+ credentials: z.ZodObject<{
330
+ apiKey: z.ZodString;
331
+ basicUsername: z.ZodString;
332
+ basicPassword: z.ZodString;
333
+ }, z.core.$strict>;
334
+ options: z.ZodOptional<z.ZodObject<{
335
+ useTestApi: z.ZodOptional<z.ZodBoolean>;
336
+ }, z.core.$strip>>;
337
+ }, z.core.$strip>;
338
+ export declare const CreateParcelsRequestFoxpostSchema: z.ZodObject<{
339
+ parcels: z.ZodArray<z.ZodObject<{
340
+ id: z.ZodString;
341
+ shipper: z.ZodObject<{
342
+ contact: z.ZodObject<{
343
+ name: z.ZodString;
344
+ phone: z.ZodOptional<z.ZodString>;
345
+ email: z.ZodOptional<z.ZodString>;
346
+ company: z.ZodOptional<z.ZodString>;
347
+ }, z.core.$strip>;
348
+ address: z.ZodObject<{
349
+ name: z.ZodString;
350
+ street: z.ZodString;
351
+ city: z.ZodString;
352
+ postalCode: z.ZodString;
353
+ country: z.ZodString;
354
+ phone: z.ZodOptional<z.ZodString>;
355
+ email: z.ZodOptional<z.ZodEmail>;
356
+ company: z.ZodOptional<z.ZodString>;
357
+ province: z.ZodOptional<z.ZodString>;
358
+ isPoBox: z.ZodOptional<z.ZodBoolean>;
359
+ }, z.core.$strip>;
360
+ }, z.core.$strip>;
361
+ recipient: z.ZodObject<{
362
+ contact: z.ZodObject<{
363
+ name: z.ZodString;
364
+ phone: z.ZodOptional<z.ZodString>;
365
+ email: z.ZodOptional<z.ZodString>;
366
+ company: z.ZodOptional<z.ZodString>;
367
+ }, z.core.$strip>;
368
+ delivery: z.ZodDiscriminatedUnion<[z.ZodObject<{
369
+ method: z.ZodLiteral<"HOME">;
370
+ address: z.ZodObject<{
371
+ name: z.ZodString;
372
+ street: z.ZodString;
373
+ city: z.ZodString;
374
+ postalCode: z.ZodString;
375
+ country: z.ZodString;
376
+ phone: z.ZodOptional<z.ZodString>;
377
+ email: z.ZodOptional<z.ZodEmail>;
378
+ company: z.ZodOptional<z.ZodString>;
379
+ province: z.ZodOptional<z.ZodString>;
380
+ isPoBox: z.ZodOptional<z.ZodBoolean>;
381
+ }, z.core.$strip>;
382
+ instructions: z.ZodOptional<z.ZodString>;
383
+ }, z.core.$strip>, z.ZodObject<{
384
+ method: z.ZodLiteral<"PICKUP_POINT">;
385
+ pickupPoint: z.ZodObject<{
386
+ id: z.ZodString;
387
+ provider: z.ZodOptional<z.ZodString>;
388
+ name: z.ZodOptional<z.ZodString>;
389
+ address: z.ZodOptional<z.ZodObject<{
390
+ name: z.ZodString;
391
+ street: z.ZodString;
392
+ city: z.ZodString;
393
+ postalCode: z.ZodString;
394
+ country: z.ZodString;
395
+ phone: z.ZodOptional<z.ZodString>;
396
+ email: z.ZodOptional<z.ZodEmail>;
397
+ company: z.ZodOptional<z.ZodString>;
398
+ province: z.ZodOptional<z.ZodString>;
399
+ isPoBox: z.ZodOptional<z.ZodBoolean>;
400
+ }, z.core.$strip>>;
401
+ type: z.ZodOptional<z.ZodEnum<{
402
+ LOCKER: "LOCKER";
403
+ SHOP: "SHOP";
404
+ POST_OFFICE: "POST_OFFICE";
405
+ OTHER: "OTHER";
406
+ }>>;
407
+ }, z.core.$strip>;
408
+ instructions: z.ZodOptional<z.ZodString>;
409
+ }, z.core.$strip>], "method">;
410
+ }, z.core.$strip>;
411
+ carrierIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
412
+ service: z.ZodEnum<{
413
+ standard: "standard";
414
+ express: "express";
415
+ economy: "economy";
416
+ overnight: "overnight";
417
+ }>;
418
+ carrierServiceCode: z.ZodOptional<z.ZodString>;
419
+ package: z.ZodObject<{
420
+ weightGrams: z.ZodNumber;
421
+ dimensionsCm: z.ZodOptional<z.ZodObject<{
422
+ length: z.ZodNumber;
423
+ width: z.ZodNumber;
424
+ height: z.ZodNumber;
425
+ }, z.core.$strip>>;
426
+ }, z.core.$strip>;
427
+ handling: z.ZodOptional<z.ZodObject<{
428
+ fragile: z.ZodOptional<z.ZodBoolean>;
429
+ perishables: z.ZodOptional<z.ZodBoolean>;
430
+ batteries: z.ZodOptional<z.ZodEnum<{
431
+ NONE: "NONE";
432
+ LITHIUM_ION: "LITHIUM_ION";
433
+ LITHIUM_METAL: "LITHIUM_METAL";
434
+ }>>;
435
+ }, z.core.$strip>>;
436
+ cod: z.ZodOptional<z.ZodObject<{
437
+ amount: z.ZodObject<{
438
+ amount: z.ZodNumber;
439
+ currency: z.ZodString;
440
+ }, z.core.$strip>;
441
+ reference: z.ZodOptional<z.ZodString>;
442
+ }, z.core.$strip>>;
443
+ declaredValue: z.ZodOptional<z.ZodObject<{
444
+ amount: z.ZodNumber;
445
+ currency: z.ZodString;
446
+ }, z.core.$strip>>;
447
+ insurance: z.ZodOptional<z.ZodObject<{
448
+ amount: z.ZodObject<{
449
+ amount: z.ZodNumber;
450
+ currency: z.ZodString;
451
+ }, z.core.$strip>;
452
+ }, z.core.$strip>>;
453
+ references: z.ZodOptional<z.ZodObject<{
454
+ orderId: z.ZodOptional<z.ZodString>;
455
+ customerReference: z.ZodOptional<z.ZodString>;
456
+ }, z.core.$strip>>;
457
+ items: z.ZodOptional<z.ZodArray<z.ZodObject<{
458
+ sku: z.ZodOptional<z.ZodString>;
459
+ quantity: z.ZodNumber;
460
+ description: z.ZodOptional<z.ZodString>;
461
+ weight: z.ZodOptional<z.ZodNumber>;
462
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
463
+ }, z.core.$strip>>>;
464
+ status: z.ZodOptional<z.ZodEnum<{
465
+ draft: "draft";
466
+ created: "created";
467
+ closed: "closed";
468
+ label_generated: "label_generated";
469
+ shipped: "shipped";
470
+ delivered: "delivered";
471
+ exception: "exception";
472
+ }>>;
473
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
474
+ createdAt: z.ZodOptional<z.ZodDate>;
475
+ updatedAt: z.ZodOptional<z.ZodDate>;
476
+ }, z.core.$strict>>;
477
+ credentials: z.ZodObject<{
478
+ apiKey: z.ZodString;
479
+ basicUsername: z.ZodString;
480
+ basicPassword: z.ZodString;
481
+ }, z.core.$strict>;
482
+ options: z.ZodOptional<z.ZodObject<{
483
+ useTestApi: z.ZodOptional<z.ZodBoolean>;
484
+ }, z.core.$strip>>;
485
+ }, z.core.$strip>;
486
+ export declare const CreateLabelRequestFoxpostSchema: z.ZodObject<{
487
+ parcelCarrierId: z.ZodString;
488
+ credentials: z.ZodObject<{
489
+ apiKey: z.ZodString;
490
+ basicUsername: z.ZodString;
491
+ basicPassword: z.ZodString;
492
+ }, z.core.$strict>;
493
+ options: z.ZodOptional<z.ZodObject<{
494
+ useTestApi: z.ZodOptional<z.ZodBoolean>;
495
+ size: z.ZodDefault<z.ZodEnum<{
496
+ A6: "A6";
497
+ A7: "A7";
498
+ _85X85: "_85X85";
499
+ }>>;
500
+ foxpost: z.ZodOptional<z.ZodObject<{
501
+ startPos: z.ZodOptional<z.ZodNumber>;
502
+ isPortrait: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
503
+ }, z.core.$strip>>;
504
+ }, z.core.$strip>>;
505
+ }, z.core.$strip>;
506
+ /**
507
+ * Batch label request schema
508
+ * Similar to CreateParcelsRequest but for labels
509
+ */
510
+ export declare const CreateLabelsRequestFoxpostSchema: z.ZodObject<{
511
+ parcelCarrierIds: z.ZodArray<z.ZodString>;
512
+ credentials: z.ZodObject<{
513
+ apiKey: z.ZodString;
514
+ basicUsername: z.ZodString;
515
+ basicPassword: z.ZodString;
516
+ }, z.core.$strict>;
517
+ options: z.ZodOptional<z.ZodObject<{
518
+ useTestApi: z.ZodOptional<z.ZodBoolean>;
519
+ size: z.ZodDefault<z.ZodEnum<{
520
+ A6: "A6";
521
+ A7: "A7";
522
+ _85X85: "_85X85";
523
+ }>>;
524
+ foxpost: z.ZodOptional<z.ZodObject<{
525
+ startPos: z.ZodOptional<z.ZodNumber>;
526
+ isPortrait: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
527
+ }, z.core.$strip>>;
528
+ }, z.core.$strip>>;
529
+ }, z.core.$strip>;
530
+ /**
531
+ * Foxpost-specific TrackingRequest (narrowed credentials)
532
+ */
533
+ export interface TrackingRequestFoxpost {
534
+ trackingNumber: string;
535
+ credentials: FoxpostCredentials;
536
+ options?: {
537
+ useTestApi?: boolean;
538
+ };
539
+ }
540
+ /**
541
+ * TrackingRequest Zod schema
542
+ */
543
+ export declare const TrackingRequestFoxpostSchema: z.ZodObject<{
544
+ trackingNumber: z.ZodString;
545
+ credentials: z.ZodObject<{
546
+ apiKey: z.ZodString;
547
+ basicUsername: z.ZodString;
548
+ basicPassword: z.ZodString;
549
+ }, z.core.$strict>;
550
+ options: z.ZodOptional<z.ZodObject<{
551
+ useTestApi: z.ZodOptional<z.ZodBoolean>;
552
+ }, z.core.$strip>>;
553
+ }, z.core.$strip>;
554
+ /**
555
+ * Helper to validate and extract credentials from a request
556
+ * Throws ZodError if validation fails
557
+ */
558
+ export declare function validateFoxpostCredentials(credentials: unknown): FoxpostCredentials;
559
+ /**
560
+ * Helper to safely validate credentials without throwing
561
+ * Returns { success: true, data } or { success: false, error }
562
+ */
563
+ export declare function safeValidateFoxpostCredentials(credentials: unknown): z.ZodSafeParseResult<{
564
+ apiKey: string;
565
+ basicUsername: string;
566
+ basicPassword: string;
567
+ }>;
568
+ /**
569
+ * Helper to validate a CreateParcelRequest
570
+ * Returns parsed and validated request or throws ZodError
571
+ */
572
+ export declare function validateCreateParcelRequest(req: unknown): CreateParcelRequestFoxpost;
573
+ /**
574
+ * Helper to validate a CreateParcelsRequest
575
+ * Returns parsed and validated request or throws ZodError
576
+ */
577
+ export declare function validateCreateParcelsRequest(req: unknown): CreateParcelsRequestFoxpost;
578
+ /**
579
+ * Helper to safely validate without throwing
580
+ * Returns { success: true, data } or { success: false, error }
581
+ */
582
+ export declare function safeValidateCreateParcelRequest(req: unknown): z.ZodSafeParseResult<{
583
+ parcel: {
584
+ id: string;
585
+ shipper: {
586
+ contact: {
587
+ name: string;
588
+ phone?: string | undefined;
589
+ email?: string | undefined;
590
+ company?: string | undefined;
591
+ };
592
+ address: {
593
+ name: string;
594
+ street: string;
595
+ city: string;
596
+ postalCode: string;
597
+ country: string;
598
+ phone?: string | undefined;
599
+ email?: string | undefined;
600
+ company?: string | undefined;
601
+ province?: string | undefined;
602
+ isPoBox?: boolean | undefined;
603
+ };
604
+ };
605
+ recipient: {
606
+ contact: {
607
+ name: string;
608
+ phone?: string | undefined;
609
+ email?: string | undefined;
610
+ company?: string | undefined;
611
+ };
612
+ delivery: {
613
+ method: "HOME";
614
+ address: {
615
+ name: string;
616
+ street: string;
617
+ city: string;
618
+ postalCode: string;
619
+ country: string;
620
+ phone?: string | undefined;
621
+ email?: string | undefined;
622
+ company?: string | undefined;
623
+ province?: string | undefined;
624
+ isPoBox?: boolean | undefined;
625
+ };
626
+ instructions?: string | undefined;
627
+ } | {
628
+ method: "PICKUP_POINT";
629
+ pickupPoint: {
630
+ id: string;
631
+ provider?: string | undefined;
632
+ name?: string | undefined;
633
+ address?: {
634
+ name: string;
635
+ street: string;
636
+ city: string;
637
+ postalCode: string;
638
+ country: string;
639
+ phone?: string | undefined;
640
+ email?: string | undefined;
641
+ company?: string | undefined;
642
+ province?: string | undefined;
643
+ isPoBox?: boolean | undefined;
644
+ } | undefined;
645
+ type?: "LOCKER" | "SHOP" | "POST_OFFICE" | "OTHER" | undefined;
646
+ };
647
+ instructions?: string | undefined;
648
+ };
649
+ };
650
+ service: "standard" | "express" | "economy" | "overnight";
651
+ package: {
652
+ weightGrams: number;
653
+ dimensionsCm?: {
654
+ length: number;
655
+ width: number;
656
+ height: number;
657
+ } | undefined;
658
+ };
659
+ carrierIds?: Record<string, string> | undefined;
660
+ carrierServiceCode?: string | undefined;
661
+ handling?: {
662
+ fragile?: boolean | undefined;
663
+ perishables?: boolean | undefined;
664
+ batteries?: "NONE" | "LITHIUM_ION" | "LITHIUM_METAL" | undefined;
665
+ } | undefined;
666
+ cod?: {
667
+ amount: {
668
+ amount: number;
669
+ currency: string;
670
+ };
671
+ reference?: string | undefined;
672
+ } | undefined;
673
+ declaredValue?: {
674
+ amount: number;
675
+ currency: string;
676
+ } | undefined;
677
+ insurance?: {
678
+ amount: {
679
+ amount: number;
680
+ currency: string;
681
+ };
682
+ } | undefined;
683
+ references?: {
684
+ orderId?: string | undefined;
685
+ customerReference?: string | undefined;
686
+ } | undefined;
687
+ items?: {
688
+ quantity: number;
689
+ sku?: string | undefined;
690
+ description?: string | undefined;
691
+ weight?: number | undefined;
692
+ metadata?: Record<string, unknown> | undefined;
693
+ }[] | undefined;
694
+ status?: "draft" | "created" | "closed" | "label_generated" | "shipped" | "delivered" | "exception" | undefined;
695
+ metadata?: Record<string, unknown> | undefined;
696
+ createdAt?: Date | undefined;
697
+ updatedAt?: Date | undefined;
698
+ };
699
+ credentials: {
700
+ apiKey: string;
701
+ basicUsername: string;
702
+ basicPassword: string;
703
+ };
704
+ options?: {
705
+ useTestApi?: boolean | undefined;
706
+ } | undefined;
707
+ }>;
708
+ export declare function safeValidateCreateParcelsRequest(req: unknown): z.ZodSafeParseResult<{
709
+ parcels: {
710
+ id: string;
711
+ shipper: {
712
+ contact: {
713
+ name: string;
714
+ phone?: string | undefined;
715
+ email?: string | undefined;
716
+ company?: string | undefined;
717
+ };
718
+ address: {
719
+ name: string;
720
+ street: string;
721
+ city: string;
722
+ postalCode: string;
723
+ country: string;
724
+ phone?: string | undefined;
725
+ email?: string | undefined;
726
+ company?: string | undefined;
727
+ province?: string | undefined;
728
+ isPoBox?: boolean | undefined;
729
+ };
730
+ };
731
+ recipient: {
732
+ contact: {
733
+ name: string;
734
+ phone?: string | undefined;
735
+ email?: string | undefined;
736
+ company?: string | undefined;
737
+ };
738
+ delivery: {
739
+ method: "HOME";
740
+ address: {
741
+ name: string;
742
+ street: string;
743
+ city: string;
744
+ postalCode: string;
745
+ country: string;
746
+ phone?: string | undefined;
747
+ email?: string | undefined;
748
+ company?: string | undefined;
749
+ province?: string | undefined;
750
+ isPoBox?: boolean | undefined;
751
+ };
752
+ instructions?: string | undefined;
753
+ } | {
754
+ method: "PICKUP_POINT";
755
+ pickupPoint: {
756
+ id: string;
757
+ provider?: string | undefined;
758
+ name?: string | undefined;
759
+ address?: {
760
+ name: string;
761
+ street: string;
762
+ city: string;
763
+ postalCode: string;
764
+ country: string;
765
+ phone?: string | undefined;
766
+ email?: string | undefined;
767
+ company?: string | undefined;
768
+ province?: string | undefined;
769
+ isPoBox?: boolean | undefined;
770
+ } | undefined;
771
+ type?: "LOCKER" | "SHOP" | "POST_OFFICE" | "OTHER" | undefined;
772
+ };
773
+ instructions?: string | undefined;
774
+ };
775
+ };
776
+ service: "standard" | "express" | "economy" | "overnight";
777
+ package: {
778
+ weightGrams: number;
779
+ dimensionsCm?: {
780
+ length: number;
781
+ width: number;
782
+ height: number;
783
+ } | undefined;
784
+ };
785
+ carrierIds?: Record<string, string> | undefined;
786
+ carrierServiceCode?: string | undefined;
787
+ handling?: {
788
+ fragile?: boolean | undefined;
789
+ perishables?: boolean | undefined;
790
+ batteries?: "NONE" | "LITHIUM_ION" | "LITHIUM_METAL" | undefined;
791
+ } | undefined;
792
+ cod?: {
793
+ amount: {
794
+ amount: number;
795
+ currency: string;
796
+ };
797
+ reference?: string | undefined;
798
+ } | undefined;
799
+ declaredValue?: {
800
+ amount: number;
801
+ currency: string;
802
+ } | undefined;
803
+ insurance?: {
804
+ amount: {
805
+ amount: number;
806
+ currency: string;
807
+ };
808
+ } | undefined;
809
+ references?: {
810
+ orderId?: string | undefined;
811
+ customerReference?: string | undefined;
812
+ } | undefined;
813
+ items?: {
814
+ quantity: number;
815
+ sku?: string | undefined;
816
+ description?: string | undefined;
817
+ weight?: number | undefined;
818
+ metadata?: Record<string, unknown> | undefined;
819
+ }[] | undefined;
820
+ status?: "draft" | "created" | "closed" | "label_generated" | "shipped" | "delivered" | "exception" | undefined;
821
+ metadata?: Record<string, unknown> | undefined;
822
+ createdAt?: Date | undefined;
823
+ updatedAt?: Date | undefined;
824
+ }[];
825
+ credentials: {
826
+ apiKey: string;
827
+ basicUsername: string;
828
+ basicPassword: string;
829
+ };
830
+ options?: {
831
+ useTestApi?: boolean | undefined;
832
+ } | undefined;
833
+ }>;
834
+ /**
835
+ * Helper to safely validate a CreateLabelRequest without throwing
836
+ * Returns { success: true, data } or { success: false, error }
837
+ */
838
+ export declare function safeValidateCreateLabelRequest(req: unknown): z.ZodSafeParseResult<{
839
+ parcelCarrierId: string;
840
+ credentials: {
841
+ apiKey: string;
842
+ basicUsername: string;
843
+ basicPassword: string;
844
+ };
845
+ options?: {
846
+ size: "A6" | "A7" | "_85X85";
847
+ useTestApi?: boolean | undefined;
848
+ foxpost?: {
849
+ isPortrait: boolean;
850
+ startPos?: number | undefined;
851
+ } | undefined;
852
+ } | undefined;
853
+ }>;
854
+ /**
855
+ * Helper to safely validate a CreateLabelsRequest without throwing
856
+ * Returns { success: true, data } or { success: false, error }
857
+ */
858
+ export declare function safeValidateCreateLabelsRequest(req: unknown): z.ZodSafeParseResult<{
859
+ parcelCarrierIds: string[];
860
+ credentials: {
861
+ apiKey: string;
862
+ basicUsername: string;
863
+ basicPassword: string;
864
+ };
865
+ options?: {
866
+ size: "A6" | "A7" | "_85X85";
867
+ useTestApi?: boolean | undefined;
868
+ foxpost?: {
869
+ isPortrait: boolean;
870
+ startPos?: number | undefined;
871
+ } | undefined;
872
+ } | undefined;
873
+ }>;
874
+ /**
875
+ * Helper to safely validate a TrackingRequest without throwing
876
+ * Returns { success: true, data } or { success: false, error }
877
+ */
878
+ export declare function safeValidateTrackingRequest(req: unknown): z.ZodSafeParseResult<{
879
+ trackingNumber: string;
880
+ credentials: {
881
+ apiKey: string;
882
+ basicUsername: string;
883
+ basicPassword: string;
884
+ };
885
+ options?: {
886
+ useTestApi?: boolean | undefined;
887
+ } | undefined;
888
+ }>;
889
+ /**
890
+ * Validate a Foxpost parcel payload (after mapping from canonical Parcel)
891
+ * Used to catch mapping errors before sending to the carrier
892
+ */
893
+ export declare function validateFoxpostParcel(parcel: unknown): FoxpostParcel;
894
+ /**
895
+ * Safely validate a Foxpost parcel payload without throwing
896
+ * Returns { success: true, data } or { success: false, error }
897
+ */
898
+ export declare function safeValidateFoxpostParcel(parcel: unknown): z.ZodSafeParseResult<{
899
+ type: "HD";
900
+ cod: number;
901
+ fragile: boolean;
902
+ recipientAddress: string;
903
+ recipientCity: string;
904
+ recipientEmail: string;
905
+ recipientName: string;
906
+ recipientPhone: string;
907
+ recipientZip: string;
908
+ size: "XS" | "S" | "1" | "M" | "2" | "L" | "3" | "XL" | "4" | "5";
909
+ comment?: string | undefined;
910
+ deliveryNote?: string | undefined;
911
+ label?: boolean | undefined;
912
+ recipientCountry?: string | undefined;
913
+ refCode?: string | undefined;
914
+ } | {
915
+ type: "APM";
916
+ cod: number;
917
+ destination: string;
918
+ recipientEmail: string;
919
+ recipientName: string;
920
+ recipientPhone: string;
921
+ size: "XS" | "S" | "1" | "M" | "2" | "L" | "3" | "XL" | "4" | "5";
922
+ comment?: string | undefined;
923
+ label?: boolean | undefined;
924
+ refCode?: string | undefined;
925
+ uniqueBarcode?: string | undefined;
926
+ }>;
927
+ /**
928
+ * ============================================================================
929
+ * Foxpost Tracking Schemas (from OpenAPI /api/tracking/{barcode})
930
+ * ============================================================================
931
+ */
932
+ /**
933
+ * Trace enum from OpenAPI Trace.status
934
+ */
935
+ declare const TraceStatusEnum: z.ZodEnum<{
936
+ CREATE: "CREATE";
937
+ OPERIN: "OPERIN";
938
+ OPEROUT: "OPEROUT";
939
+ RECEIVE: "RECEIVE";
940
+ RETURN: "RETURN";
941
+ REDIRECT: "REDIRECT";
942
+ OVERTIMEOUT: "OVERTIMEOUT";
943
+ SORTIN: "SORTIN";
944
+ SORTOUT: "SORTOUT";
945
+ SLOTCHANGE: "SLOTCHANGE";
946
+ OVERTIMED: "OVERTIMED";
947
+ MPSIN: "MPSIN";
948
+ C2CIN: "C2CIN";
949
+ HDSENT: "HDSENT";
950
+ HDDEPO: "HDDEPO";
951
+ HDINTRANSIT: "HDINTRANSIT";
952
+ HDRETURN: "HDRETURN";
953
+ HDRECEIVE: "HDRECEIVE";
954
+ WBXREDIRECT: "WBXREDIRECT";
955
+ BACKTOSENDER: "BACKTOSENDER";
956
+ HDHUBIN: "HDHUBIN";
957
+ HDHUBOUT: "HDHUBOUT";
958
+ HDCOURIER: "HDCOURIER";
959
+ HDUNDELIVERABLE: "HDUNDELIVERABLE";
960
+ PREPAREDFORPD: "PREPAREDFORPD";
961
+ INWAREHOUSE: "INWAREHOUSE";
962
+ COLLECTSENT: "COLLECTSENT";
963
+ C2BIN: "C2BIN";
964
+ RETURNED: "RETURNED";
965
+ COLLECTED: "COLLECTED";
966
+ BACKLOGINFULL: "BACKLOGINFULL";
967
+ BACKLOGINFAIL: "BACKLOGINFAIL";
968
+ MISSORT: "MISSORT";
969
+ EMPTYSLOT: "EMPTYSLOT";
970
+ RESENT: "RESENT";
971
+ PREREDIRECT: "PREREDIRECT";
972
+ }>;
973
+ export type FoxpostTraceStatus = z.infer<typeof TraceStatusEnum>;
974
+ /**
975
+ * Trace schema (from OpenAPI components/schemas/Trace)
976
+ *
977
+ * Uses lenient validation with coercion to handle real API responses:
978
+ * - statusDate: coerces various date string formats to Date objects
979
+ * - statusStationId: coerces numbers to strings (API inconsistency)
980
+ * - Other fields: optional, pass through extra fields
981
+ */
982
+ declare const TraceSchema: z.ZodObject<{
983
+ statusDate: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
984
+ statusStationId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>]>>;
985
+ shortName: z.ZodOptional<z.ZodString>;
986
+ longName: z.ZodOptional<z.ZodString>;
987
+ status: z.ZodOptional<z.ZodEnum<{
988
+ CREATE: "CREATE";
989
+ OPERIN: "OPERIN";
990
+ OPEROUT: "OPEROUT";
991
+ RECEIVE: "RECEIVE";
992
+ RETURN: "RETURN";
993
+ REDIRECT: "REDIRECT";
994
+ OVERTIMEOUT: "OVERTIMEOUT";
995
+ SORTIN: "SORTIN";
996
+ SORTOUT: "SORTOUT";
997
+ SLOTCHANGE: "SLOTCHANGE";
998
+ OVERTIMED: "OVERTIMED";
999
+ MPSIN: "MPSIN";
1000
+ C2CIN: "C2CIN";
1001
+ HDSENT: "HDSENT";
1002
+ HDDEPO: "HDDEPO";
1003
+ HDINTRANSIT: "HDINTRANSIT";
1004
+ HDRETURN: "HDRETURN";
1005
+ HDRECEIVE: "HDRECEIVE";
1006
+ WBXREDIRECT: "WBXREDIRECT";
1007
+ BACKTOSENDER: "BACKTOSENDER";
1008
+ HDHUBIN: "HDHUBIN";
1009
+ HDHUBOUT: "HDHUBOUT";
1010
+ HDCOURIER: "HDCOURIER";
1011
+ HDUNDELIVERABLE: "HDUNDELIVERABLE";
1012
+ PREPAREDFORPD: "PREPAREDFORPD";
1013
+ INWAREHOUSE: "INWAREHOUSE";
1014
+ COLLECTSENT: "COLLECTSENT";
1015
+ C2BIN: "C2BIN";
1016
+ RETURNED: "RETURNED";
1017
+ COLLECTED: "COLLECTED";
1018
+ BACKLOGINFULL: "BACKLOGINFULL";
1019
+ BACKLOGINFAIL: "BACKLOGINFAIL";
1020
+ MISSORT: "MISSORT";
1021
+ EMPTYSLOT: "EMPTYSLOT";
1022
+ RESENT: "RESENT";
1023
+ PREREDIRECT: "PREREDIRECT";
1024
+ }>>;
1025
+ }, z.core.$loose>;
1026
+ export type FoxpostTrace = z.infer<typeof TraceSchema>;
1027
+ /**
1028
+ * TrackDTO schema (from OpenAPI components/schemas/TrackDTO)
1029
+ * Note: TrackDTO mirrors Trace but with trackId and slightly different names
1030
+ */
1031
+ declare const TrackDTOSchema: z.ZodObject<{
1032
+ trackId: z.ZodOptional<z.ZodNumber>;
1033
+ status: z.ZodOptional<z.ZodString>;
1034
+ statusDate: z.ZodPipe<z.ZodUnion<[z.ZodString, z.ZodString]>, z.ZodTransform<Date, string>>;
1035
+ }, z.core.$strict>;
1036
+ export type FoxpostTrackDTO = z.infer<typeof TrackDTOSchema>;
1037
+ /**
1038
+ * Parcel type enum from OpenAPI Tracking.parcelType
1039
+ */
1040
+ declare const FoxpostParcelTypeEnum: z.ZodEnum<{
1041
+ NORMAL: "NORMAL";
1042
+ RE: "RE";
1043
+ XRE: "XRE";
1044
+ IRE: "IRE";
1045
+ C2B: "C2B";
1046
+ }>;
1047
+ export type FoxpostParcelType = z.infer<typeof FoxpostParcelTypeEnum>;
1048
+ /**
1049
+ * Send type enum from OpenAPI Tracking.sendType
1050
+ */
1051
+ declare const FoxpostSendTypeEnum: z.ZodEnum<{
1052
+ HD: "HD";
1053
+ APM: "APM";
1054
+ COLLECT: "COLLECT";
1055
+ }>;
1056
+ export type FoxpostSendType = z.infer<typeof FoxpostSendTypeEnum>;
1057
+ /**
1058
+ * Tracking schema (from OpenAPI components/schemas/Tracking)
1059
+ * This is the response from GET /api/tracking/{barcode}
1060
+ *
1061
+ * Uses lenient validation to handle API quirks:
1062
+ * - All fields optional
1063
+ * - estimatedDelivery can be null or string
1064
+ * - Passes through extra fields from API
1065
+ */
1066
+ declare const FoxpostTrackingSchema: z.ZodObject<{
1067
+ clFox: z.ZodOptional<z.ZodString>;
1068
+ parcelType: z.ZodOptional<z.ZodEnum<{
1069
+ NORMAL: "NORMAL";
1070
+ RE: "RE";
1071
+ XRE: "XRE";
1072
+ IRE: "IRE";
1073
+ C2B: "C2B";
1074
+ }>>;
1075
+ sendType: z.ZodOptional<z.ZodEnum<{
1076
+ HD: "HD";
1077
+ APM: "APM";
1078
+ COLLECT: "COLLECT";
1079
+ }>>;
1080
+ traces: z.ZodOptional<z.ZodArray<z.ZodObject<{
1081
+ statusDate: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
1082
+ statusStationId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>]>>;
1083
+ shortName: z.ZodOptional<z.ZodString>;
1084
+ longName: z.ZodOptional<z.ZodString>;
1085
+ status: z.ZodOptional<z.ZodEnum<{
1086
+ CREATE: "CREATE";
1087
+ OPERIN: "OPERIN";
1088
+ OPEROUT: "OPEROUT";
1089
+ RECEIVE: "RECEIVE";
1090
+ RETURN: "RETURN";
1091
+ REDIRECT: "REDIRECT";
1092
+ OVERTIMEOUT: "OVERTIMEOUT";
1093
+ SORTIN: "SORTIN";
1094
+ SORTOUT: "SORTOUT";
1095
+ SLOTCHANGE: "SLOTCHANGE";
1096
+ OVERTIMED: "OVERTIMED";
1097
+ MPSIN: "MPSIN";
1098
+ C2CIN: "C2CIN";
1099
+ HDSENT: "HDSENT";
1100
+ HDDEPO: "HDDEPO";
1101
+ HDINTRANSIT: "HDINTRANSIT";
1102
+ HDRETURN: "HDRETURN";
1103
+ HDRECEIVE: "HDRECEIVE";
1104
+ WBXREDIRECT: "WBXREDIRECT";
1105
+ BACKTOSENDER: "BACKTOSENDER";
1106
+ HDHUBIN: "HDHUBIN";
1107
+ HDHUBOUT: "HDHUBOUT";
1108
+ HDCOURIER: "HDCOURIER";
1109
+ HDUNDELIVERABLE: "HDUNDELIVERABLE";
1110
+ PREPAREDFORPD: "PREPAREDFORPD";
1111
+ INWAREHOUSE: "INWAREHOUSE";
1112
+ COLLECTSENT: "COLLECTSENT";
1113
+ C2BIN: "C2BIN";
1114
+ RETURNED: "RETURNED";
1115
+ COLLECTED: "COLLECTED";
1116
+ BACKLOGINFULL: "BACKLOGINFULL";
1117
+ BACKLOGINFAIL: "BACKLOGINFAIL";
1118
+ MISSORT: "MISSORT";
1119
+ EMPTYSLOT: "EMPTYSLOT";
1120
+ RESENT: "RESENT";
1121
+ PREREDIRECT: "PREREDIRECT";
1122
+ }>>;
1123
+ }, z.core.$loose>>>;
1124
+ relatedParcel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1125
+ estimatedDelivery: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1126
+ }, z.core.$loose>;
1127
+ export type FoxpostTracking = z.infer<typeof FoxpostTrackingSchema>;
1128
+ /**
1129
+ * Helper to validate a Foxpost tracking response
1130
+ * Throws ZodError if validation fails
1131
+ */
1132
+ export declare function validateFoxpostTracking(res: unknown): FoxpostTracking;
1133
+ /**
1134
+ * Helper to safely validate a Foxpost tracking response without throwing
1135
+ * Returns { success: true, data } or { success: false, error }
1136
+ */
1137
+ export declare function safeValidateFoxpostTracking(res: unknown): z.ZodSafeParseResult<{
1138
+ [x: string]: unknown;
1139
+ clFox?: string | undefined;
1140
+ parcelType?: "NORMAL" | "RE" | "XRE" | "IRE" | "C2B" | undefined;
1141
+ sendType?: "HD" | "APM" | "COLLECT" | undefined;
1142
+ traces?: {
1143
+ [x: string]: unknown;
1144
+ statusDate: Date;
1145
+ statusStationId?: string | undefined;
1146
+ shortName?: string | undefined;
1147
+ longName?: string | undefined;
1148
+ status?: "CREATE" | "OPERIN" | "OPEROUT" | "RECEIVE" | "RETURN" | "REDIRECT" | "OVERTIMEOUT" | "SORTIN" | "SORTOUT" | "SLOTCHANGE" | "OVERTIMED" | "MPSIN" | "C2CIN" | "HDSENT" | "HDDEPO" | "HDINTRANSIT" | "HDRETURN" | "HDRECEIVE" | "WBXREDIRECT" | "BACKTOSENDER" | "HDHUBIN" | "HDHUBOUT" | "HDCOURIER" | "HDUNDELIVERABLE" | "PREPAREDFORPD" | "INWAREHOUSE" | "COLLECTSENT" | "C2BIN" | "RETURNED" | "COLLECTED" | "BACKLOGINFULL" | "BACKLOGINFAIL" | "MISSORT" | "EMPTYSLOT" | "RESENT" | "PREREDIRECT" | undefined;
1149
+ }[] | undefined;
1150
+ relatedParcel?: string | null | undefined;
1151
+ estimatedDelivery?: string | null | undefined;
1152
+ }>;
1153
+ /**
1154
+ * ============================================================================
1155
+ * Foxpost Parcel Creation Request/Response Schemas (from OpenAPI /api/parcel)
1156
+ * ============================================================================
1157
+ *
1158
+ * Schemas for request body and response shapes, modeled after Foxpost OpenAPI
1159
+ * but kept lenient to handle real-world API quirks and future changes.
1160
+ */
1161
+ /**
1162
+ * FieldError schema (from OpenAPI components/schemas/FieldError)
1163
+ * Represents a validation error on a specific field
1164
+ * Uses lenient validation to accept any field name or error code
1165
+ */
1166
+ declare const FieldErrorSchema: z.ZodObject<{
1167
+ field: z.ZodOptional<z.ZodString>;
1168
+ message: z.ZodOptional<z.ZodString>;
1169
+ }, z.core.$loose>;
1170
+ export type FoxFieldError = z.infer<typeof FieldErrorSchema>;
1171
+ /**
1172
+ * Package schema (from OpenAPI components/schemas/Package)
1173
+ * Represents a single parcel result in the CreateResponse
1174
+ *
1175
+ * Uses lenient validation:
1176
+ * - All fields optional to handle partial responses
1177
+ * - Passes through extra fields from carrier
1178
+ * - Lenient with field types (clFoxId may be string or number fallback)
1179
+ */
1180
+ declare const PackageSchema: z.ZodObject<{
1181
+ clFoxId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>]>>;
1182
+ barcode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1183
+ newBarcode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1184
+ refCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1185
+ uniqueBarcode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1186
+ errors: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1187
+ field: z.ZodOptional<z.ZodString>;
1188
+ message: z.ZodOptional<z.ZodString>;
1189
+ }, z.core.$loose>>>>;
1190
+ }, z.core.$loose>;
1191
+ export type FoxPackage = z.infer<typeof PackageSchema>;
1192
+ /**
1193
+ * CreateResponse schema (from OpenAPI components/schemas/CreateResponse)
1194
+ * Response from POST /api/parcel
1195
+ *
1196
+ * Uses lenient validation:
1197
+ * - valid: boolean indicating if all parcels succeeded or not
1198
+ * - parcels: array of Package results
1199
+ * - errors: top-level validation errors (optional)
1200
+ * - Passes through extra fields for extensibility
1201
+ */
1202
+ declare const CreateResponseSchema: z.ZodObject<{
1203
+ valid: z.ZodOptional<z.ZodBoolean>;
1204
+ parcels: z.ZodOptional<z.ZodArray<z.ZodObject<{
1205
+ clFoxId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>]>>;
1206
+ barcode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1207
+ newBarcode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1208
+ refCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1209
+ uniqueBarcode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1210
+ errors: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1211
+ field: z.ZodOptional<z.ZodString>;
1212
+ message: z.ZodOptional<z.ZodString>;
1213
+ }, z.core.$loose>>>>;
1214
+ }, z.core.$loose>>>;
1215
+ errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
1216
+ field: z.ZodOptional<z.ZodString>;
1217
+ message: z.ZodOptional<z.ZodString>;
1218
+ }, z.core.$loose>>>;
1219
+ }, z.core.$loose>;
1220
+ export type FoxCreateResponse = z.infer<typeof CreateResponseSchema>;
1221
+ /**
1222
+ * CreateParcelRequest schema (from OpenAPI components/schemas/CreateParcelRequest)
1223
+ * Request body for POST /api/parcel (single or batch)
1224
+ *
1225
+ * Uses lenient validation:
1226
+ * - Required: recipientName, recipientEmail, recipientPhone (for all parcels)
1227
+ * - HD parcels: also require recipientCity, recipientZip, recipientAddress
1228
+ * - APM parcels: also require destination
1229
+ * - Optional fields accept any string/value, not strict enums
1230
+ * - size defaults to 's' if missing
1231
+ * - cod: coerced to number, defaults to 0
1232
+ * - Passes through extra fields for future extensibility
1233
+ */
1234
+ declare const CreateParcelRequestItemSchema: z.ZodObject<{
1235
+ recipientName: z.ZodOptional<z.ZodString>;
1236
+ recipientEmail: z.ZodOptional<z.ZodString>;
1237
+ recipientPhone: z.ZodOptional<z.ZodString>;
1238
+ recipientCountry: z.ZodOptional<z.ZodString>;
1239
+ recipientCity: z.ZodOptional<z.ZodString>;
1240
+ recipientZip: z.ZodOptional<z.ZodString>;
1241
+ recipientAddress: z.ZodOptional<z.ZodString>;
1242
+ destination: z.ZodOptional<z.ZodString>;
1243
+ size: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
1244
+ XS: "XS";
1245
+ S: "S";
1246
+ M: "M";
1247
+ L: "L";
1248
+ XL: "XL";
1249
+ }>, z.ZodPipe<z.ZodEnum<{
1250
+ xs: "xs";
1251
+ s: "s";
1252
+ m: "m";
1253
+ l: "l";
1254
+ xl: "xl";
1255
+ }>, z.ZodTransform<string, "xs" | "s" | "m" | "l" | "xl">>, z.ZodString]>>>;
1256
+ cod: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>>>;
1257
+ comment: z.ZodOptional<z.ZodString>;
1258
+ deliveryNote: z.ZodOptional<z.ZodString>;
1259
+ label: z.ZodOptional<z.ZodBoolean>;
1260
+ fragile: z.ZodOptional<z.ZodBoolean>;
1261
+ refCode: z.ZodOptional<z.ZodString>;
1262
+ uniqueBarcode: z.ZodOptional<z.ZodString>;
1263
+ }, z.core.$loose>;
1264
+ export type FoxCreateParcelRequestItem = z.infer<typeof CreateParcelRequestItemSchema>;
1265
+ /**
1266
+ * Helper to validate a Foxpost CreateResponse
1267
+ * Throws ZodError if validation fails
1268
+ */
1269
+ export declare function validateFoxpostCreateResponse(res: unknown): FoxCreateResponse;
1270
+ /**
1271
+ * Helper to safely validate a Foxpost CreateResponse without throwing
1272
+ * Returns { success: true, data } or { success: false, error }
1273
+ */
1274
+ export declare function safeValidateFoxpostCreateResponse(res: unknown): z.ZodSafeParseResult<{
1275
+ [x: string]: unknown;
1276
+ valid?: boolean | undefined;
1277
+ parcels?: {
1278
+ [x: string]: unknown;
1279
+ clFoxId?: string | undefined;
1280
+ barcode?: string | null | undefined;
1281
+ newBarcode?: string | null | undefined;
1282
+ refCode?: string | null | undefined;
1283
+ uniqueBarcode?: string | null | undefined;
1284
+ errors?: {
1285
+ [x: string]: unknown;
1286
+ field?: string | undefined;
1287
+ message?: string | undefined;
1288
+ }[] | null | undefined;
1289
+ }[] | undefined;
1290
+ errors?: {
1291
+ [x: string]: unknown;
1292
+ field?: string | undefined;
1293
+ message?: string | undefined;
1294
+ }[] | undefined;
1295
+ }>;
1296
+ /**
1297
+ * Helper to validate a Foxpost Package entry
1298
+ * Throws ZodError if validation fails
1299
+ */
1300
+ export declare function validateFoxpostPackage(pkg: unknown): FoxPackage;
1301
+ /**
1302
+ * Helper to safely validate a Foxpost Package entry without throwing
1303
+ * Returns { success: true, data } or { success: false, error }
1304
+ */
1305
+ export declare function safeValidateFoxpostPackage(pkg: unknown): z.ZodSafeParseResult<{
1306
+ [x: string]: unknown;
1307
+ clFoxId?: string | undefined;
1308
+ barcode?: string | null | undefined;
1309
+ newBarcode?: string | null | undefined;
1310
+ refCode?: string | null | undefined;
1311
+ uniqueBarcode?: string | null | undefined;
1312
+ errors?: {
1313
+ [x: string]: unknown;
1314
+ field?: string | undefined;
1315
+ message?: string | undefined;
1316
+ }[] | null | undefined;
1317
+ }>;
1318
+ /**
1319
+ * Helper to validate a single Foxpost CreateParcelRequest item
1320
+ * Throws ZodError if validation fails
1321
+ */
1322
+ export declare function validateFoxpostCreateParcelRequestItem(item: unknown): FoxCreateParcelRequestItem;
1323
+ /**
1324
+ * Helper to safely validate a Foxpost CreateParcelRequest item without throwing
1325
+ * Returns { success: true, data } or { success: false, error }
1326
+ */
1327
+ export declare function safeValidateFoxpostCreateParcelRequestItem(item: unknown): z.ZodSafeParseResult<{
1328
+ [x: string]: unknown;
1329
+ size: string;
1330
+ cod: number;
1331
+ recipientName?: string | undefined;
1332
+ recipientEmail?: string | undefined;
1333
+ recipientPhone?: string | undefined;
1334
+ recipientCountry?: string | undefined;
1335
+ recipientCity?: string | undefined;
1336
+ recipientZip?: string | undefined;
1337
+ recipientAddress?: string | undefined;
1338
+ destination?: string | undefined;
1339
+ comment?: string | undefined;
1340
+ deliveryNote?: string | undefined;
1341
+ label?: boolean | undefined;
1342
+ fragile?: boolean | undefined;
1343
+ refCode?: string | undefined;
1344
+ uniqueBarcode?: string | undefined;
1345
+ }>;
1346
+ /**
1347
+ * ============================================================================
1348
+ * Foxpost Label Generation Schemas (from OpenAPI /api/label/{pageSize})
1349
+ * ============================================================================
1350
+ *
1351
+ * Schemas for label generation request parameters, response metadata,
1352
+ * error handling, and label info (from /api/label/info/{barcode})
1353
+ */
1354
+ /**
1355
+ * ApiError schema (from OpenAPI components/schemas/ApiError)
1356
+ * Carrier returns this on error responses (400, 401, etc.)
1357
+ * Uses lenient validation to accept any structure
1358
+ */
1359
+ declare const ApiErrorSchema: z.ZodObject<{
1360
+ timestamp: z.ZodOptional<z.ZodString>;
1361
+ error: z.ZodOptional<z.ZodString>;
1362
+ status: z.ZodOptional<z.ZodNumber>;
1363
+ }, z.core.$loose>;
1364
+ export type FoxpostApiError = z.infer<typeof ApiErrorSchema>;
1365
+ /**
1366
+ * Helper to safely validate a Foxpost API error response without throwing
1367
+ * Returns { success: true, data } or { success: false, error }
1368
+ */
1369
+ export declare function safeValidateFoxpostApiError(res: unknown): z.ZodSafeParseResult<{
1370
+ [x: string]: unknown;
1371
+ timestamp?: string | undefined;
1372
+ error?: string | undefined;
1373
+ status?: number | undefined;
1374
+ }>;
1375
+ export type FoxpostLabelPdfRaw = unknown;
1376
+ /**
1377
+ * Helper to safely validate PDF raw response without throwing
1378
+ * Returns { success: true, data } or { success: false, error }
1379
+ */
1380
+ export declare function safeValidateFoxpostLabelPdfRaw(raw: unknown): z.ZodSafeParseResult<any>;
1381
+ /**
1382
+ * PDF metadata schema for label generation
1383
+ * Describes the PDF file properties and generation options
1384
+ */
1385
+ declare const FoxpostLabelPdfMetadataSchema: z.ZodObject<{
1386
+ size: z.ZodOptional<z.ZodEnum<{
1387
+ A6: "A6";
1388
+ A7: "A7";
1389
+ _85X85: "_85X85";
1390
+ }>>;
1391
+ barcodesCount: z.ZodOptional<z.ZodNumber>;
1392
+ startPos: z.ZodOptional<z.ZodNumber>;
1393
+ isPortrait: z.ZodOptional<z.ZodBoolean>;
1394
+ }, z.core.$loose>;
1395
+ export type FoxpostLabelPdfMetadata = z.infer<typeof FoxpostLabelPdfMetadataSchema>;
1396
+ /**
1397
+ * Helper to validate PDF metadata
1398
+ * Throws ZodError if validation fails
1399
+ */
1400
+ export declare function validateFoxpostLabelPdfMetadata(metadata: unknown): FoxpostLabelPdfMetadata;
1401
+ /**
1402
+ * Helper to safely validate PDF metadata without throwing
1403
+ * Returns { success: true, data } or { success: false, error }
1404
+ */
1405
+ export declare function safeValidateFoxpostLabelPdfMetadata(metadata: unknown): z.ZodSafeParseResult<{
1406
+ [x: string]: unknown;
1407
+ size?: "A6" | "A7" | "_85X85" | undefined;
1408
+ barcodesCount?: number | undefined;
1409
+ startPos?: number | undefined;
1410
+ isPortrait?: boolean | undefined;
1411
+ }>;
1412
+ /**
1413
+ * LabelInfo schema (from OpenAPI components/schemas/LabelInfo)
1414
+ * Response from GET /api/label/info/{barcode}
1415
+ * Contains pre-label metadata about the parcel
1416
+ */
1417
+ declare const LabelInfoSchema: z.ZodObject<{
1418
+ senderName: z.ZodOptional<z.ZodString>;
1419
+ senderZip: z.ZodOptional<z.ZodString>;
1420
+ senderCity: z.ZodOptional<z.ZodString>;
1421
+ senderAddress: z.ZodOptional<z.ZodString>;
1422
+ recipientName: z.ZodOptional<z.ZodString>;
1423
+ recipientEmail: z.ZodOptional<z.ZodString>;
1424
+ recipientPhone: z.ZodOptional<z.ZodString>;
1425
+ recipientZip: z.ZodOptional<z.ZodString>;
1426
+ recipientCity: z.ZodOptional<z.ZodString>;
1427
+ recipientAddress: z.ZodOptional<z.ZodString>;
1428
+ apm: z.ZodOptional<z.ZodString>;
1429
+ cod: z.ZodOptional<z.ZodNumber>;
1430
+ isFragile: z.ZodOptional<z.ZodBoolean>;
1431
+ barcode: z.ZodOptional<z.ZodString>;
1432
+ refCode: z.ZodOptional<z.ZodString>;
1433
+ depoCode: z.ZodOptional<z.ZodString>;
1434
+ courierCode: z.ZodOptional<z.ZodString>;
1435
+ sendType: z.ZodOptional<z.ZodEnum<{
1436
+ HD: "HD";
1437
+ APM: "APM";
1438
+ COLLECT: "COLLECT";
1439
+ }>>;
1440
+ }, z.core.$loose>;
1441
+ export type FoxpostLabelInfo = z.infer<typeof LabelInfoSchema>;
1442
+ /**
1443
+ * Helper to validate a Foxpost LabelInfo response
1444
+ * Throws ZodError if validation fails
1445
+ */
1446
+ export declare function validateFoxpostLabelInfo(res: unknown): FoxpostLabelInfo;
1447
+ /**
1448
+ * Helper to safely validate a Foxpost LabelInfo response without throwing
1449
+ * Returns { success: true, data } or { success: false, error }
1450
+ */
1451
+ export declare function safeValidateFoxpostLabelInfo(res: unknown): z.ZodSafeParseResult<{
1452
+ [x: string]: unknown;
1453
+ senderName?: string | undefined;
1454
+ senderZip?: string | undefined;
1455
+ senderCity?: string | undefined;
1456
+ senderAddress?: string | undefined;
1457
+ recipientName?: string | undefined;
1458
+ recipientEmail?: string | undefined;
1459
+ recipientPhone?: string | undefined;
1460
+ recipientZip?: string | undefined;
1461
+ recipientCity?: string | undefined;
1462
+ recipientAddress?: string | undefined;
1463
+ apm?: string | undefined;
1464
+ cod?: number | undefined;
1465
+ isFragile?: boolean | undefined;
1466
+ barcode?: string | undefined;
1467
+ refCode?: string | undefined;
1468
+ depoCode?: string | undefined;
1469
+ courierCode?: string | undefined;
1470
+ sendType?: "HD" | "APM" | "COLLECT" | undefined;
1471
+ }>;
1472
+ /**
1473
+ * ============================================================================
1474
+ * Foxpost APM/Pickup-Points Schemas (from foxplus.json feed)
1475
+ * ============================================================================
1476
+ */
1477
+ /**
1478
+ * Opening hours schema - Hungarian day names with optional string values
1479
+ * Uses passthrough to allow extra fields and lenient validation
1480
+ */
1481
+ declare const OpeningHoursSchema: z.ZodObject<{
1482
+ hetfo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1483
+ kedd: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1484
+ szerda: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1485
+ csutortok: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1486
+ pentek: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1487
+ szombat: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1488
+ vasarnap: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1489
+ }, z.core.$loose>;
1490
+ export type FoxpostOpeningHours = z.infer<typeof OpeningHoursSchema>;
1491
+ /**
1492
+ * Fill/empty schedule entry
1493
+ */
1494
+ declare const FillEmptyEntrySchema: z.ZodObject<{
1495
+ emptying: z.ZodOptional<z.ZodString>;
1496
+ filling: z.ZodOptional<z.ZodString>;
1497
+ }, z.core.$loose>;
1498
+ export type FoxpostFillEmptyEntry = z.infer<typeof FillEmptyEntrySchema>;
1499
+ /**
1500
+ * Foxpost APM substitute entry
1501
+ * When a pickup point is closed or unavailable, these are alternative locations
1502
+ * where the customer can pick up/drop off their parcel.
1503
+ */
1504
+ declare const FoxpostSubstituteSchema: z.ZodObject<{
1505
+ place_id: z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>]>;
1506
+ operator_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1507
+ }, z.core.$loose>;
1508
+ export type FoxpostSubstitute = z.infer<typeof FoxpostSubstituteSchema>;
1509
+ /**
1510
+ * Foxpost APM metadata schema - carrier-specific fields
1511
+ * Uses lenient validation with passthrough for future extensibility
1512
+ */
1513
+ declare const FoxpostApmMetadataSchema: z.ZodObject<{
1514
+ depot: z.ZodOptional<z.ZodString>;
1515
+ load: z.ZodOptional<z.ZodString>;
1516
+ apmType: z.ZodOptional<z.ZodString>;
1517
+ substitutes: z.ZodOptional<z.ZodArray<z.ZodObject<{
1518
+ place_id: z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>]>;
1519
+ operator_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1520
+ }, z.core.$loose>>>;
1521
+ variant: z.ZodOptional<z.ZodString>;
1522
+ fillEmptyList: z.ZodOptional<z.ZodArray<z.ZodObject<{
1523
+ emptying: z.ZodOptional<z.ZodString>;
1524
+ filling: z.ZodOptional<z.ZodString>;
1525
+ }, z.core.$loose>>>;
1526
+ ssapt: z.ZodOptional<z.ZodString>;
1527
+ sdapt: z.ZodOptional<z.ZodString>;
1528
+ }, z.core.$loose>;
1529
+ export type FoxpostApmMetadata = z.infer<typeof FoxpostApmMetadataSchema>;
1530
+ declare const FoxpostApmEntrySchema: z.ZodObject<{
1531
+ place_id: z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>]>;
1532
+ operator_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1533
+ name: z.ZodOptional<z.ZodString>;
1534
+ ssapt: z.ZodOptional<z.ZodString>;
1535
+ sdapt: z.ZodOptional<z.ZodString>;
1536
+ country: z.ZodOptional<z.ZodString>;
1537
+ address: z.ZodOptional<z.ZodString>;
1538
+ zip: z.ZodOptional<z.ZodString>;
1539
+ city: z.ZodOptional<z.ZodString>;
1540
+ street: z.ZodOptional<z.ZodString>;
1541
+ findme: z.ZodOptional<z.ZodString>;
1542
+ geolat: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>>;
1543
+ geolng: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>>;
1544
+ allowed2: z.ZodOptional<z.ZodEnum<{
1545
+ ALL: "ALL";
1546
+ C2C: "C2C";
1547
+ B2C: "B2C";
1548
+ }>>;
1549
+ depot: z.ZodOptional<z.ZodString>;
1550
+ load: z.ZodOptional<z.ZodString>;
1551
+ isOutdoor: z.ZodOptional<z.ZodBoolean>;
1552
+ apmType: z.ZodOptional<z.ZodString>;
1553
+ substitutes: z.ZodOptional<z.ZodArray<z.ZodObject<{
1554
+ place_id: z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>]>;
1555
+ operator_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1556
+ }, z.core.$loose>>>;
1557
+ open: z.ZodOptional<z.ZodObject<{
1558
+ hetfo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1559
+ kedd: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1560
+ szerda: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1561
+ csutortok: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1562
+ pentek: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1563
+ szombat: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1564
+ vasarnap: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1565
+ }, z.core.$loose>>;
1566
+ fillEmptyList: z.ZodOptional<z.ZodArray<z.ZodObject<{
1567
+ emptying: z.ZodOptional<z.ZodString>;
1568
+ filling: z.ZodOptional<z.ZodString>;
1569
+ }, z.core.$loose>>>;
1570
+ cardPayment: z.ZodOptional<z.ZodBoolean>;
1571
+ cashPayment: z.ZodOptional<z.ZodBoolean>;
1572
+ iconUrl: z.ZodOptional<z.ZodString>;
1573
+ variant: z.ZodOptional<z.ZodString>;
1574
+ paymentOptions: z.ZodOptional<z.ZodArray<z.ZodString>>;
1575
+ paymentOptionsString: z.ZodOptional<z.ZodString>;
1576
+ service: z.ZodOptional<z.ZodArray<z.ZodString>>;
1577
+ serviceString: z.ZodOptional<z.ZodString>;
1578
+ }, z.core.$loose>;
1579
+ export type FoxpostApmEntry = z.infer<typeof FoxpostApmEntrySchema>;
1580
+ declare const FoxpostFetchPickupPointsRequestSchema: z.ZodObject<{
1581
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1582
+ options: z.ZodOptional<z.ZodObject<{
1583
+ foxpost: z.ZodOptional<z.ZodObject<{
1584
+ country: z.ZodOptional<z.ZodString>;
1585
+ bbox: z.ZodOptional<z.ZodObject<{
1586
+ north: z.ZodNumber;
1587
+ south: z.ZodNumber;
1588
+ east: z.ZodNumber;
1589
+ west: z.ZodNumber;
1590
+ }, z.core.$strip>>;
1591
+ updatedSince: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>>;
1592
+ }, z.core.$catchall<z.ZodUnknown>>>;
1593
+ }, z.core.$catchall<z.ZodUnknown>>>;
1594
+ }, z.core.$strip>;
1595
+ export type FoxpostFetchPickupPointsRequest = z.infer<typeof FoxpostFetchPickupPointsRequestSchema>;
1596
+ /**
1597
+ * Helper to safely validate a Foxpost APM feed (array of entries)
1598
+ * Returns { success: true, data } or { success: false, error }
1599
+ */
1600
+ export declare function safeValidateFoxpostApmFeed(feed: unknown): z.ZodSafeParseResult<{
1601
+ [x: string]: unknown;
1602
+ place_id: string;
1603
+ operator_id?: string | null | undefined;
1604
+ name?: string | undefined;
1605
+ ssapt?: string | undefined;
1606
+ sdapt?: string | undefined;
1607
+ country?: string | undefined;
1608
+ address?: string | undefined;
1609
+ zip?: string | undefined;
1610
+ city?: string | undefined;
1611
+ street?: string | undefined;
1612
+ findme?: string | undefined;
1613
+ geolat?: number | undefined;
1614
+ geolng?: number | undefined;
1615
+ allowed2?: "ALL" | "C2C" | "B2C" | undefined;
1616
+ depot?: string | undefined;
1617
+ load?: string | undefined;
1618
+ isOutdoor?: boolean | undefined;
1619
+ apmType?: string | undefined;
1620
+ substitutes?: {
1621
+ [x: string]: unknown;
1622
+ place_id: string;
1623
+ operator_id?: string | null | undefined;
1624
+ }[] | undefined;
1625
+ open?: {
1626
+ [x: string]: unknown;
1627
+ hetfo?: string | null | undefined;
1628
+ kedd?: string | null | undefined;
1629
+ szerda?: string | null | undefined;
1630
+ csutortok?: string | null | undefined;
1631
+ pentek?: string | null | undefined;
1632
+ szombat?: string | null | undefined;
1633
+ vasarnap?: string | null | undefined;
1634
+ } | undefined;
1635
+ fillEmptyList?: {
1636
+ [x: string]: unknown;
1637
+ emptying?: string | undefined;
1638
+ filling?: string | undefined;
1639
+ }[] | undefined;
1640
+ cardPayment?: boolean | undefined;
1641
+ cashPayment?: boolean | undefined;
1642
+ iconUrl?: string | undefined;
1643
+ variant?: string | undefined;
1644
+ paymentOptions?: string[] | undefined;
1645
+ paymentOptionsString?: string | undefined;
1646
+ service?: string[] | undefined;
1647
+ serviceString?: string | undefined;
1648
+ }[]>;
1649
+ /**
1650
+ * Helper to safely validate a single Foxpost APM entry
1651
+ * Returns { success: true, data } or { success: false, error }
1652
+ */
1653
+ export declare function safeValidateFoxpostApmEntry(entry: unknown): z.ZodSafeParseResult<{
1654
+ [x: string]: unknown;
1655
+ place_id: string;
1656
+ operator_id?: string | null | undefined;
1657
+ name?: string | undefined;
1658
+ ssapt?: string | undefined;
1659
+ sdapt?: string | undefined;
1660
+ country?: string | undefined;
1661
+ address?: string | undefined;
1662
+ zip?: string | undefined;
1663
+ city?: string | undefined;
1664
+ street?: string | undefined;
1665
+ findme?: string | undefined;
1666
+ geolat?: number | undefined;
1667
+ geolng?: number | undefined;
1668
+ allowed2?: "ALL" | "C2C" | "B2C" | undefined;
1669
+ depot?: string | undefined;
1670
+ load?: string | undefined;
1671
+ isOutdoor?: boolean | undefined;
1672
+ apmType?: string | undefined;
1673
+ substitutes?: {
1674
+ [x: string]: unknown;
1675
+ place_id: string;
1676
+ operator_id?: string | null | undefined;
1677
+ }[] | undefined;
1678
+ open?: {
1679
+ [x: string]: unknown;
1680
+ hetfo?: string | null | undefined;
1681
+ kedd?: string | null | undefined;
1682
+ szerda?: string | null | undefined;
1683
+ csutortok?: string | null | undefined;
1684
+ pentek?: string | null | undefined;
1685
+ szombat?: string | null | undefined;
1686
+ vasarnap?: string | null | undefined;
1687
+ } | undefined;
1688
+ fillEmptyList?: {
1689
+ [x: string]: unknown;
1690
+ emptying?: string | undefined;
1691
+ filling?: string | undefined;
1692
+ }[] | undefined;
1693
+ cardPayment?: boolean | undefined;
1694
+ cashPayment?: boolean | undefined;
1695
+ iconUrl?: string | undefined;
1696
+ variant?: string | undefined;
1697
+ paymentOptions?: string[] | undefined;
1698
+ paymentOptionsString?: string | undefined;
1699
+ service?: string[] | undefined;
1700
+ serviceString?: string | undefined;
1701
+ }>;
1702
+ /**
1703
+ * Helper to validate Foxpost fetchPickupPoints request envelope.
1704
+ */
1705
+ export declare function safeValidateFetchPickupPointsRequest(input: unknown): z.ZodSafeParseResult<{
1706
+ credentials?: Record<string, unknown> | undefined;
1707
+ options?: {
1708
+ [x: string]: unknown;
1709
+ foxpost?: {
1710
+ [x: string]: unknown;
1711
+ country?: string | undefined;
1712
+ bbox?: {
1713
+ north: number;
1714
+ south: number;
1715
+ east: number;
1716
+ west: number;
1717
+ } | undefined;
1718
+ updatedSince?: string | Date | undefined;
1719
+ } | undefined;
1720
+ } | undefined;
1721
+ }>;
1722
+ export {};
1723
+ //# sourceMappingURL=validation.d.ts.map