@curless/hotel-storefront 0.80.2 → 0.81.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.
- package/dist/account/index.d.ts +14 -0
- package/dist/account/index.d.ts.map +1 -1
- package/dist/account/index.js +427 -43
- package/dist/account/index.js.map +1 -1
- package/dist/account/pages.d.ts +15 -2
- package/dist/account/pages.d.ts.map +1 -1
- package/dist/account/pages.js +13 -10
- package/dist/account/pages.js.map +1 -1
- package/dist/account/wallet-pages.d.ts +84 -0
- package/dist/account/wallet-pages.d.ts.map +1 -0
- package/dist/account/wallet-pages.js +229 -0
- package/dist/account/wallet-pages.js.map +1 -0
- package/dist/account/wallet.d.ts +163 -0
- package/dist/account/wallet.d.ts.map +1 -0
- package/dist/account/wallet.js +365 -0
- package/dist/account/wallet.js.map +1 -0
- package/dist/backend.d.ts +18 -0
- package/dist/backend.d.ts.map +1 -1
- package/dist/backend.js.map +1 -1
- package/dist/card-v168.generated.d.ts +6 -0
- package/dist/card-v168.generated.d.ts.map +1 -0
- package/dist/card-v168.generated.js +10 -0
- package/dist/card-v168.generated.js.map +1 -0
- 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 +48 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +14 -1
- package/dist/config.js.map +1 -1
- package/dist/huazhu/ari-sync.d.ts.map +1 -1
- package/dist/huazhu/ari-sync.js +15 -4
- package/dist/huazhu/ari-sync.js.map +1 -1
- package/dist/huazhu/check.d.ts.map +1 -1
- package/dist/huazhu/check.js +4 -1
- package/dist/huazhu/check.js.map +1 -1
- package/dist/huazhu/client.d.ts +48 -2
- package/dist/huazhu/client.d.ts.map +1 -1
- package/dist/huazhu/client.js +263 -3
- package/dist/huazhu/client.js.map +1 -1
- package/dist/huazhu/make.d.ts.map +1 -1
- package/dist/huazhu/make.js +6 -1
- package/dist/huazhu/make.js.map +1 -1
- package/dist/legal.d.ts.map +1 -1
- package/dist/legal.js +26 -4
- package/dist/legal.js.map +1 -1
- package/dist/otaless/client.d.ts +109 -0
- package/dist/otaless/client.d.ts.map +1 -1
- package/dist/otaless/client.js +44 -4
- package/dist/otaless/client.js.map +1 -1
- package/dist/otaless/fake.d.ts +92 -0
- package/dist/otaless/fake.d.ts.map +1 -1
- package/dist/otaless/fake.js +265 -0
- package/dist/otaless/fake.js.map +1 -1
- package/dist/otaless/make.d.ts +40 -1
- package/dist/otaless/make.d.ts.map +1 -1
- package/dist/otaless/make.js +150 -2
- package/dist/otaless/make.js.map +1 -1
- package/dist/otaless/shop-answers.d.ts +72 -0
- package/dist/otaless/shop-answers.d.ts.map +1 -0
- package/dist/otaless/shop-answers.js +344 -0
- package/dist/otaless/shop-answers.js.map +1 -0
- package/dist/otaless/shop-client.d.ts +133 -0
- package/dist/otaless/shop-client.d.ts.map +1 -0
- package/dist/otaless/shop-client.js +201 -0
- package/dist/otaless/shop-client.js.map +1 -0
- package/dist/otaless/shop-fake.d.ts +100 -0
- package/dist/otaless/shop-fake.d.ts.map +1 -0
- package/dist/otaless/shop-fake.js +259 -0
- package/dist/otaless/shop-fake.js.map +1 -0
- package/dist/otaless/shop-service.d.ts +105 -0
- package/dist/otaless/shop-service.d.ts.map +1 -0
- package/dist/otaless/shop-service.js +187 -0
- package/dist/otaless/shop-service.js.map +1 -0
- package/dist/otaless/shop.d.ts +160 -0
- package/dist/otaless/shop.d.ts.map +1 -0
- package/dist/otaless/shop.js +715 -0
- package/dist/otaless/shop.js.map +1 -0
- package/dist/otaless/wallet.d.ts +160 -0
- package/dist/otaless/wallet.d.ts.map +1 -0
- package/dist/otaless/wallet.js +650 -0
- package/dist/otaless/wallet.js.map +1 -0
- package/dist/server.d.ts +14 -3
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +41 -12
- package/dist/server.js.map +1 -1
- package/dist/surface.d.ts +7 -0
- package/dist/surface.d.ts.map +1 -1
- package/dist/surface.js +14 -0
- package/dist/surface.js.map +1 -1
- package/dist/tools.d.ts +98 -93
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +239 -1
- package/dist/tools.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { esc, hidden, hy, page } from './pages.js';
|
|
2
|
+
// The account page's wallet block and its confirm and add-a-card pages (docs/otaless-hotels.md
|
|
3
|
+
// §17.12, condition 2: where a client draws no card, the wallet is done on /account). Drawn only
|
|
4
|
+
// with the wallet switch on - with it off nothing here is called and /account is as it was.
|
|
5
|
+
//
|
|
6
|
+
// ⚠️ A CARD'S DIGITS ARE IN THE PAGE'S HTML (brand and last four, as the card shows them) - never
|
|
7
|
+
// in a URL, a log, or a redirect. The page's note after an action is a short code, no amounts.
|
|
8
|
+
//
|
|
9
|
+
// ⚠️ AUTHORIZE, LOWER-LIMITS-RAISED AND REMOVE ARE TWO STEPS: the first POST draws a confirm page
|
|
10
|
+
// from a fresh read; only its own form (a server-made one-time ticket) does the action.
|
|
11
|
+
const WORDS = {
|
|
12
|
+
title: ['{0} 钱包', '{0} wallet'],
|
|
13
|
+
what: [
|
|
14
|
+
'这是你在自己的银行卡上授权的一笔额度(美元),订房时可从中扣款;授权不是充值,没有钱被存进来。',
|
|
15
|
+
'A credit line (US dollars) you authorize on your own bank card, which bookings can be charged to. An authorization is not a deposit: no money is added.',
|
|
16
|
+
],
|
|
17
|
+
Available: ['可用额度', 'Available'],
|
|
18
|
+
Authorized: ['已授权', 'Authorized'],
|
|
19
|
+
Charged: ['已扣款', 'Charged'],
|
|
20
|
+
Held: ['冻结中', 'Held'],
|
|
21
|
+
Expires: ['到期时间', 'Credit ends'],
|
|
22
|
+
PerTxn: ['单笔上限', 'Per transaction'],
|
|
23
|
+
PerDay: ['单日上限', 'Per day'],
|
|
24
|
+
NoLimit: ['不限', 'No limit'],
|
|
25
|
+
// ⚠️ NOT SHOWN IS NOT "NO LIMIT": the real backend's wallet read does not carry the limits.
|
|
26
|
+
LimitsUnknown: ['读不到(后台没有给出)', 'Cannot be read (not shown by the backend)'],
|
|
27
|
+
Cards: ['银行卡', 'Cards'],
|
|
28
|
+
NoCards: ['还没有绑卡。', 'No card yet.'],
|
|
29
|
+
Exp: ['有效期 {0}', 'exp {0}'],
|
|
30
|
+
AddCard: ['添加银行卡', 'Add a card'],
|
|
31
|
+
Remove: ['移除', 'Remove'],
|
|
32
|
+
Renew: ['续期', 'Renew'],
|
|
33
|
+
Review: ['查看并确认', 'Review'],
|
|
34
|
+
Authorize: ['授权额度', 'Authorize an amount'],
|
|
35
|
+
AmountUsd: ['金额(美元)', 'Amount (US$)'],
|
|
36
|
+
Card: ['银行卡', 'Card'],
|
|
37
|
+
Limits: ['修改限额', 'Change limits'],
|
|
38
|
+
LimitsHint: ['留空表示不限。', 'Leave empty for no limit.'],
|
|
39
|
+
Confirm: ['确认', 'Confirm'],
|
|
40
|
+
Cancel: ['取消', 'Cancel'],
|
|
41
|
+
Back: ['回到账号页', 'Back to your account'],
|
|
42
|
+
state_ready: ['可以使用', 'Ready'],
|
|
43
|
+
state_no_credit: ['没有可用额度', 'No credit'],
|
|
44
|
+
state_expired: ['额度已过期', 'Expired'],
|
|
45
|
+
// ⚠️ robin 11-23: a group's wallet is there only with its membership linked - this one line
|
|
46
|
+
// stands under the group's row until then (no number, no button).
|
|
47
|
+
notLinked: ['关联{0}会员后,可以用{0}钱包。', 'Link your {0} membership to use the {0} wallet.'],
|
|
48
|
+
unavailable: [
|
|
49
|
+
'暂时读不到钱包(可能繁忙或没有回应)。稍后刷新页面再看。',
|
|
50
|
+
'The wallet could not be read just now (busy, or no answer). Refresh in a moment.',
|
|
51
|
+
],
|
|
52
|
+
note_done: ['已完成。下面是刚读到的最新情况。', 'Done. The wallet below is as read now.'],
|
|
53
|
+
note_unknown: [
|
|
54
|
+
'不确定是否已经成功:没有再次发送。下面是刚读到的情况,请核对。',
|
|
55
|
+
'It is not known whether it went through - it was not sent again. The wallet below is as read now.',
|
|
56
|
+
],
|
|
57
|
+
note_refused: ['没有完成。', 'It was not done.'],
|
|
58
|
+
note_changed: [
|
|
59
|
+
'钱包在你查看之后有变化,所以什么也没做。请核对数字后重新来一次。',
|
|
60
|
+
'The wallet changed since you looked, so nothing was done. Check the numbers and ask again.',
|
|
61
|
+
],
|
|
62
|
+
note_expired: [
|
|
63
|
+
'这次确认已经失效(用过、过期或来自别的页面),什么也没做。',
|
|
64
|
+
'That confirmation is over (used, expired or from another page): nothing was done.',
|
|
65
|
+
],
|
|
66
|
+
confirmAuthorizeH: ['确认授权', 'Confirm the authorization'],
|
|
67
|
+
confirmAuthorize: [
|
|
68
|
+
// ⚠️ NO PROMISE OF A SECOND QUESTION: whether the backend charges the wallet by itself on a booking is open (questions #102).
|
|
69
|
+
'在 {2} 的 {1} 尾号 {3} 的卡上授权 US${0}。7 天内,你确认的{2}订单可以从这笔额度付款。现在不扣钱。这是额度,不是充值。',
|
|
70
|
+
'Authorize US${0} on the {1} card ending {3} at {2}. For 7 days, {2} bookings you confirm can be paid from this credit. Nothing is charged now. It is a credit line, not a deposit.',
|
|
71
|
+
],
|
|
72
|
+
confirmLimitsH: ['确认限额', 'Confirm the limits'],
|
|
73
|
+
confirmLimits: ['{0}:单笔上限 {1},单日上限 {2}。', '{0}: per transaction {1}, per day {2}.'],
|
|
74
|
+
confirmRemoveH: ['确认移除银行卡', 'Confirm removing the card'],
|
|
75
|
+
confirmRemove: ['从 {2} 移除 {0} 尾号 {1} 的卡。', 'Remove the {0} card ending {1} from {2}.'],
|
|
76
|
+
heldWarn: [
|
|
77
|
+
'有订单冻结了 US${0} 的额度,仍在这条额度上。',
|
|
78
|
+
'A booking has US${0} held on this credit line, and it is still there.',
|
|
79
|
+
],
|
|
80
|
+
nowNumbers: ['目前:可用 US${0},已授权 US${1}。', 'Now: US${0} available, US${1} authorized.'],
|
|
81
|
+
nowLimits: ['目前的限额:单笔 {0},单日 {1}。', 'Limits now: per transaction {0}, per day {1}.'],
|
|
82
|
+
nowLimitsUnknown: [
|
|
83
|
+
'目前的限额读不到(后台没有给出),所以无法和现在的比较;上面是你要设的新值。',
|
|
84
|
+
'The limits now cannot be read (the backend does not show them), so they cannot be compared; the above is what you are setting.',
|
|
85
|
+
],
|
|
86
|
+
addCardH: ['添加银行卡', 'Add a card'],
|
|
87
|
+
addCardLine: [
|
|
88
|
+
'卡号只在 {0} 的安全页面上输入,不会经过我们,也不会发给助手。链接 {1} 分钟内有效。',
|
|
89
|
+
'The card number is typed only on the secure page below - it never reaches us or the assistant. The link works for {1} minutes.',
|
|
90
|
+
],
|
|
91
|
+
OpenSecure: ['打开安全页面', 'Open the secure page'],
|
|
92
|
+
addedBack: [
|
|
93
|
+
'添加好之后回到账号页刷新。',
|
|
94
|
+
'When you have added it, come back to your account and refresh.',
|
|
95
|
+
],
|
|
96
|
+
tryAgain: ['请回到账号页重试。', 'Go back to your account and try again.'],
|
|
97
|
+
refusedAdd: ['现在不能添加银行卡。', 'A card cannot be added just now.'],
|
|
98
|
+
};
|
|
99
|
+
const w = (lang, key, ...v) => WORDS[key][lang === 'zh' ? 0 : 1].replace(/\{(\d)\}/g, (_m, i) => v[Number(i)] ?? '');
|
|
100
|
+
/** What the wallet's block says after an action: the short code in `?wallet=`, nothing else. */
|
|
101
|
+
export const WALLET_NOTES = ['done', 'unknown', 'refused', 'changed', 'expired'];
|
|
102
|
+
export const noteOf = (v) => WALLET_NOTES.includes(v) ? v : undefined;
|
|
103
|
+
/** Rules for the wallet's parts only; the page's own sheet does the rest. Added after it, only with the wallet on. */
|
|
104
|
+
export const WALLET_CSS = `
|
|
105
|
+
select { width: 100%; min-height: 48px; padding: 11px 14px; font: inherit; color: var(--fg); background: var(--card); border: 1px solid var(--rim); border-radius: 12px }
|
|
106
|
+
select:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px }
|
|
107
|
+
.wallet.sub { flex: 1 1 100%; min-width: 0; margin: 2px 0 0; padding-inline-start: 44px }
|
|
108
|
+
.wallet.sub .wtitle { font-size: 15px; margin: 0 0 4px }
|
|
109
|
+
.wallet.sub .wtitle.cards { margin-top: 14px }
|
|
110
|
+
.wallet.sub > .note.line { margin: 0 }
|
|
111
|
+
.wallet .big { font-size: 28px; font-weight: 700; margin: 4px 0 2px }
|
|
112
|
+
.wallet .tag { display: inline-block; margin-inline-start: 8px; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--link); font-size: 13px; font-weight: 600; vertical-align: middle }
|
|
113
|
+
.wallet form.stack { margin: 12px 0 0 }
|
|
114
|
+
.wallet .msg.ok { color: var(--good); background: var(--good-bg); font-weight: 500 }
|
|
115
|
+
.wallet .msg.info { color: var(--warn); background: var(--warn-bg); font-weight: 500 }
|
|
116
|
+
.wallet details.box { margin: 8px 0 0 }
|
|
117
|
+
`;
|
|
118
|
+
const usdSaid = (v, lang) => v ? `US$${v}` : w(lang, 'NoLimit');
|
|
119
|
+
const form = (b, csrf, lang, fields, inner, cls = 'inline') => `<form method="post" action="${esc(b.base)}/account" class="${cls}">${hidden({ csrf, lang, ...fields })}${inner}</form>`;
|
|
120
|
+
const button = (label, look = 'soft') => `<button class="small ${look}" type="submit">${esc(label)}</button>`;
|
|
121
|
+
/**
|
|
122
|
+
* ⚠️ THE WALLET SITS WITH ITS GROUP'S MEMBERSHIP ROW (robin 11-23: 「全季关联和钱包功能应该要放在一起」):
|
|
123
|
+
* one block per wallet group, by group code, each drawn inside that group's row on the account
|
|
124
|
+
* page - the wallet (`id="wallet"` on the first) when the membership is linked, else one muted line.
|
|
125
|
+
*/
|
|
126
|
+
export const walletBlocks = ({ b, lang, csrf, cards, nameOf, note, }) => Object.fromEntries(cards.map((c, i) => {
|
|
127
|
+
const name = nameOf(c);
|
|
128
|
+
const id = i === 0 ? 'wallet' : `wallet-${c.group}`;
|
|
129
|
+
const head = `<div class="wallet sub" id="${esc(id)}"><h3 class="wtitle">${esc(w(lang, 'title', hy(name)))}</h3>`;
|
|
130
|
+
const notice = i === 0 && note
|
|
131
|
+
? `<p class="msg ${note === 'done' ? 'ok' : note === 'unknown' || note === 'changed' ? 'info' : 'err'}" role="status">${esc(w(lang, `note_${note}`))}</p>`
|
|
132
|
+
: '';
|
|
133
|
+
// Not linked: one muted line, no title and no sections (the outcome note, if any, stays above it).
|
|
134
|
+
if (c.state === 'not-linked')
|
|
135
|
+
return [
|
|
136
|
+
c.group,
|
|
137
|
+
`<div class="wallet sub" id="${esc(id)}">${notice}<p class="note line">${esc(w(lang, 'notLinked', name))}</p></div>`,
|
|
138
|
+
];
|
|
139
|
+
if (c.state === 'unavailable')
|
|
140
|
+
return [
|
|
141
|
+
c.group,
|
|
142
|
+
`${head}${notice}<p class="note">${esc(w(lang, 'unavailable'))}</p></div>`,
|
|
143
|
+
];
|
|
144
|
+
const st = c.state.replace('-', '_');
|
|
145
|
+
const facts = [
|
|
146
|
+
['Authorized', `US$${c.authorizedUsd}`],
|
|
147
|
+
['Charged', `US$${c.capturedUsd}`],
|
|
148
|
+
['Held', `US$${c.heldUsd}`],
|
|
149
|
+
...(c.expiresAt ? [['Expires', c.expiresAt.slice(0, 10)]] : []),
|
|
150
|
+
...(c.limits
|
|
151
|
+
? [
|
|
152
|
+
['PerTxn', usdSaid(c.limits.perTxnUsd, lang)],
|
|
153
|
+
['PerDay', usdSaid(c.limits.perDayUsd, lang)],
|
|
154
|
+
]
|
|
155
|
+
: [['PerTxn', w(lang, 'LimitsUnknown')]]),
|
|
156
|
+
];
|
|
157
|
+
const rows = (c.cards ?? [])
|
|
158
|
+
.map((x) => `<li><span class="mid"><span class="mtext"><span class="mname">${esc(`${x.brand || w(lang, 'Card')} •••• ${x.last4}`)}</span><span class="mlabel">${esc(w(lang, 'Exp', x.exp))}</span></span></span><span class="mbtn">${form(b, csrf, lang, { action: 'wallet_renew', group: c.group, cardId: x.id }, button(w(lang, 'Renew'), 'quiet'))}${form(b, csrf, lang, { action: 'wallet_review_remove', group: c.group, cardId: x.id }, button(w(lang, 'Remove'), 'quiet'))}</span></li>`)
|
|
159
|
+
.join('');
|
|
160
|
+
const hasCards = (c.cards?.length ?? 0) > 0;
|
|
161
|
+
const limitField = (name_, v) => `<input name="${name_}" inputmode="decimal" autocomplete="off" pattern="[0-9]{1,4}(\\.[0-9]{1,2})?" maxlength="7" value="${esc(v ?? '')}">`;
|
|
162
|
+
return [
|
|
163
|
+
c.group,
|
|
164
|
+
`${head}${notice}
|
|
165
|
+
<div class="big">US$${esc(c.availableUsd)}<span class="tag">${esc(w(lang, `state_${st}`))}</span></div>
|
|
166
|
+
<p class="note">${esc(w(lang, 'what'))}</p>
|
|
167
|
+
<dl class="facts">${facts.map(([k, v]) => `<dt>${esc(w(lang, k))}</dt><dd>${esc(v)}</dd>`).join('')}</dl>
|
|
168
|
+
<h3 class="wtitle cards">${esc(w(lang, 'Cards'))}</h3>
|
|
169
|
+
${hasCards ? `<ul class="memberships">${rows}</ul>` : `<p class="note">${esc(w(lang, 'NoCards'))}</p>`}
|
|
170
|
+
${form(b, csrf, lang, { action: 'wallet_add_card', group: c.group }, button(w(lang, 'AddCard')), 'stack')}
|
|
171
|
+
${hasCards
|
|
172
|
+
? `<details class="box"><summary>${esc(w(lang, 'Authorize'))}</summary>${form(b, csrf, lang, { action: 'wallet_review_authorize', group: c.group }, `<label class="field"><span>${esc(w(lang, 'AmountUsd'))}</span><input name="amount" inputmode="decimal" autocomplete="off" required pattern="[0-9]{1,4}(\\.[0-9]{1,2})?" maxlength="7"></label><label class="field"><span>${esc(w(lang, 'Card'))}</span><select name="cardId">${(c.cards ?? []).map((x) => `<option value="${esc(x.id)}">${esc(`${x.brand || w(lang, 'Card')} •••• ${x.last4}`)}</option>`).join('')}</select></label>${button(w(lang, 'Review'))}`, 'stack')}</details>`
|
|
173
|
+
: ''}
|
|
174
|
+
<details class="box"><summary>${esc(w(lang, 'Limits'))}</summary>${form(b, csrf, lang, { action: 'wallet_review_limits', group: c.group }, `<label class="field"><span>${esc(w(lang, 'PerTxn'))} (US$)</span>${limitField('perTxn', c.limits?.perTxnUsd)}</label><label class="field"><span>${esc(w(lang, 'PerDay'))} (US$)</span>${limitField('perDay', c.limits?.perDayUsd)}</label><p class="note">${esc(w(lang, 'LimitsHint'))}</p>${button(w(lang, 'Review'))}`, 'stack')}</details></div>`,
|
|
175
|
+
];
|
|
176
|
+
}));
|
|
177
|
+
const backHref = (b, lang, code) => `${b.base}/account?lang=${lang}${code ? `&wallet=${code}` : ''}#wallet`;
|
|
178
|
+
export const confirmPage = ({ b, lang, csrf, ticket, group, title, lines, warn }) => page(b, {
|
|
179
|
+
lang,
|
|
180
|
+
title,
|
|
181
|
+
langHref: (l) => backHref(b, l),
|
|
182
|
+
css: WALLET_CSS,
|
|
183
|
+
body: `<h1>${esc(title)}</h1><div class="box wallet">${lines.map((l) => `<p>${esc(l)}</p>`).join('')}${warn ? `<p class="msg err" role="alert">${esc(warn)}</p>` : ''}
|
|
184
|
+
${form(b, csrf, lang, { action: 'wallet_confirm', group, ticket }, `<button class="primary" type="submit">${esc(w(lang, 'Confirm'))}</button>`, 'stack')}
|
|
185
|
+
<p style="margin-top:10px"><a class="secondary" href="${esc(backHref(b, lang))}">${esc(w(lang, 'Cancel'))}</a></p></div>`,
|
|
186
|
+
});
|
|
187
|
+
/** The words of the three confirm pages. */
|
|
188
|
+
export const confirmWords = {
|
|
189
|
+
authorize: (lang, a) => ({
|
|
190
|
+
title: w(lang, 'confirmAuthorizeH'),
|
|
191
|
+
lines: [
|
|
192
|
+
w(lang, 'confirmAuthorize', a.usd, a.brand || w(lang, 'Card'), a.group, a.last4),
|
|
193
|
+
w(lang, 'nowNumbers', a.available, a.authorized),
|
|
194
|
+
],
|
|
195
|
+
}),
|
|
196
|
+
limits: (lang, a) => ({
|
|
197
|
+
title: w(lang, 'confirmLimitsH'),
|
|
198
|
+
lines: [
|
|
199
|
+
w(lang, 'confirmLimits', a.group, usdSaid(a.perTxn, lang), usdSaid(a.perDay, lang)),
|
|
200
|
+
a.nowTxn === undefined || a.nowDay === undefined
|
|
201
|
+
? w(lang, 'nowLimitsUnknown')
|
|
202
|
+
: w(lang, 'nowLimits', usdSaid(a.nowTxn, lang), usdSaid(a.nowDay, lang)),
|
|
203
|
+
],
|
|
204
|
+
}),
|
|
205
|
+
remove: (lang, a) => ({
|
|
206
|
+
title: w(lang, 'confirmRemoveH'),
|
|
207
|
+
lines: [w(lang, 'confirmRemove', a.brand || w(lang, 'Card'), a.last4, a.group)],
|
|
208
|
+
...(a.held !== '0.00' ? { warn: w(lang, 'heldWarn', a.held) } : {}),
|
|
209
|
+
}),
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* The add-a-card page: a plain link to the hosted page (`rel="noopener noreferrer"`, a new tab).
|
|
213
|
+
* ⚠️ NOT A REDIRECT: this page's CSP has `form-action 'self'`, which a browser also holds a
|
|
214
|
+
* redirect after a form post to, and the hosted page is another origin.
|
|
215
|
+
*/
|
|
216
|
+
export const addCardPage = (b, lang, r) => page(b, {
|
|
217
|
+
lang,
|
|
218
|
+
title: w(lang, 'addCardH'),
|
|
219
|
+
langHref: (l) => backHref(b, l),
|
|
220
|
+
css: WALLET_CSS,
|
|
221
|
+
body: `<h1>${esc(w(lang, 'addCardH'))}</h1><div class="box wallet">${r.url
|
|
222
|
+
? `<p>${esc(w(lang, 'addCardLine', r.group, String(r.minutes)))}</p>
|
|
223
|
+
<p><a class="primary" href="${esc(r.url)}" target="_blank" rel="noopener noreferrer">${esc(w(lang, 'OpenSecure'))}</a></p>
|
|
224
|
+
<p class="note">${esc(w(lang, 'addedBack'))}</p>`
|
|
225
|
+
: `<p class="msg err" role="alert">${esc(w(lang, 'refusedAdd'))}</p><p class="note">${esc(w(lang, 'tryAgain'))}</p>`}
|
|
226
|
+
<p><a class="secondary" href="${esc(backHref(b, lang))}">${esc(w(lang, 'Back'))}</a></p></div>`,
|
|
227
|
+
});
|
|
228
|
+
export { backHref as walletBackHref };
|
|
229
|
+
//# sourceMappingURL=wallet-pages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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AC,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,gBAAgB;CAChG,CAAC,CAAC;AAEL,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import type { Cred } from '../otaless/client.js';
|
|
2
|
+
import type { Caller } from '../otaless/limits.js';
|
|
3
|
+
import { type OtalessWallet, type WalletView } from '../otaless/wallet.js';
|
|
4
|
+
/** One wallet group's state, as the card reads it (the contract's `WalletCard`). */
|
|
5
|
+
export type WalletCardOut = {
|
|
6
|
+
group: string;
|
|
7
|
+
name: string;
|
|
8
|
+
names?: {
|
|
9
|
+
zh?: string;
|
|
10
|
+
};
|
|
11
|
+
logo?: string;
|
|
12
|
+
state: 'ready' | 'no-credit' | 'expired' | 'not-linked' | 'unavailable';
|
|
13
|
+
availableUsd?: string;
|
|
14
|
+
authorizedUsd?: string;
|
|
15
|
+
capturedUsd?: string;
|
|
16
|
+
heldUsd?: string;
|
|
17
|
+
expiresAt?: string;
|
|
18
|
+
cards?: {
|
|
19
|
+
id: string;
|
|
20
|
+
brand: string;
|
|
21
|
+
last4: string;
|
|
22
|
+
exp: string;
|
|
23
|
+
}[];
|
|
24
|
+
limits?: {
|
|
25
|
+
perTxnUsd: string | null;
|
|
26
|
+
perDayUsd: string | null;
|
|
27
|
+
};
|
|
28
|
+
recent?: {
|
|
29
|
+
kind: string;
|
|
30
|
+
amountUsd: string;
|
|
31
|
+
at: string;
|
|
32
|
+
booking?: string;
|
|
33
|
+
}[];
|
|
34
|
+
};
|
|
35
|
+
export type WalletResult = {
|
|
36
|
+
action: 'add-card' | 'authorize' | 'limits' | 'renew' | 'remove-card';
|
|
37
|
+
outcome: 'done' | 'refused' | 'unknown' | 'changed';
|
|
38
|
+
reason?: 'not-offered' | 'signed-out' | 'not-linked' | 'busy' | 'unavailable' | 'bad-input' | 'no-such-card' | 'declined' | 'nothing-to-renew' | 'bad-link' | 'used';
|
|
39
|
+
link?: {
|
|
40
|
+
url: string;
|
|
41
|
+
expiresAt: string;
|
|
42
|
+
};
|
|
43
|
+
heldUsd?: string;
|
|
44
|
+
releasedUsd?: string;
|
|
45
|
+
};
|
|
46
|
+
export type WalletAction = WalletResult['action'];
|
|
47
|
+
/** A wallet group as the account names it. */
|
|
48
|
+
export type WalletMeta = {
|
|
49
|
+
code: string;
|
|
50
|
+
name: string;
|
|
51
|
+
names?: {
|
|
52
|
+
zh?: string;
|
|
53
|
+
};
|
|
54
|
+
logo?: string;
|
|
55
|
+
};
|
|
56
|
+
/** Who is asking, for the calls: the sign-in's credential, the account, the conversation. */
|
|
57
|
+
export type WalletCtx = {
|
|
58
|
+
/** The sign-in's credential at a group - undefined: not signed in. Never logged or returned. */
|
|
59
|
+
credOf: (group: string) => Cred | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* ⚠️ THE GROUP'S MEMBERSHIP IS LINKED TO THIS ACCOUNT (the same rows the account page and the card
|
|
62
|
+
* show; a row that needs linking again is not linked). A group's wallet is read, shown and
|
|
63
|
+
* touched only while it is - robin 11-23: no JI Hotel membership, no JI Hotel wallet.
|
|
64
|
+
*/
|
|
65
|
+
linkedOf: (group: string) => boolean;
|
|
66
|
+
account: string;
|
|
67
|
+
key: string;
|
|
68
|
+
who: Caller;
|
|
69
|
+
};
|
|
70
|
+
/** The card's `press`: made once per confirm screen, crypto random. */
|
|
71
|
+
export declare const PRESS: RegExp;
|
|
72
|
+
/** How long a press is remembered. */
|
|
73
|
+
export declare const PRESS_MS: number;
|
|
74
|
+
/** A confirm page's ticket. */
|
|
75
|
+
export declare const TICKET_MS: number;
|
|
76
|
+
/** Wallet writes one account may make in ten minutes, on top of every other limit. */
|
|
77
|
+
export declare const WALLET_WRITES_PER_TEN_MINUTES = 10;
|
|
78
|
+
/** The latest entries read for an answer. */
|
|
79
|
+
export declare const RECENT = 10;
|
|
80
|
+
/** `12345` -> `"123.45"`: whole cents, never a float sum. */
|
|
81
|
+
export declare const usd: (cents: number) => string;
|
|
82
|
+
/** `"12.5"` -> 1250; anything but whole cents, 0.01-2000.00: undefined. Never a float. */
|
|
83
|
+
export declare const centsOfUsd: (v: unknown, max?: number) => number | undefined;
|
|
84
|
+
/** A limit as the card sends it: `"none"` clears; else whole cents, at most the wallet's top. `undefined`: not a limit. */
|
|
85
|
+
export declare const limitOf: (v: unknown) => number | null | undefined;
|
|
86
|
+
/**
|
|
87
|
+
* ⚠️ THE BACKEND'S IDEMPOTENCY KEY, FROM (ACCOUNT, PRESS) ALONE: the same confirm screen pressed
|
|
88
|
+
* again - after a lost answer, after a reload - is the same key at the backend, which answers it
|
|
89
|
+
* once. Never from the amount or the time.
|
|
90
|
+
*/
|
|
91
|
+
export declare const keyOf: (account: string, press: string) => string;
|
|
92
|
+
/** A confirm page's ticket: what the guest was shown and pressed, bound to the web session. */
|
|
93
|
+
export type Ticket = {
|
|
94
|
+
kind: 'authorize';
|
|
95
|
+
group: string;
|
|
96
|
+
cardId: string;
|
|
97
|
+
amountCents: number;
|
|
98
|
+
} | {
|
|
99
|
+
kind: 'limits';
|
|
100
|
+
group: string;
|
|
101
|
+
perTxnCents: number | null;
|
|
102
|
+
perDayCents: number | null;
|
|
103
|
+
/** `'unknown'`: the page showed no current limit (the backend did not give one) - nothing to compare. */
|
|
104
|
+
seenPerTxnCents: number | null | 'unknown';
|
|
105
|
+
seenPerDayCents: number | null | 'unknown';
|
|
106
|
+
} | {
|
|
107
|
+
kind: 'remove';
|
|
108
|
+
group: string;
|
|
109
|
+
cardId: string;
|
|
110
|
+
};
|
|
111
|
+
export type WalletPartOptions = {
|
|
112
|
+
wallet: OtalessWallet;
|
|
113
|
+
meta: (code: string) => WalletMeta;
|
|
114
|
+
now: () => number;
|
|
115
|
+
log: (line: string) => void;
|
|
116
|
+
};
|
|
117
|
+
export declare const makeWalletPart: (opts: WalletPartOptions) => {
|
|
118
|
+
groups: readonly string[];
|
|
119
|
+
offers: (g: string) => boolean;
|
|
120
|
+
readGroup: (ctx: WalletCtx, code: string, transactions: number) => Promise<{
|
|
121
|
+
card: WalletCardOut;
|
|
122
|
+
view: WalletView | undefined;
|
|
123
|
+
}>;
|
|
124
|
+
readAll: (ctx: WalletCtx, transactions?: number) => Promise<WalletCardOut[]>;
|
|
125
|
+
unreadAll: () => WalletCardOut[];
|
|
126
|
+
textOf: (cards: readonly WalletCardOut[], o: {
|
|
127
|
+
noCards: boolean;
|
|
128
|
+
url: string;
|
|
129
|
+
linkTool?: string;
|
|
130
|
+
said: (c: WalletCardOut) => string;
|
|
131
|
+
}) => string;
|
|
132
|
+
authorize: (ctx: WalletCtx, a: {
|
|
133
|
+
group: string;
|
|
134
|
+
cardId: string;
|
|
135
|
+
amountCents: number;
|
|
136
|
+
press: string;
|
|
137
|
+
}) => Promise<WalletResult>;
|
|
138
|
+
setLimits: (ctx: WalletCtx, a: {
|
|
139
|
+
group: string;
|
|
140
|
+
perTxn: number | null;
|
|
141
|
+
perDay: number | null;
|
|
142
|
+
seenPerTxn: number | null | "unknown";
|
|
143
|
+
seenPerDay: number | null | "unknown";
|
|
144
|
+
press: string;
|
|
145
|
+
}) => Promise<WalletResult>;
|
|
146
|
+
removeCard: (ctx: WalletCtx, a: {
|
|
147
|
+
group: string;
|
|
148
|
+
cardId: string;
|
|
149
|
+
press: string;
|
|
150
|
+
}) => Promise<WalletResult>;
|
|
151
|
+
renew: (ctx: WalletCtx, a: {
|
|
152
|
+
group: string;
|
|
153
|
+
cardId: string;
|
|
154
|
+
}) => Promise<WalletResult>;
|
|
155
|
+
addCard: (ctx: WalletCtx, a: {
|
|
156
|
+
group: string;
|
|
157
|
+
lang: string;
|
|
158
|
+
}) => Promise<WalletResult>;
|
|
159
|
+
issue: (owner: string, ticket: Ticket) => string;
|
|
160
|
+
take: (owner: string, code: string) => Ticket | undefined;
|
|
161
|
+
};
|
|
162
|
+
export type WalletPart = ReturnType<typeof makeWalletPart>;
|
|
163
|
+
//# sourceMappingURL=wallet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
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