@curless/hotel-storefront 0.85.0 → 0.87.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server.d.ts +1 -1
- package/dist/server.js +1 -1
- package/dist/tools/accept-terms.d.ts +4 -0
- package/dist/tools/accept-terms.d.ts.map +1 -0
- package/dist/tools/accept-terms.js +26 -0
- package/dist/tools/accept-terms.js.map +1 -0
- package/dist/tools/add-booking-addon.d.ts +4 -0
- package/dist/tools/add-booking-addon.d.ts.map +1 -0
- package/dist/tools/add-booking-addon.js +44 -0
- package/dist/tools/add-booking-addon.js.map +1 -0
- package/dist/tools/add-to-trip.d.ts +4 -0
- package/dist/tools/add-to-trip.d.ts.map +1 -0
- package/dist/tools/add-to-trip.js +49 -0
- package/dist/tools/add-to-trip.js.map +1 -0
- package/dist/tools/all-tools.d.ts +19124 -0
- package/dist/tools/all-tools.d.ts.map +1 -0
- package/dist/tools/all-tools.js +43 -0
- package/dist/tools/all-tools.js.map +1 -0
- package/dist/tools/answer.d.ts +3 -0
- package/dist/tools/answer.d.ts.map +1 -0
- package/dist/tools/answer.js +104 -0
- package/dist/tools/answer.js.map +1 -0
- package/dist/tools/args.d.ts +149 -0
- package/dist/tools/args.d.ts.map +1 -0
- package/dist/tools/args.js +176 -0
- package/dist/tools/args.js.map +1 -0
- package/dist/tools/base-output-schemas.d.ts +3 -0
- package/dist/tools/base-output-schemas.d.ts.map +1 -0
- package/dist/tools/base-output-schemas.js +396 -0
- package/dist/tools/base-output-schemas.js.map +1 -0
- package/dist/tools/book-picked.d.ts +4 -0
- package/dist/tools/book-picked.d.ts.map +1 -0
- package/dist/tools/book-picked.js +14 -0
- package/dist/tools/book-picked.js.map +1 -0
- package/dist/tools/booking-answer.d.ts +24 -0
- package/dist/tools/booking-answer.d.ts.map +1 -0
- package/dist/tools/booking-answer.js +567 -0
- package/dist/tools/booking-answer.js.map +1 -0
- package/dist/tools/buy-shop-item.d.ts +4 -0
- package/dist/tools/buy-shop-item.d.ts.map +1 -0
- package/dist/tools/buy-shop-item.js +45 -0
- package/dist/tools/buy-shop-item.js.map +1 -0
- package/dist/tools/call.d.ts +11 -0
- package/dist/tools/call.d.ts.map +1 -0
- package/dist/tools/call.js +2 -0
- package/dist/tools/call.js.map +1 -0
- package/dist/tools/cancel-facts.d.ts +281 -0
- package/dist/tools/cancel-facts.d.ts.map +1 -0
- package/dist/tools/cancel-facts.js +309 -0
- package/dist/tools/cancel-facts.js.map +1 -0
- package/dist/tools/cancel.d.ts +4 -0
- package/dist/tools/cancel.d.ts.map +1 -0
- package/dist/tools/cancel.js +415 -0
- package/dist/tools/cancel.js.map +1 -0
- package/dist/tools/capability-adjust.d.ts +31 -0
- package/dist/tools/capability-adjust.d.ts.map +1 -0
- package/dist/tools/capability-adjust.js +299 -0
- package/dist/tools/capability-adjust.js.map +1 -0
- package/dist/tools/card-addons.d.ts +4 -0
- package/dist/tools/card-addons.d.ts.map +1 -0
- package/dist/tools/card-addons.js +76 -0
- package/dist/tools/card-addons.js.map +1 -0
- package/dist/tools/change-booking.d.ts +4 -0
- package/dist/tools/change-booking.d.ts.map +1 -0
- package/dist/tools/change-booking.js +145 -0
- package/dist/tools/change-booking.js.map +1 -0
- package/dist/tools/clear-trip.d.ts +4 -0
- package/dist/tools/clear-trip.d.ts.map +1 -0
- package/dist/tools/clear-trip.js +10 -0
- package/dist/tools/clear-trip.js.map +1 -0
- package/dist/tools/compare.d.ts +4 -0
- package/dist/tools/compare.d.ts.map +1 -0
- package/dist/tools/compare.js +114 -0
- package/dist/tools/compare.js.map +1 -0
- package/dist/tools/current-trip.d.ts +70 -0
- package/dist/tools/current-trip.d.ts.map +1 -0
- package/dist/tools/current-trip.js +269 -0
- package/dist/tools/current-trip.js.map +1 -0
- package/dist/tools/deps.d.ts +229 -0
- package/dist/tools/deps.d.ts.map +1 -0
- package/dist/tools/deps.js +2 -0
- package/dist/tools/deps.js.map +1 -0
- package/dist/tools/follow-ups.d.ts +120 -0
- package/dist/tools/follow-ups.d.ts.map +1 -0
- package/dist/tools/follow-ups.js +369 -0
- package/dist/tools/follow-ups.js.map +1 -0
- package/dist/tools/forget-preferences.d.ts +4 -0
- package/dist/tools/forget-preferences.d.ts.map +1 -0
- package/dist/tools/forget-preferences.js +24 -0
- package/dist/tools/forget-preferences.js.map +1 -0
- package/dist/tools/get-hotel.d.ts +4 -0
- package/dist/tools/get-hotel.d.ts.map +1 -0
- package/dist/tools/get-hotel.js +350 -0
- package/dist/tools/get-hotel.js.map +1 -0
- package/dist/tools/hotel-choices.d.ts +132 -0
- package/dist/tools/hotel-choices.d.ts.map +1 -0
- package/dist/tools/hotel-choices.js +587 -0
- package/dist/tools/hotel-choices.js.map +1 -0
- package/dist/tools/itinerary.d.ts +4 -0
- package/dist/tools/itinerary.d.ts.map +1 -0
- package/dist/tools/itinerary.js +158 -0
- package/dist/tools/itinerary.js.map +1 -0
- package/dist/tools/list-booking-addons.d.ts +4 -0
- package/dist/tools/list-booking-addons.d.ts.map +1 -0
- package/dist/tools/list-booking-addons.js +21 -0
- package/dist/tools/list-booking-addons.js.map +1 -0
- package/dist/tools/list-bookings.d.ts +4 -0
- package/dist/tools/list-bookings.d.ts.map +1 -0
- package/dist/tools/list-bookings.js +119 -0
- package/dist/tools/list-bookings.js.map +1 -0
- package/dist/tools/list-extras.d.ts +4 -0
- package/dist/tools/list-extras.d.ts.map +1 -0
- package/dist/tools/list-extras.js +90 -0
- package/dist/tools/list-extras.js.map +1 -0
- package/dist/tools/list-hotels-ask.d.ts +133 -0
- package/dist/tools/list-hotels-ask.d.ts.map +1 -0
- package/dist/tools/list-hotels-ask.js +326 -0
- package/dist/tools/list-hotels-ask.js.map +1 -0
- package/dist/tools/list-hotels-empty.d.ts +5 -0
- package/dist/tools/list-hotels-empty.d.ts.map +1 -0
- package/dist/tools/list-hotels-empty.js +130 -0
- package/dist/tools/list-hotels-empty.js.map +1 -0
- package/dist/tools/list-hotels-home.d.ts +9 -0
- package/dist/tools/list-hotels-home.d.ts.map +1 -0
- package/dist/tools/list-hotels-home.js +181 -0
- package/dist/tools/list-hotels-home.js.map +1 -0
- package/dist/tools/list-hotels-page.d.ts +43 -0
- package/dist/tools/list-hotels-page.d.ts.map +1 -0
- package/dist/tools/list-hotels-page.js +344 -0
- package/dist/tools/list-hotels-page.js.map +1 -0
- package/dist/tools/list-hotels.d.ts +4 -0
- package/dist/tools/list-hotels.d.ts.map +1 -0
- package/dist/tools/list-hotels.js +24 -0
- package/dist/tools/list-hotels.js.map +1 -0
- package/dist/tools/list-shop-items.d.ts +4 -0
- package/dist/tools/list-shop-items.d.ts.map +1 -0
- package/dist/tools/list-shop-items.js +34 -0
- package/dist/tools/list-shop-items.js.map +1 -0
- package/dist/tools/list-shop-orders.d.ts +4 -0
- package/dist/tools/list-shop-orders.d.ts.map +1 -0
- package/dist/tools/list-shop-orders.js +22 -0
- package/dist/tools/list-shop-orders.js.map +1 -0
- package/dist/tools/look-up.d.ts +4 -0
- package/dist/tools/look-up.d.ts.map +1 -0
- package/dist/tools/look-up.js +207 -0
- package/dist/tools/look-up.js.map +1 -0
- package/dist/tools/output-schemas.d.ts +645 -0
- package/dist/tools/output-schemas.d.ts.map +1 -0
- package/dist/tools/output-schemas.js +503 -0
- package/dist/tools/output-schemas.js.map +1 -0
- package/dist/tools/paid-lines.d.ts +718 -0
- package/dist/tools/paid-lines.d.ts.map +1 -0
- package/dist/tools/paid-lines.js +359 -0
- package/dist/tools/paid-lines.js.map +1 -0
- package/dist/tools/pay-with-union-pay.d.ts +4 -0
- package/dist/tools/pay-with-union-pay.d.ts.map +1 -0
- package/dist/tools/pay-with-union-pay.js +112 -0
- package/dist/tools/pay-with-union-pay.js.map +1 -0
- package/dist/tools/payment-words.d.ts +269 -0
- package/dist/tools/payment-words.d.ts.map +1 -0
- package/dist/tools/payment-words.js +365 -0
- package/dist/tools/payment-words.js.map +1 -0
- package/dist/tools/pick-room.d.ts +4 -0
- package/dist/tools/pick-room.d.ts.map +1 -0
- package/dist/tools/pick-room.js +23 -0
- package/dist/tools/pick-room.js.map +1 -0
- package/dist/tools/policies.d.ts +4 -0
- package/dist/tools/policies.d.ts.map +1 -0
- package/dist/tools/policies.js +74 -0
- package/dist/tools/policies.js.map +1 -0
- package/dist/tools/pricing.d.ts +55 -0
- package/dist/tools/pricing.d.ts.map +1 -0
- package/dist/tools/pricing.js +260 -0
- package/dist/tools/pricing.js.map +1 -0
- package/dist/tools/put-room-line.d.ts +12 -0
- package/dist/tools/put-room-line.d.ts.map +1 -0
- package/dist/tools/put-room-line.js +347 -0
- package/dist/tools/put-room-line.js.map +1 -0
- package/dist/tools/quote-card.d.ts +234 -0
- package/dist/tools/quote-card.d.ts.map +1 -0
- package/dist/tools/quote-card.js +375 -0
- package/dist/tools/quote-card.js.map +1 -0
- package/dist/tools/refund-booking.d.ts +4 -0
- package/dist/tools/refund-booking.d.ts.map +1 -0
- package/dist/tools/refund-booking.js +112 -0
- package/dist/tools/refund-booking.js.map +1 -0
- package/dist/tools/request-booking.d.ts +4 -0
- package/dist/tools/request-booking.d.ts.map +1 -0
- package/dist/tools/request-booking.js +5 -0
- package/dist/tools/request-booking.js.map +1 -0
- package/dist/tools/request-words.d.ts +238 -0
- package/dist/tools/request-words.d.ts.map +1 -0
- package/dist/tools/request-words.js +487 -0
- package/dist/tools/request-words.js.map +1 -0
- package/dist/tools/room-choices.d.ts +64 -0
- package/dist/tools/room-choices.d.ts.map +1 -0
- package/dist/tools/room-choices.js +374 -0
- package/dist/tools/room-choices.js.map +1 -0
- package/dist/tools/session-notes.d.ts +164 -0
- package/dist/tools/session-notes.d.ts.map +1 -0
- package/dist/tools/session-notes.js +412 -0
- package/dist/tools/session-notes.js.map +1 -0
- package/dist/tools/sign-in.d.ts +4 -0
- package/dist/tools/sign-in.d.ts.map +1 -0
- package/dist/tools/sign-in.js +72 -0
- package/dist/tools/sign-in.js.map +1 -0
- package/dist/tools/sign-out.d.ts +4 -0
- package/dist/tools/sign-out.d.ts.map +1 -0
- package/dist/tools/sign-out.js +13 -0
- package/dist/tools/sign-out.js.map +1 -0
- package/dist/tools/terms-answer.d.ts +114 -0
- package/dist/tools/terms-answer.d.ts.map +1 -0
- package/dist/tools/terms-answer.js +492 -0
- package/dist/tools/terms-answer.js.map +1 -0
- package/dist/tools/tool-defs-account.d.ts +80 -0
- package/dist/tools/tool-defs-account.d.ts.map +1 -0
- package/dist/tools/tool-defs-account.js +65 -0
- package/dist/tools/tool-defs-account.js.map +1 -0
- package/dist/tools/tool-defs-addons.d.ts +251 -0
- package/dist/tools/tool-defs-addons.d.ts.map +1 -0
- package/dist/tools/tool-defs-addons.js +198 -0
- package/dist/tools/tool-defs-addons.js.map +1 -0
- package/dist/tools/tool-defs-booking.d.ts +410 -0
- package/dist/tools/tool-defs-booking.d.ts.map +1 -0
- package/dist/tools/tool-defs-booking.js +285 -0
- package/dist/tools/tool-defs-booking.js.map +1 -0
- package/dist/tools/tool-defs-browse.d.ts +444 -0
- package/dist/tools/tool-defs-browse.d.ts.map +1 -0
- package/dist/tools/tool-defs-browse.js +307 -0
- package/dist/tools/tool-defs-browse.js.map +1 -0
- package/dist/tools/tool-defs-trip.d.ts +136 -0
- package/dist/tools/tool-defs-trip.d.ts.map +1 -0
- package/dist/tools/tool-defs-trip.js +79 -0
- package/dist/tools/tool-defs-trip.js.map +1 -0
- package/dist/tools/tool-env.d.ts +64 -0
- package/dist/tools/tool-env.d.ts.map +1 -0
- package/dist/tools/tool-env.js +49 -0
- package/dist/tools/tool-env.js.map +1 -0
- package/dist/tools/tool-set.d.ts +1425 -0
- package/dist/tools/tool-set.d.ts.map +1 -0
- package/dist/tools/tool-set.js +244 -0
- package/dist/tools/tool-set.js.map +1 -0
- package/dist/tools/view-trip.d.ts +4 -0
- package/dist/tools/view-trip.d.ts.map +1 -0
- package/dist/tools/view-trip.js +7 -0
- package/dist/tools/view-trip.js.map +1 -0
- package/dist/tools.d.ts +13 -2089
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +11 -10685
- package/dist/tools.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { SHOP_ORDERS_DESCRIPTION } from './output-schemas.js';
|
|
2
|
+
import { books, orders, reads } from './tool-set.js';
|
|
3
|
+
// The tools of the add-ons of a booking, and of the add-on shop.
|
|
4
|
+
export const listBookingAddonsTool = ({ n, open }) => ({
|
|
5
|
+
name: n.listBookingAddons,
|
|
6
|
+
description: 'What can be added to a booking made here after it was made - an airport transfer and the like - each with its id, name, price and the details it needs. Only a booking made here has any.',
|
|
7
|
+
annotations: reads('Add-ons for a booking', open),
|
|
8
|
+
inputSchema: {
|
|
9
|
+
type: 'object',
|
|
10
|
+
properties: {
|
|
11
|
+
booking: {
|
|
12
|
+
type: 'string',
|
|
13
|
+
description: 'The confirmation code or order id, as the booking answer gave it',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
required: ['booking'],
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
export const addBookingAddonTool = ({ n, open }) => ({
|
|
20
|
+
name: n.addBookingAddon,
|
|
21
|
+
// ⚠️ 0.82.0: THIS TOOL NEVER ADDS ANYTHING. It prepares the add-on and answers with a one-time page
|
|
22
|
+
// the GUEST opens and presses confirm on (the same press the card's button is): nothing is sent to the
|
|
23
|
+
// group, and nothing is ever said to be added, until that press.
|
|
24
|
+
description: 'Prepares adding one add-on to a booking made here, at the price the add-on list gave. It does NOT add it: the answer gives a one-time page address for the guest to open in the browser signed in to their account, where they see the add-on, the price, the total and the booking, and press confirm themselves. Pass that link on; never say the add-on was added until the guest has confirmed it and the booking says so. It checks the id, the details and the price again as it prepares, and refuses a booking that is not theirs or is over.',
|
|
25
|
+
annotations: books('Prepare an add-on for a booking', open),
|
|
26
|
+
inputSchema: {
|
|
27
|
+
type: 'object',
|
|
28
|
+
properties: {
|
|
29
|
+
booking: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
description: 'The confirmation code or order id, as the booking answer gave it',
|
|
32
|
+
},
|
|
33
|
+
addon: { type: 'string', description: 'The add-on id, as the add-on list gave it' },
|
|
34
|
+
direction: {
|
|
35
|
+
type: 'string',
|
|
36
|
+
enum: ['arrival', 'departure', 'round_trip'],
|
|
37
|
+
description: 'For a transfer: to the hotel, from it, or both',
|
|
38
|
+
},
|
|
39
|
+
flightNo: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
description: 'For a transfer: the flight number, e.g. MU5101',
|
|
42
|
+
},
|
|
43
|
+
pickupTime: { type: 'string', description: 'For a transfer: the pick-up time, HH:MM' },
|
|
44
|
+
date: { type: 'string', description: 'The date it is for, YYYY-MM-DD' },
|
|
45
|
+
quantity: {
|
|
46
|
+
type: 'integer',
|
|
47
|
+
minimum: 1,
|
|
48
|
+
maximum: 10,
|
|
49
|
+
description: 'How many, 1 to 10, for an add-on that is bought by the piece. Default 1',
|
|
50
|
+
},
|
|
51
|
+
partySize: {
|
|
52
|
+
type: 'integer',
|
|
53
|
+
minimum: 1,
|
|
54
|
+
maximum: 10,
|
|
55
|
+
description: 'For a transfer: how many passengers, 1 to 10. Default 1',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
required: ['booking', 'addon'],
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
// The add-on shop (`capabilities.shop`): goods sold beside the rooms. Not instructions - what the tools do.
|
|
62
|
+
export const shopItemsTools = ({ n, open }) => {
|
|
63
|
+
return n.listShopItems
|
|
64
|
+
? [
|
|
65
|
+
{
|
|
66
|
+
name: n.listShopItems,
|
|
67
|
+
description: "The value-added services (增值服务): goods in Otaless's shop to buy for a stay, not rooms - each with its id, name, price and currency, whether it is available and its options. With `item` it opens one item. It only reads the shop; nothing is ordered.",
|
|
68
|
+
annotations: reads('Shop items', open),
|
|
69
|
+
inputSchema: {
|
|
70
|
+
type: 'object',
|
|
71
|
+
properties: {
|
|
72
|
+
query: { type: 'string', description: 'Words in the item name' },
|
|
73
|
+
category: { type: 'string', description: "One of the shop's categories" },
|
|
74
|
+
maxPrice: {
|
|
75
|
+
type: 'number',
|
|
76
|
+
minimum: 0,
|
|
77
|
+
description: "The highest price, in the shop's currency (US dollars)",
|
|
78
|
+
},
|
|
79
|
+
item: {
|
|
80
|
+
type: 'string',
|
|
81
|
+
description: 'An item id, as this tool listed it, for that one item in detail',
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
]
|
|
87
|
+
: [];
|
|
88
|
+
};
|
|
89
|
+
// ⚠️ THE ACCOUNT'S VALUE-ADDED SERVICE ORDERS ON THEIR OWN (0.84.1, robin 11-25: 「首选把我酒店预订订单先
|
|
90
|
+
// 出来,然后没有时间」): asked for its shop orders, the model read the hotel bookings first. Read only.
|
|
91
|
+
export const shopOrdersTools = ({ n, open }) => {
|
|
92
|
+
return n.listShopOrders
|
|
93
|
+
? [
|
|
94
|
+
{
|
|
95
|
+
name: n.listShopOrders,
|
|
96
|
+
description: SHOP_ORDERS_DESCRIPTION,
|
|
97
|
+
annotations: reads('Value-added service orders', open),
|
|
98
|
+
inputSchema: { type: 'object', properties: {} },
|
|
99
|
+
},
|
|
100
|
+
]
|
|
101
|
+
: [];
|
|
102
|
+
};
|
|
103
|
+
export const buyShopItemTools = ({ n, open }) => {
|
|
104
|
+
return n.buyShopItem
|
|
105
|
+
? [
|
|
106
|
+
{
|
|
107
|
+
name: n.buyShopItem,
|
|
108
|
+
description: "Prepares buying one value-added service (增值服务: a shop item) to go with the guest's own hotel booking. It does NOT order or charge anything: the answer gives a one-time page address for the guest to open in the browser signed in to their account, where they see the item, the quantity and the total and press confirm themselves - and when they do, the backend charges a card linked to their account, or gives a payment link if there is none. Pass that link on; never say the item was ordered or paid until the guest confirmed and the shop says so. It checks the price against the one the guest was shown and refuses a booking that is not theirs or is over.",
|
|
109
|
+
annotations: books('Prepare a shop purchase', open),
|
|
110
|
+
inputSchema: {
|
|
111
|
+
type: 'object',
|
|
112
|
+
properties: {
|
|
113
|
+
item: { type: 'string', description: 'The item id, as the shop listing gave it' },
|
|
114
|
+
option: {
|
|
115
|
+
type: 'string',
|
|
116
|
+
description: "One of the item's options, exactly as listed - for an item that has options",
|
|
117
|
+
},
|
|
118
|
+
quantity: {
|
|
119
|
+
type: 'integer',
|
|
120
|
+
minimum: 1,
|
|
121
|
+
maximum: 10,
|
|
122
|
+
description: 'How many, 1 to 10',
|
|
123
|
+
},
|
|
124
|
+
booking: {
|
|
125
|
+
type: 'string',
|
|
126
|
+
description: "The confirmation code of the guest's own hotel booking this goes with",
|
|
127
|
+
},
|
|
128
|
+
unitPrice: {
|
|
129
|
+
type: 'number',
|
|
130
|
+
exclusiveMinimum: 0,
|
|
131
|
+
description: 'The price of one, as the guest was shown it',
|
|
132
|
+
},
|
|
133
|
+
currency: {
|
|
134
|
+
type: 'string',
|
|
135
|
+
description: 'Its currency code, as the guest was shown it',
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
required: ['item', 'quantity', 'booking', 'unitPrice', 'currency'],
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
]
|
|
142
|
+
: [];
|
|
143
|
+
};
|
|
144
|
+
// ⚠️ THE CARD'S OWN STEPS FOR ADDING TO A BOOKING (0.82.0, app-only: server.ts). Every write needs the
|
|
145
|
+
// guest's own press on the confirm screen: its `press` is made once per screen, and a value the
|
|
146
|
+
// screen did not show is `used`. No parameter here means "confirmed" - the press is the whole yes.
|
|
147
|
+
export const cardAddonsTools = ({ n, open }) => {
|
|
148
|
+
return n.cardAddons
|
|
149
|
+
? [
|
|
150
|
+
{
|
|
151
|
+
name: n.cardAddons,
|
|
152
|
+
description: `The card's own steps for the value-added services (增值服务) of a booking made here: \`view\` reads what can be added (the shop's goods, and the hotel's own services where they are offered) fresh; \`buy_shop_item\` (and \`book_hotel_addon\`, where hotel services are offered) is the guest's press on a confirm screen that showed the item, the quantity and the total - each answers with \`addonResult\` and a fresh \`addonsView\`; \`shop_status\` reads whether a shop \`order\` the guest is paying for is paid yet (a read, nothing changes). Never the assistant's: nothing here is called without the guest's press.`,
|
|
153
|
+
annotations: orders('Add to a booking', open),
|
|
154
|
+
inputSchema: {
|
|
155
|
+
type: 'object',
|
|
156
|
+
properties: {
|
|
157
|
+
action: {
|
|
158
|
+
type: 'string',
|
|
159
|
+
enum: ['view', 'book_hotel_addon', 'buy_shop_item', 'shop_status'],
|
|
160
|
+
},
|
|
161
|
+
booking: {
|
|
162
|
+
type: 'string',
|
|
163
|
+
description: "The confirmation code of the guest's own booking",
|
|
164
|
+
},
|
|
165
|
+
catalogId: { type: 'string', description: 'book_hotel_addon: the add-on id' },
|
|
166
|
+
direction: { type: 'string', enum: ['arrival', 'departure', 'round_trip'] },
|
|
167
|
+
flightNo: { type: 'string' },
|
|
168
|
+
pickupTime: { type: 'string', description: 'HH:MM' },
|
|
169
|
+
date: { type: 'string', description: 'YYYY-MM-DD' },
|
|
170
|
+
quantity: { type: 'integer', minimum: 1, maximum: 10 },
|
|
171
|
+
partySize: { type: 'integer', minimum: 1, maximum: 10 },
|
|
172
|
+
shownTotal: {
|
|
173
|
+
type: 'string',
|
|
174
|
+
description: 'book_hotel_addon: the total the confirm screen showed, 2 decimals',
|
|
175
|
+
},
|
|
176
|
+
currency: { type: 'string', description: 'The currency the screen showed' },
|
|
177
|
+
item: { type: 'string', description: 'buy_shop_item: the shop item id' },
|
|
178
|
+
order: {
|
|
179
|
+
type: 'string',
|
|
180
|
+
description: 'shop_status: the shop order id buy_shop_item answered with',
|
|
181
|
+
},
|
|
182
|
+
option: { type: 'string', description: 'buy_shop_item: the option, as listed' },
|
|
183
|
+
shownUnit: {
|
|
184
|
+
type: 'string',
|
|
185
|
+
description: 'buy_shop_item: the price of one the screen showed, 2 decimals',
|
|
186
|
+
},
|
|
187
|
+
press: {
|
|
188
|
+
type: 'string',
|
|
189
|
+
description: 'Made once per confirm screen and sent again unchanged on a retry of the same screen',
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
required: ['action', 'booking'],
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
]
|
|
196
|
+
: [];
|
|
197
|
+
};
|
|
198
|
+
//# sourceMappingURL=tool-defs-addons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-defs-addons.js","sourceRoot":"","sources":["../../src/tools/tool-defs-addons.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAErD,iEAAiE;AAEjE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EAAE,CAAC,EAAE,IAAI,EAAW,EAAE,EAAE,CAC5D,CAAC;IACC,IAAI,EAAE,CAAC,CAAC,iBAAiB;IACzB,WAAW,EACT,2LAA2L;IAC7L,WAAW,EAAE,KAAK,CAAC,uBAAuB,EAAE,IAAI,CAAC;IACjD,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kEAAkE;aAChF;SACF;QACD,QAAQ,EAAE,CAAC,SAAS,CAAC;KACtB;CACF,CAAU,CAAC;AAEd,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAAE,CAAC,EAAE,IAAI,EAAW,EAAE,EAAE,CAC1D,CAAC;IACC,IAAI,EAAE,CAAC,CAAC,eAAe;IACvB,oGAAoG;IACpG,uGAAuG;IACvG,iEAAiE;IACjE,WAAW,EACT,uhBAAuhB;IACzhB,WAAW,EAAE,KAAK,CAAC,iCAAiC,EAAE,IAAI,CAAC;IAC3D,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kEAAkE;aAChF;YACD,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ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E,IAAI,EAAE,QAAQ,EAAE;wBAC5B,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE;wBACpD,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE;wBACnD,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;wBACtD,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;wBACvD,UAAU,EAAE;4BACV,IAAI,EAAE,QAAQ;4BACd,WAAW,EAAE,mEAAmE;yBACjF;wBACD,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,gCAAgC,EAAE;wBAC3E,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,iCAAiC,EAAE;wBACxE,KAAK,EAAE;4BACL,IAAI,EAAE,QAAQ;4BACd,WAAW,EAAE,4DAA4D;yBAC1E;wBACD,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,sCAAsC,EAAE;wBAC/E,SAAS,EAAE;4BACT,IAAI,EAAE,QAAQ;4BACd,WAAW,EAAE,+DAA+D;yBAC7E;wBACD,KAAK,EAAE;4BACL,IAAI,EAAE,QAAQ;4BACd,WAAW,EACT,qFAAqF;yBACxF;qBACF;oBACD,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;iBAChC;aACF;SACQ;QACb,CAAC,CAAE,EAAY,CAAC;AACpB,CAAC,CAAC"}
|
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
import type { ToolEnv } from './tool-env.js';
|
|
2
|
+
export declare const requestBookingTool: ({ n, v, open, guestProps }: ToolEnv) => {
|
|
3
|
+
readonly name: `request_${string}booking`;
|
|
4
|
+
readonly description: string;
|
|
5
|
+
readonly annotations: {
|
|
6
|
+
readonly title: string;
|
|
7
|
+
readonly readOnlyHint: false;
|
|
8
|
+
readonly destructiveHint: true;
|
|
9
|
+
readonly idempotentHint: false;
|
|
10
|
+
readonly openWorldHint: boolean;
|
|
11
|
+
};
|
|
12
|
+
readonly inputSchema: {
|
|
13
|
+
readonly type: "object";
|
|
14
|
+
readonly properties: {
|
|
15
|
+
readonly group?: {
|
|
16
|
+
type: string;
|
|
17
|
+
description: string;
|
|
18
|
+
} | undefined;
|
|
19
|
+
readonly name: {
|
|
20
|
+
readonly type: "string";
|
|
21
|
+
readonly description: "The guest's full name, as it should appear on the booking";
|
|
22
|
+
};
|
|
23
|
+
readonly email: {
|
|
24
|
+
readonly type: "string";
|
|
25
|
+
readonly description: "The email the confirmation goes to";
|
|
26
|
+
};
|
|
27
|
+
readonly phone: {
|
|
28
|
+
readonly type: "string";
|
|
29
|
+
readonly description: "Optional";
|
|
30
|
+
};
|
|
31
|
+
readonly requests: {
|
|
32
|
+
readonly type: "array";
|
|
33
|
+
readonly items: {
|
|
34
|
+
readonly type: "string";
|
|
35
|
+
readonly enum: import("../types.js").RoomRequestKind[];
|
|
36
|
+
};
|
|
37
|
+
readonly description: "Preferences the desk tries to meet on the day. None of them is held; the answer says so";
|
|
38
|
+
};
|
|
39
|
+
readonly arrivingAt: {
|
|
40
|
+
readonly type: "string";
|
|
41
|
+
readonly description: "What time the guest reaches the hotel, `HH:MM` on the hotel's own clock. A time counts as a late arrival on its own";
|
|
42
|
+
};
|
|
43
|
+
readonly notes: {
|
|
44
|
+
readonly type: "string";
|
|
45
|
+
readonly description: "Anything else for the desk, in the guest's own words, up to 200 characters";
|
|
46
|
+
};
|
|
47
|
+
readonly rememberRequests: {
|
|
48
|
+
readonly type: "boolean";
|
|
49
|
+
readonly description: "True when the guest asked for these room preferences to be remembered for their next stays. Needs a signed-in member; what is kept is the lasting kind - a bed type, a floor, a quiet or connecting room; an accessible room is asked for on each stay and is not kept";
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
readonly required: readonly ["name", "email"];
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
export declare const bookPickedTool: ({ n, v, open, stayProps, guestProps }: ToolEnv) => {
|
|
56
|
+
readonly name: `book_picked_${string}room`;
|
|
57
|
+
readonly description: "The card's own step when the guest submits the booking form for the room they picked with Reserve: books that one room for the named guest, the way a trip's rooms are booked. Leaves the trip as it is.";
|
|
58
|
+
readonly annotations: {
|
|
59
|
+
readonly title: string;
|
|
60
|
+
readonly readOnlyHint: false;
|
|
61
|
+
readonly destructiveHint: true;
|
|
62
|
+
readonly idempotentHint: false;
|
|
63
|
+
readonly openWorldHint: boolean;
|
|
64
|
+
};
|
|
65
|
+
readonly inputSchema: {
|
|
66
|
+
readonly type: "object";
|
|
67
|
+
readonly properties: {
|
|
68
|
+
readonly startTime: {
|
|
69
|
+
readonly type: "string";
|
|
70
|
+
readonly description: "For a room by the hour: the start the form shows, HH:MM";
|
|
71
|
+
};
|
|
72
|
+
readonly checkIn: {
|
|
73
|
+
readonly type: "string";
|
|
74
|
+
readonly pattern: "^\\d{4}-\\d{2}-\\d{2}$";
|
|
75
|
+
readonly description: `${string}, as YYYY-MM-DD`;
|
|
76
|
+
};
|
|
77
|
+
readonly checkOut: {
|
|
78
|
+
readonly type: "string";
|
|
79
|
+
readonly pattern: "^\\d{4}-\\d{2}-\\d{2}$";
|
|
80
|
+
readonly description: `${string}, as YYYY-MM-DD`;
|
|
81
|
+
};
|
|
82
|
+
readonly guests: {
|
|
83
|
+
readonly type: "integer";
|
|
84
|
+
readonly minimum: 1;
|
|
85
|
+
readonly maximum: 8;
|
|
86
|
+
readonly description: "People in the room. Default 2";
|
|
87
|
+
};
|
|
88
|
+
readonly hotel: {
|
|
89
|
+
readonly type: "string";
|
|
90
|
+
readonly description: `The ${string} id on the form`;
|
|
91
|
+
};
|
|
92
|
+
readonly room: {
|
|
93
|
+
readonly type: "string";
|
|
94
|
+
readonly description: "The room type id on the form";
|
|
95
|
+
};
|
|
96
|
+
readonly rooms: {
|
|
97
|
+
readonly type: "integer";
|
|
98
|
+
readonly minimum: 1;
|
|
99
|
+
readonly maximum: 5;
|
|
100
|
+
readonly description: "How many of that room type the form shows";
|
|
101
|
+
};
|
|
102
|
+
readonly name: {
|
|
103
|
+
readonly type: "string";
|
|
104
|
+
readonly description: "The guest's full name, as it should appear on the booking";
|
|
105
|
+
};
|
|
106
|
+
readonly email: {
|
|
107
|
+
readonly type: "string";
|
|
108
|
+
readonly description: "The email the confirmation goes to";
|
|
109
|
+
};
|
|
110
|
+
readonly phone: {
|
|
111
|
+
readonly type: "string";
|
|
112
|
+
readonly description: "Optional";
|
|
113
|
+
};
|
|
114
|
+
readonly requests: {
|
|
115
|
+
readonly type: "array";
|
|
116
|
+
readonly items: {
|
|
117
|
+
readonly type: "string";
|
|
118
|
+
readonly enum: import("../types.js").RoomRequestKind[];
|
|
119
|
+
};
|
|
120
|
+
readonly description: "Preferences the desk tries to meet on the day. None of them is held; the answer says so";
|
|
121
|
+
};
|
|
122
|
+
readonly arrivingAt: {
|
|
123
|
+
readonly type: "string";
|
|
124
|
+
readonly description: "What time the guest reaches the hotel, `HH:MM` on the hotel's own clock. A time counts as a late arrival on its own";
|
|
125
|
+
};
|
|
126
|
+
readonly notes: {
|
|
127
|
+
readonly type: "string";
|
|
128
|
+
readonly description: "Anything else for the desk, in the guest's own words, up to 200 characters";
|
|
129
|
+
};
|
|
130
|
+
readonly rememberRequests: {
|
|
131
|
+
readonly type: "boolean";
|
|
132
|
+
readonly description: "True when the guest asked for these room preferences to be remembered for their next stays. Needs a signed-in member; what is kept is the lasting kind - a bed type, a floor, a quiet or connecting room; an accessible room is asked for on each stay and is not kept";
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
readonly required: readonly ["name", "email"];
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
export declare const acceptTermsTool: ({ n, v, open }: ToolEnv) => {
|
|
139
|
+
readonly name: `card_${string}terms`;
|
|
140
|
+
readonly description: "The card's own step when the guest presses \"Agree and continue\" under a hotel group's booking terms: it sends the guest's agreement to the terms behind `ref` and the stay is then booked with the group. It answers like a booking: the booking's payment page, the terms again, or why nothing was booked.";
|
|
141
|
+
readonly annotations: {
|
|
142
|
+
readonly title: string;
|
|
143
|
+
readonly readOnlyHint: false;
|
|
144
|
+
readonly destructiveHint: true;
|
|
145
|
+
readonly idempotentHint: false;
|
|
146
|
+
readonly openWorldHint: boolean;
|
|
147
|
+
};
|
|
148
|
+
readonly inputSchema: {
|
|
149
|
+
readonly type: "object";
|
|
150
|
+
readonly properties: {
|
|
151
|
+
readonly ref: {
|
|
152
|
+
readonly type: "string";
|
|
153
|
+
readonly description: "The terms the card is showing, by the reference the booking answer gave";
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
readonly required: readonly ["ref"];
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
export declare const payWithUnionPayTool: ({ n, v }: ToolEnv) => {
|
|
160
|
+
readonly name: `pay_${string}booking_with_unionpay`;
|
|
161
|
+
readonly description: `Pays ${string} stay that is waiting for its payment with UnionPay instead of the card page. Answers UnionPay's own page to confirm it on - or, when that email has no UnionPay card on file, UnionPay's page to add one first. Nothing is charged by this call: the guest confirms on UnionPay's page, and the hotel charges the one-time card UnionPay issues for the stay.`;
|
|
162
|
+
readonly annotations: {
|
|
163
|
+
readonly title: "Pay with UnionPay";
|
|
164
|
+
readonly readOnlyHint: false;
|
|
165
|
+
readonly destructiveHint: false;
|
|
166
|
+
readonly idempotentHint: true;
|
|
167
|
+
readonly openWorldHint: true;
|
|
168
|
+
};
|
|
169
|
+
readonly inputSchema: {
|
|
170
|
+
readonly type: "object";
|
|
171
|
+
readonly properties: {
|
|
172
|
+
readonly booking: {
|
|
173
|
+
readonly type: "string";
|
|
174
|
+
readonly description: "The confirmation code of the stay waiting for its payment";
|
|
175
|
+
};
|
|
176
|
+
readonly email: {
|
|
177
|
+
readonly type: "string";
|
|
178
|
+
readonly description: "The email the stay was booked with";
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
readonly required: readonly ["booking", "email"];
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
export declare const listBookingsTool: ({ n, v, open }: ToolEnv) => {
|
|
185
|
+
readonly name: `list_my_${string}bookings`;
|
|
186
|
+
readonly description: "The bookings made in this conversation, newest to oldest, with their status, dates and confirmation codes. A booking made elsewhere is read and shown as well when both its confirmation code and the email it was made with are given; nothing is changed.";
|
|
187
|
+
readonly annotations: {
|
|
188
|
+
readonly title: string;
|
|
189
|
+
readonly readOnlyHint: true;
|
|
190
|
+
readonly destructiveHint: false;
|
|
191
|
+
readonly idempotentHint: true;
|
|
192
|
+
readonly openWorldHint: boolean;
|
|
193
|
+
};
|
|
194
|
+
readonly inputSchema: {
|
|
195
|
+
readonly type: "object";
|
|
196
|
+
readonly properties: {
|
|
197
|
+
readonly booking: {
|
|
198
|
+
readonly type: "string";
|
|
199
|
+
readonly description: "A confirmation code, with `email`, for a booking made elsewhere";
|
|
200
|
+
};
|
|
201
|
+
readonly email: {
|
|
202
|
+
readonly type: "string";
|
|
203
|
+
readonly description: "The email that booking was made with";
|
|
204
|
+
};
|
|
205
|
+
readonly limit: {
|
|
206
|
+
readonly type: "number";
|
|
207
|
+
readonly description: "Default 10";
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
export declare const previewCancellationTool: ({ n, open }: ToolEnv) => {
|
|
213
|
+
readonly name: `preview_${string}cancellation`;
|
|
214
|
+
readonly description: "What cancelling a booking would cost, with the rule it was worked out from and the free-cancellation deadline where the rate has one. Nothing is cancelled.";
|
|
215
|
+
readonly annotations: {
|
|
216
|
+
readonly title: string;
|
|
217
|
+
readonly readOnlyHint: true;
|
|
218
|
+
readonly destructiveHint: false;
|
|
219
|
+
readonly idempotentHint: true;
|
|
220
|
+
readonly openWorldHint: boolean;
|
|
221
|
+
};
|
|
222
|
+
readonly inputSchema: {
|
|
223
|
+
readonly type: "object";
|
|
224
|
+
readonly properties: {
|
|
225
|
+
readonly booking: {
|
|
226
|
+
readonly type: "string";
|
|
227
|
+
readonly description: "The confirmation code or booking id";
|
|
228
|
+
};
|
|
229
|
+
readonly email: {
|
|
230
|
+
readonly type: "string";
|
|
231
|
+
readonly description: "The email the booking was made with, when it was made elsewhere";
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
readonly required: readonly ["booking"];
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
export declare const cancelBookingTool: ({ n, open }: ToolEnv) => {
|
|
238
|
+
readonly name: `cancel_${string}booking`;
|
|
239
|
+
readonly description: "Cancels a booking. Called without `confirmed` it returns the cancellation preview - the fee and the rule behind it - and cancels nothing; it cancels only when `confirmed` is true.";
|
|
240
|
+
readonly annotations: {
|
|
241
|
+
readonly title: string;
|
|
242
|
+
readonly readOnlyHint: false;
|
|
243
|
+
readonly destructiveHint: true;
|
|
244
|
+
readonly idempotentHint: true;
|
|
245
|
+
readonly openWorldHint: boolean;
|
|
246
|
+
};
|
|
247
|
+
readonly inputSchema: {
|
|
248
|
+
readonly type: "object";
|
|
249
|
+
readonly properties: {
|
|
250
|
+
readonly booking: {
|
|
251
|
+
readonly type: "string";
|
|
252
|
+
readonly description: "The confirmation code or booking id";
|
|
253
|
+
};
|
|
254
|
+
readonly confirmed: {
|
|
255
|
+
readonly type: "boolean";
|
|
256
|
+
readonly description: "True cancels. Anything else returns the preview";
|
|
257
|
+
};
|
|
258
|
+
readonly reason: {
|
|
259
|
+
readonly type: "string";
|
|
260
|
+
readonly description: "Optional, kept on the booking";
|
|
261
|
+
};
|
|
262
|
+
readonly email: {
|
|
263
|
+
readonly type: "string";
|
|
264
|
+
readonly description: "The email the booking was made with, when it was made elsewhere";
|
|
265
|
+
};
|
|
266
|
+
};
|
|
267
|
+
readonly required: readonly ["booking"];
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
export declare const previewChangeTool: ({ n, v, open }: ToolEnv) => {
|
|
271
|
+
readonly name: `preview_${string}booking_change`;
|
|
272
|
+
readonly description: `What moving a booking to other nights, another room type or a different number of rooms - or putting an add-on on it, taking one off or changing how many - would cost: what it holds now, what it would hold, and the difference between them. The new nights are priced at what those nights cost today, not at the rate the booking was made on. A rate that cannot be moved, a ${string} that has no room left for the new nights and a booking that is already gone are each said in those words. Nothing is changed.`;
|
|
273
|
+
readonly annotations: {
|
|
274
|
+
readonly title: string;
|
|
275
|
+
readonly readOnlyHint: true;
|
|
276
|
+
readonly destructiveHint: false;
|
|
277
|
+
readonly idempotentHint: true;
|
|
278
|
+
readonly openWorldHint: boolean;
|
|
279
|
+
};
|
|
280
|
+
readonly inputSchema: {
|
|
281
|
+
readonly type: "object";
|
|
282
|
+
readonly properties: {
|
|
283
|
+
readonly booking: {
|
|
284
|
+
readonly type: "string";
|
|
285
|
+
readonly description: "The confirmation code or booking id";
|
|
286
|
+
};
|
|
287
|
+
readonly checkIn: {
|
|
288
|
+
readonly type: "string";
|
|
289
|
+
readonly description: "The new check-in, YYYY-MM-DD. Leave out to keep it";
|
|
290
|
+
};
|
|
291
|
+
readonly checkOut: {
|
|
292
|
+
readonly type: "string";
|
|
293
|
+
readonly description: "The new check-out, YYYY-MM-DD. Leave out to keep it";
|
|
294
|
+
};
|
|
295
|
+
readonly rooms: {
|
|
296
|
+
readonly type: "integer";
|
|
297
|
+
readonly minimum: 1;
|
|
298
|
+
readonly maximum: 5;
|
|
299
|
+
readonly description: "How many of that room type, 1 to 5. Leave out to keep it";
|
|
300
|
+
};
|
|
301
|
+
readonly room: {
|
|
302
|
+
readonly type: "string";
|
|
303
|
+
readonly description: "A different room type at the same hotel, by id or name";
|
|
304
|
+
};
|
|
305
|
+
readonly extra: {
|
|
306
|
+
readonly type: "string";
|
|
307
|
+
readonly description: `An add-on at this ${string}, by id or name, to put on the booking, take off or change - with \`quantity\``;
|
|
308
|
+
};
|
|
309
|
+
readonly quantity: {
|
|
310
|
+
readonly type: "integer";
|
|
311
|
+
readonly minimum: 0;
|
|
312
|
+
readonly maximum: 20;
|
|
313
|
+
readonly description: "How many of that add-on the booking should hold, 0 to 20; 0 takes it off";
|
|
314
|
+
};
|
|
315
|
+
readonly email: {
|
|
316
|
+
readonly type: "string";
|
|
317
|
+
readonly description: "The email the booking was made with, when it was made elsewhere";
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
readonly required: readonly ["booking"];
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
export declare const changeBookingTool: ({ n, v, open }: ToolEnv) => {
|
|
324
|
+
readonly name: `change_${string}booking`;
|
|
325
|
+
readonly description: "Moves a booking to other nights, another room type or a different number of rooms, or sets one of its add-ons (`extra` and `quantity`; 0 takes it off). Called without `confirmed` it returns the same preview - the two stays and the difference - and changes nothing; it changes only when `confirmed` is true. The confirmation code stays the same.";
|
|
326
|
+
readonly annotations: {
|
|
327
|
+
readonly title: string;
|
|
328
|
+
readonly readOnlyHint: false;
|
|
329
|
+
readonly destructiveHint: true;
|
|
330
|
+
readonly idempotentHint: true;
|
|
331
|
+
readonly openWorldHint: boolean;
|
|
332
|
+
};
|
|
333
|
+
readonly inputSchema: {
|
|
334
|
+
readonly type: "object";
|
|
335
|
+
readonly properties: {
|
|
336
|
+
readonly booking: {
|
|
337
|
+
readonly type: "string";
|
|
338
|
+
readonly description: "The confirmation code or booking id";
|
|
339
|
+
};
|
|
340
|
+
readonly checkIn: {
|
|
341
|
+
readonly type: "string";
|
|
342
|
+
readonly description: "The new check-in, YYYY-MM-DD. Leave out to keep it";
|
|
343
|
+
};
|
|
344
|
+
readonly checkOut: {
|
|
345
|
+
readonly type: "string";
|
|
346
|
+
readonly description: "The new check-out, YYYY-MM-DD. Leave out to keep it";
|
|
347
|
+
};
|
|
348
|
+
readonly rooms: {
|
|
349
|
+
readonly type: "integer";
|
|
350
|
+
readonly minimum: 1;
|
|
351
|
+
readonly maximum: 5;
|
|
352
|
+
readonly description: "How many of that room type, 1 to 5. Leave out to keep it";
|
|
353
|
+
};
|
|
354
|
+
readonly room: {
|
|
355
|
+
readonly type: "string";
|
|
356
|
+
readonly description: "A different room type at the same hotel, by id or name";
|
|
357
|
+
};
|
|
358
|
+
readonly extra: {
|
|
359
|
+
readonly type: "string";
|
|
360
|
+
readonly description: `An add-on at this ${string}, by id or name, to put on the booking, take off or change - with \`quantity\``;
|
|
361
|
+
};
|
|
362
|
+
readonly quantity: {
|
|
363
|
+
readonly type: "integer";
|
|
364
|
+
readonly minimum: 0;
|
|
365
|
+
readonly maximum: 20;
|
|
366
|
+
readonly description: "How many of that add-on the booking should hold, 0 to 20; 0 takes it off";
|
|
367
|
+
};
|
|
368
|
+
readonly email: {
|
|
369
|
+
readonly type: "string";
|
|
370
|
+
readonly description: "The email the booking was made with, when it was made elsewhere";
|
|
371
|
+
};
|
|
372
|
+
readonly confirmed: {
|
|
373
|
+
readonly type: "boolean";
|
|
374
|
+
readonly description: "True makes the change. Anything else returns the preview";
|
|
375
|
+
};
|
|
376
|
+
};
|
|
377
|
+
readonly required: readonly ["booking"];
|
|
378
|
+
};
|
|
379
|
+
};
|
|
380
|
+
export declare const refundBookingTool: ({ n, open }: ToolEnv) => {
|
|
381
|
+
readonly name: `refund_${string}booking`;
|
|
382
|
+
readonly description: "Asks the hotel group to refund, in full, a booking made here that has been paid. TWO STEPS: the first call (no `confirmed`) only previews - the amount and the group's own refund terms - and asks nothing of the group; say them to the guest, and only when they say yes call again with `confirmed: true`. The second answer says what the group did with the request.";
|
|
383
|
+
readonly annotations: {
|
|
384
|
+
readonly title: string;
|
|
385
|
+
readonly readOnlyHint: false;
|
|
386
|
+
readonly destructiveHint: true;
|
|
387
|
+
readonly idempotentHint: true;
|
|
388
|
+
readonly openWorldHint: boolean;
|
|
389
|
+
};
|
|
390
|
+
readonly inputSchema: {
|
|
391
|
+
readonly type: "object";
|
|
392
|
+
readonly properties: {
|
|
393
|
+
readonly booking: {
|
|
394
|
+
readonly type: "string";
|
|
395
|
+
readonly description: "The confirmation code or order id, as the booking answer gave it";
|
|
396
|
+
};
|
|
397
|
+
readonly reason: {
|
|
398
|
+
readonly type: "string";
|
|
399
|
+
readonly maxLength: 200;
|
|
400
|
+
readonly description: "Optional, the guest's reason in their own words, up to 200 characters";
|
|
401
|
+
};
|
|
402
|
+
readonly confirmed: {
|
|
403
|
+
readonly type: "boolean";
|
|
404
|
+
readonly description: "true only after the guest was shown the refund preview this tool answers with and said yes. Without it, the answer is that preview and nothing is asked of the group.";
|
|
405
|
+
};
|
|
406
|
+
};
|
|
407
|
+
readonly required: readonly ["booking"];
|
|
408
|
+
};
|
|
409
|
+
};
|
|
410
|
+
//# sourceMappingURL=tool-defs-booking.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-defs-booking.d.ts","sourceRoot":"","sources":["../../src/tools/tool-defs-booking.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAK7C,eAAO,MAAM,kBAAkB,GAAI,4BAA4B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCzD,CAAC;AAEd,eAAO,MAAM,cAAc,GAAI,uCAAuC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiChE,CAAC;AAEd,eAAO,MAAM,eAAe,GAAI,gBAAgB,OAAO;;;;;;;;;;;;;;;;;;;;CAmB1C,CAAC;AAEd,eAAO,MAAM,mBAAmB,GAAI,UAAU,OAAO;;;;;;;;;;;;;;;;;;;;;;;;CAyBxC,CAAC;AAEd,eAAO,MAAM,gBAAgB,GAAI,gBAAgB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiB3C,CAAC;AAEd,eAAO,MAAM,uBAAuB,GAAI,aAAa,OAAO;;;;;;;;;;;;;;;;;;;;;;;;CA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