@curless/hotel-storefront 0.54.0 → 0.55.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/backend.d.ts +9 -0
  2. package/dist/backend.d.ts.map +1 -1
  3. package/dist/backend.js.map +1 -1
  4. package/dist/card.generated.d.ts +1 -1
  5. package/dist/card.generated.js +2 -2
  6. package/dist/card.generated.js.map +1 -1
  7. package/dist/config.d.ts +33 -2
  8. package/dist/config.d.ts.map +1 -1
  9. package/dist/config.js.map +1 -1
  10. package/dist/demo-hotels.d.ts.map +1 -1
  11. package/dist/demo-hotels.js +29 -13
  12. package/dist/demo-hotels.js.map +1 -1
  13. package/dist/fence.d.ts.map +1 -1
  14. package/dist/fence.js +4 -3
  15. package/dist/fence.js.map +1 -1
  16. package/dist/huazhu/backend.d.ts.map +1 -1
  17. package/dist/huazhu/backend.js +17 -22
  18. package/dist/huazhu/backend.js.map +1 -1
  19. package/dist/huazhu/catalog.d.ts +6 -6
  20. package/dist/huazhu/catalog.d.ts.map +1 -1
  21. package/dist/huazhu/catalog.js +6 -9
  22. package/dist/huazhu/catalog.js.map +1 -1
  23. package/dist/legal.d.ts.map +1 -1
  24. package/dist/legal.js +104 -80
  25. package/dist/legal.js.map +1 -1
  26. package/dist/lib.d.ts +1 -1
  27. package/dist/lib.d.ts.map +1 -1
  28. package/dist/lib.js +1 -1
  29. package/dist/lib.js.map +1 -1
  30. package/dist/otaless/backend.d.ts +31 -0
  31. package/dist/otaless/backend.d.ts.map +1 -0
  32. package/dist/otaless/backend.js +502 -0
  33. package/dist/otaless/backend.js.map +1 -0
  34. package/dist/otaless/client.d.ts +103 -0
  35. package/dist/otaless/client.d.ts.map +1 -0
  36. package/dist/otaless/client.js +110 -0
  37. package/dist/otaless/client.js.map +1 -0
  38. package/dist/otaless/fake.d.ts +27 -0
  39. package/dist/otaless/fake.d.ts.map +1 -0
  40. package/dist/otaless/fake.js +239 -0
  41. package/dist/otaless/fake.js.map +1 -0
  42. package/dist/otaless/make.d.ts +4 -0
  43. package/dist/otaless/make.d.ts.map +1 -0
  44. package/dist/otaless/make.js +71 -0
  45. package/dist/otaless/make.js.map +1 -0
  46. package/dist/paid.d.ts.map +1 -1
  47. package/dist/paid.js +9 -11
  48. package/dist/paid.js.map +1 -1
  49. package/dist/present.d.ts +6 -1
  50. package/dist/present.d.ts.map +1 -1
  51. package/dist/present.js +20 -5
  52. package/dist/present.js.map +1 -1
  53. package/dist/reference.d.ts.map +1 -1
  54. package/dist/reference.js +10 -10
  55. package/dist/reference.js.map +1 -1
  56. package/dist/server.d.ts +2 -2
  57. package/dist/server.d.ts.map +1 -1
  58. package/dist/server.js +6 -4
  59. package/dist/server.js.map +1 -1
  60. package/dist/supplier.d.ts.map +1 -1
  61. package/dist/supplier.js +3 -0
  62. package/dist/supplier.js.map +1 -1
  63. package/dist/surface.d.ts.map +1 -1
  64. package/dist/surface.js +86 -66
  65. package/dist/surface.js.map +1 -1
  66. package/dist/tools.d.ts +8 -0
  67. package/dist/tools.d.ts.map +1 -1
  68. package/dist/tools.js +152 -109
  69. package/dist/tools.js.map +1 -1
  70. package/dist/types.d.ts +35 -0
  71. package/dist/types.d.ts.map +1 -1
  72. package/dist/vocab.d.ts +0 -28
  73. package/dist/vocab.d.ts.map +1 -1
  74. package/dist/vocab.js +19 -46
  75. package/dist/vocab.js.map +1 -1
  76. package/package.json +1 -1
