sm-types 1.8.8 → 1.9.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.
package/sm-azul/index.js CHANGED
@@ -1,17 +1,124 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
2
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./shared"), exports);
3
+ exports.CompartmentName = exports.CompartmentUnitLocation = exports.CompartmentUnitAvailable = exports.CompartmentUnitType = exports.MethodCode = exports.RefundType = exports.ReserveDetailsGenderType = exports.PaymentStatus = exports.LiftStatus = exports.ReserveStatus = exports.PhoneType = exports.PassengerSuffix = exports.PassengerTitle = exports.GenderType = exports.DocumentType = exports.FareChargeTypeEnum = exports.AirSearchFeeRuleTypeEnum = exports.BaggageAllowance = void 0;
4
+ var BaggageAllowance;
5
+ (function (BaggageAllowance) {
6
+ BaggageAllowance["All"] = "All";
7
+ BaggageAllowance["WithBaggage"] = "WithBaggage";
8
+ BaggageAllowance["NoBaggage"] = "NoBaggage";
9
+ })(BaggageAllowance = exports.BaggageAllowance || (exports.BaggageAllowance = {}));
10
+ var AirSearchFeeRuleTypeEnum;
11
+ (function (AirSearchFeeRuleTypeEnum) {
12
+ AirSearchFeeRuleTypeEnum["DUFEE"] = "DUFEE";
13
+ AirSearchFeeRuleTypeEnum["Unavailable"] = "Unavailable";
14
+ })(AirSearchFeeRuleTypeEnum = exports.AirSearchFeeRuleTypeEnum || (exports.AirSearchFeeRuleTypeEnum = {}));
15
+ var FareChargeTypeEnum;
16
+ (function (FareChargeTypeEnum) {
17
+ FareChargeTypeEnum["Fare"] = "Fare";
18
+ FareChargeTypeEnum["Tax"] = "Tax";
19
+ })(FareChargeTypeEnum = exports.FareChargeTypeEnum || (exports.FareChargeTypeEnum = {}));
20
+ var DocumentType;
21
+ (function (DocumentType) {
22
+ DocumentType["CPF"] = "CPF";
23
+ DocumentType["Passport"] = "Passport";
24
+ DocumentType["RNE"] = "RNE";
25
+ DocumentType["RG"] = "RG";
26
+ })(DocumentType = exports.DocumentType || (exports.DocumentType = {}));
27
+ var GenderType;
28
+ (function (GenderType) {
29
+ GenderType["Male"] = "Male";
30
+ GenderType["Female"] = "Female";
31
+ })(GenderType = exports.GenderType || (exports.GenderType = {}));
32
+ var PassengerTitle;
33
+ (function (PassengerTitle) {
34
+ PassengerTitle["MS"] = "MS";
35
+ PassengerTitle["MR"] = "MR";
36
+ PassengerTitle["MRS"] = "MRS";
37
+ })(PassengerTitle = exports.PassengerTitle || (exports.PassengerTitle = {}));
38
+ var PassengerSuffix;
39
+ (function (PassengerSuffix) {
40
+ PassengerSuffix["FO"] = "FO";
41
+ PassengerSuffix["JR"] = "JR";
42
+ PassengerSuffix["NT"] = "NT";
43
+ PassengerSuffix["SOBR"] = "SOBR";
44
+ })(PassengerSuffix = exports.PassengerSuffix || (exports.PassengerSuffix = {}));
45
+ var PhoneType;
46
+ (function (PhoneType) {
47
+ PhoneType["Other"] = "Other";
48
+ PhoneType["Home"] = "Home";
49
+ PhoneType["Work"] = "Work";
50
+ PhoneType["Mobile"] = "Mobile";
51
+ PhoneType["Fax"] = "Fax";
52
+ })(PhoneType = exports.PhoneType || (exports.PhoneType = {}));
53
+ var ReserveStatus;
54
+ (function (ReserveStatus) {
55
+ ReserveStatus["Default"] = "Default";
56
+ ReserveStatus["Hold"] = "Hold";
57
+ ReserveStatus["Confirmed"] = "Confirmed";
58
+ ReserveStatus["Closed"] = "Closed";
59
+ ReserveStatus["HoldCanceled"] = "HoldCanceled";
60
+ ReserveStatus["PendingArchive"] = "PendingArchive";
61
+ ReserveStatus["Archived"] = "Archived";
62
+ })(ReserveStatus = exports.ReserveStatus || (exports.ReserveStatus = {}));
63
+ var LiftStatus;
64
+ (function (LiftStatus) {
65
+ LiftStatus["Default"] = "Default";
66
+ LiftStatus["CheckedIn"] = "CheckedIn";
67
+ LiftStatus["Boarded"] = "Boarded";
68
+ LiftStatus["NoShow"] = "NoShow";
69
+ })(LiftStatus = exports.LiftStatus || (exports.LiftStatus = {}));
70
+ var PaymentStatus;
71
+ (function (PaymentStatus) {
72
+ PaymentStatus["New"] = "New";
73
+ PaymentStatus["Received"] = "Received";
74
+ PaymentStatus["Pending"] = "Pending";
75
+ PaymentStatus["Approved"] = "Approved";
76
+ PaymentStatus["Declined"] = "Declined";
77
+ PaymentStatus["Unknown"] = "Unknown";
78
+ PaymentStatus["PendingCustomerAction"] = "PendingCustomerAction";
79
+ })(PaymentStatus = exports.PaymentStatus || (exports.PaymentStatus = {}));
80
+ var ReserveDetailsGenderType;
81
+ (function (ReserveDetailsGenderType) {
82
+ ReserveDetailsGenderType["XX"] = "XX";
83
+ ReserveDetailsGenderType["Male"] = "Male";
84
+ ReserveDetailsGenderType["Female"] = "Female";
85
+ })(ReserveDetailsGenderType = exports.ReserveDetailsGenderType || (exports.ReserveDetailsGenderType = {}));
86
+ var RefundType;
87
+ (function (RefundType) {
88
+ RefundType["Credit"] = "Credit";
89
+ })(RefundType = exports.RefundType || (exports.RefundType = {}));
90
+ var MethodCode;
91
+ (function (MethodCode) {
92
+ MethodCode["AG"] = "AG";
93
+ MethodCode["CF"] = "CF";
94
+ MethodCode["AX"] = "AX";
95
+ MethodCode["VI"] = "VI";
96
+ MethodCode["MC"] = "MC";
97
+ MethodCode["DI"] = "DI";
98
+ MethodCode["HP"] = "HP";
99
+ MethodCode["EL"] = "EL";
100
+ MethodCode["TP"] = "TP";
101
+ })(MethodCode = exports.MethodCode || (exports.MethodCode = {}));
102
+ var CompartmentUnitType;
103
+ (function (CompartmentUnitType) {
104
+ CompartmentUnitType["Seat"] = "Seat";
105
+ CompartmentUnitType["Lavatory"] = "Lavatory";
106
+ CompartmentUnitType["Galley"] = "Galley";
107
+ })(CompartmentUnitType = exports.CompartmentUnitType || (exports.CompartmentUnitType = {}));
108
+ var CompartmentUnitAvailable;
109
+ (function (CompartmentUnitAvailable) {
110
+ CompartmentUnitAvailable["Blocked"] = "Blocked";
111
+ CompartmentUnitAvailable["Taken"] = "Taken";
112
+ CompartmentUnitAvailable["Open"] = "Open";
113
+ })(CompartmentUnitAvailable = exports.CompartmentUnitAvailable || (exports.CompartmentUnitAvailable = {}));
114
+ var CompartmentUnitLocation;
115
+ (function (CompartmentUnitLocation) {
116
+ CompartmentUnitLocation["Window"] = "Window";
117
+ CompartmentUnitLocation["Aisle"] = "Aisle";
118
+ CompartmentUnitLocation["Middle"] = "Middle";
119
+ })(CompartmentUnitLocation = exports.CompartmentUnitLocation || (exports.CompartmentUnitLocation = {}));
120
+ var CompartmentName;
121
+ (function (CompartmentName) {
122
+ CompartmentName["Economy"] = "Economy";
123
+ CompartmentName["Business"] = "Business";
124
+ })(CompartmentName = exports.CompartmentName || (exports.CompartmentName = {}));
@@ -1,3 +1,4 @@
1
+ import { Nullable } from "../common";
1
2
  export interface ISmCarsAgency {
2
3
  code: string;
3
4
  active: boolean;
@@ -71,7 +72,7 @@ export interface ISmCarFeeInfo {
71
72
  export interface ISmCarAdditionalPriceInfo {
72
73
  name: string;
73
74
  supplierCategory: string;
74
- supplierId: number | null;
75
+ supplierId: Nullable<string>;
75
76
  selected: boolean;
76
77
  allowChange: boolean;
77
78
  rawPrice: number;
@@ -143,4 +144,65 @@ export interface ListOffersResponseData {
143
144
  data: ListOffersResponse;
144
145
  message?: string;
145
146
  }
147
+ export type CarReservationCustomerPhoneDto = {
148
+ ddi: string;
149
+ ddd: string;
150
+ number: string;
151
+ };
152
+ export type CarReservationCustomerDto = {
153
+ namePrefix?: string | null;
154
+ firstName: string;
155
+ lastName: string;
156
+ cpf: string;
157
+ email: string;
158
+ phone: CarReservationCustomerPhoneDto;
159
+ };
160
+ export type ReserveCarOfferRequestDto = {
161
+ customer: CarReservationCustomerDto;
162
+ paymentInfo: CarReservationPaymentInfoDto;
163
+ };
164
+ export type CarReservationPaymentInfoDto = {
165
+ category: CarPaymentCategory;
166
+ };
167
+ export declare enum CarPaymentCategory {
168
+ AgencyBilled = "AGENCY_BILLED",
169
+ CompanyBilled = "COMPANY_BILLED",
170
+ Balcony = "BALCONY"
171
+ }
172
+ export type RecalculateCarOfferAdditionals = {
173
+ supplierId: string;
174
+ quantity: string;
175
+ };
176
+ export type RecalculateCarOfferRequestDto = {
177
+ offerId: string;
178
+ additionals: RecalculateCarOfferAdditionals[];
179
+ };
180
+ export type SearchCarFilters = {
181
+ minSearchRadius: number;
182
+ maxSearchRadius: number;
183
+ };
184
+ export type ListCarOffersRequestDto = {
185
+ pickupLatitude: string;
186
+ pickupLongitude: string;
187
+ pickupHour: number;
188
+ pickupMinute: number;
189
+ pickupDate: string;
190
+ diffDropoff: boolean;
191
+ dropoffDate: string;
192
+ dropoffLatitude: string;
193
+ dropoffLongitude: string;
194
+ dropoffHour: number;
195
+ dropoffMinute: number;
196
+ searchFilters: SearchCarFilters;
197
+ clientCredentials: ClientCarCredential[];
198
+ };
199
+ export type ClientCarCredential = {
200
+ supplier: CarSupplier;
201
+ agencyCode?: string;
202
+ customerCode?: string;
203
+ };
204
+ export declare enum CarSupplier {
205
+ LOCALIZA = "localiza",
206
+ MOVIDA = "movida"
207
+ }
146
208
  export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FeeType = exports.TransmissionType = exports.SteeringType = void 0;
3
+ exports.CarSupplier = exports.CarPaymentCategory = exports.FeeType = exports.TransmissionType = exports.SteeringType = void 0;
4
4
  exports.SteeringType = {
5
5
  HYDRAULIC: "hydraulic",
6
6
  ELETRIC: "eletric",
@@ -14,3 +14,14 @@ exports.FeeType = {
14
14
  SERVICE_FEE: "serviceFee",
15
15
  RETURN_FEE: "returnFee",
16
16
  };
17
+ var CarPaymentCategory;
18
+ (function (CarPaymentCategory) {
19
+ CarPaymentCategory["AgencyBilled"] = "AGENCY_BILLED";
20
+ CarPaymentCategory["CompanyBilled"] = "COMPANY_BILLED";
21
+ CarPaymentCategory["Balcony"] = "BALCONY";
22
+ })(CarPaymentCategory = exports.CarPaymentCategory || (exports.CarPaymentCategory = {}));
23
+ var CarSupplier;
24
+ (function (CarSupplier) {
25
+ CarSupplier["LOCALIZA"] = "localiza";
26
+ CarSupplier["MOVIDA"] = "movida";
27
+ })(CarSupplier = exports.CarSupplier || (exports.CarSupplier = {}));
package/sm-wcf/index.d.ts CHANGED
@@ -2,7 +2,7 @@ export interface IWcfOffer {
2
2
  outbound: IWcfBound;
3
3
  inbound: IWcfBound | null;
4
4
  supplier: string;
5
- itineraryId?: number;
5
+ itineraryId?: number | string;
6
6
  travelIdentification: any;
7
7
  price: number;
8
8
  priceDetails: IPriceDetails;
@@ -19,12 +19,12 @@ export interface IWcfBound {
19
19
  type: string;
20
20
  departure: string;
21
21
  departureHour: string;
22
- departureTextDate: string;
23
- departureWeekDay: string;
22
+ departureTextDate?: string;
23
+ departureWeekDay?: string;
24
24
  arrival: string;
25
25
  arrivalHour: string;
26
- arrivalTextDate: string;
27
- arrivalWeekDay: string;
26
+ arrivalTextDate?: string;
27
+ arrivalWeekDay?: string;
28
28
  daysDiff: number;
29
29
  origin: IWcfStation;
30
30
  destination: IWcfStation;