@fortrip/agent-contract 4.3.1 → 5.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.d.ts +537 -221
  2. package/dist/index.js +230 -232
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -59,7 +59,7 @@ declare function parseOpen<T>(schema: z.ZodType<T>, value: unknown): T;
59
59
  */
60
60
  declare function strictOutput<T extends z.ZodType>(schema: T): T;
61
61
 
62
- type ToolName = "get_planning_guide" | "search_hotels" | "get_hotel" | "get_hotel_offers" | "book_hotel" | "get_order" | "list_orders" | "cancel_order" | "pay_order";
62
+ type ToolName = "search_hotels" | "get_hotel" | "get_hotel_offers" | "book_hotel" | "get_order" | "list_orders" | "cancel_order" | "pay_order";
63
63
  interface ToolSpec {
64
64
  name: ToolName;
65
65
  title: string;
@@ -70,10 +70,10 @@ interface ToolSpec {
70
70
  openWorldHint: boolean;
71
71
  destructiveHint: boolean;
72
72
  };
73
- /** What the tool takes; `null` for a tool without arguments. */
74
- input: z.ZodType | null;
75
- /** The open schema of what it answers with; `null` for the guide. */
76
- output: z.ZodType | null;
73
+ /** What the tool takes. */
74
+ input: z.ZodType;
75
+ /** The open schema of what it answers with. */
76
+ output: z.ZodType;
77
77
  }
78
78
  /**
79
79
  * The consent rule (spec §6). It rides on every MCP result that holds a
@@ -87,7 +87,8 @@ type RenderSurface = "mcp" | "cli";
87
87
  /**
88
88
  * The consent rule of a cancellation (spec §5.7, C11), as `surface` names
89
89
  * the call. It rides as the last paragraph of the text of every `get_order`
90
- * and `list_orders` result that holds an order with `cancel.available`,
90
+ * and `list_orders` result that holds an order with `cancel.available`
91
+ * (an unpaid one, reason `unpaid`, aside: it is closed with no penalty),
91
92
  * after `ORDER_NEXT_STEP` when both apply, and never as `nextStep`, which
92
93
  * keeps its payment-only meaning.
93
94
  */
@@ -97,8 +98,9 @@ declare const CANCEL_NEXT_STEP: string;
97
98
  /**
98
99
  * How to pay without the link, as `surface` names the call. It rides as the
99
100
  * last paragraph of the text of every `book_hotel`, `get_order` and
100
- * `list_orders` result that holds an order with non-empty
101
- * `payment.handlers`, after `ORDER_NEXT_STEP`; never as `nextStep`.
101
+ * `list_orders` result that holds an order whose `payment.methods` has the
102
+ * `stripe_shared_payment_token` entry, after `ORDER_NEXT_STEP`; never as
103
+ * `nextStep`.
102
104
  */
103
105
  declare function payNextStep(surface: RenderSurface): string;
104
106
  /** `payNextStep` over MCP. */
@@ -107,7 +109,8 @@ declare const PAY_NEXT_STEP: string;
107
109
  * How to pay with Alipay or WeChat Pay (spec §7), as `surface` names the
108
110
  * call. It rides as the last paragraph of the text of every `book_hotel`,
109
111
  * `get_order` and `list_orders` result that holds an order whose
110
- * `payment.wallets` offers it without having opened it; never as `nextStep`.
112
+ * `payment.methods` has the `stripe_alipay_wechat_pay` entry, not yet open;
113
+ * never as `nextStep`.
111
114
  */
112
115
  declare function walletNextStep(surface: RenderSurface): string;
113
116
  /** `walletNextStep` over MCP. */
@@ -118,7 +121,7 @@ declare const WALLET_NEXT_STEP: string;
118
121
  * `get_hotel_offers` result: a rule next to the data is followed far more
119
122
  * reliably than one in the server instructions.
120
123
  */