@@ -1641,8 +1641,8 @@ export const createHuazhuHotels = (opts) => {
1641
1641
  const refresh = async (found) => (await lookAt(found)).booking;
1642
1642
  /** Why a booking cannot be cancelled yet: Huazhu has not said whether it exists. */
1643
1643
  const waitingWords = (b) => b.status === 'unconfirmed'
1644
- ? `${opts.sandbox && !opts.inMarket ? 'The simulated Huazhu' : 'Huazhu'} has not said whether this booking was made, and a person here is confirming it. It cannot be cancelled here until then - ask again later.`
1645
- : `${opts.sandbox && !opts.inMarket ? 'The simulated Huazhu' : 'Huazhu'} has not confirmed this booking yet - that takes up to eight minutes. It can be cancelled once it is confirmed.`;
1644
+ ? 'Huazhu has not said whether this booking was made, and a person here is confirming it. It cannot be cancelled here until then - ask again later.'
1645
+ : 'Huazhu has not confirmed this booking yet - that takes up to eight minutes. It can be cancelled once it is confirmed.';
1646
1646
  const feeNow = (b, at = now()) => {
1647
1647
  const policy = policyOf(b.cancelCode);
1648
1648
  const amounts = {
@@ -4241,23 +4241,20 @@ export const createHuazhuHotels = (opts) => {
4241
4241
  // said for Huazhu's test system only, so in the sandbox the "nothing
4242
4242
  // comes back" and "cannot be cancelled" previews said nothing of being a
4243
4243
  // test - while the "all of it back" one did.
4244
- // ⚠️ ONE WORD PER ENVIRONMENT (0.54.0, M9): "simulated" on the simulated Huazhu, "test"
4245
- // on Huazhu's test system - and in a market neither, only the fact.
4246
- const testNote = opts.inMarket && (opts.sandbox || opts.testEnvironment)
4244
+ // ⚠️ THE FACT, NO ENVIRONMENT'S NAME (robin, 2026-11-03: 「不用特意写不是真的」): the
4245
+ // simulated Huazhu's booking was not sent to Huazhu; one in Huazhu's test system
4246
+ // holds no room for anyone - and nothing is charged in either.
4247
+ const testNote = opts.sandbox
4247
4248
  ? ' This booking was not sent to Huazhu: nothing is charged to anyone.'
4248
- : opts.sandbox
4249
- ? ' This is a simulated booking in the simulated Huazhu: nothing is charged to anyone.'
4250
- : opts.testEnvironment
4251
- ? " This is a test booking in Huazhu's test system: nothing is charged to anyone."
4252
- : '';
4249
+ : opts.testEnvironment
4250
+ ? ' This booking holds no room for anyone: nothing is charged to anyone.'
4251
+ : '';
4253
4252
  // A booking paid here in advance, in either: the money is not real either.
4254
- const paidTestNote = opts.inMarket && (opts.sandbox || opts.testEnvironment)
4253
+ const paidTestNote = opts.sandbox
4255
4254
  ? ' This booking was not sent to Huazhu, and no real money moves.'
4256
- : opts.sandbox
4257
- ? ' This is a simulated booking in the simulated Huazhu, paid on a card page where no real money moves.'
4258
- : opts.testEnvironment
4259
- ? ' This is a test booking in Huazhu’s test system, paid in test mode: no real money moves.'
4260
- : '';
4255
+ : opts.testEnvironment
4256
+ ? ' This booking holds no room for anyone, and no real money moves.'
4257
+ : '';
4261
4258
  // Paid with UnionPay: Huazhu charged the one-time card, and gives back
4262
4259
  // to it what its terms allow - nothing passes through here (audit P0-C:
4263
4260
  // it was told as "paid at the hotel, nothing paid through here").
@@ -4305,13 +4302,11 @@ export const createHuazhuHotels = (opts) => {
4305
4302
  refund: zero,
4306
4303
  rule: forbidden
4307
4304
  ? `This rate cannot be cancelled now. ${rule}`
4308
- : opts.inMarket && (opts.sandbox || opts.testEnvironment)
4305
+ : opts.sandbox
4309
4306
  ? `${rule} This booking was not sent to Huazhu: the fee is worked out as a real booking's would be, and nothing is charged to anyone.`
4310
- : opts.sandbox
4311
- ? `${rule} This is a simulated booking in the simulated Huazhu: the fee is worked out as a real booking's would be, and nothing is charged to anyone.`
4312
- : opts.testEnvironment
4313
- ? `${rule} This is a test booking in Huazhu's test system: the fee is worked out as a real booking's would be, and nothing is charged to anyone.`
4314
- : `${rule} Nothing was paid here - the booking is paid at the hotel - so any fee is charged under the hotel's terms, and Huazhu works out the exact amount when it cancels.`,
4307
+ : opts.testEnvironment
4308
+ ? `${rule} This booking holds no room for anyone: the fee is worked out as a real booking's would be, and nothing is charged to anyone.`
4309
+ : `${rule} Nothing was paid here - the booking is paid at the hotel - so any fee is charged under the hotel's terms, and Huazhu works out the exact amount when it cancels.`,
4315
4310
  ...(freeUntil ? { freeUntil: new Date(freeUntil).toISOString() } : {}),
4316
4311
  cancellable: !forbidden,
4317
4312
  ...facts,