sm-types 1.11.74 → 1.11.76
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.
|
@@ -522,7 +522,7 @@ export declare const APP_ERROR_CODES: {
|
|
|
522
522
|
"EN-US": string;
|
|
523
523
|
};
|
|
524
524
|
};
|
|
525
|
-
|
|
525
|
+
INVALID_PAYMENT_METHOD: {
|
|
526
526
|
usecase: string;
|
|
527
527
|
type: string;
|
|
528
528
|
messageLangMap: {
|
|
@@ -538,7 +538,7 @@ export declare const APP_ERROR_CODES: {
|
|
|
538
538
|
"EN-US": string;
|
|
539
539
|
};
|
|
540
540
|
};
|
|
541
|
-
|
|
541
|
+
PENDING_DOCUMENT: {
|
|
542
542
|
usecase: string;
|
|
543
543
|
type: string;
|
|
544
544
|
messageLangMap: {
|
|
@@ -7,7 +7,7 @@ export declare const ORDER_ITEM: {
|
|
|
7
7
|
"EN-US": string;
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
INVALID_PAYMENT_METHOD: {
|
|
11
11
|
usecase: string;
|
|
12
12
|
type: string;
|
|
13
13
|
messageLangMap: {
|
|
@@ -23,7 +23,7 @@ export declare const ORDER_ITEM: {
|
|
|
23
23
|
"EN-US": string;
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
|
-
|
|
26
|
+
PENDING_DOCUMENT: {
|
|
27
27
|
usecase: string;
|
|
28
28
|
type: string;
|
|
29
29
|
messageLangMap: {
|
|
@@ -10,7 +10,7 @@ exports.ORDER_ITEM = {
|
|
|
10
10
|
"EN-US": "Invalid credit card.",
|
|
11
11
|
},
|
|
12
12
|
},
|
|
13
|
-
|
|
13
|
+
INVALID_PAYMENT_METHOD: {
|
|
14
14
|
usecase: "ORDER_ITEM",
|
|
15
15
|
type: "INVALID_PAYMENT_METHOD",
|
|
16
16
|
messageLangMap: {
|
|
@@ -26,12 +26,12 @@ exports.ORDER_ITEM = {
|
|
|
26
26
|
"EN-US": "Supplier not configured.",
|
|
27
27
|
},
|
|
28
28
|
},
|
|
29
|
-
|
|
29
|
+
PENDING_DOCUMENT: {
|
|
30
30
|
usecase: "ORDER_ITEM",
|
|
31
|
-
type: "
|
|
31
|
+
type: "PENDING_DOCUMENT",
|
|
32
32
|
messageLangMap: {
|
|
33
|
-
"PT-BR": "
|
|
34
|
-
"EN-US": "
|
|
33
|
+
"PT-BR": "Documento pendente.",
|
|
34
|
+
"EN-US": "Document pending.",
|
|
35
35
|
},
|
|
36
36
|
},
|
|
37
37
|
PLANE_LIMIT_EXCEEDED: {
|
|
@@ -46,8 +46,8 @@ exports.ORDER_ITEM = {
|
|
|
46
46
|
usecase: "ORDER_ITEM",
|
|
47
47
|
type: "UNPROCESSABLE_OFFER",
|
|
48
48
|
messageLangMap: {
|
|
49
|
-
"PT-BR": "Não é possível processar
|
|
50
|
-
"EN-US": "Unable to process
|
|
49
|
+
"PT-BR": "Não é possível processar a oferta.",
|
|
50
|
+
"EN-US": "Unable to process offer.",
|
|
51
51
|
},
|
|
52
52
|
},
|
|
53
53
|
INVALID_CREDITS: {
|
package/package.json
CHANGED
package/sm-airlines/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { BookingConfirmationStatus, DealOwnerEnum } from "../common";
|
|
|
2
2
|
import { SmAmadeusOffer } from "../sm-amadeus";
|
|
3
3
|
import { IAzulFareDetails, IAzulFareInfo, IAzulOfferJourney } from "../sm-azul";
|
|
4
4
|
import { ISmTTravelOffer } from "../sm-tech";
|
|
5
|
+
import { SmLatamOffer } from "../sm-latam";
|
|
5
6
|
import { IRentabilityOptions } from "./dtos/request";
|
|
6
7
|
export { IAddOfferReqDto, IBuyOfferReqDto, IReserveOfferReqDto, IOrderReserveOfferReqDto, IListOffersReqDto, IListOffersResDto, IListOffersSearchMetadata, IAddOfferResDto, IGetOfferDetailsResDto, IRefreshAvailabilityResDto, IReplaceOfferResDto, IReserveOfferResDto, IOrderReserveOfferResDto, ICheckReserveOfferResDto, IBuyOfferResDto, ICancelOfferResDto, ICancelPreReserveResDto, IGetChargeDetailsResDto, IUpdateOfferDetialsResDto, IUpdateOfferDetailsReqDto, ICreateSupplierCredentialReqDto, ICreateCustomerReqDto, IUpdateCustomerReqDto, IGetSupplierCredentialByAgencyReqDto, IGetCustomerCredentialReqDto, IAssocitateCustomerCredentialReqDto, ICreateSupplierCredentialResDto, ICreateCustomerResDto, IUpdateCustomerResDto, IGetSupplierCredentialResDto, IGetCustomerCredentialResDto, IAssocitateCustomerCredentialResDto, IListFareFamiliesReqDto, IListFareFamiliesResDto, IApplyOfferChangesReqDto, IApplyOfferChangesResDto, IRecalculateOfferChangesResDto, IRecalculateOfferChangesReqDto, IListChangeOptionsResDto, IListChangeOptionsReqDto, IGetSupplierOffersResDto, IGetSupplierOffersReqDto, } from "./dtos";
|
|
7
8
|
export { IAddOfferCommandParams, IRefreshAvailabilityCommandParams, IBuyOfferCommandParams, ICancelOfferCommandParams, IReserveOfferCommandParams, IOrderReserveOfferCommandParams, IProcessReserveCommandParams, IReplaceOfferCommandParams, ICheckReserveQueryParams, ICancelPreReserveCommandParams, } from "./command-params";
|
|
@@ -236,7 +237,7 @@ export interface IReserveDetails {
|
|
|
236
237
|
reservedUntil: Date | string;
|
|
237
238
|
extraLocators?: string;
|
|
238
239
|
supplierOrderId?: string;
|
|
239
|
-
refreshedOffer: ISmWcfOffer | ISmAzulOffer | ISmTTravelOffer | SmAmadeusOffer;
|
|
240
|
+
refreshedOffer: ISmWcfOffer | ISmAzulOffer | ISmTTravelOffer | SmAmadeusOffer | SmLatamOffer;
|
|
240
241
|
}
|
|
241
242
|
export interface IContactInfo {
|
|
242
243
|
firstName: string;
|
|
@@ -264,6 +265,7 @@ export interface IPassengerInfo {
|
|
|
264
265
|
sex: ISex;
|
|
265
266
|
nationality: string;
|
|
266
267
|
residenceCountry: string;
|
|
268
|
+
email?: string;
|
|
267
269
|
cpf: {
|
|
268
270
|
firstName: string;
|
|
269
271
|
surname: string;
|
|
@@ -280,6 +282,10 @@ export interface IPassengerInfo {
|
|
|
280
282
|
number: string;
|
|
281
283
|
name: string;
|
|
282
284
|
};
|
|
285
|
+
phone?: {
|
|
286
|
+
ddi: string;
|
|
287
|
+
number: string;
|
|
288
|
+
};
|
|
283
289
|
}
|
|
284
290
|
export interface IRoute {
|
|
285
291
|
date: string;
|
|
@@ -325,7 +331,7 @@ export interface IAvailabilityInfo {
|
|
|
325
331
|
selectedPrice: number;
|
|
326
332
|
isSamePrice: boolean;
|
|
327
333
|
smWcfOffer: ISmWcfOffer | null;
|
|
328
|
-
updatedAirOfferDetails: ISmWcfOffer | ISmAzulOffer | ISmTTravelOffer | SmAmadeusOffer;
|
|
334
|
+
updatedAirOfferDetails: ISmWcfOffer | ISmAzulOffer | ISmTTravelOffer | SmAmadeusOffer | SmLatamOffer;
|
|
329
335
|
}
|
|
330
336
|
export interface ISearchData {
|
|
331
337
|
international: boolean;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Simplified LATAM Offer Structure
|
|
3
|
+
* Contains only essential data: journeys, individual journey fares, and fare details
|
|
4
|
+
*/
|
|
5
|
+
export type ILatamCredentials = {
|
|
6
|
+
apiKey: string;
|
|
7
|
+
apiSecret: string;
|
|
8
|
+
baseUrl: string;
|
|
9
|
+
agencyId: string;
|
|
10
|
+
iataNumber: string;
|
|
11
|
+
agencyName: string;
|
|
12
|
+
travelAgentId: string;
|
|
13
|
+
countryCode: string;
|
|
14
|
+
accountCode: string;
|
|
15
|
+
};
|
|
16
|
+
export type SmLatamOffer = {
|
|
17
|
+
id: string;
|
|
18
|
+
currency: string;
|
|
19
|
+
journeys: LatamJourney[];
|
|
20
|
+
fares: LatamJourneyFare[];
|
|
21
|
+
fareDetails: LatamFareDetail[];
|
|
22
|
+
totalPrice: number;
|
|
23
|
+
isRoundtrip: boolean;
|
|
24
|
+
bookingData: LatamOfferItemBookingData[];
|
|
25
|
+
};
|
|
26
|
+
export type LatamJourney = {
|
|
27
|
+
id: string;
|
|
28
|
+
direction: "outbound" | "inbound";
|
|
29
|
+
segments: LatamSegment[];
|
|
30
|
+
};
|
|
31
|
+
export type LatamSegment = {
|
|
32
|
+
id: string;
|
|
33
|
+
origin: string;
|
|
34
|
+
destination: string;
|
|
35
|
+
departureDateTime: string;
|
|
36
|
+
arrivalDateTime: string;
|
|
37
|
+
flightNumber: string;
|
|
38
|
+
aircraft: string;
|
|
39
|
+
marketingCarrier: string;
|
|
40
|
+
operatingCarrier: string;
|
|
41
|
+
duration: string;
|
|
42
|
+
cabin: string;
|
|
43
|
+
bookingClass: string;
|
|
44
|
+
};
|
|
45
|
+
export type LatamJourneyFare = {
|
|
46
|
+
journeyId: string;
|
|
47
|
+
fareType: string;
|
|
48
|
+
fareBasisCode: string;
|
|
49
|
+
basePrice: number;
|
|
50
|
+
taxes: number;
|
|
51
|
+
totalPrice: number;
|
|
52
|
+
currency: string;
|
|
53
|
+
taxBreakdown?: {
|
|
54
|
+
boardingTax: number;
|
|
55
|
+
agencyFee: number;
|
|
56
|
+
otherTaxes: number;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
export type LatamFareDetail = {
|
|
60
|
+
fareType: string;
|
|
61
|
+
fareBasisCode: string;
|
|
62
|
+
cabin: string;
|
|
63
|
+
bookingClass: string;
|
|
64
|
+
baggage: LatamBaggageDetail[];
|
|
65
|
+
restrictions: LatamRestrictions;
|
|
66
|
+
};
|
|
67
|
+
export type LatamBaggageDetail = {
|
|
68
|
+
type: "PERSONAL_ITEM" | "CARRY_ON" | "CHECKED_IN";
|
|
69
|
+
included: boolean;
|
|
70
|
+
weight?: number;
|
|
71
|
+
pieces?: number;
|
|
72
|
+
};
|
|
73
|
+
export type LatamRestrictions = {
|
|
74
|
+
cancellable: boolean;
|
|
75
|
+
changeable: boolean;
|
|
76
|
+
refundable: boolean;
|
|
77
|
+
};
|
|
78
|
+
export type LatamOfferItemBookingData = {
|
|
79
|
+
journeyId: string;
|
|
80
|
+
ownerCode: string;
|
|
81
|
+
offerItemId: string;
|
|
82
|
+
serviceId: string;
|
|
83
|
+
paxJourneyRefId: string;
|
|
84
|
+
fareComponentData: {
|
|
85
|
+
fareBasisCode: string;
|
|
86
|
+
priceClassRefId: string;
|
|
87
|
+
fareRuleRefIds: string[];
|
|
88
|
+
};
|
|
89
|
+
};
|