aves-sdk 1.0.0

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.
@@ -0,0 +1,1199 @@
1
+ import { DynamicModule, ModuleMetadata, Type } from '@nestjs/common';
2
+ import { AxiosRequestConfig } from 'axios';
3
+ import * as _nestjs_config from '@nestjs/config';
4
+ import { z, ZodSchema, ZodError } from 'zod';
5
+
6
+ type DateString = string & {
7
+ readonly __brand: 'DateString';
8
+ };
9
+ type DateTimeString = string & {
10
+ readonly __brand: 'DateTimeString';
11
+ };
12
+ type TimeString = string & {
13
+ readonly __brand: 'TimeString';
14
+ };
15
+ type AddressType = 'home' | 'work' | 'billing' | 'delivery';
16
+ type ContactType = 'home' | 'work' | 'mobile' | 'fax';
17
+ type EmailType = 'home' | 'work';
18
+ type PassengerType = 'adult' | 'child' | 'infant';
19
+ type TitleType = 'mr' | 'mrs' | 'ms' | 'dr' | 'prof';
20
+ type GenderType = 'male' | 'female';
21
+ type ServiceType = 'flight' | 'hotel' | 'car' | 'transfer' | 'insurance';
22
+ type ServiceStatusType = 'confirmed' | 'pending' | 'cancelled';
23
+ type PaymentType = 'credit_card' | 'debit_card' | 'bank_transfer' | 'cash';
24
+ type PaymentStatusType = 'pending' | 'confirmed' | 'failed';
25
+ type CustomerType = 'customer' | 'agent' | 'supplier';
26
+ type SearchOperatorType = 'equals' | 'contains' | 'starts_with' | 'ends_with';
27
+ type BookingType = 'individual' | 'group' | 'corporate';
28
+ type PriorityType = 'low' | 'normal' | 'high' | 'urgent';
29
+ type SpecialRequestType = 'meal' | 'seat' | 'wheelchair' | 'other';
30
+ type CancelReasonType = 'customer_request' | 'no_show' | 'operational' | 'other';
31
+ type RefundMethodType = 'original_payment' | 'credit' | 'cash';
32
+ type DocumentType = 'confirmation' | 'invoice' | 'voucher' | 'ticket' | 'all';
33
+ type DocumentFormatType = 'pdf' | 'html' | 'xml';
34
+ type DeliveryMethodType = 'email' | 'sms' | 'download';
35
+ type BookingStatusType = 'pending' | 'confirmed' | 'cancelled' | 'completed';
36
+ type PricingItemType = 'service' | 'tax' | 'fee' | 'discount';
37
+ type DeliveryStatusType = 'sent' | 'pending' | 'failed';
38
+ type CustomerStatusType = 'active' | 'inactive' | 'suspended';
39
+ type CommunicationMethodType = 'email' | 'sms' | 'phone';
40
+ interface CustomerAddress {
41
+ type?: AddressType;
42
+ street?: string;
43
+ city?: string;
44
+ state?: string;
45
+ postalCode?: string;
46
+ country?: string;
47
+ }
48
+ interface CustomerContact {
49
+ phone?: {
50
+ type?: ContactType;
51
+ number: string;
52
+ };
53
+ email?: {
54
+ type?: EmailType;
55
+ address: string;
56
+ };
57
+ }
58
+ interface Customer {
59
+ id: string;
60
+ type: CustomerType;
61
+ status: CustomerStatusType;
62
+ personalInfo?: {
63
+ title?: string;
64
+ firstName: string;
65
+ lastName: string;
66
+ middleName?: string;
67
+ dateOfBirth?: DateString;
68
+ gender?: GenderType;
69
+ nationality?: string;
70
+ };
71
+ contact?: CustomerContact;
72
+ address?: CustomerAddress;
73
+ businessInfo?: {
74
+ companyName?: string;
75
+ taxId?: string;
76
+ licenseNumber?: string;
77
+ };
78
+ preferences?: {
79
+ language?: string;
80
+ currency?: string;
81
+ communicationMethod?: CommunicationMethodType;
82
+ };
83
+ }
84
+ interface BookingPassenger {
85
+ id: string;
86
+ type: PassengerType;
87
+ title?: TitleType;
88
+ firstName: string;
89
+ lastName: string;
90
+ middleName?: string;
91
+ dateOfBirth?: DateString;
92
+ gender?: GenderType;
93
+ nationality?: string;
94
+ passport?: {
95
+ number: string;
96
+ expiryDate: DateString;
97
+ issuingCountry: string;
98
+ };
99
+ address?: CustomerAddress;
100
+ contact?: CustomerContact;
101
+ }
102
+ interface BookingService {
103
+ id: string;
104
+ type: ServiceType;
105
+ status: ServiceStatusType;
106
+ code?: string;
107
+ name?: string;
108
+ description?: string;
109
+ startDate?: DateString;
110
+ endDate?: DateString;
111
+ price?: {
112
+ currency: string;
113
+ amount: number;
114
+ };
115
+ }
116
+ interface BookingPayment {
117
+ id: string;
118
+ type: PaymentType;
119
+ status: PaymentStatusType;
120
+ amount: {
121
+ currency: string;
122
+ amount: number;
123
+ };
124
+ details?: {
125
+ cardNumber?: string;
126
+ expiryDate?: string;
127
+ cardHolderName?: string;
128
+ };
129
+ }
130
+ interface SearchCustomerRequest {
131
+ type: CustomerType;
132
+ fields: {
133
+ name: string;
134
+ value: string;
135
+ operator?: SearchOperatorType;
136
+ }[];
137
+ pagination?: {
138
+ pageSize: number;
139
+ pageNumber: number;
140
+ };
141
+ }
142
+ interface CreateBookingRequest {
143
+ type: BookingType;
144
+ priority: PriorityType;
145
+ customerId?: string;
146
+ customerDetails?: Customer;
147
+ passengers: BookingPassenger[];
148
+ services: BookingService[];
149
+ specialRequests?: {
150
+ type: SpecialRequestType;
151
+ description: string;
152
+ }[];
153
+ }
154
+ interface CancelBookingRequest {
155
+ bookingId: string;
156
+ reason: CancelReasonType;
157
+ description?: string;
158
+ refundRequest?: {
159
+ amount: number;
160
+ currency: string;
161
+ method: RefundMethodType;
162
+ };
163
+ }
164
+ interface PrintDocumentRequest {
165
+ bookingId: string;
166
+ documentType: DocumentType;
167
+ format: DocumentFormatType;
168
+ language?: string;
169
+ deliveryMethod?: {
170
+ type: DeliveryMethodType;
171
+ address?: string;
172
+ };
173
+ }
174
+ interface AddPaymentRequest {
175
+ bookingId: string;
176
+ payments: BookingPayment[];
177
+ }
178
+ interface BookingResponse {
179
+ id: string;
180
+ status: BookingStatusType;
181
+ createdAt: DateTimeString;
182
+ updatedAt: DateTimeString;
183
+ customer: Customer;
184
+ passengers: BookingPassenger[];
185
+ services: BookingService[];
186
+ pricing: {
187
+ totalAmount: {
188
+ currency: string;
189
+ amount: number;
190
+ };
191
+ breakdowns?: {
192
+ type: PricingItemType;
193
+ description: string;
194
+ amount: number;
195
+ }[];
196
+ };
197
+ }
198
+ interface SearchResponse {
199
+ results: Customer[];
200
+ pagination?: {
201
+ totalRecords: number;
202
+ pageSize: number;
203
+ pageNumber: number;
204
+ totalPages: number;
205
+ };
206
+ }
207
+ interface DocumentResponse {
208
+ id: string;
209
+ type: string;
210
+ format: string;
211
+ size: number;
212
+ createdAt: DateTimeString;
213
+ downloadUrl?: string;
214
+ deliveryStatus?: {
215
+ status: DeliveryStatusType;
216
+ method: string;
217
+ address?: string;
218
+ };
219
+ }
220
+ interface OperationResponse {
221
+ success: boolean;
222
+ message?: string;
223
+ data?: any;
224
+ }
225
+
226
+ interface Address {
227
+ '@Type'?: 'HOME' | 'WORK' | 'BILLING' | 'DELIVERY';
228
+ Street?: string;
229
+ City?: string;
230
+ State?: string;
231
+ PostalCode?: string;
232
+ Country?: string;
233
+ }
234
+ interface ContactInfo {
235
+ Phone?: {
236
+ '@Type'?: 'HOME' | 'WORK' | 'MOBILE' | 'FAX';
237
+ '@Number': string;
238
+ };
239
+ Email?: {
240
+ '@Type'?: 'HOME' | 'WORK';
241
+ '@Address': string;
242
+ };
243
+ }
244
+ interface Passenger {
245
+ '@PassengerID': string;
246
+ '@Type': 'ADT' | 'CHD' | 'INF';
247
+ '@Title'?: 'MR' | 'MRS' | 'MS' | 'DR' | 'PROF';
248
+ FirstName: string;
249
+ LastName: string;
250
+ MiddleName?: string;
251
+ DateOfBirth?: string;
252
+ Gender?: 'M' | 'F';
253
+ Nationality?: string;
254
+ Passport?: {
255
+ '@Number': string;
256
+ '@ExpiryDate': string;
257
+ '@IssuingCountry': string;
258
+ };
259
+ Address?: Address;
260
+ ContactInfo?: ContactInfo;
261
+ }
262
+ interface Service {
263
+ '@ServiceID': string;
264
+ '@Type': 'FLIGHT' | 'HOTEL' | 'CAR' | 'TRANSFER' | 'INSURANCE';
265
+ '@Status': 'CONFIRMED' | 'PENDING' | 'CANCELLED';
266
+ ServiceDetails: {
267
+ Code?: string;
268
+ Name?: string;
269
+ Description?: string;
270
+ StartDate?: string;
271
+ EndDate?: string;
272
+ Price?: {
273
+ '@Currency': string;
274
+ '@Amount': number;
275
+ };
276
+ };
277
+ }
278
+ interface Payment {
279
+ '@PaymentID': string;
280
+ '@Type': 'CREDIT_CARD' | 'DEBIT_CARD' | 'BANK_TRANSFER' | 'CASH';
281
+ '@Status': 'PENDING' | 'CONFIRMED' | 'FAILED';
282
+ Amount: {
283
+ '@Currency': string;
284
+ '@Amount': number;
285
+ };
286
+ PaymentDetails?: {
287
+ CardNumber?: string;
288
+ ExpiryDate?: string;
289
+ CardHolderName?: string;
290
+ };
291
+ }
292
+ interface SearchMasterRecordRQ {
293
+ SearchCriteria: {
294
+ MasterRecordType: 'CUSTOMER' | 'AGENT' | 'SUPPLIER';
295
+ SearchFields: {
296
+ Field: {
297
+ '@Name': string;
298
+ '@Value': string;
299
+ '@Operator'?: 'EQUALS' | 'CONTAINS' | 'STARTS_WITH' | 'ENDS_WITH';
300
+ }[];
301
+ };
302
+ Pagination?: {
303
+ '@PageSize': number;
304
+ '@PageNumber': number;
305
+ };
306
+ };
307
+ }
308
+ interface MasterRecord {
309
+ '@MasterRecordID': string;
310
+ '@Type': 'CUSTOMER' | 'AGENT' | 'SUPPLIER';
311
+ '@Status': 'ACTIVE' | 'INACTIVE' | 'SUSPENDED';
312
+ PersonalInfo?: {
313
+ Title?: string;
314
+ FirstName: string;
315
+ LastName: string;
316
+ MiddleName?: string;
317
+ DateOfBirth?: string;
318
+ Gender?: 'M' | 'F';
319
+ Nationality?: string;
320
+ };
321
+ ContactInfo?: ContactInfo;
322
+ Address?: Address;
323
+ BusinessInfo?: {
324
+ CompanyName?: string;
325
+ TaxID?: string;
326
+ LicenseNumber?: string;
327
+ };
328
+ Preferences?: {
329
+ Language?: string;
330
+ Currency?: string;
331
+ CommunicationMethod?: 'EMAIL' | 'SMS' | 'PHONE';
332
+ };
333
+ }
334
+ interface SearchMasterRecordRS {
335
+ SearchResults: {
336
+ MasterRecord: MasterRecord[];
337
+ PaginationInfo?: {
338
+ '@TotalRecords': number;
339
+ '@PageSize': number;
340
+ '@PageNumber': number;
341
+ '@TotalPages': number;
342
+ };
343
+ };
344
+ }
345
+ interface ManageMasterRecordRQ {
346
+ '@InsertCriteria': 'INSERT' | 'UPDATE' | 'UPSERT';
347
+ MasterRecordDetail: MasterRecord;
348
+ }
349
+ interface CustomerRecordRS {
350
+ MasterRecord: MasterRecord;
351
+ OperationResult: {
352
+ '@Status': 'SUCCESS' | 'FAILED';
353
+ '@Message'?: string;
354
+ '@MasterRecordID'?: string;
355
+ };
356
+ }
357
+ interface BookFileRQ {
358
+ BookingDetails: {
359
+ '@BookingType': 'INDIVIDUAL' | 'GROUP' | 'CORPORATE';
360
+ '@Priority': 'LOW' | 'NORMAL' | 'HIGH' | 'URGENT';
361
+ CustomerInfo: {
362
+ '@CustomerID'?: string;
363
+ CustomerDetails?: MasterRecord;
364
+ };
365
+ PassengerList: {
366
+ Passenger: Passenger[];
367
+ };
368
+ SelectedServiceList: {
369
+ Service: Service[];
370
+ };
371
+ SpecialRequests?: {
372
+ Request: {
373
+ '@Type': 'MEAL' | 'SEAT' | 'WHEELCHAIR' | 'OTHER';
374
+ '@Description': string;
375
+ }[];
376
+ };
377
+ };
378
+ }
379
+ interface BookingFile {
380
+ '@BookingFileID': string;
381
+ '@Status': 'PENDING' | 'CONFIRMED' | 'CANCELLED' | 'COMPLETED';
382
+ '@CreationDate': string;
383
+ '@LastModified': string;
384
+ CustomerInfo: MasterRecord;
385
+ PassengerList: {
386
+ Passenger: Passenger[];
387
+ };
388
+ ServiceList: {
389
+ Service: Service[];
390
+ };
391
+ Pricing: {
392
+ TotalAmount: {
393
+ '@Currency': string;
394
+ '@Amount': number;
395
+ };
396
+ Breakdown?: {
397
+ Item: {
398
+ '@Type': 'SERVICE' | 'TAX' | 'FEE' | 'DISCOUNT';
399
+ '@Description': string;
400
+ '@Amount': number;
401
+ }[];
402
+ };
403
+ };
404
+ }
405
+ interface BookingFileRS {
406
+ BookingFile: BookingFile;
407
+ OperationResult: {
408
+ '@Status': 'SUCCESS' | 'FAILED';
409
+ '@Message'?: string;
410
+ '@BookingFileID'?: string;
411
+ };
412
+ }
413
+ interface ModiFileHeaderRQ {
414
+ '@BookingFileID': string;
415
+ HeaderModifications: {
416
+ CustomerInfo?: MasterRecord;
417
+ SpecialRequests?: {
418
+ Request: {
419
+ '@Type': string;
420
+ '@Description': string;
421
+ }[];
422
+ };
423
+ Notes?: {
424
+ '@Type': 'GENERAL' | 'INTERNAL' | 'CUSTOMER';
425
+ '@Content': string;
426
+ }[];
427
+ };
428
+ }
429
+ interface ModiFileHeaderRS {
430
+ BookingFile: BookingFile;
431
+ OperationResult: {
432
+ '@Status': 'SUCCESS' | 'FAILED';
433
+ '@Message'?: string;
434
+ };
435
+ }
436
+ interface ModFileServicesRQ {
437
+ '@BookingFileID': string;
438
+ ServiceModifications: {
439
+ AddServices?: {
440
+ Service: Service[];
441
+ };
442
+ RemoveServices?: {
443
+ ServiceID: string[];
444
+ };
445
+ ModifyServices?: {
446
+ Service: Service[];
447
+ };
448
+ };
449
+ }
450
+ interface SetStatusRQ {
451
+ '@BookingFileID': string;
452
+ '@NewStatus': 'PENDING' | 'CONFIRMED' | 'CANCELLED' | 'COMPLETED';
453
+ Reason?: {
454
+ '@Code': string;
455
+ '@Description': string;
456
+ };
457
+ }
458
+ interface SetStatusServiceRS {
459
+ BookingFile: BookingFile;
460
+ OperationResult: {
461
+ '@Status': 'SUCCESS' | 'FAILED';
462
+ '@Message'?: string;
463
+ '@PreviousStatus'?: string;
464
+ };
465
+ }
466
+ interface CancelFileRQ {
467
+ '@BookingFileID': string;
468
+ CancellationDetails: {
469
+ '@Reason': 'CUSTOMER_REQUEST' | 'NO_SHOW' | 'OPERATIONAL' | 'OTHER';
470
+ '@Description'?: string;
471
+ RefundRequest?: {
472
+ '@Amount': number;
473
+ '@Currency': string;
474
+ '@Method': 'ORIGINAL_PAYMENT' | 'CREDIT' | 'CASH';
475
+ };
476
+ };
477
+ }
478
+ interface CancelFileRS {
479
+ BookingFile: BookingFile;
480
+ OperationResult: {
481
+ '@Status': 'SUCCESS' | 'FAILED';
482
+ '@Message'?: string;
483
+ RefundInfo?: {
484
+ '@RefundAmount': number;
485
+ '@Currency': string;
486
+ '@RefundMethod': string;
487
+ '@ProcessingTime': string;
488
+ };
489
+ };
490
+ }
491
+ interface FilePaymentListRQ {
492
+ '@BookingFileID': string;
493
+ PaymentList: {
494
+ Payment: Payment[];
495
+ };
496
+ }
497
+ interface FilePaymentListRS {
498
+ BookingFile: BookingFile;
499
+ PaymentSummary: {
500
+ TotalPaid: {
501
+ '@Currency': string;
502
+ '@Amount': number;
503
+ };
504
+ OutstandingAmount: {
505
+ '@Currency': string;
506
+ '@Amount': number;
507
+ };
508
+ PaymentHistory: {
509
+ Payment: Payment[];
510
+ };
511
+ };
512
+ OperationResult: {
513
+ '@Status': 'SUCCESS' | 'FAILED';
514
+ '@Message'?: string;
515
+ };
516
+ }
517
+ interface PrintBookingDocumentRQ {
518
+ '@BookingFileID': string;
519
+ DocumentRequest: {
520
+ '@DocumentType': 'CONFIRMATION' | 'INVOICE' | 'VOUCHER' | 'TICKET' | 'ALL';
521
+ '@Format': 'PDF' | 'HTML' | 'XML';
522
+ '@Language'?: string;
523
+ DeliveryMethod?: {
524
+ '@Type': 'EMAIL' | 'SMS' | 'DOWNLOAD';
525
+ '@Address'?: string;
526
+ };
527
+ };
528
+ }
529
+ interface PrintBookingDocumentRS {
530
+ DocumentInfo: {
531
+ '@DocumentID': string;
532
+ '@DocumentType': string;
533
+ '@Format': string;
534
+ '@Size': number;
535
+ '@CreationDate': string;
536
+ DownloadURL?: string;
537
+ DeliveryStatus?: {
538
+ '@Status': 'SENT' | 'PENDING' | 'FAILED';
539
+ '@Method': string;
540
+ '@Address'?: string;
541
+ };
542
+ };
543
+ OperationResult: {
544
+ '@Status': 'SUCCESS' | 'FAILED';
545
+ '@Message'?: string;
546
+ };
547
+ }
548
+
549
+ declare function mapAddressToXml(clean: CustomerAddress): Address;
550
+ declare function mapContactToXml(clean: CustomerContact): ContactInfo;
551
+ declare function mapPassengerToXml(clean: BookingPassenger): Passenger;
552
+ declare function mapServiceToXml(clean: BookingService): Service;
553
+ declare function mapPaymentToXml(clean: BookingPayment): Payment;
554
+ declare function mapSearchCustomerToXml(clean: SearchCustomerRequest): SearchMasterRecordRQ;
555
+ declare function mapCustomerToXml(clean: Customer): MasterRecord;
556
+ declare function mapCreateBookingToXml(clean: CreateBookingRequest): BookFileRQ;
557
+ declare function mapCancelBookingToXml(clean: CancelBookingRequest): CancelFileRQ;
558
+ declare function mapPrintDocumentToXml(clean: PrintDocumentRequest): PrintBookingDocumentRQ;
559
+ declare function mapAddPaymentToXml(clean: AddPaymentRequest): FilePaymentListRQ;
560
+
561
+ declare function mapBookingFromXml(xml: BookingFile): BookingResponse;
562
+ declare function mapBookingResponseFromXml(xml: BookingFileRS): BookingResponse & OperationResponse;
563
+ declare function mapSearchResponseFromXml(xml: SearchMasterRecordRS): SearchResponse;
564
+ declare function mapDocumentResponseFromXml(xml: PrintBookingDocumentRS): DocumentResponse & OperationResponse;
565
+ declare function mapCancelResponseFromXml(xml: CancelFileRS): OperationResponse;
566
+ declare function mapPaymentResponseFromXml(xml: FilePaymentListRS): OperationResponse;
567
+ declare function mapMasterRecordFromXml(xml: MasterRecord): any;
568
+
569
+ declare function mapAddressTypeToXml(type: string): 'HOME' | 'WORK' | 'BILLING' | 'DELIVERY';
570
+ declare function mapAddressTypeFromXml(type: string): 'home' | 'work' | 'billing' | 'delivery';
571
+ declare function mapContactTypeToXml(type: string): 'HOME' | 'WORK' | 'MOBILE' | 'FAX';
572
+ declare function mapContactTypeFromXml(type: string): 'home' | 'work' | 'mobile' | 'fax';
573
+ declare function mapEmailTypeToXml(type: string): 'HOME' | 'WORK';
574
+ declare function mapEmailTypeFromXml(type: string): 'home' | 'work';
575
+ declare function mapPassengerTypeToXml(type: string): 'ADT' | 'CHD' | 'INF';
576
+ declare function mapPassengerTypeFromXml(type: string): 'adult' | 'child' | 'infant';
577
+ declare function mapTitleToXml(title: string): 'MR' | 'MRS' | 'MS' | 'DR' | 'PROF';
578
+ declare function mapTitleFromXml(title: string): 'mr' | 'mrs' | 'ms' | 'dr' | 'prof';
579
+ declare function mapServiceTypeToXml(type: string): 'FLIGHT' | 'HOTEL' | 'CAR' | 'TRANSFER' | 'INSURANCE';
580
+ declare function mapServiceTypeFromXml(type: string): 'flight' | 'hotel' | 'car' | 'transfer' | 'insurance';
581
+ declare function mapServiceStatusToXml(status: string): 'CONFIRMED' | 'PENDING' | 'CANCELLED';
582
+ declare function mapServiceStatusFromXml(status: string): 'confirmed' | 'pending' | 'cancelled';
583
+ declare function mapPaymentTypeToXml(type: string): 'CREDIT_CARD' | 'DEBIT_CARD' | 'BANK_TRANSFER' | 'CASH';
584
+ declare function mapPaymentTypeFromXml(type: string): 'credit_card' | 'debit_card' | 'bank_transfer' | 'cash';
585
+ declare function mapPaymentStatusToXml(status: string): 'PENDING' | 'CONFIRMED' | 'FAILED';
586
+ declare function mapPaymentStatusFromXml(status: string): 'pending' | 'confirmed' | 'failed';
587
+ declare function mapCustomerTypeToXml(type: string): 'CUSTOMER' | 'AGENT' | 'SUPPLIER';
588
+ declare function mapBookingTypeToXml(type: string): 'INDIVIDUAL' | 'GROUP' | 'CORPORATE';
589
+ declare function mapPriorityToXml(priority: string): 'LOW' | 'NORMAL' | 'HIGH' | 'URGENT';
590
+ declare function mapSpecialRequestTypeToXml(type: string): 'MEAL' | 'SEAT' | 'WHEELCHAIR' | 'OTHER';
591
+ declare function mapCancelReasonToXml(reason: string): 'CUSTOMER_REQUEST' | 'NO_SHOW' | 'OPERATIONAL' | 'OTHER';
592
+ declare function mapRefundMethodToXml(method: string): 'ORIGINAL_PAYMENT' | 'CREDIT' | 'CASH';
593
+ declare function mapDocumentTypeToXml(type: string): 'CONFIRMATION' | 'INVOICE' | 'VOUCHER' | 'TICKET' | 'ALL';
594
+ declare function mapDocumentFormatToXml(format: string): 'PDF' | 'HTML' | 'XML';
595
+ declare function mapDeliveryMethodToXml(method: string): 'EMAIL' | 'SMS' | 'DOWNLOAD';
596
+ declare function mapSearchOperatorToXml(operator: string): 'EQUALS' | 'CONTAINS' | 'STARTS_WITH' | 'ENDS_WITH';
597
+
598
+ declare const createDateString: (date: string) => DateString;
599
+ declare const createDateTimeString: (dateTime: string) => DateTimeString;
600
+ declare const createTimeString: (time: string) => TimeString;
601
+ declare const getCurrentDateString: () => DateString;
602
+ declare const getCurrentDateTimeString: () => DateTimeString;
603
+ declare const isValidDateString: (date: string) => date is DateString;
604
+ declare const isValidDateTimeString: (dateTime: string) => dateTime is DateTimeString;
605
+ declare const isValidTimeString: (time: string) => time is TimeString;
606
+
607
+ interface RqHeader {
608
+ '@HostID': string;
609
+ '@Xtoken': string;
610
+ '@Interface': 'WEB';
611
+ '@UserName': 'WEB';
612
+ '@LanguageCode'?: string;
613
+ }
614
+ declare enum AvesStatus {
615
+ OK = "OK",
616
+ ERROR = "ERROR",
617
+ WARNING = "WARNING",
618
+ TIMEOUT = "TIMEOUT"
619
+ }
620
+ interface RsStatus {
621
+ '@Status': AvesStatus;
622
+ ErrorCode?: string;
623
+ ErrorDescription?: string;
624
+ Warnings?: {
625
+ Warning: string | string[];
626
+ };
627
+ }
628
+ declare enum AvesSeverity {
629
+ ERROR = "ERROR",
630
+ WARNING = "WARNING",
631
+ INFO = "INFO"
632
+ }
633
+ interface AvesError {
634
+ code: string;
635
+ message: string;
636
+ severity: AvesSeverity;
637
+ timestamp: string;
638
+ requestId: string;
639
+ context?: Record<string, any>;
640
+ }
641
+ declare enum AvesErrorCodes {
642
+ INVALID_TOKEN = "AVES_001",
643
+ TOKEN_EXPIRED = "AVES_002",
644
+ INSUFFICIENT_PERMISSIONS = "AVES_003",
645
+ INVALID_REQUEST_FORMAT = "AVES_100",
646
+ MISSING_REQUIRED_FIELD = "AVES_101",
647
+ INVALID_FIELD_VALUE = "AVES_102",
648
+ INVALID_DATE_FORMAT = "AVES_103",
649
+ BOOKING_NOT_FOUND = "AVES_200",
650
+ BOOKING_ALREADY_CANCELLED = "AVES_201",
651
+ INVALID_BOOKING_STATUS = "AVES_202",
652
+ PAYMENT_FAILED = "AVES_203",
653
+ INSUFFICIENT_INVENTORY = "AVES_204",
654
+ INTERNAL_SERVER_ERROR = "AVES_500",
655
+ SERVICE_UNAVAILABLE = "AVES_501",
656
+ TIMEOUT = "AVES_502",
657
+ RATE_LIMIT_EXCEEDED = "AVES_503"
658
+ }
659
+ interface AvesRequestRoot<TBody> {
660
+ Request: {
661
+ RqHeader: RqHeader;
662
+ Body: TBody;
663
+ };
664
+ }
665
+ interface AvesResponseRoot<TBody> {
666
+ Response: {
667
+ RsStatus: RsStatus;
668
+ Body?: TBody;
669
+ };
670
+ }
671
+ interface AvesXmlResponse {
672
+ Response?: {
673
+ RsStatus?: {
674
+ '@Status'?: AvesStatus;
675
+ ErrorCode?: string;
676
+ ErrorDescription?: string;
677
+ Warnings?: {
678
+ Warning: string | string[];
679
+ };
680
+ };
681
+ };
682
+ }
683
+ interface HttpError extends Error {
684
+ response?: {
685
+ status: number;
686
+ statusText: string;
687
+ data?: any;
688
+ headers?: Record<string, string>;
689
+ config?: {
690
+ url?: string;
691
+ method?: string;
692
+ timeout?: number;
693
+ headers?: Record<string, string>;
694
+ };
695
+ };
696
+ request?: {
697
+ path?: string;
698
+ method?: string;
699
+ headers?: Record<string, string>;
700
+ timeout?: number;
701
+ data?: any;
702
+ };
703
+ config?: {
704
+ url?: string;
705
+ method?: string;
706
+ timeout?: number;
707
+ headers?: Record<string, string>;
708
+ baseURL?: string;
709
+ params?: Record<string, any>;
710
+ };
711
+ code?: string;
712
+ isAxiosError?: boolean;
713
+ }
714
+ type LanguageCode = '01' | '02';
715
+ interface AvesSdkConfig {
716
+ baseUrl: string;
717
+ hostId: string;
718
+ xtoken: string;
719
+ languageCode?: LanguageCode;
720
+ timeout?: number;
721
+ }
722
+
723
+ declare class AvesModule {
724
+ static readonly MODULE_NAME = "AvesModule";
725
+ static readonly VERSION = "1.0.0";
726
+ static forRoot(config: AvesSdkConfig): DynamicModule;
727
+ static forRootAsync(options: AvesModuleAsyncOptions): DynamicModule;
728
+ private static createXmlHttpClientProvider;
729
+ private static createAsyncProviders;
730
+ private static validateConfig;
731
+ }
732
+ interface AvesOptionsFactory {
733
+ createAvesOptions(): Promise<AvesSdkConfig> | AvesSdkConfig;
734
+ }
735
+ interface AvesModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
736
+ useExisting?: Type<AvesOptionsFactory>;
737
+ useClass?: Type<AvesOptionsFactory>;
738
+ useFactory?: (...args: any[]) => Promise<AvesSdkConfig> | AvesSdkConfig;
739
+ inject?: (string | symbol | Type<any>)[];
740
+ }
741
+
742
+ interface IXmlHttpClient {
743
+ postXml<TRequest extends object, TResponse = unknown>(endpoint: string, rootElementName: string, request: TRequest, config?: AxiosRequestConfig): Promise<TResponse>;
744
+ }
745
+ declare class XmlHttpClient implements IXmlHttpClient {
746
+ private readonly config;
747
+ private readonly httpClient;
748
+ private readonly xmlBuilder;
749
+ private readonly xmlParser;
750
+ constructor(config: AvesSdkConfig);
751
+ postXml<TRequest extends object, TResponse = unknown>(endpoint: string, rootElementName: string, request: TRequest, config?: AxiosRequestConfig): Promise<TResponse>;
752
+ }
753
+
754
+ declare class AvesService {
755
+ private readonly config;
756
+ private readonly http;
757
+ constructor(config: AvesSdkConfig, http: IXmlHttpClient);
758
+ private buildHeader;
759
+ private wrapRequest;
760
+ searchMasterRecord(payload: SearchMasterRecordRQ): Promise<AvesResponseRoot<SearchMasterRecordRS>>;
761
+ insertOrUpdateMasterRecord(payload: ManageMasterRecordRQ): Promise<AvesResponseRoot<CustomerRecordRS>>;
762
+ createBookingFile(payload: BookFileRQ): Promise<AvesResponseRoot<BookingFileRS>>;
763
+ modBookingFileHeader(payload: ModiFileHeaderRQ): Promise<AvesResponseRoot<ModiFileHeaderRS>>;
764
+ modBookingFileServices(payload: ModFileServicesRQ): Promise<AvesResponseRoot<BookingFileRS>>;
765
+ setBookingFileStatus(payload: SetStatusRQ): Promise<AvesResponseRoot<SetStatusServiceRS>>;
766
+ cancelBookingFile(payload: CancelFileRQ): Promise<AvesResponseRoot<CancelFileRS>>;
767
+ insertFilePaymentList(payload: FilePaymentListRQ): Promise<AvesResponseRoot<FilePaymentListRS>>;
768
+ printBookingDocument(payload: PrintBookingDocumentRQ): Promise<AvesResponseRoot<PrintBookingDocumentRS>>;
769
+ }
770
+
771
+ declare const AVES_CONFIG_NAMESPACE = "aves";
772
+ interface AvesEnvConfig {
773
+ AVES_BASE_URL: string;
774
+ AVES_HOST_ID: string;
775
+ AVES_XTOKEN: string;
776
+ AVES_LANGUAGE_CODE?: string;
777
+ AVES_TIMEOUT?: string;
778
+ }
779
+ declare const avesConfig: (() => {
780
+ baseUrl: string;
781
+ hostId: string;
782
+ xtoken: string;
783
+ languageCode: string | undefined;
784
+ timeout: number | undefined;
785
+ }) & _nestjs_config.ConfigFactoryKeyHost<{
786
+ baseUrl: string;
787
+ hostId: string;
788
+ xtoken: string;
789
+ languageCode: string | undefined;
790
+ timeout: number | undefined;
791
+ }>;
792
+ type AvesRegisteredConfig = ReturnType<typeof avesConfig>;
793
+
794
+ declare const AVES_SDK_CONFIG: unique symbol;
795
+ declare const XML_HTTP_CLIENT: unique symbol;
796
+
797
+ declare const LanguageCodeValidation: z.ZodEnum<{
798
+ "01": "01";
799
+ "02": "02";
800
+ }>;
801
+ declare const configValidationSchema: z.ZodObject<{
802
+ baseUrl: z.ZodURL;
803
+ hostId: z.ZodString;
804
+ xtoken: z.ZodString;
805
+ languageCode: z.ZodOptional<z.ZodEnum<{
806
+ "01": "01";
807
+ "02": "02";
808
+ }>>;
809
+ timeout: z.ZodOptional<z.ZodNumber>;
810
+ }, z.core.$strip>;
811
+ declare const AddressValidation: z.ZodObject<{
812
+ '@Type': z.ZodOptional<z.ZodEnum<{
813
+ HOME: "HOME";
814
+ WORK: "WORK";
815
+ BILLING: "BILLING";
816
+ DELIVERY: "DELIVERY";
817
+ }>>;
818
+ Street: z.ZodOptional<z.ZodString>;
819
+ City: z.ZodOptional<z.ZodString>;
820
+ State: z.ZodOptional<z.ZodString>;
821
+ PostalCode: z.ZodOptional<z.ZodString>;
822
+ Country: z.ZodOptional<z.ZodString>;
823
+ }, z.core.$strip>;
824
+ declare const ContactInfoValidation: z.ZodObject<{
825
+ Phone: z.ZodOptional<z.ZodObject<{
826
+ '@Type': z.ZodOptional<z.ZodEnum<{
827
+ HOME: "HOME";
828
+ WORK: "WORK";
829
+ MOBILE: "MOBILE";
830
+ FAX: "FAX";
831
+ }>>;
832
+ '@Number': z.ZodString;
833
+ }, z.core.$strip>>;
834
+ Email: z.ZodOptional<z.ZodObject<{
835
+ '@Type': z.ZodOptional<z.ZodEnum<{
836
+ HOME: "HOME";
837
+ WORK: "WORK";
838
+ }>>;
839
+ '@Address': z.ZodString;
840
+ }, z.core.$strip>>;
841
+ }, z.core.$strip>;
842
+ declare const PassengerValidation: z.ZodObject<{
843
+ '@PassengerID': z.ZodString;
844
+ '@Type': z.ZodEnum<{
845
+ ADT: "ADT";
846
+ CHD: "CHD";
847
+ INF: "INF";
848
+ }>;
849
+ '@Title': z.ZodOptional<z.ZodEnum<{
850
+ MR: "MR";
851
+ MRS: "MRS";
852
+ MS: "MS";
853
+ DR: "DR";
854
+ PROF: "PROF";
855
+ }>>;
856
+ FirstName: z.ZodString;
857
+ LastName: z.ZodString;
858
+ MiddleName: z.ZodOptional<z.ZodString>;
859
+ DateOfBirth: z.ZodOptional<z.ZodString>;
860
+ Gender: z.ZodOptional<z.ZodEnum<{
861
+ M: "M";
862
+ F: "F";
863
+ }>>;
864
+ Nationality: z.ZodOptional<z.ZodString>;
865
+ Address: z.ZodOptional<z.ZodObject<{
866
+ '@Type': z.ZodOptional<z.ZodEnum<{
867
+ HOME: "HOME";
868
+ WORK: "WORK";
869
+ BILLING: "BILLING";
870
+ DELIVERY: "DELIVERY";
871
+ }>>;
872
+ Street: z.ZodOptional<z.ZodString>;
873
+ City: z.ZodOptional<z.ZodString>;
874
+ State: z.ZodOptional<z.ZodString>;
875
+ PostalCode: z.ZodOptional<z.ZodString>;
876
+ Country: z.ZodOptional<z.ZodString>;
877
+ }, z.core.$strip>>;
878
+ ContactInfo: z.ZodOptional<z.ZodObject<{
879
+ Phone: z.ZodOptional<z.ZodObject<{
880
+ '@Type': z.ZodOptional<z.ZodEnum<{
881
+ HOME: "HOME";
882
+ WORK: "WORK";
883
+ MOBILE: "MOBILE";
884
+ FAX: "FAX";
885
+ }>>;
886
+ '@Number': z.ZodString;
887
+ }, z.core.$strip>>;
888
+ Email: z.ZodOptional<z.ZodObject<{
889
+ '@Type': z.ZodOptional<z.ZodEnum<{
890
+ HOME: "HOME";
891
+ WORK: "WORK";
892
+ }>>;
893
+ '@Address': z.ZodString;
894
+ }, z.core.$strip>>;
895
+ }, z.core.$strip>>;
896
+ }, z.core.$strip>;
897
+ declare const ServiceValidation: z.ZodObject<{
898
+ '@ServiceID': z.ZodString;
899
+ '@Type': z.ZodEnum<{
900
+ FLIGHT: "FLIGHT";
901
+ HOTEL: "HOTEL";
902
+ CAR: "CAR";
903
+ TRANSFER: "TRANSFER";
904
+ INSURANCE: "INSURANCE";
905
+ }>;
906
+ '@Status': z.ZodEnum<{
907
+ CONFIRMED: "CONFIRMED";
908
+ PENDING: "PENDING";
909
+ CANCELLED: "CANCELLED";
910
+ }>;
911
+ ServiceDetails: z.ZodObject<{
912
+ Code: z.ZodOptional<z.ZodString>;
913
+ Name: z.ZodOptional<z.ZodString>;
914
+ Description: z.ZodOptional<z.ZodString>;
915
+ StartDate: z.ZodOptional<z.ZodString>;
916
+ EndDate: z.ZodOptional<z.ZodString>;
917
+ Price: z.ZodOptional<z.ZodObject<{
918
+ '@Currency': z.ZodString;
919
+ '@Amount': z.ZodNumber;
920
+ }, z.core.$strip>>;
921
+ }, z.core.$strip>;
922
+ }, z.core.$strip>;
923
+ declare const PaymentValidation: z.ZodObject<{
924
+ '@PaymentID': z.ZodString;
925
+ '@Type': z.ZodEnum<{
926
+ CREDIT_CARD: "CREDIT_CARD";
927
+ DEBIT_CARD: "DEBIT_CARD";
928
+ BANK_TRANSFER: "BANK_TRANSFER";
929
+ CASH: "CASH";
930
+ }>;
931
+ '@Status': z.ZodEnum<{
932
+ CONFIRMED: "CONFIRMED";
933
+ PENDING: "PENDING";
934
+ FAILED: "FAILED";
935
+ }>;
936
+ Amount: z.ZodObject<{
937
+ '@Currency': z.ZodString;
938
+ '@Amount': z.ZodNumber;
939
+ }, z.core.$strip>;
940
+ PaymentDetails: z.ZodOptional<z.ZodObject<{
941
+ CardNumber: z.ZodOptional<z.ZodString>;
942
+ ExpiryDate: z.ZodOptional<z.ZodString>;
943
+ CardHolderName: z.ZodOptional<z.ZodString>;
944
+ }, z.core.$strip>>;
945
+ }, z.core.$strip>;
946
+ declare const SearchMasterRecordRQValidation: z.ZodObject<{
947
+ SearchCriteria: z.ZodObject<{
948
+ MasterRecordType: z.ZodEnum<{
949
+ CUSTOMER: "CUSTOMER";
950
+ AGENT: "AGENT";
951
+ SUPPLIER: "SUPPLIER";
952
+ }>;
953
+ SearchFields: z.ZodObject<{
954
+ Field: z.ZodArray<z.ZodObject<{
955
+ '@Name': z.ZodString;
956
+ '@Value': z.ZodString;
957
+ '@Operator': z.ZodOptional<z.ZodEnum<{
958
+ EQUALS: "EQUALS";
959
+ CONTAINS: "CONTAINS";
960
+ STARTS_WITH: "STARTS_WITH";
961
+ ENDS_WITH: "ENDS_WITH";
962
+ }>>;
963
+ }, z.core.$strip>>;
964
+ }, z.core.$strip>;
965
+ Pagination: z.ZodOptional<z.ZodObject<{
966
+ '@PageSize': z.ZodNumber;
967
+ '@PageNumber': z.ZodNumber;
968
+ }, z.core.$strip>>;
969
+ }, z.core.$strip>;
970
+ }, z.core.$strip>;
971
+ declare const BookFileRQValidation: z.ZodObject<{
972
+ BookingDetails: z.ZodObject<{
973
+ '@BookingType': z.ZodEnum<{
974
+ INDIVIDUAL: "INDIVIDUAL";
975
+ GROUP: "GROUP";
976
+ CORPORATE: "CORPORATE";
977
+ }>;
978
+ '@Priority': z.ZodEnum<{
979
+ LOW: "LOW";
980
+ NORMAL: "NORMAL";
981
+ HIGH: "HIGH";
982
+ URGENT: "URGENT";
983
+ }>;
984
+ CustomerInfo: z.ZodObject<{
985
+ '@CustomerID': z.ZodOptional<z.ZodString>;
986
+ CustomerDetails: z.ZodOptional<z.ZodAny>;
987
+ }, z.core.$strip>;
988
+ PassengerList: z.ZodObject<{
989
+ Passenger: z.ZodArray<z.ZodObject<{
990
+ '@PassengerID': z.ZodString;
991
+ '@Type': z.ZodEnum<{
992
+ ADT: "ADT";
993
+ CHD: "CHD";
994
+ INF: "INF";
995
+ }>;
996
+ '@Title': z.ZodOptional<z.ZodEnum<{
997
+ MR: "MR";
998
+ MRS: "MRS";
999
+ MS: "MS";
1000
+ DR: "DR";
1001
+ PROF: "PROF";
1002
+ }>>;
1003
+ FirstName: z.ZodString;
1004
+ LastName: z.ZodString;
1005
+ MiddleName: z.ZodOptional<z.ZodString>;
1006
+ DateOfBirth: z.ZodOptional<z.ZodString>;
1007
+ Gender: z.ZodOptional<z.ZodEnum<{
1008
+ M: "M";
1009
+ F: "F";
1010
+ }>>;
1011
+ Nationality: z.ZodOptional<z.ZodString>;
1012
+ Address: z.ZodOptional<z.ZodObject<{
1013
+ '@Type': z.ZodOptional<z.ZodEnum<{
1014
+ HOME: "HOME";
1015
+ WORK: "WORK";
1016
+ BILLING: "BILLING";
1017
+ DELIVERY: "DELIVERY";
1018
+ }>>;
1019
+ Street: z.ZodOptional<z.ZodString>;
1020
+ City: z.ZodOptional<z.ZodString>;
1021
+ State: z.ZodOptional<z.ZodString>;
1022
+ PostalCode: z.ZodOptional<z.ZodString>;
1023
+ Country: z.ZodOptional<z.ZodString>;
1024
+ }, z.core.$strip>>;
1025
+ ContactInfo: z.ZodOptional<z.ZodObject<{
1026
+ Phone: z.ZodOptional<z.ZodObject<{
1027
+ '@Type': z.ZodOptional<z.ZodEnum<{
1028
+ HOME: "HOME";
1029
+ WORK: "WORK";
1030
+ MOBILE: "MOBILE";
1031
+ FAX: "FAX";
1032
+ }>>;
1033
+ '@Number': z.ZodString;
1034
+ }, z.core.$strip>>;
1035
+ Email: z.ZodOptional<z.ZodObject<{
1036
+ '@Type': z.ZodOptional<z.ZodEnum<{
1037
+ HOME: "HOME";
1038
+ WORK: "WORK";
1039
+ }>>;
1040
+ '@Address': z.ZodString;
1041
+ }, z.core.$strip>>;
1042
+ }, z.core.$strip>>;
1043
+ }, z.core.$strip>>;
1044
+ }, z.core.$strip>;
1045
+ SelectedServiceList: z.ZodObject<{
1046
+ Service: z.ZodArray<z.ZodObject<{
1047
+ '@ServiceID': z.ZodString;
1048
+ '@Type': z.ZodEnum<{
1049
+ FLIGHT: "FLIGHT";
1050
+ HOTEL: "HOTEL";
1051
+ CAR: "CAR";
1052
+ TRANSFER: "TRANSFER";
1053
+ INSURANCE: "INSURANCE";
1054
+ }>;
1055
+ '@Status': z.ZodEnum<{
1056
+ CONFIRMED: "CONFIRMED";
1057
+ PENDING: "PENDING";
1058
+ CANCELLED: "CANCELLED";
1059
+ }>;
1060
+ ServiceDetails: z.ZodObject<{
1061
+ Code: z.ZodOptional<z.ZodString>;
1062
+ Name: z.ZodOptional<z.ZodString>;
1063
+ Description: z.ZodOptional<z.ZodString>;
1064
+ StartDate: z.ZodOptional<z.ZodString>;
1065
+ EndDate: z.ZodOptional<z.ZodString>;
1066
+ Price: z.ZodOptional<z.ZodObject<{
1067
+ '@Currency': z.ZodString;
1068
+ '@Amount': z.ZodNumber;
1069
+ }, z.core.$strip>>;
1070
+ }, z.core.$strip>;
1071
+ }, z.core.$strip>>;
1072
+ }, z.core.$strip>;
1073
+ SpecialRequests: z.ZodOptional<z.ZodObject<{
1074
+ Request: z.ZodArray<z.ZodObject<{
1075
+ '@Type': z.ZodEnum<{
1076
+ MEAL: "MEAL";
1077
+ SEAT: "SEAT";
1078
+ WHEELCHAIR: "WHEELCHAIR";
1079
+ OTHER: "OTHER";
1080
+ }>;
1081
+ '@Description': z.ZodString;
1082
+ }, z.core.$strip>>;
1083
+ }, z.core.$strip>>;
1084
+ }, z.core.$strip>;
1085
+ }, z.core.$strip>;
1086
+ declare const CancelFileRQValidation: z.ZodObject<{
1087
+ '@BookingFileID': z.ZodString;
1088
+ CancellationDetails: z.ZodObject<{
1089
+ '@Reason': z.ZodEnum<{
1090
+ OTHER: "OTHER";
1091
+ CUSTOMER_REQUEST: "CUSTOMER_REQUEST";
1092
+ NO_SHOW: "NO_SHOW";
1093
+ OPERATIONAL: "OPERATIONAL";
1094
+ }>;
1095
+ '@Description': z.ZodOptional<z.ZodString>;
1096
+ RefundRequest: z.ZodOptional<z.ZodObject<{
1097
+ '@Amount': z.ZodNumber;
1098
+ '@Currency': z.ZodString;
1099
+ '@Method': z.ZodEnum<{
1100
+ CASH: "CASH";
1101
+ ORIGINAL_PAYMENT: "ORIGINAL_PAYMENT";
1102
+ CREDIT: "CREDIT";
1103
+ }>;
1104
+ }, z.core.$strip>>;
1105
+ }, z.core.$strip>;
1106
+ }, z.core.$strip>;
1107
+ declare const PrintBookingDocumentRQValidation: z.ZodObject<{
1108
+ '@BookingFileID': z.ZodString;
1109
+ DocumentRequest: z.ZodObject<{
1110
+ '@DocumentType': z.ZodEnum<{
1111
+ CONFIRMATION: "CONFIRMATION";
1112
+ INVOICE: "INVOICE";
1113
+ VOUCHER: "VOUCHER";
1114
+ TICKET: "TICKET";
1115
+ ALL: "ALL";
1116
+ }>;
1117
+ '@Format': z.ZodEnum<{
1118
+ PDF: "PDF";
1119
+ HTML: "HTML";
1120
+ XML: "XML";
1121
+ }>;
1122
+ '@Language': z.ZodOptional<z.ZodString>;
1123
+ DeliveryMethod: z.ZodOptional<z.ZodObject<{
1124
+ '@Type': z.ZodEnum<{
1125
+ EMAIL: "EMAIL";
1126
+ SMS: "SMS";
1127
+ DOWNLOAD: "DOWNLOAD";
1128
+ }>;
1129
+ '@Address': z.ZodOptional<z.ZodString>;
1130
+ }, z.core.$strip>>;
1131
+ }, z.core.$strip>;
1132
+ }, z.core.$strip>;
1133
+ type AddressValidationType = z.infer<typeof AddressValidation>;
1134
+ type ContactInfoValidationType = z.infer<typeof ContactInfoValidation>;
1135
+ type PassengerValidationType = z.infer<typeof PassengerValidation>;
1136
+ type ServiceValidationType = z.infer<typeof ServiceValidation>;
1137
+ type PaymentValidationType = z.infer<typeof PaymentValidation>;
1138
+ type SearchMasterRecordRQValidationType = z.infer<typeof SearchMasterRecordRQValidation>;
1139
+ type BookFileRQValidationType = z.infer<typeof BookFileRQValidation>;
1140
+ type CancelFileRQValidationType = z.infer<typeof CancelFileRQValidation>;
1141
+ type PrintBookingDocumentRQValidationType = z.infer<typeof PrintBookingDocumentRQValidation>;
1142
+
1143
+ declare class AvesValidator<T = unknown> {
1144
+ private schema;
1145
+ constructor(schema: ZodSchema<T>);
1146
+ validate(data: unknown): T;
1147
+ asyncValidate(data: unknown): Promise<T>;
1148
+ safeValidateAndParse(data: unknown): {
1149
+ success: false;
1150
+ error: ZodError;
1151
+ } | z.ZodSafeParseSuccess<T>;
1152
+ safeAsyncValidateAndParse(data: unknown): Promise<{
1153
+ success: true;
1154
+ data: T;
1155
+ } | {
1156
+ success: false;
1157
+ error: ZodError;
1158
+ }>;
1159
+ getErrorMessage(error: ZodError, separator?: string): string;
1160
+ private createError;
1161
+ static withSchema<U>(schema: ZodSchema<U>): AvesValidator<U>;
1162
+ }
1163
+ declare function createAvesValidator<T>(schema: ZodSchema<T>): AvesValidator<T>;
1164
+
1165
+ declare class AvesException extends Error {
1166
+ readonly code: string;
1167
+ readonly severity: AvesSeverity;
1168
+ readonly timestamp: string;
1169
+ readonly requestId: string;
1170
+ readonly context?: Record<string, any>;
1171
+ constructor(code: string | AvesErrorCodes, message: string, options?: {
1172
+ severity?: AvesSeverity;
1173
+ context?: Record<string, any>;
1174
+ requestId?: string;
1175
+ });
1176
+ static fromAvesError(avesError: AvesError): AvesException;
1177
+ isRetryable(): boolean;
1178
+ getUserFriendlyMessage(): string;
1179
+ toJSON(): Record<string, any>;
1180
+ toAvesError(): AvesError;
1181
+ getHttpStatusCode(): number;
1182
+ getCategory(): string;
1183
+ private generateRequestId;
1184
+ }
1185
+
1186
+ declare class AvesErrorHandler {
1187
+ parseError(error: any): AvesException;
1188
+ private parseHttpError;
1189
+ private parseAvesXmlError;
1190
+ isRetryable(error: AvesException): boolean;
1191
+ getUserFriendlyMessage(error: AvesException): string;
1192
+ private buildContext;
1193
+ private isSensitiveKey;
1194
+ private isSerializableValue;
1195
+ private isHttpError;
1196
+ private isAvesXmlResponse;
1197
+ }
1198
+
1199
+ export { AVES_CONFIG_NAMESPACE, AVES_SDK_CONFIG, type AddPaymentRequest, type Address, type AddressType, AddressValidation, type AddressValidationType, type AvesEnvConfig, type AvesError, AvesErrorCodes, AvesErrorHandler, AvesException, AvesModule, type AvesModuleAsyncOptions, type AvesOptionsFactory, type AvesRegisteredConfig, type AvesRequestRoot, type AvesResponseRoot, type AvesSdkConfig, AvesService, AvesSeverity, AvesStatus, AvesValidator, type AvesXmlResponse, type BookFileRQ, BookFileRQValidation, type BookFileRQValidationType, type BookingFile, type BookingFileRS, type BookingPassenger, type BookingPayment, type BookingResponse, type BookingService, type BookingStatusType, type BookingType, type CancelBookingRequest, type CancelFileRQ, CancelFileRQValidation, type CancelFileRQValidationType, type CancelFileRS, type CancelReasonType, type CommunicationMethodType, type ContactInfo, ContactInfoValidation, type ContactInfoValidationType, type ContactType, type CreateBookingRequest, type Customer, type CustomerAddress, type CustomerContact, type CustomerRecordRS, type CustomerStatusType, type CustomerType, type DateString, type DateTimeString, type DeliveryMethodType, type DeliveryStatusType, type DocumentFormatType, type DocumentResponse, type DocumentType, type EmailType, type FilePaymentListRQ, type FilePaymentListRS, type GenderType, type HttpError, type IXmlHttpClient, type LanguageCode, LanguageCodeValidation, type ManageMasterRecordRQ, type MasterRecord, type ModFileServicesRQ, type ModiFileHeaderRQ, type ModiFileHeaderRS, type OperationResponse, type Passenger, type PassengerType, PassengerValidation, type PassengerValidationType, type Payment, type PaymentStatusType, type PaymentType, PaymentValidation, type PaymentValidationType, type PricingItemType, type PrintBookingDocumentRQ, PrintBookingDocumentRQValidation, type PrintBookingDocumentRQValidationType, type PrintBookingDocumentRS, type PrintDocumentRequest, type PriorityType, type RefundMethodType, type RqHeader, type RsStatus, type SearchCustomerRequest, type SearchMasterRecordRQ, SearchMasterRecordRQValidation, type SearchMasterRecordRQValidationType, type SearchMasterRecordRS, type SearchOperatorType, type SearchResponse, type Service, type ServiceStatusType, type ServiceType, ServiceValidation, type ServiceValidationType, type SetStatusRQ, type SetStatusServiceRS, type SpecialRequestType, type TimeString, type TitleType, XML_HTTP_CLIENT, XmlHttpClient, avesConfig, configValidationSchema, createAvesValidator, createDateString, createDateTimeString, createTimeString, getCurrentDateString, getCurrentDateTimeString, isValidDateString, isValidDateTimeString, isValidTimeString, mapAddPaymentToXml, mapAddressToXml, mapAddressTypeFromXml, mapAddressTypeToXml, mapBookingFromXml, mapBookingResponseFromXml, mapBookingTypeToXml, mapCancelBookingToXml, mapCancelReasonToXml, mapCancelResponseFromXml, mapContactToXml, mapContactTypeFromXml, mapContactTypeToXml, mapCreateBookingToXml, mapCustomerToXml, mapCustomerTypeToXml, mapDeliveryMethodToXml, mapDocumentFormatToXml, mapDocumentResponseFromXml, mapDocumentTypeToXml, mapEmailTypeFromXml, mapEmailTypeToXml, mapMasterRecordFromXml, mapPassengerToXml, mapPassengerTypeFromXml, mapPassengerTypeToXml, mapPaymentResponseFromXml, mapPaymentStatusFromXml, mapPaymentStatusToXml, mapPaymentToXml, mapPaymentTypeFromXml, mapPaymentTypeToXml, mapPrintDocumentToXml, mapPriorityToXml, mapRefundMethodToXml, mapSearchCustomerToXml, mapSearchOperatorToXml, mapSearchResponseFromXml, mapServiceStatusFromXml, mapServiceStatusToXml, mapServiceToXml, mapServiceTypeFromXml, mapServiceTypeToXml, mapSpecialRequestTypeToXml, mapTitleFromXml, mapTitleToXml };