@curless/hotel-storefront 0.54.0 → 0.55.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.
- package/dist/backend.d.ts +9 -0
- package/dist/backend.d.ts.map +1 -1
- package/dist/backend.js.map +1 -1
- package/dist/card.generated.d.ts +1 -1
- package/dist/card.generated.js +2 -2
- package/dist/card.generated.js.map +1 -1
- package/dist/config.d.ts +40 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/demo-hotels.d.ts.map +1 -1
- package/dist/demo-hotels.js +29 -13
- package/dist/demo-hotels.js.map +1 -1
- package/dist/fence.d.ts.map +1 -1
- package/dist/fence.js +4 -3
- package/dist/fence.js.map +1 -1
- package/dist/huazhu/backend.d.ts.map +1 -1
- package/dist/huazhu/backend.js +17 -22
- package/dist/huazhu/backend.js.map +1 -1
- package/dist/huazhu/catalog.d.ts +6 -6
- package/dist/huazhu/catalog.d.ts.map +1 -1
- package/dist/huazhu/catalog.js +6 -9
- package/dist/huazhu/catalog.js.map +1 -1
- package/dist/legal.d.ts.map +1 -1
- package/dist/legal.js +104 -80
- package/dist/legal.js.map +1 -1
- package/dist/lib.d.ts +1 -1
- package/dist/lib.d.ts.map +1 -1
- package/dist/lib.js +1 -1
- package/dist/lib.js.map +1 -1
- package/dist/otaless/backend.d.ts +31 -0
- package/dist/otaless/backend.d.ts.map +1 -0
- package/dist/otaless/backend.js +502 -0
- package/dist/otaless/backend.js.map +1 -0
- package/dist/otaless/client.d.ts +103 -0
- package/dist/otaless/client.d.ts.map +1 -0
- package/dist/otaless/client.js +110 -0
- package/dist/otaless/client.js.map +1 -0
- package/dist/otaless/fake.d.ts +27 -0
- package/dist/otaless/fake.d.ts.map +1 -0
- package/dist/otaless/fake.js +239 -0
- package/dist/otaless/fake.js.map +1 -0
- package/dist/otaless/make.d.ts +4 -0
- package/dist/otaless/make.d.ts.map +1 -0
- package/dist/otaless/make.js +71 -0
- package/dist/otaless/make.js.map +1 -0
- package/dist/paid.d.ts +4 -1
- package/dist/paid.d.ts.map +1 -1
- package/dist/paid.js +14 -14
- package/dist/paid.js.map +1 -1
- package/dist/present.d.ts +6 -1
- package/dist/present.d.ts.map +1 -1
- package/dist/present.js +20 -5
- package/dist/present.js.map +1 -1
- package/dist/reference.d.ts.map +1 -1
- package/dist/reference.js +10 -10
- package/dist/reference.js.map +1 -1
- package/dist/server.d.ts +8 -2
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +26 -4
- package/dist/server.js.map +1 -1
- package/dist/supplier.d.ts.map +1 -1
- package/dist/supplier.js +3 -0
- package/dist/supplier.js.map +1 -1
- package/dist/surface.d.ts.map +1 -1
- package/dist/surface.js +87 -67
- package/dist/surface.js.map +1 -1
- package/dist/tools.d.ts +12 -1
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +166 -111
- package/dist/tools.js.map +1 -1
- package/dist/types.d.ts +35 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/vocab.d.ts +0 -28
- package/dist/vocab.d.ts.map +1 -1
- package/dist/vocab.js +19 -46
- package/dist/vocab.js.map +1 -1
- package/package.json +1 -1
package/dist/huazhu/backend.js
CHANGED
|
@@ -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
|
-
?
|
|
1645
|
-
:
|
|
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
|
-
// ⚠️
|
|
4245
|
-
//
|
|
4246
|
-
|
|
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.
|
|
4249
|
-
? ' This
|
|
4250
|
-
:
|
|
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.
|
|
4253
|
+
const paidTestNote = opts.sandbox
|
|
4255
4254
|
? ' This booking was not sent to Huazhu, and no real money moves.'
|
|
4256
|
-
: opts.
|
|
4257
|
-
? ' This
|
|
4258
|
-
:
|
|
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.
|
|
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.
|
|
4311
|
-
? `${rule} This
|
|
4312
|
-
:
|
|
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,
|