@curless/hotel-storefront 0.84.1 → 0.84.3

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 (95) hide show
  1. package/dist/account/addon-pages.d.ts.map +1 -1
  2. package/dist/account/addon-pages.js +23 -7
  3. package/dist/account/addon-pages.js.map +1 -1
  4. package/dist/account/cancel-pages.d.ts +118 -0
  5. package/dist/account/cancel-pages.d.ts.map +1 -0
  6. package/dist/account/cancel-pages.js +313 -0
  7. package/dist/account/cancel-pages.js.map +1 -0
  8. package/dist/account/index.d.ts +40 -1
  9. package/dist/account/index.d.ts.map +1 -1
  10. package/dist/account/index.js +376 -33
  11. package/dist/account/index.js.map +1 -1
  12. package/dist/account/pages.d.ts +31 -3
  13. package/dist/account/pages.d.ts.map +1 -1
  14. package/dist/account/pages.js +98 -19
  15. package/dist/account/pages.js.map +1 -1
  16. package/dist/account/requests.d.ts +11 -1
  17. package/dist/account/requests.d.ts.map +1 -1
  18. package/dist/account/requests.js +2 -1
  19. package/dist/account/requests.js.map +1 -1
  20. package/dist/card.generated.d.ts +1 -1
  21. package/dist/card.generated.js +2 -2
  22. package/dist/card.generated.js.map +1 -1
  23. package/dist/config.d.ts +12 -5
  24. package/dist/config.d.ts.map +1 -1
  25. package/dist/config.js.map +1 -1
  26. package/dist/otaless/addons-answers.d.ts +2 -0
  27. package/dist/otaless/addons-answers.d.ts.map +1 -1
  28. package/dist/otaless/addons-answers.js +46 -12
  29. package/dist/otaless/addons-answers.js.map +1 -1
  30. package/dist/otaless/addons.d.ts +34 -5
  31. package/dist/otaless/addons.d.ts.map +1 -1
  32. package/dist/otaless/addons.js +150 -47
  33. package/dist/otaless/addons.js.map +1 -1
  34. package/dist/otaless/backend.d.ts.map +1 -1
  35. package/dist/otaless/backend.js +55 -1
  36. package/dist/otaless/backend.js.map +1 -1
  37. package/dist/otaless/booking.d.ts +39 -4
  38. package/dist/otaless/booking.d.ts.map +1 -1
  39. package/dist/otaless/booking.js +406 -61
  40. package/dist/otaless/booking.js.map +1 -1
  41. package/dist/otaless/client.d.ts.map +1 -1
  42. package/dist/otaless/client.js +3 -1
  43. package/dist/otaless/client.js.map +1 -1
  44. package/dist/otaless/fake.d.ts +14 -0
  45. package/dist/otaless/fake.d.ts.map +1 -1
  46. package/dist/otaless/fake.js +18 -8
  47. package/dist/otaless/fake.js.map +1 -1
  48. package/dist/otaless/make.d.ts.map +1 -1
  49. package/dist/otaless/make.js +12 -3
  50. package/dist/otaless/make.js.map +1 -1
  51. package/dist/otaless/shop-answers.d.ts +57 -1
  52. package/dist/otaless/shop-answers.d.ts.map +1 -1
  53. package/dist/otaless/shop-answers.js +115 -12
  54. package/dist/otaless/shop-answers.js.map +1 -1
  55. package/dist/otaless/shop-client.d.ts +7 -0
  56. package/dist/otaless/shop-client.d.ts.map +1 -1
  57. package/dist/otaless/shop-client.js +5 -0
  58. package/dist/otaless/shop-client.js.map +1 -1
  59. package/dist/otaless/shop-fake.d.ts +8 -0
  60. package/dist/otaless/shop-fake.d.ts.map +1 -1
  61. package/dist/otaless/shop-fake.js +5 -3
  62. package/dist/otaless/shop-fake.js.map +1 -1
  63. package/dist/otaless/shop-ids.d.ts +26 -0
  64. package/dist/otaless/shop-ids.d.ts.map +1 -0
  65. package/dist/otaless/shop-ids.js +49 -0
  66. package/dist/otaless/shop-ids.js.map +1 -0
  67. package/dist/otaless/shop-record.d.ts.map +1 -1
  68. package/dist/otaless/shop-record.js +27 -9
  69. package/dist/otaless/shop-record.js.map +1 -1
  70. package/dist/otaless/shop-service.d.ts +85 -21
  71. package/dist/otaless/shop-service.d.ts.map +1 -1
  72. package/dist/otaless/shop-service.js +159 -21
  73. package/dist/otaless/shop-service.js.map +1 -1
  74. package/dist/otaless/shop.d.ts +33 -7
  75. package/dist/otaless/shop.d.ts.map +1 -1
  76. package/dist/otaless/shop.js +76 -27
  77. package/dist/otaless/shop.js.map +1 -1
  78. package/dist/otaless/wallet.d.ts.map +1 -1
  79. package/dist/otaless/wallet.js +27 -6
  80. package/dist/otaless/wallet.js.map +1 -1
  81. package/dist/server.d.ts +1 -1
  82. package/dist/server.d.ts.map +1 -1
  83. package/dist/server.js +77 -6
  84. package/dist/server.js.map +1 -1
  85. package/dist/tools.d.ts +33 -19
  86. package/dist/tools.d.ts.map +1 -1
  87. package/dist/tools.js +368 -27
  88. package/dist/tools.js.map +1 -1
  89. package/dist/trip-ids.d.ts +30 -1
  90. package/dist/trip-ids.d.ts.map +1 -1
  91. package/dist/trip-ids.js +57 -2
  92. package/dist/trip-ids.js.map +1 -1
  93. package/dist/types.d.ts +20 -0
  94. package/dist/types.d.ts.map +1 -1
  95. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EACL,KAAK,mBAAmB,EAczB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAa,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAa1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAiB7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAgEhD,OAAO,EAGL,KAAK,SAAS,EAMf,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAEV,cAAc,EAiBd,QAAQ,EAER,KAAK,EACL,KAAK,EAKL,eAAe,EAOhB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,KAAK,UAAU,EAA2C,MAAM,YAAY,CAAC;AAsGtF,+GAA+G;AAC/G,eAAO,MAAM,WAAW,IAAI,CAAC;AAE7B;;;;GAIG;AACH,eAAO,MAAM,UAAU,GACrB,GAAG,SAAS,EACZ,GAAG,UAAU,EACb,OAAM,mBAAuC;;;;;;;;;;;;;;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EAAE,OAAO,CAAA;CAAE,CAAC,GAAG,SA+xDC,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,UAAU,GACrB,MAAM,QAAQ,EACd,MAAM,MAAM,EACZ,SAAS,OAAO,EAChB,KAAK,WAAW,KACf,OAAO,CAAC,UAAU,CACiE,CAAC;AAwFvF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,oPACuN,CAAC;AAEpP;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,2aAC+Y,CAAC;AAE3a,sFAAsF;AACtF,eAAO,MAAM,oBAAoB,kOACgM,CAAC;AAElO;;;;;;;GAOG;AACH,eAAO,MAAM,OAAO;;;CAKV,CAAC;AAEX;;;;;;GAMG;AACH;;;GAGG;AACH,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAMrC,eAAO,MAAM,cAAc,gxBAA8xB,CAAC"}
