@gojinko/plugin 1.2.0 → 1.3.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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jinko",
|
|
3
3
|
"description": "Search flights, book trips, and manage bookings with the Jinko Travel API. Connects to the Jinko MCP server for live flight pricing, trip management, and payment.",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.3.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jinko",
|
|
7
7
|
"url": "https://gojinko.com"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jinko",
|
|
3
3
|
"description": "Search flights, book trips, and manage bookings with the Jinko Travel API. Connects to the Jinko MCP server for live flight pricing, trip management, and payment.",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.3.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jinko",
|
|
7
7
|
"url": "https://gojinko.com"
|
package/package.json
CHANGED
package/skills/cli/SKILL.md
CHANGED
|
@@ -40,7 +40,7 @@ Auth alternatives:
|
|
|
40
40
|
| `select-ancillaries` | Add baggage / seats / meals to a trip item |
|
|
41
41
|
| `book` | Schedule checkout → returns Stripe payment URL |
|
|
42
42
|
| `trip-status` | Full status: cart, quote, fulfillment, bookings |
|
|
43
|
-
| `
|
|
43
|
+
| `get-booking` | Retrieve a booking by `JNK-*` ref + last name (guest access). Old name `lookup-booking` is kept as a hidden deprecated alias. |
|
|
44
44
|
| `refund check / commit / status` | Voluntary refund flow |
|
|
45
45
|
| `schema <command>` | Print request/response schema for a command |
|
|
46
46
|
| `config` | Read/write CLI config |
|
|
@@ -109,8 +109,8 @@ jinko trip --trip-id tr_ABC --remove-item-id it_123 --trip-item-token "offer_new
|
|
|
109
109
|
## Post-booking
|
|
110
110
|
|
|
111
111
|
```bash
|
|
112
|
-
#
|
|
113
|
-
jinko
|
|
112
|
+
# Retrieve a booking (guest access — no auth needed beyond ref + last name)
|
|
113
|
+
jinko get-booking --ref JNK-A7B3X9 --last-name Doe
|
|
114
114
|
|
|
115
115
|
# Refund
|
|
116
116
|
jinko refund check --ref JNK-A7B3X9 --last-name Doe
|
|
@@ -7,9 +7,9 @@ description: Look up bookings and manage post-booking operations (refunds, cance
|
|
|
7
7
|
|
|
8
8
|
Post-booking operations using Jinko MCP tools.
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Get a booking
|
|
11
11
|
|
|
12
|
-
Use `
|
|
12
|
+
Use `get_booking` to retrieve a booking by its Jinko reference and the traveler's last name. No login required. (Previously named `lookup_booking`; the old name is kept as a deprecated alias on the SDK and CLI.)
|
|
13
13
|
|
|
14
14
|
```json
|
|
15
15
|
{
|
|
@@ -29,7 +29,7 @@ Use `lookup_booking` to find a booking by its Jinko reference and the traveler's
|
|
|
29
29
|
|
|
30
30
|
`flight_refund` supports two auth modes — pick exactly one per call:
|
|
31
31
|
|
|
32
|
-
- **Guest auth** (default for end-users): `booking_ref` + `last_name`. Works without any DevPlatform credential — the server resolves the booking via `/bookings/
|
|
32
|
+
- **Guest auth** (default for end-users): `booking_ref` + `last_name`. Works without any DevPlatform credential — the server resolves the booking via `/bookings/get`.
|
|
33
33
|
- **Authenticated** (DevPlatform OAuth / `jnk_*` API keys): `order_id`. Skips the guest resolver.
|
|
34
34
|
|
|
35
35
|
Do NOT mix the two modes in one call. The BFF rejects mixed combinations up front.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: search-hotels
|
|
3
|
-
description: Search live hotel inventory and rates by destination, dates, and occupancy using the Jinko Travel API. Use when the user wants to find hotels, compare rates, or book a hotel.
|
|
3
|
+
description: Search live hotel inventory and rates by destination, dates, and occupancy — or look up a specific hotel by name — using the Jinko Travel API. Use when the user wants to find hotels, compare rates, or book a hotel.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Hotel Search
|
|
@@ -11,14 +11,28 @@ Search live hotel inventory using the `hotel_search` Jinko MCP tool. Returns hot
|
|
|
11
11
|
|
|
12
12
|
Live search — returns real-time availability and pricing from hotel suppliers.
|
|
13
13
|
|
|
14
|
+
`hotel_search` has **two modes**, determined by the `destination` shape:
|
|
15
|
+
|
|
16
|
+
| Mode | When | Destination shape |
|
|
17
|
+
|---|---|---|
|
|
18
|
+
| **A — Rate Lookup** | User named a specific hotel they want to book | `{ hotel_name }` or `{ hotel_ids }` |
|
|
19
|
+
| **B — Hotel Search** | User is exploring a destination | `{ query }`, `{ city_name + country_code }`, `{ latitude + longitude + radius_km }`, or `{ place_id }` |
|
|
20
|
+
|
|
21
|
+
In **Mode A**, the server resolves the hotel and returns its rates plus a few **`nearby_alternatives`** (other hotels within ~2km, same dates+occupancy). `filters` are ignored in Mode A — the user already picked the property.
|
|
22
|
+
|
|
23
|
+
In **Mode B**, `filters` narrow the result set (star rating, facility, chain, etc.).
|
|
24
|
+
|
|
14
25
|
**Required params:**
|
|
15
26
|
|
|
16
|
-
- **Destination** (provide exactly one):
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
|
|
27
|
+
- **Destination** (provide exactly one shape):
|
|
28
|
+
- **Mode A:**
|
|
29
|
+
- `hotel_name`: the user-named hotel (e.g. `"Hotel Calimala"`, `"The St. Regis Rome"`, `"Hôtel Costes"`). **Always pair with `country_code` and `city_name` when known** — name lookup runs against a 1.74M-hotel catalog and precision drops sharply on common names without scope. Server returns 422 `HOTEL_NAME_LOW_CONFIDENCE` if no candidate clears the auto-pick threshold (see error handling below).
|
|
30
|
+
- `hotel_ids`: re-shop specific hotels by ID (from a prior search).
|
|
31
|
+
- **Mode B:**
|
|
32
|
+
- `query`: free-text (e.g. `"Paris"`, `"beach resort near Barcelona"`). Only for unambiguous cities/POIs — returns 0 for islands, regions, countries, archipelagos.
|
|
33
|
+
- `city_name` + `country_code`: structured (e.g. `"New York"` + `"us"`). Best for ambiguous city names or when the user named a primary city (e.g. `"Mahón"` + `"es"` for Menorca).
|
|
34
|
+
- `latitude` + `longitude` + optional `radius_km`: geo-radius (max 50km). Best for islands, regions, neighborhoods.
|
|
35
|
+
- `place_id`: Google Places ID.
|
|
22
36
|
|
|
23
37
|
- `checkin`: check-in date (YYYY-MM-DD)
|
|
24
38
|
- `checkout`: check-out date (YYYY-MM-DD)
|
|
@@ -30,7 +44,7 @@ Live search — returns real-time availability and pricing from hotel suppliers.
|
|
|
30
44
|
**Optional params:**
|
|
31
45
|
- `currency`: ISO 4217 (default USD)
|
|
32
46
|
- `guest_nationality`: ISO 3166-1 alpha-2 (affects rate availability)
|
|
33
|
-
- `filters`: `{ min_rating, star_rating, min_reviews, hotel_type_ids, chain_ids, facility_ids, max_results }`
|
|
47
|
+
- `filters`: `{ min_rating, star_rating, min_reviews, hotel_type_ids, chain_ids, facility_ids, max_results }` — **Mode B only**. Server ignores filters in Mode A and includes a `warnings` entry on the response; future versions may reject the combination outright.
|
|
34
48
|
|
|
35
49
|
**Examples:**
|
|
36
50
|
|
|
@@ -68,12 +82,60 @@ Two rooms with kids:
|
|
|
68
82
|
}
|
|
69
83
|
```
|
|
70
84
|
|
|
85
|
+
Look up a specific hotel by name (Mode A):
|
|
86
|
+
```json
|
|
87
|
+
{
|
|
88
|
+
"destination": {
|
|
89
|
+
"hotel_name": "Hotel Calimala",
|
|
90
|
+
"country_code": "it",
|
|
91
|
+
"city_name": "Florence"
|
|
92
|
+
},
|
|
93
|
+
"checkin": "2026-07-15",
|
|
94
|
+
"checkout": "2026-07-18",
|
|
95
|
+
"adults": 2,
|
|
96
|
+
"currency": "EUR"
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
71
100
|
**Response:** List of hotels with `hotel_id`, `name`, `address`, `star_rating`, `rating`, `review_count`, `main_photo`, and a `rooms[]` list. Each room has `rates[]` — each rate includes:
|
|
72
101
|
- `offer_id`: the `htl_*` token (use as `trip_item_token` for booking)
|
|
73
102
|
- `board_type` / `board_name`: meal plan (RO = Room Only, BB = Bed & Breakfast, etc.)
|
|
74
103
|
- `total_amount` + `currency`: total price for the stay
|
|
75
104
|
- `is_refundable` + `free_cancellation_until`
|
|
76
105
|
|
|
106
|
+
In **Mode A**, the response also includes:
|
|
107
|
+
- `nearby_alternatives`: list of hotels within ~2km of the matched property, in the same response shape (hotel + rooms + rates) so the user can compare. Empty when none are available for the requested dates.
|
|
108
|
+
- `warnings` (only if you passed `filters` alongside `hotel_name`/`hotel_ids`): explains that filters were dropped because Mode A wins on name match.
|
|
109
|
+
|
|
110
|
+
### Error handling — `HOTEL_NAME_LOW_CONFIDENCE`
|
|
111
|
+
|
|
112
|
+
When `hotel_name` is used but no candidate clears the auto-pick threshold (~0.7), the server returns HTTP 422 with this body:
|
|
113
|
+
|
|
114
|
+
```json
|
|
115
|
+
{
|
|
116
|
+
"error": {
|
|
117
|
+
"code": "HOTEL_NAME_LOW_CONFIDENCE",
|
|
118
|
+
"message": "No high-confidence match for 'Hotel Calimal' in Florence, IT (top score 0.45).",
|
|
119
|
+
"top_candidates": [
|
|
120
|
+
{ "hotel_id": "lp220fa7", "name": "Hotel Calimala Florence", "city": "Florence", "score": 0.45 },
|
|
121
|
+
{ "hotel_id": "lp657fada9", "name": "Hotel Calimala Milano", "city": "Milan", "score": 0.42 }
|
|
122
|
+
],
|
|
123
|
+
"suggested_retry": {
|
|
124
|
+
"destination": { "city_name": "Florence", "country_code": "it" },
|
|
125
|
+
"rationale": "search all Florence hotels instead of name-resolving"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
This is **actionable**, not fatal. Pick one:
|
|
132
|
+
|
|
133
|
+
1. **Top candidate is what the user meant** (typo / spelling variant) → confirm with the user, then retry `hotel_search` with `destination: { hotel_ids: ["<top.hotel_id>"] }`.
|
|
134
|
+
2. **None of the candidates fit** → use `suggested_retry.destination` to fall back to a city-level search. Tell the user: _"I couldn't pin down 'Hotel Calimal' — want me to search all Florence hotels instead?"_
|
|
135
|
+
3. **User likely meant a different city** → ask the user to clarify the city/country, then retry with `hotel_name` + the corrected `country_code` / `city_name`.
|
|
136
|
+
|
|
137
|
+
Don't silently auto-pick a low-confidence candidate — booking the wrong hotel is worse than asking one clarifying question.
|
|
138
|
+
|
|
77
139
|
## hotel_details
|
|
78
140
|
|
|
79
141
|
Optional follow-up to `hotel_search`. Returns rich metadata for a single hotel — gallery, full facilities list, policies, per-room metadata (bed types, size, amenities, views). Use when the user wants more info on a specific result before booking.
|