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,210 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BookingStatus = exports.SeatPreference = exports.PaxType = exports.ProductClassName = exports.ProductClass = exports.FeeType = exports.PriceStatus = exports.BaggageStatus = exports.LiftStatus1 = exports.SeatAssignmentLevel = exports.ClassStatus = exports.CheckInStatus = exports.TripType = exports.FareApplicationType = exports.FareStatus = exports.MessageState = exports.CollectType = exports.ChargeType = exports.DayOfWeek = exports.InboundOutbound = exports.FlightType = exports.AvailabilityType = exports.AvailabilityFilter = exports.FareClassControl = exports.Gender = exports.CurrencyOptions = exports.FareType = void 0;
4
+ exports.FareType = {
5
+ P: "P",
6
+ T: "T",
7
+ R: "R",
8
+ W: "W",
9
+ C: "C",
10
+ O: "O",
11
+ V: "V",
12
+ };
13
+ exports.CurrencyOptions = {
14
+ BRL: "BRL",
15
+ USD: "USD",
16
+ };
17
+ exports.Gender = {
18
+ MALE: "Male",
19
+ FEMALE: "Female",
20
+ };
21
+ exports.FareClassControl = {
22
+ LOWEST_FARE_CLASS: "LowestFareClass",
23
+ COMPRESS_BY_PRODUCT_CLASS: "CompressByProductClass",
24
+ DEFAULT: "Default",
25
+ };
26
+ exports.AvailabilityFilter = {
27
+ DEFAULT: "Default",
28
+ EXCLUDE_DEPARTED: "ExcludeDeparted",
29
+ EXCLUDE_IMMINENT: "ExcludeImminent",
30
+ EXCLUDE_UNAVAILABLE: "ExcludeUnavailable",
31
+ };
32
+ exports.AvailabilityType = {
33
+ DEFAULT: "Default",
34
+ STAND_BY: "Standby",
35
+ OVERBOOK: "Overbook",
36
+ MOVE: "Move",
37
+ };
38
+ exports.FlightType = {
39
+ NONE: "None",
40
+ NON_STOP: "NonStop",
41
+ THROUGH: "Through",
42
+ DIRECT: "Direct",
43
+ CONNECT: "Connect",
44
+ ALL: "All",
45
+ };
46
+ exports.InboundOutbound = {
47
+ NONE: "None",
48
+ INBOUND: "Inbound",
49
+ OUTBOUND: "Outbound",
50
+ BOTH: "Both",
51
+ ROUND_FROM: "RoundFrom",
52
+ ROUND_TO: "RoundTo",
53
+ UNMAPPED: "Unmapped",
54
+ };
55
+ exports.DayOfWeek = {
56
+ NONE: "None",
57
+ MONDAY: "Monday",
58
+ TUESDAY: "Tuesday",
59
+ WEDNESDAY: "Wednesday",
60
+ THRUSDAY: "Thrusday",
61
+ FRIDAY: "Friday",
62
+ WEEK_DAY: "WeekDay",
63
+ SATURDAY: "Saturday",
64
+ SUNDAY: "Sunday",
65
+ WEEK_END: "WeekEnd",
66
+ DAILY: "Daily",
67
+ };
68
+ exports.ChargeType = {
69
+ FARE_PRICE: "FarePrice",
70
+ DISCOUNT: "Discount",
71
+ INCLUDED_TRAVEL_FEE: "IncludedTravelFee",
72
+ INCLUDED_TAX: "IncludedTax",
73
+ TRAVEL_FEE: "TravelFee",
74
+ TAX: "Tax",
75
+ SERVICE_CHARGE: "ServiceCharge",
76
+ PROMOTION_DISCOUNT: "PromotionDiscount",
77
+ CONNECTION_ADJUSTMENT_AMOUNT: "ConnectionAdjustmentAmount",
78
+ ADD_ON_SERVICE_PRICE: "AddOnServicePrice",
79
+ POINTS: "Points",
80
+ INCLUDED_ADD_ON_SERVICE_FEE: "IncludedAddOnServiceFee",
81
+ ADD_ON_SERVICE_FEE: "AddOnServiceFee",
82
+ ADD_ON_SERVICE_MARKUP: "AddOnServiceMarkup",
83
+ CALCULATED: "Calculated",
84
+ NOTE: "Note",
85
+ };
86
+ exports.CollectType = {
87
+ IMMEDIATE: "Immediate",
88
+ DEFERRED: "Deferred",
89
+ };
90
+ exports.MessageState = {
91
+ CLEAN: "Clean",
92
+ NEW: "New",
93
+ MODIFIED: "Modified",
94
+ DELETED: "Deleted",
95
+ CONFIRMED: "Confirmed",
96
+ };
97
+ exports.FareStatus = {
98
+ DEFAULT: "Default",
99
+ SAME_DAY_STAND_BY: "SameDayStandBy",
100
+ FARE_OVERRIDE_CONFIRMING: "FareOverrideConfirming",
101
+ FARE_OVERRIDE_CONFIRMED: "FareOverrideConfirmed",
102
+ UNMAPPED: "Unmapped",
103
+ };
104
+ exports.FareApplicationType = {
105
+ ROUTE: "Route",
106
+ SECTOR: "Sector",
107
+ GOVERNING: "Governing",
108
+ UNMAPPED: "Unmapped",
109
+ };
110
+ exports.TripType = {
111
+ NONE: "None",
112
+ ONE_WAY: "OneWay",
113
+ ROUND_TRIP: "RoundTrip",
114
+ HALF_ROUND: "HalfRound",
115
+ OPEN_JAW: "OpenJaw",
116
+ CIRCLE_TRIP: "CircleTrip",
117
+ ALL: "All",
118
+ };
119
+ exports.CheckInStatus = {
120
+ NOT_YET_OPEN: "NotYetOpen",
121
+ OPEN: "Open",
122
+ CLOSED: "Closed",
123
+ };
124
+ exports.ClassStatus = {
125
+ ACTIVE: "Active",
126
+ INACTIVE: "InActive",
127
+ AVS_OPEN: "AVSOpen",
128
+ AVS_ON_REQUEST: "AVSOnRequest",
129
+ AVS_CLOSED: "AVSClosed",
130
+ };
131
+ exports.SeatAssignmentLevel = {
132
+ UNKNOWN: "Unknown",
133
+ SEGMENT: "Segment",
134
+ LEG: "Leg",
135
+ PARTIAL_SEGMENT: "PartialSegment",
136
+ };
137
+ exports.LiftStatus1 = {
138
+ DEFAULT: "Default",
139
+ CHECKED_IN: "CheckedIn",
140
+ BOARDED: "Boarded",
141
+ NO_SHOW: "NoShow",
142
+ UNMAPPED: "Unmapped",
143
+ };
144
+ exports.BaggageStatus = {
145
+ DEFAULT: "Default",
146
+ CHECKED: "Checked",
147
+ REMOVED: "Removed",
148
+ ADDED: "Added",
149
+ };
150
+ exports.PriceStatus = {
151
+ INVALID: "Invalid",
152
+ OVERRIDE: "Override",
153
+ VALID: "Valid",
154
+ };
155
+ exports.FeeType = {
156
+ ALL: "All",
157
+ TAX: "Tax",
158
+ TRAVEL_FEE: "TravelFee",
159
+ SERVICE_FEE: "ServiceFee",
160
+ PAYMENT_FEE: "PaymentFee",
161
+ PENALTY_FEE: "PenaltyFee",
162
+ SSR_FEE: "SSRFee",
163
+ NON_FLIGHT_SERVICE_FEE: "NonFlightServiceFee",
164
+ UPGRADE_FEE: "UpgradeFee",
165
+ SEAT_FEE: "SeatFee",
166
+ BASE_FARE: "BaseFare",
167
+ SPOILAGE_FEE: "SpoilageFee",
168
+ NAME_CHANGE_FEE: "NameChangeFee",
169
+ CONVENIENCE_FEE: "ConvenienceFee",
170
+ };
171
+ exports.ProductClass = {
172
+ AZUL: "F+",
173
+ AZUL_MAIS: "PR",
174
+ AZUL_SOUTH_AMERICA: "TP",
175
+ AZUL_MAIS_SOUTH_AMERICA: "TI",
176
+ AZUL_NORTH_AMERICA_AND_EUROPE: "ZK",
177
+ AZUL_MAIS_NORTH_AMERICA_AND_EUROPE: "ZJ",
178
+ AZUL_SUPER: "ZF",
179
+ AZUL_BUSINESS: "ZE",
180
+ };
181
+ exports.ProductClassName = {
182
+ AZUL: "azul",
183
+ AZUL_MAIS: "azul+",
184
+ AZUL_SOUTH_AMERICA: "azulSA",
185
+ AZUL_MAIS_SOUTH_AMERICA: "azul+SA",
186
+ AZUL_NORTH_AMERICA_AND_EUROPE: "azulEUAndSA",
187
+ AZUL_MAIS_NORTH_AMERICA_AND_EUROPE: "azul+EUAndSA",
188
+ AZUL_SUPER: "azulSuper",
189
+ AZUL_BUSINESS: "azulBusiness",
190
+ };
191
+ exports.PaxType = {
192
+ ADULT: "ADT",
193
+ CHILDREN: "CHD",
194
+ INFANT: "INF",
195
+ };
196
+ exports.SeatPreference = {
197
+ NONE: "None",
198
+ WINDOW: "Window",
199
+ AISLE: "Aisle",
200
+ NO_PREFERENCE: "NoPreference",
201
+ };
202
+ exports.BookingStatus = {
203
+ DEFAULT: "Default",
204
+ HOLD: "Hold",
205
+ CONFIRMED: "Confirmed",
206
+ CLOSED: "Closed",
207
+ HOLD_CANCELED: "HoldCanceled",
208
+ PENDING_ARCHIVE: "PendingArchive",
209
+ ARCHIVED: "Archive",
210
+ };
@@ -0,0 +1,128 @@
1
+ export interface ISmCarsAgency {
2
+ code: string;
3
+ active: boolean;
4
+ airport: boolean;
5
+ name: string;
6
+ address: string;
7
+ city: string;
8
+ country: string;
9
+ uf: string;
10
+ latitude: number;
11
+ longitude: number;
12
+ }
13
+ export interface ISmCarsAgencyCombination {
14
+ pickup: ISmCarsAgency;
15
+ dropoff: ISmCarsAgency;
16
+ }
17
+ export declare const SteeringType: {
18
+ readonly HYDRAULIC: "hydraulic";
19
+ readonly ELETRIC: "eletric";
20
+ readonly COMMON: "common";
21
+ };
22
+ export declare const TransmissionType: {
23
+ readonly MANUAL: "manual";
24
+ readonly AUTOMATIC: "automatic";
25
+ };
26
+ export declare const FeeType: {
27
+ readonly SERVICE_FEE: "serviceFee";
28
+ readonly RETURN_FEE: "returnFee";
29
+ };
30
+ declare type ValueOf<T> = T[keyof T];
31
+ export declare type TSteeringType = ValueOf<typeof SteeringType>;
32
+ export declare type TTransmissionType = ValueOf<typeof TransmissionType>;
33
+ export declare type TFeeType = ValueOf<typeof FeeType>;
34
+ export interface ISmCarFeatures {
35
+ passengers: number;
36
+ doors: number | null;
37
+ baggages: number;
38
+ abs: boolean;
39
+ airbag: boolean;
40
+ steering: TSteeringType | null;
41
+ transmission: TTransmissionType | null;
42
+ air: boolean;
43
+ }
44
+ export interface ISmCarDetails {
45
+ modelTitle: string;
46
+ class: string;
47
+ type: string;
48
+ modelDescription: string;
49
+ image: string;
50
+ features: ISmCarFeatures;
51
+ supplierCarGroupCode: string;
52
+ sippCode: string;
53
+ }
54
+ interface ISmCarContractFeatures {
55
+ ldw: boolean;
56
+ ali: boolean;
57
+ unlimitedKm: boolean;
58
+ mandatoryDriverCreditCard: boolean;
59
+ }
60
+ export interface ISmCarPriceInfo {
61
+ rawPrice: number;
62
+ discount: number;
63
+ netPrice: number;
64
+ quantity: number;
65
+ total: number;
66
+ }
67
+ export interface ISmCarFeeInfo {
68
+ name: TFeeType;
69
+ total: number;
70
+ }
71
+ export interface ISmCarAdditionalPriceInfo {
72
+ name: string;
73
+ supplierCategory: string;
74
+ supplierId: number | null;
75
+ selected: boolean;
76
+ allowChange: boolean;
77
+ rawPrice: number;
78
+ discount: number;
79
+ netPrice: number;
80
+ quantity: number;
81
+ total: number;
82
+ }
83
+ export interface ISmCarFinalPriceInfo {
84
+ rawTotal: number;
85
+ discount: number;
86
+ netTotal: number;
87
+ }
88
+ export interface ISmCarContractDetails {
89
+ features: ISmCarContractFeatures;
90
+ freeCancelationUntil: string;
91
+ dailyInfo: ISmCarPriceInfo;
92
+ extraHoursInfo: ISmCarPriceInfo;
93
+ feesInfo: ISmCarFeeInfo[];
94
+ additionalsInfo: ISmCarAdditionalPriceInfo[];
95
+ finalPriceInfo: ISmCarFinalPriceInfo;
96
+ }
97
+ export interface ISmCarSupplierInfo {
98
+ id: string;
99
+ supplier: string;
100
+ }
101
+ export interface ISmCarOffer {
102
+ supplierInfo: ISmCarSupplierInfo;
103
+ carDetails: ISmCarDetails;
104
+ contractDetails: ISmCarContractDetails;
105
+ }
106
+ export interface ISmCarCompleteOffer {
107
+ supplierInfo: ISmCarSupplierInfo;
108
+ carDetails: ISmCarDetails;
109
+ contractDetails: ISmCarContractDetails;
110
+ rentalDetails: ISmCarRentalDetails;
111
+ pickup: ISmCarOfferAgency;
112
+ dropoff: ISmCarOfferAgency;
113
+ }
114
+ export interface ISmCarRentalDetails {
115
+ logo: string;
116
+ id: string;
117
+ name: string;
118
+ }
119
+ export interface ISmCarOfferAgency {
120
+ storeCode: string;
121
+ storeName: string;
122
+ address: string;
123
+ date: string;
124
+ time: string;
125
+ latitude: string;
126
+ longitude: string;
127
+ }
128
+ export {};
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FeeType = exports.TransmissionType = exports.SteeringType = void 0;
4
+ exports.SteeringType = {
5
+ HYDRAULIC: "hydraulic",
6
+ ELETRIC: "eletric",
7
+ COMMON: "common",
8
+ };
9
+ exports.TransmissionType = {
10
+ MANUAL: "manual",
11
+ AUTOMATIC: "automatic",
12
+ };
13
+ exports.FeeType = {
14
+ SERVICE_FEE: "serviceFee",
15
+ RETURN_FEE: "returnFee",
16
+ };
@@ -0,0 +1,12 @@
1
+ export interface IGetCarByAgencyRequestDto {
2
+ pickupStoreCode: string;
3
+ dropoffStoreCode: string;
4
+ pickupHour: number;
5
+ pickupMinute: number;
6
+ pickupDate: string;
7
+ dropoffHour: number;
8
+ dropoffMinute: number;
9
+ dropoffDate: string;
10
+ agencyCode?: string;
11
+ customerCode?: string;
12
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ export interface IGetCarByAgencyRequestDto {
2
+ pickupStoreCode: string;
3
+ dropoffStoreCode: string;
4
+ pickupHour: number;
5
+ pickupMinute: number;
6
+ pickupDate: string;
7
+ dropoffHour: number;
8
+ dropoffMinute: number;
9
+ dropoffDate: string;
10
+ customerCode?: string;
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,103 @@
1
+ import { ICreditCard } from '../common';
2
+ import { IOfferStatus, IPriceDetails } from '../sm-airlines';
3
+ import * as SharedTypes from './shared';
4
+ export * from './shared';
5
+ export interface ICredentials {
6
+ login: string;
7
+ password: string;
8
+ apiKey: string;
9
+ }
10
+ export interface IRoute {
11
+ date: string;
12
+ departureStation: string;
13
+ arrivalStation: string;
14
+ }
15
+ export interface IPaxInfo {
16
+ adults: number;
17
+ children: number;
18
+ babies: number;
19
+ }
20
+ export interface ISearchConfigurations {
21
+ systems: SharedTypes.ISystemType[];
22
+ onlyTarifsWithLuggage?: boolean;
23
+ onlyDirectFlights?: boolean;
24
+ }
25
+ export interface ISearchData {
26
+ routes: IRoute[];
27
+ paxInfo: IPaxInfo;
28
+ config: ISearchConfigurations;
29
+ }
30
+ export interface IListOffersInfo {
31
+ searchId: string;
32
+ offers: SharedTypes.ISmTTravelOffer[];
33
+ }
34
+ export interface ITarifiedOfferInfo {
35
+ paxType: string;
36
+ priceDetails: IPriceDetails;
37
+ }
38
+ export interface IServiceOrderInfo {
39
+ serviceOrderId: string;
40
+ status: IOfferStatus | string;
41
+ recordLocator: string;
42
+ consultingKey: string;
43
+ createdAt: Date;
44
+ reservedUntil: Date;
45
+ system: SharedTypes.ISystemType;
46
+ }
47
+ export interface ICheckReserveInfo {
48
+ availability: boolean;
49
+ currentPrice: number;
50
+ selectedPrice: number;
51
+ priceDetails: IPriceDetails | null;
52
+ }
53
+ export interface IGetEmissionDataInfo {
54
+ cardBrands: ICardBrandItem[];
55
+ allowCreditCardPayment: boolean;
56
+ total: number;
57
+ }
58
+ export interface ICardBrandItem {
59
+ code: string;
60
+ brandName: string;
61
+ }
62
+ export interface IGetInstallmentsArgs {
63
+ creditCard: ICreditCard;
64
+ creditCardBrandCode: string;
65
+ system: SharedTypes.ISystemType;
66
+ total: number;
67
+ }
68
+ export interface IGetInstallmentsInfo {
69
+ installmentOptions: IInstallmentOption[];
70
+ }
71
+ export interface IInstallmentOption {
72
+ installments: number;
73
+ firstInstallmentValue: number;
74
+ otherInstallmentsValue: number;
75
+ total: number;
76
+ totalInterest: number;
77
+ }
78
+ export interface IEmitOfferArgs {
79
+ serviceOrderInfo: IServiceOrderInfo;
80
+ creditCard: ICreditCard;
81
+ creditCardBrandCode: string;
82
+ installments: number;
83
+ }
84
+ export interface IEmitOfferInfo {
85
+ isEmitted: boolean;
86
+ bookingCode: string;
87
+ price: number;
88
+ authorizationCode: string;
89
+ emittedAt: Date;
90
+ }
91
+ export interface ICancelReserveArgs {
92
+ serviceOrderInfo: IServiceOrderInfo;
93
+ }
94
+ export interface ICancelReserveInfo {
95
+ canceled: boolean;
96
+ }
97
+ export interface ICancelTicketArgs {
98
+ bookingCode: string;
99
+ serviceOrderInfo: IServiceOrderInfo;
100
+ }
101
+ export interface ICancelTicketInfo {
102
+ canceled: boolean;
103
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./shared"), exports);
@@ -0,0 +1,84 @@
1
+ export declare const SystemType: {
2
+ readonly LATAM: "LATAM";
3
+ readonly GOL: "GOL";
4
+ readonly GOLGWS: "GOLGWS";
5
+ readonly AZUL: "AZUL";
6
+ readonly PASSAREDO: "PASSAREDO";
7
+ readonly SABRE: "SABRE";
8
+ };
9
+ export declare const JourneyType: {
10
+ readonly INBOUND: "inbound";
11
+ readonly OUTBOUND: "outbound";
12
+ };
13
+ export declare const PaymentMethodType: {
14
+ readonly InCash: "À Vista";
15
+ readonly CustomerCard: "Cartão Cliente";
16
+ readonly CreditCard: "Cartão de Crédito";
17
+ readonly TravelerCard: "Cartão Viajante";
18
+ };
19
+ declare type ValueOf<T> = T[keyof T];
20
+ export declare type ISystemType = ValueOf<typeof SystemType>;
21
+ export declare type IJourneyType = ValueOf<typeof JourneyType>;
22
+ export declare type IPaymentMethodType = ValueOf<typeof PaymentMethodType>;
23
+ export interface ISmTTravelOffer {
24
+ searchId: string;
25
+ ttravelOfferId: number;
26
+ outboundJourney: IRawJourney;
27
+ inboundJourney?: IRawJourney;
28
+ }
29
+ export interface IRawJourney {
30
+ journeyId: number;
31
+ segments: IRawSegment[];
32
+ journeyType: IJourneyType;
33
+ segmentsCount: number;
34
+ totalDuration: string;
35
+ baseTotal: number;
36
+ baseTarif: number;
37
+ company: string;
38
+ departureHour: string;
39
+ arrivalHour: string;
40
+ departureDate: string;
41
+ arrivalDate: string;
42
+ diffArrivalDate: boolean;
43
+ fare?: IFareFamily;
44
+ filterTotalDuration: string;
45
+ }
46
+ export interface IRawSegment {
47
+ segmentId: number;
48
+ journeyId: number;
49
+ route: string;
50
+ originAirport: string;
51
+ destinationAirport: string;
52
+ stops: string;
53
+ departureHour: string;
54
+ arrivalHour: string;
55
+ departureDate: string;
56
+ arrivalDate: string;
57
+ connection: string;
58
+ system: ISystemType;
59
+ carrier: string;
60
+ company: string;
61
+ flightNumber: string;
62
+ duration: string;
63
+ flightType: string;
64
+ fareFamilies: IFareFamily[];
65
+ }
66
+ export interface IFareFamily {
67
+ fareId: number;
68
+ class: string;
69
+ availableCount: number;
70
+ fareBasis: string;
71
+ farePrice: string;
72
+ boardingFee: string;
73
+ duFee: string;
74
+ totalPrice: string;
75
+ fareClassName: string;
76
+ baggageCount: number;
77
+ discountCode: string;
78
+ netValue: string;
79
+ }
80
+ export interface IBaggageInfo {
81
+ baggagePieces?: number;
82
+ baggageWeight?: number;
83
+ }
84
+ export {};
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PaymentMethodType = exports.JourneyType = exports.SystemType = void 0;
4
+ exports.SystemType = {
5
+ LATAM: 'LATAM',
6
+ GOL: 'GOL',
7
+ GOLGWS: 'GOLGWS',
8
+ AZUL: 'AZUL',
9
+ PASSAREDO: 'PASSAREDO',
10
+ SABRE: 'SABRE'
11
+ };
12
+ exports.JourneyType = {
13
+ INBOUND: 'inbound',
14
+ OUTBOUND: 'outbound'
15
+ };
16
+ exports.PaymentMethodType = {
17
+ InCash: 'À Vista',
18
+ CustomerCard: 'Cartão Cliente',
19
+ CreditCard: 'Cartão de Crédito',
20
+ TravelerCard: 'Cartão Viajante'
21
+ };