package/dist/tools.js CHANGED
@@ -10,8 +10,8 @@ import { clockOf, minutesOf, startProblem, stayWords, windowWords } from './hour
10
10
  import { amountsIn, formatMoney, inFullCurrency, keepingAmounts, money, multiplyMoney, toMinor, } from './money.js';
11
11
  import { namedExactly, roomNamesOf, roomTypeNamed, withTraditional } from './names.js';
12
12
  import { cardAnswer, hotelListAnswer, prepareRefusal, preparedAnswer, statusAnswer, } from './otaless/addons-answers.js';
13
- import { buyAnswer, finishAnswer, itemAnswer, listAnswer, ordersPart, previewAnswer, shopOrdersAnswer, shopSignInAnswer, } from './otaless/shop-answers.js';
14
- import { looksLikeShopOrder, unitCentsOf } from './otaless/shop-service.js';
13
+ import { addOnsCancelPreview, addOnsCancelResult, buyAnswer, finishAnswer, itemAnswer, listAnswer, ordersPart, previewAnswer, shopOrdersAnswer, shopSignInAnswer, } from './otaless/shop-answers.js';
14
+ import { BOOKING_ENDED, looksLikeShopOrder, unitCentsOf } from './otaless/shop-service.js';
15
15
  import { overlapsOf } from './overlap.js';
16
16
  import { MAX_COMPARED, MAX_CONS, MAX_DAYS, MAX_ITEMS_PER_DAY, MAX_MOMENTS, MAX_PROS, buildItinerary, candidatesFor, compareHotels, namesMoreThanOne, nightlyIncludesTaxes, } from './present.js';
17
17
  import { withReference } from './reference.js';
@@ -2606,10 +2606,174 @@ const bookingForCard = (b) => ({
2606
2606
  ...(b.payment.refundAmount
2607
2607
  ? { refundAmountText: formatMoney(b.payment.refundAmount) }
2608
2608
  : {}),
2609
+ // The price shown, where what is paid or asked is not it (Otaless 0.84.2), as text.
2610
+ ...(b.payment.quotedAs ? { quotedAs: formatMoney(b.payment.quotedAs) } : {}),
2609
2611
  },
2610
2612
  }
2611
2613
  : {}),
2612
2614
  });
