sm-types 1.11.56 → 1.11.58
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/common/index.d.ts +29 -6
- package/common/index.js +7 -1
- package/package.json +1 -1
package/common/index.d.ts
CHANGED
|
@@ -28,12 +28,13 @@ export type ConfigOptions = {
|
|
|
28
28
|
tripPurpose: FieldVisibility;
|
|
29
29
|
flightPurpose: FieldVisibility;
|
|
30
30
|
hotelPurpose: FieldVisibility;
|
|
31
|
+
travelerSelection?: TravelerSelection;
|
|
31
32
|
};
|
|
32
33
|
flights: {
|
|
33
34
|
samePlaneLimit: number;
|
|
34
35
|
allowedClasses: CabinClass[];
|
|
35
36
|
};
|
|
36
|
-
hotels
|
|
37
|
+
hotels?: {
|
|
37
38
|
amenities_preferences: {
|
|
38
39
|
breakfast: AmenitiesPreference;
|
|
39
40
|
refund: AmenitiesPreference;
|
|
@@ -45,6 +46,11 @@ export declare enum AmenitiesPreference {
|
|
|
45
46
|
REQUIRED = "REQUIRED",
|
|
46
47
|
PRE_SELECTED = "PRE_SELECTED"
|
|
47
48
|
}
|
|
49
|
+
export declare enum TravelerSelection {
|
|
50
|
+
ALWAYS_SPECIFY = "ALWAYS_SPECIFY",
|
|
51
|
+
LOGGED_USER_FOR_ALL_BOOKERS = "LOGGED_USER_FOR_ALL_BOOKERS",
|
|
52
|
+
LOGGED_USER_FOR_SIMPLE_BOOKERS = "LOGGED_USER_FOR_SIMPLE_BOOKERS"
|
|
53
|
+
}
|
|
48
54
|
export declare const CABIN_CLASS_TYPES: {
|
|
49
55
|
readonly ECONOMY: {
|
|
50
56
|
readonly name: "Econômica";
|
|
@@ -65,7 +71,7 @@ export declare const CABIN_CLASS_TYPES: {
|
|
|
65
71
|
};
|
|
66
72
|
export interface IFlightJSON {
|
|
67
73
|
price: number;
|
|
68
|
-
search:
|
|
74
|
+
search: IFlightOfferSearch;
|
|
69
75
|
international: boolean;
|
|
70
76
|
inbound?: IFlightBound;
|
|
71
77
|
outbound: IFlightBound;
|
|
@@ -154,14 +160,31 @@ export interface IStop {
|
|
|
154
160
|
durationHours: string;
|
|
155
161
|
durationMinutes: number;
|
|
156
162
|
}
|
|
157
|
-
export interface
|
|
163
|
+
export interface ICarOfferSearch extends IBaseOfferSearch {
|
|
164
|
+
pickupCountryCode: string;
|
|
165
|
+
dropoffCountryCode: string;
|
|
166
|
+
}
|
|
167
|
+
export interface IHotelOfferSearch extends IBaseOfferSearch {
|
|
168
|
+
hotelCountryCode: string;
|
|
169
|
+
}
|
|
170
|
+
export interface IBusOfferSearch extends IBaseOfferSearch {
|
|
171
|
+
originCountryCode: string;
|
|
172
|
+
destinationCountryCode: string;
|
|
173
|
+
}
|
|
174
|
+
export interface IFlightOfferSearch extends IBaseOfferSearch {
|
|
175
|
+
originCountryCode: string;
|
|
176
|
+
destinationCountryCode: string;
|
|
177
|
+
}
|
|
178
|
+
export interface IBaseOfferSearch {
|
|
158
179
|
initialDate: string | Date;
|
|
159
180
|
initialHour?: string;
|
|
160
181
|
endDate?: string | Date;
|
|
161
182
|
endHour?: string;
|
|
183
|
+
international: boolean;
|
|
162
184
|
}
|
|
185
|
+
export type IOfferSearch = ICarOfferSearch | IHotelOfferSearch | IBusOfferSearch | IFlightOfferSearch;
|
|
163
186
|
export interface IHotelJSON {
|
|
164
|
-
search:
|
|
187
|
+
search: IHotelOfferSearch;
|
|
165
188
|
id: number;
|
|
166
189
|
city: string;
|
|
167
190
|
name: string;
|
|
@@ -208,7 +231,7 @@ export type additionalDriver = {
|
|
|
208
231
|
cpf: Nullable<string>;
|
|
209
232
|
};
|
|
210
233
|
export interface ICarJSON {
|
|
211
|
-
search:
|
|
234
|
+
search: ICarOfferSearch;
|
|
212
235
|
additionalDrivers: additionalDriver[];
|
|
213
236
|
pickup: {
|
|
214
237
|
date: string;
|
|
@@ -256,7 +279,7 @@ export interface IHotelSearchMetadata {
|
|
|
256
279
|
};
|
|
257
280
|
}
|
|
258
281
|
export interface IBusJSON {
|
|
259
|
-
search:
|
|
282
|
+
search: IBusOfferSearch;
|
|
260
283
|
returnTrip: IBusTrip;
|
|
261
284
|
departureTrip: IBusTrip;
|
|
262
285
|
}
|
package/common/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.CABIN_CLASS_TYPES = exports.AmenitiesPreference = exports.FieldVisibility = void 0;
|
|
17
|
+
exports.CABIN_CLASS_TYPES = exports.TravelerSelection = exports.AmenitiesPreference = exports.FieldVisibility = void 0;
|
|
18
18
|
__exportStar(require("./enums"), exports);
|
|
19
19
|
var FieldVisibility;
|
|
20
20
|
(function (FieldVisibility) {
|
|
@@ -28,6 +28,12 @@ var AmenitiesPreference;
|
|
|
28
28
|
AmenitiesPreference["REQUIRED"] = "REQUIRED";
|
|
29
29
|
AmenitiesPreference["PRE_SELECTED"] = "PRE_SELECTED";
|
|
30
30
|
})(AmenitiesPreference = exports.AmenitiesPreference || (exports.AmenitiesPreference = {}));
|
|
31
|
+
var TravelerSelection;
|
|
32
|
+
(function (TravelerSelection) {
|
|
33
|
+
TravelerSelection["ALWAYS_SPECIFY"] = "ALWAYS_SPECIFY";
|
|
34
|
+
TravelerSelection["LOGGED_USER_FOR_ALL_BOOKERS"] = "LOGGED_USER_FOR_ALL_BOOKERS";
|
|
35
|
+
TravelerSelection["LOGGED_USER_FOR_SIMPLE_BOOKERS"] = "LOGGED_USER_FOR_SIMPLE_BOOKERS";
|
|
36
|
+
})(TravelerSelection = exports.TravelerSelection || (exports.TravelerSelection = {}));
|
|
31
37
|
exports.CABIN_CLASS_TYPES = {
|
|
32
38
|
ECONOMY: { name: "Econômica", value: "economy" },
|
|
33
39
|
PREMIUM_ECONOMY: { name: "Econômica premium", value: "premium_economy" },
|