121
- declare const PRESENTATION_HINT = "Presentation: If your interface can show rich elements, show each hotel as a card with only what Fortrip's tools returned for it in this conversation: photo, name, stars, region and price, and once you have offers every term that changes the choice (meals and who they cover, cancellation, fees payable at the property, confirmation), an unknown one as unknown. Label a search's `price.fromPerRoomNight` as an estimate per room-night and an offer's `price.total` as the whole stay for all rooms, in USD, and draw a map only from returned `location` coordinates. Offer the choices you need to ask anyway (dates, a locality, which offer) as options to pick. Otherwise use a short list. Keep hotel names as returned, and never invent photos, ratings, reviews, prices, terms or coordinates.";
124
+ declare const PRESENTATION_HINT = "Presentation: If your interface can show rich elements, show each hotel as a card with only what Fortrip's tools returned for it in this conversation: photo, name, stars, region and price, and once you have offers every term that changes the choice (meals and who they cover, cancellation, fees payable at the property, confirmation), an unknown one as unknown. Label a search's `price.fromPerRoomNight` as an estimate per room-night and an offer's `price.total` as the whole stay for all rooms, in its currency, and draw a map only from returned `location` coordinates. Offer the choices you need to ask anyway (dates, a locality, which offer) as options to pick. Otherwise use a short list. Keep hotel names as returned, and never invent photos, ratings, reviews, prices, terms or coordinates.";
122
125
  /** The answers over MCP that are orders. Those that can hold a
123
126
  * `payment.url` are the HTTP answer plus `nextStep`, which only MCP
124
127
  * declares; `cancel_order`'s and `pay_order`'s never hold one, so they are
@@ -266,27 +269,64 @@ declare const MCP_OUTPUT: {
266
269
  chargeCurrency: z.ZodString;
267
270
  localCurrencyAtCheckout: z.ZodBoolean;
268
271
  localCharge: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
269
- handlers: z.ZodArray<z.ZodObject<{
270
- id: z.ZodString;
271
- type: z.ZodString;
272
- version: z.ZodString;
273
- spec: z.ZodString;
274
- schema: z.ZodString;
275
- available_instruments: z.ZodArray<z.ZodObject<{
272
+ methods: z.ZodArray<z.ZodType<OpenUnionOutput<"id", readonly [z.ZodObject<{
273
+ id: z.ZodLiteral<"stripe_shared_payment_token">;
274
+ handler: z.ZodObject<{
275
+ id: z.ZodString;
276
276
  type: z.ZodString;
277
- config: z.ZodOptional<z.ZodType<Record<string, unknown>, unknown, z.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
277
+ version: z.ZodString;
278
+ spec: z.ZodString;
279
+ schema: z.ZodString;
280
+ available_instruments: z.ZodArray<z.ZodObject<{
281
+ type: z.ZodString;
282
+ config: z.ZodOptional<z.ZodType<Record<string, unknown>, unknown, z.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
283
+ }, z.core.$strip>>;
284
+ config: z.ZodObject<{
285
+ environment: z.ZodType<(string & {}) | "livemode" | "testmode", unknown, z.core.$ZodTypeInternals<(string & {}) | "livemode" | "testmode", unknown>>;
286
+ business_profile: z.ZodString;
287
+ }, z.core.$strip>;
288
+ }, z.core.$strip>;
289
+ limits: z.ZodObject<{
290
+ maxAmount: z.ZodNumber;
291
+ currency: z.ZodString;
292
+ expiresAt: z.ZodString;
293
+ }, z.core.$strip>;
294
+ }, z.core.$strip>, z.ZodObject<{
295
+ id: z.ZodLiteral<"stripe_alipay_wechat_pay">;
296
+ open: z.ZodBoolean;
297
+ current: z.ZodNullable<z.ZodType<(string & {}) | "wechat_pay" | "alipay", unknown, z.core.$ZodTypeInternals<(string & {}) | "wechat_pay" | "alipay", unknown>>>;
298
+ wechatPay: z.ZodNullable<z.ZodObject<{
299
+ qrData: z.ZodNullable<z.ZodString>;
300
+ qrImageUrl: z.ZodNullable<z.ZodString>;
301
+ url: z.ZodString;
278
302
  }, z.core.$strip>>;
279
- config: z.ZodObject<{
280
- environment: z.ZodType<(string & {}) | "livemode" | "testmode", unknown, z.core.$ZodTypeInternals<(string & {}) | "livemode" | "testmode", unknown>>;
281
- business_profile: z.ZodString;
303
+ alipay: z.ZodNullable<z.ZodObject<{
304
+ url: z.ZodString;
305
+ }, z.core.$strip>>;
306
+ }, z.core.$strip>]>, unknown, z.core.$ZodTypeInternals<OpenUnionOutput<"id", readonly [z.ZodObject<{
307
+ id: z.ZodLiteral<"stripe_shared_payment_token">;
308
+ handler: z.ZodObject<{
309
+ id: z.ZodString;
310
+ type: z.ZodString;
311
+ version: z.ZodString;
312
+ spec: z.ZodString;
313
+ schema: z.ZodString;
314
+ available_instruments: z.ZodArray<z.ZodObject<{
315
+ type: z.ZodString;
316
+ config: z.ZodOptional<z.ZodType<Record<string, unknown>, unknown, z.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
317
+ }, z.core.$strip>>;
318
+ config: z.ZodObject<{
319
+ environment: z.ZodType<(string & {}) | "livemode" | "testmode", unknown, z.core.$ZodTypeInternals<(string & {}) | "livemode" | "testmode", unknown>>;
320
+ business_profile: z.ZodString;
321
+ }, z.core.$strip>;
282
322
  }, z.core.$strip>;
283
- }, z.core.$strip>>;
284
- credentialLimits: z.ZodNullable<z.ZodObject<{
285
- maxAmount: z.ZodNumber;
286
- currency: z.ZodString;
287
- expiresAt: z.ZodString;
288
- }, z.core.$strip>>;
289
- wallets: z.ZodNullable<z.ZodObject<{
323
+ limits: z.ZodObject<{
324
+ maxAmount: z.ZodNumber;
325
+ currency: z.ZodString;
326
+ expiresAt: z.ZodString;
327
+ }, z.core.$strip>;
328
+ }, z.core.$strip>, z.ZodObject<{
329
+ id: z.ZodLiteral<"stripe_alipay_wechat_pay">;
290
330
  open: z.ZodBoolean;
291
331
  current: z.ZodNullable<z.ZodType<(string & {}) | "wechat_pay" | "alipay", unknown, z.core.$ZodTypeInternals<(string & {}) | "wechat_pay" | "alipay", unknown>>>;
292
332
  wechatPay: z.ZodNullable<z.ZodObject<{
@@ -297,11 +337,11 @@ declare const MCP_OUTPUT: {
297
337
  alipay: z.ZodNullable<z.ZodObject<{
298
338
  url: z.ZodString;
299
339
  }, z.core.$strip>>;
300
- }, z.core.$strip>>;
340
+ }, z.core.$strip>]>, unknown>>>;
301
341
  }, z.core.$strip>;
302
342
  cancel: z.ZodObject<{
303
343
  available: z.ZodBoolean;
304
- reason: z.ZodType<(string & {}) | "non_refundable" | "needs_attention" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown, z.core.$ZodTypeInternals<(string & {}) | "non_refundable" | "needs_attention" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown>>;
344
+ reason: z.ZodType<(string & {}) | "non_refundable" | "needs_attention" | "unpaid" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown, z.core.$ZodTypeInternals<(string & {}) | "non_refundable" | "needs_attention" | "unpaid" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown>>;
305
345
  penalty: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
306
346
  refund: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
307
347
  }, z.core.$strip>;
@@ -450,27 +490,64 @@ declare const MCP_OUTPUT: {
450
490
  chargeCurrency: z.ZodString;
451
491
  localCurrencyAtCheckout: z.ZodBoolean;
452
492
  localCharge: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
453
- handlers: z.ZodArray<z.ZodObject<{
454
- id: z.ZodString;
455
- type: z.ZodString;
456
- version: z.ZodString;
457
- spec: z.ZodString;
458
- schema: z.ZodString;
459
- available_instruments: z.ZodArray<z.ZodObject<{
493
+ methods: z.ZodArray<z.ZodType<OpenUnionOutput<"id", readonly [z.ZodObject<{
494
+ id: z.ZodLiteral<"stripe_shared_payment_token">;
495
+ handler: z.ZodObject<{
496
+ id: z.ZodString;
460
497
  type: z.ZodString;
461
- config: z.ZodOptional<z.ZodType<Record<string, unknown>, unknown, z.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
498
+ version: z.ZodString;
499
+ spec: z.ZodString;
500
+ schema: z.ZodString;
501
+ available_instruments: z.ZodArray<z.ZodObject<{
502
+ type: z.ZodString;
503
+ config: z.ZodOptional<z.ZodType<Record<string, unknown>, unknown, z.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
504
+ }, z.core.$strip>>;
505
+ config: z.ZodObject<{
506
+ environment: z.ZodType<(string & {}) | "livemode" | "testmode", unknown, z.core.$ZodTypeInternals<(string & {}) | "livemode" | "testmode", unknown>>;
507
+ business_profile: z.ZodString;
508
+ }, z.core.$strip>;
509
+ }, z.core.$strip>;
510
+ limits: z.ZodObject<{
511
+ maxAmount: z.ZodNumber;
512
+ currency: z.ZodString;
513
+ expiresAt: z.ZodString;
514
+ }, z.core.$strip>;
515
+ }, z.core.$strip>, z.ZodObject<{
516
+ id: z.ZodLiteral<"stripe_alipay_wechat_pay">;
517
+ open: z.ZodBoolean;
518
+ current: z.ZodNullable<z.ZodType<(string & {}) | "wechat_pay" | "alipay", unknown, z.core.$ZodTypeInternals<(string & {}) | "wechat_pay" | "alipay", unknown>>>;
519
+ wechatPay: z.ZodNullable<z.ZodObject<{
520
+ qrData: z.ZodNullable<z.ZodString>;
521
+ qrImageUrl: z.ZodNullable<z.ZodString>;
522
+ url: z.ZodString;
462
523
  }, z.core.$strip>>;
463
- config: z.ZodObject<{
464
- environment: z.ZodType<(string & {}) | "livemode" | "testmode", unknown, z.core.$ZodTypeInternals<(string & {}) | "livemode" | "testmode", unknown>>;
465
- business_profile: z.ZodString;
524
+ alipay: z.ZodNullable<z.ZodObject<{
525
+ url: z.ZodString;
526
+ }, z.core.$strip>>;
527
+ }, z.core.$strip>]>, unknown, z.core.$ZodTypeInternals<OpenUnionOutput<"id", readonly [z.ZodObject<{
528
+ id: z.ZodLiteral<"stripe_shared_payment_token">;
529
+ handler: z.ZodObject<{
530
+ id: z.ZodString;
531
+ type: z.ZodString;
532
+ version: z.ZodString;
533
+ spec: z.ZodString;
534
+ schema: z.ZodString;
535
+ available_instruments: z.ZodArray<z.ZodObject<{
536
+ type: z.ZodString;
537
+ config: z.ZodOptional<z.ZodType<Record<string, unknown>, unknown, z.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
538
+ }, z.core.$strip>>;
539
+ config: z.ZodObject<{
540
+ environment: z.ZodType<(string & {}) | "livemode" | "testmode", unknown, z.core.$ZodTypeInternals<(string & {}) | "livemode" | "testmode", unknown>>;
541
+ business_profile: z.ZodString;
542
+ }, z.core.$strip>;
466
543
  }, z.core.$strip>;
467
- }, z.core.$strip>>;
468
- credentialLimits: z.ZodNullable<z.ZodObject<{
469
- maxAmount: z.ZodNumber;
470
- currency: z.ZodString;
471
- expiresAt: z.ZodString;
472
- }, z.core.$strip>>;
473
- wallets: z.ZodNullable<z.ZodObject<{
544
+ limits: z.ZodObject<{
545
+ maxAmount: z.ZodNumber;
546
+ currency: z.ZodString;
547
+ expiresAt: z.ZodString;
548
+ }, z.core.$strip>;
549
+ }, z.core.$strip>, z.ZodObject<{
550
+ id: z.ZodLiteral<"stripe_alipay_wechat_pay">;
474
551
  open: z.ZodBoolean;
475
552
  current: z.ZodNullable<z.ZodType<(string & {}) | "wechat_pay" | "alipay", unknown, z.core.$ZodTypeInternals<(string & {}) | "wechat_pay" | "alipay", unknown>>>;
476
553
  wechatPay: z.ZodNullable<z.ZodObject<{
@@ -481,11 +558,11 @@ declare const MCP_OUTPUT: {
481
558
  alipay: z.ZodNullable<z.ZodObject<{
482
559
  url: z.ZodString;
483
560
  }, z.core.$strip>>;
484
- }, z.core.$strip>>;
561
+ }, z.core.$strip>]>, unknown>>>;
485
562
  }, z.core.$strip>;
486
563
  cancel: z.ZodObject<{
487
564
  available: z.ZodBoolean;
488
- reason: z.ZodType<(string & {}) | "non_refundable" | "needs_attention" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown, z.core.$ZodTypeInternals<(string & {}) | "non_refundable" | "needs_attention" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown>>;
565
+ reason: z.ZodType<(string & {}) | "non_refundable" | "needs_attention" | "unpaid" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown, z.core.$ZodTypeInternals<(string & {}) | "non_refundable" | "needs_attention" | "unpaid" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown>>;
489
566
  penalty: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
490
567
  refund: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
491
568
  }, z.core.$strip>;
@@ -635,27 +712,64 @@ declare const MCP_OUTPUT: {
635
712
  chargeCurrency: z.ZodString;
636
713
  localCurrencyAtCheckout: z.ZodBoolean;
637
714
  localCharge: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
638
- handlers: z.ZodArray<z.ZodObject<{
639
- id: z.ZodString;
640
- type: z.ZodString;
641
- version: z.ZodString;
642
- spec: z.ZodString;
643
- schema: z.ZodString;
644
- available_instruments: z.ZodArray<z.ZodObject<{
715
+ methods: z.ZodArray<z.ZodType<OpenUnionOutput<"id", readonly [z.ZodObject<{
716
+ id: z.ZodLiteral<"stripe_shared_payment_token">;
717
+ handler: z.ZodObject<{
718
+ id: z.ZodString;
645
719
  type: z.ZodString;
646
- config: z.ZodOptional<z.ZodType<Record<string, unknown>, unknown, z.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
720
+ version: z.ZodString;
721
+ spec: z.ZodString;
722
+ schema: z.ZodString;
723
+ available_instruments: z.ZodArray<z.ZodObject<{
724
+ type: z.ZodString;
725
+ config: z.ZodOptional<z.ZodType<Record<string, unknown>, unknown, z.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
726
+ }, z.core.$strip>>;
727
+ config: z.ZodObject<{
728
+ environment: z.ZodType<(string & {}) | "livemode" | "testmode", unknown, z.core.$ZodTypeInternals<(string & {}) | "livemode" | "testmode", unknown>>;
729
+ business_profile: z.ZodString;
730
+ }, z.core.$strip>;
731
+ }, z.core.$strip>;
732
+ limits: z.ZodObject<{
733
+ maxAmount: z.ZodNumber;
734
+ currency: z.ZodString;
735
+ expiresAt: z.ZodString;
736
+ }, z.core.$strip>;
737
+ }, z.core.$strip>, z.ZodObject<{
738
+ id: z.ZodLiteral<"stripe_alipay_wechat_pay">;
739
+ open: z.ZodBoolean;
740
+ current: z.ZodNullable<z.ZodType<(string & {}) | "wechat_pay" | "alipay", unknown, z.core.$ZodTypeInternals<(string & {}) | "wechat_pay" | "alipay", unknown>>>;
741
+ wechatPay: z.ZodNullable<z.ZodObject<{
742
+ qrData: z.ZodNullable<z.ZodString>;
743
+ qrImageUrl: z.ZodNullable<z.ZodString>;
744
+ url: z.ZodString;
647
745
  }, z.core.$strip>>;
648
- config: z.ZodObject<{
649
- environment: z.ZodType<(string & {}) | "livemode" | "testmode", unknown, z.core.$ZodTypeInternals<(string & {}) | "livemode" | "testmode", unknown>>;
650
- business_profile: z.ZodString;
746
+ alipay: z.ZodNullable<z.ZodObject<{
747
+ url: z.ZodString;
748
+ }, z.core.$strip>>;
749
+ }, z.core.$strip>]>, unknown, z.core.$ZodTypeInternals<OpenUnionOutput<"id", readonly [z.ZodObject<{
750
+ id: z.ZodLiteral<"stripe_shared_payment_token">;
751
+ handler: z.ZodObject<{
752
+ id: z.ZodString;
753
+ type: z.ZodString;
754
+ version: z.ZodString;
755
+ spec: z.ZodString;
756
+ schema: z.ZodString;
757
+ available_instruments: z.ZodArray<z.ZodObject<{
758
+ type: z.ZodString;
759
+ config: z.ZodOptional<z.ZodType<Record<string, unknown>, unknown, z.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
760
+ }, z.core.$strip>>;
761
+ config: z.ZodObject<{
762
+ environment: z.ZodType<(string & {}) | "livemode" | "testmode", unknown, z.core.$ZodTypeInternals<(string & {}) | "livemode" | "testmode", unknown>>;
763
+ business_profile: z.ZodString;
764
+ }, z.core.$strip>;
651
765
  }, z.core.$strip>;
652
- }, z.core.$strip>>;
653
- credentialLimits: z.ZodNullable<z.ZodObject<{
654
- maxAmount: z.ZodNumber;
655
- currency: z.ZodString;
656
- expiresAt: z.ZodString;
657
- }, z.core.$strip>>;
658
- wallets: z.ZodNullable<z.ZodObject<{
766
+ limits: z.ZodObject<{
767
+ maxAmount: z.ZodNumber;
768
+ currency: z.ZodString;
769
+ expiresAt: z.ZodString;
770
+ }, z.core.$strip>;
771
+ }, z.core.$strip>, z.ZodObject<{
772
+ id: z.ZodLiteral<"stripe_alipay_wechat_pay">;
659
773
  open: z.ZodBoolean;
660
774
  current: z.ZodNullable<z.ZodType<(string & {}) | "wechat_pay" | "alipay", unknown, z.core.$ZodTypeInternals<(string & {}) | "wechat_pay" | "alipay", unknown>>>;
661
775
  wechatPay: z.ZodNullable<z.ZodObject<{
@@ -666,11 +780,11 @@ declare const MCP_OUTPUT: {
666
780
  alipay: z.ZodNullable<z.ZodObject<{
667
781
  url: z.ZodString;
668
782
  }, z.core.$strip>>;
669
- }, z.core.$strip>>;
783
+ }, z.core.$strip>]>, unknown>>>;
670
784
  }, z.core.$strip>;
671
785
  cancel: z.ZodObject<{
672
786
  available: z.ZodBoolean;
673
- reason: z.ZodType<(string & {}) | "non_refundable" | "needs_attention" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown, z.core.$ZodTypeInternals<(string & {}) | "non_refundable" | "needs_attention" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown>>;
787
+ reason: z.ZodType<(string & {}) | "non_refundable" | "needs_attention" | "unpaid" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown, z.core.$ZodTypeInternals<(string & {}) | "non_refundable" | "needs_attention" | "unpaid" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown>>;
674
788
  penalty: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
675
789
  refund: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
676
790
  }, z.core.$strip>;
@@ -821,27 +935,64 @@ declare const MCP_OUTPUT: {
821
935
  chargeCurrency: z.ZodString;
822
936
  localCurrencyAtCheckout: z.ZodBoolean;
823
937
  localCharge: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
824
- handlers: z.ZodArray<z.ZodObject<{
825
- id: z.ZodString;
826
- type: z.ZodString;
827
- version: z.ZodString;
828
- spec: z.ZodString;
829
- schema: z.ZodString;
830
- available_instruments: z.ZodArray<z.ZodObject<{
938
+ methods: z.ZodArray<z.ZodType<OpenUnionOutput<"id", readonly [z.ZodObject<{
939
+ id: z.ZodLiteral<"stripe_shared_payment_token">;
940
+ handler: z.ZodObject<{
941
+ id: z.ZodString;
831
942
  type: z.ZodString;
832
- config: z.ZodOptional<z.ZodType<Record<string, unknown>, unknown, z.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
943
+ version: z.ZodString;
944
+ spec: z.ZodString;
945
+ schema: z.ZodString;
946
+ available_instruments: z.ZodArray<z.ZodObject<{
947
+ type: z.ZodString;
948
+ config: z.ZodOptional<z.ZodType<Record<string, unknown>, unknown, z.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
949
+ }, z.core.$strip>>;
950
+ config: z.ZodObject<{
951
+ environment: z.ZodType<(string & {}) | "livemode" | "testmode", unknown, z.core.$ZodTypeInternals<(string & {}) | "livemode" | "testmode", unknown>>;
952
+ business_profile: z.ZodString;
953
+ }, z.core.$strip>;
954
+ }, z.core.$strip>;
955
+ limits: z.ZodObject<{
956
+ maxAmount: z.ZodNumber;
957
+ currency: z.ZodString;
958
+ expiresAt: z.ZodString;
959
+ }, z.core.$strip>;
960
+ }, z.core.$strip>, z.ZodObject<{
961
+ id: z.ZodLiteral<"stripe_alipay_wechat_pay">;
962
+ open: z.ZodBoolean;
963
+ current: z.ZodNullable<z.ZodType<(string & {}) | "wechat_pay" | "alipay", unknown, z.core.$ZodTypeInternals<(string & {}) | "wechat_pay" | "alipay", unknown>>>;
964
+ wechatPay: z.ZodNullable<z.ZodObject<{
965
+ qrData: z.ZodNullable<z.ZodString>;
966
+ qrImageUrl: z.ZodNullable<z.ZodString>;
967
+ url: z.ZodString;
833
968
  }, z.core.$strip>>;
834
- config: z.ZodObject<{
835
- environment: z.ZodType<(string & {}) | "livemode" | "testmode", unknown, z.core.$ZodTypeInternals<(string & {}) | "livemode" | "testmode", unknown>>;
836
- business_profile: z.ZodString;
969
+ alipay: z.ZodNullable<z.ZodObject<{
970
+ url: z.ZodString;
971
+ }, z.core.$strip>>;
972
+ }, z.core.$strip>]>, unknown, z.core.$ZodTypeInternals<OpenUnionOutput<"id", readonly [z.ZodObject<{
973
+ id: z.ZodLiteral<"stripe_shared_payment_token">;
974
+ handler: z.ZodObject<{
975
+ id: z.ZodString;
976
+ type: z.ZodString;
977
+ version: z.ZodString;
978
+ spec: z.ZodString;
979
+ schema: z.ZodString;
980
+ available_instruments: z.ZodArray<z.ZodObject<{
981
+ type: z.ZodString;
982
+ config: z.ZodOptional<z.ZodType<Record<string, unknown>, unknown, z.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
983
+ }, z.core.$strip>>;
984
+ config: z.ZodObject<{
985
+ environment: z.ZodType<(string & {}) | "livemode" | "testmode", unknown, z.core.$ZodTypeInternals<(string & {}) | "livemode" | "testmode", unknown>>;
986
+ business_profile: z.ZodString;
987
+ }, z.core.$strip>;
837
988
  }, z.core.$strip>;
838
- }, z.core.$strip>>;
839
- credentialLimits: z.ZodNullable<z.ZodObject<{
840
- maxAmount: z.ZodNumber;
841
- currency: z.ZodString;
842
- expiresAt: z.ZodString;
843
- }, z.core.$strip>>;
844
- wallets: z.ZodNullable<z.ZodObject<{
989
+ limits: z.ZodObject<{
990
+ maxAmount: z.ZodNumber;
991
+ currency: z.ZodString;
992
+ expiresAt: z.ZodString;
993
+ }, z.core.$strip>;
994
+ }, z.core.$strip>, z.ZodObject<{
995
+ id: z.ZodLiteral<"stripe_alipay_wechat_pay">;
845
996
  open: z.ZodBoolean;
846
997
  current: z.ZodNullable<z.ZodType<(string & {}) | "wechat_pay" | "alipay", unknown, z.core.$ZodTypeInternals<(string & {}) | "wechat_pay" | "alipay", unknown>>>;
847
998
  wechatPay: z.ZodNullable<z.ZodObject<{
@@ -852,11 +1003,11 @@ declare const MCP_OUTPUT: {
852
1003
  alipay: z.ZodNullable<z.ZodObject<{
853
1004
  url: z.ZodString;
854
1005
  }, z.core.$strip>>;
855
- }, z.core.$strip>>;
1006
+ }, z.core.$strip>]>, unknown>>>;
856
1007
  }, z.core.$strip>;
857
1008
  cancel: z.ZodObject<{
858
1009
  available: z.ZodBoolean;
859
- reason: z.ZodType<(string & {}) | "non_refundable" | "needs_attention" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown, z.core.$ZodTypeInternals<(string & {}) | "non_refundable" | "needs_attention" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown>>;
1010
+ reason: z.ZodType<(string & {}) | "non_refundable" | "needs_attention" | "unpaid" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown, z.core.$ZodTypeInternals<(string & {}) | "non_refundable" | "needs_attention" | "unpaid" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown>>;
860
1011
  penalty: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
861
1012
  refund: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
862
1013
  }, z.core.$strip>;
@@ -1004,27 +1155,64 @@ declare const MCP_OUTPUT: {
1004
1155
  chargeCurrency: z.ZodString;
1005
1156
  localCurrencyAtCheckout: z.ZodBoolean;
1006
1157
  localCharge: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
1007
- handlers: z.ZodArray<z.ZodObject<{
1008
- id: z.ZodString;
1009
- type: z.ZodString;
1010
- version: z.ZodString;
1011
- spec: z.ZodString;
1012
- schema: z.ZodString;
1013
- available_instruments: z.ZodArray<z.ZodObject<{
1158
+ methods: z.ZodArray<z.ZodType<OpenUnionOutput<"id", readonly [z.ZodObject<{
1159
+ id: z.ZodLiteral<"stripe_shared_payment_token">;
1160
+ handler: z.ZodObject<{
1161
+ id: z.ZodString;
1014
1162
  type: z.ZodString;
1015
- config: z.ZodOptional<z.ZodType<Record<string, unknown>, unknown, z.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
1163
+ version: z.ZodString;
1164
+ spec: z.ZodString;
1165
+ schema: z.ZodString;
1166
+ available_instruments: z.ZodArray<z.ZodObject<{
1167
+ type: z.ZodString;
1168
+ config: z.ZodOptional<z.ZodType<Record<string, unknown>, unknown, z.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
1169
+ }, z.core.$strip>>;
1170
+ config: z.ZodObject<{
1171
+ environment: z.ZodType<(string & {}) | "livemode" | "testmode", unknown, z.core.$ZodTypeInternals<(string & {}) | "livemode" | "testmode", unknown>>;
1172
+ business_profile: z.ZodString;
1173
+ }, z.core.$strip>;
1174
+ }, z.core.$strip>;
1175
+ limits: z.ZodObject<{
1176
+ maxAmount: z.ZodNumber;
1177
+ currency: z.ZodString;
1178
+ expiresAt: z.ZodString;
1179
+ }, z.core.$strip>;
1180
+ }, z.core.$strip>, z.ZodObject<{
1181
+ id: z.ZodLiteral<"stripe_alipay_wechat_pay">;
1182
+ open: z.ZodBoolean;
1183
+ current: z.ZodNullable<z.ZodType<(string & {}) | "wechat_pay" | "alipay", unknown, z.core.$ZodTypeInternals<(string & {}) | "wechat_pay" | "alipay", unknown>>>;
1184
+ wechatPay: z.ZodNullable<z.ZodObject<{
1185
+ qrData: z.ZodNullable<z.ZodString>;
1186
+ qrImageUrl: z.ZodNullable<z.ZodString>;
1187
+ url: z.ZodString;
1016
1188
  }, z.core.$strip>>;
1017
- config: z.ZodObject<{
1018
- environment: z.ZodType<(string & {}) | "livemode" | "testmode", unknown, z.core.$ZodTypeInternals<(string & {}) | "livemode" | "testmode", unknown>>;
1019
- business_profile: z.ZodString;
1189
+ alipay: z.ZodNullable<z.ZodObject<{
1190
+ url: z.ZodString;
1191
+ }, z.core.$strip>>;
1192
+ }, z.core.$strip>]>, unknown, z.core.$ZodTypeInternals<OpenUnionOutput<"id", readonly [z.ZodObject<{
1193
+ id: z.ZodLiteral<"stripe_shared_payment_token">;
1194
+ handler: z.ZodObject<{
1195
+ id: z.ZodString;
1196
+ type: z.ZodString;
1197
+ version: z.ZodString;
1198
+ spec: z.ZodString;
1199
+ schema: z.ZodString;
1200
+ available_instruments: z.ZodArray<z.ZodObject<{
1201
+ type: z.ZodString;
1202
+ config: z.ZodOptional<z.ZodType<Record<string, unknown>, unknown, z.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
1203
+ }, z.core.$strip>>;
1204
+ config: z.ZodObject<{
1205
+ environment: z.ZodType<(string & {}) | "livemode" | "testmode", unknown, z.core.$ZodTypeInternals<(string & {}) | "livemode" | "testmode", unknown>>;
1206
+ business_profile: z.ZodString;
1207
+ }, z.core.$strip>;
1020
1208
  }, z.core.$strip>;
1021
- }, z.core.$strip>>;
1022
- credentialLimits: z.ZodNullable<z.ZodObject<{
1023
- maxAmount: z.ZodNumber;
1024
- currency: z.ZodString;
1025
- expiresAt: z.ZodString;
1026
- }, z.core.$strip>>;
1027
- wallets: z.ZodNullable<z.ZodObject<{
1209
+ limits: z.ZodObject<{
1210
+ maxAmount: z.ZodNumber;
1211
+ currency: z.ZodString;
1212
+ expiresAt: z.ZodString;
1213
+ }, z.core.$strip>;
1214
+ }, z.core.$strip>, z.ZodObject<{
1215
+ id: z.ZodLiteral<"stripe_alipay_wechat_pay">;
1028
1216
  open: z.ZodBoolean;
1029
1217
  current: z.ZodNullable<z.ZodType<(string & {}) | "wechat_pay" | "alipay", unknown, z.core.$ZodTypeInternals<(string & {}) | "wechat_pay" | "alipay", unknown>>>;
1030
1218
  wechatPay: z.ZodNullable<z.ZodObject<{
@@ -1035,11 +1223,11 @@ declare const MCP_OUTPUT: {
1035
1223
  alipay: z.ZodNullable<z.ZodObject<{
1036
1224
  url: z.ZodString;
1037
1225
  }, z.core.$strip>>;
1038
- }, z.core.$strip>>;
1226
+ }, z.core.$strip>]>, unknown>>>;
1039
1227
  }, z.core.$strip>;
1040
1228
  cancel: z.ZodObject<{
1041
1229
  available: z.ZodBoolean;
1042
- reason: z.ZodType<(string & {}) | "non_refundable" | "needs_attention" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown, z.core.$ZodTypeInternals<(string & {}) | "non_refundable" | "needs_attention" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown>>;
1230
+ reason: z.ZodType<(string & {}) | "non_refundable" | "needs_attention" | "unpaid" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown, z.core.$ZodTypeInternals<(string & {}) | "non_refundable" | "needs_attention" | "unpaid" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown>>;
1043
1231
  penalty: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
1044
1232
  refund: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
1045
1233
  }, z.core.$strip>;
@@ -1062,15 +1250,13 @@ interface FlagSpec {
1062
1250
  * or `value` when it has one. A `string` flag whose field is an object or
1063
1251
  * a list of objects is one value the CLI parses into that shape:
1064
1252
  * `--point` `lat,lng`; `--room` `adults[:age,…]` (`2:6,9` is two adults
1065
- * and children of 6 and 9); `--price-max-per-room-night` a USD amount;
1066
- * `--guest` `room:first:last`, into that room's guests.
1253
+ * and children of 6 and 9); `--price-max-per-room-night` an amount in
1254
+ * the request's currency; `--guest` `room:first:last`, into that room's
1255
+ * guests.
1067
1256
  */