2615
+ /**
2616
+ * What was paid here in advance on a booking being cancelled, and what
2617
+ * cancelling it now gives back - as facts for the card to say in the guest's
2618
+ * language (2026-10-21 re-audit, T2-2).
2619
+ *
2620
+ * ⚠️ WHY THE CARD NEEDS THEM. For a booking with terms as facts the card does
2621
+ * not show `rule`, and "paid ¥300, all of it goes back to the card" / "nothing
2622
+ * goes back, the fee is the whole stay" is only in `rule`: a guest who had
2623
+ * paid ¥300 saw "Cancelling would cost ¥300" on the screen where they decide,
2624
+ * and could read it as a second payment. `rule` stays for the model, word for
2625
+ * word; these are the same facts, as data. The shape is the booking's own
2626
+ * payment (`method`, `amount` as text) with what cancelling now does to it:
2627
+ * `refund` is `all`, `part` (and `refundAmount` says how much) or `none`.
2628
+ *
2629
+ * Only where money was paid HERE and the booking can be cancelled now: paid in
2630
+ * advance by card, or paid with UnionPay - which the hotel charged, and gives
2631
+ * back to that card, not through this connector. A booking paid at the hotel,
2632
+ * a demonstration's hold, a page not paid yet and a booking that cannot be
2633
+ * cancelled have none, and the card says nothing of money for them.
2634
+ */
2635
+ /**
2636
+ * A cancellation preview as a string the guest's press must find again (0.84.2, P1-8 - the cancel page):
2637
+ * the fee and whether it is known, the terms, the reason, what was paid and what goes back. Anything of it
2638
+ * different at the press - a fee moved, the terms changed, the booking paid meanwhile - and nothing is
2639
+ * sent. In memory only, never shown.
2640
+ */
2641
+ const cancelShapeOf = (preview, refundAsked, paid, booked) => JSON.stringify([
2642
+ preview.bookingId,
2643
+ preview.fee.minor,
2644
+ preview.fee.currency,
2645
+ preview.feeUnknown === true,
2646
+ preview.feeIsCap === true,
2647
+ preview.termsNew === true,
2648
+ preview.reason ?? '',
2649
+ preview.rule,
2650
+ preview.freeUntil ?? '',
2651
+ refundAsked?.amount ?? '',
2652
+ paid?.refund ?? '',
2653
+ paid?.refundAmount ?? '',
2654
+ booked?.payment?.status ?? '',
2655
+ ]);
2656
+ /** What the cancel page shows (0.84.2, P1-8): the preview the tool made, as facts - `until` is the account's to set. */
2657
+ const cancelFactsOf = (deps, preview, booked, which, refundAsked, paid, shown, shape) => {
2658
+ const unpaid = preview.reason === 'unpaid';
2659
+ const stay = which.stay;
2660
+ return {
2661
+ booking: { id: preview.bookingId, code: preview.confirmationCode },
2662
+ ...(which.hotelName ? { hotelName: which.hotelName } : {}),
2663
+ ...(which.hotelNames && typeof which.hotelNames === 'object'
2664
+ ? { hotelNames: which.hotelNames }
2665
+ : {}),
2666
+ ...(stay ? { stay } : {}),
2667
+ group: holderOf(deps, preview.supplier).name,
2668
+ ...(unpaid
2669
+ ? { unpaid: true }
2670
+ : preview.feeUnknown
2671
+ ? { feeUnknown: true }
2672
+ : {
2673
+ fee: formatMoney(preview.fee),
2674
+ ...(preview.feeIsCap ? { feeIsCap: true } : {}),
2675
+ }),
2676
+ // ⚠️ THE GROUP'S OWN TERMS, AS IT GAVE THEM, only where `rule` is that (Otaless: a fee not known
2677
+ // before the group cancels, under terms it sent) - never our words for the model.
2678
+ ...(preview.feeUnknown && !preview.termsNew && preview.rule
2679
+ ? { groupTerms: preview.rule }
2680
+ : {}),
2681
+ ...(preview.termsNew ? { termsNew: true } : {}),
2682
+ ...(refundAsked ? { refundWithCancel: { amount: refundAsked.amount } } : {}),
2683
+ ...(paid
2684
+ ? {
2685
+ payment: {
2686
+ amount: paid.amount,
2687
+ refund: paid.refund,
2688
+ ...(paid.refundAmount ? { refundAmount: paid.refundAmount } : {}),
2689
+ },
2690
+ }
2691
+ : {}),
2692
+ ...(booked ? { bookingTotal: formatMoney(booked.quote.total) } : {}),
2693
+ ...addOnRowsOf(shown),
2694
+ shape,
2695
+ until: '',
2696
+ };
2697
+ };
2698
+ /** The value-added service orders an answer carries (shop-answers.ts `addOnRow`), as the cancel page lists them. */
2699
+ const addOnRowsOf = (s) => {
2700
+ const rows = Array.isArray(s.addOnOrders)
2701
+ ? s.addOnOrders.map((o) => ({
2702
+ name: String(o.name ?? ''),
2703
+ total: String(o.total ?? ''),
2704
+ fate: String(o.fate ?? ''),
2705
+ }))
2706
+ : [];
2707
+ return {
2708
+ ...(rows.length ? { addOns: rows } : {}),
2709
+ ...(s.addOnOrdersUnavailable === true ? { addOnsUnread: true } : {}),
2710
+ };
2711
+ };
2712
+ /** The refusals that leave a booking as it was - anything else the cancel answers with is not known. */
2713
+ const NOT_CANCELLED = new Set([
2714
+ 'not-cancelled',
2715
+ 'unconfirmed',
2716
+ 'sign-in',
2717
+ 'link-redo',
2718
+ 'signed-out',
2719
+ 'session-expired',
2720
+ ]);
2721
+ /** How the cancel tool's answer came out, for the cancel page (0.84.2, P1-8). Anything not read is "not known". */
2722
+ const cancelOutcomeOf = (s) => {
2723
+ const view = s.view;
2724
+ if (view === 'cancellation-preview')
2725
+ return { outcome: 'changed' };
2726
+ if (view === 'booking-not-found')
2727
+ return { outcome: 'gone' };
2728
+ if (view === 'error')
2729
+ return NOT_CANCELLED.has(String(s.error)) ? { outcome: 'refused' } : { outcome: 'unknown' };
2730
+ if (view !== 'cancelled')
2731
+ return { outcome: 'unknown' };
2732
+ const b = (s.booking ?? {});
2733
+ const p = b.payment;
2734
+ const back = p?.refundAmountText ?? p?.amount ?? '';
2735
+ // ⚠️ NEVER "REFUNDED" OR "NOTHING CHARGED" ON A GUESS: a payment state not read here is "being checked".
2736
+ const money = !p
2737
+ ? b.paymentUnknown
2738
+ ? { kind: 'payment-unknown' }
2739
+ : undefined
2740
+ : p.status === 'refunding'
2741
+ ? p.refundUnsure
2742
+ ? { kind: 'refund-unsure' }
2743
+ : p.refundStuck
2744
+ ? { kind: 'refund-stuck' }
2745
+ : p.groupReviews
2746
+ ? { kind: 'refund-submitted', back }
2747
+ : { kind: 'refunding', back }
2748
+ : p.status === 'refunded'
2749
+ ? { kind: 'refunded', back }
2750
+ : p.status === 'awaiting' || p.status === 'lapsed'
2751
+ ? { kind: 'not-paid' }
2752
+ : p.status === 'paid'
2753
+ ? { kind: 'paid-settling', amount: p.amount ?? '' }
2754
+ : { kind: 'payment-unknown' };
2755
+ return {
2756
+ outcome: 'cancelled',
2757
+ code: String(b.confirmationCode ?? ''),
2758
+ ...(money ? { money } : {}),
2759
+ ...(s.feeUnknown === true
2760
+ ? { feeUnknown: true }
2761
+ : typeof s.fee === 'string'
2762
+ ? { fee: s.fee }
2763
+ : {}),
2764
+ ...addOnRowsOf(s),
2765
+ };
2766
+ };
2767
+ /**
2768
+ * ⚠️ THE GUEST'S PRESS ON THE ONE-TIME CANCEL PAGE (0.84.2, the 11-25 code audit's P1-8 - account/index.ts
2769
+ * `cancels`): the cancel tool's own confirmed cancel - the same 9, 9.1 and value-added service orders as
2770
+ * a card's button - for the conversation the link was made in, and only if the preview is still the one
2771
+ * the page showed (`facts.shape`). How it came out, for the page. Throws only what the tool throws.
2772
+ */
2773
+ export const cancelOnPage = async (deps, key, facts) => {
2774
+ const said = await handleTool(deps, deps.tools.cancelBooking, { booking: facts.booking.id, confirmed: true }, { ...contextFor(deps, key), cancelPressed: facts.shape });
2775
+ return cancelOutcomeOf(said.structured);
2776
+ };
2613
2777
  const paidFactsOf = (booked, preview) => {
2614
2778
  const p = booked?.payment;
2615
2779
  if (!p || p.status !== 'paid' || !preview.cancellable)
@@ -2735,11 +2899,21 @@ const paidLine = (deps, b, fee) => {
2735
2899
  return b.status === 'confirmed'
2736
2900
  ? `${amount} paid with UnionPay, and booked with ${h.name}, who charges the one-time card UnionPay issued: nothing more is paid at the hotel.`
2737
2901
  : `${amount} confirmed on UnionPay. ${h.name} has not confirmed the booking yet - ${deps.tools.listBookings} shows when it has; if it does not take it, the one-time card is not charged.`;
2902
+ // ⚠️ CHARGED WHEN IT WAS BOOKED, NO PAGE (Otaless 0.84.2, the 11-25 code audit's P0-1):
2903
+ // the group took it itself - from a wallet the guest has with it (questions #102) - and
2904
+ // that is said, never "nothing has been charged".
2905
+ if (p.chargedWhenBooked)
2906
+ return p.amountUnsaid
2907
+ ? // ⚠️ NO AMOUNT SAID IS NOT ¥0, NOR THE PRICE (总线程's review of 0.84.2, 3).
2908
+ `${h.name} charged it when it was booked - there was no payment page - without saying how much; the price shown before booking was ${amount}, and a person here is checking what was charged. It is booked: nothing more is paid at the hotel.`
2909
+ : `${h.name} charged ${amount} for it when it was booked - there was no payment page to go through - and it is booked: nothing more is paid at the hotel.`;
2738
2910
  return b.status === 'confirmed'
2739
2911
  ? `${amount} paid in advance by card, and booked with ${h.name}: nothing more is paid at the hotel.`
2740
2912
  : `${amount} paid in advance by card. ${h.name} has not confirmed the booking yet - ${deps.tools.listBookings} shows when it has; if it does not take it, all ${amount} goes back.`;
2741
2913
  case 'lapsed':
2742
- return 'Not paid in time: nothing was booked and nothing was charged.';
2914
+ return p.cancelledUnpaid
2915
+ ? 'Cancelled before it was paid: nothing was booked and nothing was charged.'
2916
+ : 'Not paid in time: nothing was booked and nothing was charged.';
2743
2917
  case 'refunding':
2744
2918
  return (groupRefundWords(p, h.name, back, whole, amount) ??
2745
2919
  (p.refundStuck
@@ -2751,7 +2925,20 @@ const paidLine = (deps, b, fee) => {
2751
2925
  return `The money is with ${h.name}, who returns what its terms give back to the card it charged - nothing is refunded from here.`;
2752
2926
  }
2753
2927
  })();
2754
- return `${said}${test}`;
2928
+ return `${said}${shownPriceSaid(p, h.name, ended)}${test}`;
2929
+ };
2930
+ /**
2931
+ * ⚠️ WHAT IS CHARGED, WHERE IT IS NOT THE PRICE SHOWN (Otaless 0.84.2, the 11-25 code audit's P0-2
2932
+ * and P1-4): the group's USD figure - or its own amount, its prices not checked - beside the price
2933
+ * the guest agreed to, so the guest is always told what was charged, or is to be, in its currency.
2934
+ */
2935
+ const shownPriceSaid = (p, group, ended) => {
2936
+ const shown = p.quotedAs;
2937
+ if (!shown || ended || (p.status !== 'paid' && p.status !== 'awaiting'))
2938
+ return '';
2939
+ const other = shown.currency !== p.amount.currency;
2940
+ const what = p.status === 'paid' ? 'was charged' : 'is what the payment page asks';
2941
+ return ` ${formatMoney(p.amount)} ${what} - ${other ? `${group}'s own figure in ${p.amount.currency}` : `${group}'s own amount`}; the price shown before booking was ${formatMoney(shown)}.`;
2755
2942
  };
2756
2943
  /**
2757
2944
  * A stay sent to the hotel's own system whose answer is not in yet: being
@@ -2768,8 +2955,30 @@ const madeForCard = (deps, b) => {
2768
2955
  const { confirmationCode: _unconfirmed, ...rest } = card;
2769
2956
  return { ...rest, pending: true };
2770
2957
  };
2958
+ /**
2959
+ * ⚠️ WHAT IS NOT AS THE GUEST CHOSE, SAID (Otaless 0.84.2, 总线程's re-review): 8 answered PAID or
2960
+ * CONFIRMED (no page) for an order whose guests, terms or amount are not the ones chosen - kept, a
2961
+ * person checking it with the group. Never a plain "confirmed".
2962
+ */
2963
+ export const differsSaid = (deps, b) => {
2964
+ const d = b.differs;
2965
+ if (!d?.length)
2966
+ return '';
2967
+ const words = {
2968
+ guests: 'the number of guests',
2969
+ terms: 'the cancellation terms',
2970
+ amount: 'the amount',
2971
+ 'amount-unsaid': 'the amount (it did not say one)',
2972
+ step: 'a further step it asks for',
2973
+ };
2974
+ const items = d.map((x) => words[x] ?? x);
2975
+ const list = items.length > 1 ? `${items.slice(0, -1).join(', ')} and ${items.at(-1)}` : (items[0] ?? '');
2976
+ const g = holderOf(deps, b.supplier).name;
2977
+ return `${g} confirmed this booking, but ${list} ${items.length > 1 ? 'are' : 'is'} not what the guest chose: a person here is checking it with ${g}. If the guest does not want it as it is, it can be cancelled.`;
2978
+ };
2771
2979
  const bookedLine = (deps, b) => [
2772
2980
  unconfirmedSaid(deps, b),
2981
+ differsSaid(deps, b),
2773
2982
  heldLine(deps, b),
2774
2983
  // The group's own number, where the booking has one (0.77.6).
2775
2984
  b.orderNumber ? `Order number ${b.orderNumber}.` : '',
@@ -2816,9 +3025,20 @@ const heldLine = (deps, b) => {
2816
3025
  ? `${total} all in, to be paid at the hotel. ${h.name} has not confirmed this booking yet - that takes up to eight minutes, and ${deps.tools.listBookings} shows when it has. Nothing has been charged.`
2817
3026
  : `${total} all in, paid at the hotel. **Nothing has been charged here** - this is ${h.name}'s own reservation, kept until it is cancelled, and the guest pays at check-in.`;
2818
3027
  }
3028
+ // ⚠️ CONFIRMED WITH NO PAYMENT PAGE, ITS PAYMENT NOT KNOWN (Otaless 0.84.2, P0-1): never
3029
+ // "nothing has been charged" - the group may have charged a wallet the guest has with it.
3030
+ if (b.paymentUnknown)
3031
+ return paymentUnknownWords(deps, b, h.name);
2819
3032
  const lapses = b.holdUntilLocal
2820
3033
  ? `${b.holdUntilLocal} hotel time`
2821
3034
  : `${b.holdUntil?.slice(0, 16).replace('T', ' ')} UTC`;
3035
+ // ⚠️ NO TIME IS NO "UNTIL undefined UTC" (0.84.2, P0-1): said without one. ⚠️ "HAS THE BOOKING"
3036
+ // ONLY WHEN IT IS CONFIRMED (总线程's review of 0.84.2, 1): one 8 did not answer for - or answered a
3037
+ // server error - is not known to be made; said as that, never as made and never "nothing charged".
3038
+ if (!b.holdUntilLocal && !b.holdUntil)
3039
+ return b.status === 'confirmed'
3040
+ ? `${total} all in. ${h.name} has the booking; ${deps.tools.listBookings} shows where its payment stands.`
3041
+ : `${total} all in. Whether ${h.name} took it - and whether anything was charged for it - is not known yet: ${deps.tools.listBookings} shows once it is. Do not book it again meanwhile, and do not say nothing was charged.`;
2822
3042
  // ⚠️ NOT "PRESENTS A CARD AT CHECK-IN" (2026-10-05 audit, P2): a demo
2823
3043
  // booking has no check-in, and saying so sent a guest towards a real desk.
2824
3044
  //
@@ -2831,6 +3051,16 @@ const heldLine = (deps, b) => {
2831
3051
  return `${total} all in. **${demoBookingWords(h)}** Nothing has been charged and no card is needed. ${demoHoldWords(b, deps.trips.now())} ${notSentSaid(h.name)}`;
2832
3052
  return `${total} all in. **Nothing has been charged** - the rooms are held until ${lapses}, and the guest presents a card at check-in.`;
2833
3053
  };
3054
+ /**
3055
+ * A booking the group confirmed with no payment page, whether it was charged not known yet
3056
+ * (Otaless 0.84.2, the 11-25 code audit's P0-1) - made, listed or cancelled.
3057
+ */
3058
+ export const paymentUnknownWords = (deps, b, group) => {
3059
+ const total = formatMoney(b.quote.total);
3060
+ return b.status === 'cancelled' || b.status === 'expired' || b.status === 'failed'
3061
+ ? `${group} had confirmed it without a payment page, and whether it charged it (to a wallet or card the guest has with ${group}) is still not known - if it did, a person here takes up its refund with ${group}. Do not say nothing was charged.`
3062
+ : `${total} all in. ${group} confirmed it without a payment page, and whether it has charged it already (to a wallet or card the guest has with ${group}) is being checked - there is nothing to pay here now, and ${deps.tools.listBookings} shows once it is known. Do not say nothing was charged.`;
3063
+ };
2834
3064
  /**
2835
3065
  * How long a demonstration hold lasts, as "in N minutes" from now - the hold
2836
3066
  * lapses by itself, and says nothing about the stay (T2, `heldLine`).
@@ -4171,6 +4401,9 @@ const paymentWords = (b) => {
4171
4401
  p.refundAmount &&
4172
4402
  p.refundAmount.minor !== p.amount.minor)
4173
4403
  return `${formatMoney(p.refundAmount)} of ${formatMoney(p.amount)} ${p.status === 'refunded' ? 'refunded' : 'going back'} - the rest was the fee`;
4404
+ // ⚠️ CANCELLED BEFORE IT WAS PAID IS NOT "NOT PAID IN TIME" (Otaless 0.84.2, the UI review's P2-2).
4405
+ if (p.status === 'lapsed' && p.cancelledUnpaid)
4406
+ return 'cancelled before it was paid - nothing booked or charged';
4174
4407
  return ((p.method === 'unionpay' ? UNIONPAY_WORDS[p.status] : undefined) ?? PAYMENT_WORDS[p.status]);
4175
4408
  };
4176
4409
  /**
@@ -4304,8 +4537,9 @@ const notPaidWords = (b) => !b.paymentNotConnected
4304
4537
  /**
4305
4538
  * ⚠️ VALUE-ADDED SERVICES (增值服务), SAID WHERE A BOOKING IS DONE (0.84.0, robin 11-24: 「应该在订单完成的
4306
4539
  * 时候就可以购买,而不是要去我的预订买」). Only where the deployment sells them (`/claude`: the shop with
4307
- * buying open), only for a booking of this account that can still take them, and - where the booking
4308
- * was just made - only once it is confirmed (a booking waiting for its payment is paid first). The next
4540
+ * buying open), only for a booking of this account that can still take them - confirmed: a booking still
4541
+ * waiting for its room payment is paid first, in the bookings list too (0.84.2, the 11-25 UI review's
4542
+ * P2-1 - `canAdd` takes confirmed bookings alone; it had offered them for one awaiting payment). The next
4309
4543
  * step in words, tool names and what each takes, so a client that draws no card can go on; a card
4310
4544
  * client is told the card shows them under the booking. ⚠️ NOTHING IS BOUGHT BY THE ASSISTANT: the buy
4311
4545
  * tool prepares a page the guest confirms on.
@@ -4622,6 +4856,8 @@ const termsAnswer = (deps, ctx, key, terms) => {
4622
4856
  rooms: x.rooms,
4623
4857
  total: formatMoney(x.total),
4624
4858
  totalMoney: x.total,
4859
+ // What the payment may be taken in, as the backend gave it (0.84.2, P1-4).
4860
+ ...(x.payAs ? { payAs: formatMoney(x.payAs) } : {}),
4625
4861
  // ⚠️ THE MOMENT ONLY (0.63.0 screenshots): the card writes it in the viewer's own
4626
4862
  // language and time zone. "10:05 UTC, 10 Nov" here was drawn as is in a
4627
4863
  // Chinese card - and it is not the hotel's clock anyway (no zone is sent).
@@ -4649,6 +4885,11 @@ const termsAnswer = (deps, ctx, key, terms) => {
4649
4885
  return [
4650
4886
  `${withZh(x.hotelName, x.hotelNames, ctx.noCards)} · ${x.roomName} · ${stayWords(x.stay)} · ${x.rooms} ${x.rooms === 1 ? 'room' : 'rooms'} · ${formatMoney(x.total)} · ${x.groupName}${code ? ` · order ${code}` : ''}`,
4651
4887
  x.source === 'none' ? `${x.groupName} gave no cancellation terms for this room.` : '',
4888
+ // ⚠️ SAID BEFORE THE GUEST AGREES (0.84.2, the 11-25 code audit's P1-4; 总线程 11-25): the
4889
+ // group's page may ask its own USD figure for this price - as the backend gave it.
4890
+ x.payAs
4891
+ ? `${x.groupName}'s payment page may ask ${formatMoney(x.payAs)} for it - ${x.groupName}'s own figure in ${x.payAs.currency} for this price, not converted here; tell the guest before they agree.`
4892
+ : '',
4652
4893
  x.changed
4653
4894
  ? `They can be agreed to until ${until}; not agreed by then, the order is cancelled.`
4654
4895
  : heldOrder
@@ -4693,6 +4934,7 @@ const termsAnswer = (deps, ctx, key, terms) => {
4693
4934
  rooms: x.rooms,
4694
4935
  total: formatMoney(x.total),
4695
4936
  totalMoney: x.total,
4937
+ ...(x.payAs ? { payAs: formatMoney(x.payAs) } : {}),
4696
4938
  text: x.text,
4697
4939
  until: x.until,
4698
4940
  })),
@@ -4736,9 +4978,14 @@ const bookingLine = (deps, b, noCards) => {
4736
4978
  b.payment.method === 'card' &&
4737
4979
  deps.backend.otalessBooking
4738
4980
  ? ` · ${b.termsChanged || b.confirmAsked ? termsHeldWords(deps, b) : LINK_CLOSED_WORDS}`
4739
- : ` · ${paymentWords(b)}`
4740
- : '',
4981
+ : ` · ${paymentWords(b)}${shownPriceSaid(b.payment, holderOf(deps, b.supplier).name, b.status === 'cancelled' || b.status === 'expired' || b.status === 'failed').replace(/^ /, ' - ')}`
4982
+ : // ⚠️ CONFIRMED WITH NO PAGE, ITS PAYMENT NOT KNOWN (Otaless 0.84.2, P0-1).
4983
+ b.paymentUnknown
4984
+ ? ` · ${b.status === 'cancelled' ? 'cancelled - whether it had been charged is still not known; a person here follows it up' : 'whether it has been charged (to a wallet or card at the group) is being checked - nothing to pay here now'}`
4985
+ : '',
4741
4986
  bookingNotes(deps, b) ? ` · ${bookingNotes(deps, b)}` : '',
4987
+ // 0.84.2 (总线程's re-review): what is not as chosen.
4988
+ differsSaid(deps, b) ? ` · ${differsSaid(deps, b)}` : '',
4742
4989
  ].join('');
4743
4990
  };
4744
4991
  /**
@@ -9318,8 +9565,10 @@ const answerTool = async (deps, name, rawArgs, ctx) => {
9318
9565
  const addable = addonsApi ? bookings.filter((b) => addonsApi.canAdd(b)) : [];
9319
9566
  // 0.84.1 (robin 11-25): each value-added service order under the booking it was bought with; one
9320
9567
  // that matches none of these under "other" - never forced under a booking.
9568
+ // 0.84.2 (P1-1): an open order whose booking has ended is said so, its payment page held back - the
9569
+ // bookings read here are not looked up again.
9321
9570
  const shopPart = shopApi && !code
9322
- ? ordersPart(await shopApi.orders(who, deps.lang === 'zh' ? 'zh' : 'en'), deps.shopLink, bookings.map((b) => b.confirmationCode))
9571
+ ? ordersPart(await shopApi.orders(who, deps.lang === 'zh' ? 'zh' : 'en', bookings), deps.shopLink, bookings.map((b) => b.confirmationCode))
9323
9572
  : undefined;
9324
9573
  return {
9325
9574
  structured: {
@@ -9695,6 +9944,7 @@ const answerTool = async (deps, name, rawArgs, ctx) => {
9695
9944
  // whole amount, nothing comes back" - and confirmed, 9.1 was sent. Then `refundWithCancel`
9696
9945
  // says the money, and the facts of a fee kept are not sent.
9697
9946
  const paid = preview.feeUnknown || refundAsked ? undefined : paidFactsOf(booked, preview);
9947
+ const sayTheWord = `Say the word and it is cancelled (${t.cancelBooking} with \`confirmed\`).`;
9698
9948
  const asPreview = {
9699
9949
  structured: {
9700
9950
  view: 'cancellation-preview',
@@ -9706,7 +9956,13 @@ const answerTool = async (deps, name, rawArgs, ctx) => {
9706
9956
  // Each room's terms as they stand now: free while its own free
9707
9957
  // time lasts (the backend's \`freeUntil\` is the earliest of those
9708
9958
  // still running), non-refundable, or past it and charged.
9709
- terms: rooms.map((l) => ({
9959
+ // ⚠️ NO GUESS WHERE THE FEE IS NOT KNOWN (0.84.2, the 11-25 UI review's P1-2): a paid
9960
+ // Otaless booking (`feeUnknown`, no `freeUntil`) fell to "charged" - 「已过免费取消时间」 -
9961
+ // for a stay months away, under "what cancelling costs is what the group says". Only a
9962
+ // rate that is non-refundable says so; the others say nothing of a free time here.
9963
+ terms: rooms
9964
+ .filter((l) => !preview.feeUnknown || l.refundable === false)
9965
+ .map((l) => ({
9710
9966
  room: l.title,
9711
9967
  ...(l.titleNames ? { roomNames: l.titleNames } : {}),
9712
9968
  state: l.refundable === false
@@ -9784,9 +10040,7 @@ const answerTool = async (deps, name, rawArgs, ctx) => {
9784
10040
  refundAsked
9785
10041
  ? `It was paid (${refundAsked.amount}): cancelling it also asks ${holderOf(deps, preview.supplier).name} for all of that back, in the same step - ${holderOf(deps, preview.supplier).name} reviews it and returns it to the card it was paid with.`
9786
10042
  : '',
9787
- preview.cancellable
9788
- ? `Say the word and it is cancelled (${t.cancelBooking} with \`confirmed\`).`
9789
- : '',
10043
+ preview.cancellable ? sayTheWord : '',
9790
10044
  demoBookingNote(deps, preview.supplier),
9791
10045
  ]
9792
10046
  .filter(Boolean)
@@ -9799,12 +10053,67 @@ const answerTool = async (deps, name, rawArgs, ctx) => {
9799
10053
  const shownKey = `${key}|cancel|${preview.bookingId}`;
9800
10054
  const wasShown = previewsOf(deps).get(shownKey);
9801
10055
  remember(deps, shownKey, preview.fee.minor);
10056
+ // ⚠️ THE VALUE-ADDED SERVICE ORDERS BOUGHT WITH IT (0.84.2, the 11-25 UI review's P1-1), where the shop
10057
+ // is on (never root): read fresh and said beside the preview - one awaiting payment is cancelled with
10058
+ // the booking, one paid is NOT refunded by it (its refund is offered), and orders not read are said
10059
+ // as that. A booking that cannot be cancelled yet says nothing of them; one no longer active does.
10060
+ const addOnsOf = { confirmationCode: preview.confirmationCode, id: preview.bookingId };
10061
+ const withAddOns = async (said) => {
10062
+ if (!shopApi || !(preview.cancellable || preview.reason === 'not-active'))
10063
+ return said;
10064
+ const part = addOnsCancelPreview(await shopApi.withBooking(who, addOnsOf, shopLang), preview.confirmationCode, preview.cancellable, { preview: t.previewCancellation }, deps.shopLink);
10065
+ return part
10066
+ ? {
10067
+ ...said,
10068
+ structured: { ...said.structured, ...part.structured },
10069
+ text: [said.text, part.text].join('\n'),
10070
+ }
10071
+ : said;
10072
+ };
9802
10073
  if (name === t.previewCancellation || args.confirmed !== true)
9803
- return asPreview;
10074
+ return withAddOns(asPreview);
9804
10075
  if (!preview.cancellable)
9805
- return asPreview;
9806
- if (wasShown === undefined || wasShown !== preview.fee.minor) {
10076
+ return withAddOns(asPreview);
10077
+ // ⚠️ ON A CLIENT THAT DRAWS NO CARD, THE GUEST'S OWN PRESS IN THEIR SIGNED-IN BROWSER (0.84.2, the 11-25
10078
+ // code audit's P1-8, option C ④ - `account.cancelOnPage`, `deps.cancelLink`): the model's `confirmed`
10079
+ // cancels nothing there - whoever holds the conversation's trip id can say it. It answers with a
10080
+ // one-time page that shows this preview and one button; the press there comes back here
10081
+ // (`ctx.cancelPressed`: the preview the page showed) and cancels only if the preview is still that.
10082
+ // A card's own button is the guest's press, as before; with the switch off none of this exists.
10083
+ const shape = cancelShapeOf(preview, refundAsked, paid, booked);
10084
+ if (ctx.cancelPressed !== undefined) {
10085
+ if (ctx.cancelPressed !== shape)
10086
+ return withAddOns({
10087
+ ...asPreview,
10088
+ structured: { ...asPreview.structured, changedSincePage: true },
10089
+ text: `Nothing was cancelled: what cancelling ${preview.confirmationCode} does has changed since the page showed it. ${asPreview.text}`,
10090
+ });
10091
+ }
10092
+ else if (deps.cancelLink && ctx.noCards) {
10093
+ const shown = await withAddOns(asPreview);
10094
+ const link = deps.cancelLink(key, cancelFactsOf(deps, preview, booked, which, refundAsked, paid, shown.structured, shape));
10095
+ if (!link)
10096
+ return {
10097
+ structured: { view: 'error', ...common(deps, key), error: 'no-cancel-page' },
10098
+ text: `Nothing was cancelled: a one-time page for the guest to cancel ${preview.confirmationCode} on could not be made (they must be signed in to their account here, and not have asked for too many links at once). On this app a booking is cancelled only by the guest's own press on that page - never by your word.`,
10099
+ isError: true,
10100
+ };
10101
+ const { toolToConfirm: _byWord, ...facts } = shown.structured;
10102
+ const until = clockWords(link.expiresAt) ?? link.expiresAt;
9807
10103
  return {
10104
+ structured: {
10105
+ ...facts,
10106
+ cancelPage: { url: link.url, host: hostOf(link.url), expiresAt: link.expiresAt },
10107
+ },
10108
+ text: [
10109
+ `Nothing is cancelled yet: here a booking is cancelled by the guest's own press, on a one-time page in their own browser - not by your word. Give the guest this page to cancel ${preview.confirmationCode} on: ${link.url} - ${inBrowserWords(deps, ctx) ? `it works once, and is good until ${until}. ${OPENS_SIGNED_IN} ${GUEST_ALONE}` : `it opens only in the browser signed in to their account, works once, and is good until ${until}.`}`,
10110
+ `The page shows what cancelling does - what follows - and one button; ${preview.confirmationCode} is cancelled only when the guest presses it there, and the page shows how it came out. Never say it is cancelled until ${t.listBookings} shows it.`,
10111
+ shown.text.replace(` ${sayTheWord}`, '').replace(sayTheWord, ''),
10112
+ ].join(' '),
10113
+ };
10114
+ }
10115
+ else if (wasShown === undefined || wasShown !== preview.fee.minor) {
10116
+ return withAddOns({
9808
10117
  ...asPreview,
9809
10118
  text: [
9810
10119
  wasShown === undefined
@@ -9812,11 +10121,39 @@ const answerTool = async (deps, name, rawArgs, ctx) => {
9812
10121
  : `The fee has changed since it was shown - it is now ${formatMoney(preview.fee)}. Nothing is cancelled yet.`,
9813
10122
  asPreview.text,
9814
10123
  ].join(' '),
9815
- };
10124
+ });
9816
10125
  }
9817
10126
  const cancelled = await deps.backend.cancelBooking(ref, who, str(args.reason) || undefined);
9818
10127
  if (!cancelled)
9819
10128
  return asPreview;
10129
+ // ⚠️ …AND ONCE IT IS CANCELLED (0.84.2, P1-1): each of its orders still awaiting payment is cancelled
10130
+ // at the shop - read fresh, its payment asked again: one paid meanwhile is NOT refunded and nothing is
10131
+ // sent for it (shop-service.ts `cancelWithBooking`). A paid one's refund is offered, never asked: it
10132
+ // is the guest's own yes on its own preview. No money moves back on the booking's yes. Only for a
10133
+ // booking the backend answered as ended: one it did not is not "cancelled" here, and nothing is sent.
10134
+ let addOnsDone;
10135
+ if (shopApi && BOOKING_ENDED.has(cancelled.status)) {
10136
+ const open = await shopApi.withBooking(who, addOnsOf, shopLang);
10137
+ const done = [];
10138
+ if (open.ok)
10139
+ for (const ord of open.orders) {
10140
+ if (ord.status !== 'awaiting-payment') {
10141
+ done.push({ order: ord, fate: 'refund-offered' });
10142
+ continue;
10143
+ }
10144
+ const c = await shopApi.cancelWithBooking(who, ord.id, shopLang);
10145
+ done.push(c.outcome === 'cancelled'
10146
+ ? { order: c.order, fate: 'cancelled' }
10147
+ : c.outcome === 'paid'
10148
+ ? { order: c.order, fate: 'refund-offered' }
10149
+ : c.outcome === 'unknown'
10150
+ ? { order: c.order ?? ord, fate: 'not-known' }
10151
+ : c.order?.status === 'cancelled'
10152
+ ? { order: c.order, fate: 'cancelled' }
10153
+ : { order: c.order ?? ord, fate: 'not-cancelled' });
10154
+ }
10155
+ addOnsDone = addOnsCancelResult(open, done, cancelled.confirmationCode || preview.confirmationCode, { preview: t.previewCancellation }, deps.shopLink);
10156
+ }
9820
10157
  // A coupon handed back is back on the member's badge.
9821
10158
  await refreshMember(deps, key);
9822
10159
  // ⚠️ WHAT THE HOTEL SAYS IT CHARGED, once it has said. A group's own system
@@ -9860,25 +10197,29 @@ const answerTool = async (deps, name, rawArgs, ctx) => {
9860
10197
  rule: preview.rule,
9861
10198
  cancellable: false,
9862
10199
  ...(couponNow ? { coupon: couponNow } : {}),
10200
+ ...(addOnsDone?.structured ?? {}),
9863
10201
  },
9864
10202
  text: [
9865
10203
  cancelled.payment
9866
10204
  ? // Paid here in advance: what becomes of the money is the answer.
9867
10205
  `${cancelled.confirmationCode} is ${cancelled.status === 'expired' ? 'called off before it was paid' : 'cancelled'}. ${paidLine(deps, cancelled, feeUnsaid ? undefined : charged)}`
9868
- : feeUnsaid
9869
- ? `${cancelled.confirmationCode} is cancelled. ${h.name} charges whatever its own terms say; the amount is not known here.`
9870
- : h.notReal
9871
- ? // The fact, in no environment's word (robin, 2026-11-03); nobody charges
9872
- // a booking that was never sent anything (2026-10-05 audit, P2).
9873
- `${cancelled.confirmationCode} is cancelled. ${charged.minor === 0 ? 'No fee.' : `A real booking on this rate would be charged ${formatMoney(charged)}; this booking was never sent to ${h.name}, and nothing is charged.`}`
9874
- : h.test
9875
- ? `${cancelled.confirmationCode} is cancelled. ${charged.minor === 0 ? 'No fee.' : `A real booking on this rate would be charged ${formatMoney(charged)}; this booking held no room for anyone, and nothing is charged.`}`
9876
- : `${cancelled.confirmationCode} is cancelled. ${charged.minor === 0 ? 'No fee.' : `The hotel charges ${formatMoney(charged)}.`}${cancelled.paymentNotConnected ? ` ${notPaidWords(cancelled)}` : ''}`,
10206
+ : cancelled.paymentUnknown
10207
+ ? `${cancelled.confirmationCode} is cancelled. ${paymentUnknownWords(deps, cancelled, h.name)}`
10208
+ : feeUnsaid
10209
+ ? `${cancelled.confirmationCode} is cancelled. ${h.name} charges whatever its own terms say; the amount is not known here.`
10210
+ : h.notReal
10211
+ ? // The fact, in no environment's word (robin, 2026-11-03); nobody charges
10212
+ // a booking that was never sent anything (2026-10-05 audit, P2).
10213
+ `${cancelled.confirmationCode} is cancelled. ${charged.minor === 0 ? 'No fee.' : `A real booking on this rate would be charged ${formatMoney(charged)}; this booking was never sent to ${h.name}, and nothing is charged.`}`
10214
+ : h.test
10215
+ ? `${cancelled.confirmationCode} is cancelled. ${charged.minor === 0 ? 'No fee.' : `A real booking on this rate would be charged ${formatMoney(charged)}; this booking held no room for anyone, and nothing is charged.`}`
10216
+ : `${cancelled.confirmationCode} is cancelled. ${charged.minor === 0 ? 'No fee.' : `The hotel charges ${formatMoney(charged)}.`}${cancelled.paymentNotConnected ? ` ${notPaidWords(cancelled)}` : ''}`,
9877
10217
  couponNow?.said ?? '',
9878
10218
  demoBookingNote(deps, cancelled.supplier),
9879
10219
  ]
9880
10220
  .filter(Boolean)
9881
- .join(' '),
10221
+ .join(' ')
10222
+ .concat(addOnsDone ? `\n${addOnsDone.text}` : ''),
9882
10223
  };
9883
10224
  }
9884
10225
  if (name === t.compare) {