@curless/hotel-storefront 0.75.0 → 0.75.2
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/account/index.d.ts +12 -3
- package/dist/account/index.d.ts.map +1 -1
- package/dist/account/index.js +38 -1
- package/dist/account/index.js.map +1 -1
- package/dist/account/member-login.d.ts +6 -1
- package/dist/account/member-login.d.ts.map +1 -1
- package/dist/account/member-login.js +1 -1
- package/dist/account/member-login.js.map +1 -1
- package/dist/backend.d.ts +21 -1
- 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/choices.d.ts +16 -17
- package/dist/choices.d.ts.map +1 -1
- package/dist/choices.js +18 -43
- package/dist/choices.js.map +1 -1
- package/dist/config.d.ts +12 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/huazhu/backend.d.ts +16 -1
- package/dist/huazhu/backend.d.ts.map +1 -1
- package/dist/huazhu/backend.js +39 -4
- package/dist/huazhu/backend.js.map +1 -1
- package/dist/huazhu/catalog.d.ts +9 -1
- package/dist/huazhu/catalog.d.ts.map +1 -1
- package/dist/huazhu/catalog.js +33 -3
- package/dist/huazhu/catalog.js.map +1 -1
- package/dist/huazhu/english.d.ts +12 -1
- package/dist/huazhu/english.d.ts.map +1 -1
- package/dist/huazhu/english.js +55 -4
- package/dist/huazhu/english.js.map +1 -1
- package/dist/huazhu/make.d.ts.map +1 -1
- package/dist/huazhu/make.js +14 -0
- package/dist/huazhu/make.js.map +1 -1
- package/dist/legal.d.ts.map +1 -1
- package/dist/legal.js +7 -6
- package/dist/legal.js.map +1 -1
- package/dist/otaless/backend.d.ts +6 -0
- package/dist/otaless/backend.d.ts.map +1 -1
- package/dist/otaless/backend.js +86 -7
- package/dist/otaless/backend.js.map +1 -1
- package/dist/otaless/booking.d.ts +29 -7
- package/dist/otaless/booking.d.ts.map +1 -1
- package/dist/otaless/booking.js +179 -34
- package/dist/otaless/booking.js.map +1 -1
- package/dist/present.d.ts.map +1 -1
- package/dist/present.js +3 -5
- package/dist/present.js.map +1 -1
- package/dist/server.d.ts +21 -2
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +340 -24
- package/dist/server.js.map +1 -1
- package/dist/surface.d.ts.map +1 -1
- package/dist/surface.js +30 -13
- package/dist/surface.js.map +1 -1
- package/dist/tools.d.ts +18 -1
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +166 -78
- package/dist/tools.js.map +1 -1
- package/dist/trip-ids.d.ts +44 -0
- package/dist/trip-ids.d.ts.map +1 -1
- package/dist/trip-ids.js +105 -1
- package/dist/trip-ids.js.map +1 -1
- package/dist/types.d.ts +16 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -33,6 +33,20 @@ export declare const NEEDS_PERSON_GIVE_UP_MS: number;
|
|
|
33
33
|
* said it is still waiting (总线程's re-review of 0.63.1, 2).
|
|
34
34
|
*/
|
|
35
35
|
export declare const ASSUMED_HOLD_MS: number;
|
|
36
|
+
/**
|
|
37
|
+
* 8 asking in another currency than the quote's (`released: 'currency'`) this many times in a
|
|
38
|
+
* row for the same room of the same hotel on the same nights: 8 is not sent for it again - each
|
|
39
|
+
* try made an order at the group, cancelled at once by 9 (0.75.1, the review's C4; questions
|
|
40
|
+
* #43, #67) - for `CURRENCY_HOLD_MS` after the last, then tried once more. In memory only.
|
|
41
|
+
*/
|
|
42
|
+
export declare const CURRENCY_TRIES = 2;
|
|
43
|
+
/** See `CURRENCY_TRIES`. */
|
|
44
|
+
export declare const CURRENCY_HOLD_MS: number;
|
|
45
|
+
/**
|
|
46
|
+
* The failed stay's code for that (0.75.1, C4) - new for the card (酒店平台's next version, beside
|
|
47
|
+
* `NoRoomsCode`): until it knows it, the card says the sentence as it is.
|
|
48
|
+
*/
|
|
49
|
+
export declare const CURRENCY_CODE: FailedStay["code"];
|
|
36
50
|
/** What the payment status (15) says of a payment that can no longer be made. */
|
|
37
51
|
export declare const CLOSED_PAYMENT_STATUSES: ReadonlySet<string>;
|
|
38
52
|
/**
|
|
@@ -228,8 +242,10 @@ export type OrderRecord = {
|
|
|
228
242
|
* none (`amount`), it was for another number of guests (`adults`), its
|
|
229
243
|
* payment page was not on the list (`address`), or terms it came with were
|
|
230
244
|
* not agreed to (`terms`) - or 8 refused it and made it all the same (`refused`).
|
|
245
|
+
* `currency` (0.75.1, the review's C4): 8 asked in another currency than the quote's
|
|
246
|
+
* own - and not the quote's USD figure - a group's labels, not a price that moved.
|
|
231
247
|
*/
|
|
232
|
-
released?: 'price' | 'amount' | 'adults' | 'address' | 'terms' | 'confirm' | 'confirm-unsent' | 'refused';
|
|
248
|
+
released?: 'price' | 'currency' | 'amount' | 'adults' | 'address' | 'terms' | 'confirm' | 'confirm-unsent' | 'refused';
|
|
233
249
|
/**
|
|
234
250
|
* 8 refused for another reason than a step - sold out, say - and its answer
|
|
235
251
|
* named an order all the same (总线程 11-12, on 0.68.0's review): that order,
|
|
@@ -246,17 +262,23 @@ export type OrderRecord = {
|
|
|
246
262
|
releaseFailed?: true;
|
|
247
263
|
/**
|
|
248
264
|
* What was paid, as the group reported it - the payment status (15) or a
|
|
249
|
-
* PAID order row (12)
|
|
250
|
-
*
|
|
265
|
+
* PAID order row (12): one of the amounts asked - or, with `needsPerson:
|
|
266
|
+
* 'paid-amount'` (0.75.1), another. What the booking says was paid and a
|
|
267
|
+
* refund previews (总线程's re-review of 0.63.1, 3).
|
|
251
268
|
*/
|
|
252
269
|
paidAmount?: Money;
|
|
253
270
|
/** When the payment status (15) last said it is still waiting to be paid, ISO. */
|
|
254
271
|
pendingSeenAt?: string;
|
|
255
272
|
/**
|
|
256
|
-
* A person looks
|
|
257
|
-
*
|
|
258
|
-
* (`
|
|
259
|
-
*
|
|
273
|
+
* A person looks: said paid at an amount that is none of the ones asked - or
|
|
274
|
+
* with none (`paid-amount`); or an order we cancel at once whose cancelling did
|
|
275
|
+
* not go through (`release` - it may still stand at the group, and must not be
|
|
276
|
+
* paid: shown as `unconfirmed`, no payment link handed on).
|
|
277
|
+
*
|
|
278
|
+
* ⚠️ PAID IS PAID (0.75.1, the review's P1-b): a `paid-amount` order is `paid`, at
|
|
279
|
+
* what was paid (`paidAmount`) - shown, previewed and cancelled (9, and 9.1) as
|
|
280
|
+
* any paid order. Only the difference is the person's: NEEDS A PERSON on the log.
|
|
281
|
+
* Kept from before 0.75.1 unpaid, it is taken as paid when the service starts.
|
|
260
282
|
*/
|
|
261
283
|
needsPerson?: 'paid-amount' | 'release';
|
|
262
284
|
/** When `needsPerson` was set, ISO (none before 0.67: `createdAt` stands in). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"booking.d.ts","sourceRoot":"","sources":["../../src/otaless/booking.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,WAAW,EAAgB,MAAM,eAAe,CAAC;AAI/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EACV,OAAO,EAEP,aAAa,EACb,mBAAmB,EACnB,KAAK,EACL,UAAU,EACV,KAAK,EACL,KAAK,EACL,QAAQ,EACR,KAAK,EACL,KAAK,EACL,KAAK,EAEL,IAAI,EACJ,SAAS,EACT,UAAU,EACX,MAAM,aAAa,CAAC;AACrB,OAAO,EAIL,KAAK,IAAI,EAGT,KAAK,aAAa,EAIlB,KAAK,IAAI,EAMT,KAAK,SAAS,EAKf,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AA6C1C;;;;GAIG;AACH,eAAO,MAAM,QAAQ,QAAc,CAAC;AACpC,kEAAkE;AAClE,eAAO,MAAM,eAAe,QAAkB,CAAC;AAC/C,gFAAgF;AAChF,eAAO,MAAM,eAAe,QAAS,CAAC;AACtC;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,QAA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;+BAUxE,MAAM,OACN,QAAQ,KACZ,OAAO,CAAC,0BAA0B,GAAG,IAAI,CAAC;yBAmFtC,MAAM,OACN,QAAQ,WACJ,MAAM,KACd,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;;CAgW3B,CAAC"}
|
package/dist/otaless/booking.js
CHANGED
|
@@ -77,6 +77,20 @@ export const NEEDS_PERSON_GIVE_UP_MS = 2 * 60 * 60_000;
|
|
|
77
77
|
* said it is still waiting (总线程's re-review of 0.63.1, 2).
|
|
78
78
|
*/
|
|
79
79
|
export const ASSUMED_HOLD_MS = 30 * 60_000;
|
|
80
|
+
/**
|
|
81
|
+
* 8 asking in another currency than the quote's (`released: 'currency'`) this many times in a
|
|
82
|
+
* row for the same room of the same hotel on the same nights: 8 is not sent for it again - each
|
|
83
|
+
* try made an order at the group, cancelled at once by 9 (0.75.1, the review's C4; questions
|
|
84
|
+
* #43, #67) - for `CURRENCY_HOLD_MS` after the last, then tried once more. In memory only.
|
|
85
|
+
*/
|
|
86
|
+
export const CURRENCY_TRIES = 2;
|
|
87
|
+
/** See `CURRENCY_TRIES`. */
|
|
88
|
+
export const CURRENCY_HOLD_MS = 6 * 60 * 60_000;
|
|
89
|
+
/**
|
|
90
|
+
* The failed stay's code for that (0.75.1, C4) - new for the card (酒店平台's next version, beside
|
|
91
|
+
* `NoRoomsCode`): until it knows it, the card says the sentence as it is.
|
|
92
|
+
*/
|
|
93
|
+
export const CURRENCY_CODE = 'currency-mismatch';
|
|
80
94
|
/** What the payment status (15) says of a payment that can no longer be made. */
|
|
81
95
|
export const CLOSED_PAYMENT_STATUSES = new Set([
|
|
82
96
|
'EXPIRED',
|
|
@@ -202,6 +216,8 @@ const CHECKED_PER_LOOK = 5;
|
|
|
202
216
|
* alone must still name the order (总线程's review of 0.66.0, 2).
|
|
203
217
|
*/
|
|
204
218
|
export const DEFAULT_CHECKOUT_HOSTS = ['pay.discoverasr.com'];
|
|
219
|
+
/** An order that holds nothing any more. */
|
|
220
|
+
const ENDED = new Set(['cancelled', 'expired', 'failed']);
|
|
205
221
|
/** How long a refund's preview can be sent back (总线程's review of 0.63.0, B). */
|
|
206
222
|
export const REFUND_PREVIEW_MS = 10 * 60_000;
|
|
207
223
|
/** How long the 7 before the group's terms stands for the 7 before the order, on a 10014 (`pricedRecently`). */
|
|
@@ -1001,6 +1017,13 @@ export const createOtalessBookings = (deps) => {
|
|
|
1001
1017
|
const asked = (m, r) => same(m, r.charged) || same(m, r.quoted) || same(m, r.quotedUsd);
|
|
1002
1018
|
/** What was paid - as the group reported it, else what the order asked (总线程's re-review of 0.63.1, 3). */
|
|
1003
1019
|
const paidOf = (r) => r.paidAmount ?? r.charged ?? r.quoted;
|
|
1020
|
+
/**
|
|
1021
|
+
* Shown as a person's (`unconfirmed`, nothing of its money said, no link): an order with a
|
|
1022
|
+
* person that was not paid - one we could not cancel at once (`release`). ⚠️ NOT ONE THAT WAS
|
|
1023
|
+
* PAID (0.75.1, the review's P1-b): paid at another amount (`paid-amount`), it is paid - said
|
|
1024
|
+
* so at what was paid, and cancelled with its refund; the difference is the person's.
|
|
1025
|
+
*/
|
|
1026
|
+
const withPerson = (r) => !!r.needsPerson && !r.paid;
|
|
1004
1027
|
/**
|
|
1005
1028
|
* Until when an order waiting for its payment may still be paid: 13's time,
|
|
1006
1029
|
* else `ASSUMED_HOLD_MS` after it was made or last said waiting (总线程's
|
|
@@ -1009,8 +1032,9 @@ export const createOtalessBookings = (deps) => {
|
|
|
1009
1032
|
const payableUntil = (r) => r.payBy ? Date.parse(r.payBy) : Date.parse(r.pendingSeenAt ?? r.createdAt) + ASSUMED_HOLD_MS;
|
|
1010
1033
|
const paymentOf = (r) => {
|
|
1011
1034
|
const amount = paidOf(r);
|
|
1012
|
-
//
|
|
1013
|
-
|
|
1035
|
+
// With a person and not paid: nothing about its money is said but by a person. Paid at
|
|
1036
|
+
// another amount (0.75.1): said as paid, at what was paid - below, as any paid order.
|
|
1037
|
+
if (withPerson(r))
|
|
1014
1038
|
return undefined;
|
|
1015
1039
|
if (r.refund)
|
|
1016
1040
|
return {
|
|
@@ -1076,8 +1100,9 @@ export const createOtalessBookings = (deps) => {
|
|
|
1076
1100
|
id: r.id,
|
|
1077
1101
|
supplier: r.group,
|
|
1078
1102
|
confirmationCode: r.code || r.id,
|
|
1079
|
-
// A person is looking at
|
|
1080
|
-
|
|
1103
|
+
// A person is looking at it, not paid: not known, as the type says it. ⚠️ PAID IS PAID
|
|
1104
|
+
// (0.75.1): one paid at another amount is its own status - confirmed, paid.
|
|
1105
|
+
status: withPerson(r) ? 'unconfirmed' : r.status,
|
|
1081
1106
|
createdAt: r.createdAt,
|
|
1082
1107
|
hotelId: r.hotelId,
|
|
1083
1108
|
hotelName: r.hotelName,
|
|
@@ -1097,14 +1122,16 @@ export const createOtalessBookings = (deps) => {
|
|
|
1097
1122
|
};
|
|
1098
1123
|
// Beside the type, for the words (0.63.2): why it is not known - and (11-11,
|
|
1099
1124
|
// D) an order whose payment page waits for terms the group answered it with.
|
|
1100
|
-
return Object.assign(booking, r.unverifiable ? { unverifiable: true } : {},
|
|
1125
|
+
return Object.assign(booking, r.unverifiable ? { unverifiable: true } : {},
|
|
1126
|
+
// With status `unconfirmed` only, as the type has it: a paid one is said as paid (0.75.1).
|
|
1127
|
+
withPerson(r) && r.needsPerson ? { needsPerson: r.needsPerson } : {}, r.held?.step === 'confirm'
|
|
1101
1128
|
? { confirmAsked: true, termsUntil: r.held.until }
|
|
1102
1129
|
: r.held
|
|
1103
1130
|
? { termsChanged: true, termsUntil: r.held.until }
|
|
1104
1131
|
: {},
|
|
1105
1132
|
// With a person past its time and the guest told so: no longer holds the stay
|
|
1106
1133
|
// back (总线程's review of 0.66.0, 6) - the words must not say it does.
|
|
1107
|
-
r
|
|
1134
|
+
withPerson(r) && r.rebookable ? { rebookable: true } : {},
|
|
1108
1135
|
// Beside the type, for the words (酒店平台 0.67.1, robin 11-12): a step the
|
|
1109
1136
|
// group asked for with nothing to show - it may need the group to confirm
|
|
1110
1137
|
// it separately; and an order made with no terms to agree to.
|
|
@@ -1395,6 +1422,7 @@ export const createOtalessBookings = (deps) => {
|
|
|
1395
1422
|
/** What the group's staff are told an order was cancelled for. */
|
|
1396
1423
|
const RELEASE_REASON = {
|
|
1397
1424
|
price: 'amount not as quoted',
|
|
1425
|
+
currency: 'currency not as quoted',
|
|
1398
1426
|
amount: 'no amount given',
|
|
1399
1427
|
adults: 'guests not as asked',
|
|
1400
1428
|
address: 'payment page not accepted',
|
|
@@ -1447,6 +1475,7 @@ export const createOtalessBookings = (deps) => {
|
|
|
1447
1475
|
};
|
|
1448
1476
|
const releasedWhy = (g, why) => ({
|
|
1449
1477
|
price: `${g} asked for a different amount than the price the guest was shown`,
|
|
1478
|
+
currency: `${g} took the order in another currency than the price the guest was shown`,
|
|
1450
1479
|
amount: `${g} did not say what it would charge`,
|
|
1451
1480
|
adults: `${g} took the order for another number of guests than the guest chose`,
|
|
1452
1481
|
address: `${g} sent a payment page whose address does not match this booking`,
|
|
@@ -1455,22 +1484,47 @@ export const createOtalessBookings = (deps) => {
|
|
|
1455
1484
|
'confirm-unsent': `${g} asked for the order to be confirmed first, and that confirmation cannot be sent back from here yet`,
|
|
1456
1485
|
refused: `${g} turned the booking down, yet made the order its answer named`,
|
|
1457
1486
|
})[why];
|
|
1487
|
+
/**
|
|
1488
|
+
* 8 asking in another currency than the quote's, by group, hotel, room and nights (0.75.1, the
|
|
1489
|
+
* review's C4): how many times in a row, and when last - see `CURRENCY_TRIES`. In memory only.
|
|
1490
|
+
*/
|
|
1491
|
+
const currencyStrikes = new Map();
|
|
1492
|
+
const currencyKey = (group, hotelId, roomId, stay) => `${group}|${hotelId}|${roomId}|${stay.checkIn}|${stay.checkOut}`;
|
|
1493
|
+
/** This room on these nights is not sent to 8 now: its currency was not the quote's, again. */
|
|
1494
|
+
const currencyHeld = (group, hotelId, roomId, stay) => {
|
|
1495
|
+
const k = currencyStrikes.get(currencyKey(group, hotelId, roomId, stay));
|
|
1496
|
+
return !!k && k.n >= CURRENCY_TRIES && now() - k.at < CURRENCY_HOLD_MS;
|
|
1497
|
+
};
|
|
1498
|
+
/**
|
|
1499
|
+
* What the guest can do instead, where this room on these nights cannot be booked here (0.75.1,
|
|
1500
|
+
* the review's C3 and C4) - never "ask again".
|
|
1501
|
+
*/
|
|
1502
|
+
const elsewhere = (g) => `What the guest can do instead: choose another room, other dates or another hotel here, or book on ${g}'s own website or app.`;
|
|
1503
|
+
/** Said where a room's currency was not the quote's, twice in a row: nothing sent (C4). */
|
|
1504
|
+
const currencyRefused = (a) => failedStay(a, `${deps.groupOf(a.group).name} took the last orders for this room on these nights in another currency than the price shown, so it cannot be booked here at this price just now - nothing was sent to ${deps.groupOf(a.group).name} this time, and nothing was charged. ${elsewhere(deps.groupOf(a.group).name)}`, CURRENCY_CODE);
|
|
1458
1505
|
/** An order made that is not the one asked for: cancelled at once, and said as it came out. */
|
|
1459
1506
|
const letGo = async (a, r, why) => {
|
|
1460
1507
|
const g = deps.groupOf(a.group).name;
|
|
1461
1508
|
const gone = await release(a.acct, a.who, r, why);
|
|
1462
1509
|
if (gone)
|
|
1463
1510
|
return {
|
|
1464
|
-
failed: failedStay(a,
|
|
1511
|
+
failed: failedStay(a,
|
|
1512
|
+
// ⚠️ ANOTHER CURRENCY IS NOT A PRICE THAT MOVED (0.75.1, the review's C4): never "price
|
|
1513
|
+
// the trip again" - each try made an order at the group, cancelled at once.
|
|
1514
|
+
why === 'currency'
|
|
1515
|
+
? `${releasedWhy(g, why)}, so this price cannot be booked here just now - the order was cancelled at once and nothing was charged. ${elsewhere(g)}`
|
|
1516
|
+
: `${releasedWhy(g, why)}, so the order was cancelled at once and nothing was charged.${why === 'price' ? ' Price the trip again.' : ''}`,
|
|
1465
1517
|
// For the card to say in the guest's language (酒店平台 0.66.0, `NoRoomsCode`).
|
|
1466
|
-
why === '
|
|
1467
|
-
?
|
|
1468
|
-
: why === '
|
|
1469
|
-
? '
|
|
1470
|
-
: why === '
|
|
1471
|
-
?
|
|
1472
|
-
|
|
1473
|
-
|
|
1518
|
+
why === 'currency'
|
|
1519
|
+
? CURRENCY_CODE
|
|
1520
|
+
: why === 'price' || why === 'amount'
|
|
1521
|
+
? 'price-changed'
|
|
1522
|
+
: why === 'confirm-unsent'
|
|
1523
|
+
? 'group-confirm'
|
|
1524
|
+
: why === 'address'
|
|
1525
|
+
? // Its own words (0.71.3): the page did not match - never "not the one you chose".
|
|
1526
|
+
'pay-page-refused'
|
|
1527
|
+
: 'order-cancelled'),
|
|
1474
1528
|
};
|
|
1475
1529
|
// ⚠️ SAID AS IT IS: an order stands at the group that is not the one asked
|
|
1476
1530
|
// for - never "not booked". Listed, with no page to pay it on.
|
|
@@ -1570,6 +1624,25 @@ export const createOtalessBookings = (deps) => {
|
|
|
1570
1624
|
.slice(0, 10)
|
|
1571
1625
|
.map((id) => forTheLog(id))
|
|
1572
1626
|
.join(', ')}${older.length > 10 ? ', …' : ''}) - each was logged when it happened, as one for a person; once a person has taken one up, write refund.handledAt on it in otaless-orders.json (service stopped)`);
|
|
1627
|
+
// ⚠️ PAID AT ANOTHER AMOUNT, KEPT FROM BEFORE 0.75.1 AS NOT PAID (the review's P1-b): its group
|
|
1628
|
+
// said it was paid. Taken as paid now, as a PAID row is (`lookAtOrders`) - confirmed unless it
|
|
1629
|
+
// was cancelled - so it is said as paid and its cancel asks the money back. What was paid was
|
|
1630
|
+
// not kept then (the log of then has it): said at what was asked until a person writes it.
|
|
1631
|
+
// One already cancelled was cancelled as unpaid - 9 alone, its answer not read for a refund and
|
|
1632
|
+
// no 9.1: whether its money went back is not known (`unsure`, as a 9.1 not answered), and the
|
|
1633
|
+
// service says so when it starts, as of any such refund.
|
|
1634
|
+
for (const r of [...orders.values()]) {
|
|
1635
|
+
if (r.needsPerson !== 'paid-amount' || r.paid)
|
|
1636
|
+
continue;
|
|
1637
|
+
r.paid = true;
|
|
1638
|
+
const cancelled = r.status === 'cancelled';
|
|
1639
|
+
if (!cancelled)
|
|
1640
|
+
r.status = 'confirmed';
|
|
1641
|
+
else if (!r.refund)
|
|
1642
|
+
r.refund = { status: 'unsure' };
|
|
1643
|
+
save();
|
|
1644
|
+
log(`[otaless] NEEDS A PERSON: ${forTheLog(r.id)} at ${r.group} was said paid at another amount before 0.75.1 and kept as not paid - taken as paid now; what was paid is in the log of then (write paidAmount on it in otaless-orders.json, service stopped, or it is said at what was asked)${cancelled ? ' - it was cancelled as not paid, with no refund asked (9.1): whether its money went back is not known; check with the group' : ''}`);
|
|
1645
|
+
}
|
|
1573
1646
|
/**
|
|
1574
1647
|
* ⚠️ AN ORDER 8 NAMES THAT IS ONE OF OURS ALREADY IS NOT TOUCHED (总线程's
|
|
1575
1648
|
* review of 0.68.2, P2): a refusal - "already booked", say - may name the
|
|
@@ -1785,9 +1858,27 @@ export const createOtalessBookings = (deps) => {
|
|
|
1785
1858
|
r.atGroupAmount = true;
|
|
1786
1859
|
}
|
|
1787
1860
|
else if (!charged || !(same(charged, pairs.orig) || same(charged, pairs.usd))) {
|
|
1788
|
-
|
|
1789
|
-
|
|
1861
|
+
// ⚠️ ANOTHER CURRENCY THAN THE QUOTE'S OWN (0.75.1, the review's C4) - and not its USD
|
|
1862
|
+
// figure, which passed above: the group's labels (questions #43, #67), not a price that
|
|
1863
|
+
// moved. Counted for this room on these nights: `CURRENCY_TRIES` in a row and 8 is not sent.
|
|
1864
|
+
const otherCurrency = !!charged && charged.currency !== pairs.orig.currency;
|
|
1865
|
+
let strikes = 0;
|
|
1866
|
+
if (otherCurrency) {
|
|
1867
|
+
const k = currencyKey(a.group, a.hotel.id, a.roomId, a.stay);
|
|
1868
|
+
strikes = (currencyStrikes.get(k)?.n ?? 0) + 1;
|
|
1869
|
+
// Kept small: past this many, the ones whose hold is long over go.
|
|
1870
|
+
if (currencyStrikes.size >= PENDING_MAX)
|
|
1871
|
+
for (const [x, v] of currencyStrikes)
|
|
1872
|
+
if (x !== k && now() - v.at >= CURRENCY_HOLD_MS)
|
|
1873
|
+
currencyStrikes.delete(x);
|
|
1874
|
+
currencyStrikes.set(k, { n: strikes, at: now() });
|
|
1875
|
+
}
|
|
1876
|
+
log(`[otaless] booking at ${a.group} asked ${asked8 ? `${asked8.currency} ${asked8.minor}` : 'no amount'}, quoted ${pairs.orig.currency} ${pairs.orig.minor}${pairs.usd ? ` / USD ${pairs.usd.minor}` : ''} - cancelled${otherCurrency ? ` (another currency, ${strikes} in a row for this room and nights${strikes >= CURRENCY_TRIES ? ` - 8 not sent for them for ${CURRENCY_HOLD_MS / 3_600_000}h; questions #43, #67` : ''})` : ''}`);
|
|
1877
|
+
return letGo(a, r, otherCurrency ? 'currency' : charged ? 'price' : 'amount');
|
|
1790
1878
|
}
|
|
1879
|
+
// Its currency the quote's: the count of another currency starts again.
|
|
1880
|
+
if (charged && (charged.currency === pairs.orig.currency || same(charged, pairs.usd)))
|
|
1881
|
+
currencyStrikes.delete(currencyKey(a.group, a.hotel.id, a.roomId, a.stay));
|
|
1791
1882
|
// ── the guests (总线程 11-11, C - questions #62): said, it is the number quoted ──
|
|
1792
1883
|
const adults = num(w.adultCount ?? w.adults);
|
|
1793
1884
|
if (adults !== undefined && adults !== a.stay.guests) {
|
|
@@ -2256,8 +2347,13 @@ export const createOtalessBookings = (deps) => {
|
|
|
2256
2347
|
o.stay.checkIn === stay.checkIn &&
|
|
2257
2348
|
o.stay.checkOut === stay.checkOut &&
|
|
2258
2349
|
o.rooms === rooms;
|
|
2259
|
-
// A person's: said paid at another amount, or cancelled at once and not undone.
|
|
2260
|
-
|
|
2350
|
+
// A person's: said paid at another amount, or cancelled at once and not undone. ⚠️ ONE PAID AT
|
|
2351
|
+
// ANOTHER AMOUNT HOLDS THE STAY ONLY WHILE IT STANDS (0.75.1, 总线程 on P1-b): cancelled - or
|
|
2352
|
+
// lapsed, or failed - it holds nothing; the difference stays the person's, the stay is free.
|
|
2353
|
+
const people = [...orders.values()].filter((o) => sameStay(o) &&
|
|
2354
|
+
o.needsPerson &&
|
|
2355
|
+
!o.rebookable &&
|
|
2356
|
+
!(o.needsPerson === 'paid-amount' && ENDED.has(o.status)));
|
|
2261
2357
|
// ⚠️ THE WAY OUT (总线程's review of 0.66.0, 6), as for an order that could
|
|
2262
2358
|
// not be verified: with a person this long and still not settled, the stay
|
|
2263
2359
|
// is no longer held back. The guest is told first, as it is - it may stand
|
|
@@ -2334,6 +2430,10 @@ export const createOtalessBookings = (deps) => {
|
|
|
2334
2430
|
if (o.status === 'awaiting-payment' && !o.needsPerson && now() < payableUntil(o))
|
|
2335
2431
|
return { reuse: o };
|
|
2336
2432
|
}
|
|
2433
|
+
// ⚠️ ANOTHER CURRENCY, AGAIN, FOR THIS ROOM ON THESE NIGHTS (0.75.1, C4): said before any
|
|
2434
|
+
// terms are shown - nothing will be sent to 8 for it.
|
|
2435
|
+
if (currencyHeld(group, hotel.id, roomRef, stay))
|
|
2436
|
+
return { failed: currencyRefused({ ...label, group }) };
|
|
2337
2437
|
if (inFlight.has(lockKey))
|
|
2338
2438
|
return {
|
|
2339
2439
|
failed: failedStay(label, 'This stay is being booked already - look at the bookings in a moment rather than booking it again.'),
|
|
@@ -2721,8 +2821,10 @@ export const createOtalessBookings = (deps) => {
|
|
|
2721
2821
|
* link goes; `pending` - still waiting to be paid; `unknown` - not asked, not
|
|
2722
2822
|
* answered, or answered with nothing to go by.
|
|
2723
2823
|
*
|
|
2724
|
-
* ⚠️ PAID AT ANOTHER AMOUNT IS
|
|
2725
|
-
*
|
|
2824
|
+
* ⚠️ PAID AT ANOTHER AMOUNT IS PAID ALL THE SAME (0.75.1, the review's P1-b - it was "not
|
|
2825
|
+
* paid" from 总线程's re-review of 0.63.1, 3, and the guest who had paid was told nothing was
|
|
2826
|
+
* charged, and cancelling sent no refund): taken as paid at what was paid, its link gone; the
|
|
2827
|
+
* difference is a person's (`needsPerson`, NEEDS A PERSON on the log).
|
|
2726
2828
|
*/
|
|
2727
2829
|
const lookAtPayment = async (acct, who, r, force = false) => {
|
|
2728
2830
|
if (r.status !== 'awaiting-payment' || r.id.startsWith('pending:') || r.needsPerson)
|
|
@@ -2739,21 +2841,21 @@ export const createOtalessBookings = (deps) => {
|
|
|
2739
2841
|
const paid = s?.paid === true || said === 'PAID';
|
|
2740
2842
|
const amount = moneyOf(s?.amount, s?.currency);
|
|
2741
2843
|
if (paid) {
|
|
2742
|
-
|
|
2844
|
+
// ⚠️ AT ANOTHER AMOUNT: PAID, AND A PERSON SEES TO THE DIFFERENCE (0.75.1).
|
|
2845
|
+
const other = !!amount && !asked(amount, r);
|
|
2846
|
+
if (other) {
|
|
2743
2847
|
r.needsPerson = 'paid-amount';
|
|
2744
2848
|
r.needsPersonAt = iso();
|
|
2745
|
-
payLinks.delete(r.id);
|
|
2746
|
-
put(r);
|
|
2747
|
-
log(`[otaless] NEEDS A PERSON: ${forTheLog(r.id)} at ${r.group} paid ${amount.currency} ${amount.minor}, not what was asked - not taken as paid`);
|
|
2748
|
-
return 'unknown';
|
|
2749
2849
|
}
|
|
2750
2850
|
r.paid = true;
|
|
2751
2851
|
r.status = 'confirmed';
|
|
2752
|
-
// ⚠️ WHAT WAS PAID, AS SAID: what a refund previews.
|
|
2852
|
+
// ⚠️ WHAT WAS PAID, AS SAID: what the booking says and a refund previews.
|
|
2753
2853
|
if (amount)
|
|
2754
2854
|
r.paidAmount = amount;
|
|
2755
2855
|
payLinks.delete(r.id);
|
|
2756
2856
|
put(r);
|
|
2857
|
+
if (other && amount)
|
|
2858
|
+
log(`[otaless] NEEDS A PERSON: ${forTheLog(r.id)} at ${r.group} paid ${amount.currency} ${amount.minor}, not what was asked (${r.quoted.currency} ${r.quoted.minor}) - taken as paid at what was paid; the difference is to be settled with ${r.group}`);
|
|
2757
2859
|
return 'paid';
|
|
2758
2860
|
}
|
|
2759
2861
|
if (s?.pollAgain !== true &&
|
|
@@ -2800,22 +2902,27 @@ export const createOtalessBookings = (deps) => {
|
|
|
2800
2902
|
continue;
|
|
2801
2903
|
const r = orders.get(id);
|
|
2802
2904
|
if (r) {
|
|
2803
|
-
|
|
2905
|
+
// A person's and not paid (`release`): nothing of the row is taken. Paid at another
|
|
2906
|
+
// amount (0.75.1): a paid order, read as any other.
|
|
2907
|
+
if (r.owner !== acct.owner || r.released || r.status === 'unconfirmed' || withPerson(r))
|
|
2804
2908
|
continue;
|
|
2805
2909
|
const s = statusOfRow(row.status);
|
|
2806
|
-
// ⚠️ "PAID" AT ANOTHER AMOUNT - OR NONE - IS NOT PAID (总线程's re-review
|
|
2807
|
-
// of 0.63.1, 3): a person looks; nothing else of the row is taken.
|
|
2808
2910
|
if (s.paid && !r.paid) {
|
|
2809
2911
|
const amount = moneyOf(row.totalAmount, row.currency);
|
|
2912
|
+
// ⚠️ "PAID" AT ANOTHER AMOUNT - OR NONE - IS PAID ALL THE SAME (0.75.1, the review's
|
|
2913
|
+
// P1-b; "not paid" from 总线程's re-review of 0.63.1, 3): taken as paid at what the row
|
|
2914
|
+
// says was paid, as any PAID row below - and the difference is a person's.
|
|
2810
2915
|
if (!amount || !asked(amount, r)) {
|
|
2811
2916
|
r.needsPerson = 'paid-amount';
|
|
2812
2917
|
r.needsPersonAt = iso();
|
|
2813
2918
|
payLinks.delete(r.id);
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2919
|
+
log(`[otaless] NEEDS A PERSON: ${forTheLog(r.id)} at ${group} is listed PAID at ${amount ? `${amount.currency} ${amount.minor}` : 'no amount'}, not what was asked (${r.quoted.currency} ${r.quoted.minor}) - taken as paid at ${amount ? 'what was paid' : 'what was asked, as no amount was said'}; the difference is to be settled with ${group}`);
|
|
2920
|
+
// What was paid, as the row says it.
|
|
2921
|
+
if (amount)
|
|
2922
|
+
r.paidAmount = amount;
|
|
2817
2923
|
}
|
|
2818
|
-
|
|
2924
|
+
else
|
|
2925
|
+
r.paidAmount ??= amount;
|
|
2819
2926
|
}
|
|
2820
2927
|
// ⚠️ AN UNPAID ORDER STAYS WAITING ("CONFIRMED" is not paid, questions
|
|
2821
2928
|
// #53): only PAID, a cancellation or a failure moves it.
|
|
@@ -2909,6 +3016,22 @@ export const createOtalessBookings = (deps) => {
|
|
|
2909
3016
|
log(`[otaless] NEEDS A PERSON: an order 8 did not answer for was found at ${group} at another amount - not claimed`);
|
|
2910
3017
|
continue;
|
|
2911
3018
|
}
|
|
3019
|
+
// ⚠️ ITS STATUS TOO, NOT ONLY ITS AMOUNT AND PAGE (0.75.1, the review's C5): only a row
|
|
3020
|
+
// that stands (`LIVE_ROW_STATUSES`) is claimed as waiting or paid. One asking for a step
|
|
3021
|
+
// (terms, a confirmation) is cancelled by 9, as 8's own answer would have been, its page
|
|
3022
|
+
// never handed on; one that holds nothing (`DEAD_ROW_STATUSES`) is claimed as that; any
|
|
3023
|
+
// other name is not claimed - the stay stays "being looked into", for a person.
|
|
3024
|
+
const st = String(row.status ?? '')
|
|
3025
|
+
.trim()
|
|
3026
|
+
.toUpperCase();
|
|
3027
|
+
const step = /TERMS/.test(st) ? 'terms' : stepAsked(st);
|
|
3028
|
+
const live = LIVE_ROW_STATUSES.has(st);
|
|
3029
|
+
const dead = DEAD_ROW_STATUSES.has(st);
|
|
3030
|
+
const claimedAs = `an order 8 did not answer for (${forTheLog(id, [o.guest.name])}) is ${forTheLog(st || '?', [o.guest.name])} in the order list (12) at ${group}`;
|
|
3031
|
+
if (!live && !dead && !step) {
|
|
3032
|
+
log(`[otaless] NEEDS A PERSON: ${claimedAs} - a status not known here, not claimed`);
|
|
3033
|
+
continue;
|
|
3034
|
+
}
|
|
2912
3035
|
const s = statusOfRow(row.status);
|
|
2913
3036
|
const ok = payPageOf(text(row.checkoutUrl ?? undefined), deps.checkoutHosts, {
|
|
2914
3037
|
id,
|
|
@@ -2920,6 +3043,20 @@ export const createOtalessBookings = (deps) => {
|
|
|
2920
3043
|
o.id = id;
|
|
2921
3044
|
o.code = text(row.originalOrderId) ?? '';
|
|
2922
3045
|
o.charged = charged;
|
|
3046
|
+
if (step && !deps.proceedWithoutGroupConfirm) {
|
|
3047
|
+
o.status = 'awaiting-payment';
|
|
3048
|
+
known.add(id);
|
|
3049
|
+
log(`[otaless] ${claimedAs} - cancelled (questions #${step === 'terms' ? 66 : 68}; proceedWithoutGroupConfirm off)`);
|
|
3050
|
+
await release(acct, who, o, step === 'terms' ? 'terms' : 'confirm-unsent');
|
|
3051
|
+
continue;
|
|
3052
|
+
}
|
|
3053
|
+
if (dead) {
|
|
3054
|
+
o.status = s.status ?? (st === 'EXPIRED' ? 'expired' : 'failed');
|
|
3055
|
+
known.add(id);
|
|
3056
|
+
put(o);
|
|
3057
|
+
log(`[otaless] ${claimedAs} - not booked`);
|
|
3058
|
+
continue;
|
|
3059
|
+
}
|
|
2923
3060
|
// ⚠️ PAID IS ONLY "PAID": "CONFIRMED" unpaid is still waiting for its payment.
|
|
2924
3061
|
if (s.paid) {
|
|
2925
3062
|
o.status = 'confirmed';
|
|
@@ -3007,6 +3144,9 @@ export const createOtalessBookings = (deps) => {
|
|
|
3007
3144
|
if (!own)
|
|
3008
3145
|
return null;
|
|
3009
3146
|
const { r, acct } = own;
|
|
3147
|
+
// Paid a moment ago: said as paid, as its cancel will take it (0.75.1, C6).
|
|
3148
|
+
if (r.status === 'awaiting-payment' && !r.paid)
|
|
3149
|
+
await lookAtPayment(acct, who, r, true);
|
|
3010
3150
|
await refresh(who, [r], new Map([[r.group, acct]]));
|
|
3011
3151
|
const amount = paidOf(r);
|
|
3012
3152
|
const base = { bookingId: r.id, supplier: r.group, confirmationCode: r.code || r.id };
|
|
@@ -3095,6 +3235,11 @@ export const createOtalessBookings = (deps) => {
|
|
|
3095
3235
|
};
|
|
3096
3236
|
const cancelOnce = async (own, who, reason) => {
|
|
3097
3237
|
const { r, acct } = own;
|
|
3238
|
+
// ⚠️ PAID A MOMENT AGO IS PAID (0.75.1, the review's C6): the payment status (15) is asked
|
|
3239
|
+
// now, not at most every `STATUS_EVERY_MS` - paid within those seconds, it was cancelled as
|
|
3240
|
+
// unpaid: 9 alone, nothing asked back.
|
|
3241
|
+
if (r.status === 'awaiting-payment' && !r.paid)
|
|
3242
|
+
await lookAtPayment(acct, who, r, true);
|
|
3098
3243
|
if (r.status === 'cancelled' || r.status === 'expired' || r.status === 'failed')
|
|
3099
3244
|
return toBooking(r);
|
|
3100
3245
|
const g = deps.groupOf(r.group).name;
|