sm-types 1.5.1 → 1.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{dist/common → common}/index.d.ts +0 -0
- package/{dist/common → common}/index.js +0 -0
- package/{dist/common → common}/shared/index.d.ts +0 -0
- package/{dist/common → common}/shared/index.js +0 -0
- package/{dist/errors → errors}/index.d.ts +0 -0
- package/{dist/errors → errors}/index.js +0 -0
- package/errors/user/create-user.d.ts +4 -0
- package/{dist/errors → errors}/user/create-user.js +0 -0
- package/{dist/errors → errors}/user/index.d.ts +0 -0
- package/{dist/errors → errors}/user/index.js +0 -0
- package/package.json +2 -2
- package/{dist/sm-airlines → sm-airlines}/command-params/index.d.ts +0 -0
- package/{dist/sm-airlines → sm-airlines}/command-params/index.js +0 -0
- package/{dist/sm-airlines → sm-airlines}/dtos/index.d.ts +0 -0
- package/{dist/sm-airlines → sm-airlines}/dtos/index.js +0 -0
- package/{dist/sm-airlines → sm-airlines}/dtos/request.d.ts +0 -0
- package/{dist/sm-airlines → sm-airlines}/dtos/request.js +0 -0
- package/{dist/sm-airlines → sm-airlines}/dtos/response.d.ts +0 -0
- package/{dist/sm-airlines → sm-airlines}/dtos/response.js +0 -0
- package/{dist/sm-airlines → sm-airlines}/index.d.ts +0 -0
- package/{dist/sm-airlines → sm-airlines}/index.js +0 -0
- package/{dist/sm-azul → sm-azul}/index.d.ts +0 -0
- package/{dist/sm-azul → sm-azul}/index.js +0 -0
- package/{dist/sm-azul → sm-azul}/shared/index.d.ts +0 -0
- package/{dist/sm-azul → sm-azul}/shared/index.js +0 -0
- package/{dist/sm-car-rentals → sm-car-rentals}/index.d.ts +0 -0
- package/{dist/sm-car-rentals → sm-car-rentals}/index.js +0 -0
- package/{dist/sm-car-rentals → sm-car-rentals}/localiza/index.d.ts +0 -0
- package/{dist/sm-car-rentals → sm-car-rentals}/localiza/index.js +0 -0
- package/{dist/sm-car-rentals → sm-car-rentals}/movida/index.d.ts +0 -0
- package/{dist/sm-car-rentals → sm-car-rentals}/movida/index.js +0 -0
- package/{dist/sm-tech → sm-tech}/index.d.ts +0 -0
- package/{dist/sm-tech → sm-tech}/index.js +0 -0
- package/{dist/sm-tech → sm-tech}/shared/index.d.ts +0 -0
- package/{dist/sm-tech → sm-tech}/shared/index.js +0 -0
- package/{dist/sm-wcf → sm-wcf}/index.d.ts +0 -0
- package/{dist/sm-wcf → sm-wcf}/index.js +0 -0
- package/dist/README.md +0 -3
- package/dist/errors/user/create-user.d.ts +0 -4
- package/dist/package.json +0 -35
- package/src/common/index.ts +0 -13
- package/src/common/shared/index.ts +0 -16
- package/src/errors/index.ts +0 -1
- package/src/errors/user/create-user.ts +0 -5
- package/src/errors/user/index.ts +0 -1
- package/src/sm-airlines/command-params/index.ts +0 -30
- package/src/sm-airlines/dtos/index.ts +0 -20
- package/src/sm-airlines/dtos/request.ts +0 -44
- package/src/sm-airlines/dtos/response.ts +0 -73
- package/src/sm-airlines/index.ts +0 -672
- package/src/sm-azul/index.ts +0 -231
- package/src/sm-azul/shared/index.ts +0 -895
- package/src/sm-car-rentals/index.ts +0 -163
- package/src/sm-car-rentals/localiza/index.ts +0 -12
- package/src/sm-car-rentals/movida/index.ts +0 -11
- package/src/sm-tech/index.ts +0 -137
- package/src/sm-tech/shared/index.ts +0 -116
- package/src/sm-wcf/index.ts +0 -201
package/src/sm-airlines/index.ts
DELETED
|
@@ -1,672 +0,0 @@
|
|
|
1
|
-
import { ISmTTravelOffer } from "../sm-tech";
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
IAddOfferReqDto,
|
|
5
|
-
IBuyOfferReqDto,
|
|
6
|
-
IReserveOfferReqDto,
|
|
7
|
-
IOrderReserveOfferReqDto,
|
|
8
|
-
IListOffersReqDto,
|
|
9
|
-
IListOffersResDto,
|
|
10
|
-
IAddOfferResDto,
|
|
11
|
-
IGetOfferDetailsResDto,
|
|
12
|
-
IRefreshAvailabilityResDto,
|
|
13
|
-
IReplaceOfferResDto,
|
|
14
|
-
IReserveOfferResDto,
|
|
15
|
-
IOrderReserveOfferResDto,
|
|
16
|
-
ICheckReserveOfferResDto,
|
|
17
|
-
IBuyOfferResDto,
|
|
18
|
-
ICancelOfferResDto,
|
|
19
|
-
IGetChargeDetailsResDto
|
|
20
|
-
} from "./dtos";
|
|
21
|
-
export {
|
|
22
|
-
IAddOfferCommandParams,
|
|
23
|
-
IRefreshAvailabilityCommandParams,
|
|
24
|
-
IBuyOfferCommandParams,
|
|
25
|
-
ICancelOfferCommandParams,
|
|
26
|
-
IReserveOfferCommandParams,
|
|
27
|
-
IOrderReserveOfferCommandParams,
|
|
28
|
-
IProcessReserveCommandParams,
|
|
29
|
-
IReplaceOfferCommandParams,
|
|
30
|
-
ICheckReserveQueryParams,
|
|
31
|
-
} from "./command-params";
|
|
32
|
-
|
|
33
|
-
export interface IWrappedResponse<T> {
|
|
34
|
-
status: IResponseStatus;
|
|
35
|
-
data?: T;
|
|
36
|
-
message?: string;
|
|
37
|
-
code?: number;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface ISmAzulTariffedJourney {
|
|
41
|
-
notForGeneralUse: boolean;
|
|
42
|
-
sellKey: string;
|
|
43
|
-
fare: ISmAzulFare;
|
|
44
|
-
segments: ISmAzulDetailedSegment[];
|
|
45
|
-
salesDate: Date;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface ISmAzulFare {
|
|
49
|
-
classOfService: string;
|
|
50
|
-
ruleTariff: string;
|
|
51
|
-
carrierCode: string;
|
|
52
|
-
ruleCode: string;
|
|
53
|
-
fareBasis: string;
|
|
54
|
-
paxFares: ISmPaxFareDto[];
|
|
55
|
-
fareApplicationType: ISmAzulFareApplicationType;
|
|
56
|
-
inboundOutbound: string;
|
|
57
|
-
isAllotmentMarketFare: boolean;
|
|
58
|
-
sellKey: string;
|
|
59
|
-
tripTypeRule: string;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export interface ISmPaxFareDto {
|
|
63
|
-
paxType: IPassengerType;
|
|
64
|
-
discountCode: string;
|
|
65
|
-
ruleTariff: string;
|
|
66
|
-
carrierCode: string;
|
|
67
|
-
ruleCode: string;
|
|
68
|
-
fareBasis: string;
|
|
69
|
-
fareDiscountCode: string;
|
|
70
|
-
actionStatusCode: string;
|
|
71
|
-
productClass: string;
|
|
72
|
-
productClassName: ISmAzulProductClassName;
|
|
73
|
-
fareStatus: ISmAzulFareStatus;
|
|
74
|
-
charges: ISmAzulServiceCharge[];
|
|
75
|
-
lastModified: Date;
|
|
76
|
-
availableCount: number;
|
|
77
|
-
status: string;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export interface ISmAzulSegment {
|
|
81
|
-
state: ISmAzulState;
|
|
82
|
-
departure: {
|
|
83
|
-
station: string;
|
|
84
|
-
dateTime: Date;
|
|
85
|
-
terminalOverride?: string;
|
|
86
|
-
};
|
|
87
|
-
arrival: {
|
|
88
|
-
station: string;
|
|
89
|
-
dateTime: Date;
|
|
90
|
-
terminalOverride?: string;
|
|
91
|
-
};
|
|
92
|
-
flightDesignator: ISmAzulFlightDesignator;
|
|
93
|
-
segmentType: string;
|
|
94
|
-
international: boolean;
|
|
95
|
-
legs: ISmAzulLeg[];
|
|
96
|
-
sellKey: string;
|
|
97
|
-
trafficRestriction: string;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export interface ISmAzulDetailedSegment extends ISmAzulSegment {
|
|
101
|
-
fares: ISmAzulFare[];
|
|
102
|
-
cancelSegment: boolean;
|
|
103
|
-
actionStatusCode: string;
|
|
104
|
-
classOfService: string;
|
|
105
|
-
classType: string;
|
|
106
|
-
paxCount: number;
|
|
107
|
-
priorityCode: string;
|
|
108
|
-
priorityDate: Date;
|
|
109
|
-
changeReasonCode: string;
|
|
110
|
-
timeChanged: boolean;
|
|
111
|
-
tripType: ISmAzulTripType;
|
|
112
|
-
checkInStatus: ISmAzulCheckInStatus;
|
|
113
|
-
createdDate: Date;
|
|
114
|
-
paxSegmentServices: ISmAzulPaxSegmentService[];
|
|
115
|
-
fareClassOfService: string;
|
|
116
|
-
cabinOfService: string;
|
|
117
|
-
aVSStatusIndicator: ISmAzulClassStatus;
|
|
118
|
-
segmentId: string;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
export interface ISmAzulPaxSegmentService {
|
|
122
|
-
passengerId: number;
|
|
123
|
-
passengerNumber: number;
|
|
124
|
-
baggageCount: number;
|
|
125
|
-
baggageWeight: number;
|
|
126
|
-
paxLegServices?: any[];
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export interface ISmAzulLeg {
|
|
130
|
-
departure: {
|
|
131
|
-
station: string;
|
|
132
|
-
dateTime: Date;
|
|
133
|
-
paxDateTime: Date;
|
|
134
|
-
terminal: string;
|
|
135
|
-
LTV: number;
|
|
136
|
-
};
|
|
137
|
-
arrival: {
|
|
138
|
-
station: string;
|
|
139
|
-
dateTime: Date;
|
|
140
|
-
paxDateTime: Date;
|
|
141
|
-
terminal: string;
|
|
142
|
-
LTV: number;
|
|
143
|
-
};
|
|
144
|
-
flightDesignator: ISmAzulFlightDesignator;
|
|
145
|
-
status: string;
|
|
146
|
-
inventoryLegKey: string;
|
|
147
|
-
aircraftType: string;
|
|
148
|
-
aircraftTypeSuffix: string;
|
|
149
|
-
PRBCCode: string;
|
|
150
|
-
scheduleServiceType: string;
|
|
151
|
-
onTime: string;
|
|
152
|
-
eTicket: boolean;
|
|
153
|
-
IROP: boolean;
|
|
154
|
-
FLIFOUpdated: boolean;
|
|
155
|
-
subjectToGovtApproval: boolean;
|
|
156
|
-
capacity: number;
|
|
157
|
-
lid: number;
|
|
158
|
-
adjustedCapacity: number;
|
|
159
|
-
sold: number;
|
|
160
|
-
soldNonStop: number;
|
|
161
|
-
soldConnect: number;
|
|
162
|
-
outMoveDays: number;
|
|
163
|
-
backMoveDays: number;
|
|
164
|
-
soldThru: number;
|
|
165
|
-
codeShareIndicator: string;
|
|
166
|
-
operatingCarrier: string;
|
|
167
|
-
operatingFlightNumber: string;
|
|
168
|
-
operatingOpSuffix: string;
|
|
169
|
-
operatedByText: string;
|
|
170
|
-
transitLayover: number;
|
|
171
|
-
transitDays: number;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
export interface ISmAzulFlightDesignator {
|
|
175
|
-
carrierCode: string;
|
|
176
|
-
flightNumber: string;
|
|
177
|
-
opSuffix: string;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
export interface ISmAzulBookingPassenger {
|
|
181
|
-
paxType: IPassengerType;
|
|
182
|
-
passengerFees: ISmAzulPassengerFee[];
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
export interface ISmAzulPassengerFee {
|
|
186
|
-
feeCode: string;
|
|
187
|
-
feeType: string;
|
|
188
|
-
charges: ISmAzulServiceCharge[];
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
export interface ISmAzulServiceCharge {
|
|
192
|
-
chargeType: ISmAzulChargeType;
|
|
193
|
-
collectType: ISmAzulCollectType;
|
|
194
|
-
chargeCode: string;
|
|
195
|
-
ticketCode: string;
|
|
196
|
-
currencyCode: string;
|
|
197
|
-
amount: number;
|
|
198
|
-
chargeDetail: string;
|
|
199
|
-
foreignCurrencyCode: string;
|
|
200
|
-
foreignAmount: number;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
export interface ISmAzulJourney {
|
|
204
|
-
classOfService: string;
|
|
205
|
-
ruleTariff: string;
|
|
206
|
-
carrierCode: string;
|
|
207
|
-
ruleCode: string;
|
|
208
|
-
fareBasis: string;
|
|
209
|
-
paxFares: ISmAzulPaxFare[];
|
|
210
|
-
fareApplicationType: ISmAzulFareApplicationType;
|
|
211
|
-
inboundOutbound: string;
|
|
212
|
-
isAllotmentMarketFare: boolean;
|
|
213
|
-
sellKey: string;
|
|
214
|
-
tripTypeRule: string;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
export interface ISmAzulPaxFare {
|
|
218
|
-
paxType: IPassengerType;
|
|
219
|
-
discountCode: string;
|
|
220
|
-
ruleTariff: string;
|
|
221
|
-
carrierCode: string;
|
|
222
|
-
ruleCode: string;
|
|
223
|
-
fareBasis: string;
|
|
224
|
-
fareDiscountCode: string;
|
|
225
|
-
actionStatusCode: string;
|
|
226
|
-
productClass: string;
|
|
227
|
-
productClassName: ISmAzulProductClassName;
|
|
228
|
-
fareStatus: ISmAzulFareStatus;
|
|
229
|
-
charges: ISmAzulServiceCharge[];
|
|
230
|
-
lastModified: Date;
|
|
231
|
-
availableCount: number;
|
|
232
|
-
status: string;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
export interface ISmAzulOffer {
|
|
236
|
-
currencyCode: string;
|
|
237
|
-
total: number;
|
|
238
|
-
priceStatus: ISmAzulPriceStatus;
|
|
239
|
-
tariffedJourneys: ISmAzulTariffedJourney[];
|
|
240
|
-
bookingPassengers: ISmAzulBookingPassenger[];
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
export interface ISmWcfOffer {
|
|
244
|
-
outbound: ISmWcfBound;
|
|
245
|
-
inbound: ISmWcfBound | null;
|
|
246
|
-
supplier: string;
|
|
247
|
-
itineraryId?: number;
|
|
248
|
-
travelIdentification: string | IJourneyIdentificator[];
|
|
249
|
-
price: number;
|
|
250
|
-
priceDetails: IPriceDetails;
|
|
251
|
-
flightIdentification: string;
|
|
252
|
-
stopType: string;
|
|
253
|
-
cabinClass: string;
|
|
254
|
-
diffAirports: boolean;
|
|
255
|
-
familyOffers?: any[];
|
|
256
|
-
selectedItineraryId?: number;
|
|
257
|
-
supplierSearchId?: string;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
export interface ISmWcfBound {
|
|
261
|
-
segments: ISmWcfSegment[];
|
|
262
|
-
supplier: string;
|
|
263
|
-
type: string;
|
|
264
|
-
departure: string;
|
|
265
|
-
departureHour: string;
|
|
266
|
-
departureTextDate: string;
|
|
267
|
-
departureWeekDay: string;
|
|
268
|
-
arrival: string;
|
|
269
|
-
arrivalHour: string;
|
|
270
|
-
arrivalTextDate: string;
|
|
271
|
-
arrivalWeekDay: string;
|
|
272
|
-
daysDiff: number;
|
|
273
|
-
origin: ISmWcfStation;
|
|
274
|
-
destination: ISmWcfStation;
|
|
275
|
-
totalStops: number;
|
|
276
|
-
carrier: ISmWcfCarrier;
|
|
277
|
-
durationMinutes: number;
|
|
278
|
-
cabinClass: string;
|
|
279
|
-
family: string;
|
|
280
|
-
baggage: boolean;
|
|
281
|
-
baggagePieces: number;
|
|
282
|
-
baggageWeight: number;
|
|
283
|
-
stops: any[];
|
|
284
|
-
durationHours: string;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
export interface ISmWcfSegment {
|
|
288
|
-
departureMoment: string;
|
|
289
|
-
departure: string;
|
|
290
|
-
departureHour: string;
|
|
291
|
-
departureTextDate: string;
|
|
292
|
-
departureWeekDay: string;
|
|
293
|
-
arrivalMoment: string;
|
|
294
|
-
arrival: string;
|
|
295
|
-
arrivalHour: string;
|
|
296
|
-
arrivalTextDate: string;
|
|
297
|
-
arrivalWeekDay: string;
|
|
298
|
-
daysDiff: number;
|
|
299
|
-
durationMinutes: number;
|
|
300
|
-
durationHours: string;
|
|
301
|
-
origin: ISmWcfStation;
|
|
302
|
-
destination: ISmWcfStation;
|
|
303
|
-
carrier: ISmWcfCarrier;
|
|
304
|
-
family: string;
|
|
305
|
-
familyCode: string;
|
|
306
|
-
cabinClass: string;
|
|
307
|
-
flightNumber: string;
|
|
308
|
-
flightCode: string;
|
|
309
|
-
baggage: boolean;
|
|
310
|
-
baggagePieces: number;
|
|
311
|
-
baggageWeight: number;
|
|
312
|
-
fareInfo: ISmWcfFare;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
interface ISmWcfStation {
|
|
316
|
-
code: string;
|
|
317
|
-
name: string;
|
|
318
|
-
type: string;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
interface ISmWcfCarrier {
|
|
322
|
-
code: string;
|
|
323
|
-
name: string;
|
|
324
|
-
imageUrl: string;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
export interface ISmWcfFare {
|
|
328
|
-
base: string;
|
|
329
|
-
class: string;
|
|
330
|
-
flightNumber: string;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
export interface IJourneyIdentificator {
|
|
334
|
-
journeyKey: string;
|
|
335
|
-
fareKey: string;
|
|
336
|
-
fareInfo: IFareInfo | ISmTechFareInfo;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
export interface IFareInfo {
|
|
340
|
-
classOfService: string;
|
|
341
|
-
ruleTariff: string;
|
|
342
|
-
carrierCode: string;
|
|
343
|
-
ruleCode: string;
|
|
344
|
-
fareBasis: string;
|
|
345
|
-
productClass: string;
|
|
346
|
-
productClassName: ISmAzulProductClassName;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
export interface ISmTechFareInfo {
|
|
350
|
-
productClass: string;
|
|
351
|
-
productClassName: string;
|
|
352
|
-
fareBasis: string;
|
|
353
|
-
totalPrice: number;
|
|
354
|
-
baggageCount: number;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
export interface IDateInfo {
|
|
358
|
-
writtenFormatWithDayOfWeek: string;
|
|
359
|
-
writtenFormat: string;
|
|
360
|
-
dateOnly: string;
|
|
361
|
-
hourMinuteOnly: string;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
export interface IStationInfo {
|
|
365
|
-
code: string;
|
|
366
|
-
name: string;
|
|
367
|
-
type: string;
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
export interface ICarrierInfo {
|
|
371
|
-
code: string;
|
|
372
|
-
name: string;
|
|
373
|
-
imageUrl: string;
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
export interface IPriceDetails {
|
|
377
|
-
total: number;
|
|
378
|
-
totalPublic: number;
|
|
379
|
-
totalFare: number;
|
|
380
|
-
totalTaxes: number;
|
|
381
|
-
totalAdditional: number;
|
|
382
|
-
totalDiscount: number;
|
|
383
|
-
totalPassengerFees?: number;
|
|
384
|
-
totalDiscountMargin: number;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
export interface IReserveDetails {
|
|
388
|
-
status: string;
|
|
389
|
-
recordLocator: string;
|
|
390
|
-
price: number;
|
|
391
|
-
priceDetails?: IPriceDetails;
|
|
392
|
-
reservedUntil: Date | string;
|
|
393
|
-
extraLocators?: string;
|
|
394
|
-
supplierOrderId?: string;
|
|
395
|
-
refreshedOffer: ISmWcfOffer | ISmAzulOffer | ISmTTravelOffer;
|
|
396
|
-
}
|
|
397
|
-
export interface IContactInfo {
|
|
398
|
-
firstName: string;
|
|
399
|
-
surname: string;
|
|
400
|
-
email: string;
|
|
401
|
-
phone: {
|
|
402
|
-
ddi: string;
|
|
403
|
-
number: string;
|
|
404
|
-
};
|
|
405
|
-
companyName: string;
|
|
406
|
-
address: {
|
|
407
|
-
street: string;
|
|
408
|
-
number: string;
|
|
409
|
-
complement: string;
|
|
410
|
-
postalCode: string;
|
|
411
|
-
city: string;
|
|
412
|
-
stateCode: string;
|
|
413
|
-
countryCode: string;
|
|
414
|
-
};
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
export interface IPassengerInfo {
|
|
418
|
-
firstName: string;
|
|
419
|
-
surname: string;
|
|
420
|
-
birthDate: Date | string;
|
|
421
|
-
sex: ISex;
|
|
422
|
-
nationality: string;
|
|
423
|
-
residenceCountry: string;
|
|
424
|
-
cpf: {
|
|
425
|
-
number: string;
|
|
426
|
-
};
|
|
427
|
-
passport: {
|
|
428
|
-
number: string;
|
|
429
|
-
issuingCountry: string;
|
|
430
|
-
expirationDate: Date | string;
|
|
431
|
-
};
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
export interface IAirlinesOffer {
|
|
435
|
-
id: number;
|
|
436
|
-
status: IOfferStatus;
|
|
437
|
-
supplier: ISuppliers;
|
|
438
|
-
supplierOfferDetails: ISmAzulOffer | ISmWcfOffer;
|
|
439
|
-
price: number;
|
|
440
|
-
routes: IRoute[];
|
|
441
|
-
paxInfo: IPaxInfo;
|
|
442
|
-
oneway: boolean;
|
|
443
|
-
international: boolean;
|
|
444
|
-
recordLocator: string;
|
|
445
|
-
carrier: string;
|
|
446
|
-
availability: boolean;
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
export interface IRoute {
|
|
450
|
-
date: string;
|
|
451
|
-
departureStation: string;
|
|
452
|
-
arrivalStation: string;
|
|
453
|
-
stopover: {
|
|
454
|
-
station: string;
|
|
455
|
-
days: number;
|
|
456
|
-
};
|
|
457
|
-
filters?: IRouteFilters;
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
export interface IRouteFilters {
|
|
461
|
-
productClassName: ISmAzulProductClassName;
|
|
462
|
-
flightNumber: string;
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
export interface IPaxInfo {
|
|
466
|
-
adults: number;
|
|
467
|
-
children: number;
|
|
468
|
-
babies: number;
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
export interface IListOffersFiltersInfo {
|
|
472
|
-
carriersDataByName: Record<string, any>;
|
|
473
|
-
cheapestStopPricesMap: Record<string, number>;
|
|
474
|
-
cheapestMinStopPrice: number;
|
|
475
|
-
cheapestCarrierPricesMap: Record<string, number>;
|
|
476
|
-
cheapestAirportPricesMap: Record<string, number>;
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
export interface IReservationData {
|
|
480
|
-
contactInfo: IContactInfo;
|
|
481
|
-
passengersInfo: IPassengerInfo[];
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
export interface IOfferCancelationInfo {
|
|
485
|
-
supplier: ISuppliers;
|
|
486
|
-
recordLocator: string;
|
|
487
|
-
costToCancel?: number;
|
|
488
|
-
refundedValue?: number;
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
export interface IAvailabilityInfo {
|
|
492
|
-
availability: boolean;
|
|
493
|
-
currentPrice: number | null;
|
|
494
|
-
selectedPrice: number;
|
|
495
|
-
isSamePrice: boolean;
|
|
496
|
-
smWcfOffer: ISmWcfOffer | null;
|
|
497
|
-
updatedAirOfferDetails: ISmWcfOffer | ISmAzulOffer | ISmTTravelOffer;
|
|
498
|
-
}
|
|
499
|
-
export interface ISearchData {
|
|
500
|
-
international: boolean;
|
|
501
|
-
cabinClass: string;
|
|
502
|
-
promoCode: string;
|
|
503
|
-
paxInfo: IPaxInfo;
|
|
504
|
-
routes: IRoute[];
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
export interface IReserveCheckInfo {
|
|
508
|
-
availability: boolean;
|
|
509
|
-
reservedUntil?: Date;
|
|
510
|
-
currentPrice: number;
|
|
511
|
-
selectedPrice: number;
|
|
512
|
-
priceDetails: IPriceDetails;
|
|
513
|
-
isSamePrice: boolean;
|
|
514
|
-
error?: boolean;
|
|
515
|
-
message?: string;
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
export interface IOfferEmissionData {
|
|
519
|
-
recordLocator: string;
|
|
520
|
-
bookingCode: string;
|
|
521
|
-
price: number;
|
|
522
|
-
emittedAt: Date;
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
// CONSTANTS TYPES
|
|
526
|
-
|
|
527
|
-
type ValueOf<T> = T[keyof T];
|
|
528
|
-
|
|
529
|
-
const RESPONSE_STATUS = {
|
|
530
|
-
SUCCESS: "success",
|
|
531
|
-
ERROR: "error",
|
|
532
|
-
FAIL: "fail",
|
|
533
|
-
} as const;
|
|
534
|
-
|
|
535
|
-
const SUPPLIERS = {
|
|
536
|
-
SKYTEAM: "skyteam",
|
|
537
|
-
AZUL: "azul",
|
|
538
|
-
TTECH: 'tech-travel'
|
|
539
|
-
} as const;
|
|
540
|
-
|
|
541
|
-
const OFFER_STATUS = {
|
|
542
|
-
ADDED: "added",
|
|
543
|
-
RESERVED: "reserved",
|
|
544
|
-
EMITTED: "emitted",
|
|
545
|
-
CANCELED: "canceled",
|
|
546
|
-
} as const;
|
|
547
|
-
|
|
548
|
-
const ORDER_OPTIONS = {
|
|
549
|
-
RELEVANCE: "RELEVANCE",
|
|
550
|
-
DURATION: "DURATION",
|
|
551
|
-
PRICE: "PRICE",
|
|
552
|
-
} as const;
|
|
553
|
-
|
|
554
|
-
const PASSENGER_TYPE = {
|
|
555
|
-
ADULT: "ADT",
|
|
556
|
-
CHILDREN: "CHD",
|
|
557
|
-
INFANT: "INF",
|
|
558
|
-
} as const;
|
|
559
|
-
|
|
560
|
-
const SEX = {
|
|
561
|
-
MALE: "M",
|
|
562
|
-
FEMALE: "F",
|
|
563
|
-
} as const;
|
|
564
|
-
|
|
565
|
-
const SM_AZUL_PRICE_STATUS = {
|
|
566
|
-
INVALID: "Invalid",
|
|
567
|
-
OVERRIDE: "Override",
|
|
568
|
-
VALID: "Valid",
|
|
569
|
-
} as const;
|
|
570
|
-
|
|
571
|
-
const SM_AZUL_CHARGE_TYPE = {
|
|
572
|
-
FARE_PRICE: "FarePrice",
|
|
573
|
-
DISCOUNT: "Discount",
|
|
574
|
-
INCLUDED_TRAVEL_FEE: "IncludedTravelFee",
|
|
575
|
-
INCLUDED_TAX: "IncludedTax",
|
|
576
|
-
TRAVEL_FEE: "TravelFee",
|
|
577
|
-
TAX: "Tax",
|
|
578
|
-
SERVICE_CHARGE: "ServiceCharge",
|
|
579
|
-
PROMOTION_DISCOUNT: "PromotionDiscount",
|
|
580
|
-
CONNECTION_ADJUSTMENT_AMOUNT: "ConnectionAdjustmentAmount",
|
|
581
|
-
ADD_ON_SERVICE_PRICE: "AddOnServicePrice",
|
|
582
|
-
POINTS: "Points",
|
|
583
|
-
INCLUDED_ADD_ON_SERVICE_FEE: "IncludedAddOnServiceFee",
|
|
584
|
-
ADD_ON_SERVICE_FEE: "AddOnServiceFee",
|
|
585
|
-
ADD_ON_SERVICE_MARKUP: "AddOnServiceMarkup",
|
|
586
|
-
CALCULATED: "Calculated",
|
|
587
|
-
NOTE: "Note",
|
|
588
|
-
} as const;
|
|
589
|
-
|
|
590
|
-
const SM_AZUL_COLLECT_TYPE = {
|
|
591
|
-
IMMEDIATE: "Immediate",
|
|
592
|
-
DEFERRED: "Deferred",
|
|
593
|
-
} as const;
|
|
594
|
-
|
|
595
|
-
const SM_AZUL_PRODUCT_CLASS_NAME = {
|
|
596
|
-
AZUL: "azul",
|
|
597
|
-
AZUL_MAIS: "azul+",
|
|
598
|
-
AZUL_SOUTH_AMERICA: "azulSA",
|
|
599
|
-
AZUL_MAIS_SOUTH_AMERICA: "azul+SA",
|
|
600
|
-
AZUL_NORTH_AMERICA_AND_EUROPE: "azulEUAndSA",
|
|
601
|
-
AZUL_MAIS_NORTH_AMERICA_AND_EUROPE: "azul+EUAndSA",
|
|
602
|
-
AZUL_SUPER: "azulSuper",
|
|
603
|
-
AZUL_BUSINESS: "azulBusiness",
|
|
604
|
-
} as const;
|
|
605
|
-
|
|
606
|
-
const SM_AZUL_TRIP_TYPE = {
|
|
607
|
-
NONE: "None",
|
|
608
|
-
ONE_WAY: "OneWay",
|
|
609
|
-
ROUND_TRIP: "RoundTrip",
|
|
610
|
-
HALF_ROUND: "HalfRound",
|
|
611
|
-
OPEN_JAW: "OpenJaw",
|
|
612
|
-
CIRCLE_TRIP: "CircleTrip",
|
|
613
|
-
ALL: "All",
|
|
614
|
-
} as const;
|
|
615
|
-
|
|
616
|
-
const SM_AZUL_FARE_STATUS = {
|
|
617
|
-
DEFAULT: "Default",
|
|
618
|
-
SAME_DAY_STAND_BY: "SameDayStandBy",
|
|
619
|
-
FARE_OVERRIDE_CONFIRMING: "FareOverrideConfirming",
|
|
620
|
-
FARE_OVERRIDE_CONFIRMED: "FareOverrideConfirmed",
|
|
621
|
-
UNMAPPED: "Unmapped",
|
|
622
|
-
} as const;
|
|
623
|
-
|
|
624
|
-
const SM_AZUL_FARE_APPLICATION_TYPE = {
|
|
625
|
-
ROUTE: "Route",
|
|
626
|
-
SECTOR: "Sector",
|
|
627
|
-
GOVERNING: "Governing",
|
|
628
|
-
UNMAPPED: "Unmapped",
|
|
629
|
-
} as const;
|
|
630
|
-
|
|
631
|
-
const SM_AZUL_CHECK_IN_STATUS = {
|
|
632
|
-
NOT_YET_OPEN: "NotYetOpen",
|
|
633
|
-
OPEN: "Open",
|
|
634
|
-
CLOSED: "Closed",
|
|
635
|
-
} as const;
|
|
636
|
-
|
|
637
|
-
const SM_AZUL_CLASS_STATUS = {
|
|
638
|
-
ACTIVE: "Active",
|
|
639
|
-
INACTIVE: "InActive",
|
|
640
|
-
AVS_OPEN: "AVSOpen",
|
|
641
|
-
AVS_ON_REQUEST: "AVSOnRequest",
|
|
642
|
-
AVS_CLOSED: "AVSClosed",
|
|
643
|
-
} as const;
|
|
644
|
-
|
|
645
|
-
const SM_AZUL_STATE = {
|
|
646
|
-
CLEAN: "Clean",
|
|
647
|
-
NEW: "New",
|
|
648
|
-
MODIFIED: "Modified",
|
|
649
|
-
DELETED: "Deleted",
|
|
650
|
-
CONFIRMED: "Confirmed",
|
|
651
|
-
} as const;
|
|
652
|
-
|
|
653
|
-
export type IResponseStatus = ValueOf<typeof RESPONSE_STATUS>;
|
|
654
|
-
export type ISuppliers = ValueOf<typeof SUPPLIERS>;
|
|
655
|
-
export type IOfferStatus = ValueOf<typeof OFFER_STATUS>;
|
|
656
|
-
export type IOrderOptions = ValueOf<typeof ORDER_OPTIONS>;
|
|
657
|
-
export type IPassengerType = ValueOf<typeof PASSENGER_TYPE>;
|
|
658
|
-
export type ISex = ValueOf<typeof SEX>;
|
|
659
|
-
export type ISmAzulPriceStatus = ValueOf<typeof SM_AZUL_PRICE_STATUS>;
|
|
660
|
-
export type ISmAzulChargeType = ValueOf<typeof SM_AZUL_CHARGE_TYPE>;
|
|
661
|
-
export type ISmAzulCollectType = ValueOf<typeof SM_AZUL_COLLECT_TYPE>;
|
|
662
|
-
export type ISmAzulProductClassName = ValueOf<
|
|
663
|
-
typeof SM_AZUL_PRODUCT_CLASS_NAME
|
|
664
|
-
>;
|
|
665
|
-
export type ISmAzulFareStatus = ValueOf<typeof SM_AZUL_FARE_STATUS>;
|
|
666
|
-
export type ISmAzulFareApplicationType = ValueOf<
|
|
667
|
-
typeof SM_AZUL_FARE_APPLICATION_TYPE
|
|
668
|
-
>;
|
|
669
|
-
export type ISmAzulTripType = ValueOf<typeof SM_AZUL_TRIP_TYPE>;
|
|
670
|
-
export type ISmAzulCheckInStatus = ValueOf<typeof SM_AZUL_CHECK_IN_STATUS>;
|
|
671
|
-
export type ISmAzulClassStatus = ValueOf<typeof SM_AZUL_CLASS_STATUS>;
|
|
672
|
-
export type ISmAzulState = ValueOf<typeof SM_AZUL_STATE>;
|