@fortrip/agent-contract 2.0.0 → 3.0.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 +18 -13
- package/dist/index.d.ts +2625 -268
- package/dist/index.js +2272 -532
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -24,7 +24,35 @@ declare const CARD_NUMBER_MESSAGE = "This looks like a payment card number. Paym
|
|
|
24
24
|
*/
|
|
25
25
|
declare function containsCardNumber(text: string, minDigits?: number): boolean;
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
/** An object that keeps fields it does not know. */
|
|
28
|
+
declare function openObject<T extends z.ZodRawShape>(shape: T): z.ZodObject<T>;
|
|
29
|
+
/** One of `values`, or any string. JSON Schema: `anyOf [enum, string]`. */
|
|
30
|
+
declare function openEnum<const V extends readonly string[]>(values: V): z.ZodType<V[number] | (string & {})>;
|
|
31
|
+
/**
|
|
32
|
+
* A union picked by `discriminator`. A known value parses its own branch
|
|
33
|
+
* (and fails if that branch is malformed); only an unknown value falls back
|
|
34
|
+
* to an object with a string discriminator and any other fields.
|
|
35
|
+
*/
|
|
36
|
+
declare function openUnion<D extends string, const B extends readonly z.ZodObject[]>(discriminator: D, branches: B): z.ZodType<OpenUnionOutput<D, B>>;
|
|
37
|
+
/** The value of an open union's fallback branch: an unknown discriminator. */
|
|
38
|
+
type OpenFallback<D extends string> = {
|
|
39
|
+
[K in D]: string;
|
|
40
|
+
} & Record<string, unknown>;
|
|
41
|
+
/** What an open union parses to: one of its known branches, or the fallback. */
|
|
42
|
+
type OpenUnionOutput<D extends string, B extends readonly z.ZodObject[]> = z.output<B[number]> | OpenFallback<D>;
|
|
43
|
+
/** Parses `value`, keeping the unknown fields and values an open schema allows. */
|
|
44
|
+
declare function parseOpen<T>(schema: z.ZodType<T>, value: unknown): T;
|
|
45
|
+
/**
|
|
46
|
+
* A deep-strict copy of an output schema for server tests: no unknown fields,
|
|
47
|
+
* no unknown enum values, no fallback union branch. Wrappers (optional,
|
|
48
|
+
* nullable, default, readonly, pipe, lazy) and containers (object, array,
|
|
49
|
+
* tuple, record) are rebuilt around their closed contents, keeping their
|
|
50
|
+
* checks and metadata. A schema type it cannot close (any, unknown,
|
|
51
|
+
* intersection, custom, ...) throws instead of silently staying open.
|
|
52
|
+
*/
|
|
53
|
+
declare function strictOutput<T extends z.ZodType>(schema: T): T;
|
|
54
|
+
|
|
55
|
+
type ToolName = "get_planning_guide" | "search_hotels" | "get_hotel" | "get_hotel_offers" | "book_hotel" | "get_order" | "list_orders";
|
|
28
56
|
interface ToolSpec {
|
|
29
57
|
name: ToolName;
|
|
30
58
|
title: string;
|
|
@@ -37,109 +65,509 @@ interface ToolSpec {
|
|
|
37
65
|
};
|
|
38
66
|
/** What the tool takes; `null` for a tool without arguments. */
|
|
39
67
|
input: z.ZodType | null;
|
|
40
|
-
/**
|
|
68
|
+
/** The open schema of what it answers with; `null` for the guide. */
|
|
41
69
|
output: z.ZodType | null;
|
|
42
70
|
}
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
71
|
+
/**
|
|
72
|
+
* The consent rule (spec §6). It rides on every MCP result that holds a
|
|
73
|
+
* non-null `payment.url`, as `nextStep` and as the last paragraph of the
|
|
74
|
+
* text: some clients never show the model the server instructions.
|
|
75
|
+
*/
|
|
76
|
+
declare const ORDER_NEXT_STEP = "Before you give the user an order's payment.url, show them its total and currency, the stay (hotel, room, dates, rooms and guests per room) and every term (meals, cancellation, fees payable at the property), then end your reply by asking them to confirm, and wait for a clear yes. Only after they say yes, give them payment.url exactly as returned.";
|
|
77
|
+
/** The answers over MCP that can hold a `payment.url`: the HTTP answer plus
|
|
78
|
+
* `nextStep`, which only MCP declares. */
|
|
79
|
+
declare const MCP_OUTPUT: {
|
|
80
|
+
readonly book_hotel: z.ZodObject<{
|
|
81
|
+
orderId: z.ZodString;
|
|
82
|
+
reference: z.ZodString;
|
|
83
|
+
status: z.ZodType<(string & {}) | "awaiting_payment" | "expired" | "confirming" | "confirmed" | "failed" | "cancelling" | "cancelled" | "needs_attention", unknown, z.core.$ZodTypeInternals<(string & {}) | "awaiting_payment" | "expired" | "confirming" | "confirmed" | "failed" | "cancelling" | "cancelled" | "needs_attention", unknown>>;
|
|
84
|
+
createdAt: z.ZodString;
|
|
85
|
+
updatedAt: z.ZodString;
|
|
86
|
+
items: z.ZodArray<z.ZodType<OpenUnionOutput<"type", readonly [z.ZodObject<{
|
|
87
|
+
type: z.ZodLiteral<"hotel">;
|
|
88
|
+
hotel: z.ZodObject<{
|
|
89
|
+
hotelId: z.ZodNullable<z.ZodString>;
|
|
90
|
+
name: z.ZodString;
|
|
91
|
+
names: z.ZodObject<{
|
|
92
|
+
en: z.ZodNullable<z.ZodString>;
|
|
93
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
checkIn: z.ZodString;
|
|
96
|
+
checkOut: z.ZodString;
|
|
97
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
98
|
+
rooms: z.ZodArray<z.ZodObject<{
|
|
99
|
+
adults: z.ZodNumber;
|
|
100
|
+
childrenAges: z.ZodArray<z.ZodNumber>;
|
|
101
|
+
}, z.core.$strip>>;
|
|
102
|
+
room: z.ZodObject<{
|
|
103
|
+
name: z.ZodNullable<z.ZodObject<{
|
|
104
|
+
text: z.ZodString;
|
|
105
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
106
|
+
}, z.core.$strip>>;
|
|
107
|
+
beds: z.ZodNullable<z.ZodObject<{
|
|
108
|
+
text: z.ZodString;
|
|
109
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
110
|
+
}, z.core.$strip>>;
|
|
111
|
+
}, z.core.$strip>;
|
|
112
|
+
meals: z.ZodObject<{
|
|
113
|
+
known: z.ZodBoolean;
|
|
114
|
+
included: z.ZodNullable<z.ZodArray<z.ZodType<(string & {}) | "breakfast" | "lunch" | "dinner", unknown, z.core.$ZodTypeInternals<(string & {}) | "breakfast" | "lunch" | "dinner", unknown>>>>;
|
|
115
|
+
unspecifiedMainMeals: z.ZodNullable<z.ZodNumber>;
|
|
116
|
+
allInclusive: z.ZodNullable<z.ZodBoolean>;
|
|
117
|
+
guestsCoveredPerRoom: z.ZodNullable<z.ZodNumber>;
|
|
118
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
119
|
+
text: z.ZodString;
|
|
120
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
121
|
+
}, z.core.$strip>>;
|
|
122
|
+
}, z.core.$strip>;
|
|
123
|
+
cancellation: z.ZodObject<{
|
|
124
|
+
status: z.ZodType<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown>>;
|
|
125
|
+
asOf: z.ZodString;
|
|
126
|
+
freeCancellationEndsAt: z.ZodNullable<z.ZodString>;
|
|
127
|
+
penalties: z.ZodArray<z.ZodObject<{
|
|
128
|
+
startsAt: z.ZodNullable<z.ZodString>;
|
|
129
|
+
amount: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
130
|
+
}, z.core.$strip>>;
|
|
131
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
132
|
+
}, z.core.$strip>;
|
|
133
|
+
payAtProperty: z.ZodObject<{
|
|
134
|
+
disclosure: z.ZodType<(string & {}) | "complete" | "incomplete", unknown, z.core.$ZodTypeInternals<(string & {}) | "complete" | "incomplete", unknown>>;
|
|
135
|
+
items: z.ZodArray<z.ZodObject<{
|
|
136
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
137
|
+
text: z.ZodString;
|
|
138
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
139
|
+
}, z.core.$strip>>;
|
|
140
|
+
amount: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
|
|
141
|
+
mandatory: z.ZodBoolean;
|
|
142
|
+
basis: z.ZodType<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown>>;
|
|
143
|
+
collectedAt: z.ZodType<"unknown" | (string & {}) | "property", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "property", unknown>>;
|
|
144
|
+
}, z.core.$strip>>;
|
|
145
|
+
}, z.core.$strip>;
|
|
146
|
+
confirmationNumber: z.ZodNullable<z.ZodString>;
|
|
147
|
+
}, z.core.$strip>;
|
|
148
|
+
}, z.core.$strip>]>, unknown, z.core.$ZodTypeInternals<OpenUnionOutput<"type", readonly [z.ZodObject<{
|
|
149
|
+
type: z.ZodLiteral<"hotel">;
|
|
150
|
+
hotel: z.ZodObject<{
|
|
151
|
+
hotelId: z.ZodNullable<z.ZodString>;
|
|
152
|
+
name: z.ZodString;
|
|
153
|
+
names: z.ZodObject<{
|
|
154
|
+
en: z.ZodNullable<z.ZodString>;
|
|
155
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
156
|
+
}, z.core.$strip>;
|
|
157
|
+
checkIn: z.ZodString;
|
|
158
|
+
checkOut: z.ZodString;
|
|
159
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
160
|
+
rooms: z.ZodArray<z.ZodObject<{
|
|
161
|
+
adults: z.ZodNumber;
|
|
162
|
+
childrenAges: z.ZodArray<z.ZodNumber>;
|
|
163
|
+
}, z.core.$strip>>;
|
|
164
|
+
room: z.ZodObject<{
|
|
165
|
+
name: z.ZodNullable<z.ZodObject<{
|
|
166
|
+
text: z.ZodString;
|
|
167
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
168
|
+
}, z.core.$strip>>;
|
|
169
|
+
beds: z.ZodNullable<z.ZodObject<{
|
|
170
|
+
text: z.ZodString;
|
|
171
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
172
|
+
}, z.core.$strip>>;
|
|
173
|
+
}, z.core.$strip>;
|
|
174
|
+
meals: z.ZodObject<{
|
|
175
|
+
known: z.ZodBoolean;
|
|
176
|
+
included: z.ZodNullable<z.ZodArray<z.ZodType<(string & {}) | "breakfast" | "lunch" | "dinner", unknown, z.core.$ZodTypeInternals<(string & {}) | "breakfast" | "lunch" | "dinner", unknown>>>>;
|
|
177
|
+
unspecifiedMainMeals: z.ZodNullable<z.ZodNumber>;
|
|
178
|
+
allInclusive: z.ZodNullable<z.ZodBoolean>;
|
|
179
|
+
guestsCoveredPerRoom: z.ZodNullable<z.ZodNumber>;
|
|
180
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
181
|
+
text: z.ZodString;
|
|
182
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
183
|
+
}, z.core.$strip>>;
|
|
184
|
+
}, z.core.$strip>;
|
|
185
|
+
cancellation: z.ZodObject<{
|
|
186
|
+
status: z.ZodType<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown>>;
|
|
187
|
+
asOf: z.ZodString;
|
|
188
|
+
freeCancellationEndsAt: z.ZodNullable<z.ZodString>;
|
|
189
|
+
penalties: z.ZodArray<z.ZodObject<{
|
|
190
|
+
startsAt: z.ZodNullable<z.ZodString>;
|
|
191
|
+
amount: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
192
|
+
}, z.core.$strip>>;
|
|
193
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
194
|
+
}, z.core.$strip>;
|
|
195
|
+
payAtProperty: z.ZodObject<{
|
|
196
|
+
disclosure: z.ZodType<(string & {}) | "complete" | "incomplete", unknown, z.core.$ZodTypeInternals<(string & {}) | "complete" | "incomplete", unknown>>;
|
|
197
|
+
items: z.ZodArray<z.ZodObject<{
|
|
198
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
199
|
+
text: z.ZodString;
|
|
200
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
201
|
+
}, z.core.$strip>>;
|
|
202
|
+
amount: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
|
|
203
|
+
mandatory: z.ZodBoolean;
|
|
204
|
+
basis: z.ZodType<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown>>;
|
|
205
|
+
collectedAt: z.ZodType<"unknown" | (string & {}) | "property", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "property", unknown>>;
|
|
206
|
+
}, z.core.$strip>>;
|
|
207
|
+
}, z.core.$strip>;
|
|
208
|
+
confirmationNumber: z.ZodNullable<z.ZodString>;
|
|
209
|
+
}, z.core.$strip>;
|
|
210
|
+
}, z.core.$strip>]>, unknown>>>;
|
|
211
|
+
price: z.ZodObject<{
|
|
212
|
+
total: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
213
|
+
}, z.core.$strip>;
|
|
214
|
+
payment: z.ZodObject<{
|
|
215
|
+
status: z.ZodType<(string & {}) | "unpaid" | "authorized" | "paid" | "released" | "refund_pending" | "refunded", unknown, z.core.$ZodTypeInternals<(string & {}) | "unpaid" | "authorized" | "paid" | "released" | "refund_pending" | "refunded", unknown>>;
|
|
216
|
+
url: z.ZodNullable<z.ZodString>;
|
|
217
|
+
requiresSignIn: z.ZodBoolean;
|
|
218
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
219
|
+
chargeCurrency: z.ZodString;
|
|
220
|
+
localCurrencyAtCheckout: z.ZodBoolean;
|
|
221
|
+
localCharge: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
|
|
222
|
+
}, z.core.$strip>;
|
|
223
|
+
manageUrl: z.ZodString;
|
|
224
|
+
nextStep: z.ZodOptional<z.ZodString>;
|
|
225
|
+
}, z.core.$strip>;
|
|
226
|
+
readonly get_order: z.ZodObject<{
|
|
227
|
+
orderId: z.ZodString;
|
|
228
|
+
reference: z.ZodString;
|
|
229
|
+
status: z.ZodType<(string & {}) | "awaiting_payment" | "expired" | "confirming" | "confirmed" | "failed" | "cancelling" | "cancelled" | "needs_attention", unknown, z.core.$ZodTypeInternals<(string & {}) | "awaiting_payment" | "expired" | "confirming" | "confirmed" | "failed" | "cancelling" | "cancelled" | "needs_attention", unknown>>;
|
|
230
|
+
createdAt: z.ZodString;
|
|
231
|
+
updatedAt: z.ZodString;
|
|
232
|
+
items: z.ZodArray<z.ZodType<OpenUnionOutput<"type", readonly [z.ZodObject<{
|
|
233
|
+
type: z.ZodLiteral<"hotel">;
|
|
234
|
+
hotel: z.ZodObject<{
|
|
235
|
+
hotelId: z.ZodNullable<z.ZodString>;
|
|
236
|
+
name: z.ZodString;
|
|
237
|
+
names: z.ZodObject<{
|
|
238
|
+
en: z.ZodNullable<z.ZodString>;
|
|
239
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
240
|
+
}, z.core.$strip>;
|
|
241
|
+
checkIn: z.ZodString;
|
|
242
|
+
checkOut: z.ZodString;
|
|
243
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
244
|
+
rooms: z.ZodArray<z.ZodObject<{
|
|
245
|
+
adults: z.ZodNumber;
|
|
246
|
+
childrenAges: z.ZodArray<z.ZodNumber>;
|
|
247
|
+
}, z.core.$strip>>;
|
|
248
|
+
room: z.ZodObject<{
|
|
249
|
+
name: z.ZodNullable<z.ZodObject<{
|
|
250
|
+
text: z.ZodString;
|
|
251
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
252
|
+
}, z.core.$strip>>;
|
|
253
|
+
beds: z.ZodNullable<z.ZodObject<{
|
|
254
|
+
text: z.ZodString;
|
|
255
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
256
|
+
}, z.core.$strip>>;
|
|
257
|
+
}, z.core.$strip>;
|
|
258
|
+
meals: z.ZodObject<{
|
|
259
|
+
known: z.ZodBoolean;
|
|
260
|
+
included: z.ZodNullable<z.ZodArray<z.ZodType<(string & {}) | "breakfast" | "lunch" | "dinner", unknown, z.core.$ZodTypeInternals<(string & {}) | "breakfast" | "lunch" | "dinner", unknown>>>>;
|
|
261
|
+
unspecifiedMainMeals: z.ZodNullable<z.ZodNumber>;
|
|
262
|
+
allInclusive: z.ZodNullable<z.ZodBoolean>;
|
|
263
|
+
guestsCoveredPerRoom: z.ZodNullable<z.ZodNumber>;
|
|
264
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
265
|
+
text: z.ZodString;
|
|
266
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
267
|
+
}, z.core.$strip>>;
|
|
268
|
+
}, z.core.$strip>;
|
|
269
|
+
cancellation: z.ZodObject<{
|
|
270
|
+
status: z.ZodType<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown>>;
|
|
271
|
+
asOf: z.ZodString;
|
|
272
|
+
freeCancellationEndsAt: z.ZodNullable<z.ZodString>;
|
|
273
|
+
penalties: z.ZodArray<z.ZodObject<{
|
|
274
|
+
startsAt: z.ZodNullable<z.ZodString>;
|
|
275
|
+
amount: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
276
|
+
}, z.core.$strip>>;
|
|
277
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
278
|
+
}, z.core.$strip>;
|
|
279
|
+
payAtProperty: z.ZodObject<{
|
|
280
|
+
disclosure: z.ZodType<(string & {}) | "complete" | "incomplete", unknown, z.core.$ZodTypeInternals<(string & {}) | "complete" | "incomplete", unknown>>;
|
|
281
|
+
items: z.ZodArray<z.ZodObject<{
|
|
282
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
283
|
+
text: z.ZodString;
|
|
284
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
285
|
+
}, z.core.$strip>>;
|
|
286
|
+
amount: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
|
|
287
|
+
mandatory: z.ZodBoolean;
|
|
288
|
+
basis: z.ZodType<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown>>;
|
|
289
|
+
collectedAt: z.ZodType<"unknown" | (string & {}) | "property", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "property", unknown>>;
|
|
290
|
+
}, z.core.$strip>>;
|
|
291
|
+
}, z.core.$strip>;
|
|
292
|
+
confirmationNumber: z.ZodNullable<z.ZodString>;
|
|
293
|
+
}, z.core.$strip>;
|
|
294
|
+
}, z.core.$strip>]>, unknown, z.core.$ZodTypeInternals<OpenUnionOutput<"type", readonly [z.ZodObject<{
|
|
295
|
+
type: z.ZodLiteral<"hotel">;
|
|
296
|
+
hotel: z.ZodObject<{
|
|
297
|
+
hotelId: z.ZodNullable<z.ZodString>;
|
|
298
|
+
name: z.ZodString;
|
|
299
|
+
names: z.ZodObject<{
|
|
300
|
+
en: z.ZodNullable<z.ZodString>;
|
|
301
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
302
|
+
}, z.core.$strip>;
|
|
303
|
+
checkIn: z.ZodString;
|
|
304
|
+
checkOut: z.ZodString;
|
|
305
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
306
|
+
rooms: z.ZodArray<z.ZodObject<{
|
|
307
|
+
adults: z.ZodNumber;
|
|
308
|
+
childrenAges: z.ZodArray<z.ZodNumber>;
|
|
309
|
+
}, z.core.$strip>>;
|
|
310
|
+
room: z.ZodObject<{
|
|
311
|
+
name: z.ZodNullable<z.ZodObject<{
|
|
312
|
+
text: z.ZodString;
|
|
313
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
314
|
+
}, z.core.$strip>>;
|
|
315
|
+
beds: z.ZodNullable<z.ZodObject<{
|
|
316
|
+
text: z.ZodString;
|
|
317
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
318
|
+
}, z.core.$strip>>;
|
|
319
|
+
}, z.core.$strip>;
|
|
320
|
+
meals: z.ZodObject<{
|
|
321
|
+
known: z.ZodBoolean;
|
|
322
|
+
included: z.ZodNullable<z.ZodArray<z.ZodType<(string & {}) | "breakfast" | "lunch" | "dinner", unknown, z.core.$ZodTypeInternals<(string & {}) | "breakfast" | "lunch" | "dinner", unknown>>>>;
|
|
323
|
+
unspecifiedMainMeals: z.ZodNullable<z.ZodNumber>;
|
|
324
|
+
allInclusive: z.ZodNullable<z.ZodBoolean>;
|
|
325
|
+
guestsCoveredPerRoom: z.ZodNullable<z.ZodNumber>;
|
|
326
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
327
|
+
text: z.ZodString;
|
|
328
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
329
|
+
}, z.core.$strip>>;
|
|
330
|
+
}, z.core.$strip>;
|
|
331
|
+
cancellation: z.ZodObject<{
|
|
332
|
+
status: z.ZodType<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown>>;
|
|
333
|
+
asOf: z.ZodString;
|
|
334
|
+
freeCancellationEndsAt: z.ZodNullable<z.ZodString>;
|
|
335
|
+
penalties: z.ZodArray<z.ZodObject<{
|
|
336
|
+
startsAt: z.ZodNullable<z.ZodString>;
|
|
337
|
+
amount: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
338
|
+
}, z.core.$strip>>;
|
|
339
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
340
|
+
}, z.core.$strip>;
|
|
341
|
+
payAtProperty: z.ZodObject<{
|
|
342
|
+
disclosure: z.ZodType<(string & {}) | "complete" | "incomplete", unknown, z.core.$ZodTypeInternals<(string & {}) | "complete" | "incomplete", unknown>>;
|
|
343
|
+
items: z.ZodArray<z.ZodObject<{
|
|
344
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
345
|
+
text: z.ZodString;
|
|
346
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
347
|
+
}, z.core.$strip>>;
|
|
348
|
+
amount: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
|
|
349
|
+
mandatory: z.ZodBoolean;
|
|
350
|
+
basis: z.ZodType<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown>>;
|
|
351
|
+
collectedAt: z.ZodType<"unknown" | (string & {}) | "property", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "property", unknown>>;
|
|
352
|
+
}, z.core.$strip>>;
|
|
353
|
+
}, z.core.$strip>;
|
|
354
|
+
confirmationNumber: z.ZodNullable<z.ZodString>;
|
|
355
|
+
}, z.core.$strip>;
|
|
356
|
+
}, z.core.$strip>]>, unknown>>>;
|
|
357
|
+
price: z.ZodObject<{
|
|
358
|
+
total: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
359
|
+
}, z.core.$strip>;
|
|
360
|
+
payment: z.ZodObject<{
|
|
361
|
+
status: z.ZodType<(string & {}) | "unpaid" | "authorized" | "paid" | "released" | "refund_pending" | "refunded", unknown, z.core.$ZodTypeInternals<(string & {}) | "unpaid" | "authorized" | "paid" | "released" | "refund_pending" | "refunded", unknown>>;
|
|
362
|
+
url: z.ZodNullable<z.ZodString>;
|
|
363
|
+
requiresSignIn: z.ZodBoolean;
|
|
364
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
365
|
+
chargeCurrency: z.ZodString;
|
|
366
|
+
localCurrencyAtCheckout: z.ZodBoolean;
|
|
367
|
+
localCharge: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
|
|
368
|
+
}, z.core.$strip>;
|
|
369
|
+
manageUrl: z.ZodString;
|
|
370
|
+
nextStep: z.ZodOptional<z.ZodString>;
|
|
371
|
+
}, z.core.$strip>;
|
|
372
|
+
readonly list_orders: z.ZodObject<{
|
|
373
|
+
data: z.ZodArray<z.ZodObject<{
|
|
374
|
+
orderId: z.ZodString;
|
|
375
|
+
reference: z.ZodString;
|
|
376
|
+
status: z.ZodType<(string & {}) | "awaiting_payment" | "expired" | "confirming" | "confirmed" | "failed" | "cancelling" | "cancelled" | "needs_attention", unknown, z.core.$ZodTypeInternals<(string & {}) | "awaiting_payment" | "expired" | "confirming" | "confirmed" | "failed" | "cancelling" | "cancelled" | "needs_attention", unknown>>;
|
|
377
|
+
createdAt: z.ZodString;
|
|
378
|
+
updatedAt: z.ZodString;
|
|
379
|
+
items: z.ZodArray<z.ZodType<OpenUnionOutput<"type", readonly [z.ZodObject<{
|
|
380
|
+
type: z.ZodLiteral<"hotel">;
|
|
381
|
+
hotel: z.ZodObject<{
|
|
382
|
+
hotelId: z.ZodNullable<z.ZodString>;
|
|
383
|
+
name: z.ZodString;
|
|
384
|
+
names: z.ZodObject<{
|
|
385
|
+
en: z.ZodNullable<z.ZodString>;
|
|
386
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
387
|
+
}, z.core.$strip>;
|
|
388
|
+
checkIn: z.ZodString;
|
|
389
|
+
checkOut: z.ZodString;
|
|
390
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
391
|
+
rooms: z.ZodArray<z.ZodObject<{
|
|
392
|
+
adults: z.ZodNumber;
|
|
393
|
+
childrenAges: z.ZodArray<z.ZodNumber>;
|
|
394
|
+
}, z.core.$strip>>;
|
|
395
|
+
room: z.ZodObject<{
|
|
396
|
+
name: z.ZodNullable<z.ZodObject<{
|
|
397
|
+
text: z.ZodString;
|
|
398
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
399
|
+
}, z.core.$strip>>;
|
|
400
|
+
beds: z.ZodNullable<z.ZodObject<{
|
|
401
|
+
text: z.ZodString;
|
|
402
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
403
|
+
}, z.core.$strip>>;
|
|
404
|
+
}, z.core.$strip>;
|
|
405
|
+
meals: z.ZodObject<{
|
|
406
|
+
known: z.ZodBoolean;
|
|
407
|
+
included: z.ZodNullable<z.ZodArray<z.ZodType<(string & {}) | "breakfast" | "lunch" | "dinner", unknown, z.core.$ZodTypeInternals<(string & {}) | "breakfast" | "lunch" | "dinner", unknown>>>>;
|
|
408
|
+
unspecifiedMainMeals: z.ZodNullable<z.ZodNumber>;
|
|
409
|
+
allInclusive: z.ZodNullable<z.ZodBoolean>;
|
|
410
|
+
guestsCoveredPerRoom: z.ZodNullable<z.ZodNumber>;
|
|
411
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
412
|
+
text: z.ZodString;
|
|
413
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
414
|
+
}, z.core.$strip>>;
|
|
415
|
+
}, z.core.$strip>;
|
|
416
|
+
cancellation: z.ZodObject<{
|
|
417
|
+
status: z.ZodType<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown>>;
|
|
418
|
+
asOf: z.ZodString;
|
|
419
|
+
freeCancellationEndsAt: z.ZodNullable<z.ZodString>;
|
|
420
|
+
penalties: z.ZodArray<z.ZodObject<{
|
|
421
|
+
startsAt: z.ZodNullable<z.ZodString>;
|
|
422
|
+
amount: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
423
|
+
}, z.core.$strip>>;
|
|
424
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
425
|
+
}, z.core.$strip>;
|
|
426
|
+
payAtProperty: z.ZodObject<{
|
|
427
|
+
disclosure: z.ZodType<(string & {}) | "complete" | "incomplete", unknown, z.core.$ZodTypeInternals<(string & {}) | "complete" | "incomplete", unknown>>;
|
|
428
|
+
items: z.ZodArray<z.ZodObject<{
|
|
429
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
430
|
+
text: z.ZodString;
|
|
431
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
432
|
+
}, z.core.$strip>>;
|
|
433
|
+
amount: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
|
|
434
|
+
mandatory: z.ZodBoolean;
|
|
435
|
+
basis: z.ZodType<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown>>;
|
|
436
|
+
collectedAt: z.ZodType<"unknown" | (string & {}) | "property", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "property", unknown>>;
|
|
437
|
+
}, z.core.$strip>>;
|
|
438
|
+
}, z.core.$strip>;
|
|
439
|
+
confirmationNumber: z.ZodNullable<z.ZodString>;
|
|
440
|
+
}, z.core.$strip>;
|
|
441
|
+
}, z.core.$strip>]>, unknown, z.core.$ZodTypeInternals<OpenUnionOutput<"type", readonly [z.ZodObject<{
|
|
442
|
+
type: z.ZodLiteral<"hotel">;
|
|
443
|
+
hotel: z.ZodObject<{
|
|
444
|
+
hotelId: z.ZodNullable<z.ZodString>;
|
|
445
|
+
name: z.ZodString;
|
|
446
|
+
names: z.ZodObject<{
|
|
447
|
+
en: z.ZodNullable<z.ZodString>;
|
|
448
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
449
|
+
}, z.core.$strip>;
|
|
450
|
+
checkIn: z.ZodString;
|
|
451
|
+
checkOut: z.ZodString;
|
|
452
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
453
|
+
rooms: z.ZodArray<z.ZodObject<{
|
|
454
|
+
adults: z.ZodNumber;
|
|
455
|
+
childrenAges: z.ZodArray<z.ZodNumber>;
|
|
456
|
+
}, z.core.$strip>>;
|
|
457
|
+
room: z.ZodObject<{
|
|
458
|
+
name: z.ZodNullable<z.ZodObject<{
|
|
459
|
+
text: z.ZodString;
|
|
460
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
461
|
+
}, z.core.$strip>>;
|
|
462
|
+
beds: z.ZodNullable<z.ZodObject<{
|
|
463
|
+
text: z.ZodString;
|
|
464
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
465
|
+
}, z.core.$strip>>;
|
|
466
|
+
}, z.core.$strip>;
|
|
467
|
+
meals: z.ZodObject<{
|
|
468
|
+
known: z.ZodBoolean;
|
|
469
|
+
included: z.ZodNullable<z.ZodArray<z.ZodType<(string & {}) | "breakfast" | "lunch" | "dinner", unknown, z.core.$ZodTypeInternals<(string & {}) | "breakfast" | "lunch" | "dinner", unknown>>>>;
|
|
470
|
+
unspecifiedMainMeals: z.ZodNullable<z.ZodNumber>;
|
|
471
|
+
allInclusive: z.ZodNullable<z.ZodBoolean>;
|
|
472
|
+
guestsCoveredPerRoom: z.ZodNullable<z.ZodNumber>;
|
|
473
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
474
|
+
text: z.ZodString;
|
|
475
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
476
|
+
}, z.core.$strip>>;
|
|
477
|
+
}, z.core.$strip>;
|
|
478
|
+
cancellation: z.ZodObject<{
|
|
479
|
+
status: z.ZodType<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown>>;
|
|
480
|
+
asOf: z.ZodString;
|
|
481
|
+
freeCancellationEndsAt: z.ZodNullable<z.ZodString>;
|
|
482
|
+
penalties: z.ZodArray<z.ZodObject<{
|
|
483
|
+
startsAt: z.ZodNullable<z.ZodString>;
|
|
484
|
+
amount: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
485
|
+
}, z.core.$strip>>;
|
|
486
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
487
|
+
}, z.core.$strip>;
|
|
488
|
+
payAtProperty: z.ZodObject<{
|
|
489
|
+
disclosure: z.ZodType<(string & {}) | "complete" | "incomplete", unknown, z.core.$ZodTypeInternals<(string & {}) | "complete" | "incomplete", unknown>>;
|
|
490
|
+
items: z.ZodArray<z.ZodObject<{
|
|
491
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
492
|
+
text: z.ZodString;
|
|
493
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
494
|
+
}, z.core.$strip>>;
|
|
495
|
+
amount: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
|
|
496
|
+
mandatory: z.ZodBoolean;
|
|
497
|
+
basis: z.ZodType<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown>>;
|
|
498
|
+
collectedAt: z.ZodType<"unknown" | (string & {}) | "property", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "property", unknown>>;
|
|
499
|
+
}, z.core.$strip>>;
|
|
500
|
+
}, z.core.$strip>;
|
|
501
|
+
confirmationNumber: z.ZodNullable<z.ZodString>;
|
|
502
|
+
}, z.core.$strip>;
|
|
503
|
+
}, z.core.$strip>]>, unknown>>>;
|
|
504
|
+
price: z.ZodObject<{
|
|
505
|
+
total: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
506
|
+
}, z.core.$strip>;
|
|
507
|
+
payment: z.ZodObject<{
|
|
508
|
+
status: z.ZodType<(string & {}) | "unpaid" | "authorized" | "paid" | "released" | "refund_pending" | "refunded", unknown, z.core.$ZodTypeInternals<(string & {}) | "unpaid" | "authorized" | "paid" | "released" | "refund_pending" | "refunded", unknown>>;
|
|
509
|
+
url: z.ZodNullable<z.ZodString>;
|
|
510
|
+
requiresSignIn: z.ZodBoolean;
|
|
511
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
512
|
+
chargeCurrency: z.ZodString;
|
|
513
|
+
localCurrencyAtCheckout: z.ZodBoolean;
|
|
514
|
+
localCharge: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
|
|
515
|
+
}, z.core.$strip>;
|
|
516
|
+
manageUrl: z.ZodString;
|
|
110
517
|
}, z.core.$strip>>;
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}, z.core.$strip>;
|
|
518
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
519
|
+
nextStep: z.ZodOptional<z.ZodString>;
|
|
520
|
+
}, z.core.$strip>;
|
|
521
|
+
};
|
|
114
522
|
declare const TOOLS: readonly ToolSpec[];
|
|
115
523
|
|
|
116
524
|
/** A flag that sets one field of a tool's input. */
|
|
117
525
|
interface FlagSpec {
|
|
118
526
|
/** The long name without dashes: `check-in` for `--check-in`. */
|
|
119
527
|
flag: string;
|
|
120
|
-
/**
|
|
121
|
-
|
|
122
|
-
|
|
528
|
+
/**
|
|
529
|
+
* The input field it sets; dots step into objects, the items of a list and
|
|
530
|
+
* the variant of a union that `sets` picks (`destination.placeId`).
|
|
531
|
+
*/
|
|
123
532
|
field: string;
|
|
124
533
|
/**
|
|
125
|
-
* How the CLI reads the value. `
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
* `
|
|
534
|
+
* How the CLI reads the value. A `boolean` flag takes none: it sends true,
|
|
535
|
+
* or `value` when it has one. A `string` flag whose field is an object or
|
|
536
|
+
* a list of objects is one value the CLI parses into that shape:
|
|
537
|
+
* `--point` `lat,lng`; `--room` `adults[:age,…]` (`2:6,9` is two adults
|
|
538
|
+
* and children of 6 and 9); `--price-max-per-room-night` a USD amount;
|
|
539
|
+
* `--guest` `room:first:last`, into that room's guests.
|
|
131
540
|
*/
|
|
132
|
-
type: "string" | "number" | "boolean"
|
|
541
|
+
type: "string" | "number" | "boolean";
|
|
133
542
|
/** Given once per item; its field is a list. */
|
|
134
543
|
multiple?: boolean;
|
|
544
|
+
/** What a `boolean` flag sends when its field isn't boolean:
|
|
545
|
+
* `--rooms` sends `include: "rooms"`. */
|
|
546
|
+
value?: string;
|
|
547
|
+
/**
|
|
548
|
+
* Fields the flag also sends, each with a constant: the variant of a union
|
|
549
|
+
* it picks. `--place` sends `destination.kind: "place"`. Flags that pick
|
|
550
|
+
* different variants of one union can't be given together.
|
|
551
|
+
*/
|
|
552
|
+
sets?: Readonly<Record<string, string>>;
|
|
135
553
|
/**
|
|
136
554
|
* What the value looks like in help, as it follows the flag name: `<n>`,
|
|
137
|
-
* `YYYY-MM-DD`, `
|
|
138
|
-
*
|
|
555
|
+
* `YYYY-MM-DD`, `en|zh` (an enum's values), `<plc_>`. Every flag that takes
|
|
556
|
+
* a value has one.
|
|
139
557
|
*/
|
|
140
558
|
placeholder?: string;
|
|
141
559
|
description: string;
|
|
142
560
|
}
|
|
561
|
+
/** An argument given by position. */
|
|
562
|
+
interface PositionalSpec {
|
|
563
|
+
/** As help shows it: `<hotelId>`, or `[topic]` when optional. */
|
|
564
|
+
name: string;
|
|
565
|
+
/** The input field it sets; `null` for one the CLI reads itself. */
|
|
566
|
+
field: string | null;
|
|
567
|
+
/** Can be left out. */
|
|
568
|
+
optional?: boolean;
|
|
569
|
+
description: string;
|
|
570
|
+
}
|
|
143
571
|
/** An option of the CLI itself that no tool takes: not a field of any input. */
|
|
144
572
|
interface OptionSpec {
|
|
145
573
|
/** The long name without dashes. */
|
|
@@ -151,23 +579,22 @@ interface OptionSpec {
|
|
|
151
579
|
placeholder?: string;
|
|
152
580
|
description: string;
|
|
153
581
|
}
|
|
154
|
-
/** A
|
|
582
|
+
/** A group of commands, typed after its name: `fortrip hotels`. */
|
|
155
583
|
interface CommandGroupSpec {
|
|
156
|
-
name: "hotels";
|
|
584
|
+
name: "hotels" | "orders";
|
|
157
585
|
summary: string;
|
|
158
586
|
}
|
|
159
587
|
interface CommandSpec {
|
|
160
588
|
/** The group it is typed after; `null` for a command typed on its own. */
|
|
161
589
|
group: CommandGroupSpec["name"] | null;
|
|
162
590
|
/** Unique within its group. */
|
|
163
|
-
name: "search" | "get" | "
|
|
591
|
+
name: "search" | "get" | "offers" | "book" | "list" | "login" | "logout" | "whoami" | "guide" | "mcp";
|
|
164
592
|
summary: string;
|
|
165
593
|
/** The MCP tool the command mirrors; `null` for one that is the CLI's own. */
|
|
166
594
|
tool: ToolName | null;
|
|
167
595
|
/** The tool's input fields the command sets. */
|
|
168
596
|
flags: readonly FlagSpec[];
|
|
169
|
-
|
|
170
|
-
positionals?: readonly string[];
|
|
597
|
+
positionals?: readonly PositionalSpec[];
|
|
171
598
|
/** Options that are not input fields, such as `--body`. */
|
|
172
599
|
options?: readonly OptionSpec[];
|
|
173
600
|
}
|
|
@@ -176,9 +603,34 @@ declare const COMMANDS: readonly CommandSpec[];
|
|
|
176
603
|
/** `fortrip hotels search`, `fortrip login`: a command as it is typed,
|
|
177
604
|
* without its arguments. */
|
|
178
605
|
declare function commandInvocation(spec: Pick<CommandSpec, "group" | "name">): string;
|
|
179
|
-
/** Options of the CLI itself: `--help` after any command, `--version` on
|
|
606
|
+
/** Options of the CLI itself: `--help` after any command, `--version` on
|
|
607
|
+
* its own, `--json` with any command. */
|
|
180
608
|
declare const GLOBAL_FLAGS: readonly OptionSpec[];
|
|
181
609
|
|
|
610
|
+
declare const hotelId: z.ZodString;
|
|
611
|
+
declare const offerId: z.ZodString;
|
|
612
|
+
declare const orderId: z.ZodString;
|
|
613
|
+
/** `plc_` plus the GeoNames id in decimal (1 to 12 digits). */
|
|
614
|
+
declare const placeId: z.ZodString;
|
|
615
|
+
|
|
616
|
+
type Money = {
|
|
617
|
+
amount: string;
|
|
618
|
+
currency: string;
|
|
619
|
+
};
|
|
620
|
+
declare const money: z.ZodType<Money>;
|
|
621
|
+
/** A Money a caller sends: USD only, no unknown fields. */
|
|
622
|
+
declare const usdMoney: z.ZodType<Money>;
|
|
623
|
+
declare function formatMoney(m: Money): string;
|
|
624
|
+
|
|
625
|
+
/** RFC 3339 in UTC, ending in `Z`; names for these fields end in `At`. */
|
|
626
|
+
declare const instant: z.ZodString;
|
|
627
|
+
/** A calendar date in the hotel's calendar. */
|
|
628
|
+
declare const localDate: z.ZodString;
|
|
629
|
+
/** A local time of day. */
|
|
630
|
+
declare const localTime: z.ZodString;
|
|
631
|
+
/** An IANA time zone name such as `Asia/Shanghai`. */
|
|
632
|
+
declare const timeZone: z.ZodString;
|
|
633
|
+
|
|
182
634
|
/** True only for a real Gregorian calendar date in canonical yyyy-MM-dd form. */
|
|
183
635
|
declare function isIsoDate(value: string): boolean;
|
|
184
636
|
/** Signed number of UTC calendar days in the half-open range [start, end). */
|
|
@@ -188,198 +640,341 @@ declare function addIsoDateDays(date: string, days: number): string;
|
|
|
188
640
|
/** An object that names the keys it doesn't know instead of dropping them. */
|
|
189
641
|
declare function strictInput<T extends z.core.$ZodLooseShape>(shape: T): z.ZodObject<{ -readonly [P in keyof T]: T[P]; }, z.core.$strict>;
|
|
190
642
|
declare function wholeNumber(name: string, min: number, max: number): z.ZodNumber;
|
|
191
|
-
declare function positiveId(name: string): z.ZodNumber;
|
|
192
|
-
declare function isoDate(name: string): z.ZodString;
|
|
193
643
|
declare function nonEmpty(name: string): z.ZodString;
|
|
194
644
|
declare function text(name: string, min: number, max: number): z.ZodString;
|
|
195
645
|
declare function oneOf<const T extends readonly [string, ...string[]]>(name: string, values: T): z.ZodEnum<{ [k_1 in T[number]]: k_1; } extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never>;
|
|
196
646
|
declare function flag(name: string): z.ZodBoolean;
|
|
197
|
-
/** Each child's age in one room, up to `max` children. */
|
|
198
|
-
declare function childrenAges(max: number): z.ZodArray<z.ZodNumber>;
|
|
199
647
|
|
|
200
648
|
type GuideSurface = "mcp" | "claude-skill" | "cli";
|
|
201
649
|
type GuideTopic = "main" | "planning";
|
|
202
650
|
/** The guide on `topic` as `surface` states it, in Markdown. */
|
|
203
651
|
declare function renderGuide(surface: GuideSurface, topic: GuideTopic): string;
|
|
204
652
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
653
|
+
declare const stay: z.ZodObject<{
|
|
654
|
+
checkIn: z.ZodString;
|
|
655
|
+
checkOut: z.ZodString;
|
|
656
|
+
rooms: z.ZodArray<z.ZodObject<{
|
|
657
|
+
adults: z.ZodNumber;
|
|
658
|
+
childrenAges: z.ZodArray<z.ZodNumber>;
|
|
659
|
+
}, z.core.$strict>>;
|
|
660
|
+
}, z.core.$strict>;
|
|
661
|
+
type Stay = z.infer<typeof stay>;
|
|
662
|
+
declare const destination: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
663
|
+
kind: z.ZodLiteral<"place_name">;
|
|
664
|
+
name: z.ZodString;
|
|
665
|
+
countryCode: z.ZodString;
|
|
666
|
+
radiusMeters: z.ZodOptional<z.ZodNumber>;
|
|
667
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
668
|
+
kind: z.ZodLiteral<"place">;
|
|
669
|
+
placeId: z.ZodString;
|
|
670
|
+
radiusMeters: z.ZodOptional<z.ZodNumber>;
|
|
671
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
672
|
+
kind: z.ZodLiteral<"point">;
|
|
673
|
+
location: z.ZodObject<{
|
|
210
674
|
lat: z.ZodNumber;
|
|
211
675
|
lng: z.ZodNumber;
|
|
212
|
-
|
|
676
|
+
}, z.core.$strict>;
|
|
677
|
+
radiusMeters: z.ZodOptional<z.ZodNumber>;
|
|
678
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
679
|
+
kind: z.ZodLiteral<"country">;
|
|
680
|
+
countryCode: z.ZodString;
|
|
681
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
682
|
+
kind: z.ZodLiteral<"locality">;
|
|
683
|
+
placeId: z.ZodString;
|
|
684
|
+
radiusMeters: z.ZodOptional<z.ZodNumber>;
|
|
685
|
+
}, z.core.$strict>], "kind">;
|
|
686
|
+
type Destination = z.infer<typeof destination>;
|
|
687
|
+
/**
|
|
688
|
+
* The search request, with the clock that decides "not before today at UTC-12"
|
|
689
|
+
* (C5: the earliest calendar date on Earth) injectable for tests.
|
|
690
|
+
*/
|
|
691
|
+
declare function createSearchHotelsInput(now?: () => number): z.ZodObject<{
|
|
692
|
+
destination: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
693
|
+
kind: z.ZodLiteral<"place_name">;
|
|
694
|
+
name: z.ZodString;
|
|
695
|
+
countryCode: z.ZodString;
|
|
696
|
+
radiusMeters: z.ZodOptional<z.ZodNumber>;
|
|
697
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
698
|
+
kind: z.ZodLiteral<"place">;
|
|
699
|
+
placeId: z.ZodString;
|
|
700
|
+
radiusMeters: z.ZodOptional<z.ZodNumber>;
|
|
701
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
702
|
+
kind: z.ZodLiteral<"point">;
|
|
703
|
+
location: z.ZodObject<{
|
|
704
|
+
lat: z.ZodNumber;
|
|
705
|
+
lng: z.ZodNumber;
|
|
706
|
+
}, z.core.$strict>;
|
|
707
|
+
radiusMeters: z.ZodOptional<z.ZodNumber>;
|
|
708
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
709
|
+
kind: z.ZodLiteral<"country">;
|
|
710
|
+
countryCode: z.ZodString;
|
|
711
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
712
|
+
kind: z.ZodLiteral<"locality">;
|
|
713
|
+
placeId: z.ZodString;
|
|
714
|
+
radiusMeters: z.ZodOptional<z.ZodNumber>;
|
|
715
|
+
}, z.core.$strict>], "kind">>;
|
|
716
|
+
text: z.ZodOptional<z.ZodString>;
|
|
717
|
+
stay: z.ZodOptional<z.ZodObject<{
|
|
718
|
+
checkIn: z.ZodString;
|
|
719
|
+
checkOut: z.ZodString;
|
|
720
|
+
rooms: z.ZodArray<z.ZodObject<{
|
|
721
|
+
adults: z.ZodNumber;
|
|
722
|
+
childrenAges: z.ZodArray<z.ZodNumber>;
|
|
723
|
+
}, z.core.$strict>>;
|
|
213
724
|
}, z.core.$strict>>;
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
725
|
+
pricing: z.ZodOptional<z.ZodEnum<{
|
|
726
|
+
indicative: "indicative";
|
|
727
|
+
none: "none";
|
|
728
|
+
}>>;
|
|
729
|
+
filters: z.ZodOptional<z.ZodObject<{
|
|
730
|
+
stars: z.ZodOptional<z.ZodObject<{
|
|
731
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
732
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
733
|
+
}, z.core.$strict>>;
|
|
734
|
+
amenities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
735
|
+
parking: "parking";
|
|
736
|
+
wifi: "wifi";
|
|
737
|
+
laundry: "laundry";
|
|
738
|
+
restaurant: "restaurant";
|
|
739
|
+
room_service: "room_service";
|
|
740
|
+
bar: "bar";
|
|
741
|
+
non_smoking: "non_smoking";
|
|
742
|
+
business_center: "business_center";
|
|
743
|
+
pool: "pool";
|
|
744
|
+
airport_shuttle: "airport_shuttle";
|
|
745
|
+
spa: "spa";
|
|
746
|
+
gym: "gym";
|
|
747
|
+
accessible: "accessible";
|
|
748
|
+
ev_charging: "ev_charging";
|
|
749
|
+
air_conditioning: "air_conditioning";
|
|
750
|
+
pets_allowed: "pets_allowed";
|
|
751
|
+
kitchen: "kitchen";
|
|
752
|
+
other: "other";
|
|
753
|
+
}>>>;
|
|
754
|
+
price: z.ZodOptional<z.ZodObject<{
|
|
755
|
+
maxPerRoomNight: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
756
|
+
}, z.core.$strict>>;
|
|
757
|
+
}, z.core.$strict>>;
|
|
758
|
+
sort: z.ZodOptional<z.ZodEnum<{
|
|
759
|
+
distance: "distance";
|
|
760
|
+
relevance: "relevance";
|
|
761
|
+
stars_desc: "stars_desc";
|
|
762
|
+
price_asc: "price_asc";
|
|
763
|
+
price_desc: "price_desc";
|
|
764
|
+
}>>;
|
|
765
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
766
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
767
|
+
locale: z.ZodOptional<z.ZodEnum<{
|
|
768
|
+
en: "en";
|
|
769
|
+
zh: "zh";
|
|
770
|
+
}>>;
|
|
771
|
+
displayCurrency: z.ZodOptional<z.ZodEnum<{
|
|
221
772
|
USD: "USD";
|
|
773
|
+
CNY: "CNY";
|
|
222
774
|
}>>;
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
775
|
+
}, z.core.$strict>;
|
|
776
|
+
/** `POST /v1/hotels/search` and the MCP `search_hotels` arguments. */
|
|
777
|
+
declare const searchHotelsInput: z.ZodObject<{
|
|
778
|
+
destination: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
779
|
+
kind: z.ZodLiteral<"place_name">;
|
|
780
|
+
name: z.ZodString;
|
|
781
|
+
countryCode: z.ZodString;
|
|
782
|
+
radiusMeters: z.ZodOptional<z.ZodNumber>;
|
|
783
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
784
|
+
kind: z.ZodLiteral<"place">;
|
|
785
|
+
placeId: z.ZodString;
|
|
786
|
+
radiusMeters: z.ZodOptional<z.ZodNumber>;
|
|
787
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
788
|
+
kind: z.ZodLiteral<"point">;
|
|
789
|
+
location: z.ZodObject<{
|
|
790
|
+
lat: z.ZodNumber;
|
|
791
|
+
lng: z.ZodNumber;
|
|
792
|
+
}, z.core.$strict>;
|
|
793
|
+
radiusMeters: z.ZodOptional<z.ZodNumber>;
|
|
794
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
795
|
+
kind: z.ZodLiteral<"country">;
|
|
796
|
+
countryCode: z.ZodString;
|
|
797
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
798
|
+
kind: z.ZodLiteral<"locality">;
|
|
799
|
+
placeId: z.ZodString;
|
|
800
|
+
radiusMeters: z.ZodOptional<z.ZodNumber>;
|
|
801
|
+
}, z.core.$strict>], "kind">>;
|
|
802
|
+
text: z.ZodOptional<z.ZodString>;
|
|
803
|
+
stay: z.ZodOptional<z.ZodObject<{
|
|
804
|
+
checkIn: z.ZodString;
|
|
805
|
+
checkOut: z.ZodString;
|
|
806
|
+
rooms: z.ZodArray<z.ZodObject<{
|
|
807
|
+
adults: z.ZodNumber;
|
|
808
|
+
childrenAges: z.ZodArray<z.ZodNumber>;
|
|
809
|
+
}, z.core.$strict>>;
|
|
810
|
+
}, z.core.$strict>>;
|
|
811
|
+
pricing: z.ZodOptional<z.ZodEnum<{
|
|
812
|
+
indicative: "indicative";
|
|
813
|
+
none: "none";
|
|
814
|
+
}>>;
|
|
815
|
+
filters: z.ZodOptional<z.ZodObject<{
|
|
816
|
+
stars: z.ZodOptional<z.ZodObject<{
|
|
817
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
818
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
819
|
+
}, z.core.$strict>>;
|
|
820
|
+
amenities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
821
|
+
parking: "parking";
|
|
822
|
+
wifi: "wifi";
|
|
823
|
+
laundry: "laundry";
|
|
824
|
+
restaurant: "restaurant";
|
|
825
|
+
room_service: "room_service";
|
|
826
|
+
bar: "bar";
|
|
827
|
+
non_smoking: "non_smoking";
|
|
828
|
+
business_center: "business_center";
|
|
829
|
+
pool: "pool";
|
|
830
|
+
airport_shuttle: "airport_shuttle";
|
|
831
|
+
spa: "spa";
|
|
832
|
+
gym: "gym";
|
|
833
|
+
accessible: "accessible";
|
|
834
|
+
ev_charging: "ev_charging";
|
|
835
|
+
air_conditioning: "air_conditioning";
|
|
836
|
+
pets_allowed: "pets_allowed";
|
|
837
|
+
kitchen: "kitchen";
|
|
838
|
+
other: "other";
|
|
839
|
+
}>>>;
|
|
840
|
+
price: z.ZodOptional<z.ZodObject<{
|
|
841
|
+
maxPerRoomNight: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
842
|
+
}, z.core.$strict>>;
|
|
843
|
+
}, z.core.$strict>>;
|
|
844
|
+
sort: z.ZodOptional<z.ZodEnum<{
|
|
230
845
|
distance: "distance";
|
|
846
|
+
relevance: "relevance";
|
|
847
|
+
stars_desc: "stars_desc";
|
|
848
|
+
price_asc: "price_asc";
|
|
849
|
+
price_desc: "price_desc";
|
|
850
|
+
}>>;
|
|
851
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
852
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
853
|
+
locale: z.ZodOptional<z.ZodEnum<{
|
|
854
|
+
en: "en";
|
|
855
|
+
zh: "zh";
|
|
856
|
+
}>>;
|
|
857
|
+
displayCurrency: z.ZodOptional<z.ZodEnum<{
|
|
858
|
+
USD: "USD";
|
|
859
|
+
CNY: "CNY";
|
|
231
860
|
}>>;
|
|
232
|
-
page: z.ZodDefault<z.ZodNumber>;
|
|
233
|
-
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
234
861
|
}, z.core.$strict>;
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
* strict: it has always dropped a key it doesn't know. `hotelId` is coerced,
|
|
238
|
-
* so the numeric string a URL path gives parses as the number.
|
|
239
|
-
*/
|
|
862
|
+
type SearchHotelsInput = z.input<typeof searchHotelsInput>;
|
|
863
|
+
/** `GET /v1/hotels/{hotelId}` and the MCP `get_hotel` arguments. */
|
|
240
864
|
declare const getHotelInput: z.ZodObject<{
|
|
241
|
-
hotelId: z.
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
865
|
+
hotelId: z.ZodString;
|
|
866
|
+
include: z.ZodOptional<z.ZodEnum<{
|
|
867
|
+
rooms: "rooms";
|
|
868
|
+
}>>;
|
|
869
|
+
locale: z.ZodOptional<z.ZodEnum<{
|
|
870
|
+
en: "en";
|
|
871
|
+
zh: "zh";
|
|
872
|
+
}>>;
|
|
873
|
+
}, z.core.$strict>;
|
|
874
|
+
type GetHotelInput = z.input<typeof getHotelInput>;
|
|
875
|
+
/** `POST /v1/hotels/offers` and the MCP `get_hotel_offers` arguments. */
|
|
876
|
+
declare const hotelOffersInput: z.ZodObject<{
|
|
877
|
+
hotelIds: z.ZodArray<z.ZodString>;
|
|
878
|
+
stay: z.ZodObject<{
|
|
879
|
+
checkIn: z.ZodString;
|
|
880
|
+
checkOut: z.ZodString;
|
|
881
|
+
rooms: z.ZodArray<z.ZodObject<{
|
|
882
|
+
adults: z.ZodNumber;
|
|
883
|
+
childrenAges: z.ZodArray<z.ZodNumber>;
|
|
884
|
+
}, z.core.$strict>>;
|
|
885
|
+
}, z.core.$strict>;
|
|
886
|
+
filters: z.ZodOptional<z.ZodObject<{
|
|
887
|
+
requireBreakfast: z.ZodOptional<z.ZodBoolean>;
|
|
888
|
+
requireFreeCancellation: z.ZodOptional<z.ZodBoolean>;
|
|
889
|
+
}, z.core.$strict>>;
|
|
890
|
+
limitPerHotel: z.ZodDefault<z.ZodNumber>;
|
|
891
|
+
locale: z.ZodOptional<z.ZodEnum<{
|
|
892
|
+
en: "en";
|
|
893
|
+
zh: "zh";
|
|
894
|
+
}>>;
|
|
895
|
+
displayCurrency: z.ZodOptional<z.ZodEnum<{
|
|
255
896
|
USD: "USD";
|
|
897
|
+
CNY: "CNY";
|
|
256
898
|
}>>;
|
|
257
|
-
bookableOnly: z.ZodDefault<z.ZodBoolean>;
|
|
258
|
-
boardCodes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
259
|
-
RO: "RO";
|
|
260
|
-
BB: "BB";
|
|
261
|
-
HB: "HB";
|
|
262
|
-
FB: "FB";
|
|
263
|
-
BL: "BL";
|
|
264
|
-
BD: "BD";
|
|
265
|
-
HBBL: "HBBL";
|
|
266
|
-
HBLD: "HBLD";
|
|
267
|
-
AI: "AI";
|
|
268
|
-
}>>>;
|
|
269
|
-
freeCancellation: z.ZodOptional<z.ZodBoolean>;
|
|
270
|
-
maxRoomsPerHotel: z.ZodDefault<z.ZodNumber>;
|
|
271
899
|
}, z.core.$strict>;
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
* Unknown keys are refused, not dropped: a misspelled `children` would
|
|
277
|
-
* otherwise book the default `childrenAges: []`, a different party.
|
|
278
|
-
*/
|
|
279
|
-
declare const createBookingInput: z.ZodObject<{
|
|
280
|
-
hotelId: z.ZodNumber;
|
|
281
|
-
roomId: z.ZodString;
|
|
282
|
-
ratePlanCode: z.ZodString;
|
|
283
|
-
checkIn: z.ZodString;
|
|
284
|
-
checkOut: z.ZodString;
|
|
285
|
-
rooms: z.ZodNumber;
|
|
286
|
-
adults: z.ZodNumber;
|
|
287
|
-
childrenAges: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
288
|
-
guests: z.ZodArray<z.ZodObject<{
|
|
900
|
+
type HotelOffersInput = z.input<typeof hotelOffersInput>;
|
|
901
|
+
/** `POST /v1/orders` and the MCP `book_hotel` arguments. */
|
|
902
|
+
declare const createOrderInput: z.ZodObject<{
|
|
903
|
+
contact: z.ZodObject<{
|
|
289
904
|
firstName: z.ZodString;
|
|
290
905
|
lastName: z.ZodString;
|
|
291
|
-
|
|
906
|
+
email: z.ZodPipe<z.ZodString, z.ZodEmail>;
|
|
907
|
+
phone: z.ZodString;
|
|
908
|
+
}, z.core.$strict>;
|
|
909
|
+
items: z.ZodArray<z.ZodObject<{
|
|
910
|
+
offerId: z.ZodString;
|
|
911
|
+
hotel: z.ZodObject<{
|
|
912
|
+
rooms: z.ZodArray<z.ZodObject<{
|
|
913
|
+
guests: z.ZodArray<z.ZodObject<{
|
|
914
|
+
firstName: z.ZodString;
|
|
915
|
+
lastName: z.ZodString;
|
|
916
|
+
}, z.core.$strict>>;
|
|
917
|
+
}, z.core.$strict>>;
|
|
918
|
+
specialRequests: z.ZodOptional<z.ZodString>;
|
|
919
|
+
}, z.core.$strict>;
|
|
292
920
|
}, z.core.$strict>>;
|
|
293
|
-
contactName: z.ZodString;
|
|
294
|
-
contactPhone: z.ZodString;
|
|
295
|
-
contactEmail: z.ZodOptional<z.ZodString>;
|
|
296
|
-
specialRequests: z.ZodOptional<z.ZodString>;
|
|
297
921
|
}, z.core.$strict>;
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
922
|
+
type CreateOrderInput = z.input<typeof createOrderInput>;
|
|
923
|
+
/** `GET /v1/orders/{orderId}` and the MCP `get_order` arguments. */
|
|
924
|
+
declare const getOrderInput: z.ZodObject<{
|
|
925
|
+
orderId: z.ZodString;
|
|
926
|
+
locale: z.ZodOptional<z.ZodEnum<{
|
|
927
|
+
en: "en";
|
|
928
|
+
zh: "zh";
|
|
929
|
+
}>>;
|
|
930
|
+
}, z.core.$strict>;
|
|
931
|
+
type GetOrderInput = z.input<typeof getOrderInput>;
|
|
932
|
+
/** `GET /v1/orders` and the MCP `list_orders` arguments. A query string gives
|
|
933
|
+
* `limit` as text, so it is coerced. */
|
|
934
|
+
declare const listOrdersInput: z.ZodObject<{
|
|
935
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
936
|
+
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
937
|
+
locale: z.ZodOptional<z.ZodEnum<{
|
|
938
|
+
en: "en";
|
|
939
|
+
zh: "zh";
|
|
940
|
+
}>>;
|
|
941
|
+
}, z.core.$strict>;
|
|
942
|
+
type ListOrdersInput = z.input<typeof listOrdersInput>;
|
|
307
943
|
|
|
308
|
-
/** The ceilings and floors every agent surface enforces and documents. */
|
|
944
|
+
/** The ceilings and floors every agent surface enforces and documents (spec §15). */
|
|
309
945
|
declare const LIMITS: {
|
|
310
946
|
readonly rooms: 8;
|
|
311
947
|
readonly adultsPerRoom: 8;
|
|
312
|
-
readonly childrenPerRoom:
|
|
948
|
+
readonly childrenPerRoom: 4;
|
|
313
949
|
readonly childAgeMax: 17;
|
|
314
|
-
readonly
|
|
315
|
-
readonly
|
|
316
|
-
readonly
|
|
317
|
-
readonly
|
|
318
|
-
readonly
|
|
319
|
-
readonly
|
|
320
|
-
readonly
|
|
950
|
+
readonly nightsFortrip: 30;
|
|
951
|
+
readonly nightsSupplier: 15;
|
|
952
|
+
readonly offersHotels: 15;
|
|
953
|
+
readonly offersPerHotelDefault: 5;
|
|
954
|
+
readonly offersPerHotelMax: 20;
|
|
955
|
+
readonly pageSizeDefault: 20;
|
|
956
|
+
readonly pageSizeMax: 50;
|
|
957
|
+
readonly textLength: 128;
|
|
958
|
+
readonly radiusMetersMax: 80000;
|
|
959
|
+
readonly radiusMetersDefault: 8000;
|
|
960
|
+
readonly amenityFilters: 9;
|
|
321
961
|
readonly guestName: 60;
|
|
322
|
-
readonly
|
|
962
|
+
readonly contactFirstName: 59;
|
|
963
|
+
readonly contactLastName: 59;
|
|
323
964
|
readonly contactPhoneMin: 3;
|
|
324
965
|
readonly contactPhoneMax: 40;
|
|
325
966
|
readonly specialRequests: 500;
|
|
326
|
-
readonly
|
|
967
|
+
readonly poolLimit: 3000;
|
|
968
|
+
readonly candidatesShown: 8;
|
|
969
|
+
readonly candidatesCounted: 200;
|
|
970
|
+
readonly localitiesShown: 8;
|
|
327
971
|
};
|
|
328
|
-
/**
|
|
329
|
-
declare const
|
|
330
|
-
/** Currencies prices can be shown and paid in. */
|
|
331
|
-
declare const CURRENCIES: readonly ["CNY", "USD"];
|
|
332
|
-
/** Orders a hotel search can be sorted in. */
|
|
333
|
-
declare const SEARCH_SORTS: readonly ["recommended", "price-asc", "price-desc", "star-desc", "distance"];
|
|
972
|
+
/** Currencies a v1 response can show prices in (USD is also what is paid). */
|
|
973
|
+
declare const DISPLAY_CURRENCIES: readonly ["USD", "CNY"];
|
|
334
974
|
/** Where a person goes when an agent gets stuck. */
|
|
335
975
|
declare const SUPPORT_EMAIL = "info@fortrip.ai";
|
|
336
976
|
|
|
337
|
-
/**
|
|
338
|
-
* What `book_hotel` / `POST /api/agent/v1/hotels/bookings` answers with.
|
|
339
|
-
* Its JSON Schema allows no other keys, so a caller that parses its answer
|
|
340
|
-
* through this schema drops a field the server adds until it is added here,
|
|
341
|
-
* rather than failing a strict client's validation. The MCP tool adds a
|
|
342
|
-
* `nextStep` to it; the HTTP answer has none.
|
|
343
|
-
*/
|
|
344
|
-
declare const bookingResult: z.ZodObject<{
|
|
345
|
-
agentOrderId: z.ZodString;
|
|
346
|
-
paymentUrl: z.ZodString;
|
|
347
|
-
amount: z.ZodNullable<z.ZodNumber>;
|
|
348
|
-
currency: z.ZodString;
|
|
349
|
-
orderUrl: z.ZodString;
|
|
350
|
-
statusUrl: z.ZodOptional<z.ZodString>;
|
|
351
|
-
stay: z.ZodObject<{
|
|
352
|
-
hotelId: z.ZodNumber;
|
|
353
|
-
hotelName: z.ZodNullable<z.ZodString>;
|
|
354
|
-
roomName: z.ZodNullable<z.ZodString>;
|
|
355
|
-
checkIn: z.ZodString;
|
|
356
|
-
checkOut: z.ZodString;
|
|
357
|
-
nights: z.ZodNumber;
|
|
358
|
-
rooms: z.ZodNumber;
|
|
359
|
-
adultsPerRoom: z.ZodNumber;
|
|
360
|
-
childrenAgesPerRoom: z.ZodArray<z.ZodNumber>;
|
|
361
|
-
}, z.core.$strip>;
|
|
362
|
-
terms: z.ZodNullable<z.ZodObject<{
|
|
363
|
-
boardCode: z.ZodString;
|
|
364
|
-
boardCount: z.ZodNumber;
|
|
365
|
-
refundable: z.ZodBoolean;
|
|
366
|
-
freeCancelUntil: z.ZodNullable<z.ZodString>;
|
|
367
|
-
cancellation: z.ZodArray<z.ZodObject<{
|
|
368
|
-
amount: z.ZodNumber;
|
|
369
|
-
from: z.ZodString;
|
|
370
|
-
}, z.core.$strip>>;
|
|
371
|
-
isInstantConfirm: z.ZodBoolean;
|
|
372
|
-
confirmByMins: z.ZodNullable<z.ZodNumber>;
|
|
373
|
-
payAtHotelFees: z.ZodArray<z.ZodObject<{
|
|
374
|
-
type: z.ZodString;
|
|
375
|
-
isMandatory: z.ZodBoolean;
|
|
376
|
-
amount: z.ZodNumber;
|
|
377
|
-
currency: z.ZodString;
|
|
378
|
-
}, z.core.$strip>>;
|
|
379
|
-
}, z.core.$strip>>;
|
|
380
|
-
}, z.core.$strip>;
|
|
381
|
-
type BookingResult = z.infer<typeof bookingResult>;
|
|
382
|
-
/** `GET /api/agent/v1/me`: the signed-in user. */
|
|
977
|
+
/** The signed-in user. */
|
|
383
978
|
declare const meResult: z.ZodObject<{
|
|
384
979
|
userId: z.ZodString;
|
|
385
980
|
email: z.ZodNullable<z.ZodString>;
|
|
@@ -387,8 +982,8 @@ declare const meResult: z.ZodObject<{
|
|
|
387
982
|
}, z.core.$strip>;
|
|
388
983
|
type MeResult = z.infer<typeof meResult>;
|
|
389
984
|
/**
|
|
390
|
-
*
|
|
391
|
-
*
|
|
985
|
+
* Public: where and how the CLI signs in with the device flow. `scopes` is
|
|
986
|
+
* one space-separated string.
|
|
392
987
|
*/
|
|
393
988
|
declare const authConfig: z.ZodObject<{
|
|
394
989
|
issuer: z.ZodString;
|
|
@@ -400,35 +995,1797 @@ declare const authConfig: z.ZodObject<{
|
|
|
400
995
|
}, z.core.$strip>;
|
|
401
996
|
type AuthConfig = z.infer<typeof authConfig>;
|
|
402
997
|
|
|
403
|
-
/**
|
|
404
|
-
declare const
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
}
|
|
998
|
+
/** Both forms of a bilingual name; `null` where the catalogue lacks one. */
|
|
999
|
+
declare const names: z.ZodObject<{
|
|
1000
|
+
en: z.ZodNullable<z.ZodString>;
|
|
1001
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
1002
|
+
}, z.core.$strip>;
|
|
1003
|
+
/** A WGS84 point. */
|
|
1004
|
+
declare const latLng: z.ZodObject<{
|
|
1005
|
+
lat: z.ZodNumber;
|
|
1006
|
+
lng: z.ZodNumber;
|
|
1007
|
+
}, z.core.$strip>;
|
|
1008
|
+
/** Free text whose language is known. */
|
|
1009
|
+
declare const knownLocaleText: z.ZodObject<{
|
|
1010
|
+
text: z.ZodString;
|
|
1011
|
+
locale: z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>;
|
|
1012
|
+
}, z.core.$strip>;
|
|
1013
|
+
/** Free text whose language may be unknown (`locale: null`). */
|
|
1014
|
+
declare const localizedText: z.ZodObject<{
|
|
1015
|
+
text: z.ZodString;
|
|
1016
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1017
|
+
}, z.core.$strip>;
|
|
1018
|
+
/** The stay as the request gave it. */
|
|
1019
|
+
declare const stayEcho: z.ZodObject<{
|
|
1020
|
+
checkIn: z.ZodString;
|
|
1021
|
+
checkOut: z.ZodString;
|
|
1022
|
+
rooms: z.ZodArray<z.ZodObject<{
|
|
1023
|
+
adults: z.ZodNumber;
|
|
1024
|
+
childrenAges: z.ZodArray<z.ZodNumber>;
|
|
1025
|
+
}, z.core.$strip>>;
|
|
1026
|
+
}, z.core.$strip>;
|
|
1027
|
+
|
|
1028
|
+
/** Every code the v1 error envelope can carry (spec §11). */
|
|
1029
|
+
type ErrorCode = "invalid_request" | "cursor_invalid" | "unauthenticated" | "forbidden" | "not_found" | "order_removed" | "offer_expired" | "offer_changed" | "offer_already_ordered" | "order_exists" | "order_in_progress" | "order_attempts_exhausted" | "destination_ambiguous" | "destination_not_found" | "search_too_broad" | "stay_unsupported" | "stay_in_past" | "offer_unavailable" | "rate_limited" | "ordering_paused" | "service_unavailable" | "supplier_unavailable" | "internal";
|
|
1030
|
+
/** The HTTP statuses each code is sent with, and whether a retry can help. */
|
|
1031
|
+
declare const ERROR_CODES: Readonly<Record<ErrorCode, {
|
|
1032
|
+
status: readonly number[];
|
|
1033
|
+
retryable: boolean;
|
|
1034
|
+
}>>;
|
|
413
1035
|
|
|
414
|
-
declare const
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
1036
|
+
declare const ERROR_DETAILS: {
|
|
1037
|
+
invalid_request: z.ZodObject<{
|
|
1038
|
+
issues: z.ZodArray<z.ZodObject<{
|
|
1039
|
+
pointer: z.ZodString;
|
|
1040
|
+
message: z.ZodString;
|
|
1041
|
+
}, z.core.$strip>>;
|
|
1042
|
+
filterable: z.ZodOptional<z.ZodArray<z.ZodType<"parking" | "wifi" | "laundry" | "restaurant" | "room_service" | "bar" | "non_smoking" | "business_center" | "pool" | "airport_shuttle" | "spa" | "gym" | "accessible" | "ev_charging" | "air_conditioning" | "pets_allowed" | "kitchen" | "other" | (string & {}), unknown, z.core.$ZodTypeInternals<"parking" | "wifi" | "laundry" | "restaurant" | "room_service" | "bar" | "non_smoking" | "business_center" | "pool" | "airport_shuttle" | "spa" | "gym" | "accessible" | "ev_charging" | "air_conditioning" | "pets_allowed" | "kitchen" | "other" | (string & {}), unknown>>>>;
|
|
1043
|
+
share: z.ZodOptional<z.ZodObject<{
|
|
1044
|
+
code: z.ZodType<"parking" | "wifi" | "laundry" | "restaurant" | "room_service" | "bar" | "non_smoking" | "business_center" | "pool" | "airport_shuttle" | "spa" | "gym" | "accessible" | "ev_charging" | "air_conditioning" | "pets_allowed" | "kitchen" | "other" | (string & {}), unknown, z.core.$ZodTypeInternals<"parking" | "wifi" | "laundry" | "restaurant" | "room_service" | "bar" | "non_smoking" | "business_center" | "pool" | "airport_shuttle" | "spa" | "gym" | "accessible" | "ev_charging" | "air_conditioning" | "pets_allowed" | "kitchen" | "other" | (string & {}), unknown>>;
|
|
1045
|
+
listedShare: z.ZodNumber;
|
|
1046
|
+
}, z.core.$strip>>;
|
|
1047
|
+
}, z.core.$strip>;
|
|
1048
|
+
cursor_invalid: z.ZodObject<{
|
|
1049
|
+
reason: z.ZodType<(string & {}) | "expired" | "mismatch" | "malformed", unknown, z.core.$ZodTypeInternals<(string & {}) | "expired" | "mismatch" | "malformed", unknown>>;
|
|
1050
|
+
}, z.core.$strip>;
|
|
1051
|
+
unauthenticated: null;
|
|
1052
|
+
forbidden: null;
|
|
1053
|
+
not_found: null;
|
|
1054
|
+
order_removed: z.ZodObject<{
|
|
1055
|
+
orderId: z.ZodString;
|
|
1056
|
+
reference: z.ZodString;
|
|
1057
|
+
}, z.core.$strip>;
|
|
1058
|
+
offer_expired: z.ZodObject<{
|
|
1059
|
+
offerId: z.ZodString;
|
|
1060
|
+
expiredAt: z.ZodString;
|
|
1061
|
+
}, z.core.$strip>;
|
|
1062
|
+
offer_changed: z.ZodObject<{
|
|
1063
|
+
changes: z.ZodArray<z.ZodType<OpenUnionOutput<"field", readonly [z.ZodObject<{
|
|
1064
|
+
field: z.ZodLiteral<"price">;
|
|
1065
|
+
previous: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
1066
|
+
current: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
1067
|
+
worse: z.ZodBoolean;
|
|
1068
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1069
|
+
field: z.ZodLiteral<"meals">;
|
|
1070
|
+
previous: z.ZodObject<{
|
|
1071
|
+
known: z.ZodBoolean;
|
|
1072
|
+
included: z.ZodNullable<z.ZodArray<z.ZodType<(string & {}) | "breakfast" | "lunch" | "dinner", unknown, z.core.$ZodTypeInternals<(string & {}) | "breakfast" | "lunch" | "dinner", unknown>>>>;
|
|
1073
|
+
unspecifiedMainMeals: z.ZodNullable<z.ZodNumber>;
|
|
1074
|
+
allInclusive: z.ZodNullable<z.ZodBoolean>;
|
|
1075
|
+
guestsCoveredPerRoom: z.ZodNullable<z.ZodNumber>;
|
|
1076
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
1077
|
+
text: z.ZodString;
|
|
1078
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1079
|
+
}, z.core.$strip>>;
|
|
1080
|
+
}, z.core.$strip>;
|
|
1081
|
+
current: z.ZodObject<{
|
|
1082
|
+
known: z.ZodBoolean;
|
|
1083
|
+
included: z.ZodNullable<z.ZodArray<z.ZodType<(string & {}) | "breakfast" | "lunch" | "dinner", unknown, z.core.$ZodTypeInternals<(string & {}) | "breakfast" | "lunch" | "dinner", unknown>>>>;
|
|
1084
|
+
unspecifiedMainMeals: z.ZodNullable<z.ZodNumber>;
|
|
1085
|
+
allInclusive: z.ZodNullable<z.ZodBoolean>;
|
|
1086
|
+
guestsCoveredPerRoom: z.ZodNullable<z.ZodNumber>;
|
|
1087
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
1088
|
+
text: z.ZodString;
|
|
1089
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1090
|
+
}, z.core.$strip>>;
|
|
1091
|
+
}, z.core.$strip>;
|
|
1092
|
+
worse: z.ZodBoolean;
|
|
1093
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1094
|
+
field: z.ZodLiteral<"cancellation">;
|
|
1095
|
+
previous: z.ZodObject<{
|
|
1096
|
+
status: z.ZodType<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown>>;
|
|
1097
|
+
asOf: z.ZodString;
|
|
1098
|
+
freeCancellationEndsAt: z.ZodNullable<z.ZodString>;
|
|
1099
|
+
penalties: z.ZodArray<z.ZodObject<{
|
|
1100
|
+
startsAt: z.ZodNullable<z.ZodString>;
|
|
1101
|
+
amount: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
1102
|
+
}, z.core.$strip>>;
|
|
1103
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
1104
|
+
}, z.core.$strip>;
|
|
1105
|
+
current: z.ZodObject<{
|
|
1106
|
+
status: z.ZodType<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown>>;
|
|
1107
|
+
asOf: z.ZodString;
|
|
1108
|
+
freeCancellationEndsAt: z.ZodNullable<z.ZodString>;
|
|
1109
|
+
penalties: z.ZodArray<z.ZodObject<{
|
|
1110
|
+
startsAt: z.ZodNullable<z.ZodString>;
|
|
1111
|
+
amount: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
1112
|
+
}, z.core.$strip>>;
|
|
1113
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
1114
|
+
}, z.core.$strip>;
|
|
1115
|
+
worse: z.ZodBoolean;
|
|
1116
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1117
|
+
field: z.ZodLiteral<"confirmation">;
|
|
1118
|
+
previous: z.ZodObject<{
|
|
1119
|
+
mode: z.ZodType<"unknown" | (string & {}) | "instant" | "on_request", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "instant" | "on_request", unknown>>;
|
|
1120
|
+
withinMinutes: z.ZodNullable<z.ZodNumber>;
|
|
1121
|
+
}, z.core.$strip>;
|
|
1122
|
+
current: z.ZodObject<{
|
|
1123
|
+
mode: z.ZodType<"unknown" | (string & {}) | "instant" | "on_request", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "instant" | "on_request", unknown>>;
|
|
1124
|
+
withinMinutes: z.ZodNullable<z.ZodNumber>;
|
|
1125
|
+
}, z.core.$strip>;
|
|
1126
|
+
worse: z.ZodBoolean;
|
|
1127
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1128
|
+
field: z.ZodLiteral<"pay_at_property">;
|
|
1129
|
+
previous: z.ZodObject<{
|
|
1130
|
+
disclosure: z.ZodType<(string & {}) | "complete" | "incomplete", unknown, z.core.$ZodTypeInternals<(string & {}) | "complete" | "incomplete", unknown>>;
|
|
1131
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1132
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
1133
|
+
text: z.ZodString;
|
|
1134
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1135
|
+
}, z.core.$strip>>;
|
|
1136
|
+
amount: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
|
|
1137
|
+
mandatory: z.ZodBoolean;
|
|
1138
|
+
basis: z.ZodType<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown>>;
|
|
1139
|
+
collectedAt: z.ZodType<"unknown" | (string & {}) | "property", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "property", unknown>>;
|
|
1140
|
+
}, z.core.$strip>>;
|
|
1141
|
+
}, z.core.$strip>;
|
|
1142
|
+
current: z.ZodObject<{
|
|
1143
|
+
disclosure: z.ZodType<(string & {}) | "complete" | "incomplete", unknown, z.core.$ZodTypeInternals<(string & {}) | "complete" | "incomplete", unknown>>;
|
|
1144
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1145
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
1146
|
+
text: z.ZodString;
|
|
1147
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1148
|
+
}, z.core.$strip>>;
|
|
1149
|
+
amount: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
|
|
1150
|
+
mandatory: z.ZodBoolean;
|
|
1151
|
+
basis: z.ZodType<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown>>;
|
|
1152
|
+
collectedAt: z.ZodType<"unknown" | (string & {}) | "property", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "property", unknown>>;
|
|
1153
|
+
}, z.core.$strip>>;
|
|
1154
|
+
}, z.core.$strip>;
|
|
1155
|
+
worse: z.ZodBoolean;
|
|
1156
|
+
}, z.core.$strip>]>, unknown, z.core.$ZodTypeInternals<OpenUnionOutput<"field", readonly [z.ZodObject<{
|
|
1157
|
+
field: z.ZodLiteral<"price">;
|
|
1158
|
+
previous: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
1159
|
+
current: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
1160
|
+
worse: z.ZodBoolean;
|
|
1161
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1162
|
+
field: z.ZodLiteral<"meals">;
|
|
1163
|
+
previous: z.ZodObject<{
|
|
1164
|
+
known: z.ZodBoolean;
|
|
1165
|
+
included: z.ZodNullable<z.ZodArray<z.ZodType<(string & {}) | "breakfast" | "lunch" | "dinner", unknown, z.core.$ZodTypeInternals<(string & {}) | "breakfast" | "lunch" | "dinner", unknown>>>>;
|
|
1166
|
+
unspecifiedMainMeals: z.ZodNullable<z.ZodNumber>;
|
|
1167
|
+
allInclusive: z.ZodNullable<z.ZodBoolean>;
|
|
1168
|
+
guestsCoveredPerRoom: z.ZodNullable<z.ZodNumber>;
|
|
1169
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
1170
|
+
text: z.ZodString;
|
|
1171
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1172
|
+
}, z.core.$strip>>;
|
|
1173
|
+
}, z.core.$strip>;
|
|
1174
|
+
current: z.ZodObject<{
|
|
1175
|
+
known: z.ZodBoolean;
|
|
1176
|
+
included: z.ZodNullable<z.ZodArray<z.ZodType<(string & {}) | "breakfast" | "lunch" | "dinner", unknown, z.core.$ZodTypeInternals<(string & {}) | "breakfast" | "lunch" | "dinner", unknown>>>>;
|
|
1177
|
+
unspecifiedMainMeals: z.ZodNullable<z.ZodNumber>;
|
|
1178
|
+
allInclusive: z.ZodNullable<z.ZodBoolean>;
|
|
1179
|
+
guestsCoveredPerRoom: z.ZodNullable<z.ZodNumber>;
|
|
1180
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
1181
|
+
text: z.ZodString;
|
|
1182
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1183
|
+
}, z.core.$strip>>;
|
|
1184
|
+
}, z.core.$strip>;
|
|
1185
|
+
worse: z.ZodBoolean;
|
|
1186
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1187
|
+
field: z.ZodLiteral<"cancellation">;
|
|
1188
|
+
previous: z.ZodObject<{
|
|
1189
|
+
status: z.ZodType<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown>>;
|
|
1190
|
+
asOf: z.ZodString;
|
|
1191
|
+
freeCancellationEndsAt: z.ZodNullable<z.ZodString>;
|
|
1192
|
+
penalties: z.ZodArray<z.ZodObject<{
|
|
1193
|
+
startsAt: z.ZodNullable<z.ZodString>;
|
|
1194
|
+
amount: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
1195
|
+
}, z.core.$strip>>;
|
|
1196
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
1197
|
+
}, z.core.$strip>;
|
|
1198
|
+
current: z.ZodObject<{
|
|
1199
|
+
status: z.ZodType<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown>>;
|
|
1200
|
+
asOf: z.ZodString;
|
|
1201
|
+
freeCancellationEndsAt: z.ZodNullable<z.ZodString>;
|
|
1202
|
+
penalties: z.ZodArray<z.ZodObject<{
|
|
1203
|
+
startsAt: z.ZodNullable<z.ZodString>;
|
|
1204
|
+
amount: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
1205
|
+
}, z.core.$strip>>;
|
|
1206
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
1207
|
+
}, z.core.$strip>;
|
|
1208
|
+
worse: z.ZodBoolean;
|
|
1209
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1210
|
+
field: z.ZodLiteral<"confirmation">;
|
|
1211
|
+
previous: z.ZodObject<{
|
|
1212
|
+
mode: z.ZodType<"unknown" | (string & {}) | "instant" | "on_request", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "instant" | "on_request", unknown>>;
|
|
1213
|
+
withinMinutes: z.ZodNullable<z.ZodNumber>;
|
|
1214
|
+
}, z.core.$strip>;
|
|
1215
|
+
current: z.ZodObject<{
|
|
1216
|
+
mode: z.ZodType<"unknown" | (string & {}) | "instant" | "on_request", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "instant" | "on_request", unknown>>;
|
|
1217
|
+
withinMinutes: z.ZodNullable<z.ZodNumber>;
|
|
1218
|
+
}, z.core.$strip>;
|
|
1219
|
+
worse: z.ZodBoolean;
|
|
1220
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1221
|
+
field: z.ZodLiteral<"pay_at_property">;
|
|
1222
|
+
previous: z.ZodObject<{
|
|
1223
|
+
disclosure: z.ZodType<(string & {}) | "complete" | "incomplete", unknown, z.core.$ZodTypeInternals<(string & {}) | "complete" | "incomplete", unknown>>;
|
|
1224
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1225
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
1226
|
+
text: z.ZodString;
|
|
1227
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1228
|
+
}, z.core.$strip>>;
|
|
1229
|
+
amount: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
|
|
1230
|
+
mandatory: z.ZodBoolean;
|
|
1231
|
+
basis: z.ZodType<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown>>;
|
|
1232
|
+
collectedAt: z.ZodType<"unknown" | (string & {}) | "property", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "property", unknown>>;
|
|
1233
|
+
}, z.core.$strip>>;
|
|
1234
|
+
}, z.core.$strip>;
|
|
1235
|
+
current: z.ZodObject<{
|
|
1236
|
+
disclosure: z.ZodType<(string & {}) | "complete" | "incomplete", unknown, z.core.$ZodTypeInternals<(string & {}) | "complete" | "incomplete", unknown>>;
|
|
1237
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1238
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
1239
|
+
text: z.ZodString;
|
|
1240
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1241
|
+
}, z.core.$strip>>;
|
|
1242
|
+
amount: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
|
|
1243
|
+
mandatory: z.ZodBoolean;
|
|
1244
|
+
basis: z.ZodType<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown>>;
|
|
1245
|
+
collectedAt: z.ZodType<"unknown" | (string & {}) | "property", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "property", unknown>>;
|
|
1246
|
+
}, z.core.$strip>>;
|
|
1247
|
+
}, z.core.$strip>;
|
|
1248
|
+
worse: z.ZodBoolean;
|
|
1249
|
+
}, z.core.$strip>]>, unknown>>>;
|
|
1250
|
+
offer: z.ZodObject<{
|
|
1251
|
+
offerId: z.ZodString;
|
|
1252
|
+
type: z.ZodType<"hotel" | (string & {}), unknown, z.core.$ZodTypeInternals<"hotel" | (string & {}), unknown>>;
|
|
1253
|
+
expiresAt: z.ZodString;
|
|
1254
|
+
hotel: z.ZodObject<{
|
|
1255
|
+
hotelId: z.ZodString;
|
|
1256
|
+
room: z.ZodObject<{
|
|
1257
|
+
beds: z.ZodNullable<z.ZodObject<{
|
|
1258
|
+
text: z.ZodString;
|
|
1259
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1260
|
+
}, z.core.$strip>>;
|
|
1261
|
+
areaSqm: z.ZodNullable<z.ZodObject<{
|
|
1262
|
+
min: z.ZodNumber;
|
|
1263
|
+
max: z.ZodNumber;
|
|
1264
|
+
}, z.core.$strip>>;
|
|
1265
|
+
maxOccupancy: z.ZodNullable<z.ZodNumber>;
|
|
1266
|
+
window: z.ZodNullable<z.ZodType<(string & {}) | "yes" | "no" | "partial", unknown, z.core.$ZodTypeInternals<(string & {}) | "yes" | "no" | "partial", unknown>>>;
|
|
1267
|
+
name: z.ZodNullable<z.ZodObject<{
|
|
1268
|
+
text: z.ZodString;
|
|
1269
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1270
|
+
}, z.core.$strip>>;
|
|
1271
|
+
}, z.core.$strip>;
|
|
1272
|
+
roomCount: z.ZodNumber;
|
|
1273
|
+
meals: z.ZodObject<{
|
|
1274
|
+
known: z.ZodBoolean;
|
|
1275
|
+
included: z.ZodNullable<z.ZodArray<z.ZodType<(string & {}) | "breakfast" | "lunch" | "dinner", unknown, z.core.$ZodTypeInternals<(string & {}) | "breakfast" | "lunch" | "dinner", unknown>>>>;
|
|
1276
|
+
unspecifiedMainMeals: z.ZodNullable<z.ZodNumber>;
|
|
1277
|
+
allInclusive: z.ZodNullable<z.ZodBoolean>;
|
|
1278
|
+
guestsCoveredPerRoom: z.ZodNullable<z.ZodNumber>;
|
|
1279
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
1280
|
+
text: z.ZodString;
|
|
1281
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1282
|
+
}, z.core.$strip>>;
|
|
1283
|
+
}, z.core.$strip>;
|
|
1284
|
+
}, z.core.$strip>;
|
|
1285
|
+
price: z.ZodObject<{
|
|
1286
|
+
total: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
1287
|
+
perNightAllRooms: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
1288
|
+
approx: z.ZodNullable<z.ZodObject<{
|
|
1289
|
+
total: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
1290
|
+
perNightAllRooms: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
1291
|
+
rateDate: z.ZodString;
|
|
1292
|
+
}, z.core.$strip>>;
|
|
1293
|
+
payAtProperty: z.ZodObject<{
|
|
1294
|
+
disclosure: z.ZodType<(string & {}) | "complete" | "incomplete", unknown, z.core.$ZodTypeInternals<(string & {}) | "complete" | "incomplete", unknown>>;
|
|
1295
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1296
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
1297
|
+
text: z.ZodString;
|
|
1298
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1299
|
+
}, z.core.$strip>>;
|
|
1300
|
+
amount: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
|
|
1301
|
+
mandatory: z.ZodBoolean;
|
|
1302
|
+
basis: z.ZodType<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown>>;
|
|
1303
|
+
collectedAt: z.ZodType<"unknown" | (string & {}) | "property", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "property", unknown>>;
|
|
1304
|
+
}, z.core.$strip>>;
|
|
1305
|
+
}, z.core.$strip>;
|
|
1306
|
+
}, z.core.$strip>;
|
|
1307
|
+
cancellation: z.ZodObject<{
|
|
1308
|
+
status: z.ZodType<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown>>;
|
|
1309
|
+
asOf: z.ZodString;
|
|
1310
|
+
freeCancellationEndsAt: z.ZodNullable<z.ZodString>;
|
|
1311
|
+
penalties: z.ZodArray<z.ZodObject<{
|
|
1312
|
+
startsAt: z.ZodNullable<z.ZodString>;
|
|
1313
|
+
amount: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
1314
|
+
}, z.core.$strip>>;
|
|
1315
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
1316
|
+
}, z.core.$strip>;
|
|
1317
|
+
confirmation: z.ZodObject<{
|
|
1318
|
+
mode: z.ZodType<"unknown" | (string & {}) | "instant" | "on_request", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "instant" | "on_request", unknown>>;
|
|
1319
|
+
withinMinutes: z.ZodNullable<z.ZodNumber>;
|
|
1320
|
+
}, z.core.$strip>;
|
|
1321
|
+
}, z.core.$strip>;
|
|
1322
|
+
}, z.core.$strip>;
|
|
1323
|
+
offer_already_ordered: z.ZodObject<{
|
|
1324
|
+
orderId: z.ZodString;
|
|
1325
|
+
}, z.core.$strip>;
|
|
1326
|
+
order_exists: z.ZodObject<{
|
|
1327
|
+
orderId: z.ZodString;
|
|
1328
|
+
status: z.ZodType<(string & {}) | "awaiting_payment" | "expired" | "confirming" | "confirmed" | "failed" | "cancelling" | "cancelled" | "needs_attention", unknown, z.core.$ZodTypeInternals<(string & {}) | "awaiting_payment" | "expired" | "confirming" | "confirmed" | "failed" | "cancelling" | "cancelled" | "needs_attention", unknown>>;
|
|
1329
|
+
}, z.core.$strip>;
|
|
1330
|
+
order_in_progress: z.ZodObject<{
|
|
1331
|
+
orderId: z.ZodString;
|
|
1332
|
+
}, z.core.$strip>;
|
|
1333
|
+
order_attempts_exhausted: z.ZodObject<{
|
|
1334
|
+
orderId: z.ZodString;
|
|
1335
|
+
}, z.core.$strip>;
|
|
1336
|
+
destination_ambiguous: z.ZodObject<{
|
|
1337
|
+
name: z.ZodString;
|
|
1338
|
+
countryCode: z.ZodString;
|
|
1339
|
+
candidates: z.ZodArray<z.ZodObject<{
|
|
1340
|
+
hotels: z.ZodObject<{
|
|
1341
|
+
scope: z.ZodType<(string & {}) | "area" | "radius", unknown, z.core.$ZodTypeInternals<(string & {}) | "area" | "radius", unknown>>;
|
|
1342
|
+
radiusMeters: z.ZodNullable<z.ZodNumber>;
|
|
1343
|
+
count: z.ZodNumber;
|
|
1344
|
+
}, z.core.$strip>;
|
|
1345
|
+
placeId: z.ZodString;
|
|
1346
|
+
name: z.ZodString;
|
|
1347
|
+
names: z.ZodObject<{
|
|
1348
|
+
en: z.ZodNullable<z.ZodString>;
|
|
1349
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
1350
|
+
}, z.core.$strip>;
|
|
1351
|
+
kind: z.ZodType<"country" | (string & {}) | "region" | "district" | "settlement" | "neighbourhood" | "island", unknown, z.core.$ZodTypeInternals<"country" | (string & {}) | "region" | "district" | "settlement" | "neighbourhood" | "island", unknown>>;
|
|
1352
|
+
scope: z.ZodType<(string & {}) | "area" | "radius", unknown, z.core.$ZodTypeInternals<(string & {}) | "area" | "radius", unknown>>;
|
|
1353
|
+
cityLike: z.ZodNullable<z.ZodBoolean>;
|
|
1354
|
+
population: z.ZodNullable<z.ZodNumber>;
|
|
1355
|
+
region: z.ZodNullable<z.ZodObject<{
|
|
1356
|
+
placeId: z.ZodString;
|
|
1357
|
+
name: z.ZodString;
|
|
1358
|
+
names: z.ZodObject<{
|
|
1359
|
+
en: z.ZodNullable<z.ZodString>;
|
|
1360
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
1361
|
+
}, z.core.$strip>;
|
|
1362
|
+
}, z.core.$strip>>;
|
|
1363
|
+
countryCode: z.ZodString;
|
|
1364
|
+
location: z.ZodObject<{
|
|
1365
|
+
lat: z.ZodNumber;
|
|
1366
|
+
lng: z.ZodNumber;
|
|
1367
|
+
}, z.core.$strip>;
|
|
1368
|
+
}, z.core.$strip>>;
|
|
1369
|
+
candidatesTotal: z.ZodNumber;
|
|
1370
|
+
nameAsText: z.ZodNullable<z.ZodNumber>;
|
|
1371
|
+
}, z.core.$strip>;
|
|
1372
|
+
destination_not_found: z.ZodType<OpenUnionOutput<"reason", readonly [z.ZodObject<{
|
|
1373
|
+
reason: z.ZodLiteral<"no_match">;
|
|
1374
|
+
name: z.ZodString;
|
|
1375
|
+
countryCode: z.ZodString;
|
|
1376
|
+
nameAsText: z.ZodNullable<z.ZodNumber>;
|
|
1377
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1378
|
+
reason: z.ZodLiteral<"unknown_id">;
|
|
1379
|
+
placeId: z.ZodString;
|
|
1380
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1381
|
+
reason: z.ZodLiteral<"not_a_locality">;
|
|
1382
|
+
placeId: z.ZodString;
|
|
1383
|
+
hub: z.ZodNullable<z.ZodObject<{
|
|
1384
|
+
placeId: z.ZodString;
|
|
1385
|
+
name: z.ZodString;
|
|
1386
|
+
names: z.ZodObject<{
|
|
1387
|
+
en: z.ZodNullable<z.ZodString>;
|
|
1388
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
1389
|
+
}, z.core.$strip>;
|
|
1390
|
+
}, z.core.$strip>>;
|
|
1391
|
+
hubTotal: z.ZodNullable<z.ZodNumber>;
|
|
1392
|
+
}, z.core.$strip>]>, unknown, z.core.$ZodTypeInternals<OpenUnionOutput<"reason", readonly [z.ZodObject<{
|
|
1393
|
+
reason: z.ZodLiteral<"no_match">;
|
|
1394
|
+
name: z.ZodString;
|
|
1395
|
+
countryCode: z.ZodString;
|
|
1396
|
+
nameAsText: z.ZodNullable<z.ZodNumber>;
|
|
1397
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1398
|
+
reason: z.ZodLiteral<"unknown_id">;
|
|
1399
|
+
placeId: z.ZodString;
|
|
1400
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1401
|
+
reason: z.ZodLiteral<"not_a_locality">;
|
|
1402
|
+
placeId: z.ZodString;
|
|
1403
|
+
hub: z.ZodNullable<z.ZodObject<{
|
|
1404
|
+
placeId: z.ZodString;
|
|
1405
|
+
name: z.ZodString;
|
|
1406
|
+
names: z.ZodObject<{
|
|
1407
|
+
en: z.ZodNullable<z.ZodString>;
|
|
1408
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
1409
|
+
}, z.core.$strip>;
|
|
1410
|
+
}, z.core.$strip>>;
|
|
1411
|
+
hubTotal: z.ZodNullable<z.ZodNumber>;
|
|
1412
|
+
}, z.core.$strip>]>, unknown>>;
|
|
1413
|
+
search_too_broad: z.ZodObject<{
|
|
1414
|
+
matched: z.ZodNumber;
|
|
1415
|
+
poolLimit: z.ZodNumber;
|
|
1416
|
+
localities: z.ZodObject<{
|
|
1417
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1418
|
+
place: z.ZodObject<{
|
|
1419
|
+
placeId: z.ZodString;
|
|
1420
|
+
name: z.ZodString;
|
|
1421
|
+
names: z.ZodObject<{
|
|
1422
|
+
en: z.ZodNullable<z.ZodString>;
|
|
1423
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
1424
|
+
}, z.core.$strip>;
|
|
1425
|
+
}, z.core.$strip>;
|
|
1426
|
+
count: z.ZodNumber;
|
|
1427
|
+
total: z.ZodNumber;
|
|
1428
|
+
includes: z.ZodArray<z.ZodObject<{
|
|
1429
|
+
place: z.ZodObject<{
|
|
1430
|
+
placeId: z.ZodString;
|
|
1431
|
+
name: z.ZodString;
|
|
1432
|
+
names: z.ZodObject<{
|
|
1433
|
+
en: z.ZodNullable<z.ZodString>;
|
|
1434
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
1435
|
+
}, z.core.$strip>;
|
|
1436
|
+
}, z.core.$strip>;
|
|
1437
|
+
members: z.ZodNumber;
|
|
1438
|
+
}, z.core.$strip>>;
|
|
1439
|
+
}, z.core.$strip>>;
|
|
1440
|
+
unassigned: z.ZodNumber;
|
|
1441
|
+
more: z.ZodNumber;
|
|
1442
|
+
}, z.core.$strip>;
|
|
1443
|
+
/** The searched area's center, as a search echoes it; null for text only.
|
|
1444
|
+
* Optional for clients; the server must send it (`SERVER_DETAILS`). */
|
|
1445
|
+
center: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1446
|
+
location: z.ZodObject<{
|
|
1447
|
+
lat: z.ZodNumber;
|
|
1448
|
+
lng: z.ZodNumber;
|
|
1449
|
+
}, z.core.$strip>;
|
|
1450
|
+
place: z.ZodNullable<z.ZodObject<{
|
|
1451
|
+
placeId: z.ZodString;
|
|
1452
|
+
name: z.ZodString;
|
|
1453
|
+
names: z.ZodObject<{
|
|
1454
|
+
en: z.ZodNullable<z.ZodString>;
|
|
1455
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
1456
|
+
}, z.core.$strip>;
|
|
1457
|
+
}, z.core.$strip>>;
|
|
1458
|
+
basis: z.ZodType<"point" | (string & {}) | "seat" | "capital" | "busiest_settlement" | "hub", unknown, z.core.$ZodTypeInternals<"point" | (string & {}) | "seat" | "capital" | "busiest_settlement" | "hub", unknown>>;
|
|
1459
|
+
}, z.core.$strip>>>;
|
|
1460
|
+
}, z.core.$strip>;
|
|
1461
|
+
stay_unsupported: z.ZodType<OpenUnionOutput<"reason", readonly [z.ZodObject<{
|
|
1462
|
+
reason: z.ZodLiteral<"mixed_occupancy">;
|
|
1463
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1464
|
+
reason: z.ZodLiteral<"max_nights">;
|
|
1465
|
+
max: z.ZodNumber;
|
|
1466
|
+
}, z.core.$strip>]>, unknown, z.core.$ZodTypeInternals<OpenUnionOutput<"reason", readonly [z.ZodObject<{
|
|
1467
|
+
reason: z.ZodLiteral<"mixed_occupancy">;
|
|
1468
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1469
|
+
reason: z.ZodLiteral<"max_nights">;
|
|
1470
|
+
max: z.ZodNumber;
|
|
1471
|
+
}, z.core.$strip>]>, unknown>>;
|
|
1472
|
+
stay_in_past: z.ZodObject<{
|
|
1473
|
+
checkIn: z.ZodString;
|
|
1474
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
1475
|
+
}, z.core.$strip>;
|
|
1476
|
+
offer_unavailable: z.ZodObject<{
|
|
1477
|
+
offerId: z.ZodString;
|
|
1478
|
+
reason: z.ZodType<(string & {}) | "sold_out" | "refused", unknown, z.core.$ZodTypeInternals<(string & {}) | "sold_out" | "refused", unknown>>;
|
|
1479
|
+
}, z.core.$strip>;
|
|
1480
|
+
rate_limited: z.ZodObject<{
|
|
1481
|
+
scope: z.ZodType<"search" | "hotel" | (string & {}) | "offers" | "orders_read" | "orders_create", unknown, z.core.$ZodTypeInternals<"search" | "hotel" | (string & {}) | "offers" | "orders_read" | "orders_create", unknown>>;
|
|
1482
|
+
}, z.core.$strip>;
|
|
1483
|
+
ordering_paused: null;
|
|
1484
|
+
service_unavailable: null;
|
|
1485
|
+
supplier_unavailable: z.ZodObject<{
|
|
1486
|
+
outcome: z.ZodType<"unknown" | (string & {}) | "not_started", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "not_started", unknown>>;
|
|
1487
|
+
}, z.core.$strip>;
|
|
1488
|
+
internal: null;
|
|
1489
|
+
};
|
|
1490
|
+
type Details = typeof ERROR_DETAILS;
|
|
1491
|
+
/** The error body of a known code; `details` typed by the code. */
|
|
1492
|
+
type ErrorBody<C extends ErrorCode> = {
|
|
1493
|
+
code: C;
|
|
1494
|
+
message: string;
|
|
1495
|
+
param?: string;
|
|
1496
|
+
retryable: boolean;
|
|
1497
|
+
retryAfterSeconds?: number;
|
|
1498
|
+
requestId: string;
|
|
1499
|
+
} & (Details[C] extends z.ZodType ? {
|
|
1500
|
+
details?: z.output<Details[C]>;
|
|
1501
|
+
} : unknown);
|
|
1502
|
+
/** Any known code's error body; narrows by `code`. */
|
|
1503
|
+
type KnownErrorBody = {
|
|
1504
|
+
[C in ErrorCode]: ErrorBody<C>;
|
|
1505
|
+
}[ErrorCode];
|
|
1506
|
+
type ErrorEnvelope = {
|
|
1507
|
+
error: KnownErrorBody | OpenFallback<"code">;
|
|
420
1508
|
};
|
|
421
|
-
type ErrorReason = keyof typeof reasonStatuses;
|
|
422
1509
|
/**
|
|
423
|
-
*
|
|
424
|
-
*
|
|
425
|
-
*
|
|
1510
|
+
* `{ error: { code, message, param?, retryable, retryAfterSeconds?, details?,
|
|
1511
|
+
* requestId } }`, picked by `code`: a known code parses its own details, an
|
|
1512
|
+
* unknown code falls back. `details` is optional here, for clients.
|
|
426
1513
|
*/
|
|
427
|
-
declare const
|
|
428
|
-
|
|
1514
|
+
declare const errorEnvelope: z.ZodType<ErrorEnvelope>;
|
|
1515
|
+
/**
|
|
1516
|
+
* Server tests only: the closed envelope, where a code whose §11 row lists
|
|
1517
|
+
* details must carry them and a code whose row shows "–" must not.
|
|
1518
|
+
*/
|
|
1519
|
+
declare function strictErrorEnvelope(): z.ZodType<{
|
|
1520
|
+
error: KnownErrorBody;
|
|
1521
|
+
}>;
|
|
1522
|
+
|
|
1523
|
+
/** 2.0's 14 policy topics in snake_case, plus `other`. */
|
|
1524
|
+
declare const POLICY_TOPICS: readonly ["check_in", "important_notices", "booking", "booking_tips", "check_in_out", "check_in_tips", "reception", "deposit", "meal", "extra_bed", "pets", "surroundings", "meetings", "non_smoking", "other"];
|
|
1525
|
+
type PolicyTopic = (typeof POLICY_TOPICS)[number];
|
|
1526
|
+
/** A room type's facts; shared with the offer's room. */
|
|
1527
|
+
declare const roomFacts: {
|
|
1528
|
+
beds: z.ZodNullable<z.ZodObject<{
|
|
1529
|
+
text: z.ZodString;
|
|
1530
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1531
|
+
}, z.core.$strip>>;
|
|
1532
|
+
areaSqm: z.ZodNullable<z.ZodObject<{
|
|
1533
|
+
min: z.ZodNumber;
|
|
1534
|
+
max: z.ZodNumber;
|
|
1535
|
+
}, z.core.$strip>>;
|
|
1536
|
+
maxOccupancy: z.ZodNullable<z.ZodNumber>;
|
|
1537
|
+
window: z.ZodNullable<z.ZodType<(string & {}) | "yes" | "no" | "partial", unknown, z.core.$ZodTypeInternals<(string & {}) | "yes" | "no" | "partial", unknown>>>;
|
|
1538
|
+
};
|
|
1539
|
+
declare const hotel: z.ZodObject<{
|
|
1540
|
+
hotelId: z.ZodString;
|
|
1541
|
+
name: z.ZodString;
|
|
1542
|
+
names: z.ZodObject<{
|
|
1543
|
+
en: z.ZodNullable<z.ZodString>;
|
|
1544
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
1545
|
+
}, z.core.$strip>;
|
|
1546
|
+
bookable: z.ZodBoolean;
|
|
1547
|
+
stars: z.ZodNullable<z.ZodNumber>;
|
|
1548
|
+
address: z.ZodObject<{
|
|
1549
|
+
line: z.ZodNullable<z.ZodObject<{
|
|
1550
|
+
text: z.ZodString;
|
|
1551
|
+
locale: z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>;
|
|
1552
|
+
}, z.core.$strip>>;
|
|
1553
|
+
countryCode: z.ZodNullable<z.ZodString>;
|
|
1554
|
+
region: z.ZodNullable<z.ZodObject<{
|
|
1555
|
+
placeId: z.ZodString;
|
|
1556
|
+
name: z.ZodString;
|
|
1557
|
+
names: z.ZodObject<{
|
|
1558
|
+
en: z.ZodNullable<z.ZodString>;
|
|
1559
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
1560
|
+
}, z.core.$strip>;
|
|
1561
|
+
}, z.core.$strip>>;
|
|
1562
|
+
}, z.core.$strip>;
|
|
1563
|
+
location: z.ZodNullable<z.ZodObject<{
|
|
1564
|
+
lat: z.ZodNumber;
|
|
1565
|
+
lng: z.ZodNumber;
|
|
1566
|
+
}, z.core.$strip>>;
|
|
1567
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
1568
|
+
description: z.ZodNullable<z.ZodObject<{
|
|
1569
|
+
text: z.ZodString;
|
|
1570
|
+
locale: z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>;
|
|
1571
|
+
}, z.core.$strip>>;
|
|
1572
|
+
checkInTimes: z.ZodObject<{
|
|
1573
|
+
from: z.ZodNullable<z.ZodString>;
|
|
1574
|
+
until: z.ZodNullable<z.ZodString>;
|
|
1575
|
+
}, z.core.$strip>;
|
|
1576
|
+
checkOutTimes: z.ZodObject<{
|
|
1577
|
+
from: z.ZodNullable<z.ZodString>;
|
|
1578
|
+
until: z.ZodNullable<z.ZodString>;
|
|
1579
|
+
}, z.core.$strip>;
|
|
1580
|
+
policies: z.ZodObject<{
|
|
1581
|
+
listed: z.ZodBoolean;
|
|
1582
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1583
|
+
topic: z.ZodType<"non_smoking" | "other" | (string & {}) | "check_in" | "important_notices" | "booking" | "booking_tips" | "check_in_out" | "check_in_tips" | "reception" | "deposit" | "meal" | "extra_bed" | "pets" | "surroundings" | "meetings", unknown, z.core.$ZodTypeInternals<"non_smoking" | "other" | (string & {}) | "check_in" | "important_notices" | "booking" | "booking_tips" | "check_in_out" | "check_in_tips" | "reception" | "deposit" | "meal" | "extra_bed" | "pets" | "surroundings" | "meetings", unknown>>;
|
|
1584
|
+
text: z.ZodString;
|
|
1585
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1586
|
+
}, z.core.$strip>>;
|
|
1587
|
+
}, z.core.$strip>;
|
|
1588
|
+
amenities: z.ZodObject<{
|
|
1589
|
+
listed: z.ZodBoolean;
|
|
1590
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1591
|
+
code: z.ZodType<"parking" | "wifi" | "laundry" | "restaurant" | "room_service" | "bar" | "non_smoking" | "business_center" | "pool" | "airport_shuttle" | "spa" | "gym" | "accessible" | "ev_charging" | "air_conditioning" | "pets_allowed" | "kitchen" | "other" | (string & {}), unknown, z.core.$ZodTypeInternals<"parking" | "wifi" | "laundry" | "restaurant" | "room_service" | "bar" | "non_smoking" | "business_center" | "pool" | "airport_shuttle" | "spa" | "gym" | "accessible" | "ev_charging" | "air_conditioning" | "pets_allowed" | "kitchen" | "other" | (string & {}), unknown>>;
|
|
1592
|
+
name: z.ZodObject<{
|
|
1593
|
+
text: z.ZodString;
|
|
1594
|
+
locale: z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>;
|
|
1595
|
+
}, z.core.$strip>;
|
|
1596
|
+
}, z.core.$strip>>;
|
|
1597
|
+
}, z.core.$strip>;
|
|
1598
|
+
breakfastServed: z.ZodNullable<z.ZodBoolean>;
|
|
1599
|
+
deposit: z.ZodObject<{
|
|
1600
|
+
required: z.ZodNullable<z.ZodBoolean>;
|
|
1601
|
+
amount: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
|
|
1602
|
+
}, z.core.$strip>;
|
|
1603
|
+
contact: z.ZodObject<{
|
|
1604
|
+
phone: z.ZodNullable<z.ZodString>;
|
|
1605
|
+
website: z.ZodNullable<z.ZodString>;
|
|
1606
|
+
}, z.core.$strip>;
|
|
1607
|
+
rooms: z.ZodOptional<z.ZodObject<{
|
|
1608
|
+
listed: z.ZodBoolean;
|
|
1609
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1610
|
+
beds: z.ZodNullable<z.ZodObject<{
|
|
1611
|
+
text: z.ZodString;
|
|
1612
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1613
|
+
}, z.core.$strip>>;
|
|
1614
|
+
areaSqm: z.ZodNullable<z.ZodObject<{
|
|
1615
|
+
min: z.ZodNumber;
|
|
1616
|
+
max: z.ZodNumber;
|
|
1617
|
+
}, z.core.$strip>>;
|
|
1618
|
+
maxOccupancy: z.ZodNullable<z.ZodNumber>;
|
|
1619
|
+
window: z.ZodNullable<z.ZodType<(string & {}) | "yes" | "no" | "partial", unknown, z.core.$ZodTypeInternals<(string & {}) | "yes" | "no" | "partial", unknown>>>;
|
|
1620
|
+
name: z.ZodObject<{
|
|
1621
|
+
text: z.ZodString;
|
|
1622
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1623
|
+
}, z.core.$strip>;
|
|
1624
|
+
}, z.core.$strip>>;
|
|
1625
|
+
}, z.core.$strip>>;
|
|
1626
|
+
}, z.core.$strip>;
|
|
1627
|
+
type Hotel = z.infer<typeof hotel>;
|
|
1628
|
+
|
|
1629
|
+
/** What the rate includes to eat; `known: false` leaves the rest null. */
|
|
1630
|
+
declare const meals: z.ZodObject<{
|
|
1631
|
+
known: z.ZodBoolean;
|
|
1632
|
+
included: z.ZodNullable<z.ZodArray<z.ZodType<(string & {}) | "breakfast" | "lunch" | "dinner", unknown, z.core.$ZodTypeInternals<(string & {}) | "breakfast" | "lunch" | "dinner", unknown>>>>;
|
|
1633
|
+
unspecifiedMainMeals: z.ZodNullable<z.ZodNumber>;
|
|
1634
|
+
allInclusive: z.ZodNullable<z.ZodBoolean>;
|
|
1635
|
+
guestsCoveredPerRoom: z.ZodNullable<z.ZodNumber>;
|
|
1636
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
1637
|
+
text: z.ZodString;
|
|
1638
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1639
|
+
}, z.core.$strip>>;
|
|
1640
|
+
}, z.core.$strip>;
|
|
1641
|
+
/** Fees paid at the property, in its currency, not converted. */
|
|
1642
|
+
declare const payAtProperty: z.ZodObject<{
|
|
1643
|
+
disclosure: z.ZodType<(string & {}) | "complete" | "incomplete", unknown, z.core.$ZodTypeInternals<(string & {}) | "complete" | "incomplete", unknown>>;
|
|
1644
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1645
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
1646
|
+
text: z.ZodString;
|
|
1647
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1648
|
+
}, z.core.$strip>>;
|
|
1649
|
+
amount: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
|
|
1650
|
+
mandatory: z.ZodBoolean;
|
|
1651
|
+
basis: z.ZodType<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown>>;
|
|
1652
|
+
collectedAt: z.ZodType<"unknown" | (string & {}) | "property", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "property", unknown>>;
|
|
1653
|
+
}, z.core.$strip>>;
|
|
1654
|
+
}, z.core.$strip>;
|
|
1655
|
+
/** The cancellation terms read at `asOf`. */
|
|
1656
|
+
declare const cancellation: z.ZodObject<{
|
|
1657
|
+
status: z.ZodType<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown>>;
|
|
1658
|
+
asOf: z.ZodString;
|
|
1659
|
+
freeCancellationEndsAt: z.ZodNullable<z.ZodString>;
|
|
1660
|
+
penalties: z.ZodArray<z.ZodObject<{
|
|
1661
|
+
startsAt: z.ZodNullable<z.ZodString>;
|
|
1662
|
+
amount: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
1663
|
+
}, z.core.$strip>>;
|
|
1664
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
1665
|
+
}, z.core.$strip>;
|
|
1666
|
+
declare const confirmation: z.ZodObject<{
|
|
1667
|
+
mode: z.ZodType<"unknown" | (string & {}) | "instant" | "on_request", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "instant" | "on_request", unknown>>;
|
|
1668
|
+
withinMinutes: z.ZodNullable<z.ZodNumber>;
|
|
1669
|
+
}, z.core.$strip>;
|
|
1670
|
+
declare const offer: z.ZodObject<{
|
|
1671
|
+
offerId: z.ZodString;
|
|
1672
|
+
type: z.ZodType<"hotel" | (string & {}), unknown, z.core.$ZodTypeInternals<"hotel" | (string & {}), unknown>>;
|
|
1673
|
+
expiresAt: z.ZodString;
|
|
1674
|
+
hotel: z.ZodObject<{
|
|
1675
|
+
hotelId: z.ZodString;
|
|
1676
|
+
room: z.ZodObject<{
|
|
1677
|
+
beds: z.ZodNullable<z.ZodObject<{
|
|
1678
|
+
text: z.ZodString;
|
|
1679
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1680
|
+
}, z.core.$strip>>;
|
|
1681
|
+
areaSqm: z.ZodNullable<z.ZodObject<{
|
|
1682
|
+
min: z.ZodNumber;
|
|
1683
|
+
max: z.ZodNumber;
|
|
1684
|
+
}, z.core.$strip>>;
|
|
1685
|
+
maxOccupancy: z.ZodNullable<z.ZodNumber>;
|
|
1686
|
+
window: z.ZodNullable<z.ZodType<(string & {}) | "yes" | "no" | "partial", unknown, z.core.$ZodTypeInternals<(string & {}) | "yes" | "no" | "partial", unknown>>>;
|
|
1687
|
+
name: z.ZodNullable<z.ZodObject<{
|
|
1688
|
+
text: z.ZodString;
|
|
1689
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1690
|
+
}, z.core.$strip>>;
|
|
1691
|
+
}, z.core.$strip>;
|
|
1692
|
+
roomCount: z.ZodNumber;
|
|
1693
|
+
meals: z.ZodObject<{
|
|
1694
|
+
known: z.ZodBoolean;
|
|
1695
|
+
included: z.ZodNullable<z.ZodArray<z.ZodType<(string & {}) | "breakfast" | "lunch" | "dinner", unknown, z.core.$ZodTypeInternals<(string & {}) | "breakfast" | "lunch" | "dinner", unknown>>>>;
|
|
1696
|
+
unspecifiedMainMeals: z.ZodNullable<z.ZodNumber>;
|
|
1697
|
+
allInclusive: z.ZodNullable<z.ZodBoolean>;
|
|
1698
|
+
guestsCoveredPerRoom: z.ZodNullable<z.ZodNumber>;
|
|
1699
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
1700
|
+
text: z.ZodString;
|
|
1701
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1702
|
+
}, z.core.$strip>>;
|
|
1703
|
+
}, z.core.$strip>;
|
|
1704
|
+
}, z.core.$strip>;
|
|
1705
|
+
price: z.ZodObject<{
|
|
1706
|
+
total: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
1707
|
+
perNightAllRooms: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
1708
|
+
approx: z.ZodNullable<z.ZodObject<{
|
|
1709
|
+
total: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
1710
|
+
perNightAllRooms: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
1711
|
+
rateDate: z.ZodString;
|
|
1712
|
+
}, z.core.$strip>>;
|
|
1713
|
+
payAtProperty: z.ZodObject<{
|
|
1714
|
+
disclosure: z.ZodType<(string & {}) | "complete" | "incomplete", unknown, z.core.$ZodTypeInternals<(string & {}) | "complete" | "incomplete", unknown>>;
|
|
1715
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1716
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
1717
|
+
text: z.ZodString;
|
|
1718
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1719
|
+
}, z.core.$strip>>;
|
|
1720
|
+
amount: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
|
|
1721
|
+
mandatory: z.ZodBoolean;
|
|
1722
|
+
basis: z.ZodType<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown>>;
|
|
1723
|
+
collectedAt: z.ZodType<"unknown" | (string & {}) | "property", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "property", unknown>>;
|
|
1724
|
+
}, z.core.$strip>>;
|
|
1725
|
+
}, z.core.$strip>;
|
|
1726
|
+
}, z.core.$strip>;
|
|
1727
|
+
cancellation: z.ZodObject<{
|
|
1728
|
+
status: z.ZodType<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown>>;
|
|
1729
|
+
asOf: z.ZodString;
|
|
1730
|
+
freeCancellationEndsAt: z.ZodNullable<z.ZodString>;
|
|
1731
|
+
penalties: z.ZodArray<z.ZodObject<{
|
|
1732
|
+
startsAt: z.ZodNullable<z.ZodString>;
|
|
1733
|
+
amount: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
1734
|
+
}, z.core.$strip>>;
|
|
1735
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
1736
|
+
}, z.core.$strip>;
|
|
1737
|
+
confirmation: z.ZodObject<{
|
|
1738
|
+
mode: z.ZodType<"unknown" | (string & {}) | "instant" | "on_request", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "instant" | "on_request", unknown>>;
|
|
1739
|
+
withinMinutes: z.ZodNullable<z.ZodNumber>;
|
|
1740
|
+
}, z.core.$strip>;
|
|
1741
|
+
}, z.core.$strip>;
|
|
1742
|
+
type Offer = z.infer<typeof offer>;
|
|
1743
|
+
/** How many offers each selection step removed (§9.3). */
|
|
1744
|
+
declare const omitted: z.ZodObject<{
|
|
1745
|
+
byNationality: z.ZodNumber;
|
|
1746
|
+
byFilters: z.ZodNumber;
|
|
1747
|
+
dominated: z.ZodNumber;
|
|
1748
|
+
unreadable: z.ZodNumber;
|
|
1749
|
+
byLimit: z.ZodNumber;
|
|
1750
|
+
}, z.core.$strip>;
|
|
1751
|
+
type Omitted = z.infer<typeof omitted>;
|
|
1752
|
+
declare const UNAVAILABLE_REASONS: readonly ["sold_out", "no_matching_offers", "nationality_restricted", "offers_unreadable", "not_found", "supplier_unavailable", "stay_in_past"];
|
|
1753
|
+
declare const hotelOffersResult: z.ZodObject<{
|
|
1754
|
+
stay: z.ZodObject<{
|
|
1755
|
+
checkIn: z.ZodString;
|
|
1756
|
+
checkOut: z.ZodString;
|
|
1757
|
+
rooms: z.ZodArray<z.ZodObject<{
|
|
1758
|
+
adults: z.ZodNumber;
|
|
1759
|
+
childrenAges: z.ZodArray<z.ZodNumber>;
|
|
1760
|
+
}, z.core.$strip>>;
|
|
1761
|
+
}, z.core.$strip>;
|
|
1762
|
+
hotels: z.ZodArray<z.ZodObject<{
|
|
1763
|
+
hotel: z.ZodObject<{
|
|
1764
|
+
hotelId: z.ZodString;
|
|
1765
|
+
name: z.ZodString;
|
|
1766
|
+
names: z.ZodObject<{
|
|
1767
|
+
en: z.ZodNullable<z.ZodString>;
|
|
1768
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
1769
|
+
}, z.core.$strip>;
|
|
1770
|
+
}, z.core.$strip>;
|
|
1771
|
+
offers: z.ZodArray<z.ZodObject<{
|
|
1772
|
+
offerId: z.ZodString;
|
|
1773
|
+
type: z.ZodType<"hotel" | (string & {}), unknown, z.core.$ZodTypeInternals<"hotel" | (string & {}), unknown>>;
|
|
1774
|
+
expiresAt: z.ZodString;
|
|
1775
|
+
hotel: z.ZodObject<{
|
|
1776
|
+
hotelId: z.ZodString;
|
|
1777
|
+
room: z.ZodObject<{
|
|
1778
|
+
beds: z.ZodNullable<z.ZodObject<{
|
|
1779
|
+
text: z.ZodString;
|
|
1780
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1781
|
+
}, z.core.$strip>>;
|
|
1782
|
+
areaSqm: z.ZodNullable<z.ZodObject<{
|
|
1783
|
+
min: z.ZodNumber;
|
|
1784
|
+
max: z.ZodNumber;
|
|
1785
|
+
}, z.core.$strip>>;
|
|
1786
|
+
maxOccupancy: z.ZodNullable<z.ZodNumber>;
|
|
1787
|
+
window: z.ZodNullable<z.ZodType<(string & {}) | "yes" | "no" | "partial", unknown, z.core.$ZodTypeInternals<(string & {}) | "yes" | "no" | "partial", unknown>>>;
|
|
1788
|
+
name: z.ZodNullable<z.ZodObject<{
|
|
1789
|
+
text: z.ZodString;
|
|
1790
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1791
|
+
}, z.core.$strip>>;
|
|
1792
|
+
}, z.core.$strip>;
|
|
1793
|
+
roomCount: z.ZodNumber;
|
|
1794
|
+
meals: z.ZodObject<{
|
|
1795
|
+
known: z.ZodBoolean;
|
|
1796
|
+
included: z.ZodNullable<z.ZodArray<z.ZodType<(string & {}) | "breakfast" | "lunch" | "dinner", unknown, z.core.$ZodTypeInternals<(string & {}) | "breakfast" | "lunch" | "dinner", unknown>>>>;
|
|
1797
|
+
unspecifiedMainMeals: z.ZodNullable<z.ZodNumber>;
|
|
1798
|
+
allInclusive: z.ZodNullable<z.ZodBoolean>;
|
|
1799
|
+
guestsCoveredPerRoom: z.ZodNullable<z.ZodNumber>;
|
|
1800
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
1801
|
+
text: z.ZodString;
|
|
1802
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1803
|
+
}, z.core.$strip>>;
|
|
1804
|
+
}, z.core.$strip>;
|
|
1805
|
+
}, z.core.$strip>;
|
|
1806
|
+
price: z.ZodObject<{
|
|
1807
|
+
total: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
1808
|
+
perNightAllRooms: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
1809
|
+
approx: z.ZodNullable<z.ZodObject<{
|
|
1810
|
+
total: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
1811
|
+
perNightAllRooms: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
1812
|
+
rateDate: z.ZodString;
|
|
1813
|
+
}, z.core.$strip>>;
|
|
1814
|
+
payAtProperty: z.ZodObject<{
|
|
1815
|
+
disclosure: z.ZodType<(string & {}) | "complete" | "incomplete", unknown, z.core.$ZodTypeInternals<(string & {}) | "complete" | "incomplete", unknown>>;
|
|
1816
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1817
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
1818
|
+
text: z.ZodString;
|
|
1819
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1820
|
+
}, z.core.$strip>>;
|
|
1821
|
+
amount: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
|
|
1822
|
+
mandatory: z.ZodBoolean;
|
|
1823
|
+
basis: z.ZodType<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown>>;
|
|
1824
|
+
collectedAt: z.ZodType<"unknown" | (string & {}) | "property", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "property", unknown>>;
|
|
1825
|
+
}, z.core.$strip>>;
|
|
1826
|
+
}, z.core.$strip>;
|
|
1827
|
+
}, z.core.$strip>;
|
|
1828
|
+
cancellation: z.ZodObject<{
|
|
1829
|
+
status: z.ZodType<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown>>;
|
|
1830
|
+
asOf: z.ZodString;
|
|
1831
|
+
freeCancellationEndsAt: z.ZodNullable<z.ZodString>;
|
|
1832
|
+
penalties: z.ZodArray<z.ZodObject<{
|
|
1833
|
+
startsAt: z.ZodNullable<z.ZodString>;
|
|
1834
|
+
amount: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
1835
|
+
}, z.core.$strip>>;
|
|
1836
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
1837
|
+
}, z.core.$strip>;
|
|
1838
|
+
confirmation: z.ZodObject<{
|
|
1839
|
+
mode: z.ZodType<"unknown" | (string & {}) | "instant" | "on_request", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "instant" | "on_request", unknown>>;
|
|
1840
|
+
withinMinutes: z.ZodNullable<z.ZodNumber>;
|
|
1841
|
+
}, z.core.$strip>;
|
|
1842
|
+
}, z.core.$strip>>;
|
|
1843
|
+
omitted: z.ZodObject<{
|
|
1844
|
+
byNationality: z.ZodNumber;
|
|
1845
|
+
byFilters: z.ZodNumber;
|
|
1846
|
+
dominated: z.ZodNumber;
|
|
1847
|
+
unreadable: z.ZodNumber;
|
|
1848
|
+
byLimit: z.ZodNumber;
|
|
1849
|
+
}, z.core.$strip>;
|
|
1850
|
+
}, z.core.$strip>>;
|
|
1851
|
+
unavailable: z.ZodArray<z.ZodObject<{
|
|
1852
|
+
hotelId: z.ZodString;
|
|
1853
|
+
reason: z.ZodType<(string & {}) | "sold_out" | "no_matching_offers" | "nationality_restricted" | "offers_unreadable" | "not_found" | "supplier_unavailable" | "stay_in_past", unknown, z.core.$ZodTypeInternals<(string & {}) | "sold_out" | "no_matching_offers" | "nationality_restricted" | "offers_unreadable" | "not_found" | "supplier_unavailable" | "stay_in_past", unknown>>;
|
|
1854
|
+
omitted: z.ZodNullable<z.ZodObject<{
|
|
1855
|
+
byNationality: z.ZodNumber;
|
|
1856
|
+
byFilters: z.ZodNumber;
|
|
1857
|
+
dominated: z.ZodNumber;
|
|
1858
|
+
unreadable: z.ZodNumber;
|
|
1859
|
+
byLimit: z.ZodNumber;
|
|
1860
|
+
}, z.core.$strip>>;
|
|
1861
|
+
}, z.core.$strip>>;
|
|
1862
|
+
}, z.core.$strip>;
|
|
1863
|
+
type HotelOffersResult = z.infer<typeof hotelOffersResult>;
|
|
1864
|
+
|
|
1865
|
+
declare const ORDER_STATUSES: readonly ["awaiting_payment", "expired", "confirming", "confirmed", "failed", "cancelling", "cancelled", "needs_attention"];
|
|
1866
|
+
type OrderStatus = (typeof ORDER_STATUSES)[number];
|
|
1867
|
+
declare const PAYMENT_STATUSES: readonly ["unpaid", "authorized", "paid", "released", "refund_pending", "refunded"];
|
|
1868
|
+
type PaymentStatus = (typeof PAYMENT_STATUSES)[number];
|
|
1869
|
+
/** `FT-` and six characters with no 0, 1, I or O. */
|
|
1870
|
+
declare const orderReference: z.ZodString;
|
|
1871
|
+
declare const order: z.ZodObject<{
|
|
1872
|
+
orderId: z.ZodString;
|
|
1873
|
+
reference: z.ZodString;
|
|
1874
|
+
status: z.ZodType<(string & {}) | "awaiting_payment" | "expired" | "confirming" | "confirmed" | "failed" | "cancelling" | "cancelled" | "needs_attention", unknown, z.core.$ZodTypeInternals<(string & {}) | "awaiting_payment" | "expired" | "confirming" | "confirmed" | "failed" | "cancelling" | "cancelled" | "needs_attention", unknown>>;
|
|
1875
|
+
createdAt: z.ZodString;
|
|
1876
|
+
updatedAt: z.ZodString;
|
|
1877
|
+
items: z.ZodArray<z.ZodType<OpenUnionOutput<"type", readonly [z.ZodObject<{
|
|
1878
|
+
type: z.ZodLiteral<"hotel">;
|
|
1879
|
+
hotel: z.ZodObject<{
|
|
1880
|
+
hotelId: z.ZodNullable<z.ZodString>;
|
|
1881
|
+
name: z.ZodString;
|
|
1882
|
+
names: z.ZodObject<{
|
|
1883
|
+
en: z.ZodNullable<z.ZodString>;
|
|
1884
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
1885
|
+
}, z.core.$strip>;
|
|
1886
|
+
checkIn: z.ZodString;
|
|
1887
|
+
checkOut: z.ZodString;
|
|
1888
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
1889
|
+
rooms: z.ZodArray<z.ZodObject<{
|
|
1890
|
+
adults: z.ZodNumber;
|
|
1891
|
+
childrenAges: z.ZodArray<z.ZodNumber>;
|
|
1892
|
+
}, z.core.$strip>>;
|
|
1893
|
+
room: z.ZodObject<{
|
|
1894
|
+
name: z.ZodNullable<z.ZodObject<{
|
|
1895
|
+
text: z.ZodString;
|
|
1896
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1897
|
+
}, z.core.$strip>>;
|
|
1898
|
+
beds: z.ZodNullable<z.ZodObject<{
|
|
1899
|
+
text: z.ZodString;
|
|
1900
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1901
|
+
}, z.core.$strip>>;
|
|
1902
|
+
}, z.core.$strip>;
|
|
1903
|
+
meals: z.ZodObject<{
|
|
1904
|
+
known: z.ZodBoolean;
|
|
1905
|
+
included: z.ZodNullable<z.ZodArray<z.ZodType<(string & {}) | "breakfast" | "lunch" | "dinner", unknown, z.core.$ZodTypeInternals<(string & {}) | "breakfast" | "lunch" | "dinner", unknown>>>>;
|
|
1906
|
+
unspecifiedMainMeals: z.ZodNullable<z.ZodNumber>;
|
|
1907
|
+
allInclusive: z.ZodNullable<z.ZodBoolean>;
|
|
1908
|
+
guestsCoveredPerRoom: z.ZodNullable<z.ZodNumber>;
|
|
1909
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
1910
|
+
text: z.ZodString;
|
|
1911
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1912
|
+
}, z.core.$strip>>;
|
|
1913
|
+
}, z.core.$strip>;
|
|
1914
|
+
cancellation: z.ZodObject<{
|
|
1915
|
+
status: z.ZodType<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown>>;
|
|
1916
|
+
asOf: z.ZodString;
|
|
1917
|
+
freeCancellationEndsAt: z.ZodNullable<z.ZodString>;
|
|
1918
|
+
penalties: z.ZodArray<z.ZodObject<{
|
|
1919
|
+
startsAt: z.ZodNullable<z.ZodString>;
|
|
1920
|
+
amount: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
1921
|
+
}, z.core.$strip>>;
|
|
1922
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
1923
|
+
}, z.core.$strip>;
|
|
1924
|
+
payAtProperty: z.ZodObject<{
|
|
1925
|
+
disclosure: z.ZodType<(string & {}) | "complete" | "incomplete", unknown, z.core.$ZodTypeInternals<(string & {}) | "complete" | "incomplete", unknown>>;
|
|
1926
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1927
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
1928
|
+
text: z.ZodString;
|
|
1929
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1930
|
+
}, z.core.$strip>>;
|
|
1931
|
+
amount: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
|
|
1932
|
+
mandatory: z.ZodBoolean;
|
|
1933
|
+
basis: z.ZodType<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown>>;
|
|
1934
|
+
collectedAt: z.ZodType<"unknown" | (string & {}) | "property", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "property", unknown>>;
|
|
1935
|
+
}, z.core.$strip>>;
|
|
1936
|
+
}, z.core.$strip>;
|
|
1937
|
+
confirmationNumber: z.ZodNullable<z.ZodString>;
|
|
1938
|
+
}, z.core.$strip>;
|
|
1939
|
+
}, z.core.$strip>]>, unknown, z.core.$ZodTypeInternals<OpenUnionOutput<"type", readonly [z.ZodObject<{
|
|
1940
|
+
type: z.ZodLiteral<"hotel">;
|
|
1941
|
+
hotel: z.ZodObject<{
|
|
1942
|
+
hotelId: z.ZodNullable<z.ZodString>;
|
|
1943
|
+
name: z.ZodString;
|
|
1944
|
+
names: z.ZodObject<{
|
|
1945
|
+
en: z.ZodNullable<z.ZodString>;
|
|
1946
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
1947
|
+
}, z.core.$strip>;
|
|
1948
|
+
checkIn: z.ZodString;
|
|
1949
|
+
checkOut: z.ZodString;
|
|
1950
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
1951
|
+
rooms: z.ZodArray<z.ZodObject<{
|
|
1952
|
+
adults: z.ZodNumber;
|
|
1953
|
+
childrenAges: z.ZodArray<z.ZodNumber>;
|
|
1954
|
+
}, z.core.$strip>>;
|
|
1955
|
+
room: z.ZodObject<{
|
|
1956
|
+
name: z.ZodNullable<z.ZodObject<{
|
|
1957
|
+
text: z.ZodString;
|
|
1958
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1959
|
+
}, z.core.$strip>>;
|
|
1960
|
+
beds: z.ZodNullable<z.ZodObject<{
|
|
1961
|
+
text: z.ZodString;
|
|
1962
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1963
|
+
}, z.core.$strip>>;
|
|
1964
|
+
}, z.core.$strip>;
|
|
1965
|
+
meals: z.ZodObject<{
|
|
1966
|
+
known: z.ZodBoolean;
|
|
1967
|
+
included: z.ZodNullable<z.ZodArray<z.ZodType<(string & {}) | "breakfast" | "lunch" | "dinner", unknown, z.core.$ZodTypeInternals<(string & {}) | "breakfast" | "lunch" | "dinner", unknown>>>>;
|
|
1968
|
+
unspecifiedMainMeals: z.ZodNullable<z.ZodNumber>;
|
|
1969
|
+
allInclusive: z.ZodNullable<z.ZodBoolean>;
|
|
1970
|
+
guestsCoveredPerRoom: z.ZodNullable<z.ZodNumber>;
|
|
1971
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
1972
|
+
text: z.ZodString;
|
|
1973
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1974
|
+
}, z.core.$strip>>;
|
|
1975
|
+
}, z.core.$strip>;
|
|
1976
|
+
cancellation: z.ZodObject<{
|
|
1977
|
+
status: z.ZodType<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown>>;
|
|
1978
|
+
asOf: z.ZodString;
|
|
1979
|
+
freeCancellationEndsAt: z.ZodNullable<z.ZodString>;
|
|
1980
|
+
penalties: z.ZodArray<z.ZodObject<{
|
|
1981
|
+
startsAt: z.ZodNullable<z.ZodString>;
|
|
1982
|
+
amount: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
1983
|
+
}, z.core.$strip>>;
|
|
1984
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
1985
|
+
}, z.core.$strip>;
|
|
1986
|
+
payAtProperty: z.ZodObject<{
|
|
1987
|
+
disclosure: z.ZodType<(string & {}) | "complete" | "incomplete", unknown, z.core.$ZodTypeInternals<(string & {}) | "complete" | "incomplete", unknown>>;
|
|
1988
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1989
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
1990
|
+
text: z.ZodString;
|
|
1991
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
1992
|
+
}, z.core.$strip>>;
|
|
1993
|
+
amount: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
|
|
1994
|
+
mandatory: z.ZodBoolean;
|
|
1995
|
+
basis: z.ZodType<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown>>;
|
|
1996
|
+
collectedAt: z.ZodType<"unknown" | (string & {}) | "property", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "property", unknown>>;
|
|
1997
|
+
}, z.core.$strip>>;
|
|
1998
|
+
}, z.core.$strip>;
|
|
1999
|
+
confirmationNumber: z.ZodNullable<z.ZodString>;
|
|
2000
|
+
}, z.core.$strip>;
|
|
2001
|
+
}, z.core.$strip>]>, unknown>>>;
|
|
2002
|
+
price: z.ZodObject<{
|
|
2003
|
+
total: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
2004
|
+
}, z.core.$strip>;
|
|
2005
|
+
payment: z.ZodObject<{
|
|
2006
|
+
status: z.ZodType<(string & {}) | "unpaid" | "authorized" | "paid" | "released" | "refund_pending" | "refunded", unknown, z.core.$ZodTypeInternals<(string & {}) | "unpaid" | "authorized" | "paid" | "released" | "refund_pending" | "refunded", unknown>>;
|
|
2007
|
+
url: z.ZodNullable<z.ZodString>;
|
|
2008
|
+
requiresSignIn: z.ZodBoolean;
|
|
2009
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
2010
|
+
chargeCurrency: z.ZodString;
|
|
2011
|
+
localCurrencyAtCheckout: z.ZodBoolean;
|
|
2012
|
+
localCharge: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
|
|
2013
|
+
}, z.core.$strip>;
|
|
2014
|
+
manageUrl: z.ZodString;
|
|
2015
|
+
}, z.core.$strip>;
|
|
2016
|
+
type Order = z.infer<typeof order>;
|
|
2017
|
+
/** `GET /v1/orders`: newest first. */
|
|
2018
|
+
declare const orderList: z.ZodObject<{
|
|
2019
|
+
data: z.ZodArray<z.ZodObject<{
|
|
2020
|
+
orderId: z.ZodString;
|
|
2021
|
+
reference: z.ZodString;
|
|
2022
|
+
status: z.ZodType<(string & {}) | "awaiting_payment" | "expired" | "confirming" | "confirmed" | "failed" | "cancelling" | "cancelled" | "needs_attention", unknown, z.core.$ZodTypeInternals<(string & {}) | "awaiting_payment" | "expired" | "confirming" | "confirmed" | "failed" | "cancelling" | "cancelled" | "needs_attention", unknown>>;
|
|
2023
|
+
createdAt: z.ZodString;
|
|
2024
|
+
updatedAt: z.ZodString;
|
|
2025
|
+
items: z.ZodArray<z.ZodType<OpenUnionOutput<"type", readonly [z.ZodObject<{
|
|
2026
|
+
type: z.ZodLiteral<"hotel">;
|
|
2027
|
+
hotel: z.ZodObject<{
|
|
2028
|
+
hotelId: z.ZodNullable<z.ZodString>;
|
|
2029
|
+
name: z.ZodString;
|
|
2030
|
+
names: z.ZodObject<{
|
|
2031
|
+
en: z.ZodNullable<z.ZodString>;
|
|
2032
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
2033
|
+
}, z.core.$strip>;
|
|
2034
|
+
checkIn: z.ZodString;
|
|
2035
|
+
checkOut: z.ZodString;
|
|
2036
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
2037
|
+
rooms: z.ZodArray<z.ZodObject<{
|
|
2038
|
+
adults: z.ZodNumber;
|
|
2039
|
+
childrenAges: z.ZodArray<z.ZodNumber>;
|
|
2040
|
+
}, z.core.$strip>>;
|
|
2041
|
+
room: z.ZodObject<{
|
|
2042
|
+
name: z.ZodNullable<z.ZodObject<{
|
|
2043
|
+
text: z.ZodString;
|
|
2044
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
2045
|
+
}, z.core.$strip>>;
|
|
2046
|
+
beds: z.ZodNullable<z.ZodObject<{
|
|
2047
|
+
text: z.ZodString;
|
|
2048
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
2049
|
+
}, z.core.$strip>>;
|
|
2050
|
+
}, z.core.$strip>;
|
|
2051
|
+
meals: z.ZodObject<{
|
|
2052
|
+
known: z.ZodBoolean;
|
|
2053
|
+
included: z.ZodNullable<z.ZodArray<z.ZodType<(string & {}) | "breakfast" | "lunch" | "dinner", unknown, z.core.$ZodTypeInternals<(string & {}) | "breakfast" | "lunch" | "dinner", unknown>>>>;
|
|
2054
|
+
unspecifiedMainMeals: z.ZodNullable<z.ZodNumber>;
|
|
2055
|
+
allInclusive: z.ZodNullable<z.ZodBoolean>;
|
|
2056
|
+
guestsCoveredPerRoom: z.ZodNullable<z.ZodNumber>;
|
|
2057
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
2058
|
+
text: z.ZodString;
|
|
2059
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
2060
|
+
}, z.core.$strip>>;
|
|
2061
|
+
}, z.core.$strip>;
|
|
2062
|
+
cancellation: z.ZodObject<{
|
|
2063
|
+
status: z.ZodType<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown>>;
|
|
2064
|
+
asOf: z.ZodString;
|
|
2065
|
+
freeCancellationEndsAt: z.ZodNullable<z.ZodString>;
|
|
2066
|
+
penalties: z.ZodArray<z.ZodObject<{
|
|
2067
|
+
startsAt: z.ZodNullable<z.ZodString>;
|
|
2068
|
+
amount: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
2069
|
+
}, z.core.$strip>>;
|
|
2070
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
2071
|
+
}, z.core.$strip>;
|
|
2072
|
+
payAtProperty: z.ZodObject<{
|
|
2073
|
+
disclosure: z.ZodType<(string & {}) | "complete" | "incomplete", unknown, z.core.$ZodTypeInternals<(string & {}) | "complete" | "incomplete", unknown>>;
|
|
2074
|
+
items: z.ZodArray<z.ZodObject<{
|
|
2075
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
2076
|
+
text: z.ZodString;
|
|
2077
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
2078
|
+
}, z.core.$strip>>;
|
|
2079
|
+
amount: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
|
|
2080
|
+
mandatory: z.ZodBoolean;
|
|
2081
|
+
basis: z.ZodType<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown>>;
|
|
2082
|
+
collectedAt: z.ZodType<"unknown" | (string & {}) | "property", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "property", unknown>>;
|
|
2083
|
+
}, z.core.$strip>>;
|
|
2084
|
+
}, z.core.$strip>;
|
|
2085
|
+
confirmationNumber: z.ZodNullable<z.ZodString>;
|
|
2086
|
+
}, z.core.$strip>;
|
|
2087
|
+
}, z.core.$strip>]>, unknown, z.core.$ZodTypeInternals<OpenUnionOutput<"type", readonly [z.ZodObject<{
|
|
2088
|
+
type: z.ZodLiteral<"hotel">;
|
|
2089
|
+
hotel: z.ZodObject<{
|
|
2090
|
+
hotelId: z.ZodNullable<z.ZodString>;
|
|
2091
|
+
name: z.ZodString;
|
|
2092
|
+
names: z.ZodObject<{
|
|
2093
|
+
en: z.ZodNullable<z.ZodString>;
|
|
2094
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
2095
|
+
}, z.core.$strip>;
|
|
2096
|
+
checkIn: z.ZodString;
|
|
2097
|
+
checkOut: z.ZodString;
|
|
2098
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
2099
|
+
rooms: z.ZodArray<z.ZodObject<{
|
|
2100
|
+
adults: z.ZodNumber;
|
|
2101
|
+
childrenAges: z.ZodArray<z.ZodNumber>;
|
|
2102
|
+
}, z.core.$strip>>;
|
|
2103
|
+
room: z.ZodObject<{
|
|
2104
|
+
name: z.ZodNullable<z.ZodObject<{
|
|
2105
|
+
text: z.ZodString;
|
|
2106
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
2107
|
+
}, z.core.$strip>>;
|
|
2108
|
+
beds: z.ZodNullable<z.ZodObject<{
|
|
2109
|
+
text: z.ZodString;
|
|
2110
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
2111
|
+
}, z.core.$strip>>;
|
|
2112
|
+
}, z.core.$strip>;
|
|
2113
|
+
meals: z.ZodObject<{
|
|
2114
|
+
known: z.ZodBoolean;
|
|
2115
|
+
included: z.ZodNullable<z.ZodArray<z.ZodType<(string & {}) | "breakfast" | "lunch" | "dinner", unknown, z.core.$ZodTypeInternals<(string & {}) | "breakfast" | "lunch" | "dinner", unknown>>>>;
|
|
2116
|
+
unspecifiedMainMeals: z.ZodNullable<z.ZodNumber>;
|
|
2117
|
+
allInclusive: z.ZodNullable<z.ZodBoolean>;
|
|
2118
|
+
guestsCoveredPerRoom: z.ZodNullable<z.ZodNumber>;
|
|
2119
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
2120
|
+
text: z.ZodString;
|
|
2121
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
2122
|
+
}, z.core.$strip>>;
|
|
2123
|
+
}, z.core.$strip>;
|
|
2124
|
+
cancellation: z.ZodObject<{
|
|
2125
|
+
status: z.ZodType<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown>>;
|
|
2126
|
+
asOf: z.ZodString;
|
|
2127
|
+
freeCancellationEndsAt: z.ZodNullable<z.ZodString>;
|
|
2128
|
+
penalties: z.ZodArray<z.ZodObject<{
|
|
2129
|
+
startsAt: z.ZodNullable<z.ZodString>;
|
|
2130
|
+
amount: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
2131
|
+
}, z.core.$strip>>;
|
|
2132
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
2133
|
+
}, z.core.$strip>;
|
|
2134
|
+
payAtProperty: z.ZodObject<{
|
|
2135
|
+
disclosure: z.ZodType<(string & {}) | "complete" | "incomplete", unknown, z.core.$ZodTypeInternals<(string & {}) | "complete" | "incomplete", unknown>>;
|
|
2136
|
+
items: z.ZodArray<z.ZodObject<{
|
|
2137
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
2138
|
+
text: z.ZodString;
|
|
2139
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
2140
|
+
}, z.core.$strip>>;
|
|
2141
|
+
amount: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
|
|
2142
|
+
mandatory: z.ZodBoolean;
|
|
2143
|
+
basis: z.ZodType<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown>>;
|
|
2144
|
+
collectedAt: z.ZodType<"unknown" | (string & {}) | "property", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "property", unknown>>;
|
|
2145
|
+
}, z.core.$strip>>;
|
|
2146
|
+
}, z.core.$strip>;
|
|
2147
|
+
confirmationNumber: z.ZodNullable<z.ZodString>;
|
|
2148
|
+
}, z.core.$strip>;
|
|
2149
|
+
}, z.core.$strip>]>, unknown>>>;
|
|
2150
|
+
price: z.ZodObject<{
|
|
2151
|
+
total: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
2152
|
+
}, z.core.$strip>;
|
|
2153
|
+
payment: z.ZodObject<{
|
|
2154
|
+
status: z.ZodType<(string & {}) | "unpaid" | "authorized" | "paid" | "released" | "refund_pending" | "refunded", unknown, z.core.$ZodTypeInternals<(string & {}) | "unpaid" | "authorized" | "paid" | "released" | "refund_pending" | "refunded", unknown>>;
|
|
2155
|
+
url: z.ZodNullable<z.ZodString>;
|
|
2156
|
+
requiresSignIn: z.ZodBoolean;
|
|
2157
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
2158
|
+
chargeCurrency: z.ZodString;
|
|
2159
|
+
localCurrencyAtCheckout: z.ZodBoolean;
|
|
2160
|
+
localCharge: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
|
|
2161
|
+
}, z.core.$strip>;
|
|
2162
|
+
manageUrl: z.ZodString;
|
|
2163
|
+
}, z.core.$strip>>;
|
|
2164
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
2165
|
+
}, z.core.$strip>;
|
|
2166
|
+
type OrderList = z.infer<typeof orderList>;
|
|
2167
|
+
/** One difference between an offer and the supplier's verify (§10.3). */
|
|
2168
|
+
declare const offerChange: z.ZodType<OpenUnionOutput<"field", readonly [z.ZodObject<{
|
|
2169
|
+
field: z.ZodLiteral<"price">;
|
|
2170
|
+
previous: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
2171
|
+
current: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
2172
|
+
worse: z.ZodBoolean;
|
|
2173
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2174
|
+
field: z.ZodLiteral<"meals">;
|
|
2175
|
+
previous: z.ZodObject<{
|
|
2176
|
+
known: z.ZodBoolean;
|
|
2177
|
+
included: z.ZodNullable<z.ZodArray<z.ZodType<(string & {}) | "breakfast" | "lunch" | "dinner", unknown, z.core.$ZodTypeInternals<(string & {}) | "breakfast" | "lunch" | "dinner", unknown>>>>;
|
|
2178
|
+
unspecifiedMainMeals: z.ZodNullable<z.ZodNumber>;
|
|
2179
|
+
allInclusive: z.ZodNullable<z.ZodBoolean>;
|
|
2180
|
+
guestsCoveredPerRoom: z.ZodNullable<z.ZodNumber>;
|
|
2181
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
2182
|
+
text: z.ZodString;
|
|
2183
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
2184
|
+
}, z.core.$strip>>;
|
|
2185
|
+
}, z.core.$strip>;
|
|
2186
|
+
current: z.ZodObject<{
|
|
2187
|
+
known: z.ZodBoolean;
|
|
2188
|
+
included: z.ZodNullable<z.ZodArray<z.ZodType<(string & {}) | "breakfast" | "lunch" | "dinner", unknown, z.core.$ZodTypeInternals<(string & {}) | "breakfast" | "lunch" | "dinner", unknown>>>>;
|
|
2189
|
+
unspecifiedMainMeals: z.ZodNullable<z.ZodNumber>;
|
|
2190
|
+
allInclusive: z.ZodNullable<z.ZodBoolean>;
|
|
2191
|
+
guestsCoveredPerRoom: z.ZodNullable<z.ZodNumber>;
|
|
2192
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
2193
|
+
text: z.ZodString;
|
|
2194
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
2195
|
+
}, z.core.$strip>>;
|
|
2196
|
+
}, z.core.$strip>;
|
|
2197
|
+
worse: z.ZodBoolean;
|
|
2198
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2199
|
+
field: z.ZodLiteral<"cancellation">;
|
|
2200
|
+
previous: z.ZodObject<{
|
|
2201
|
+
status: z.ZodType<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown>>;
|
|
2202
|
+
asOf: z.ZodString;
|
|
2203
|
+
freeCancellationEndsAt: z.ZodNullable<z.ZodString>;
|
|
2204
|
+
penalties: z.ZodArray<z.ZodObject<{
|
|
2205
|
+
startsAt: z.ZodNullable<z.ZodString>;
|
|
2206
|
+
amount: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
2207
|
+
}, z.core.$strip>>;
|
|
2208
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
2209
|
+
}, z.core.$strip>;
|
|
2210
|
+
current: z.ZodObject<{
|
|
2211
|
+
status: z.ZodType<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown>>;
|
|
2212
|
+
asOf: z.ZodString;
|
|
2213
|
+
freeCancellationEndsAt: z.ZodNullable<z.ZodString>;
|
|
2214
|
+
penalties: z.ZodArray<z.ZodObject<{
|
|
2215
|
+
startsAt: z.ZodNullable<z.ZodString>;
|
|
2216
|
+
amount: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
2217
|
+
}, z.core.$strip>>;
|
|
2218
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
2219
|
+
}, z.core.$strip>;
|
|
2220
|
+
worse: z.ZodBoolean;
|
|
2221
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2222
|
+
field: z.ZodLiteral<"confirmation">;
|
|
2223
|
+
previous: z.ZodObject<{
|
|
2224
|
+
mode: z.ZodType<"unknown" | (string & {}) | "instant" | "on_request", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "instant" | "on_request", unknown>>;
|
|
2225
|
+
withinMinutes: z.ZodNullable<z.ZodNumber>;
|
|
2226
|
+
}, z.core.$strip>;
|
|
2227
|
+
current: z.ZodObject<{
|
|
2228
|
+
mode: z.ZodType<"unknown" | (string & {}) | "instant" | "on_request", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "instant" | "on_request", unknown>>;
|
|
2229
|
+
withinMinutes: z.ZodNullable<z.ZodNumber>;
|
|
2230
|
+
}, z.core.$strip>;
|
|
2231
|
+
worse: z.ZodBoolean;
|
|
2232
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2233
|
+
field: z.ZodLiteral<"pay_at_property">;
|
|
2234
|
+
previous: z.ZodObject<{
|
|
2235
|
+
disclosure: z.ZodType<(string & {}) | "complete" | "incomplete", unknown, z.core.$ZodTypeInternals<(string & {}) | "complete" | "incomplete", unknown>>;
|
|
2236
|
+
items: z.ZodArray<z.ZodObject<{
|
|
2237
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
2238
|
+
text: z.ZodString;
|
|
2239
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
2240
|
+
}, z.core.$strip>>;
|
|
2241
|
+
amount: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
|
|
2242
|
+
mandatory: z.ZodBoolean;
|
|
2243
|
+
basis: z.ZodType<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown>>;
|
|
2244
|
+
collectedAt: z.ZodType<"unknown" | (string & {}) | "property", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "property", unknown>>;
|
|
2245
|
+
}, z.core.$strip>>;
|
|
2246
|
+
}, z.core.$strip>;
|
|
2247
|
+
current: z.ZodObject<{
|
|
2248
|
+
disclosure: z.ZodType<(string & {}) | "complete" | "incomplete", unknown, z.core.$ZodTypeInternals<(string & {}) | "complete" | "incomplete", unknown>>;
|
|
2249
|
+
items: z.ZodArray<z.ZodObject<{
|
|
2250
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
2251
|
+
text: z.ZodString;
|
|
2252
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
2253
|
+
}, z.core.$strip>>;
|
|
2254
|
+
amount: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
|
|
2255
|
+
mandatory: z.ZodBoolean;
|
|
2256
|
+
basis: z.ZodType<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown>>;
|
|
2257
|
+
collectedAt: z.ZodType<"unknown" | (string & {}) | "property", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "property", unknown>>;
|
|
2258
|
+
}, z.core.$strip>>;
|
|
2259
|
+
}, z.core.$strip>;
|
|
2260
|
+
worse: z.ZodBoolean;
|
|
2261
|
+
}, z.core.$strip>]>, unknown, z.core.$ZodTypeInternals<OpenUnionOutput<"field", readonly [z.ZodObject<{
|
|
2262
|
+
field: z.ZodLiteral<"price">;
|
|
2263
|
+
previous: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
2264
|
+
current: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
2265
|
+
worse: z.ZodBoolean;
|
|
2266
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2267
|
+
field: z.ZodLiteral<"meals">;
|
|
2268
|
+
previous: z.ZodObject<{
|
|
2269
|
+
known: z.ZodBoolean;
|
|
2270
|
+
included: z.ZodNullable<z.ZodArray<z.ZodType<(string & {}) | "breakfast" | "lunch" | "dinner", unknown, z.core.$ZodTypeInternals<(string & {}) | "breakfast" | "lunch" | "dinner", unknown>>>>;
|
|
2271
|
+
unspecifiedMainMeals: z.ZodNullable<z.ZodNumber>;
|
|
2272
|
+
allInclusive: z.ZodNullable<z.ZodBoolean>;
|
|
2273
|
+
guestsCoveredPerRoom: z.ZodNullable<z.ZodNumber>;
|
|
2274
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
2275
|
+
text: z.ZodString;
|
|
2276
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
2277
|
+
}, z.core.$strip>>;
|
|
2278
|
+
}, z.core.$strip>;
|
|
2279
|
+
current: z.ZodObject<{
|
|
2280
|
+
known: z.ZodBoolean;
|
|
2281
|
+
included: z.ZodNullable<z.ZodArray<z.ZodType<(string & {}) | "breakfast" | "lunch" | "dinner", unknown, z.core.$ZodTypeInternals<(string & {}) | "breakfast" | "lunch" | "dinner", unknown>>>>;
|
|
2282
|
+
unspecifiedMainMeals: z.ZodNullable<z.ZodNumber>;
|
|
2283
|
+
allInclusive: z.ZodNullable<z.ZodBoolean>;
|
|
2284
|
+
guestsCoveredPerRoom: z.ZodNullable<z.ZodNumber>;
|
|
2285
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
2286
|
+
text: z.ZodString;
|
|
2287
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
2288
|
+
}, z.core.$strip>>;
|
|
2289
|
+
}, z.core.$strip>;
|
|
2290
|
+
worse: z.ZodBoolean;
|
|
2291
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2292
|
+
field: z.ZodLiteral<"cancellation">;
|
|
2293
|
+
previous: z.ZodObject<{
|
|
2294
|
+
status: z.ZodType<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown>>;
|
|
2295
|
+
asOf: z.ZodString;
|
|
2296
|
+
freeCancellationEndsAt: z.ZodNullable<z.ZodString>;
|
|
2297
|
+
penalties: z.ZodArray<z.ZodObject<{
|
|
2298
|
+
startsAt: z.ZodNullable<z.ZodString>;
|
|
2299
|
+
amount: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
2300
|
+
}, z.core.$strip>>;
|
|
2301
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
2302
|
+
}, z.core.$strip>;
|
|
2303
|
+
current: z.ZodObject<{
|
|
2304
|
+
status: z.ZodType<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "free" | "partial_penalty" | "non_refundable", unknown>>;
|
|
2305
|
+
asOf: z.ZodString;
|
|
2306
|
+
freeCancellationEndsAt: z.ZodNullable<z.ZodString>;
|
|
2307
|
+
penalties: z.ZodArray<z.ZodObject<{
|
|
2308
|
+
startsAt: z.ZodNullable<z.ZodString>;
|
|
2309
|
+
amount: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
2310
|
+
}, z.core.$strip>>;
|
|
2311
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
2312
|
+
}, z.core.$strip>;
|
|
2313
|
+
worse: z.ZodBoolean;
|
|
2314
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2315
|
+
field: z.ZodLiteral<"confirmation">;
|
|
2316
|
+
previous: z.ZodObject<{
|
|
2317
|
+
mode: z.ZodType<"unknown" | (string & {}) | "instant" | "on_request", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "instant" | "on_request", unknown>>;
|
|
2318
|
+
withinMinutes: z.ZodNullable<z.ZodNumber>;
|
|
2319
|
+
}, z.core.$strip>;
|
|
2320
|
+
current: z.ZodObject<{
|
|
2321
|
+
mode: z.ZodType<"unknown" | (string & {}) | "instant" | "on_request", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "instant" | "on_request", unknown>>;
|
|
2322
|
+
withinMinutes: z.ZodNullable<z.ZodNumber>;
|
|
2323
|
+
}, z.core.$strip>;
|
|
2324
|
+
worse: z.ZodBoolean;
|
|
2325
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2326
|
+
field: z.ZodLiteral<"pay_at_property">;
|
|
2327
|
+
previous: z.ZodObject<{
|
|
2328
|
+
disclosure: z.ZodType<(string & {}) | "complete" | "incomplete", unknown, z.core.$ZodTypeInternals<(string & {}) | "complete" | "incomplete", unknown>>;
|
|
2329
|
+
items: z.ZodArray<z.ZodObject<{
|
|
2330
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
2331
|
+
text: z.ZodString;
|
|
2332
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
2333
|
+
}, z.core.$strip>>;
|
|
2334
|
+
amount: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
|
|
2335
|
+
mandatory: z.ZodBoolean;
|
|
2336
|
+
basis: z.ZodType<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown>>;
|
|
2337
|
+
collectedAt: z.ZodType<"unknown" | (string & {}) | "property", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "property", unknown>>;
|
|
2338
|
+
}, z.core.$strip>>;
|
|
2339
|
+
}, z.core.$strip>;
|
|
2340
|
+
current: z.ZodObject<{
|
|
2341
|
+
disclosure: z.ZodType<(string & {}) | "complete" | "incomplete", unknown, z.core.$ZodTypeInternals<(string & {}) | "complete" | "incomplete", unknown>>;
|
|
2342
|
+
items: z.ZodArray<z.ZodObject<{
|
|
2343
|
+
label: z.ZodNullable<z.ZodObject<{
|
|
2344
|
+
text: z.ZodString;
|
|
2345
|
+
locale: z.ZodNullable<z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>>;
|
|
2346
|
+
}, z.core.$strip>>;
|
|
2347
|
+
amount: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
|
|
2348
|
+
mandatory: z.ZodBoolean;
|
|
2349
|
+
basis: z.ZodType<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "per_stay" | "per_night" | "per_person" | "per_person_per_night", unknown>>;
|
|
2350
|
+
collectedAt: z.ZodType<"unknown" | (string & {}) | "property", unknown, z.core.$ZodTypeInternals<"unknown" | (string & {}) | "property", unknown>>;
|
|
2351
|
+
}, z.core.$strip>>;
|
|
2352
|
+
}, z.core.$strip>;
|
|
2353
|
+
worse: z.ZodBoolean;
|
|
2354
|
+
}, z.core.$strip>]>, unknown>>;
|
|
2355
|
+
type OfferChange = z.infer<typeof offerChange>;
|
|
2356
|
+
|
|
2357
|
+
declare const PLACE_KINDS: readonly ["country", "region", "district", "settlement", "neighbourhood", "island"];
|
|
2358
|
+
/** A place named in passing: its id and names. */
|
|
2359
|
+
declare const placeRef: z.ZodObject<{
|
|
2360
|
+
placeId: z.ZodString;
|
|
2361
|
+
name: z.ZodString;
|
|
2362
|
+
names: z.ZodObject<{
|
|
2363
|
+
en: z.ZodNullable<z.ZodString>;
|
|
2364
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
2365
|
+
}, z.core.$strip>;
|
|
2366
|
+
}, z.core.$strip>;
|
|
2367
|
+
type PlaceRef = z.infer<typeof placeRef>;
|
|
2368
|
+
declare const place: z.ZodObject<{
|
|
2369
|
+
placeId: z.ZodString;
|
|
2370
|
+
name: z.ZodString;
|
|
2371
|
+
names: z.ZodObject<{
|
|
2372
|
+
en: z.ZodNullable<z.ZodString>;
|
|
2373
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
2374
|
+
}, z.core.$strip>;
|
|
2375
|
+
kind: z.ZodType<"country" | (string & {}) | "region" | "district" | "settlement" | "neighbourhood" | "island", unknown, z.core.$ZodTypeInternals<"country" | (string & {}) | "region" | "district" | "settlement" | "neighbourhood" | "island", unknown>>;
|
|
2376
|
+
scope: z.ZodType<(string & {}) | "area" | "radius", unknown, z.core.$ZodTypeInternals<(string & {}) | "area" | "radius", unknown>>;
|
|
2377
|
+
cityLike: z.ZodNullable<z.ZodBoolean>;
|
|
2378
|
+
population: z.ZodNullable<z.ZodNumber>;
|
|
2379
|
+
region: z.ZodNullable<z.ZodObject<{
|
|
2380
|
+
placeId: z.ZodString;
|
|
2381
|
+
name: z.ZodString;
|
|
2382
|
+
names: z.ZodObject<{
|
|
2383
|
+
en: z.ZodNullable<z.ZodString>;
|
|
2384
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
2385
|
+
}, z.core.$strip>;
|
|
2386
|
+
}, z.core.$strip>>;
|
|
2387
|
+
countryCode: z.ZodString;
|
|
2388
|
+
location: z.ZodObject<{
|
|
2389
|
+
lat: z.ZodNumber;
|
|
2390
|
+
lng: z.ZodNumber;
|
|
2391
|
+
}, z.core.$strip>;
|
|
2392
|
+
}, z.core.$strip>;
|
|
2393
|
+
type Place = z.infer<typeof place>;
|
|
2394
|
+
declare const CENTER_BASES: readonly ["seat", "capital", "busiest_settlement", "hub", "point"];
|
|
2395
|
+
/** A search's reference point and where it came from. */
|
|
2396
|
+
declare const center: z.ZodObject<{
|
|
2397
|
+
location: z.ZodObject<{
|
|
2398
|
+
lat: z.ZodNumber;
|
|
2399
|
+
lng: z.ZodNumber;
|
|
2400
|
+
}, z.core.$strip>;
|
|
2401
|
+
place: z.ZodNullable<z.ZodObject<{
|
|
2402
|
+
placeId: z.ZodString;
|
|
2403
|
+
name: z.ZodString;
|
|
2404
|
+
names: z.ZodObject<{
|
|
2405
|
+
en: z.ZodNullable<z.ZodString>;
|
|
2406
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
2407
|
+
}, z.core.$strip>;
|
|
2408
|
+
}, z.core.$strip>>;
|
|
2409
|
+
basis: z.ZodType<"point" | (string & {}) | "seat" | "capital" | "busiest_settlement" | "hub", unknown, z.core.$ZodTypeInternals<"point" | (string & {}) | "seat" | "capital" | "busiest_settlement" | "hub", unknown>>;
|
|
2410
|
+
}, z.core.$strip>;
|
|
2411
|
+
type Center = z.infer<typeof center>;
|
|
2412
|
+
|
|
2413
|
+
declare const SEARCH_NOTE_CODES: readonly ["indicative_prices", "prices_unavailable", "pool_limited", "amenities_listed_only", "place_resolved_dominant", "area_absorbed", "broad_area", "island_radius", "area_retired", "more_outside_radius", "more_elsewhere", "few_hotels_in_scope", "party_split_required", "no_results", "locality_available"];
|
|
2414
|
+
type SearchNoteCode = (typeof SEARCH_NOTE_CODES)[number];
|
|
2415
|
+
/** An indicative (not bookable) price for one unit; only offers can be booked. */
|
|
2416
|
+
declare const indicativePrice: z.ZodObject<{
|
|
2417
|
+
kind: z.ZodType<"indicative" | (string & {}), unknown, z.core.$ZodTypeInternals<"indicative" | (string & {}), unknown>>;
|
|
2418
|
+
basis: z.ZodType<(string & {}) | "lowest_unit", unknown, z.core.$ZodTypeInternals<(string & {}) | "lowest_unit", unknown>>;
|
|
2419
|
+
fromPerRoomNight: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
2420
|
+
fromPerRoomStay: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
2421
|
+
approx: z.ZodNullable<z.ZodObject<{
|
|
2422
|
+
fromPerRoomNight: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
2423
|
+
fromPerRoomStay: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
2424
|
+
rateDate: z.ZodString;
|
|
2425
|
+
}, z.core.$strip>>;
|
|
2426
|
+
}, z.core.$strip>;
|
|
2427
|
+
type IndicativePrice = z.infer<typeof indicativePrice>;
|
|
2428
|
+
declare const hotelSummary: z.ZodObject<{
|
|
2429
|
+
hotelId: z.ZodString;
|
|
2430
|
+
name: z.ZodString;
|
|
2431
|
+
names: z.ZodObject<{
|
|
2432
|
+
en: z.ZodNullable<z.ZodString>;
|
|
2433
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
2434
|
+
}, z.core.$strip>;
|
|
2435
|
+
stars: z.ZodNullable<z.ZodNumber>;
|
|
2436
|
+
address: z.ZodObject<{
|
|
2437
|
+
line: z.ZodNullable<z.ZodObject<{
|
|
2438
|
+
text: z.ZodString;
|
|
2439
|
+
locale: z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>;
|
|
2440
|
+
}, z.core.$strip>>;
|
|
2441
|
+
countryCode: z.ZodNullable<z.ZodString>;
|
|
2442
|
+
region: z.ZodNullable<z.ZodObject<{
|
|
2443
|
+
placeId: z.ZodString;
|
|
2444
|
+
name: z.ZodString;
|
|
2445
|
+
names: z.ZodObject<{
|
|
2446
|
+
en: z.ZodNullable<z.ZodString>;
|
|
2447
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
2448
|
+
}, z.core.$strip>;
|
|
2449
|
+
}, z.core.$strip>>;
|
|
2450
|
+
}, z.core.$strip>;
|
|
2451
|
+
location: z.ZodNullable<z.ZodObject<{
|
|
2452
|
+
lat: z.ZodNumber;
|
|
2453
|
+
lng: z.ZodNumber;
|
|
2454
|
+
}, z.core.$strip>>;
|
|
2455
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
2456
|
+
distanceMeters: z.ZodNullable<z.ZodNumber>;
|
|
2457
|
+
price: z.ZodNullable<z.ZodObject<{
|
|
2458
|
+
kind: z.ZodType<"indicative" | (string & {}), unknown, z.core.$ZodTypeInternals<"indicative" | (string & {}), unknown>>;
|
|
2459
|
+
basis: z.ZodType<(string & {}) | "lowest_unit", unknown, z.core.$ZodTypeInternals<(string & {}) | "lowest_unit", unknown>>;
|
|
2460
|
+
fromPerRoomNight: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
2461
|
+
fromPerRoomStay: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
2462
|
+
approx: z.ZodNullable<z.ZodObject<{
|
|
2463
|
+
fromPerRoomNight: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
2464
|
+
fromPerRoomStay: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
2465
|
+
rateDate: z.ZodString;
|
|
2466
|
+
}, z.core.$strip>>;
|
|
2467
|
+
}, z.core.$strip>>;
|
|
2468
|
+
}, z.core.$strip>;
|
|
2469
|
+
type HotelSummary = z.infer<typeof hotelSummary>;
|
|
2470
|
+
/** The top locality hubs of a scope (§7.6); also `search_too_broad` details. */
|
|
2471
|
+
declare const localities: z.ZodObject<{
|
|
2472
|
+
items: z.ZodArray<z.ZodObject<{
|
|
2473
|
+
place: z.ZodObject<{
|
|
2474
|
+
placeId: z.ZodString;
|
|
2475
|
+
name: z.ZodString;
|
|
2476
|
+
names: z.ZodObject<{
|
|
2477
|
+
en: z.ZodNullable<z.ZodString>;
|
|
2478
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
2479
|
+
}, z.core.$strip>;
|
|
2480
|
+
}, z.core.$strip>;
|
|
2481
|
+
count: z.ZodNumber;
|
|
2482
|
+
total: z.ZodNumber;
|
|
2483
|
+
includes: z.ZodArray<z.ZodObject<{
|
|
2484
|
+
place: z.ZodObject<{
|
|
2485
|
+
placeId: z.ZodString;
|
|
2486
|
+
name: z.ZodString;
|
|
2487
|
+
names: z.ZodObject<{
|
|
2488
|
+
en: z.ZodNullable<z.ZodString>;
|
|
2489
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
2490
|
+
}, z.core.$strip>;
|
|
2491
|
+
}, z.core.$strip>;
|
|
2492
|
+
members: z.ZodNumber;
|
|
2493
|
+
}, z.core.$strip>>;
|
|
2494
|
+
}, z.core.$strip>>;
|
|
2495
|
+
unassigned: z.ZodNumber;
|
|
2496
|
+
more: z.ZodNumber;
|
|
2497
|
+
}, z.core.$strip>;
|
|
2498
|
+
declare const searchResult: z.ZodObject<{
|
|
2499
|
+
destination: z.ZodNullable<z.ZodType<OpenUnionOutput<"kind", readonly [z.ZodObject<{
|
|
2500
|
+
kind: z.ZodLiteral<"place">;
|
|
2501
|
+
place: z.ZodObject<{
|
|
2502
|
+
placeId: z.ZodString;
|
|
2503
|
+
name: z.ZodString;
|
|
2504
|
+
names: z.ZodObject<{
|
|
2505
|
+
en: z.ZodNullable<z.ZodString>;
|
|
2506
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
2507
|
+
}, z.core.$strip>;
|
|
2508
|
+
kind: z.ZodType<"country" | (string & {}) | "region" | "district" | "settlement" | "neighbourhood" | "island", unknown, z.core.$ZodTypeInternals<"country" | (string & {}) | "region" | "district" | "settlement" | "neighbourhood" | "island", unknown>>;
|
|
2509
|
+
scope: z.ZodType<(string & {}) | "area" | "radius", unknown, z.core.$ZodTypeInternals<(string & {}) | "area" | "radius", unknown>>;
|
|
2510
|
+
cityLike: z.ZodNullable<z.ZodBoolean>;
|
|
2511
|
+
population: z.ZodNullable<z.ZodNumber>;
|
|
2512
|
+
region: z.ZodNullable<z.ZodObject<{
|
|
2513
|
+
placeId: z.ZodString;
|
|
2514
|
+
name: z.ZodString;
|
|
2515
|
+
names: z.ZodObject<{
|
|
2516
|
+
en: z.ZodNullable<z.ZodString>;
|
|
2517
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
2518
|
+
}, z.core.$strip>;
|
|
2519
|
+
}, z.core.$strip>>;
|
|
2520
|
+
countryCode: z.ZodString;
|
|
2521
|
+
location: z.ZodObject<{
|
|
2522
|
+
lat: z.ZodNumber;
|
|
2523
|
+
lng: z.ZodNumber;
|
|
2524
|
+
}, z.core.$strip>;
|
|
2525
|
+
}, z.core.$strip>;
|
|
2526
|
+
resolution: z.ZodType<(string & {}) | "only_match" | "dominant" | "by_id" | "by_country_code" | "by_locality", unknown, z.core.$ZodTypeInternals<(string & {}) | "only_match" | "dominant" | "by_id" | "by_country_code" | "by_locality", unknown>>;
|
|
2527
|
+
otherMatches: z.ZodNumber;
|
|
2528
|
+
scope: z.ZodType<"locality" | (string & {}) | "area" | "radius", unknown, z.core.$ZodTypeInternals<"locality" | (string & {}) | "area" | "radius", unknown>>;
|
|
2529
|
+
center: z.ZodObject<{
|
|
2530
|
+
location: z.ZodObject<{
|
|
2531
|
+
lat: z.ZodNumber;
|
|
2532
|
+
lng: z.ZodNumber;
|
|
2533
|
+
}, z.core.$strip>;
|
|
2534
|
+
place: z.ZodNullable<z.ZodObject<{
|
|
2535
|
+
placeId: z.ZodString;
|
|
2536
|
+
name: z.ZodString;
|
|
2537
|
+
names: z.ZodObject<{
|
|
2538
|
+
en: z.ZodNullable<z.ZodString>;
|
|
2539
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
2540
|
+
}, z.core.$strip>;
|
|
2541
|
+
}, z.core.$strip>>;
|
|
2542
|
+
basis: z.ZodType<"point" | (string & {}) | "seat" | "capital" | "busiest_settlement" | "hub", unknown, z.core.$ZodTypeInternals<"point" | (string & {}) | "seat" | "capital" | "busiest_settlement" | "hub", unknown>>;
|
|
2543
|
+
}, z.core.$strip>;
|
|
2544
|
+
radiusMeters: z.ZodNullable<z.ZodNumber>;
|
|
2545
|
+
radiusSource: z.ZodNullable<z.ZodType<"default" | (string & {}) | "requested", unknown, z.core.$ZodTypeInternals<"default" | (string & {}) | "requested", unknown>>>;
|
|
2546
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2547
|
+
kind: z.ZodLiteral<"point">;
|
|
2548
|
+
center: z.ZodObject<{
|
|
2549
|
+
location: z.ZodObject<{
|
|
2550
|
+
lat: z.ZodNumber;
|
|
2551
|
+
lng: z.ZodNumber;
|
|
2552
|
+
}, z.core.$strip>;
|
|
2553
|
+
place: z.ZodNullable<z.ZodObject<{
|
|
2554
|
+
placeId: z.ZodString;
|
|
2555
|
+
name: z.ZodString;
|
|
2556
|
+
names: z.ZodObject<{
|
|
2557
|
+
en: z.ZodNullable<z.ZodString>;
|
|
2558
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
2559
|
+
}, z.core.$strip>;
|
|
2560
|
+
}, z.core.$strip>>;
|
|
2561
|
+
basis: z.ZodType<"point" | (string & {}) | "seat" | "capital" | "busiest_settlement" | "hub", unknown, z.core.$ZodTypeInternals<"point" | (string & {}) | "seat" | "capital" | "busiest_settlement" | "hub", unknown>>;
|
|
2562
|
+
}, z.core.$strip>;
|
|
2563
|
+
scope: z.ZodType<(string & {}) | "radius", unknown, z.core.$ZodTypeInternals<(string & {}) | "radius", unknown>>;
|
|
2564
|
+
radiusMeters: z.ZodNumber;
|
|
2565
|
+
radiusSource: z.ZodType<"default" | (string & {}) | "requested", unknown, z.core.$ZodTypeInternals<"default" | (string & {}) | "requested", unknown>>;
|
|
2566
|
+
}, z.core.$strip>]>, unknown, z.core.$ZodTypeInternals<OpenUnionOutput<"kind", readonly [z.ZodObject<{
|
|
2567
|
+
kind: z.ZodLiteral<"place">;
|
|
2568
|
+
place: z.ZodObject<{
|
|
2569
|
+
placeId: z.ZodString;
|
|
2570
|
+
name: z.ZodString;
|
|
2571
|
+
names: z.ZodObject<{
|
|
2572
|
+
en: z.ZodNullable<z.ZodString>;
|
|
2573
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
2574
|
+
}, z.core.$strip>;
|
|
2575
|
+
kind: z.ZodType<"country" | (string & {}) | "region" | "district" | "settlement" | "neighbourhood" | "island", unknown, z.core.$ZodTypeInternals<"country" | (string & {}) | "region" | "district" | "settlement" | "neighbourhood" | "island", unknown>>;
|
|
2576
|
+
scope: z.ZodType<(string & {}) | "area" | "radius", unknown, z.core.$ZodTypeInternals<(string & {}) | "area" | "radius", unknown>>;
|
|
2577
|
+
cityLike: z.ZodNullable<z.ZodBoolean>;
|
|
2578
|
+
population: z.ZodNullable<z.ZodNumber>;
|
|
2579
|
+
region: z.ZodNullable<z.ZodObject<{
|
|
2580
|
+
placeId: z.ZodString;
|
|
2581
|
+
name: z.ZodString;
|
|
2582
|
+
names: z.ZodObject<{
|
|
2583
|
+
en: z.ZodNullable<z.ZodString>;
|
|
2584
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
2585
|
+
}, z.core.$strip>;
|
|
2586
|
+
}, z.core.$strip>>;
|
|
2587
|
+
countryCode: z.ZodString;
|
|
2588
|
+
location: z.ZodObject<{
|
|
2589
|
+
lat: z.ZodNumber;
|
|
2590
|
+
lng: z.ZodNumber;
|
|
2591
|
+
}, z.core.$strip>;
|
|
2592
|
+
}, z.core.$strip>;
|
|
2593
|
+
resolution: z.ZodType<(string & {}) | "only_match" | "dominant" | "by_id" | "by_country_code" | "by_locality", unknown, z.core.$ZodTypeInternals<(string & {}) | "only_match" | "dominant" | "by_id" | "by_country_code" | "by_locality", unknown>>;
|
|
2594
|
+
otherMatches: z.ZodNumber;
|
|
2595
|
+
scope: z.ZodType<"locality" | (string & {}) | "area" | "radius", unknown, z.core.$ZodTypeInternals<"locality" | (string & {}) | "area" | "radius", unknown>>;
|
|
2596
|
+
center: z.ZodObject<{
|
|
2597
|
+
location: z.ZodObject<{
|
|
2598
|
+
lat: z.ZodNumber;
|
|
2599
|
+
lng: z.ZodNumber;
|
|
2600
|
+
}, z.core.$strip>;
|
|
2601
|
+
place: z.ZodNullable<z.ZodObject<{
|
|
2602
|
+
placeId: z.ZodString;
|
|
2603
|
+
name: z.ZodString;
|
|
2604
|
+
names: z.ZodObject<{
|
|
2605
|
+
en: z.ZodNullable<z.ZodString>;
|
|
2606
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
2607
|
+
}, z.core.$strip>;
|
|
2608
|
+
}, z.core.$strip>>;
|
|
2609
|
+
basis: z.ZodType<"point" | (string & {}) | "seat" | "capital" | "busiest_settlement" | "hub", unknown, z.core.$ZodTypeInternals<"point" | (string & {}) | "seat" | "capital" | "busiest_settlement" | "hub", unknown>>;
|
|
2610
|
+
}, z.core.$strip>;
|
|
2611
|
+
radiusMeters: z.ZodNullable<z.ZodNumber>;
|
|
2612
|
+
radiusSource: z.ZodNullable<z.ZodType<"default" | (string & {}) | "requested", unknown, z.core.$ZodTypeInternals<"default" | (string & {}) | "requested", unknown>>>;
|
|
2613
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2614
|
+
kind: z.ZodLiteral<"point">;
|
|
2615
|
+
center: z.ZodObject<{
|
|
2616
|
+
location: z.ZodObject<{
|
|
2617
|
+
lat: z.ZodNumber;
|
|
2618
|
+
lng: z.ZodNumber;
|
|
2619
|
+
}, z.core.$strip>;
|
|
2620
|
+
place: z.ZodNullable<z.ZodObject<{
|
|
2621
|
+
placeId: z.ZodString;
|
|
2622
|
+
name: z.ZodString;
|
|
2623
|
+
names: z.ZodObject<{
|
|
2624
|
+
en: z.ZodNullable<z.ZodString>;
|
|
2625
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
2626
|
+
}, z.core.$strip>;
|
|
2627
|
+
}, z.core.$strip>>;
|
|
2628
|
+
basis: z.ZodType<"point" | (string & {}) | "seat" | "capital" | "busiest_settlement" | "hub", unknown, z.core.$ZodTypeInternals<"point" | (string & {}) | "seat" | "capital" | "busiest_settlement" | "hub", unknown>>;
|
|
2629
|
+
}, z.core.$strip>;
|
|
2630
|
+
scope: z.ZodType<(string & {}) | "radius", unknown, z.core.$ZodTypeInternals<(string & {}) | "radius", unknown>>;
|
|
2631
|
+
radiusMeters: z.ZodNumber;
|
|
2632
|
+
radiusSource: z.ZodType<"default" | (string & {}) | "requested", unknown, z.core.$ZodTypeInternals<"default" | (string & {}) | "requested", unknown>>;
|
|
2633
|
+
}, z.core.$strip>]>, unknown>>>;
|
|
2634
|
+
text: z.ZodNullable<z.ZodObject<{
|
|
2635
|
+
value: z.ZodString;
|
|
2636
|
+
match: z.ZodType<"exact" | (string & {}), unknown, z.core.$ZodTypeInternals<"exact" | (string & {}), unknown>>;
|
|
2637
|
+
}, z.core.$strip>>;
|
|
2638
|
+
stay: z.ZodNullable<z.ZodObject<{
|
|
2639
|
+
checkIn: z.ZodString;
|
|
2640
|
+
checkOut: z.ZodString;
|
|
2641
|
+
rooms: z.ZodArray<z.ZodObject<{
|
|
2642
|
+
adults: z.ZodNumber;
|
|
2643
|
+
childrenAges: z.ZodArray<z.ZodNumber>;
|
|
2644
|
+
}, z.core.$strip>>;
|
|
2645
|
+
}, z.core.$strip>>;
|
|
2646
|
+
pricing: z.ZodObject<{
|
|
2647
|
+
mode: z.ZodType<"indicative" | "none" | (string & {}), unknown, z.core.$ZodTypeInternals<"indicative" | "none" | (string & {}), unknown>>;
|
|
2648
|
+
scope: z.ZodNullable<z.ZodType<"pool" | (string & {}) | "page", unknown, z.core.$ZodTypeInternals<"pool" | (string & {}) | "page", unknown>>>;
|
|
2649
|
+
status: z.ZodNullable<z.ZodType<(string & {}) | "ok" | "unavailable", unknown, z.core.$ZodTypeInternals<(string & {}) | "ok" | "unavailable", unknown>>>;
|
|
2650
|
+
}, z.core.$strip>;
|
|
2651
|
+
sort: z.ZodType<"distance" | "relevance" | "stars_desc" | "price_asc" | "price_desc" | (string & {}), unknown, z.core.$ZodTypeInternals<"distance" | "relevance" | "stars_desc" | "price_asc" | "price_desc" | (string & {}), unknown>>;
|
|
2652
|
+
coverage: z.ZodObject<{
|
|
2653
|
+
matched: z.ZodNumber;
|
|
2654
|
+
priced: z.ZodNullable<z.ZodNumber>;
|
|
2655
|
+
withPrice: z.ZodNullable<z.ZodNumber>;
|
|
2656
|
+
poolRadiusMeters: z.ZodNullable<z.ZodNumber>;
|
|
2657
|
+
excludedNoPrice: z.ZodNullable<z.ZodNumber>;
|
|
2658
|
+
excludedNoFacilityData: z.ZodNullable<z.ZodNumber>;
|
|
2659
|
+
withinMaxRadius: z.ZodNullable<z.ZodNumber>;
|
|
2660
|
+
textAnywhere: z.ZodNullable<z.ZodNumber>;
|
|
2661
|
+
localities: z.ZodNullable<z.ZodObject<{
|
|
2662
|
+
items: z.ZodArray<z.ZodObject<{
|
|
2663
|
+
place: z.ZodObject<{
|
|
2664
|
+
placeId: z.ZodString;
|
|
2665
|
+
name: z.ZodString;
|
|
2666
|
+
names: z.ZodObject<{
|
|
2667
|
+
en: z.ZodNullable<z.ZodString>;
|
|
2668
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
2669
|
+
}, z.core.$strip>;
|
|
2670
|
+
}, z.core.$strip>;
|
|
2671
|
+
count: z.ZodNumber;
|
|
2672
|
+
total: z.ZodNumber;
|
|
2673
|
+
includes: z.ZodArray<z.ZodObject<{
|
|
2674
|
+
place: z.ZodObject<{
|
|
2675
|
+
placeId: z.ZodString;
|
|
2676
|
+
name: z.ZodString;
|
|
2677
|
+
names: z.ZodObject<{
|
|
2678
|
+
en: z.ZodNullable<z.ZodString>;
|
|
2679
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
2680
|
+
}, z.core.$strip>;
|
|
2681
|
+
}, z.core.$strip>;
|
|
2682
|
+
members: z.ZodNumber;
|
|
2683
|
+
}, z.core.$strip>>;
|
|
2684
|
+
}, z.core.$strip>>;
|
|
2685
|
+
unassigned: z.ZodNumber;
|
|
2686
|
+
more: z.ZodNumber;
|
|
2687
|
+
}, z.core.$strip>>;
|
|
2688
|
+
nameAsText: z.ZodNullable<z.ZodNumber>;
|
|
2689
|
+
}, z.core.$strip>;
|
|
2690
|
+
data: z.ZodArray<z.ZodObject<{
|
|
2691
|
+
hotelId: z.ZodString;
|
|
2692
|
+
name: z.ZodString;
|
|
2693
|
+
names: z.ZodObject<{
|
|
2694
|
+
en: z.ZodNullable<z.ZodString>;
|
|
2695
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
2696
|
+
}, z.core.$strip>;
|
|
2697
|
+
stars: z.ZodNullable<z.ZodNumber>;
|
|
2698
|
+
address: z.ZodObject<{
|
|
2699
|
+
line: z.ZodNullable<z.ZodObject<{
|
|
2700
|
+
text: z.ZodString;
|
|
2701
|
+
locale: z.ZodType<"en" | "zh" | (string & {}), unknown, z.core.$ZodTypeInternals<"en" | "zh" | (string & {}), unknown>>;
|
|
2702
|
+
}, z.core.$strip>>;
|
|
2703
|
+
countryCode: z.ZodNullable<z.ZodString>;
|
|
2704
|
+
region: z.ZodNullable<z.ZodObject<{
|
|
2705
|
+
placeId: z.ZodString;
|
|
2706
|
+
name: z.ZodString;
|
|
2707
|
+
names: z.ZodObject<{
|
|
2708
|
+
en: z.ZodNullable<z.ZodString>;
|
|
2709
|
+
zh: z.ZodNullable<z.ZodString>;
|
|
2710
|
+
}, z.core.$strip>;
|
|
2711
|
+
}, z.core.$strip>>;
|
|
2712
|
+
}, z.core.$strip>;
|
|
2713
|
+
location: z.ZodNullable<z.ZodObject<{
|
|
2714
|
+
lat: z.ZodNumber;
|
|
2715
|
+
lng: z.ZodNumber;
|
|
2716
|
+
}, z.core.$strip>>;
|
|
2717
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
2718
|
+
distanceMeters: z.ZodNullable<z.ZodNumber>;
|
|
2719
|
+
price: z.ZodNullable<z.ZodObject<{
|
|
2720
|
+
kind: z.ZodType<"indicative" | (string & {}), unknown, z.core.$ZodTypeInternals<"indicative" | (string & {}), unknown>>;
|
|
2721
|
+
basis: z.ZodType<(string & {}) | "lowest_unit", unknown, z.core.$ZodTypeInternals<(string & {}) | "lowest_unit", unknown>>;
|
|
2722
|
+
fromPerRoomNight: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
2723
|
+
fromPerRoomStay: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
2724
|
+
approx: z.ZodNullable<z.ZodObject<{
|
|
2725
|
+
fromPerRoomNight: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
2726
|
+
fromPerRoomStay: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
|
|
2727
|
+
rateDate: z.ZodString;
|
|
2728
|
+
}, z.core.$strip>>;
|
|
2729
|
+
}, z.core.$strip>>;
|
|
2730
|
+
}, z.core.$strip>>;
|
|
2731
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
2732
|
+
notes: z.ZodArray<z.ZodObject<{
|
|
2733
|
+
code: z.ZodType<(string & {}) | "indicative_prices" | "prices_unavailable" | "pool_limited" | "amenities_listed_only" | "place_resolved_dominant" | "area_absorbed" | "broad_area" | "island_radius" | "area_retired" | "more_outside_radius" | "more_elsewhere" | "few_hotels_in_scope" | "party_split_required" | "no_results" | "locality_available", unknown, z.core.$ZodTypeInternals<(string & {}) | "indicative_prices" | "prices_unavailable" | "pool_limited" | "amenities_listed_only" | "place_resolved_dominant" | "area_absorbed" | "broad_area" | "island_radius" | "area_retired" | "more_outside_radius" | "more_elsewhere" | "few_hotels_in_scope" | "party_split_required" | "no_results" | "locality_available", unknown>>;
|
|
2734
|
+
message: z.ZodString;
|
|
2735
|
+
}, z.core.$strip>>;
|
|
2736
|
+
}, z.core.$strip>;
|
|
2737
|
+
type SearchResult = z.infer<typeof searchResult>;
|
|
2738
|
+
|
|
2739
|
+
/** The public hosts of the v1 API and its MCP server. */
|
|
2740
|
+
declare const PUBLIC_ORIGINS: {
|
|
2741
|
+
readonly api: "https://api.fortrip.ai";
|
|
2742
|
+
readonly mcp: "https://mcp.fortrip.ai";
|
|
429
2743
|
};
|
|
2744
|
+
/** Where v1 lives on `PUBLIC_ORIGINS.api`. */
|
|
2745
|
+
declare const API: {
|
|
2746
|
+
readonly me: "/v1/me";
|
|
2747
|
+
readonly authConfig: "/v1/auth/config";
|
|
2748
|
+
readonly hotelSearch: "/v1/hotels/search";
|
|
2749
|
+
readonly hotelOffers: "/v1/hotels/offers";
|
|
2750
|
+
readonly orders: "/v1/orders";
|
|
2751
|
+
readonly hotel: (id: string, opts?: {
|
|
2752
|
+
rooms?: boolean;
|
|
2753
|
+
locale?: "en" | "zh";
|
|
2754
|
+
}) => string;
|
|
2755
|
+
readonly order: (id: string, opts?: {
|
|
2756
|
+
locale?: "en" | "zh";
|
|
2757
|
+
}) => string;
|
|
2758
|
+
};
|
|
2759
|
+
/** The MCP server answers at the root of `PUBLIC_ORIGINS.mcp`. */
|
|
2760
|
+
declare const MCP_PATH = "/";
|
|
2761
|
+
|
|
2762
|
+
/** The error envelope as text; `status` is the HTTP status, when known. */
|
|
2763
|
+
declare function renderError(envelope: unknown, status?: number): string;
|
|
2764
|
+
|
|
2765
|
+
type RenderedTool = Exclude<ToolName, "get_planning_guide">;
|
|
2766
|
+
/**
|
|
2767
|
+
* Renders `data`, the answer of `tool`, after parsing it with the tool's
|
|
2768
|
+
* open output schema: unknown fields are ignored and unknown values shown
|
|
2769
|
+
* as they came. A result that does not parse is shown as JSON, never thrown.
|
|
2770
|
+
* The consent rule (`ORDER_NEXT_STEP`) is the last paragraph whenever the
|
|
2771
|
+
* result holds a non-null `payment.url`.
|
|
2772
|
+
*/
|
|
2773
|
+
declare function renderToolResult(tool: RenderedTool, data: unknown): string;
|
|
2774
|
+
|
|
2775
|
+
/** Amenity codes a search can filter by (§7.7), in the order they are listed. */
|
|
2776
|
+
declare const FILTERABLE_AMENITIES: readonly ["parking", "wifi", "laundry", "restaurant", "room_service", "bar", "non_smoking", "business_center", "pool"];
|
|
2777
|
+
/** Every amenity code a response can carry: the filterable ones, then the
|
|
2778
|
+
* response-only ones and `other`. A search that filters by a response-only
|
|
2779
|
+
* code is refused by the service with details (§7.7). */
|
|
2780
|
+
declare const AMENITY_CODES: readonly ["parking", "wifi", "laundry", "restaurant", "room_service", "bar", "non_smoking", "business_center", "pool", "airport_shuttle", "spa", "gym", "accessible", "ev_charging", "air_conditioning", "pets_allowed", "kitchen", "other"];
|
|
2781
|
+
type FilterableAmenity = (typeof FILTERABLE_AMENITIES)[number];
|
|
2782
|
+
type AmenityCode = (typeof AMENITY_CODES)[number];
|
|
2783
|
+
/** Orders a hotel search can be sorted in (§7.1). */
|
|
2784
|
+
declare const SEARCH_SORTS: readonly ["distance", "relevance", "stars_desc", "price_asc", "price_desc"];
|
|
2785
|
+
|
|
2786
|
+
declare const UNKNOWN_IS_NOT_NO_EXEMPTIONS: Readonly<Record<string, string>>;
|
|
430
2787
|
|
|
431
2788
|
/** The contract's version, from package.json, the one place a release bumps it. */
|
|
432
2789
|
declare const CONTRACT_VERSION: string;
|
|
433
2790
|
|
|
434
|
-
export { API, type
|
|
2791
|
+
export { AMENITY_CODES, API, type AmenityCode, type AuthConfig, CARD_NUMBER_MESSAGE, CENTER_BASES, COMMANDS, COMMAND_GROUPS, CONTRACT_VERSION, type Center, type CommandGroupSpec, type CommandSpec, type CreateOrderInput, DISPLAY_CURRENCIES, type Destination, ERROR_CODES, ERROR_DETAILS, type ErrorBody, type ErrorCode, type ErrorEnvelope, FILTERABLE_AMENITIES, type FilterableAmenity, type FlagSpec, GLOBAL_FLAGS, type GetHotelInput, type GetOrderInput, type GuideSurface, type GuideTopic, type Hotel, type HotelOffersInput, type HotelOffersResult, type HotelSummary, type IndicativePrice, type KnownErrorBody, LIMITS, type ListOrdersInput, MCP_OUTPUT, MCP_PATH, type MeResult, type Money, ORDER_NEXT_STEP, ORDER_STATUSES, type Offer, type OfferChange, type Omitted, type OptionSpec, type Order, type OrderList, type OrderStatus, PAYMENT_STATUSES, PLACE_KINDS, POLICY_TOPICS, PUBLIC_ORIGINS, type PaymentStatus, type Place, type PlaceRef, type PolicyTopic, type PositionalSpec, type RenderedTool, SEARCH_NOTE_CODES, SEARCH_SORTS, SUPPORT_EMAIL, type SearchHotelsInput, type SearchNoteCode, type SearchResult, type Stay, TOOLS, type ToolName, type ToolSpec, UNAVAILABLE_REASONS, UNKNOWN_IS_NOT_NO_EXEMPTIONS, addIsoDateDays, authConfig, cancellation, center, commandInvocation, confirmation, containsCardNumber, countIsoDateDays, createOrderInput, createSearchHotelsInput, destination, errorEnvelope, flag, formatMoney, getHotelInput, getOrderInput, hotel, hotelId, hotelOffersInput, hotelOffersResult, hotelSummary, indicativePrice, instant, isIsoDate, knownLocaleText, latLng, listOrdersInput, localDate, localTime, localities, localizedText, meResult, meals, money, names, nonEmpty, offer, offerChange, offerId, omitted, oneOf, openEnum, openObject, openUnion, order, orderId, orderList, orderReference, parseOpen, payAtProperty, place, placeId, placeRef, renderError, renderGuide, renderToolResult, roomFacts, searchHotelsInput, searchResult, stay, stayEcho, strictErrorEnvelope, strictInput, strictOutput, text, timeZone, usdMoney, wholeNumber };
|