@voyant-travel/flights-react 0.119.2
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/LICENSE +201 -0
- package/README.md +74 -0
- package/dist/admin/index.d.ts +134 -0
- package/dist/admin/index.d.ts.map +1 -0
- package/dist/admin/index.js +122 -0
- package/dist/admin/pages/flight-book-page.d.ts +12 -0
- package/dist/admin/pages/flight-book-page.d.ts.map +1 -0
- package/dist/admin/pages/flight-book-page.js +40 -0
- package/dist/admin/pages/flights-index-page.d.ts +14 -0
- package/dist/admin/pages/flights-index-page.d.ts.map +1 -0
- package/dist/admin/pages/flights-index-page.js +28 -0
- package/dist/client.d.ts +16 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +75 -0
- package/dist/components/airline-logo.d.ts +19 -0
- package/dist/components/airline-logo.d.ts.map +1 -0
- package/dist/components/airline-logo.js +18 -0
- package/dist/components/airport-combobox.d.ts +20 -0
- package/dist/components/airport-combobox.d.ts.map +1 -0
- package/dist/components/airport-combobox.js +31 -0
- package/dist/components/billing-pickers.d.ts +19 -0
- package/dist/components/billing-pickers.d.ts.map +1 -0
- package/dist/components/billing-pickers.js +148 -0
- package/dist/components/flight-baggage-step.d.ts +32 -0
- package/dist/components/flight-baggage-step.d.ts.map +1 -0
- package/dist/components/flight-baggage-step.js +119 -0
- package/dist/components/flight-billing-step.d.ts +69 -0
- package/dist/components/flight-billing-step.d.ts.map +1 -0
- package/dist/components/flight-billing-step.js +117 -0
- package/dist/components/flight-booking-journey.d.ts +31 -0
- package/dist/components/flight-booking-journey.d.ts.map +1 -0
- package/dist/components/flight-booking-journey.js +103 -0
- package/dist/components/flight-booking-ledger.d.ts +53 -0
- package/dist/components/flight-booking-ledger.d.ts.map +1 -0
- package/dist/components/flight-booking-ledger.js +104 -0
- package/dist/components/flight-booking-page.d.ts +25 -0
- package/dist/components/flight-booking-page.d.ts.map +1 -0
- package/dist/components/flight-booking-page.js +175 -0
- package/dist/components/flight-booking-shell-helpers.d.ts +29 -0
- package/dist/components/flight-booking-shell-helpers.d.ts.map +1 -0
- package/dist/components/flight-booking-shell-helpers.js +204 -0
- package/dist/components/flight-booking-shell-panels.d.ts +24 -0
- package/dist/components/flight-booking-shell-panels.d.ts.map +1 -0
- package/dist/components/flight-booking-shell-panels.js +39 -0
- package/dist/components/flight-booking-shell-types.d.ts +49 -0
- package/dist/components/flight-booking-shell-types.d.ts.map +1 -0
- package/dist/components/flight-booking-shell-types.js +18 -0
- package/dist/components/flight-booking-shell.d.ts +12 -0
- package/dist/components/flight-booking-shell.d.ts.map +1 -0
- package/dist/components/flight-booking-shell.js +210 -0
- package/dist/components/flight-contact-form.d.ts +16 -0
- package/dist/components/flight-contact-form.d.ts.map +1 -0
- package/dist/components/flight-contact-form.js +25 -0
- package/dist/components/flight-fare-upsell-step.d.ts +26 -0
- package/dist/components/flight-fare-upsell-step.d.ts.map +1 -0
- package/dist/components/flight-fare-upsell-step.js +169 -0
- package/dist/components/flight-filters-bar.d.ts +19 -0
- package/dist/components/flight-filters-bar.d.ts.map +1 -0
- package/dist/components/flight-filters-bar.js +98 -0
- package/dist/components/flight-itinerary.d.ts +28 -0
- package/dist/components/flight-itinerary.d.ts.map +1 -0
- package/dist/components/flight-itinerary.js +110 -0
- package/dist/components/flight-offer-detail.d.ts +21 -0
- package/dist/components/flight-offer-detail.d.ts.map +1 -0
- package/dist/components/flight-offer-detail.js +49 -0
- package/dist/components/flight-offer-row.d.ts +25 -0
- package/dist/components/flight-offer-row.d.ts.map +1 -0
- package/dist/components/flight-offer-row.js +78 -0
- package/dist/components/flight-order-confirmation.d.ts +13 -0
- package/dist/components/flight-order-confirmation.d.ts.map +1 -0
- package/dist/components/flight-order-confirmation.js +46 -0
- package/dist/components/flight-passenger-form.d.ts +49 -0
- package/dist/components/flight-passenger-form.d.ts.map +1 -0
- package/dist/components/flight-passenger-form.js +159 -0
- package/dist/components/flight-payment-selector.d.ts +13 -0
- package/dist/components/flight-payment-selector.d.ts.map +1 -0
- package/dist/components/flight-payment-selector.js +32 -0
- package/dist/components/flight-payment-step.d.ts +32 -0
- package/dist/components/flight-payment-step.d.ts.map +1 -0
- package/dist/components/flight-payment-step.js +81 -0
- package/dist/components/flight-search-form.d.ts +14 -0
- package/dist/components/flight-search-form.d.ts.map +1 -0
- package/dist/components/flight-search-form.js +58 -0
- package/dist/components/flight-seat-map.d.ts +32 -0
- package/dist/components/flight-seat-map.d.ts.map +1 -0
- package/dist/components/flight-seat-map.js +101 -0
- package/dist/components/flight-seats-step.d.ts +40 -0
- package/dist/components/flight-seats-step.d.ts.map +1 -0
- package/dist/components/flight-seats-step.js +214 -0
- package/dist/components/flight-services-step.d.ts +27 -0
- package/dist/components/flight-services-step.d.ts.map +1 -0
- package/dist/components/flight-services-step.js +123 -0
- package/dist/components/flights-page-panels.d.ts +27 -0
- package/dist/components/flights-page-panels.d.ts.map +1 -0
- package/dist/components/flights-page-panels.js +40 -0
- package/dist/components/flights-page-types.d.ts +39 -0
- package/dist/components/flights-page-types.d.ts.map +1 -0
- package/dist/components/flights-page-types.js +1 -0
- package/dist/components/flights-page-utils.d.ts +14 -0
- package/dist/components/flights-page-utils.d.ts.map +1 -0
- package/dist/components/flights-page-utils.js +79 -0
- package/dist/components/flights-page.d.ts +4 -0
- package/dist/components/flights-page.d.ts.map +1 -0
- package/dist/components/flights-page.js +209 -0
- package/dist/components/passenger-contact-picker.d.ts +16 -0
- package/dist/components/passenger-contact-picker.d.ts.map +1 -0
- package/dist/components/passenger-contact-picker.js +45 -0
- package/dist/components/pax-cabin-popover.d.ts +18 -0
- package/dist/components/pax-cabin-popover.d.ts.map +1 -0
- package/dist/components/pax-cabin-popover.js +35 -0
- package/dist/components/popular-routes.d.ts +42 -0
- package/dist/components/popular-routes.d.ts.map +1 -0
- package/dist/components/popular-routes.js +108 -0
- package/dist/hooks/index.d.ts +13 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +12 -0
- package/dist/hooks/use-aircraft.d.ts +17 -0
- package/dist/hooks/use-aircraft.d.ts.map +1 -0
- package/dist/hooks/use-aircraft.js +18 -0
- package/dist/hooks/use-airlines.d.ts +18 -0
- package/dist/hooks/use-airlines.d.ts.map +1 -0
- package/dist/hooks/use-airlines.js +18 -0
- package/dist/hooks/use-airport-search.d.ts +28 -0
- package/dist/hooks/use-airport-search.d.ts.map +1 -0
- package/dist/hooks/use-airport-search.js +23 -0
- package/dist/hooks/use-airports.d.ts +21 -0
- package/dist/hooks/use-airports.d.ts.map +1 -0
- package/dist/hooks/use-airports.js +17 -0
- package/dist/hooks/use-flight-ancillaries.d.ts +63 -0
- package/dist/hooks/use-flight-ancillaries.d.ts.map +1 -0
- package/dist/hooks/use-flight-ancillaries.js +24 -0
- package/dist/hooks/use-flight-book.d.ts +139 -0
- package/dist/hooks/use-flight-book.d.ts.map +1 -0
- package/dist/hooks/use-flight-book.js +24 -0
- package/dist/hooks/use-flight-offer.d.ts +106 -0
- package/dist/hooks/use-flight-offer.d.ts.map +1 -0
- package/dist/hooks/use-flight-offer.js +20 -0
- package/dist/hooks/use-flight-order.d.ts +286 -0
- package/dist/hooks/use-flight-order.d.ts.map +1 -0
- package/dist/hooks/use-flight-order.js +38 -0
- package/dist/hooks/use-flight-orders.d.ts +147 -0
- package/dist/hooks/use-flight-orders.d.ts.map +1 -0
- package/dist/hooks/use-flight-orders.js +31 -0
- package/dist/hooks/use-flight-search.d.ts +110 -0
- package/dist/hooks/use-flight-search.d.ts.map +1 -0
- package/dist/hooks/use-flight-search.js +18 -0
- package/dist/hooks/use-flight-seat-map.d.ts +49 -0
- package/dist/hooks/use-flight-seat-map.d.ts.map +1 -0
- package/dist/hooks/use-flight-seat-map.js +23 -0
- package/dist/hooks/use-saved-payment-methods.d.ts +23 -0
- package/dist/hooks/use-saved-payment-methods.d.ts.map +1 -0
- package/dist/hooks/use-saved-payment-methods.js +20 -0
- package/dist/i18n/en.d.ts +465 -0
- package/dist/i18n/en.d.ts.map +1 -0
- package/dist/i18n/en.js +520 -0
- package/dist/i18n/index.d.ts +5 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +3 -0
- package/dist/i18n/messages.d.ts +392 -0
- package/dist/i18n/messages.d.ts.map +1 -0
- package/dist/i18n/messages.js +1 -0
- package/dist/i18n/provider.d.ts +952 -0
- package/dist/i18n/provider.d.ts.map +1 -0
- package/dist/i18n/provider.js +44 -0
- package/dist/i18n/ro.d.ts +465 -0
- package/dist/i18n/ro.d.ts.map +1 -0
- package/dist/i18n/ro.js +520 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/provider.d.ts +2 -0
- package/dist/provider.d.ts.map +1 -0
- package/dist/provider.js +1 -0
- package/dist/query-keys.d.ts +42 -0
- package/dist/query-keys.d.ts.map +1 -0
- package/dist/query-keys.js +22 -0
- package/dist/query-options.d.ts +827 -0
- package/dist/query-options.d.ts.map +1 -0
- package/dist/query-options.js +58 -0
- package/dist/schemas.d.ts +1658 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +295 -0
- package/dist/ui.d.ts +31 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +28 -0
- package/package.json +148 -0
- package/src/styles.css +11 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAkEvB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQ3B,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAE5D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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yant-travel/flights`.
|
|
3
|
+
* Used to validate API responses at the network boundary.
|
|
4
|
+
*
|
|
5
|
+
* Drift policy: when the contract types change (additive only — see
|
|
6
|
+
* `packages/flights/src/contract/types.ts`), update these schemas to match.
|
|
7
|
+
*/
|
|
8
|
+
import { z } from "zod";
|
|
9
|
+
const cabinSchema = z.enum(["economy", "premium_economy", "business", "first"]);
|
|
10
|
+
const passengerTypeSchema = z.enum(["adult", "child", "infant", "senior", "youth"]);
|
|
11
|
+
const moneySchema = z.object({
|
|
12
|
+
amount: z.string(),
|
|
13
|
+
currency: z.string(),
|
|
14
|
+
});
|
|
15
|
+
const segmentEndpointSchema = z.object({
|
|
16
|
+
iataCode: z.string(),
|
|
17
|
+
terminal: z.string().optional(),
|
|
18
|
+
at: z.string(),
|
|
19
|
+
});
|
|
20
|
+
const flightSegmentSchema = z.object({
|
|
21
|
+
segmentId: z.string(),
|
|
22
|
+
carrierCode: z.string(),
|
|
23
|
+
flightNumber: z.string(),
|
|
24
|
+
operatingCarrierCode: z.string().optional(),
|
|
25
|
+
operatingFlightNumber: z.string().optional(),
|
|
26
|
+
departure: segmentEndpointSchema,
|
|
27
|
+
arrival: segmentEndpointSchema,
|
|
28
|
+
duration: z.string().optional(),
|
|
29
|
+
aircraft: z.string().optional(),
|
|
30
|
+
cabin: cabinSchema,
|
|
31
|
+
fareClass: z.string().optional(),
|
|
32
|
+
fareBasis: z.string().optional(),
|
|
33
|
+
status: z.string().optional(),
|
|
34
|
+
providerData: z.record(z.string(), z.unknown()).optional(),
|
|
35
|
+
});
|
|
36
|
+
const itinerarySchema = z.object({
|
|
37
|
+
segments: z.array(flightSegmentSchema),
|
|
38
|
+
duration: z.string().optional(),
|
|
39
|
+
});
|
|
40
|
+
const fareBreakdownSchema = z.object({
|
|
41
|
+
passengerType: passengerTypeSchema,
|
|
42
|
+
passengerCount: z.number(),
|
|
43
|
+
baseFare: moneySchema,
|
|
44
|
+
taxes: moneySchema,
|
|
45
|
+
fees: moneySchema.optional(),
|
|
46
|
+
total: moneySchema,
|
|
47
|
+
fareFamily: z.string().optional(),
|
|
48
|
+
});
|
|
49
|
+
const fareBundleInclusionsSchema = z.object({
|
|
50
|
+
cabinBag: z.object({ included: z.boolean(), weightKg: z.number().optional() }).optional(),
|
|
51
|
+
checkedBag: z
|
|
52
|
+
.object({
|
|
53
|
+
included: z.boolean(),
|
|
54
|
+
pieces: z.number().optional(),
|
|
55
|
+
weightKg: z.number().optional(),
|
|
56
|
+
})
|
|
57
|
+
.optional(),
|
|
58
|
+
seatSelection: z.enum(["none", "standard", "free"]).optional(),
|
|
59
|
+
priorityBoarding: z.boolean().optional(),
|
|
60
|
+
loungeAccess: z.boolean().optional(),
|
|
61
|
+
refundable: z.boolean().optional(),
|
|
62
|
+
changeable: z.boolean().optional(),
|
|
63
|
+
notes: z.array(z.string()).optional(),
|
|
64
|
+
});
|
|
65
|
+
export const fareBundleSchema = z.object({
|
|
66
|
+
id: z.string(),
|
|
67
|
+
label: z.string(),
|
|
68
|
+
tier: z.enum(["basic", "standard", "plus", "premium"]),
|
|
69
|
+
priceDelta: moneySchema,
|
|
70
|
+
recommended: z.boolean().optional(),
|
|
71
|
+
inclusions: fareBundleInclusionsSchema,
|
|
72
|
+
providerData: z.record(z.string(), z.unknown()).optional(),
|
|
73
|
+
});
|
|
74
|
+
export const flightOfferSchema = z.object({
|
|
75
|
+
offerId: z.string(),
|
|
76
|
+
source: z.string(),
|
|
77
|
+
itineraries: z.array(itinerarySchema),
|
|
78
|
+
fareBreakdowns: z.array(fareBreakdownSchema),
|
|
79
|
+
totalPrice: moneySchema,
|
|
80
|
+
validatingCarrier: z.string().optional(),
|
|
81
|
+
expiresAt: z.string().optional(),
|
|
82
|
+
lastTicketingDate: z.string().optional(),
|
|
83
|
+
instantTicketing: z.boolean().optional(),
|
|
84
|
+
fareBundles: z.array(fareBundleSchema).optional(),
|
|
85
|
+
providerData: z.record(z.string(), z.unknown()).optional(),
|
|
86
|
+
});
|
|
87
|
+
export const flightSearchPaginationMetaSchema = z.object({
|
|
88
|
+
total: z.number(),
|
|
89
|
+
cursor: z.string().optional(),
|
|
90
|
+
hasMore: z.boolean(),
|
|
91
|
+
});
|
|
92
|
+
export const flightSearchResponseSchema = z.object({
|
|
93
|
+
offers: z.array(flightOfferSchema),
|
|
94
|
+
pagination: flightSearchPaginationMetaSchema.optional(),
|
|
95
|
+
providerData: z.record(z.string(), z.unknown()).optional(),
|
|
96
|
+
});
|
|
97
|
+
export const flightPriceResponseSchema = z.object({
|
|
98
|
+
offer: flightOfferSchema,
|
|
99
|
+
valid: z.boolean(),
|
|
100
|
+
invalidReason: z.string().optional(),
|
|
101
|
+
});
|
|
102
|
+
// ── Booking ─────────────────────────────────────────────────────────────────
|
|
103
|
+
const flightTicketSchema = z.object({
|
|
104
|
+
ticketNumber: z.string(),
|
|
105
|
+
passengerId: z.string(),
|
|
106
|
+
segmentIds: z.array(z.string()),
|
|
107
|
+
status: z.string().optional(),
|
|
108
|
+
});
|
|
109
|
+
const flightOrderStatusSchema = z.enum(["pending", "confirmed", "ticketed", "cancelled", "failed"]);
|
|
110
|
+
export const flightOrderSchema = z.object({
|
|
111
|
+
orderId: z.string(),
|
|
112
|
+
pnr: z.string().optional(),
|
|
113
|
+
status: flightOrderStatusSchema,
|
|
114
|
+
offer: flightOfferSchema,
|
|
115
|
+
passengers: z.array(z.object({
|
|
116
|
+
passengerId: z.string(),
|
|
117
|
+
type: passengerTypeSchema,
|
|
118
|
+
firstName: z.string(),
|
|
119
|
+
middleName: z.string().optional(),
|
|
120
|
+
lastName: z.string(),
|
|
121
|
+
dateOfBirth: z.string(),
|
|
122
|
+
gender: z.enum(["M", "F", "X"]).optional(),
|
|
123
|
+
email: z.string().optional(),
|
|
124
|
+
phone: z.string().optional(),
|
|
125
|
+
documents: z
|
|
126
|
+
.array(z.object({
|
|
127
|
+
type: z.enum(["passport", "national_id", "visa"]),
|
|
128
|
+
number: z.string(),
|
|
129
|
+
countryOfIssue: z.string(),
|
|
130
|
+
countryOfNationality: z.string().optional(),
|
|
131
|
+
expiryDate: z.string().optional(),
|
|
132
|
+
}))
|
|
133
|
+
.optional(),
|
|
134
|
+
})),
|
|
135
|
+
contact: z.object({ email: z.string().optional(), phone: z.string().optional() }).optional(),
|
|
136
|
+
tickets: z.array(flightTicketSchema).optional(),
|
|
137
|
+
totalPrice: moneySchema,
|
|
138
|
+
paymentDeadline: z.string().optional(),
|
|
139
|
+
createdAt: z.string(),
|
|
140
|
+
updatedAt: z.string().optional(),
|
|
141
|
+
providerData: z.record(z.string(), z.unknown()).optional(),
|
|
142
|
+
});
|
|
143
|
+
export const flightBookResponseSchema = z.object({
|
|
144
|
+
order: flightOrderSchema,
|
|
145
|
+
});
|
|
146
|
+
export const flightGetOrderResponseSchema = z.object({
|
|
147
|
+
order: flightOrderSchema,
|
|
148
|
+
});
|
|
149
|
+
export const flightCancelResponseSchema = z.object({
|
|
150
|
+
order: flightOrderSchema,
|
|
151
|
+
refundedAmount: moneySchema.optional(),
|
|
152
|
+
});
|
|
153
|
+
export const flightOrdersListResponseSchema = z.object({
|
|
154
|
+
orders: z.array(flightOrderSchema),
|
|
155
|
+
pagination: z.object({
|
|
156
|
+
total: z.number(),
|
|
157
|
+
hasMore: z.boolean(),
|
|
158
|
+
cursor: z.string().optional(),
|
|
159
|
+
}),
|
|
160
|
+
});
|
|
161
|
+
// ── Ancillaries ─────────────────────────────────────────────────────────────
|
|
162
|
+
const baggageCategorySchema = z.enum(["checked", "cabin", "personal_item", "sports", "oversized"]);
|
|
163
|
+
const assistanceCategorySchema = z.enum([
|
|
164
|
+
"wheelchair",
|
|
165
|
+
"visual",
|
|
166
|
+
"hearing",
|
|
167
|
+
"cognitive",
|
|
168
|
+
"medical",
|
|
169
|
+
"other",
|
|
170
|
+
]);
|
|
171
|
+
const ancillaryBaggageOptionSchema = z.object({
|
|
172
|
+
id: z.string(),
|
|
173
|
+
label: z.string(),
|
|
174
|
+
category: baggageCategorySchema,
|
|
175
|
+
weightKg: z.number().optional(),
|
|
176
|
+
dimensions: z
|
|
177
|
+
.object({
|
|
178
|
+
lengthCm: z.number().optional(),
|
|
179
|
+
widthCm: z.number().optional(),
|
|
180
|
+
heightCm: z.number().optional(),
|
|
181
|
+
})
|
|
182
|
+
.optional(),
|
|
183
|
+
price: moneySchema,
|
|
184
|
+
recommended: z.boolean().optional(),
|
|
185
|
+
providerData: z.record(z.string(), z.unknown()).optional(),
|
|
186
|
+
});
|
|
187
|
+
const ancillaryAssistanceOptionSchema = z.object({
|
|
188
|
+
id: z.string(),
|
|
189
|
+
label: z.string(),
|
|
190
|
+
category: assistanceCategorySchema,
|
|
191
|
+
price: moneySchema.optional(),
|
|
192
|
+
notes: z.string().optional(),
|
|
193
|
+
});
|
|
194
|
+
const ancillaryExtraOptionSchema = z.object({
|
|
195
|
+
id: z.string(),
|
|
196
|
+
label: z.string(),
|
|
197
|
+
category: z.string(),
|
|
198
|
+
price: moneySchema,
|
|
199
|
+
pricingScope: z.enum(["per_passenger", "per_booking"]).optional(),
|
|
200
|
+
});
|
|
201
|
+
export const ancillaryCatalogSchema = z.object({
|
|
202
|
+
baggage: z.array(ancillaryBaggageOptionSchema),
|
|
203
|
+
assistance: z.array(ancillaryAssistanceOptionSchema),
|
|
204
|
+
extras: z.array(ancillaryExtraOptionSchema),
|
|
205
|
+
});
|
|
206
|
+
export const ancillaryResponseSchema = z.object({
|
|
207
|
+
catalog: ancillaryCatalogSchema,
|
|
208
|
+
validUntil: z.string().optional(),
|
|
209
|
+
});
|
|
210
|
+
// ── Seat maps ───────────────────────────────────────────────────────────────
|
|
211
|
+
const seatStatusSchema = z.enum(["available", "blocked", "unavailable", "selected"]);
|
|
212
|
+
const seatCategorySchema = z.enum([
|
|
213
|
+
"standard",
|
|
214
|
+
"preferred",
|
|
215
|
+
"extra_legroom",
|
|
216
|
+
"exit_row",
|
|
217
|
+
"premium",
|
|
218
|
+
"bulkhead",
|
|
219
|
+
]);
|
|
220
|
+
const seatSchema = z.object({
|
|
221
|
+
seatNumber: z.string(),
|
|
222
|
+
row: z.number(),
|
|
223
|
+
column: z.string(),
|
|
224
|
+
status: seatStatusSchema,
|
|
225
|
+
category: seatCategorySchema,
|
|
226
|
+
price: moneySchema.optional(),
|
|
227
|
+
notes: z.string().optional(),
|
|
228
|
+
window: z.boolean().optional(),
|
|
229
|
+
aisle: z.boolean().optional(),
|
|
230
|
+
providerData: z.record(z.string(), z.unknown()).optional(),
|
|
231
|
+
});
|
|
232
|
+
const seatRowSchema = z.object({
|
|
233
|
+
row: z.number(),
|
|
234
|
+
seats: z.array(seatSchema),
|
|
235
|
+
});
|
|
236
|
+
export const seatMapSchema = z.object({
|
|
237
|
+
segmentId: z.string(),
|
|
238
|
+
aircraft: z.string().optional(),
|
|
239
|
+
cabin: cabinSchema,
|
|
240
|
+
columnLayout: z.array(z.string().nullable()),
|
|
241
|
+
rows: z.array(seatRowSchema),
|
|
242
|
+
providerData: z.record(z.string(), z.unknown()).optional(),
|
|
243
|
+
});
|
|
244
|
+
export const seatMapResponseSchema = z.object({
|
|
245
|
+
seatMap: seatMapSchema,
|
|
246
|
+
validUntil: z.string().optional(),
|
|
247
|
+
});
|
|
248
|
+
// ── Saved payment methods (demo / template-side) ─────────────────────────────
|
|
249
|
+
export const savedPaymentMethodSchema = z.object({
|
|
250
|
+
id: z.string(),
|
|
251
|
+
/** Present on CRM-backed responses; ignored client-side. */
|
|
252
|
+
personId: z.string().optional(),
|
|
253
|
+
brand: z.enum(["visa", "mastercard", "amex", "revolut", "bank_transfer"]),
|
|
254
|
+
/** Null for non-card methods (bank_transfer). */
|
|
255
|
+
last4: z.string().nullable(),
|
|
256
|
+
holderName: z.string().nullable().optional(),
|
|
257
|
+
/** Null for non-card methods. */
|
|
258
|
+
expMonth: z.number().nullable().optional(),
|
|
259
|
+
expYear: z.number().nullable().optional(),
|
|
260
|
+
processorToken: z.string(),
|
|
261
|
+
isDefault: z.boolean(),
|
|
262
|
+
createdAt: z.string(),
|
|
263
|
+
});
|
|
264
|
+
export const savedPaymentMethodListResponseSchema = z.object({
|
|
265
|
+
data: z.array(savedPaymentMethodSchema),
|
|
266
|
+
});
|
|
267
|
+
// ── Reference data ──────────────────────────────────────────────────────────
|
|
268
|
+
export const airlineSchema = z.object({
|
|
269
|
+
iataCode: z.string(),
|
|
270
|
+
icaoCode: z.string().nullable().optional(),
|
|
271
|
+
name: z.string(),
|
|
272
|
+
country: z.string().nullable().optional(),
|
|
273
|
+
logoUrl: z.string().nullable().optional(),
|
|
274
|
+
alliance: z.string().nullable().optional(),
|
|
275
|
+
});
|
|
276
|
+
export const airportSchema = z.object({
|
|
277
|
+
iataCode: z.string(),
|
|
278
|
+
icaoCode: z.string().nullable().optional(),
|
|
279
|
+
name: z.string(),
|
|
280
|
+
city: z.string(),
|
|
281
|
+
country: z.string(),
|
|
282
|
+
timezone: z.string().nullable().optional(),
|
|
283
|
+
latitude: z.number().nullable().optional(),
|
|
284
|
+
longitude: z.number().nullable().optional(),
|
|
285
|
+
});
|
|
286
|
+
export const aircraftSchema = z.object({
|
|
287
|
+
iataCode: z.string(),
|
|
288
|
+
icaoCode: z.string().nullable().optional(),
|
|
289
|
+
name: z.string(),
|
|
290
|
+
manufacturer: z.string().nullable().optional(),
|
|
291
|
+
typicalSeats: z.number().nullable().optional(),
|
|
292
|
+
});
|
|
293
|
+
export const airlineListResponseSchema = z.object({ data: z.array(airlineSchema) });
|
|
294
|
+
export const airportListResponseSchema = z.object({ data: z.array(airportSchema) });
|
|
295
|
+
export const aircraftListResponseSchema = z.object({ data: z.array(aircraftSchema) });
|
package/dist/ui.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export { AirlineLogo, type AirlineLogoProps } from "./components/airline-logo.js";
|
|
2
|
+
export { AirportCombobox, type AirportComboboxProps } from "./components/airport-combobox.js";
|
|
3
|
+
export { BillingOrgPicker, type BillingOrgPickerProps, BillingPersonPicker, type BillingPersonPickerProps, } from "./components/billing-pickers.js";
|
|
4
|
+
export { FlightBaggageStep, type FlightBaggageStepProps, } from "./components/flight-baggage-step.js";
|
|
5
|
+
export { type BillingEligiblePassenger, type BillingMode, type BillingValue, emptyBillingValue, FlightBillingStep, type FlightBillingStepProps, validateBilling, } from "./components/flight-billing-step.js";
|
|
6
|
+
export { FlightBookingJourney, type FlightBookingJourneyProps, } from "./components/flight-booking-journey.js";
|
|
7
|
+
export { FlightBookingLedger, type FlightBookingLedgerProps, type FlightItinerarySelection, type LedgerLineItem, type LedgerSection, } from "./components/flight-booking-ledger.js";
|
|
8
|
+
export { FlightBookingPage, type FlightBookingPageProps, } from "./components/flight-booking-page.js";
|
|
9
|
+
export { type FlightBookingAncillaries, type FlightBookingSavedPaymentMethods, type FlightBookingSeatMaps, FlightBookingShell, type FlightBookingShellProps, } from "./components/flight-booking-shell.js";
|
|
10
|
+
export { FlightContactForm, type FlightContactFormProps, type FlightContactValue, validateContact, } from "./components/flight-contact-form.js";
|
|
11
|
+
export { FlightFareUpsellStep, type FlightFareUpsellStepProps, } from "./components/flight-fare-upsell-step.js";
|
|
12
|
+
export { EMPTY_FLIGHT_FILTERS, FlightFiltersBar, type FlightFiltersBarProps, type FlightFiltersValue, } from "./components/flight-filters-bar.js";
|
|
13
|
+
export { FlightItinerary, type FlightItineraryProps, } from "./components/flight-itinerary.js";
|
|
14
|
+
export { FlightOfferDetail, type FlightOfferDetailProps, } from "./components/flight-offer-detail.js";
|
|
15
|
+
export { FlightOfferRow, type FlightOfferRowProps } from "./components/flight-offer-row.js";
|
|
16
|
+
export { FlightOrderConfirmation, type FlightOrderConfirmationProps, } from "./components/flight-order-confirmation.js";
|
|
17
|
+
export { FlightPassengerForm, type FlightPassengerFormProps, type PassengerPrefill, validatePassengers, } from "./components/flight-passenger-form.js";
|
|
18
|
+
export { FlightPaymentSelector, type FlightPaymentSelectorProps, } from "./components/flight-payment-selector.js";
|
|
19
|
+
export { FlightPaymentStep, type FlightPaymentStepProps, type PaymentStepCapabilities, type SavedPaymentAccount,
|
|
20
|
+
/** Back-compat alias for `SavedPaymentAccount`. */
|
|
21
|
+
type SavedPaymentMethod, } from "./components/flight-payment-step.js";
|
|
22
|
+
export { FlightSearchForm, type FlightSearchFormProps, type TripType, } from "./components/flight-search-form.js";
|
|
23
|
+
export { FlightSeatMap, type FlightSeatMapProps, type SeatPickMarker, } from "./components/flight-seat-map.js";
|
|
24
|
+
export { type FlightSeatMapSlot, FlightSeatsStep, type FlightSeatsStepProps, } from "./components/flight-seats-step.js";
|
|
25
|
+
export { FlightServicesStep, type FlightServicesStepProps, } from "./components/flight-services-step.js";
|
|
26
|
+
export { type FlightBookingNavigationTarget, FlightsPage, type FlightsPageProps, type FlightsPageSearchChangeOptions, type FlightsPageSearchParams, } from "./components/flights-page.js";
|
|
27
|
+
export { PassengerContactPicker, type PassengerContactPickerProps, } from "./components/passenger-contact-picker.js";
|
|
28
|
+
export { PaxCabinPopover, type PaxCabinPopoverProps } from "./components/pax-cabin-popover.js";
|
|
29
|
+
export { DEFAULT_POPULAR_ROUTES, type PopularRoute, PopularRoutes, type PopularRoutesProps, } from "./components/popular-routes.js";
|
|
30
|
+
export { type FlightsUiMessageOverrides, type FlightsUiMessages, FlightsUiMessagesProvider, flightsUiEn, flightsUiMessageDefinitions, flightsUiRo, getFlightsUiI18n, resolveFlightsUiMessages, useFlightsUiI18n, useFlightsUiI18nOrDefault, useFlightsUiMessages, useFlightsUiMessagesOrDefault, } from "./i18n/index.js";
|
|
31
|
+
//# sourceMappingURL=ui.d.ts.map
|
package/dist/ui.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AACjF,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,kCAAkC,CAAA;AAC7F,OAAO,EACL,gBAAgB,EAChB,KA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AAW,EACX,gBAAgB,EAChB,wBAAwB,EACxB,gBAAgB,EAChB,yBAAyB,EACzB,oBAAoB,EACpB,6BAA6B,GAC9B,MAAM,iBAAiB,CAAA"}
|
package/dist/ui.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export { AirlineLogo } from "./components/airline-logo.js";
|
|
2
|
+
export { AirportCombobox } from "./components/airport-combobox.js";
|
|
3
|
+
export { BillingOrgPicker, BillingPersonPicker, } from "./components/billing-pickers.js";
|
|
4
|
+
export { FlightBaggageStep, } from "./components/flight-baggage-step.js";
|
|
5
|
+
export { emptyBillingValue, FlightBillingStep, validateBilling, } from "./components/flight-billing-step.js";
|
|
6
|
+
export { FlightBookingJourney, } from "./components/flight-booking-journey.js";
|
|
7
|
+
export { FlightBookingLedger, } from "./components/flight-booking-ledger.js";
|
|
8
|
+
export { FlightBookingPage, } from "./components/flight-booking-page.js";
|
|
9
|
+
export { FlightBookingShell, } from "./components/flight-booking-shell.js";
|
|
10
|
+
export { FlightContactForm, validateContact, } from "./components/flight-contact-form.js";
|
|
11
|
+
export { FlightFareUpsellStep, } from "./components/flight-fare-upsell-step.js";
|
|
12
|
+
export { EMPTY_FLIGHT_FILTERS, FlightFiltersBar, } from "./components/flight-filters-bar.js";
|
|
13
|
+
export { FlightItinerary, } from "./components/flight-itinerary.js";
|
|
14
|
+
export { FlightOfferDetail, } from "./components/flight-offer-detail.js";
|
|
15
|
+
export { FlightOfferRow } from "./components/flight-offer-row.js";
|
|
16
|
+
export { FlightOrderConfirmation, } from "./components/flight-order-confirmation.js";
|
|
17
|
+
export { FlightPassengerForm, validatePassengers, } from "./components/flight-passenger-form.js";
|
|
18
|
+
export { FlightPaymentSelector, } from "./components/flight-payment-selector.js";
|
|
19
|
+
export { FlightPaymentStep, } from "./components/flight-payment-step.js";
|
|
20
|
+
export { FlightSearchForm, } from "./components/flight-search-form.js";
|
|
21
|
+
export { FlightSeatMap, } from "./components/flight-seat-map.js";
|
|
22
|
+
export { FlightSeatsStep, } from "./components/flight-seats-step.js";
|
|
23
|
+
export { FlightServicesStep, } from "./components/flight-services-step.js";
|
|
24
|
+
export { FlightsPage, } from "./components/flights-page.js";
|
|
25
|
+
export { PassengerContactPicker, } from "./components/passenger-contact-picker.js";
|
|
26
|
+
export { PaxCabinPopover } from "./components/pax-cabin-popover.js";
|
|
27
|
+
export { DEFAULT_POPULAR_ROUTES, PopularRoutes, } from "./components/popular-routes.js";
|
|
28
|
+
export { FlightsUiMessagesProvider, flightsUiEn, flightsUiMessageDefinitions, flightsUiRo, getFlightsUiI18n, resolveFlightsUiMessages, useFlightsUiI18n, useFlightsUiI18nOrDefault, useFlightsUiMessages, useFlightsUiMessagesOrDefault, } from "./i18n/index.js";
|
package/package.json
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@voyant-travel/flights-react",
|
|
3
|
+
"version": "0.119.2",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/voyant-travel/voyant.git",
|
|
8
|
+
"directory": "packages/flights-react"
|
|
9
|
+
},
|
|
10
|
+
"type": "module",
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"import": "./dist/index.js",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./provider": {
|
|
19
|
+
"types": "./dist/provider.d.ts",
|
|
20
|
+
"import": "./dist/provider.js",
|
|
21
|
+
"default": "./dist/provider.js"
|
|
22
|
+
},
|
|
23
|
+
"./hooks": {
|
|
24
|
+
"types": "./dist/hooks/index.d.ts",
|
|
25
|
+
"import": "./dist/hooks/index.js",
|
|
26
|
+
"default": "./dist/hooks/index.js"
|
|
27
|
+
},
|
|
28
|
+
"./client": {
|
|
29
|
+
"types": "./dist/client.d.ts",
|
|
30
|
+
"import": "./dist/client.js",
|
|
31
|
+
"default": "./dist/client.js"
|
|
32
|
+
},
|
|
33
|
+
"./query-keys": {
|
|
34
|
+
"types": "./dist/query-keys.d.ts",
|
|
35
|
+
"import": "./dist/query-keys.js",
|
|
36
|
+
"default": "./dist/query-keys.js"
|
|
37
|
+
},
|
|
38
|
+
"./ui": {
|
|
39
|
+
"types": "./dist/ui.d.ts",
|
|
40
|
+
"import": "./dist/ui.js",
|
|
41
|
+
"default": "./dist/ui.js"
|
|
42
|
+
},
|
|
43
|
+
"./styles.css": {
|
|
44
|
+
"default": "./src/styles.css"
|
|
45
|
+
},
|
|
46
|
+
"./i18n": {
|
|
47
|
+
"types": "./dist/i18n/index.d.ts",
|
|
48
|
+
"import": "./dist/i18n/index.js",
|
|
49
|
+
"default": "./dist/i18n/index.js"
|
|
50
|
+
},
|
|
51
|
+
"./i18n/en": {
|
|
52
|
+
"types": "./dist/i18n/en.d.ts",
|
|
53
|
+
"import": "./dist/i18n/en.js",
|
|
54
|
+
"default": "./dist/i18n/en.js"
|
|
55
|
+
},
|
|
56
|
+
"./i18n/ro": {
|
|
57
|
+
"types": "./dist/i18n/ro.d.ts",
|
|
58
|
+
"import": "./dist/i18n/ro.js",
|
|
59
|
+
"default": "./dist/i18n/ro.js"
|
|
60
|
+
},
|
|
61
|
+
"./admin": {
|
|
62
|
+
"types": "./dist/admin/index.d.ts",
|
|
63
|
+
"import": "./dist/admin/index.js",
|
|
64
|
+
"default": "./dist/admin/index.js"
|
|
65
|
+
},
|
|
66
|
+
"./components/*": {
|
|
67
|
+
"types": "./dist/components/*.d.ts",
|
|
68
|
+
"import": "./dist/components/*.js",
|
|
69
|
+
"default": "./dist/components/*.js"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"peerDependencies": {
|
|
73
|
+
"@tanstack/react-query": "^5.0.0",
|
|
74
|
+
"@tanstack/react-table": "^8.0.0",
|
|
75
|
+
"react": "^19.0.0",
|
|
76
|
+
"react-dom": "^19.0.0",
|
|
77
|
+
"zod": "^4.0.0",
|
|
78
|
+
"@voyant-travel/admin": "^0.111.0",
|
|
79
|
+
"@voyant-travel/finance": "^0.119.5",
|
|
80
|
+
"@voyant-travel/relationships-react": "^0.119.2",
|
|
81
|
+
"@voyant-travel/bookings-react": "^0.119.3",
|
|
82
|
+
"@voyant-travel/finance-react": "^0.119.5",
|
|
83
|
+
"@voyant-travel/flights": "^0.119.2",
|
|
84
|
+
"@voyant-travel/ui": "^0.106.1"
|
|
85
|
+
},
|
|
86
|
+
"peerDependenciesMeta": {
|
|
87
|
+
"@tanstack/react-table": {
|
|
88
|
+
"optional": true
|
|
89
|
+
},
|
|
90
|
+
"@voyant-travel/admin": {
|
|
91
|
+
"optional": true
|
|
92
|
+
},
|
|
93
|
+
"@voyant-travel/bookings-react": {
|
|
94
|
+
"optional": true
|
|
95
|
+
},
|
|
96
|
+
"@voyant-travel/finance-react": {
|
|
97
|
+
"optional": true
|
|
98
|
+
},
|
|
99
|
+
"@voyant-travel/relationships-react": {
|
|
100
|
+
"optional": true
|
|
101
|
+
},
|
|
102
|
+
"@voyant-travel/ui": {
|
|
103
|
+
"optional": true
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"dependencies": {
|
|
107
|
+
"@voyant-travel/i18n": "^0.106.1",
|
|
108
|
+
"@voyant-travel/react": "^0.104.1"
|
|
109
|
+
},
|
|
110
|
+
"devDependencies": {
|
|
111
|
+
"@tanstack/react-query": "^5.100.11",
|
|
112
|
+
"@tanstack/react-table": "^8.21.3",
|
|
113
|
+
"@types/react": "^19.2.14",
|
|
114
|
+
"@types/react-dom": "^19.2.3",
|
|
115
|
+
"lucide-react": "^0.475.0",
|
|
116
|
+
"react": "^19.2.4",
|
|
117
|
+
"react-dom": "^19.2.4",
|
|
118
|
+
"typescript": "^6.0.2",
|
|
119
|
+
"vitest": "^4.1.2",
|
|
120
|
+
"zod": "^4.3.6",
|
|
121
|
+
"@voyant-travel/bookings-react": "^0.119.3",
|
|
122
|
+
"@voyant-travel/admin": "^0.111.0",
|
|
123
|
+
"@voyant-travel/relationships-react": "^0.119.2",
|
|
124
|
+
"@voyant-travel/i18n": "^0.106.1",
|
|
125
|
+
"@voyant-travel/finance": "^0.119.5",
|
|
126
|
+
"@voyant-travel/finance-react": "^0.119.5",
|
|
127
|
+
"@voyant-travel/react": "^0.104.1",
|
|
128
|
+
"@voyant-travel/flights": "^0.119.2",
|
|
129
|
+
"@voyant-travel/voyant-typescript-config": "^0.1.0",
|
|
130
|
+
"@voyant-travel/ui": "^0.106.1"
|
|
131
|
+
},
|
|
132
|
+
"files": [
|
|
133
|
+
"dist",
|
|
134
|
+
"src/styles.css"
|
|
135
|
+
],
|
|
136
|
+
"publishConfig": {
|
|
137
|
+
"access": "public"
|
|
138
|
+
},
|
|
139
|
+
"scripts": {
|
|
140
|
+
"build": "tsc -p tsconfig.build.json",
|
|
141
|
+
"clean": "rm -rf dist tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo",
|
|
142
|
+
"typecheck": "tsc --noEmit",
|
|
143
|
+
"lint": "biome check src/",
|
|
144
|
+
"test": "vitest run --passWithNoTests"
|
|
145
|
+
},
|
|
146
|
+
"main": "./dist/index.js",
|
|
147
|
+
"types": "./dist/index.d.ts"
|
|
148
|
+
}
|
package/src/styles.css
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* Tailwind v4 source-detection helper.
|
|
2
|
+
*
|
|
3
|
+
* Templates that consume this package should `@import` this CSS so Tailwind
|
|
4
|
+
* scans these component files for utility classes:
|
|
5
|
+
*
|
|
6
|
+
* @import "@voyant-travel/flights-react/styles.css";
|
|
7
|
+
*
|
|
8
|
+
* Without it, classes that only appear inside this package (e.g. flight booking
|
|
9
|
+
* and seat map utilities) won't be compiled into the final bundle.
|
|
10
|
+
*/
|
|
11
|
+
@source "./components/**/*.{ts,tsx}";
|