1068
1257
  type: "string" | "number" | "boolean";
1069
1258
  /** Given once per item; its field is a list. */
1070
1259
  multiple?: boolean;
1071
- /** The command runs without it though the tool needs its field:
1072
- * `orders cancel` without `--max-penalty` cancels nothing. */
1073
- optional?: boolean;
1074
1260
  /** What a `boolean` flag sends when its field isn't boolean:
1075
1261
  * `--rooms` sends `include: "rooms"`. */
1076
1262
  value?: string;
@@ -1090,12 +1276,10 @@ interface FlagSpec {
1090
1276
  }
1091
1277
  /** An argument given by position. */
1092
1278
  interface PositionalSpec {
1093
- /** As help shows it: `<hotelId>`, or `[topic]` when optional. */
1279
+ /** As help shows it: `<hotelId>`. */
1094
1280
  name: string;
1095
- /** The input field it sets; `null` for one the CLI reads itself. */
1096
- field: string | null;
1097
- /** Can be left out. */
1098
- optional?: boolean;
1281
+ /** The input field it sets. */
1282
+ field: string;
1099
1283
  description: string;
1100
1284
  }
1101
1285
  /** An option of the CLI itself that no tool takes: not a field of any input. */
@@ -1118,7 +1302,7 @@ interface CommandSpec {
1118
1302
  /** The group it is typed after; `null` for a command typed on its own. */
1119
1303
  group: CommandGroupSpec["name"] | null;
1120
1304
  /** Unique within its group. */
1121
- name: "search" | "get" | "offers" | "book" | "list" | "cancel" | "pay" | "login" | "logout" | "whoami" | "guide" | "mcp";
1305
+ name: "search" | "get" | "offers" | "book" | "list" | "cancel" | "pay" | "login" | "logout" | "whoami" | "mcp";
1122
1306
  summary: string;
1123
1307
  /** The MCP tool the command mirrors; `null` for one that is the CLI's own. */
1124
1308
  tool: ToolName | null;
@@ -1148,8 +1332,11 @@ type Money = {
1148
1332
  currency: string;
1149
1333
  };
1150
1334
  declare const money: z.ZodType<Money>;
1151
- /** A Money a caller sends: USD only, no unknown fields. */
1152
- declare const usdMoney: z.ZodType<Money>;
1335
+ /**
1336
+ * A Money a caller sends: USD or CNY, no unknown fields. `name` is the field
1337
+ * it is the value of, which the refusal names.
1338
+ */
1339
+ declare function requestMoney(name: string): z.ZodType<Money>;
1153
1340
  declare function formatMoney(m: Money): string;
1154
1341
 
1155
1342
  /** RFC 3339 in UTC, ending in `Z`; names for these fields end in `At`. */
@@ -1298,7 +1485,7 @@ declare function createSearchHotelsInput(now?: () => number): z.ZodObject<{
1298
1485
  en: "en";
1299
1486
  zh: "zh";
1300
1487
  }>>;
1301
- displayCurrency: z.ZodOptional<z.ZodEnum<{
1488
+ currency: z.ZodOptional<z.ZodEnum<{
1302
1489
  USD: "USD";
1303
1490
  CNY: "CNY";
1304
1491
  }>>;
@@ -1384,7 +1571,7 @@ declare const searchHotelsInput: z.ZodObject<{
1384
1571
  en: "en";
1385
1572
  zh: "zh";
1386
1573
  }>>;
1387
- displayCurrency: z.ZodOptional<z.ZodEnum<{
1574
+ currency: z.ZodOptional<z.ZodEnum<{
1388
1575
  USD: "USD";
1389
1576
  CNY: "CNY";
1390
1577
  }>>;
@@ -1422,7 +1609,7 @@ declare const hotelOffersInput: z.ZodObject<{
1422
1609
  en: "en";
1423
1610
  zh: "zh";
1424
1611
  }>>;
1425
- displayCurrency: z.ZodOptional<z.ZodEnum<{
1612
+ currency: z.ZodOptional<z.ZodEnum<{
1426
1613
  USD: "USD";
1427
1614
  CNY: "CNY";
1428
1615
  }>>;
@@ -1471,16 +1658,18 @@ declare const listOrdersInput: z.ZodObject<{
1471
1658
  }, z.core.$strict>;
1472
1659
  type ListOrdersInput = z.input<typeof listOrdersInput>;
1473
1660
  /** `POST /v1/orders/{orderId}/cancel` and the MCP `cancel_order` arguments:
1474
- * the order, and the penalty the user agreed to as a ceiling. The server
1661
+ * the order and, to cancel a paid order, the penalty the user agreed to as a
1662
+ * ceiling; an unpaid order is closed with the order alone. The server
1475
1663
  * computes the refund; a higher penalty now answers `cancellation_changed`. */
1476
1664
  declare const cancelOrderInput: z.ZodObject<{
1477
1665
  orderId: z.ZodString;
1478
- maximumPenalty: z.ZodNumber;
1666
+ maximumPenalty: z.ZodOptional<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
1479
1667
  }, z.core.$strict>;
1480
1668
  type CancelOrderInput = z.input<typeof cancelOrderInput>;
1481
- /** The ways an order is paid: the order's own link, a shared payment token
1482
- * through `pay_order`, or Alipay/WeChat Pay through `pay_order`. */
1483
- declare const PAY_WAYS: readonly ["payment_link", "shared_payment_token", "alipay_wechat_pay"];
1669
+ /** The ways an order is paid: the order's own link, or through `pay_order`
1670
+ * one of its `payment.methods`, by id (a shared payment token, or
1671
+ * Alipay/WeChat Pay). */
1672
+ declare const PAY_WAYS: readonly ["payment_link", "stripe_shared_payment_token", "stripe_alipay_wechat_pay"];
1484
1673
  type PayWay = (typeof PAY_WAYS)[number];
1485
1674
  /** The way each exclusive field of `payOrderInput` pays by. */
1486
1675
  declare const PAY_INPUT_WAYS: Record<"sharedPaymentToken" | "payment" | "method", PayWay>;
@@ -1508,7 +1697,7 @@ declare const payOrderInput: z.ZodObject<{
1508
1697
  }, z.core.$loose>>;
1509
1698
  }, z.core.$strict>>;
1510
1699
  method: z.ZodOptional<z.ZodEnum<{
1511
- alipay_wechat_pay: "alipay_wechat_pay";
1700
+ stripe_alipay_wechat_pay: "stripe_alipay_wechat_pay";
1512
1701
  }>>;
1513
1702
  total: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
1514
1703
  }, z.core.$strict>;
@@ -1548,7 +1737,7 @@ declare const LIMITS: {
1548
1737
  readonly tokenPaymentMaxUsd: 500;
1549
1738
  /** Minutes that must be left before the order's payment window closes
1550
1739
  * (`payment.expiresAt`) for the order to offer a token or wallet payment
1551
- * (`payment.handlers`, `payment.wallets`). */
1740
+ * (an entry of `payment.methods`). */
1552
1741
  readonly payMinMinutesLeft: 15;
1553
1742
  /** `pay_order` refuses (`order_not_payable`), by token or wallet, when the
1554
1743
  * order's payment window (`payment.expiresAt`) closes within this many
@@ -1560,8 +1749,9 @@ declare const LIMITS: {
1560
1749
  * and party); past it, ordering the stay answers `order_exists`. */
1561
1750
  readonly ordersPerStay: 20;
1562
1751
  };
1563
- /** Currencies a v1 response can show prices in (USD is also what is paid). */
1564
- declare const DISPLAY_CURRENCIES: readonly ["USD", "CNY"];
1752
+ /** Currencies a v1 request can price and charge in (USD is the default). */
1753
+ declare const CURRENCIES: readonly ["USD", "CNY"];
1754
+ type Currency = (typeof CURRENCIES)[number];
1565
1755
  /** Where a person goes when an agent gets stuck. */
1566
1756
  declare const SUPPORT_EMAIL = "info@fortrip.ai";
1567
1757
 
@@ -1628,7 +1818,7 @@ declare const stayEcho: z.ZodObject<{
1628
1818
  }, z.core.$strip>;
1629
1819
 
1630
1820
  /** Every code the v1 error envelope can carry (spec §11). */
1631
- 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" | "cancellation_changed" | "order_not_cancellable" | "order_not_payable" | "payment_in_progress" | "payment_total_changed" | "payment_credential_invalid" | "payment_declined" | "payment_action_required" | "payment_method_unavailable" | "destination_ambiguous" | "destination_not_found" | "search_too_broad" | "stay_unsupported" | "stay_in_past" | "offer_unavailable" | "rate_limited" | "ordering_paused" | "service_unavailable" | "supplier_unavailable" | "internal";
1821
+ 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" | "cancellation_changed" | "order_not_cancellable" | "order_not_payable" | "payment_in_progress" | "payment_total_changed" | "payment_credential_invalid" | "payment_declined" | "payment_action_required" | "payment_method_unavailable" | "destination_ambiguous" | "destination_not_found" | "search_too_broad" | "stay_unsupported" | "stay_in_past" | "offer_unavailable" | "currency_unavailable" | "rate_limited" | "ordering_paused" | "service_unavailable" | "supplier_unavailable" | "internal";
1632
1822
  /** The statuses `supplier_unavailable` is sent with (by its `details.outcome`:
1633
1823
  * `SUPPLIER_OUTCOME_STATUS`). */
1634
1824
  declare const SUPPLIER_STATUSES: readonly [503, 504];
@@ -1896,11 +2086,6 @@ declare const ERROR_DETAILS: {
1896
2086
  price: z.ZodObject<{
1897
2087
  total: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
1898
2088
  perNightAllRooms: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
1899
- approx: z.ZodNullable<z.ZodObject<{
1900
- total: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
1901
- perNightAllRooms: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
1902
- rateDate: z.ZodString;
1903
- }, z.core.$strip>>;
1904
2089
  payAtProperty: z.ZodObject<{
1905
2090
  disclosure: z.ZodType<(string & {}) | "complete" | "incomplete", unknown, z.core.$ZodTypeInternals<(string & {}) | "complete" | "incomplete", unknown>>;
1906
2091
  items: z.ZodArray<z.ZodObject<{
@@ -1946,7 +2131,7 @@ declare const ERROR_DETAILS: {
1946
2131
  }, z.core.$strip>;
1947
2132
  cancellation_changed: null;
1948
2133
  order_not_cancellable: z.ZodObject<{
1949
- reason: z.ZodType<(string & {}) | "non_refundable" | "needs_attention" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown, z.core.$ZodTypeInternals<(string & {}) | "non_refundable" | "needs_attention" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown>>;
2134
+ reason: z.ZodType<(string & {}) | "non_refundable" | "needs_attention" | "unpaid" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown, z.core.$ZodTypeInternals<(string & {}) | "non_refundable" | "needs_attention" | "unpaid" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown>>;
1950
2135
  }, z.core.$strip>;
1951
2136
  order_not_payable: z.ZodObject<{
1952
2137
  orderId: z.ZodString;
@@ -2110,6 +2295,9 @@ declare const ERROR_DETAILS: {
2110
2295
  offerId: z.ZodString;
2111
2296
  reason: z.ZodType<(string & {}) | "sold_out" | "refused", unknown, z.core.$ZodTypeInternals<(string & {}) | "sold_out" | "refused", unknown>>;
2112
2297
  }, z.core.$strip>;
2298
+ currency_unavailable: z.ZodObject<{
2299
+ currency: z.ZodString;
2300
+ }, z.core.$strip>;
2113
2301
  rate_limited: z.ZodObject<{
2114
2302
  scope: z.ZodType<"search" | "hotel" | (string & {}) | "offers" | "orders_read" | "orders_create" | "orders_cancel" | "orders_pay", unknown, z.core.$ZodTypeInternals<"search" | "hotel" | (string & {}) | "offers" | "orders_read" | "orders_create" | "orders_cancel" | "orders_pay", unknown>>;
2115
2303
  }, z.core.$strip>;
@@ -2338,11 +2526,6 @@ declare const offer: z.ZodObject<{
2338
2526
  price: z.ZodObject<{
2339
2527
  total: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
2340
2528
  perNightAllRooms: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
2341
- approx: z.ZodNullable<z.ZodObject<{
2342
- total: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
2343
- perNightAllRooms: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
2344
- rateDate: z.ZodString;
2345
- }, z.core.$strip>>;
2346
2529
  payAtProperty: z.ZodObject<{
2347
2530
  disclosure: z.ZodType<(string & {}) | "complete" | "incomplete", unknown, z.core.$ZodTypeInternals<(string & {}) | "complete" | "incomplete", unknown>>;
2348
2531
  items: z.ZodArray<z.ZodObject<{
@@ -2438,11 +2621,6 @@ declare const hotelOffersResult: z.ZodObject<{
2438
2621
  price: z.ZodObject<{
2439
2622
  total: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
2440
2623
  perNightAllRooms: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
2441
- approx: z.ZodNullable<z.ZodObject<{
2442
- total: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
2443
- perNightAllRooms: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
2444
- rateDate: z.ZodString;
2445
- }, z.core.$strip>>;
2446
2624
  payAtProperty: z.ZodObject<{
2447
2625
  disclosure: z.ZodType<(string & {}) | "complete" | "incomplete", unknown, z.core.$ZodTypeInternals<(string & {}) | "complete" | "incomplete", unknown>>;
2448
2626
  items: z.ZodArray<z.ZodObject<{
@@ -2498,11 +2676,12 @@ declare const ORDER_STATUSES: readonly ["awaiting_payment", "expired", "confirmi
2498
2676
  type OrderStatus = (typeof ORDER_STATUSES)[number];
2499
2677
  declare const PAYMENT_STATUSES: readonly ["unpaid", "authorized", "paid", "released", "refund_pending", "refunded"];
2500
2678
  type PaymentStatus = (typeof PAYMENT_STATUSES)[number];
2501
- /** Why an order can or can't be cancelled now: `cancellable` when it
2502
- * can, else the first reason that holds. `non_refundable` is a rate the
2503
- * hotel takes no cancellation for; `refused`, a cancellation the hotel
2504
- * refused, the booking standing as it was. */
2505
- declare const CANCEL_REASONS: readonly ["cancellable", "already_cancelled", "in_progress", "not_confirmed", "stay_started", "non_refundable", "refused", "terms_unknown", "needs_attention"];
2679
+ /** Why an order can or can't be cancelled now: `cancellable` when a paid
2680
+ * order can, `unpaid` when an unpaid one can be closed instead, else the
2681
+ * first reason that holds. `non_refundable` is a rate the hotel takes no
2682
+ * cancellation for; `refused`, a cancellation the hotel refused, the
2683
+ * booking standing as it was. */
2684
+ declare const CANCEL_REASONS: readonly ["cancellable", "unpaid", "already_cancelled", "in_progress", "not_confirmed", "stay_started", "non_refundable", "refused", "terms_unknown", "needs_attention"];
2506
2685
  type CancelReason = (typeof CANCEL_REASONS)[number];
2507
2686
  /** Why a shared payment token can't pay an order. */
2508
2687
  declare const CREDENTIAL_INVALID_REASONS: readonly ["not_found", "currency", "amount", "expired", "deactivated", "used", "other_seller"];
@@ -2531,6 +2710,81 @@ declare const paymentHandler: z.ZodObject<{
2531
2710
  }, z.core.$strip>;
2532
2711
  }, z.core.$strip>;
2533
2712
  type PaymentHandler = z.infer<typeof paymentHandler>;
2713
+ /** The ids of `payment.methods`: the ways `pay_order` can pay an order. */
2714
+ declare const PAYMENT_METHOD_IDS: readonly ["stripe_shared_payment_token", "stripe_alipay_wechat_pay"];
2715
+ type PaymentMethodId = (typeof PAYMENT_METHOD_IDS)[number];
2716
+ /** A way `pay_order` can pay an order other than its link, by `id`: an
2717
+ * open union, so a later method is an entry with a new id. */
2718
+ declare const paymentMethod: z.ZodType<OpenUnionOutput<"id", readonly [z.ZodObject<{
2719
+ id: z.ZodLiteral<"stripe_shared_payment_token">;
2720
+ handler: z.ZodObject<{
2721
+ id: z.ZodString;
2722
+ type: z.ZodString;
2723
+ version: z.ZodString;
2724
+ spec: z.ZodString;
2725
+ schema: z.ZodString;
2726
+ available_instruments: z.ZodArray<z.ZodObject<{
2727
+ type: z.ZodString;
2728
+ config: z.ZodOptional<z.ZodType<Record<string, unknown>, unknown, z.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
2729
+ }, z.core.$strip>>;
2730
+ config: z.ZodObject<{
2731
+ environment: z.ZodType<(string & {}) | "livemode" | "testmode", unknown, z.core.$ZodTypeInternals<(string & {}) | "livemode" | "testmode", unknown>>;
2732
+ business_profile: z.ZodString;
2733
+ }, z.core.$strip>;
2734
+ }, z.core.$strip>;
2735
+ limits: z.ZodObject<{
2736
+ maxAmount: z.ZodNumber;
2737
+ currency: z.ZodString;
2738
+ expiresAt: z.ZodString;
2739
+ }, z.core.$strip>;
2740
+ }, z.core.$strip>, z.ZodObject<{
2741
+ id: z.ZodLiteral<"stripe_alipay_wechat_pay">;
2742
+ open: z.ZodBoolean;
2743
+ current: z.ZodNullable<z.ZodType<(string & {}) | "wechat_pay" | "alipay", unknown, z.core.$ZodTypeInternals<(string & {}) | "wechat_pay" | "alipay", unknown>>>;
2744
+ wechatPay: z.ZodNullable<z.ZodObject<{
2745
+ qrData: z.ZodNullable<z.ZodString>;
2746
+ qrImageUrl: z.ZodNullable<z.ZodString>;
2747
+ url: z.ZodString;
2748
+ }, z.core.$strip>>;
2749
+ alipay: z.ZodNullable<z.ZodObject<{
2750
+ url: z.ZodString;
2751
+ }, z.core.$strip>>;
2752
+ }, z.core.$strip>]>, unknown, z.core.$ZodTypeInternals<OpenUnionOutput<"id", readonly [z.ZodObject<{
2753
+ id: z.ZodLiteral<"stripe_shared_payment_token">;
2754
+ handler: z.ZodObject<{
2755
+ id: z.ZodString;
2756
+ type: z.ZodString;
2757
+ version: z.ZodString;
2758
+ spec: z.ZodString;
2759
+ schema: z.ZodString;
2760
+ available_instruments: z.ZodArray<z.ZodObject<{
2761
+ type: z.ZodString;
2762
+ config: z.ZodOptional<z.ZodType<Record<string, unknown>, unknown, z.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
2763
+ }, z.core.$strip>>;
2764
+ config: z.ZodObject<{
2765
+ environment: z.ZodType<(string & {}) | "livemode" | "testmode", unknown, z.core.$ZodTypeInternals<(string & {}) | "livemode" | "testmode", unknown>>;
2766
+ business_profile: z.ZodString;
2767
+ }, z.core.$strip>;
2768
+ }, z.core.$strip>;
2769
+ limits: z.ZodObject<{
2770
+ maxAmount: z.ZodNumber;
2771
+ currency: z.ZodString;
2772
+ expiresAt: z.ZodString;
2773
+ }, z.core.$strip>;
2774
+ }, z.core.$strip>, z.ZodObject<{
2775
+ id: z.ZodLiteral<"stripe_alipay_wechat_pay">;
2776
+ open: z.ZodBoolean;
2777
+ current: z.ZodNullable<z.ZodType<(string & {}) | "wechat_pay" | "alipay", unknown, z.core.$ZodTypeInternals<(string & {}) | "wechat_pay" | "alipay", unknown>>>;
2778
+ wechatPay: z.ZodNullable<z.ZodObject<{
2779
+ qrData: z.ZodNullable<z.ZodString>;
2780
+ qrImageUrl: z.ZodNullable<z.ZodString>;
2781
+ url: z.ZodString;
2782
+ }, z.core.$strip>>;
2783
+ alipay: z.ZodNullable<z.ZodObject<{
2784
+ url: z.ZodString;
2785
+ }, z.core.$strip>>;
2786
+ }, z.core.$strip>]>, unknown>>;
2787
+ type PaymentMethod = z.infer<typeof paymentMethod>;
2534
2788
  /** `FT-` and six characters with no 0, 1, I or O. */
2535
2789
  declare const orderReference: z.ZodString;
2536
2790
  declare const order: z.ZodObject<{
@@ -2675,27 +2929,64 @@ declare const order: z.ZodObject<{
2675
2929
  chargeCurrency: z.ZodString;
2676
2930
  localCurrencyAtCheckout: z.ZodBoolean;
2677
2931
  localCharge: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
2678
- handlers: z.ZodArray<z.ZodObject<{
2679
- id: z.ZodString;
2680
- type: z.ZodString;
2681
- version: z.ZodString;
2682
- spec: z.ZodString;
2683
- schema: z.ZodString;
2684
- available_instruments: z.ZodArray<z.ZodObject<{
2932
+ methods: z.ZodArray<z.ZodType<OpenUnionOutput<"id", readonly [z.ZodObject<{
2933
+ id: z.ZodLiteral<"stripe_shared_payment_token">;
2934
+ handler: z.ZodObject<{
2935
+ id: z.ZodString;
2685
2936
  type: z.ZodString;
2686
- config: z.ZodOptional<z.ZodType<Record<string, unknown>, unknown, z.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
2937
+ version: z.ZodString;
2938
+ spec: z.ZodString;
2939
+ schema: z.ZodString;
2940
+ available_instruments: z.ZodArray<z.ZodObject<{
2941
+ type: z.ZodString;
2942
+ config: z.ZodOptional<z.ZodType<Record<string, unknown>, unknown, z.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
2943
+ }, z.core.$strip>>;
2944
+ config: z.ZodObject<{
2945
+ environment: z.ZodType<(string & {}) | "livemode" | "testmode", unknown, z.core.$ZodTypeInternals<(string & {}) | "livemode" | "testmode", unknown>>;
2946
+ business_profile: z.ZodString;
2947
+ }, z.core.$strip>;
2948
+ }, z.core.$strip>;
2949
+ limits: z.ZodObject<{
2950
+ maxAmount: z.ZodNumber;
2951
+ currency: z.ZodString;
2952
+ expiresAt: z.ZodString;
2953
+ }, z.core.$strip>;
2954
+ }, z.core.$strip>, z.ZodObject<{
2955
+ id: z.ZodLiteral<"stripe_alipay_wechat_pay">;
2956
+ open: z.ZodBoolean;
2957
+ current: z.ZodNullable<z.ZodType<(string & {}) | "wechat_pay" | "alipay", unknown, z.core.$ZodTypeInternals<(string & {}) | "wechat_pay" | "alipay", unknown>>>;
2958
+ wechatPay: z.ZodNullable<z.ZodObject<{
2959
+ qrData: z.ZodNullable<z.ZodString>;
2960
+ qrImageUrl: z.ZodNullable<z.ZodString>;
2961
+ url: z.ZodString;
2687
2962
  }, z.core.$strip>>;
2688
- config: z.ZodObject<{
2689
- environment: z.ZodType<(string & {}) | "livemode" | "testmode", unknown, z.core.$ZodTypeInternals<(string & {}) | "livemode" | "testmode", unknown>>;
2690
- business_profile: z.ZodString;
2963
+ alipay: z.ZodNullable<z.ZodObject<{
2964
+ url: z.ZodString;
2965
+ }, z.core.$strip>>;
2966
+ }, z.core.$strip>]>, unknown, z.core.$ZodTypeInternals<OpenUnionOutput<"id", readonly [z.ZodObject<{
2967
+ id: z.ZodLiteral<"stripe_shared_payment_token">;
2968
+ handler: z.ZodObject<{
2969
+ id: z.ZodString;
2970
+ type: z.ZodString;
2971
+ version: z.ZodString;
2972
+ spec: z.ZodString;
2973
+ schema: z.ZodString;
2974
+ available_instruments: z.ZodArray<z.ZodObject<{
2975
+ type: z.ZodString;
2976
+ config: z.ZodOptional<z.ZodType<Record<string, unknown>, unknown, z.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
2977
+ }, z.core.$strip>>;
2978
+ config: z.ZodObject<{
2979
+ environment: z.ZodType<(string & {}) | "livemode" | "testmode", unknown, z.core.$ZodTypeInternals<(string & {}) | "livemode" | "testmode", unknown>>;
2980
+ business_profile: z.ZodString;
2981
+ }, z.core.$strip>;
2691
2982
  }, z.core.$strip>;
2692
- }, z.core.$strip>>;
2693
- credentialLimits: z.ZodNullable<z.ZodObject<{
2694
- maxAmount: z.ZodNumber;
2695
- currency: z.ZodString;
2696
- expiresAt: z.ZodString;
2697
- }, z.core.$strip>>;
2698
- wallets: z.ZodNullable<z.ZodObject<{
2983
+ limits: z.ZodObject<{
2984
+ maxAmount: z.ZodNumber;
2985
+ currency: z.ZodString;
2986
+ expiresAt: z.ZodString;
2987
+ }, z.core.$strip>;
2988
+ }, z.core.$strip>, z.ZodObject<{
2989
+ id: z.ZodLiteral<"stripe_alipay_wechat_pay">;
2699
2990
  open: z.ZodBoolean;
2700
2991
  current: z.ZodNullable<z.ZodType<(string & {}) | "wechat_pay" | "alipay", unknown, z.core.$ZodTypeInternals<(string & {}) | "wechat_pay" | "alipay", unknown>>>;
2701
2992
  wechatPay: z.ZodNullable<z.ZodObject<{
@@ -2706,11 +2997,11 @@ declare const order: z.ZodObject<{
2706
2997
  alipay: z.ZodNullable<z.ZodObject<{
2707
2998
  url: z.ZodString;
2708
2999
  }, z.core.$strip>>;
2709
- }, z.core.$strip>>;
3000
+ }, z.core.$strip>]>, unknown>>>;
2710
3001
  }, z.core.$strip>;
2711
3002
  cancel: z.ZodObject<{
2712
3003
  available: z.ZodBoolean;
2713
- reason: z.ZodType<(string & {}) | "non_refundable" | "needs_attention" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown, z.core.$ZodTypeInternals<(string & {}) | "non_refundable" | "needs_attention" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown>>;
3004
+ reason: z.ZodType<(string & {}) | "non_refundable" | "needs_attention" | "unpaid" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown, z.core.$ZodTypeInternals<(string & {}) | "non_refundable" | "needs_attention" | "unpaid" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown>>;
2714
3005
  penalty: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
2715
3006
  refund: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
2716
3007
  }, z.core.$strip>;
@@ -2861,27 +3152,64 @@ declare const orderList: z.ZodObject<{
2861
3152
  chargeCurrency: z.ZodString;
2862
3153
  localCurrencyAtCheckout: z.ZodBoolean;
2863
3154
  localCharge: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
2864
- handlers: z.ZodArray<z.ZodObject<{
2865
- id: z.ZodString;
2866
- type: z.ZodString;
2867
- version: z.ZodString;
2868
- spec: z.ZodString;
2869
- schema: z.ZodString;
2870
- available_instruments: z.ZodArray<z.ZodObject<{
3155
+ methods: z.ZodArray<z.ZodType<OpenUnionOutput<"id", readonly [z.ZodObject<{
3156
+ id: z.ZodLiteral<"stripe_shared_payment_token">;
3157
+ handler: z.ZodObject<{
3158
+ id: z.ZodString;
2871
3159
  type: z.ZodString;
2872
- config: z.ZodOptional<z.ZodType<Record<string, unknown>, unknown, z.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
3160
+ version: z.ZodString;
3161
+ spec: z.ZodString;
3162
+ schema: z.ZodString;
3163
+ available_instruments: z.ZodArray<z.ZodObject<{
3164
+ type: z.ZodString;
3165
+ config: z.ZodOptional<z.ZodType<Record<string, unknown>, unknown, z.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
3166
+ }, z.core.$strip>>;
3167
+ config: z.ZodObject<{
3168
+ environment: z.ZodType<(string & {}) | "livemode" | "testmode", unknown, z.core.$ZodTypeInternals<(string & {}) | "livemode" | "testmode", unknown>>;
3169
+ business_profile: z.ZodString;
3170
+ }, z.core.$strip>;
3171
+ }, z.core.$strip>;
3172
+ limits: z.ZodObject<{
3173
+ maxAmount: z.ZodNumber;
3174
+ currency: z.ZodString;
3175
+ expiresAt: z.ZodString;
3176
+ }, z.core.$strip>;
3177
+ }, z.core.$strip>, z.ZodObject<{
3178
+ id: z.ZodLiteral<"stripe_alipay_wechat_pay">;
3179
+ open: z.ZodBoolean;
3180
+ current: z.ZodNullable<z.ZodType<(string & {}) | "wechat_pay" | "alipay", unknown, z.core.$ZodTypeInternals<(string & {}) | "wechat_pay" | "alipay", unknown>>>;
3181
+ wechatPay: z.ZodNullable<z.ZodObject<{
3182
+ qrData: z.ZodNullable<z.ZodString>;
3183
+ qrImageUrl: z.ZodNullable<z.ZodString>;
3184
+ url: z.ZodString;
2873
3185
  }, z.core.$strip>>;
2874
- config: z.ZodObject<{
2875
- environment: z.ZodType<(string & {}) | "livemode" | "testmode", unknown, z.core.$ZodTypeInternals<(string & {}) | "livemode" | "testmode", unknown>>;
2876
- business_profile: z.ZodString;
3186
+ alipay: z.ZodNullable<z.ZodObject<{
3187
+ url: z.ZodString;
3188
+ }, z.core.$strip>>;
3189
+ }, z.core.$strip>]>, unknown, z.core.$ZodTypeInternals<OpenUnionOutput<"id", readonly [z.ZodObject<{
3190
+ id: z.ZodLiteral<"stripe_shared_payment_token">;
3191
+ handler: z.ZodObject<{
3192
+ id: z.ZodString;
3193
+ type: z.ZodString;
3194
+ version: z.ZodString;
3195
+ spec: z.ZodString;
3196
+ schema: z.ZodString;
3197
+ available_instruments: z.ZodArray<z.ZodObject<{
3198
+ type: z.ZodString;
3199
+ config: z.ZodOptional<z.ZodType<Record<string, unknown>, unknown, z.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
3200
+ }, z.core.$strip>>;
3201
+ config: z.ZodObject<{
3202
+ environment: z.ZodType<(string & {}) | "livemode" | "testmode", unknown, z.core.$ZodTypeInternals<(string & {}) | "livemode" | "testmode", unknown>>;
3203
+ business_profile: z.ZodString;
3204
+ }, z.core.$strip>;
2877
3205
  }, z.core.$strip>;
2878
- }, z.core.$strip>>;
2879
- credentialLimits: z.ZodNullable<z.ZodObject<{
2880
- maxAmount: z.ZodNumber;
2881
- currency: z.ZodString;
2882
- expiresAt: z.ZodString;
2883
- }, z.core.$strip>>;
2884
- wallets: z.ZodNullable<z.ZodObject<{
3206
+ limits: z.ZodObject<{
3207
+ maxAmount: z.ZodNumber;
3208
+ currency: z.ZodString;
3209
+ expiresAt: z.ZodString;
3210
+ }, z.core.$strip>;
3211
+ }, z.core.$strip>, z.ZodObject<{
3212
+ id: z.ZodLiteral<"stripe_alipay_wechat_pay">;
2885
3213
  open: z.ZodBoolean;
2886
3214
  current: z.ZodNullable<z.ZodType<(string & {}) | "wechat_pay" | "alipay", unknown, z.core.$ZodTypeInternals<(string & {}) | "wechat_pay" | "alipay", unknown>>>;
2887
3215
  wechatPay: z.ZodNullable<z.ZodObject<{
@@ -2892,11 +3220,11 @@ declare const orderList: z.ZodObject<{
2892
3220
  alipay: z.ZodNullable<z.ZodObject<{
2893
3221
  url: z.ZodString;
2894
3222
  }, z.core.$strip>>;
2895
- }, z.core.$strip>>;
3223
+ }, z.core.$strip>]>, unknown>>>;
2896
3224
  }, z.core.$strip>;
2897
3225
  cancel: z.ZodObject<{
2898
3226
  available: z.ZodBoolean;
2899
- reason: z.ZodType<(string & {}) | "non_refundable" | "needs_attention" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown, z.core.$ZodTypeInternals<(string & {}) | "non_refundable" | "needs_attention" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown>>;
3227
+ reason: z.ZodType<(string & {}) | "non_refundable" | "needs_attention" | "unpaid" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown, z.core.$ZodTypeInternals<(string & {}) | "non_refundable" | "needs_attention" | "unpaid" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown>>;
2900
3228
  penalty: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
2901
3229
  refund: z.ZodNullable<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
2902
3230
  }, z.core.$strip>;
@@ -3159,11 +3487,6 @@ declare const indicativePrice: z.ZodObject<{
3159
3487
  basis: z.ZodType<(string & {}) | "lowest_unit", unknown, z.core.$ZodTypeInternals<(string & {}) | "lowest_unit", unknown>>;
3160
3488
  fromPerRoomNight: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
3161
3489
  fromPerRoomStay: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
3162
- approx: z.ZodNullable<z.ZodObject<{
3163
- fromPerRoomNight: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
3164
- fromPerRoomStay: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
3165
- rateDate: z.ZodString;
3166
- }, z.core.$strip>>;
3167
3490
  }, z.core.$strip>;
3168
3491
  type IndicativePrice = z.infer<typeof indicativePrice>;
3169
3492
  declare const hotelSummary: z.ZodObject<{
@@ -3200,11 +3523,6 @@ declare const hotelSummary: z.ZodObject<{
3200
3523
  basis: z.ZodType<(string & {}) | "lowest_unit", unknown, z.core.$ZodTypeInternals<(string & {}) | "lowest_unit", unknown>>;
3201
3524
  fromPerRoomNight: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
3202
3525
  fromPerRoomStay: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
3203
- approx: z.ZodNullable<z.ZodObject<{
3204
- fromPerRoomNight: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
3205
- fromPerRoomStay: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
3206
- rateDate: z.ZodString;
3207
- }, z.core.$strip>>;
3208
3526
  }, z.core.$strip>>;
3209
3527
  /** The cover photo; `null` without one. */
3210
3528
  photo: z.ZodNullable<z.ZodObject<{
@@ -3470,11 +3788,6 @@ declare const searchResult: z.ZodObject<{
3470
3788
  basis: z.ZodType<(string & {}) | "lowest_unit", unknown, z.core.$ZodTypeInternals<(string & {}) | "lowest_unit", unknown>>;
3471
3789
  fromPerRoomNight: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
3472
3790
  fromPerRoomStay: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
3473
- approx: z.ZodNullable<z.ZodObject<{
3474
- fromPerRoomNight: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
3475
- fromPerRoomStay: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
3476
- rateDate: z.ZodString;
3477
- }, z.core.$strip>>;
3478
3791
  }, z.core.$strip>>;
3479
3792
  /** The cover photo; `null` without one. */
3480
3793
  photo: z.ZodNullable<z.ZodObject<{
@@ -3524,8 +3837,8 @@ declare const SKILL_INSTALL_COMMAND = "npx skills add FortripEngineering/fortrip
3524
3837
  declare const REPOSITORY_URL = "https://github.com/FortripEngineering/fortrip";
3525
3838
  declare const DOCS_ORIGIN = "https://docs.fortrip.ai";
3526
3839
 
3527
- /** The tools that are HTTP endpoints: all but the guide, which is MCP-only. */
3528
- type HttpToolName = Exclude<ToolName, "get_planning_guide">;
3840
+ /** The tools that are HTTP endpoints: every tool. */
3841
+ type HttpToolName = ToolName;
3529
3842
  interface HttpRoute {
3530
3843
  method: "GET" | "POST";
3531
3844
  /** An OpenAPI path template, e.g. `/v1/orders/{orderId}/pay`. */
@@ -3560,19 +3873,22 @@ declare const RATE_LIMITS: Record<RateLimitScope, {
3560
3873
  * (`cli`). */
3561
3874
  declare function renderError(envelope: unknown, status?: number, surface?: RenderSurface): string;
3562
3875
 
3563
- type RenderedTool = Exclude<ToolName, "get_planning_guide">;
3876
+ type RenderedTool = ToolName;
3564
3877
  /**
3565
3878
  * Renders `data`, the answer of `tool`, after parsing it with the tool's
3566
3879
  * open output schema: unknown fields are ignored and unknown values shown
3567
3880
  * as they came. A result that does not parse is shown as JSON, never thrown.
3568
3881
  * The consent rule (`ORDER_NEXT_STEP`) is the last paragraph whenever the
3569
3882
  * result holds a non-null `payment.url`; the pay rule (`PAY_NEXT_STEP`)
3570
- * follows it when a result holds an order with non-empty `payment.handlers`;
3571
- * the wallet rule (`WALLET_NEXT_STEP`) follows that when it holds an order
3572
- * whose `payment.wallets` is offered and not open;
3883
+ * follows it when a result holds an order whose `payment.methods` has the
3884
+ * `stripe_shared_payment_token` entry; the wallet rule (`WALLET_NEXT_STEP`)
3885
+ * follows that when it holds an order whose `stripe_alipay_wechat_pay` entry
3886
+ * is not open;
3573
3887
  * the cancel rule (`CANCEL_NEXT_STEP`) follows it when a `get_order` or
3574
- * `list_orders` result holds an order with `cancel.available`. `surface`
3575
- * names the next calls: tools (`mcp`, the default) or commands (`cli`).
3888
+ * `list_orders` result holds an order with `cancel.available`, other than
3889
+ * an unpaid one (`cancel.reason` `unpaid`), which is closed with no
3890
+ * penalty. `surface` names the next calls: tools (`mcp`, the default) or
3891
+ * commands (`cli`).
3576
3892
  */
3577
3893
  declare function renderToolResult(tool: RenderedTool, data: unknown, surface?: RenderSurface): string;
3578
3894
 
@@ -3611,4 +3927,4 @@ declare const ME_SCOPES: {
3611
3927
  /** The contract's version, from package.json, the one place a release bumps it. */
3612
3928
  declare const CONTRACT_VERSION: string;
3613
3929
 
3614
- export { ACCOUNT_ROUTES, AMENITY_CODES, API, type AmenityCode, type AuthConfig, CANCEL_NEXT_STEP, CANCEL_REASONS, CARD_NUMBER_MESSAGE, CENTER_BASES, COMMANDS, COMMAND_GROUPS, CONTRACT_VERSION, CREDENTIAL_INVALID_REASONS, type CancelOrderInput, type CancelReason, type Center, type CommandGroupSpec, type CommandSpec, type CreateOrderInput, type CredentialInvalidReason, DISPLAY_CURRENCIES, DOCS_ORIGIN, 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, HTTP_ROUTES, type Hotel, type HotelOffersInput, type HotelOffersResult, type HotelSummary, type HttpRoute, type HttpToolName, type IndicativePrice, type KnownErrorBody, LIMITS, type ListOrdersInput, MCP_OUTPUT, MCP_PATH, MCP_SERVER_URL, ME_SCOPES, type MeResult, type Money, ORDER_HTTP, ORDER_NEXT_STEP, ORDER_STATUSES, type Offer, type OfferChange, type Omitted, type OptionSpec, type Order, type OrderList, type OrderStatus, PAYMENT_STATUSES, PAY_INPUT_WAYS, PAY_NEXT_STEP, PAY_WAYS, PLACE_KINDS, POLICY_TOPICS, PRESENTATION_HINT, PUBLIC_ORIGINS, type PayOrderInput, type PayWay, type PaymentHandler, type PaymentStatus, type Place, type PlaceRef, type PolicyTopic, type PositionalSpec, RATE_LIMITS, REPOSITORY_URL, type RateLimitScope, type RenderSurface, type RenderedTool, SEARCH_NOTE_CODES, SEARCH_RULES, SEARCH_SORTS, SKILL_INSTALL_COMMAND, SUPPLIER_OUTCOME_STATUS, SUPPORT_EMAIL, type SearchHotelsInput, type SearchNoteCode, type SearchResult, type Stay, TOOLS, type ToolName, type ToolSpec, UNAVAILABLE_REASONS, UNKNOWN_IS_NOT_NO_EXEMPTIONS, WALLET_NEXT_STEP, addIsoDateDays, authConfig, cancelNextStep, cancelOrderInput, 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, payNextStep, payOrderInput, paymentHandler, photo, place, placeId, placeRef, protocolObject, renderError, renderGuide, renderToolResult, roomFacts, routePath, searchHotelsInput, searchResult, sharedPaymentTokenOf, stay, stayEcho, strictInput, strictOutput, text, timeZone, usdMoney, walletNextStep, wholeNumber };
3930
+ export { ACCOUNT_ROUTES, AMENITY_CODES, API, type AmenityCode, type AuthConfig, CANCEL_NEXT_STEP, CANCEL_REASONS, CARD_NUMBER_MESSAGE, CENTER_BASES, COMMANDS, COMMAND_GROUPS, CONTRACT_VERSION, CREDENTIAL_INVALID_REASONS, CURRENCIES, type CancelOrderInput, type CancelReason, type Center, type CommandGroupSpec, type CommandSpec, type CreateOrderInput, type CredentialInvalidReason, type Currency, DOCS_ORIGIN, 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, HTTP_ROUTES, type Hotel, type HotelOffersInput, type HotelOffersResult, type HotelSummary, type HttpRoute, type HttpToolName, type IndicativePrice, type KnownErrorBody, LIMITS, type ListOrdersInput, MCP_OUTPUT, MCP_PATH, MCP_SERVER_URL, ME_SCOPES, type MeResult, type Money, ORDER_HTTP, ORDER_NEXT_STEP, ORDER_STATUSES, type Offer, type OfferChange, type Omitted, type OptionSpec, type Order, type OrderList, type OrderStatus, PAYMENT_METHOD_IDS, PAYMENT_STATUSES, PAY_INPUT_WAYS, PAY_NEXT_STEP, PAY_WAYS, PLACE_KINDS, POLICY_TOPICS, PRESENTATION_HINT, PUBLIC_ORIGINS, type PayOrderInput, type PayWay, type PaymentHandler, type PaymentMethod, type PaymentMethodId, type PaymentStatus, type Place, type PlaceRef, type PolicyTopic, type PositionalSpec, RATE_LIMITS, REPOSITORY_URL, type RateLimitScope, type RenderSurface, type RenderedTool, SEARCH_NOTE_CODES, SEARCH_RULES, SEARCH_SORTS, SKILL_INSTALL_COMMAND, SUPPLIER_OUTCOME_STATUS, SUPPORT_EMAIL, type SearchHotelsInput, type SearchNoteCode, type SearchResult, type Stay, TOOLS, type ToolName, type ToolSpec, UNAVAILABLE_REASONS, UNKNOWN_IS_NOT_NO_EXEMPTIONS, WALLET_NEXT_STEP, addIsoDateDays, authConfig, cancelNextStep, cancelOrderInput, 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, payNextStep, payOrderInput, paymentHandler, paymentMethod, photo, place, placeId, placeRef, protocolObject, renderError, renderGuide, renderToolResult, requestMoney, roomFacts, routePath, searchHotelsInput, searchResult, sharedPaymentTokenOf, stay, stayEcho, strictInput, strictOutput, text, timeZone, walletNextStep, wholeNumber };