@gojinko/cli 2.23.0 → 2.25.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/README.md +46 -5
- package/SKILL.md +19 -5
- package/dist/commands/checkout.d.ts.map +1 -1
- package/dist/commands/checkout.js +5 -0
- package/dist/commands/checkout.js.map +1 -1
- package/dist/commands/flight-search.d.ts +106 -0
- package/dist/commands/flight-search.d.ts.map +1 -1
- package/dist/commands/flight-search.js +451 -45
- package/dist/commands/flight-search.js.map +1 -1
- package/dist/commands/get-booking.d.ts +26 -0
- package/dist/commands/get-booking.d.ts.map +1 -1
- package/dist/commands/get-booking.js +55 -3
- package/dist/commands/get-booking.js.map +1 -1
- package/dist/commands/ground-search.d.ts +2 -1
- package/dist/commands/ground-search.d.ts.map +1 -1
- package/dist/commands/ground-search.js +14 -25
- package/dist/commands/ground-search.js.map +1 -1
- package/dist/commands/hotel-cancel.js +1 -1
- package/dist/commands/hotel-cancel.js.map +1 -1
- package/dist/commands/schema.d.ts.map +1 -1
- package/dist/commands/schema.js +88 -24
- package/dist/commands/schema.js.map +1 -1
- package/dist/commands/shared.d.ts.map +1 -1
- package/dist/commands/shared.js +5 -2
- package/dist/commands/shared.js.map +1 -1
- package/dist/commands/trip-status.d.ts.map +1 -1
- package/dist/commands/trip-status.js +2 -0
- package/dist/commands/trip-status.js.map +1 -1
- package/dist/commands/trip.d.ts.map +1 -1
- package/dist/commands/trip.js +2 -0
- package/dist/commands/trip.js.map +1 -1
- package/dist/output/formatter.d.ts +19 -7
- package/dist/output/formatter.d.ts.map +1 -1
- package/dist/output/formatter.js +22 -8
- package/dist/output/formatter.js.map +1 -1
- package/dist/output/price-change.d.ts +41 -0
- package/dist/output/price-change.d.ts.map +1 -0
- package/dist/output/price-change.js +80 -0
- package/dist/output/price-change.js.map +1 -0
- package/dist/output/remedies.d.ts +30 -0
- package/dist/output/remedies.d.ts.map +1 -0
- package/dist/output/remedies.js +45 -0
- package/dist/output/remedies.js.map +1 -0
- package/package.json +2 -2
|
@@ -1,21 +1,385 @@
|
|
|
1
|
-
import
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import { withClient, output, resolveDeprecatedFlag, userIntentOption, exitWithError, UsageError, } from './shared.js';
|
|
3
|
+
const CABIN_CLASSES = ['economy', 'premium_economy', 'business', 'first'];
|
|
4
|
+
const TRIP_TYPES = ['oneway', 'roundtrip'];
|
|
5
|
+
const LOCATION_TYPES = ['city', 'airport'];
|
|
6
|
+
/** Local time-of-day bound, 24-hour `HH:MM` — the pattern the contract puts on TimeRange. */
|
|
7
|
+
const TIME_OF_DAY = /^([01]\d|2[0-3]):[0-5]\d$/;
|
|
8
|
+
/** Coerce a commander string to a non-negative integer, or fail with the flag name. */
|
|
9
|
+
function toInt(value, flag) {
|
|
10
|
+
if (value === undefined)
|
|
11
|
+
return undefined;
|
|
12
|
+
const n = Number(value);
|
|
13
|
+
if (!Number.isInteger(n)) {
|
|
14
|
+
throw new UsageError(`${flag} must be a whole number, got "${value}".`);
|
|
15
|
+
}
|
|
16
|
+
return n;
|
|
17
|
+
}
|
|
18
|
+
/** Coerce a commander string to a number, or fail with the flag name. */
|
|
19
|
+
function toNumber(value, flag) {
|
|
20
|
+
if (value === undefined)
|
|
21
|
+
return undefined;
|
|
22
|
+
const n = Number(value);
|
|
23
|
+
if (!Number.isFinite(n)) {
|
|
24
|
+
throw new UsageError(`${flag} must be a number, got "${value}".`);
|
|
25
|
+
}
|
|
26
|
+
return n;
|
|
27
|
+
}
|
|
28
|
+
/** Narrow a commander string onto a contract enum, or fail listing the values. */
|
|
29
|
+
function toEnum(value, allowed, flag) {
|
|
30
|
+
if (value === undefined)
|
|
31
|
+
return undefined;
|
|
32
|
+
if (!allowed.includes(value)) {
|
|
33
|
+
throw new UsageError(`${flag} must be one of ${allowed.join(', ')}, got "${value}".`);
|
|
34
|
+
}
|
|
35
|
+
return value;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Parse a `HH:MM-HH:MM` window into the contract's TimeRange object. Either
|
|
39
|
+
* bound may be omitted — `08:00-` is "at or after 08:00", `-12:00` is "at or
|
|
40
|
+
* before 12:00" — which is exactly what TimeRange means when one key is absent.
|
|
41
|
+
* Exported for tests.
|
|
42
|
+
*/
|
|
43
|
+
export function parseTimeRange(value, flag) {
|
|
44
|
+
if (value === undefined)
|
|
45
|
+
return undefined;
|
|
46
|
+
const separator = value.indexOf('-');
|
|
47
|
+
if (separator === -1) {
|
|
48
|
+
throw new UsageError(`${flag} must be a HH:MM-HH:MM window (either bound may be omitted, e.g. 08:00- or -12:00), got "${value}".`);
|
|
49
|
+
}
|
|
50
|
+
const earliest = value.slice(0, separator).trim();
|
|
51
|
+
const latest = value.slice(separator + 1).trim();
|
|
52
|
+
if (!earliest && !latest) {
|
|
53
|
+
throw new UsageError(`${flag} needs at least one bound, e.g. 08:00-12:00, 08:00- or -12:00.`);
|
|
54
|
+
}
|
|
55
|
+
for (const [bound, label] of [
|
|
56
|
+
[earliest, 'earliest'],
|
|
57
|
+
[latest, 'latest'],
|
|
58
|
+
]) {
|
|
59
|
+
if (bound && !TIME_OF_DAY.test(bound)) {
|
|
60
|
+
throw new UsageError(`${flag} ${label} bound must be 24-hour HH:MM, got "${bound}".`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
const range = {};
|
|
64
|
+
if (earliest)
|
|
65
|
+
range.earliest = earliest;
|
|
66
|
+
if (latest)
|
|
67
|
+
range.latest = latest;
|
|
68
|
+
return range;
|
|
69
|
+
}
|
|
70
|
+
/** Uppercase a list of codes, dropping it when empty (an empty list is not a filter). */
|
|
71
|
+
function codes(list) {
|
|
72
|
+
if (!list || list.length === 0)
|
|
73
|
+
return undefined;
|
|
74
|
+
return list.map((code) => code.toUpperCase());
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Map canonical CLI options onto the jinko-api flight_search search-mode body.
|
|
78
|
+
* Pure — exported for tests. Only fields the caller actually set are attached:
|
|
79
|
+
* the platform reads an absent field as "not asked for", and an empty list or
|
|
80
|
+
* a `false` flag would mean the same thing while cluttering the request.
|
|
81
|
+
*/
|
|
82
|
+
export function buildFlightSearchBody(o) {
|
|
83
|
+
const returnDate = o.returnDate;
|
|
84
|
+
const body = {
|
|
85
|
+
origin: o.origin,
|
|
86
|
+
destination: o.destination,
|
|
87
|
+
departure_date: o.departureDate,
|
|
88
|
+
trip_type: toEnum(o.tripType, TRIP_TYPES, '--trip-type') ?? (returnDate ? 'roundtrip' : 'oneway'),
|
|
89
|
+
cabin_class: toEnum(o.cabinClass, CABIN_CLASSES, '--cabin-class') ?? 'economy',
|
|
90
|
+
adults: toInt(o.adults, '--adults') ?? 1,
|
|
91
|
+
};
|
|
92
|
+
// `direct_only` is deprecated in favour of `max_stops: 0`, but it is still
|
|
93
|
+
// accepted and still the released spelling of this CLI's flag. Attach it
|
|
94
|
+
// ONLY when the user passed the flag: the platform rejects any `direct_only`
|
|
95
|
+
// beside a non-zero `max_stops`, so a defaulted `false` would break
|
|
96
|
+
// `--max-stops 1` and `--max-stops 2`.
|
|
97
|
+
if (o.directOnly)
|
|
98
|
+
body.direct_only = true;
|
|
99
|
+
// Route
|
|
100
|
+
if (returnDate)
|
|
101
|
+
body.return_date = returnDate;
|
|
102
|
+
const originType = toEnum(o.originType, LOCATION_TYPES, '--origin-type');
|
|
103
|
+
if (originType)
|
|
104
|
+
body.origin_type = originType;
|
|
105
|
+
const destinationType = toEnum(o.destinationType, LOCATION_TYPES, '--destination-type');
|
|
106
|
+
if (destinationType)
|
|
107
|
+
body.destination_type = destinationType;
|
|
108
|
+
// Passengers
|
|
109
|
+
const children = toInt(o.children, '--children');
|
|
110
|
+
if (children !== undefined)
|
|
111
|
+
body.children = children;
|
|
112
|
+
const infants = toInt(o.infants, '--infants');
|
|
113
|
+
if (infants !== undefined)
|
|
114
|
+
body.infants = infants;
|
|
115
|
+
// Itinerary shaping
|
|
116
|
+
const maxStops = toInt(o.maxStops, '--max-stops');
|
|
117
|
+
if (maxStops !== undefined)
|
|
118
|
+
body.max_stops = maxStops;
|
|
119
|
+
if (o.multiFare !== undefined)
|
|
120
|
+
body.multi_fare = o.multiFare;
|
|
121
|
+
const maxPrice = toNumber(o.maxPrice, '--max-price');
|
|
122
|
+
if (maxPrice !== undefined)
|
|
123
|
+
body.max_price = maxPrice;
|
|
124
|
+
const includeCarriers = codes(o.includeCarriers);
|
|
125
|
+
if (includeCarriers)
|
|
126
|
+
body.include_carriers = includeCarriers;
|
|
127
|
+
const excludeCarriers = codes(o.excludeCarriers);
|
|
128
|
+
if (excludeCarriers)
|
|
129
|
+
body.exclude_carriers = excludeCarriers;
|
|
130
|
+
const departureTimeRange = parseTimeRange(o.departureTimeRange, '--departure-time-range');
|
|
131
|
+
if (departureTimeRange)
|
|
132
|
+
body.departure_time_range = departureTimeRange;
|
|
133
|
+
const arrivalTimeRange = parseTimeRange(o.arrivalTimeRange, '--arrival-time-range');
|
|
134
|
+
if (arrivalTimeRange)
|
|
135
|
+
body.arrival_time_range = arrivalTimeRange;
|
|
136
|
+
const returnDepartureTimeRange = parseTimeRange(o.returnDepartureTimeRange, '--return-departure-time-range');
|
|
137
|
+
if (returnDepartureTimeRange)
|
|
138
|
+
body.return_departure_time_range = returnDepartureTimeRange;
|
|
139
|
+
const returnArrivalTimeRange = parseTimeRange(o.returnArrivalTimeRange, '--return-arrival-time-range');
|
|
140
|
+
if (returnArrivalTimeRange)
|
|
141
|
+
body.return_arrival_time_range = returnArrivalTimeRange;
|
|
142
|
+
const connectionMin = toInt(o.connectionTimeMinMinutes, '--connection-time-min-minutes');
|
|
143
|
+
if (connectionMin !== undefined)
|
|
144
|
+
body.connection_time_min_minutes = connectionMin;
|
|
145
|
+
const connectionMax = toInt(o.connectionTimeMaxMinutes, '--connection-time-max-minutes');
|
|
146
|
+
if (connectionMax !== undefined)
|
|
147
|
+
body.connection_time_max_minutes = connectionMax;
|
|
148
|
+
const maxTotalDuration = toInt(o.maxTotalDurationMinutes, '--max-total-duration-minutes');
|
|
149
|
+
if (maxTotalDuration !== undefined)
|
|
150
|
+
body.max_total_duration_minutes = maxTotalDuration;
|
|
151
|
+
if (o.singleCarrierOnly)
|
|
152
|
+
body.single_carrier_only = true;
|
|
153
|
+
const viaAirports = codes(o.viaAirports);
|
|
154
|
+
if (viaAirports)
|
|
155
|
+
body.via_airports = viaAirports;
|
|
156
|
+
const excludeViaAirports = codes(o.excludeViaAirports);
|
|
157
|
+
if (excludeViaAirports)
|
|
158
|
+
body.exclude_via_airports = excludeViaAirports;
|
|
159
|
+
const aircraftTypes = codes(o.aircraftTypes);
|
|
160
|
+
if (aircraftTypes)
|
|
161
|
+
body.aircraft_types = aircraftTypes;
|
|
162
|
+
if (o.sameConnectionAirportOnly)
|
|
163
|
+
body.same_connection_airport_only = true;
|
|
164
|
+
if (o.sameOriginAirportOnly)
|
|
165
|
+
body.same_origin_airport_only = true;
|
|
166
|
+
if (o.sameTurnaroundAirportOnly)
|
|
167
|
+
body.same_turnaround_airport_only = true;
|
|
168
|
+
// Widening. A list sent against a city anchor is NOT an error here: the
|
|
169
|
+
// platform searches the city and reports the list back under `origin` /
|
|
170
|
+
// `destination` in unapplied_filters, which the report rendering shows.
|
|
171
|
+
const originAlternates = codes(o.originAlternateAirports);
|
|
172
|
+
if (originAlternates)
|
|
173
|
+
body.origin_alternate_airports = originAlternates;
|
|
174
|
+
const destinationAlternates = codes(o.destinationAlternateAirports);
|
|
175
|
+
if (destinationAlternates)
|
|
176
|
+
body.destination_alternate_airports = destinationAlternates;
|
|
177
|
+
if (o.nearbyAirports)
|
|
178
|
+
body.nearby_airports = true;
|
|
179
|
+
// Fare shaping
|
|
180
|
+
if (o.refundableOnly)
|
|
181
|
+
body.refundable_only = true;
|
|
182
|
+
if (o.changeableOnly)
|
|
183
|
+
body.changeable_only = true;
|
|
184
|
+
if (o.checkedBagIncluded)
|
|
185
|
+
body.checked_bag_included = true;
|
|
186
|
+
// Sizing + presentation
|
|
187
|
+
const limit = toInt(o.limit, '--limit');
|
|
188
|
+
if (limit !== undefined)
|
|
189
|
+
body.limit = limit;
|
|
190
|
+
if (o.currency)
|
|
191
|
+
body.currency = o.currency;
|
|
192
|
+
if (o.locale)
|
|
193
|
+
body.locale = o.locale;
|
|
194
|
+
return body;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Map canonical CLI options onto the price-check body. Every search-mode field
|
|
198
|
+
* is a contradiction beside `offer_token` (the platform rejects the pair), so
|
|
199
|
+
* only the fields that describe the re-price itself travel.
|
|
200
|
+
*/
|
|
201
|
+
export function buildOfferCheckBody(o) {
|
|
202
|
+
const body = {
|
|
203
|
+
offer_token: o.offerToken,
|
|
204
|
+
adults: toInt(o.adults, '--adults') ?? 1,
|
|
205
|
+
};
|
|
206
|
+
const children = toInt(o.children, '--children');
|
|
207
|
+
if (children !== undefined)
|
|
208
|
+
body.children = children;
|
|
209
|
+
const infants = toInt(o.infants, '--infants');
|
|
210
|
+
if (infants !== undefined)
|
|
211
|
+
body.infants = infants;
|
|
212
|
+
if (o.currency)
|
|
213
|
+
body.currency = o.currency;
|
|
214
|
+
if (o.locale)
|
|
215
|
+
body.locale = o.locale;
|
|
216
|
+
return body;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* CLI flags whose request fields only mean something in search mode — the
|
|
220
|
+
* platform rejects any of them beside `offer_token`, so the price-check body
|
|
221
|
+
* drops them. Mirrors jinko-api's own search-only list; kept here so the drop
|
|
222
|
+
* is announced instead of silent.
|
|
223
|
+
*/
|
|
224
|
+
const SEARCH_ONLY_FLAGS = [
|
|
225
|
+
['origin', '--origin'],
|
|
226
|
+
['destination', '--destination'],
|
|
227
|
+
['originType', '--origin-type'],
|
|
228
|
+
['destinationType', '--destination-type'],
|
|
229
|
+
['departureDate', '--departure-date'],
|
|
230
|
+
['returnDate', '--return-date'],
|
|
231
|
+
['tripType', '--trip-type'],
|
|
232
|
+
['cabinClass', '--cabin-class'],
|
|
233
|
+
['directOnly', '--direct-only'],
|
|
234
|
+
['maxStops', '--max-stops'],
|
|
235
|
+
['multiFare', '--multi-fare'],
|
|
236
|
+
['maxPrice', '--max-price'],
|
|
237
|
+
['includeCarriers', '--include-carriers'],
|
|
238
|
+
['excludeCarriers', '--exclude-carriers'],
|
|
239
|
+
['departureTimeRange', '--departure-time-range'],
|
|
240
|
+
['arrivalTimeRange', '--arrival-time-range'],
|
|
241
|
+
['returnDepartureTimeRange', '--return-departure-time-range'],
|
|
242
|
+
['returnArrivalTimeRange', '--return-arrival-time-range'],
|
|
243
|
+
['connectionTimeMinMinutes', '--connection-time-min-minutes'],
|
|
244
|
+
['connectionTimeMaxMinutes', '--connection-time-max-minutes'],
|
|
245
|
+
['maxTotalDurationMinutes', '--max-total-duration-minutes'],
|
|
246
|
+
['refundableOnly', '--refundable-only'],
|
|
247
|
+
['changeableOnly', '--changeable-only'],
|
|
248
|
+
['checkedBagIncluded', '--checked-bag-included'],
|
|
249
|
+
['singleCarrierOnly', '--single-carrier-only'],
|
|
250
|
+
['viaAirports', '--via-airports'],
|
|
251
|
+
['excludeViaAirports', '--exclude-via-airports'],
|
|
252
|
+
['aircraftTypes', '--aircraft-types'],
|
|
253
|
+
['originAlternateAirports', '--origin-alternate-airports'],
|
|
254
|
+
['destinationAlternateAirports', '--destination-alternate-airports'],
|
|
255
|
+
['nearbyAirports', '--nearby-airports'],
|
|
256
|
+
['sameConnectionAirportOnly', '--same-connection-airport-only'],
|
|
257
|
+
['sameOriginAirportOnly', '--same-origin-airport-only'],
|
|
258
|
+
['sameTurnaroundAirportOnly', '--same-turnaround-airport-only'],
|
|
259
|
+
['limit', '--limit'],
|
|
260
|
+
];
|
|
261
|
+
/**
|
|
262
|
+
* Search-mode flags the caller set, in flag spelling. Reads "set" the way the
|
|
263
|
+
* platform does: `false` and an empty list are not a request. `multi_fare` is
|
|
264
|
+
* the exception — the platform asks whether the field was sent at all, so an
|
|
265
|
+
* explicit `--no-multi-fare` counts. Exported for tests.
|
|
266
|
+
*/
|
|
267
|
+
export function searchOnlyFlagsPresent(o) {
|
|
268
|
+
return SEARCH_ONLY_FLAGS.filter(([key, flag]) => {
|
|
269
|
+
const value = o[key];
|
|
270
|
+
if (flag === '--multi-fare')
|
|
271
|
+
return value !== undefined;
|
|
272
|
+
if (value === undefined || value === null)
|
|
273
|
+
return false;
|
|
274
|
+
if (typeof value === 'boolean')
|
|
275
|
+
return value;
|
|
276
|
+
if (Array.isArray(value))
|
|
277
|
+
return value.length > 0;
|
|
278
|
+
return value !== '';
|
|
279
|
+
}).map(([, flag]) => flag);
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Human lines for the applied/unapplied filter report. Empty when the request
|
|
283
|
+
* carried no filters (both lists empty), so an unfiltered search prints
|
|
284
|
+
* nothing extra. An unapplied entry is not an error — the results simply do
|
|
285
|
+
* not honor that filter, and the reason says why. The alternate-airport lists
|
|
286
|
+
* are reported per side as `origin` / `destination`, never under the field
|
|
287
|
+
* name they were sent with. Pure — exported for tests.
|
|
288
|
+
*/
|
|
289
|
+
export function filterReportLines(report) {
|
|
290
|
+
const applied = report.applied_filters ?? [];
|
|
291
|
+
const unapplied = report.unapplied_filters ?? [];
|
|
292
|
+
if (applied.length === 0 && unapplied.length === 0)
|
|
293
|
+
return [];
|
|
294
|
+
const lines = [];
|
|
295
|
+
if (applied.length > 0) {
|
|
296
|
+
lines.push(`Applied filters: ${applied.join(', ')}`);
|
|
297
|
+
}
|
|
298
|
+
if (unapplied.length > 0) {
|
|
299
|
+
lines.push('Unapplied filters:');
|
|
300
|
+
for (const { name, reason } of unapplied) {
|
|
301
|
+
lines.push(` ${name} — ${reason}`);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
return lines;
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Print the response, then the filter report under the results table. JSON
|
|
308
|
+
* output gets the report for free — `applied_filters` / `unapplied_filters` are
|
|
309
|
+
* response fields and travel through `output` untouched — so only the human
|
|
310
|
+
* format needs the extra block. Exported for tests.
|
|
311
|
+
*/
|
|
312
|
+
export function renderFlightSearchResponse(response, format) {
|
|
313
|
+
output(response, { format });
|
|
314
|
+
if (format !== 'table')
|
|
315
|
+
return;
|
|
316
|
+
const lines = filterReportLines(response);
|
|
317
|
+
if (lines.length === 0)
|
|
318
|
+
return;
|
|
319
|
+
console.log('');
|
|
320
|
+
for (const line of lines) {
|
|
321
|
+
if (line.startsWith(' ')) {
|
|
322
|
+
console.log(line);
|
|
323
|
+
continue;
|
|
324
|
+
}
|
|
325
|
+
const colon = line.indexOf(':');
|
|
326
|
+
console.log(chalk.bold(line.slice(0, colon + 1)) + line.slice(colon + 1));
|
|
327
|
+
}
|
|
328
|
+
}
|
|
2
329
|
export function registerFlightSearchCommand(program) {
|
|
3
330
|
program
|
|
4
331
|
.command('flight-search')
|
|
5
332
|
.summary('Get live flight pricing — search by route, or re-price a known offer')
|
|
6
|
-
.description('Fetch live, bookable pricing for a specific route and date pair. Use it once the user has settled on exact travel dates, for example "Paris to New York departing June 1 returning June 8 in economy". It also reprices an offer surfaced earlier by the calendar or destination tools so you can confirm availability before adding it to a trip.')
|
|
333
|
+
.description('Fetch live, bookable pricing for a specific route and date pair. Use it once the user has settled on exact travel dates, for example "Paris to New York departing June 1 returning June 8 in economy". It also reprices an offer surfaced earlier by the calendar or destination tools so you can confirm availability before adding it to a trip. The response reports which of the requested filters the results honor (`applied_filters`) and which they do not, with a reason (`unapplied_filters`).')
|
|
334
|
+
// ── Route ────────────────────────────────────────────────────────
|
|
7
335
|
// Canonical flat flags — match jinko-api FlightSearchRequest leaf names.
|
|
8
336
|
.option('--origin <code>', 'origin IATA code (e.g. PAR for city, JFK for airport). JSON: `origin`. [required: search mode]')
|
|
9
337
|
.option('--destination <code>', 'destination IATA code (e.g. NYC for city, LAX for airport). JSON: `destination`. [required: search mode]')
|
|
338
|
+
.option('--origin-type <type>', 'how to read --origin: city (every airport of the metro area) or airport. Omit to let the platform classify the code. JSON: `origin_type`.')
|
|
339
|
+
.option('--destination-type <type>', 'how to read --destination: city (every airport of the metro area) or airport. Omit to let the platform classify the code. JSON: `destination_type`.')
|
|
10
340
|
.option('--departure-date <date>', 'departure date (YYYY-MM-DD). JSON: `departure_date`. [required: search mode]')
|
|
11
341
|
.option('--return-date <date>', 'return date for round-trip (YYYY-MM-DD). JSON: `return_date`.')
|
|
12
|
-
.option('--
|
|
342
|
+
.option('--trip-type <type>', 'oneway or roundtrip (default: roundtrip when --return-date is set, else oneway). JSON: `trip_type`.')
|
|
343
|
+
// ── Passengers ───────────────────────────────────────────────────
|
|
13
344
|
.option('--adults <n>', 'number of adult passengers (default: 1). JSON: `adults`.')
|
|
14
|
-
.option('--
|
|
15
|
-
.option('--
|
|
345
|
+
.option('--children <n>', 'number of child passengers. JSON: `children`.')
|
|
346
|
+
.option('--infants <n>', 'number of infant passengers. JSON: `infants`.')
|
|
347
|
+
// ── Itinerary shaping ────────────────────────────────────────────
|
|
348
|
+
.option('--cabin-class <class>', 'preferred cabin: economy, premium_economy, business, first (default: economy). Advisory — providers may still return other cabins, and it never appears in applied_filters. JSON: `cabin_class`.')
|
|
349
|
+
.option('--direct-only', 'only show direct flights. DEPRECATED in the contract — prefer --max-stops 0; the report always names `max_stops`. JSON: `direct_only`.')
|
|
350
|
+
.option('--max-stops <n>', 'maximum stops per leg: 0 non-stop, 1 one connection, 2 two. JSON: `max_stops`.')
|
|
351
|
+
.option('--multi-fare', 'return the branded fare ladder — several fares per itinerary (the platform default). JSON: `multi_fare`.')
|
|
352
|
+
.option('--no-multi-fare', 'return a single fare per itinerary and a smaller response. JSON: `multi_fare`.')
|
|
353
|
+
.option('--max-price <amount>', 'drop fares whose total price for all passengers exceeds this cap, in --currency, major units. JSON: `max_price`.')
|
|
16
354
|
.option('--include-carriers <codes...>', 'include only these IATA 2-letter carrier codes (e.g. AF KL). JSON: `include_carriers`.')
|
|
17
355
|
.option('--exclude-carriers <codes...>', 'exclude these IATA 2-letter carrier codes (e.g. FR U2). JSON: `exclude_carriers`.')
|
|
18
|
-
.option('--
|
|
356
|
+
.option('--departure-time-range <window>', 'filter the OUTBOUND leg by local departure time-of-day, HH:MM-HH:MM (either bound may be omitted, e.g. 08:00- or -12:00). JSON: `departure_time_range`.')
|
|
357
|
+
.option('--arrival-time-range <window>', 'filter the OUTBOUND leg by local arrival time-of-day, HH:MM-HH:MM. JSON: `arrival_time_range`.')
|
|
358
|
+
.option('--return-departure-time-range <window>', 'filter the RETURN leg by local departure time-of-day, HH:MM-HH:MM (round-trip only). JSON: `return_departure_time_range`.')
|
|
359
|
+
.option('--return-arrival-time-range <window>', 'filter the RETURN leg by local arrival time-of-day, HH:MM-HH:MM (round-trip only). JSON: `return_arrival_time_range`.')
|
|
360
|
+
.option('--connection-time-min-minutes <n>', 'shortest acceptable layover, in minutes, on every connection. JSON: `connection_time_min_minutes`.')
|
|
361
|
+
.option('--connection-time-max-minutes <n>', 'longest acceptable layover, in minutes, on every connection. JSON: `connection_time_max_minutes`.')
|
|
362
|
+
.option('--max-total-duration-minutes <n>', "cap each leg's door-to-door elapsed travel time, in minutes. JSON: `max_total_duration_minutes`.")
|
|
363
|
+
.option('--single-carrier-only', 'only itineraries marketed end-to-end by one carrier. JSON: `single_carrier_only`.')
|
|
364
|
+
.option('--via-airports <codes...>', 'restrict connections to these airports — an itinerary qualifies when at least one connection is one of them; non-stops are kept. JSON: `via_airports`.')
|
|
365
|
+
.option('--exclude-via-airports <codes...>', 'ban connections at these airports. Must not overlap --via-airports. JSON: `exclude_via_airports`.')
|
|
366
|
+
.option('--aircraft-types <codes...>', 'only itineraries whose every segment flies one of these IATA equipment codes (e.g. 320 77W). JSON: `aircraft_types`.')
|
|
367
|
+
.option('--same-connection-airport-only', 'only itineraries whose connections leave from the airport they arrived at (no cross-town transfer). JSON: `same_connection_airport_only`.')
|
|
368
|
+
.option('--same-origin-airport-only', 'only round trips that return to the airport the trip departed from. JSON: `same_origin_airport_only`.')
|
|
369
|
+
.option('--same-turnaround-airport-only', 'only round trips whose return departs from the airport the outbound arrived at. JSON: `same_turnaround_airport_only`.')
|
|
370
|
+
// ── Widening ─────────────────────────────────────────────────────
|
|
371
|
+
.option('--origin-alternate-airports <codes...>', 'ADDITIONAL departure airports searched alongside --origin (widening only). Takes effect with an airport anchor; against a city anchor the list comes back under `origin` in unapplied_filters. The anchor decides ranking, so put the airport that matters most in --origin. JSON: `origin_alternate_airports`.')
|
|
372
|
+
.option('--destination-alternate-airports <codes...>', 'ADDITIONAL arrival airports searched alongside --destination (widening only). Same anchor rules as --origin-alternate-airports; reported under `destination`. JSON: `destination_alternate_airports`.')
|
|
373
|
+
.option('--nearby-airports', "also search the alternate airports around each leg's origin and destination (widening). JSON: `nearby_airports`.")
|
|
374
|
+
// ── Fare shaping ─────────────────────────────────────────────────
|
|
375
|
+
.option('--refundable-only', 'only fares that can be cancelled before departure. Conservative — fares whose rules cannot be verified are dropped. JSON: `refundable_only`.')
|
|
376
|
+
.option('--changeable-only', 'only fares that allow a voluntary change. Conservative in the same way as --refundable-only. JSON: `changeable_only`.')
|
|
377
|
+
.option('--checked-bag-included', 'only fares whose price already includes a checked bag. JSON: `checked_bag_included`.')
|
|
378
|
+
// ── Sizing + presentation ────────────────────────────────────────
|
|
379
|
+
.option('--limit <n>', 'TOTAL flights to return (1-300), not a page size. Search mode only; omit to let the platform choose. JSON: `limit`.')
|
|
380
|
+
.option('--currency <code>', 'ISO 4217 currency for the returned prices and --max-price. JSON: `currency`.')
|
|
381
|
+
.option('--locale <locale>', 'locale for provider-supplied text (e.g. fr-FR). JSON: `locale`.')
|
|
382
|
+
// ── Price-check mode ─────────────────────────────────────────────
|
|
19
383
|
.option('--offer-token <token>', 'price-check a specific offer (live pricing). JSON: `offer_token`. [required: price-check mode]')
|
|
20
384
|
.addOption(userIntentOption())
|
|
21
385
|
// Deprecated aliases — Phase 1 transition (JIN-665), remove in next major.
|
|
@@ -25,52 +389,94 @@ export function registerFlightSearchCommand(program) {
|
|
|
25
389
|
.option('--return <date>', 'DEPRECATED: use --return-date.')
|
|
26
390
|
.option('--cabin <class>', 'DEPRECATED: use --cabin-class.')
|
|
27
391
|
.option('--passengers <n>', 'DEPRECATED: use --adults.')
|
|
28
|
-
// Deprecated no-ops — dropped from the public flat contract.
|
|
29
|
-
.option('--origin-type <type>', 'DEPRECATED: ignored by the public contract (no longer sent).')
|
|
30
|
-
.option('--destination-type <type>', 'DEPRECATED: ignored by the public contract (no longer sent).')
|
|
31
392
|
.action(withClient(async (client, globals, opts) => {
|
|
32
|
-
// Resolve deprecated aliases onto canonical flags.
|
|
393
|
+
// Resolve deprecated aliases onto canonical flags. Defaults are applied
|
|
394
|
+
// in the body builders, so an unset flag stays undefined here — which is
|
|
395
|
+
// what the price-check mode warning below reads.
|
|
33
396
|
const origin = resolveDeprecatedFlag(opts.origin, opts.from, '--from', '--origin');
|
|
34
397
|
const destination = resolveDeprecatedFlag(opts.destination, opts.to, '--to', '--destination');
|
|
35
398
|
const departureDate = resolveDeprecatedFlag(opts.departureDate, opts.date, '--date', '--departure-date');
|
|
36
399
|
const returnDate = resolveDeprecatedFlag(opts.returnDate, opts.return, '--return', '--return-date');
|
|
37
|
-
const cabinClass = resolveDeprecatedFlag(opts.cabinClass, opts.cabin, '--cabin', '--cabin-class')
|
|
38
|
-
const adults = resolveDeprecatedFlag(opts.adults, opts.passengers, '--passengers', '--adults')
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
400
|
+
const cabinClass = resolveDeprecatedFlag(opts.cabinClass, opts.cabin, '--cabin', '--cabin-class');
|
|
401
|
+
const adults = resolveDeprecatedFlag(opts.adults, opts.passengers, '--passengers', '--adults');
|
|
402
|
+
const canonical = {
|
|
403
|
+
origin,
|
|
404
|
+
destination,
|
|
405
|
+
departureDate,
|
|
406
|
+
returnDate,
|
|
407
|
+
originType: opts.originType,
|
|
408
|
+
destinationType: opts.destinationType,
|
|
409
|
+
tripType: opts.tripType,
|
|
410
|
+
adults,
|
|
411
|
+
children: opts.children,
|
|
412
|
+
infants: opts.infants,
|
|
413
|
+
cabinClass,
|
|
414
|
+
directOnly: opts.directOnly,
|
|
415
|
+
maxStops: opts.maxStops,
|
|
416
|
+
multiFare: opts.multiFare,
|
|
417
|
+
maxPrice: opts.maxPrice,
|
|
418
|
+
includeCarriers: opts.includeCarriers,
|
|
419
|
+
excludeCarriers: opts.excludeCarriers,
|
|
420
|
+
departureTimeRange: opts.departureTimeRange,
|
|
421
|
+
arrivalTimeRange: opts.arrivalTimeRange,
|
|
422
|
+
returnDepartureTimeRange: opts.returnDepartureTimeRange,
|
|
423
|
+
returnArrivalTimeRange: opts.returnArrivalTimeRange,
|
|
424
|
+
connectionTimeMinMinutes: opts.connectionTimeMinMinutes,
|
|
425
|
+
connectionTimeMaxMinutes: opts.connectionTimeMaxMinutes,
|
|
426
|
+
maxTotalDurationMinutes: opts.maxTotalDurationMinutes,
|
|
427
|
+
singleCarrierOnly: opts.singleCarrierOnly,
|
|
428
|
+
viaAirports: opts.viaAirports,
|
|
429
|
+
excludeViaAirports: opts.excludeViaAirports,
|
|
430
|
+
aircraftTypes: opts.aircraftTypes,
|
|
431
|
+
sameConnectionAirportOnly: opts.sameConnectionAirportOnly,
|
|
432
|
+
sameOriginAirportOnly: opts.sameOriginAirportOnly,
|
|
433
|
+
sameTurnaroundAirportOnly: opts.sameTurnaroundAirportOnly,
|
|
434
|
+
originAlternateAirports: opts.originAlternateAirports,
|
|
435
|
+
destinationAlternateAirports: opts.destinationAlternateAirports,
|
|
436
|
+
nearbyAirports: opts.nearbyAirports,
|
|
437
|
+
refundableOnly: opts.refundableOnly,
|
|
438
|
+
changeableOnly: opts.changeableOnly,
|
|
439
|
+
checkedBagIncluded: opts.checkedBagIncluded,
|
|
440
|
+
limit: opts.limit,
|
|
441
|
+
currency: opts.currency,
|
|
442
|
+
locale: opts.locale,
|
|
443
|
+
};
|
|
444
|
+
let request;
|
|
445
|
+
try {
|
|
446
|
+
if (opts.offerToken) {
|
|
447
|
+
// Price-check mode. Search-mode filters cannot travel beside the
|
|
448
|
+
// token — say which ones are being dropped instead of dropping them
|
|
449
|
+
// silently (stderr, so JSON output stays machine-parseable).
|
|
450
|
+
const dropped = searchOnlyFlagsPresent(canonical);
|
|
451
|
+
if (dropped.length > 0) {
|
|
452
|
+
process.stderr.write(`[jinko] ${dropped.join(', ')} ${dropped.length === 1 ? 'is a search-mode option' : 'are search-mode options'} and cannot be sent with --offer-token; ignored.\n`);
|
|
453
|
+
}
|
|
454
|
+
request = buildOfferCheckBody({
|
|
455
|
+
offerToken: opts.offerToken,
|
|
456
|
+
adults,
|
|
457
|
+
children: opts.children,
|
|
458
|
+
infants: opts.infants,
|
|
459
|
+
currency: opts.currency,
|
|
460
|
+
locale: opts.locale,
|
|
461
|
+
});
|
|
54
462
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
...(opts.limit ? { limit: Number(opts.limit) } : {}),
|
|
70
|
-
};
|
|
71
|
-
const response = await client.flightSearch(request);
|
|
72
|
-
output(response, { format: globals.format });
|
|
463
|
+
else {
|
|
464
|
+
if (!origin || !destination || !departureDate) {
|
|
465
|
+
throw new UsageError('--origin, --destination and --departure-date are required for search mode. Or provide --offer-token for price-check mode.');
|
|
466
|
+
}
|
|
467
|
+
request = buildFlightSearchBody({
|
|
468
|
+
...canonical,
|
|
469
|
+
origin,
|
|
470
|
+
destination,
|
|
471
|
+
departureDate,
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
catch (error) {
|
|
476
|
+
exitWithError(error, globals);
|
|
73
477
|
}
|
|
478
|
+
const response = await client.flightSearch(request);
|
|
479
|
+
renderFlightSearchResponse(response, globals.format);
|
|
74
480
|
}));
|
|
75
481
|
}
|
|
76
482
|
//# sourceMappingURL=flight-search.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flight-search.js","sourceRoot":"","sources":["../../src/commands/flight-search.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAO1F,MAAM,UAAU,2BAA2B,CAAC,OAAgB;IAC1D,OAAO;SACJ,OAAO,CAAC,eAAe,CAAC;SACxB,OAAO,CAAC,sEAAsE,CAAC;SAC/E,WAAW,CACV,oVAAoV,CACrV;QACD,yEAAyE;SACxE,MAAM,CAAC,iBAAiB,EAAE,gGAAgG,CAAC;SAC3H,MAAM,CAAC,sBAAsB,EAAE,0GAA0G,CAAC;SAC1I,MAAM,CAAC,yBAAyB,EAAE,8EAA8E,CAAC;SACjH,MAAM,CAAC,sBAAsB,EAAE,+DAA+D,CAAC;SAC/F,MAAM,CAAC,uBAAuB,EAAE,iGAAiG,CAAC;SAClI,MAAM,CAAC,cAAc,EAAE,0DAA0D,CAAC;SAClF,MAAM,CAAC,eAAe,EAAE,gDAAgD,CAAC;SACzE,MAAM,CAAC,sBAAsB,EAAE,0CAA0C,CAAC;SAC1E,MAAM,CAAC,+BAA+B,EAAE,wFAAwF,CAAC;SACjI,MAAM,CAAC,+BAA+B,EAAE,mFAAmF,CAAC;SAC5H,MAAM,CAAC,aAAa,EAAE,6EAA6E,CAAC;SACpG,MAAM,CAAC,uBAAuB,EAAE,gGAAgG,CAAC;SACjI,SAAS,CAAC,gBAAgB,EAAE,CAAC;QAC9B,2EAA2E;SAC1E,MAAM,CAAC,iBAAiB,EAAE,2BAA2B,CAAC;SACtD,MAAM,CAAC,oBAAoB,EAAE,gCAAgC,CAAC;SAC9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AC;gBACJ,CAAC;gBACD,OAAO,GAAG,qBAAqB,CAAC;oBAC9B,GAAG,SAAS;oBACZ,MAAM;oBACN,WAAW;oBACX,aAAa;iBACd,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACxB,aAAa,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAChC,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QACpD,0BAA0B,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC,CAAC;AACR,CAAC"}
|
|
@@ -1,3 +1,29 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
|
+
import type { BookingGetResponse } from '@gojinko/api-client';
|
|
3
|
+
/**
|
|
4
|
+
* One compact line per calendar file (JIN-2176): the iTIP method and the
|
|
5
|
+
* filename the confirmation email attached that same file under.
|
|
6
|
+
*
|
|
7
|
+
* The iCalendar body itself is deliberately NOT printed — it is multi-kilobyte
|
|
8
|
+
* CRLF text, and a consumer that wants the bytes reads them from `--format
|
|
9
|
+
* json`, which carries the response untouched.
|
|
10
|
+
*
|
|
11
|
+
* Empty when the booking carries no calendar — a booking with no flight and no
|
|
12
|
+
* hotel omits it altogether — so those bookings print nothing extra. Pure —
|
|
13
|
+
* exported for tests.
|
|
14
|
+
*/
|
|
15
|
+
export declare function calendarLines(response: BookingGetResponse): string[];
|
|
16
|
+
/**
|
|
17
|
+
* Print the booking, then the calendar summary under it.
|
|
18
|
+
*
|
|
19
|
+
* JSON output gets the calendar for free — `calendar` is a response field and
|
|
20
|
+
* travels through `output` untouched — so only the human format needs anything
|
|
21
|
+
* extra. There the files are summarised INSTEAD of dumped: `output` renders a
|
|
22
|
+
* nested object by JSON.stringify-ing it into a single table cell, which for an
|
|
23
|
+
* iCalendar body means thousands of characters of escaped CRLF on one line.
|
|
24
|
+
* Swapping it for the summary keeps the table readable and leaves the bytes one
|
|
25
|
+
* `--format json` away. Exported for tests.
|
|
26
|
+
*/
|
|
27
|
+
export declare function renderGetBookingResponse(response: BookingGetResponse, format: 'json' | 'table'): void;
|
|
2
28
|
export declare function registerGetBookingCommand(program: Command): void;
|
|
3
29
|
//# sourceMappingURL=get-booking.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-booking.d.ts","sourceRoot":"","sources":["../../src/commands/get-booking.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"get-booking.d.ts","sourceRoot":"","sources":["../../src/commands/get-booking.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAG9D;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,kBAAkB,GAAG,MAAM,EAAE,CAUpE;AASD;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,kBAAkB,EAC5B,MAAM,EAAE,MAAM,GAAG,OAAO,GACvB,IAAI,CAQN;AAkBD,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAYhE"}
|