sm-types 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,183 @@
1
+ export interface IWcfOffer {
2
+ outbound: IWcfBound;
3
+ inbound: IWcfBound | null;
4
+ supplier: string;
5
+ itineraryId?: number;
6
+ travelIdentification: any;
7
+ price: number;
8
+ priceDetails: IPriceDetails;
9
+ flightIdentification: string;
10
+ stopType: string;
11
+ cabinClass: string;
12
+ diffAirports: boolean;
13
+ familyOffers?: any[];
14
+ selectedItineraryId?: number;
15
+ }
16
+ export interface IWcfBound {
17
+ segments: IWcfSegment[];
18
+ supplier: string;
19
+ type: string;
20
+ departure: string;
21
+ departureHour: string;
22
+ departureTextDate: string;
23
+ departureWeekDay: string;
24
+ arrival: string;
25
+ arrivalHour: string;
26
+ arrivalTextDate: string;
27
+ arrivalWeekDay: string;
28
+ daysDiff: number;
29
+ origin: IWcfStation;
30
+ destination: IWcfStation;
31
+ totalStops: number;
32
+ carrier: IWcfCarrier;
33
+ durationMinutes: number;
34
+ cabinClass: string;
35
+ family: string;
36
+ baggage: boolean;
37
+ baggagePieces: number;
38
+ baggageWeight: number;
39
+ stops: any[];
40
+ durationHours: string;
41
+ }
42
+ export interface IWcfSegment {
43
+ departureMoment: string;
44
+ departure: string;
45
+ departureHour: string;
46
+ departureTextDate: string;
47
+ departureWeekDay: string;
48
+ arrivalMoment: string;
49
+ arrival: string;
50
+ arrivalHour: string;
51
+ arrivalTextDate: string;
52
+ arrivalWeekDay: string;
53
+ daysDiff: number;
54
+ durationMinutes: number;
55
+ durationHours: string;
56
+ origin: IWcfStation;
57
+ destination: IWcfStation;
58
+ carrier: IWcfCarrier;
59
+ family: string;
60
+ familyCode: string;
61
+ cabinClass: string;
62
+ flightNumber: string;
63
+ flightCode: string;
64
+ baggage: boolean;
65
+ baggagePieces: number;
66
+ baggageWeight: number;
67
+ fareInfo: IWcfFare;
68
+ }
69
+ interface IWcfStation {
70
+ code: string;
71
+ name: string;
72
+ type: string;
73
+ }
74
+ interface IWcfCarrier {
75
+ code: string;
76
+ name: string;
77
+ imageUrl: string;
78
+ }
79
+ export interface IWcfFare {
80
+ base: string;
81
+ class: string;
82
+ flightNumber: string;
83
+ }
84
+ export interface IPriceDetails {
85
+ total: number;
86
+ totalFare: number;
87
+ totalTaxes: number;
88
+ totalAdditional: number;
89
+ totalDiscount: number;
90
+ totalPassengerFees?: number;
91
+ totalDiscountMargin: number;
92
+ }
93
+ export interface IAirlinesOffer {
94
+ supplierOfferDetails: IWcfOffer;
95
+ [K: string]: any;
96
+ }
97
+ export interface IWcfReserveOfferReqDto {
98
+ offer: IAirlinesOffer;
99
+ reserveData: {
100
+ contactInfo: IContactInfoReqDto;
101
+ passengersInfo: IPassengerInfoReqDto[];
102
+ };
103
+ }
104
+ export interface IContactInfoReqDto {
105
+ firstName: string;
106
+ surname: string;
107
+ email: string;
108
+ phone: {
109
+ ddi: string;
110
+ number: string;
111
+ };
112
+ companyName: string;
113
+ address: {
114
+ street: string;
115
+ number: number;
116
+ complement: string;
117
+ postalCode: string;
118
+ city: string;
119
+ stateCode: string;
120
+ countryCode: string;
121
+ };
122
+ }
123
+ export interface IPassengerInfoReqDto {
124
+ firstName: string;
125
+ surname: string;
126
+ birthDate: Date | string;
127
+ sex: "Male" | "Female";
128
+ nationality: string;
129
+ residenceCountry: string;
130
+ cpf: {
131
+ number: number;
132
+ };
133
+ passport: {
134
+ number: number;
135
+ issuingCountry: string;
136
+ expirationDate: Date | string;
137
+ };
138
+ }
139
+ export interface IWcfReserveOfferResDto {
140
+ status?: string;
141
+ recordLocator?: string;
142
+ price?: number;
143
+ priceDetails?: IPriceDetails;
144
+ reservedUntil?: Date | string;
145
+ extraLocators?: string;
146
+ error?: boolean;
147
+ type?: string;
148
+ message?: string;
149
+ }
150
+ export interface IWcfCheckReserveReqDto {
151
+ offer: IAirlinesOffer;
152
+ }
153
+ export interface IWcfCheckReserveResDto {
154
+ availability: boolean;
155
+ currentPrice: number;
156
+ selectedPrice: number;
157
+ priceDetails: IPriceDetails;
158
+ isSamePrice: boolean;
159
+ message: string;
160
+ }
161
+ export interface IWcfBuyOfferReqDto {
162
+ offer: IWcfOffer;
163
+ price: number;
164
+ recordLocator: string;
165
+ paymentDataHash: string;
166
+ }
167
+ export interface IWcfBuyOfferResDto {
168
+ recordLocator: string;
169
+ bookingCode: string;
170
+ price: number;
171
+ emittedAt: Date;
172
+ error?: boolean;
173
+ message?: string;
174
+ }
175
+ export interface IWcfCancelOfferReqDto {
176
+ offer: IWcfOffer;
177
+ }
178
+ export interface IWcfCancelOfferResDto {
179
+ error: boolean;
180
+ type?: string;
181
+ message?: string;
182
+ }
183
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });