@movmo_app/types 1.4.0 → 1.6.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/dist/booking_passenger.d.ts +39 -0
- package/dist/booking_passenger.js +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/movmo_flight_offer.d.ts +225 -0
- package/dist/movmo_flight_offer.js +10 -0
- package/package.json +1 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BookingSeatSelection represents a per-passenger-per-segment seat selection.
|
|
3
|
+
* Maps to the BookingSeatSelection model in go-services-core.
|
|
4
|
+
*/
|
|
5
|
+
export type BookingSeatSelection = {
|
|
6
|
+
id: string;
|
|
7
|
+
booking_id: string;
|
|
8
|
+
user_passenger_id: string;
|
|
9
|
+
segment_id: string;
|
|
10
|
+
seat_number: string;
|
|
11
|
+
seat_row?: string;
|
|
12
|
+
seat_column?: string;
|
|
13
|
+
price?: number;
|
|
14
|
+
currency?: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* BookingPassenger represents a passenger associated with a booking,
|
|
18
|
+
* including full user passenger details and ticketing information.
|
|
19
|
+
* Maps to the BookingPassengerWithDetails model in go-services-core.
|
|
20
|
+
*/
|
|
21
|
+
export type BookingPassenger = {
|
|
22
|
+
id: string;
|
|
23
|
+
user_id: string;
|
|
24
|
+
first_name: string;
|
|
25
|
+
middle_name?: string;
|
|
26
|
+
last_name: string;
|
|
27
|
+
gender: string;
|
|
28
|
+
date_of_birth: string;
|
|
29
|
+
traveler_type: string;
|
|
30
|
+
is_default: boolean;
|
|
31
|
+
email?: string;
|
|
32
|
+
phone_number?: string;
|
|
33
|
+
nationality?: string;
|
|
34
|
+
known_traveler_number?: string;
|
|
35
|
+
ticket_number?: string;
|
|
36
|
+
seat_number?: string;
|
|
37
|
+
fare_basis_code?: string;
|
|
38
|
+
seat_selections?: BookingSeatSelection[];
|
|
39
|
+
};
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -26,3 +26,5 @@ __exportStar(require("./trip_summary"), exports);
|
|
|
26
26
|
__exportStar(require("./travel_preferences"), exports);
|
|
27
27
|
__exportStar(require("./referrals"), exports);
|
|
28
28
|
__exportStar(require("./sessions"), exports);
|
|
29
|
+
__exportStar(require("./booking_passenger"), exports);
|
|
30
|
+
__exportStar(require("./movmo_flight_offer"), exports);
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MovmoFlightOffer type tree — shared types for the normalized flight offer model.
|
|
3
|
+
* These mirror the Go models in go-services-core/models/flights.go.
|
|
4
|
+
*
|
|
5
|
+
* Originally defined in flights-ui/src/services/flights.ts.
|
|
6
|
+
* NOTE: The existing FlightOffer type in booking.ts is a legacy model with a
|
|
7
|
+
* completely different shape. Both coexist — no breaking changes.
|
|
8
|
+
*/
|
|
9
|
+
export type MovmoConditionDetail = {
|
|
10
|
+
penalty_currency?: string;
|
|
11
|
+
penalty_amount?: string;
|
|
12
|
+
allowed: boolean;
|
|
13
|
+
};
|
|
14
|
+
export type MovmoConditions = {
|
|
15
|
+
refunds_before_departure?: MovmoConditionDetail;
|
|
16
|
+
changes_before_departure?: MovmoConditionDetail;
|
|
17
|
+
};
|
|
18
|
+
export type MovmoPaymentRequirements = {
|
|
19
|
+
requires_instant_payment: boolean;
|
|
20
|
+
price_guarantee_expires_at?: string;
|
|
21
|
+
payment_required_by?: string;
|
|
22
|
+
};
|
|
23
|
+
export type MovmoPrivateFare = {
|
|
24
|
+
corporate_code?: string;
|
|
25
|
+
tour_code?: string;
|
|
26
|
+
tracking_reference?: string;
|
|
27
|
+
};
|
|
28
|
+
export type MovmoAvailableService = {
|
|
29
|
+
id: string;
|
|
30
|
+
type: string;
|
|
31
|
+
total_amount: string;
|
|
32
|
+
total_currency: string;
|
|
33
|
+
segment_ids?: string[];
|
|
34
|
+
passenger_ids?: string[];
|
|
35
|
+
maximum_quantity?: number;
|
|
36
|
+
};
|
|
37
|
+
export type MovmoIdentityDocument = {
|
|
38
|
+
expires_on: string;
|
|
39
|
+
issuing_country_code: string;
|
|
40
|
+
type: string;
|
|
41
|
+
unique_identifier: string;
|
|
42
|
+
};
|
|
43
|
+
export type MovmoLoyaltyProgrammeAccount = {
|
|
44
|
+
airline_iata_code: string;
|
|
45
|
+
account_number: string;
|
|
46
|
+
};
|
|
47
|
+
export type MovmoPassenger = {
|
|
48
|
+
id: string;
|
|
49
|
+
provider_passenger_id: string;
|
|
50
|
+
type?: string;
|
|
51
|
+
age?: number;
|
|
52
|
+
first_name?: string;
|
|
53
|
+
middle_name?: string;
|
|
54
|
+
last_name?: string;
|
|
55
|
+
fare_type?: string;
|
|
56
|
+
born_on?: string;
|
|
57
|
+
email?: string;
|
|
58
|
+
phone_number?: string;
|
|
59
|
+
title?: string;
|
|
60
|
+
gender?: string;
|
|
61
|
+
known_traveler_number?: string;
|
|
62
|
+
passport_number?: string;
|
|
63
|
+
identity_documents?: MovmoIdentityDocument[];
|
|
64
|
+
loyalty_programme_accounts?: MovmoLoyaltyProgrammeAccount[];
|
|
65
|
+
traveler_type?: string;
|
|
66
|
+
};
|
|
67
|
+
export type MovmoCarrier = {
|
|
68
|
+
id: string;
|
|
69
|
+
name: string;
|
|
70
|
+
logo_symbol_url?: string;
|
|
71
|
+
logo_lockup_url?: string;
|
|
72
|
+
iata_code?: string;
|
|
73
|
+
conditions_of_carriage_url?: string;
|
|
74
|
+
};
|
|
75
|
+
export type MovmoCity = {
|
|
76
|
+
id: string;
|
|
77
|
+
name: string;
|
|
78
|
+
iata_country_code?: string;
|
|
79
|
+
iata_code: string;
|
|
80
|
+
airports?: MovmoPlace[];
|
|
81
|
+
};
|
|
82
|
+
export type MovmoPlace = {
|
|
83
|
+
id: string;
|
|
84
|
+
type: string;
|
|
85
|
+
time_zone: string;
|
|
86
|
+
name: string;
|
|
87
|
+
longitude: number;
|
|
88
|
+
latitude: number;
|
|
89
|
+
icao_code: string;
|
|
90
|
+
iata_country_code: string;
|
|
91
|
+
iata_code: string;
|
|
92
|
+
iata_city_code: string;
|
|
93
|
+
city_name: string;
|
|
94
|
+
city?: MovmoCity;
|
|
95
|
+
airports?: MovmoPlace[];
|
|
96
|
+
};
|
|
97
|
+
export type MovmoWifiAmenity = {
|
|
98
|
+
cost?: string;
|
|
99
|
+
available?: boolean;
|
|
100
|
+
};
|
|
101
|
+
export type MovmoPowerAmenity = {
|
|
102
|
+
available?: boolean;
|
|
103
|
+
};
|
|
104
|
+
export type MovmoSeatAmenity = {
|
|
105
|
+
type?: string;
|
|
106
|
+
pitch?: string;
|
|
107
|
+
legroom?: string;
|
|
108
|
+
};
|
|
109
|
+
export type MovmoCabinAmenities = {
|
|
110
|
+
wifi?: MovmoWifiAmenity;
|
|
111
|
+
seat?: MovmoSeatAmenity;
|
|
112
|
+
power?: MovmoPowerAmenity;
|
|
113
|
+
};
|
|
114
|
+
export type MovmoCabin = {
|
|
115
|
+
name: string;
|
|
116
|
+
marketing_name?: string;
|
|
117
|
+
amenities?: MovmoCabinAmenities;
|
|
118
|
+
};
|
|
119
|
+
export type MovmoBaggage = {
|
|
120
|
+
type: string;
|
|
121
|
+
quantity: number;
|
|
122
|
+
};
|
|
123
|
+
export type MovmoSegmentPassenger = {
|
|
124
|
+
passenger_id: string;
|
|
125
|
+
fare_basis_code?: string;
|
|
126
|
+
cabin_class: CabinClass;
|
|
127
|
+
cabin_class_marketing_name?: string;
|
|
128
|
+
cabin?: MovmoCabin;
|
|
129
|
+
baggages?: MovmoBaggage[];
|
|
130
|
+
};
|
|
131
|
+
export type MovmoAircraft = {
|
|
132
|
+
id: string;
|
|
133
|
+
name: string;
|
|
134
|
+
iata_code: string;
|
|
135
|
+
};
|
|
136
|
+
export type MovmoStop = {
|
|
137
|
+
id: string;
|
|
138
|
+
duration: string;
|
|
139
|
+
departing_at: string;
|
|
140
|
+
arriving_at: string;
|
|
141
|
+
airport: MovmoPlace;
|
|
142
|
+
};
|
|
143
|
+
export type MovmoSegment = {
|
|
144
|
+
id: string;
|
|
145
|
+
origin: MovmoPlace;
|
|
146
|
+
destination: MovmoPlace;
|
|
147
|
+
departing_at: string;
|
|
148
|
+
arriving_at: string;
|
|
149
|
+
duration?: string;
|
|
150
|
+
distance?: string;
|
|
151
|
+
origin_terminal?: string;
|
|
152
|
+
destination_terminal?: string;
|
|
153
|
+
marketing_carrier: MovmoCarrier;
|
|
154
|
+
marketing_carrier_flight_number: string;
|
|
155
|
+
operating_carrier: MovmoCarrier;
|
|
156
|
+
operating_carrier_flight_number?: string;
|
|
157
|
+
aircraft?: MovmoAircraft;
|
|
158
|
+
passengers?: MovmoSegmentPassenger[];
|
|
159
|
+
stops?: MovmoStop[];
|
|
160
|
+
is_overnight: boolean;
|
|
161
|
+
layover_duration?: string;
|
|
162
|
+
};
|
|
163
|
+
export type MovmoSliceConditions = {
|
|
164
|
+
priorityCheckIn?: boolean;
|
|
165
|
+
priorityBoarding?: boolean;
|
|
166
|
+
changesBeforeDeparture?: MovmoConditionDetail;
|
|
167
|
+
advanceSeatSelection?: boolean;
|
|
168
|
+
};
|
|
169
|
+
export type MovmoOfferSlice = {
|
|
170
|
+
id: string;
|
|
171
|
+
origin_type: string;
|
|
172
|
+
origin: MovmoPlace;
|
|
173
|
+
destination_type: string;
|
|
174
|
+
destination: MovmoPlace;
|
|
175
|
+
segments: MovmoSegment[];
|
|
176
|
+
duration?: string;
|
|
177
|
+
fare_brand_name?: string;
|
|
178
|
+
conditions?: MovmoSliceConditions;
|
|
179
|
+
comparison_key?: string;
|
|
180
|
+
ngs_shelf?: number;
|
|
181
|
+
arrives_on_different_day?: boolean;
|
|
182
|
+
};
|
|
183
|
+
export type BoardingPriority = 'last' | 'standard' | 'early' | 'priority';
|
|
184
|
+
export type CabinClass = 'economy' | 'premium_economy' | 'business' | 'first';
|
|
185
|
+
export type FareClassMetadata = {
|
|
186
|
+
seat_selection_allowed: boolean;
|
|
187
|
+
seat_selection_fee?: string;
|
|
188
|
+
seat_selection_currency?: string;
|
|
189
|
+
extra_legroom: boolean;
|
|
190
|
+
carry_on_bags: number;
|
|
191
|
+
checked_bags: number;
|
|
192
|
+
checked_bags_paid: boolean;
|
|
193
|
+
changes_allowed: boolean;
|
|
194
|
+
change_penalty_amount?: string;
|
|
195
|
+
change_penalty_currency?: string;
|
|
196
|
+
refunds_allowed: boolean;
|
|
197
|
+
refund_penalty_amount?: string;
|
|
198
|
+
refund_penalty_currency?: string;
|
|
199
|
+
boarding_priority: BoardingPriority;
|
|
200
|
+
};
|
|
201
|
+
export type MovmoFlightOffer = {
|
|
202
|
+
id: string;
|
|
203
|
+
provider_id: string;
|
|
204
|
+
created_at: string;
|
|
205
|
+
updated_at: string;
|
|
206
|
+
expires_at: string;
|
|
207
|
+
total_amount: string;
|
|
208
|
+
total_currency: string;
|
|
209
|
+
base_amount: string;
|
|
210
|
+
base_currency: string;
|
|
211
|
+
tax_amount?: string;
|
|
212
|
+
tax_currency?: string;
|
|
213
|
+
total_emissions_kg?: string;
|
|
214
|
+
passenger_identity_documents_required: boolean;
|
|
215
|
+
supported_passenger_identity_document_types: string[];
|
|
216
|
+
supported_loyalty_programmes: string[];
|
|
217
|
+
owner: MovmoCarrier;
|
|
218
|
+
passengers: MovmoPassenger[];
|
|
219
|
+
slices: MovmoOfferSlice[];
|
|
220
|
+
conditions: MovmoConditions;
|
|
221
|
+
payment_requirements: MovmoPaymentRequirements;
|
|
222
|
+
private_fares?: MovmoPrivateFare[];
|
|
223
|
+
available_services?: MovmoAvailableService[];
|
|
224
|
+
fare_class_metadata?: FareClassMetadata;
|
|
225
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MovmoFlightOffer type tree — shared types for the normalized flight offer model.
|
|
4
|
+
* These mirror the Go models in go-services-core/models/flights.go.
|
|
5
|
+
*
|
|
6
|
+
* Originally defined in flights-ui/src/services/flights.ts.
|
|
7
|
+
* NOTE: The existing FlightOffer type in booking.ts is a legacy model with a
|
|
8
|
+
* completely different shape. Both coexist — no breaking changes.
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|