@gojinko/cli 1.1.0 → 1.1.1
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 +17 -12
- package/SKILL.md +16 -15
- package/dist/commands/find-flight.js +1 -1
- package/dist/commands/find-flight.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -31,21 +31,26 @@ jinko auth logout # Clear stored credentials
|
|
|
31
31
|
|
|
32
32
|
## Commands
|
|
33
33
|
|
|
34
|
-
###
|
|
34
|
+
### Exploration (cached)
|
|
35
35
|
|
|
36
36
|
| Command | Description |
|
|
37
37
|
|---|---|
|
|
38
|
-
| `find-flight` | Cheapest flights A → B, returns `offer_token` |
|
|
39
38
|
| `find-destination` | Discover destinations from an origin |
|
|
40
|
-
| `flight-calendar` | Cheapest prices across a date range |
|
|
39
|
+
| `flight-calendar` | Cheapest prices across a date range for a known route |
|
|
41
40
|
|
|
42
|
-
### Live
|
|
41
|
+
### Live pricing & trip building
|
|
43
42
|
|
|
44
43
|
| Command | Description |
|
|
45
44
|
|---|---|
|
|
46
|
-
| `flight-search` |
|
|
45
|
+
| `flight-search` | Direct search by route + dates OR price-check an `offer_token`. Returns bookable `trip_item_token`. |
|
|
47
46
|
| `trip` | Create/update a trip, add items, set travelers |
|
|
48
47
|
|
|
48
|
+
### Legacy
|
|
49
|
+
|
|
50
|
+
| Command | Description |
|
|
51
|
+
|---|---|
|
|
52
|
+
| `find-flight` | Cached route + dates search. Kept for backwards compat; prefer `flight-search` for new integrations. |
|
|
53
|
+
|
|
49
54
|
### Checkout
|
|
50
55
|
|
|
51
56
|
| Command | Description |
|
|
@@ -71,7 +76,7 @@ jinko auth logout # Clear stored credentials
|
|
|
71
76
|
## Canonical Flow
|
|
72
77
|
|
|
73
78
|
```
|
|
74
|
-
|
|
79
|
+
flight-search → trip → checkout → user pays on checkout_url → trip-status
|
|
75
80
|
```
|
|
76
81
|
|
|
77
82
|
Quote is automatic — `checkout` handles it internally. Payment happens on the Jinko web page, not in the CLI.
|
|
@@ -79,10 +84,10 @@ Quote is automatic — `checkout` handles it internally. Payment happens on the
|
|
|
79
84
|
## Examples
|
|
80
85
|
|
|
81
86
|
```bash
|
|
82
|
-
#
|
|
83
|
-
jinko
|
|
87
|
+
# Live flight search by route + dates (returns trip_item_token directly)
|
|
88
|
+
jinko flight-search --from PAR --to NYC --date 2026-06-15
|
|
84
89
|
|
|
85
|
-
#
|
|
90
|
+
# Or price-check an offer_token from flight-calendar
|
|
86
91
|
jinko flight-search --offer-token <offer_token>
|
|
87
92
|
|
|
88
93
|
# Create trip with travelers + contact
|
|
@@ -113,13 +118,13 @@ jinko refund commit --booking-ref <ref> --pnr <pnr> --reason "schedule change"
|
|
|
113
118
|
## Output Formats
|
|
114
119
|
|
|
115
120
|
```bash
|
|
116
|
-
jinko
|
|
117
|
-
jinko
|
|
121
|
+
jinko flight-search --from PAR --to NYC --date 2026-06-15
|
|
122
|
+
jinko flight-search --from PAR --to NYC --date 2026-06-15 --format table
|
|
118
123
|
```
|
|
119
124
|
|
|
120
125
|
## Schema Introspection
|
|
121
126
|
|
|
122
127
|
```bash
|
|
123
128
|
jinko schema # List all tools
|
|
124
|
-
jinko schema
|
|
129
|
+
jinko schema flight-search # Show a tool's request/response schema
|
|
125
130
|
```
|
package/SKILL.md
CHANGED
|
@@ -22,11 +22,15 @@ Opens a browser for WorkOS device flow login. Token is stored in `~/.jinko/confi
|
|
|
22
22
|
|
|
23
23
|
## Tools
|
|
24
24
|
|
|
25
|
-
###
|
|
26
|
-
- `find-
|
|
27
|
-
- `
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
### Exploration (cached, cheap)
|
|
26
|
+
- `find-destination` — discover destinations from one or more origins
|
|
27
|
+
- `flight-calendar` — cheapest prices across a date range for a known route
|
|
28
|
+
|
|
29
|
+
### Pricing (live)
|
|
30
|
+
- `flight-search` — direct search by route + dates OR price-check an `offer_token`. Returns `trip_item_token`.
|
|
31
|
+
|
|
32
|
+
### Legacy
|
|
33
|
+
- `find-flight` — cached route + dates search. Kept for backwards compat; prefer `flight-search` for any new integration.
|
|
30
34
|
|
|
31
35
|
### Trip building
|
|
32
36
|
- `trip` — create/update a trip (add items, set travelers + contact). Returns `trip_id`.
|
|
@@ -47,27 +51,24 @@ Opens a browser for WorkOS device flow login. Token is stored in `~/.jinko/confi
|
|
|
47
51
|
## Canonical Flow
|
|
48
52
|
|
|
49
53
|
```
|
|
50
|
-
1. jinko
|
|
51
|
-
→ each
|
|
52
|
-
|
|
53
|
-
2. jinko flight-search --offer-token <offer_token>
|
|
54
|
-
→ returns trip_item_token with live pricing
|
|
54
|
+
1. jinko flight-search --from PAR --to NYC --date 2026-05-01
|
|
55
|
+
→ each fare has a trip_item_token (live pricing already applied)
|
|
55
56
|
|
|
56
|
-
|
|
57
|
+
2. jinko trip \
|
|
57
58
|
--trip-item-token <trip_item_token> \
|
|
58
59
|
--travelers '[{"first_name":"Jane","last_name":"Doe","date_of_birth":"1990-01-15","gender":"FEMALE","passenger_type":"ADULT"}]' \
|
|
59
60
|
--contact '{"email":"jane@example.com","phone":"+33612345678"}'
|
|
60
61
|
→ returns trip_id
|
|
61
62
|
|
|
62
|
-
|
|
63
|
+
3. jinko checkout --trip-id <trip_id>
|
|
63
64
|
→ returns { checkout_url, items, available_ancillaries, total_amount }
|
|
64
65
|
|
|
65
|
-
|
|
66
|
+
4. (optional) jinko select-ancillaries --trip-id <id> --item-id <id> --select <offer_ids>
|
|
66
67
|
→ apply bag/seat selections
|
|
67
68
|
|
|
68
|
-
|
|
69
|
+
5. Send the user to checkout_url — they complete payment on the Jinko web page.
|
|
69
70
|
|
|
70
|
-
|
|
71
|
+
6. jinko trip-status --trip-id <trip_id>
|
|
71
72
|
→ poll until status = "fulfilled" (or "partially_fulfilled") to get PNRs.
|
|
72
73
|
```
|
|
73
74
|
|
|
@@ -2,7 +2,7 @@ import { withClient, output } from './shared.js';
|
|
|
2
2
|
export function registerFindFlightCommand(program) {
|
|
3
3
|
program
|
|
4
4
|
.command('find-flight')
|
|
5
|
-
.description('
|
|
5
|
+
.description('[legacy] Cached flight search by route + dates. Prefer `flight-search` — it returns live pricing and a bookable trip_item_token in one step.')
|
|
6
6
|
.requiredOption('--from <origin>', 'origin airport code (e.g. PAR)')
|
|
7
7
|
.requiredOption('--to <destination>', 'destination airport code (e.g. NYC)')
|
|
8
8
|
.requiredOption('--date <date>', 'departure date (YYYY-MM-DD)')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find-flight.js","sourceRoot":"","sources":["../../src/commands/find-flight.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,UAAU,yBAAyB,CAAC,OAAgB;IACxD,OAAO;SACJ,OAAO,CAAC,aAAa,CAAC;SACtB,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"find-flight.js","sourceRoot":"","sources":["../../src/commands/find-flight.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,UAAU,yBAAyB,CAAC,OAAgB;IACxD,OAAO;SACJ,OAAO,CAAC,aAAa,CAAC;SACtB,WAAW,CAAC,8IAA8I,CAAC;SAC3J,cAAc,CAAC,iBAAiB,EAAE,gCAAgC,CAAC;SACnE,cAAc,CAAC,oBAAoB,EAAE,qCAAqC,CAAC;SAC3E,cAAc,CAAC,eAAe,EAAE,6BAA6B,CAAC;SAC9D,MAAM,CAAC,iBAAiB,EAAE,yCAAyC,CAAC;SACpE,MAAM,CAAC,iBAAiB,EAAE,wDAAwD,EAAE,SAAS,CAAC;SAC9F,MAAM,CAAC,eAAe,EAAE,0BAA0B,CAAC;SACnD,MAAM,CAAC,sBAAsB,EAAE,sBAAsB,CAAC;SACtD,MAAM,CAAC,eAAe,EAAE,8BAA8B,EAAE,QAAQ,CAAC;SACjE,MAAM,CAAC,aAAa,EAAE,a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,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gojinko/cli",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"jinko": "./dist/bin/jinko.js"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"docs:gen": "tsx scripts/gen-cli-docs.ts"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@gojinko/api-client": "1.1.
|
|
20
|
+
"@gojinko/api-client": "1.1.1",
|
|
21
21
|
"commander": "^12.1.0",
|
|
22
22
|
"chalk": "^5.4.1",
|
|
23
23
|
"open": "^10.0.0",
|