@curless/hotel-storefront 0.61.0 → 0.62.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/fake-ota.d.ts +69 -0
- package/dist/account/fake-ota.d.ts.map +1 -0
- package/dist/account/fake-ota.js +264 -0
- package/dist/account/fake-ota.js.map +1 -0
- package/dist/account/index.d.ts +32 -22
- package/dist/account/index.d.ts.map +1 -1
- package/dist/account/index.js +227 -200
- package/dist/account/index.js.map +1 -1
- package/dist/account/mask.d.ts +15 -0
- package/dist/account/mask.d.ts.map +1 -0
- package/dist/account/mask.js +51 -0
- package/dist/account/mask.js.map +1 -0
- package/dist/account/ota-member.d.ts +106 -11
- package/dist/account/ota-member.d.ts.map +1 -1
- package/dist/account/ota-member.js +191 -50
- package/dist/account/ota-member.js.map +1 -1
- package/dist/account/pages.d.ts +13 -2
- package/dist/account/pages.d.ts.map +1 -1
- package/dist/account/pages.js +34 -10
- package/dist/account/pages.js.map +1 -1
- package/dist/account/requests.d.ts +1 -1
- package/dist/account/requests.js +2 -2
- package/dist/account/requests.js.map +1 -1
- package/dist/account/said.d.ts +14 -0
- package/dist/account/said.d.ts.map +1 -0
- package/dist/account/said.js +96 -0
- package/dist/account/said.js.map +1 -0
- package/dist/account/store.d.ts +16 -15
- package/dist/account/store.d.ts.map +1 -1
- package/dist/account/store.js +29 -23
- package/dist/account/store.js.map +1 -1
- package/dist/otaless/backend.d.ts +19 -3
- package/dist/otaless/backend.d.ts.map +1 -1
- package/dist/otaless/backend.js +51 -20
- package/dist/otaless/backend.js.map +1 -1
- package/dist/otaless/booking.d.ts +189 -0
- package/dist/otaless/booking.d.ts.map +1 -0
- package/dist/otaless/booking.js +1227 -0
- package/dist/otaless/booking.js.map +1 -0
- package/dist/otaless/client.d.ts +180 -0
- package/dist/otaless/client.d.ts.map +1 -1
- package/dist/otaless/client.js +166 -15
- package/dist/otaless/client.js.map +1 -1
- package/dist/otaless/fake.d.ts +73 -0
- package/dist/otaless/fake.d.ts.map +1 -1
- package/dist/otaless/fake.js +270 -2
- package/dist/otaless/fake.js.map +1 -1
- package/dist/otaless/make.d.ts +2 -0
- package/dist/otaless/make.d.ts.map +1 -1
- package/dist/otaless/make.js +32 -0
- package/dist/otaless/make.js.map +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +4 -1
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
- package/dist/account/fake-mall.d.ts +0 -61
- package/dist/account/fake-mall.d.ts.map +0 -1
- package/dist/account/fake-mall.js +0 -239
- package/dist/account/fake-mall.js.map +0 -1
- package/dist/account/mall.d.ts +0 -85
- package/dist/account/mall.d.ts.map +0 -1
- package/dist/account/mall.js +0 -239
- package/dist/account/mall.js.map +0 -1
|
@@ -1,49 +1,137 @@
|
|
|
1
|
-
//
|
|
2
|
-
// 「
|
|
3
|
-
// The
|
|
4
|
-
// `/ota/sign-out` (ota-member-spec, docs/otaless-hotels.md §11) - called from
|
|
5
|
-
// our page with the Otaless account's token, never from a tool.
|
|
1
|
+
// THE OTALESS ACCOUNT AND ITS HOTEL MEMBERSHIPS, ON THE BACKEND'S OWN `/ota/*`
|
|
2
|
+
// (0.62.0, robin 11-10: 「ota 的登陆注册都是这个里面的,所有接口和 nexva one 不一样,
|
|
3
|
+
// 渠道和平台应该是一个接口」). The hotel aggregator document of 11-10, items 1-4:
|
|
6
4
|
//
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
5
|
+
// POST /api/v1/ota/register the account, made on every channel at once
|
|
6
|
+
// (no providerCode: their 聚合模式)
|
|
7
|
+
// POST /api/v1/ota/sign-in the account signed in - and, with its token as
|
|
8
|
+
// `Authorization`, a hotel group's membership
|
|
9
|
+
// linked to it: one local session for both
|
|
10
|
+
// POST /api/v1/ota/member/register a group's loyalty membership made
|
|
11
|
+
// POST /api/v1/ota/sign-out a channel's session ended
|
|
12
|
+
//
|
|
13
|
+
// The mall's `/member/*` (Nexva One's) is not this account's any more: the
|
|
14
|
+
// 11-06 「Otaless 账号就是商城会员」 is void.
|
|
15
|
+
//
|
|
16
|
+
// ⚠️ ONLY OUR OWN PAGES CALL THIS (account/index.ts): a password, an email or a
|
|
17
|
+
// phone reaches this file from a form on our site, never from a tool.
|
|
18
|
+
//
|
|
19
|
+
// ⚠️ A PASSWORD IS IN ONE REQUEST'S MEMORY AND NOWHERE ELSE: the body of one POST
|
|
20
|
+
// to the backend, built here and dropped. Never logged, never kept, never in an
|
|
21
|
+
// error - a failure carries a code and the backend's own words for it (`said`,
|
|
22
|
+
// 0.61.1), cleaned by `saidOf`: no email, name or phone of ours in them, and none
|
|
23
|
+
// at all if they hold the password or a token.
|
|
10
24
|
//
|
|
11
25
|
// ⚠️ "SIGNED IN" IS PROVED, NOT TAKEN AT ITS WORD (questions #48): the backend
|
|
12
26
|
// answered `signedIn: true` with a token for a sign-in that sent no credentials
|
|
13
|
-
// at all, the group's own answer being a sign-in form. A
|
|
14
|
-
// every part of the answer agrees: success, signed in,
|
|
15
|
-
//
|
|
27
|
+
// at all, the group's own answer being a sign-in form. A sign-in counts only when
|
|
28
|
+
// every part of the answer agrees: success, signed in, a token, the channel
|
|
29
|
+
// asked for, and no form in its place.
|
|
30
|
+
import { msgIn, saidOf } from './said.js';
|
|
16
31
|
export class OtaMemberError extends Error {
|
|
17
32
|
code;
|
|
18
33
|
envelope;
|
|
34
|
+
said;
|
|
19
35
|
constructor(
|
|
20
|
-
/**
|
|
36
|
+
/**
|
|
37
|
+
* HTTP's, the envelope's, or ours: `timeout`, `unreachable`, `not_json`,
|
|
38
|
+
* `not_signed_in`, `wrong_group`, `form`, `not_registered`.
|
|
39
|
+
*/
|
|
21
40
|
code,
|
|
22
41
|
/**
|
|
23
42
|
* The code came from the backend's envelope (an HTTP 200 that says no), not from
|
|
24
|
-
* HTTP itself: its envelope says 500 for "wrong password"
|
|
25
|
-
*
|
|
43
|
+
* HTTP itself: its envelope says 500 for "wrong password" (apidev) - so that 500
|
|
44
|
+
* is an answer, not a service that did not answer.
|
|
26
45
|
*/
|
|
27
|
-
envelope = false
|
|
46
|
+
envelope = false,
|
|
47
|
+
/**
|
|
48
|
+
* The backend's words for its no (0.61.1, questions #55) - the envelope's `msg`,
|
|
49
|
+
* or, where the envelope said yes and the answer `success: false`, its `message`
|
|
50
|
+
* or `summary` - cleaned by `saidOf`: for the log line and, as they wrote it,
|
|
51
|
+
* the page. Never a body.
|
|
52
|
+
*/
|
|
53
|
+
said) {
|
|
28
54
|
super(`the Otaless member service refused (${String(code).slice(0, 24)})`);
|
|
29
55
|
this.code = code;
|
|
30
56
|
this.envelope = envelope;
|
|
57
|
+
this.said = said;
|
|
31
58
|
this.name = 'OtaMemberError';
|
|
32
59
|
}
|
|
33
60
|
}
|
|
61
|
+
/** A user name, an email or a phone; a password - as our pages' forms cap them. */
|
|
62
|
+
export const LIMITS = {
|
|
63
|
+
account: 120,
|
|
64
|
+
userName: 50,
|
|
65
|
+
email: 254,
|
|
66
|
+
password: 128,
|
|
67
|
+
mobile: 24,
|
|
68
|
+
nickname: 50,
|
|
69
|
+
};
|
|
34
70
|
/** "ASR Member (AS829836)" → "ASR Member (AS82••36)": a number in a label is hidden but for its ends. */
|
|
35
71
|
export const maskLabel = (label) => label.replace(/[A-Z]{0,4}\d[A-Z0-9-]{4,}/gi, (n) => n.length <= 6 ? `${n.slice(0, 1)}••` : `${n.slice(0, 4)}••${n.slice(-2)}`);
|
|
36
72
|
/** A membership number hidden but for its ends. */
|
|
37
73
|
export const maskNumber = (n) => n.length <= 6 ? `${n.slice(0, 1)}••` : `${n.slice(0, 4)}••${n.slice(-2)}`;
|
|
74
|
+
/** A link built from a group's sign-in. */
|
|
75
|
+
export const linkOf = (group, session, profile, at) => ({
|
|
76
|
+
group,
|
|
77
|
+
...(profile.accountLabel ? { label: maskLabel(profile.accountLabel) } : {}),
|
|
78
|
+
token: session.access,
|
|
79
|
+
...(session.mcpToken ? { session: session.mcpToken } : {}),
|
|
80
|
+
...(session.mcpSessionId ? { mcpSessionId: session.mcpSessionId } : {}),
|
|
81
|
+
expires: session.expires,
|
|
82
|
+
linkedAt: at,
|
|
83
|
+
});
|
|
38
84
|
const LABEL_MAX = 60;
|
|
39
|
-
/** The longest a
|
|
40
|
-
const MAX_SESSION_S = 24 * 60 * 60;
|
|
85
|
+
/** The longest a session is believed: the backend's word, held to a day (our own limit). */
|
|
86
|
+
export const MAX_SESSION_S = 24 * 60 * 60;
|
|
87
|
+
/** No lifetime said: two hours, the shortest any of their tokens has had. */
|
|
88
|
+
const DEFAULT_SESSION_S = 2 * 60 * 60;
|
|
89
|
+
/** A channel's code, as we take one from their answer (`channelResults`' keys). */
|
|
90
|
+
const CHANNEL = /^[a-z0-9_-]{1,32}$/i;
|
|
91
|
+
/** One line of theirs, as we keep a field they named something with: no control or bidi characters. */
|
|
92
|
+
const str = (v, max = 200) => {
|
|
93
|
+
if (typeof v !== 'string' && typeof v !== 'number')
|
|
94
|
+
return '';
|
|
95
|
+
return Array.from(String(v))
|
|
96
|
+
.filter((ch) => {
|
|
97
|
+
const c = ch.codePointAt(0) ?? 0;
|
|
98
|
+
return !(c < 0x20 ||
|
|
99
|
+
(c >= 0x7f && c <= 0x9f) ||
|
|
100
|
+
(c >= 0x200b && c <= 0x200f) ||
|
|
101
|
+
(c >= 0x202a && c <= 0x202e) ||
|
|
102
|
+
(c >= 0x2066 && c <= 0x2069) ||
|
|
103
|
+
c === 0x2028 ||
|
|
104
|
+
c === 0x2029 ||
|
|
105
|
+
c === 0xfeff);
|
|
106
|
+
})
|
|
107
|
+
.join('')
|
|
108
|
+
.trim()
|
|
109
|
+
.slice(0, max);
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Their `memberUserId` as the digits they sent (0.62.0). ⚠️ A JAVA LONG IS NOT A
|
|
113
|
+
* JS NUMBER: past 2^53 JSON.parse rounds it, and two members whose ids are a
|
|
114
|
+
* rounding apart would read the same - the same owner of a booking (booking.ts
|
|
115
|
+
* hashes it). So the digits are taken from the answer as it came, where they
|
|
116
|
+
* agree with the parsed number; else the number as parsed, or a string as sent.
|
|
117
|
+
*/
|
|
118
|
+
export const exactId = (v, text) => {
|
|
119
|
+
if (typeof v === 'string')
|
|
120
|
+
return /^\d{1,25}$/.test(v.trim()) ? v.trim() : '';
|
|
121
|
+
if (typeof v !== 'number' || !Number.isFinite(v))
|
|
122
|
+
return '';
|
|
123
|
+
const m = /"memberUserId"\s*:\s*(\d{1,25})\b/.exec(text);
|
|
124
|
+
return m?.[1] && Number(m[1]) === v ? m[1] : String(v);
|
|
125
|
+
};
|
|
41
126
|
export const makeOtaMembers = (opts) => {
|
|
42
127
|
const base = opts.baseUrl.replace(/\/+$/, '');
|
|
43
128
|
const doFetch = opts.fetch ?? fetch;
|
|
44
129
|
const now = opts.now ?? Date.now;
|
|
45
130
|
const timeoutMs = opts.timeoutMs ?? 15_000;
|
|
46
|
-
const post = async (path, body, auth
|
|
131
|
+
const post = async (path, body, auth,
|
|
132
|
+
/** What the body carries that names someone, and what must never be written (see said.ts). */
|
|
133
|
+
hide = {}) => {
|
|
134
|
+
const said = (msg) => saidOf(msg, hide.shown, [...(hide.secret ?? []), auth]);
|
|
47
135
|
let res;
|
|
48
136
|
try {
|
|
49
137
|
res = await doFetch(`${base}${path}`, {
|
|
@@ -52,36 +140,68 @@ export const makeOtaMembers = (opts) => {
|
|
|
52
140
|
accept: 'application/json',
|
|
53
141
|
'content-type': 'application/json;charset=UTF-8',
|
|
54
142
|
'X-Tenant-Id': opts.tenant,
|
|
55
|
-
Authorization: `Bearer ${auth}
|
|
143
|
+
...(auth ? { Authorization: `Bearer ${auth}` } : {}),
|
|
56
144
|
},
|
|
57
145
|
body: JSON.stringify(body),
|
|
58
146
|
signal: AbortSignal.timeout(timeoutMs),
|
|
59
|
-
// ⚠️ NEVER AFTER A REDIRECT (总线程's review of 0.59.0
|
|
60
|
-
//
|
|
61
|
-
// Otaless token on to wherever it points.
|
|
147
|
+
// ⚠️ NEVER AFTER A REDIRECT (总线程's review of 0.59.0 - Nexva's M-28): a 307 /
|
|
148
|
+
// 308 sends the same body - a password - and the token on to wherever it points.
|
|
62
149
|
redirect: 'error',
|
|
63
150
|
});
|
|
64
151
|
}
|
|
65
152
|
catch (e) {
|
|
66
153
|
throw new OtaMemberError(e?.name === 'TimeoutError' ? 'timeout' : 'unreachable');
|
|
67
154
|
}
|
|
68
|
-
if (!res.ok)
|
|
69
|
-
|
|
155
|
+
if (!res.ok) {
|
|
156
|
+
const text = await res.text().catch(() => '');
|
|
157
|
+
throw new OtaMemberError(res.status, false, said(msgIn(text)));
|
|
158
|
+
}
|
|
70
159
|
let env;
|
|
160
|
+
let raw = '';
|
|
71
161
|
try {
|
|
72
|
-
|
|
162
|
+
raw = await res.text();
|
|
163
|
+
env = JSON.parse(raw);
|
|
73
164
|
}
|
|
74
165
|
catch {
|
|
75
166
|
throw new OtaMemberError('not_json');
|
|
76
167
|
}
|
|
77
|
-
if (env?.code !== 200)
|
|
78
|
-
throw new OtaMemberError(typeof env?.code === 'number' ? env.code : 'envelope', true);
|
|
79
|
-
|
|
168
|
+
if (env?.code !== 200 && env?.code !== '200')
|
|
169
|
+
throw new OtaMemberError(typeof env?.code === 'number' ? env.code : 'envelope', true, said(env?.msg));
|
|
170
|
+
const data = env.data && typeof env.data === 'object' ? env.data : {};
|
|
171
|
+
return { data, headers: res.headers, raw, said };
|
|
80
172
|
};
|
|
81
|
-
|
|
173
|
+
/** Their words where the envelope said yes and the answer no: `message`, else `summary`. */
|
|
174
|
+
const noSaid = (d, said) => said(typeof d.message === 'string' && d.message.trim() ? d.message : d.summary);
|
|
82
175
|
return {
|
|
83
|
-
async
|
|
84
|
-
|
|
176
|
+
async registerAccount({ userName, email, password, name, phone, lang }) {
|
|
177
|
+
// ⚠️ NO providerCode: their 聚合模式 - every channel they have on, and their own
|
|
178
|
+
// member_user beside (11-10 document, item 1).
|
|
179
|
+
const { data: d, said } = await post('/api/v1/ota/register', {
|
|
180
|
+
username: userName,
|
|
181
|
+
email,
|
|
182
|
+
password,
|
|
183
|
+
...(name ? { name } : {}),
|
|
184
|
+
...(phone ? { phone } : {}),
|
|
185
|
+
lang,
|
|
186
|
+
}, undefined, { shown: [userName, email, name, phone], secret: [password] });
|
|
187
|
+
const results = d.channelResults && typeof d.channelResults === 'object'
|
|
188
|
+
? Object.entries(d.channelResults)
|
|
189
|
+
: [];
|
|
190
|
+
// Each channel by its code and whether it took the account - nothing else of
|
|
191
|
+
// theirs: their `summary` there may name the guest.
|
|
192
|
+
const channels = results
|
|
193
|
+
.filter(([code]) => CHANNEL.test(code))
|
|
194
|
+
.slice(0, 20)
|
|
195
|
+
.map(([code, r]) => ({
|
|
196
|
+
code: code.toLowerCase(),
|
|
197
|
+
ok: !!r && typeof r === 'object' && r.success === true,
|
|
198
|
+
}));
|
|
199
|
+
if (d.success !== true)
|
|
200
|
+
throw new OtaMemberError('not_registered', false, noSaid(d, said));
|
|
201
|
+
return { channels };
|
|
202
|
+
},
|
|
203
|
+
async signIn({ group, identity, password, auth, lang }) {
|
|
204
|
+
const { data: d, headers, raw: text, said, } = await post('/api/v1/ota/sign-in', { providerCode: group, username: identity, password, ...(lang ? { lang } : {}) }, auth, { shown: [identity], secret: [password] });
|
|
85
205
|
// ⚠️ EVERY PART MUST AGREE (questions #48) - see the top of this file.
|
|
86
206
|
const raw = d.rawPayload;
|
|
87
207
|
const aForm = !!raw &&
|
|
@@ -89,38 +209,59 @@ export const makeOtaMembers = (opts) => {
|
|
|
89
209
|
('_card' in raw || 'identity_field' in raw || 'form' in raw);
|
|
90
210
|
if (aForm)
|
|
91
211
|
throw new OtaMemberError('form');
|
|
92
|
-
if (d.success !== true
|
|
212
|
+
if (d.success !== true)
|
|
213
|
+
throw new OtaMemberError('not_signed_in', false, noSaid(d, said));
|
|
214
|
+
if (d.signedIn !== true)
|
|
93
215
|
throw new OtaMemberError('not_signed_in');
|
|
94
216
|
if (str(d.providerCode).toLowerCase() !== group.toLowerCase())
|
|
95
217
|
throw new OtaMemberError('wrong_group');
|
|
96
|
-
const
|
|
97
|
-
if (!
|
|
98
|
-
throw new OtaMemberError('not_signed_in');
|
|
99
|
-
const token = str(d.accessToken);
|
|
100
|
-
if (!token)
|
|
218
|
+
const access = str(d.accessToken, 2000);
|
|
219
|
+
if (!access)
|
|
101
220
|
throw new OtaMemberError('not_signed_in');
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
const
|
|
221
|
+
const ttl = Number(d.expireIn);
|
|
222
|
+
const seconds = Number.isFinite(ttl) && ttl > 0 ? Math.min(ttl, MAX_SESSION_S) : DEFAULT_SESSION_S;
|
|
223
|
+
// The body's `mcpSessionId`; their response header carries the same (the document).
|
|
224
|
+
const mcpSessionId = str(d.mcpSessionId, 200) || str(headers.get('mcp-session-id'), 200);
|
|
225
|
+
const mcpToken = str(d.mcpToken, 2000) || str(d.sessionToken, 2000);
|
|
226
|
+
const memberUserId = exactId(d.memberUserId, text);
|
|
227
|
+
const session = {
|
|
228
|
+
provider: group.toLowerCase(),
|
|
229
|
+
access,
|
|
230
|
+
expires: now() + seconds * 1000,
|
|
231
|
+
...(memberUserId ? { memberUserId } : {}),
|
|
232
|
+
...(mcpSessionId ? { mcpSessionId } : {}),
|
|
233
|
+
...(mcpToken ? { mcpToken } : {}),
|
|
234
|
+
};
|
|
235
|
+
const username = str(d.username, 120);
|
|
236
|
+
const name = str(d.name, 60);
|
|
237
|
+
const email = str(d.email, LIMITS.email);
|
|
238
|
+
const accountLabel = str(d.accountLabel, LABEL_MAX);
|
|
106
239
|
return {
|
|
107
|
-
group,
|
|
108
|
-
...(label ? { label: maskLabel(label) } : {}),
|
|
109
|
-
token,
|
|
110
240
|
session,
|
|
111
|
-
|
|
112
|
-
|
|
241
|
+
profile: {
|
|
242
|
+
...(username ? { username } : {}),
|
|
243
|
+
...(name ? { name } : {}),
|
|
244
|
+
...(email ? { email } : {}),
|
|
245
|
+
...(accountLabel ? { accountLabel } : {}),
|
|
246
|
+
},
|
|
113
247
|
};
|
|
114
248
|
},
|
|
115
249
|
async register({ group, name, email, password, phone, auth }) {
|
|
116
|
-
const d = await post('/api/v1/ota/member/register', { providerCode: group, name, email, password, ...(phone ? { phone } : {}) }, auth);
|
|
250
|
+
const { data: d, said } = await post('/api/v1/ota/member/register', { providerCode: group, name, email, password, ...(phone ? { phone } : {}) }, auth, { shown: [name, email, phone], secret: [password] });
|
|
117
251
|
if (d.success !== true)
|
|
118
|
-
throw new OtaMemberError('not_registered');
|
|
119
|
-
const memberNo = str(d.memberNo
|
|
252
|
+
throw new OtaMemberError('not_registered', false, noSaid(d, said));
|
|
253
|
+
const memberNo = str(d.memberNo, 40);
|
|
120
254
|
return { alreadyRegistered: d.alreadyRegistered === true, ...(memberNo ? { memberNo } : {}) };
|
|
121
255
|
},
|
|
122
256
|
async signOut({ group, session, auth }) {
|
|
123
|
-
await post('/api/v1/ota/sign-out', {
|
|
257
|
+
await post('/api/v1/ota/sign-out', {
|
|
258
|
+
providerCode: group,
|
|
259
|
+
// The 11-10 document wants `mcpToken`, and requires it; apidev may not
|
|
260
|
+
// have that document's build yet, so the old name goes beside it.
|
|
261
|
+
// TODO: drop `sessionToken` once the backend confirms (questions #55,
|
|
262
|
+
// "2026-11-10 新版文档对照").
|
|
263
|
+
...(session ? { mcpToken: session, sessionToken: session } : {}),
|
|
264
|
+
}, auth, { secret: [session] });
|
|
124
265
|
},
|
|
125
266
|
};
|
|
126
267
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ota-member.js","sourceRoot":"","sources":["../../src/account/ota-member.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,+CAA+C;AAC/C,gFAAgF;AAChF,8EAA8E;AAC9E,gEAAgE;AAChE,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAChF,wEAAwE;AACxE,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,+EAA+E;AAC/E,+EAA+E;AAC/E,w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,KAAK,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE;YACpC,MAAM,IAAI,CACR,sBAAsB,EACtB;gBACE,YAAY,EAAE,KAAK;gBACnB,uEAAuE;gBACvE,kEAAkE;gBAClE,sEAAsE;gBACtE,wBAAwB;gBACxB,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACjE,EACD,IAAI,EACJ,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CACtB,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
|
package/dist/account/pages.d.ts
CHANGED
|
@@ -53,10 +53,13 @@ declare const WORDS: {
|
|
|
53
53
|
readonly limitedLine: readonly ["请等一分钟再试。", "Wait a minute, then try again."];
|
|
54
54
|
readonly nosessionH: readonly ["请从对话里打开账号", "Open your account from your chat"];
|
|
55
55
|
readonly nosessionLine: readonly ["账号页只在你登录的那个浏览器里打开,登录后 30 分钟内有效。也可以在对话里看账号。", "This page opens only in the browser you signed in with, for 30 minutes after. Your chat shows your account too."];
|
|
56
|
+
readonly sign_in_refused: readonly ["没能登录。", "Could not sign in."];
|
|
57
|
+
readonly register_refused: readonly ["没能创建账号。", "The account could not be created."];
|
|
56
58
|
readonly sign_in_failed: readonly ["用户名或密码不对,没能登录。", "That user name and password did not sign in."];
|
|
59
|
+
readonly sign_in_unconfirmed: readonly ["{0} 没有确认这次登录。可能是账号或密码不对,也可能是 {0} 那边暂时不接受这种登录方式。", "{0} did not confirm this sign-in. The account or password may be wrong, or {0} may not be accepting this way of signing in just now."];
|
|
57
60
|
readonly register_failed: readonly ["没能创建这个账号。用户名或邮箱可能已经注册过,可以试试直接登录。", "That account could not be created. The user name or email may already be registered: try signing in instead."];
|
|
58
61
|
readonly registered_not_signed_in: readonly ["账号已经创建,但没能自动登录。请用刚才的用户名和密码登录。", "The account was created, but signing in failed. Sign in with that user name and password."];
|
|
59
|
-
readonly missing_in: readonly ["
|
|
62
|
+
readonly missing_in: readonly ["请填写邮箱(或用户名)和密码。", "Enter your email (or user name) and password."];
|
|
60
63
|
readonly missing_up: readonly ["请填写用户名、邮箱和密码。", "Enter a user name, an email and a password."];
|
|
61
64
|
readonly bad_email: readonly ["邮箱地址格式不对。", "That email address does not look right."];
|
|
62
65
|
readonly bad_mobile: readonly ["手机号要带国家区号,以 + 开头(如 +86 138 0000 0000)。", "A phone number needs its country code, starting with + (like +86 138 0000 0000)."];
|
|
@@ -92,6 +95,8 @@ declare const WORDS: {
|
|
|
92
95
|
readonly linkPrivacyNote: readonly ["{1} 的密码只从这个页面经 {0} 发到 {1},用一次就丢。助手看不到它,我们也不保存、不记录。", "Your {1} password goes from this page through {0} to {1} once, and is then dropped. The assistant never sees it, and it is not kept or logged."];
|
|
93
96
|
readonly 'Linked: {0}': readonly ["已关联:{0}", "Linked: {0}"];
|
|
94
97
|
readonly linkedLine: readonly ["回到对话:几秒内就会显示 {0} 会员已关联。", "Go back to your chat: it shows your {0} membership linked within a few seconds."];
|
|
98
|
+
readonly link_refused: readonly ["{0} 没有确认这次登录。", "{0} did not confirm this sign-in."];
|
|
99
|
+
readonly join_refused: readonly ["没能注册 {0} 会员。", "That {0} membership could not be made."];
|
|
95
100
|
readonly link_failed: readonly ["没能关联 {0} 会员:邮箱(或用户名)和密码没有通过。", "That {0} membership could not be linked: the email (or user name) and password did not sign in."];
|
|
96
101
|
readonly join_failed: readonly ["没能注册 {0} 会员。这个邮箱可能已经注册过,可以试试直接关联。", "That {0} membership could not be made. The email may already be registered: try linking it instead."];
|
|
97
102
|
readonly joined_not_linked: readonly ["{0}会员已注册,但这次没能关联上。请用刚才的邮箱和密码再关联一次,不用重新注册。", "Your {0} membership is registered, but it could not be linked this time. Link it again with that email and password: there is no need to register again."];
|
|
@@ -161,13 +166,15 @@ export type LoginValues = {
|
|
|
161
166
|
mobile?: string;
|
|
162
167
|
nickname?: string;
|
|
163
168
|
};
|
|
164
|
-
export declare const loginPage: (b: PageBrand, { lang, short, code, csrf, words, error, form, values, }: {
|
|
169
|
+
export declare const loginPage: (b: PageBrand, { lang, short, code, csrf, words, error, said, form, values, }: {
|
|
165
170
|
lang: Lang;
|
|
166
171
|
short: string;
|
|
167
172
|
code: string;
|
|
168
173
|
csrf: string;
|
|
169
174
|
words: boolean;
|
|
170
175
|
error?: string;
|
|
176
|
+
/** The backend's own words for the refusal (0.61.1), shown under `error`. */
|
|
177
|
+
said?: string;
|
|
171
178
|
form?: "in" | "up";
|
|
172
179
|
values?: LoginValues;
|
|
173
180
|
}) => string;
|
|
@@ -244,6 +251,8 @@ export declare const linkReauthPage: (b: PageBrand, o: {
|
|
|
244
251
|
group: string;
|
|
245
252
|
logo?: string;
|
|
246
253
|
error?: string;
|
|
254
|
+
/** The backend's own words for the refusal (0.61.1), shown under `error`. */
|
|
255
|
+
said?: string;
|
|
247
256
|
}) => string;
|
|
248
257
|
/** A group's membership: signed in to (`in`) or joined (`up`), and linked to the account named under its heading. */
|
|
249
258
|
export declare const linkGroupPage: (b: PageBrand, o: {
|
|
@@ -257,6 +266,8 @@ export declare const linkGroupPage: (b: PageBrand, o: {
|
|
|
257
266
|
accountName: string;
|
|
258
267
|
mode: "in" | "up";
|
|
259
268
|
error?: string;
|
|
269
|
+
/** The backend's own words for the refusal (0.61.1), shown under `error`. */
|
|
270
|
+
said?: string;
|
|
260
271
|
values?: LinkValues;
|
|
261
272
|
}) => string;
|
|
262
273
|
export declare const linkedPage: (b: PageBrand, { lang, group, label }: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pages.d.ts","sourceRoot":"","sources":["../../src/account/pages.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"pages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;IACD,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6EAA6E;IAC7E,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,KACA,MAqBF,CAAC;AAEF,qHAAqH;AACrH,eAAO,MAAM,aAAa,GACxB,GAAG,SAAS,EACZ,GAAG;IACD,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oGAAoG;IACpG,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6EAA6E;IAC7E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB,KACA,MAiCF,CAAC;AAEF,eAAO,MAAM,UAAU,GACrB,GAAG,SAAS,EACZ,wBAAwB;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,KACpE,MAQC,CAAC"}
|
package/dist/account/pages.js
CHANGED
|
@@ -3,6 +3,17 @@ import { createHash } from 'node:crypto';
|
|
|
3
3
|
// logo, one fixed script (the show-password button, hashed in the CSP), not framable, not cached, posting only to themselves
|
|
4
4
|
// (Nexva One's rules for its /login and /account, 2026-11-04).
|
|
5
5
|
const esc = (s) => String(s ?? '').replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' })[c] ?? c);
|
|
6
|
+
/**
|
|
7
|
+
* A refusal: our line, and under it - when the backend gave a reason - its own
|
|
8
|
+
* words as it wrote them (0.61.1), escaped, one line, at most 120 characters
|
|
9
|
+
* (said.ts cleaned them; cut here again so a page never holds more).
|
|
10
|
+
*/
|
|
11
|
+
const refusalOf = (error, said) => {
|
|
12
|
+
if (!error)
|
|
13
|
+
return '';
|
|
14
|
+
const theirs = said ? Array.from(said.replace(/\s+/g, ' ').trim()).slice(0, 120).join('') : '';
|
|
15
|
+
return `<p class="msg err" role="alert">${esc(error)}${theirs ? `<span class="said">${esc(theirs)}</span>` : ''}</p>`;
|
|
16
|
+
};
|
|
6
17
|
/** Every page's words, in the two languages the pages speak. `{0}` is a value. */
|
|
7
18
|
const WORDS = {
|
|
8
19
|
'Sign in to {0}': ['登录 {0} 账号', 'Sign in to {0}'],
|
|
@@ -86,8 +97,19 @@ const WORDS = {
|
|
|
86
97
|
'账号页只在你登录的那个浏览器里打开,登录后 30 分钟内有效。也可以在对话里看账号。',
|
|
87
98
|
'This page opens only in the browser you signed in with, for 30 minutes after. Your chat shows your account too.',
|
|
88
99
|
],
|
|
89
|
-
// Refusals
|
|
100
|
+
// Refusals. When the backend said why (0.61.1, `said`), one of these `*_refused`
|
|
101
|
+
// lines that guesses nothing, and its words under it as they wrote them
|
|
102
|
+
// (robin: 供应方原文照原样显示); the lines with a guess in them only when it
|
|
103
|
+
// said nothing - or did not answer at all.
|
|
104
|
+
sign_in_refused: ['没能登录。', 'Could not sign in.'],
|
|
105
|
+
register_refused: ['没能创建账号。', 'The account could not be created.'],
|
|
90
106
|
sign_in_failed: ['用户名或密码不对,没能登录。', 'That user name and password did not sign in.'],
|
|
107
|
+
// The backend did not confirm the sign-in, and did not say the password was wrong
|
|
108
|
+
// (a form, no session, another channel): not the guest's mistake to be told (0.62.0).
|
|
109
|
+
sign_in_unconfirmed: [
|
|
110
|
+
'{0} 没有确认这次登录。可能是账号或密码不对,也可能是 {0} 那边暂时不接受这种登录方式。',
|
|
111
|
+
'{0} did not confirm this sign-in. The account or password may be wrong, or {0} may not be accepting this way of signing in just now.',
|
|
112
|
+
],
|
|
91
113
|
register_failed: [
|
|
92
114
|
'没能创建这个账号。用户名或邮箱可能已经注册过,可以试试直接登录。',
|
|
93
115
|
'That account could not be created. The user name or email may already be registered: try signing in instead.',
|
|
@@ -96,7 +118,7 @@ const WORDS = {
|
|
|
96
118
|
'账号已经创建,但没能自动登录。请用刚才的用户名和密码登录。',
|
|
97
119
|
'The account was created, but signing in failed. Sign in with that user name and password.',
|
|
98
120
|
],
|
|
99
|
-
missing_in: ['
|
|
121
|
+
missing_in: ['请填写邮箱(或用户名)和密码。', 'Enter your email (or user name) and password.'],
|
|
100
122
|
missing_up: ['请填写用户名、邮箱和密码。', 'Enter a user name, an email and a password.'],
|
|
101
123
|
bad_email: ['邮箱地址格式不对。', 'That email address does not look right.'],
|
|
102
124
|
bad_mobile: [
|
|
@@ -181,6 +203,8 @@ const WORDS = {
|
|
|
181
203
|
'回到对话:几秒内就会显示 {0} 会员已关联。',
|
|
182
204
|
'Go back to your chat: it shows your {0} membership linked within a few seconds.',
|
|
183
205
|
],
|
|
206
|
+
link_refused: ['{0} 没有确认这次登录。', '{0} did not confirm this sign-in.'],
|
|
207
|
+
join_refused: ['没能注册 {0} 会员。', 'That {0} membership could not be made.'],
|
|
184
208
|
link_failed: [
|
|
185
209
|
'没能关联 {0} 会员:邮箱(或用户名)和密码没有通过。',
|
|
186
210
|
'That {0} membership could not be linked: the email (or user name) and password did not sign in.',
|
|
@@ -298,6 +322,7 @@ p { margin: 0 0 12px }
|
|
|
298
322
|
padding: 12px 14px; margin: 0; font-size: 15px; font-weight: 600 }
|
|
299
323
|
.msg { border-radius: 10px; padding: 12px 14px; margin: 0 0 16px; font-size: 15px }
|
|
300
324
|
.msg.err { color: var(--bad); background: var(--bad-bg) }
|
|
325
|
+
.msg .said { display: block; margin-top: 4px; overflow-wrap: anywhere }
|
|
301
326
|
label.field { display: block; margin: 0 0 14px }
|
|
302
327
|
label.field > span { display: block; font-size: 14px; font-weight: 600; margin: 0 0 6px }
|
|
303
328
|
label.field em { font-style: normal; font-weight: 400; color: var(--soft) }
|
|
@@ -414,7 +439,7 @@ export const statePage = (b, lang, state, langHref, again) => {
|
|
|
414
439
|
const hidden = (fields) => Object.entries(fields)
|
|
415
440
|
.map(([k, v]) => `<input type="hidden" name="${esc(k)}" value="${esc(v)}">`)
|
|
416
441
|
.join('');
|
|
417
|
-
export const loginPage = (b, { lang, short, code, csrf, words, error, form = 'in', values = {}, }) => {
|
|
442
|
+
export const loginPage = (b, { lang, short, code, csrf, words, error, said, form = 'in', values = {}, }) => {
|
|
418
443
|
const up = form === 'up';
|
|
419
444
|
const base = { code, csrf, lang };
|
|
420
445
|
const field = (label, input, optional = false, note) => `<label class="field"><span>${esc(say(lang, label))}${optional ? ` <em>${esc(say(lang, 'optional'))}</em>` : ''}${note ? ` <em>${esc(say(lang, note))}</em>` : ''}</span>${input}</label>`;
|
|
@@ -422,7 +447,7 @@ export const loginPage = (b, { lang, short, code, csrf, words, error, form = 'in
|
|
|
422
447
|
// L3): between the code and the form it was read past.
|
|
423
448
|
// The password with its show/hide button (hidden until the script runs).
|
|
424
449
|
const password = (id, autocomplete, extra = '') => `<div class="pw">${field('Password', `<input id="${id}" name="password" type="password" autocomplete="${autocomplete}" required maxlength="128"${extra}>`)}${revealButton(lang, id)}</div>`;
|
|
425
|
-
const refusal = error
|
|
450
|
+
const refusal = refusalOf(error, said);
|
|
426
451
|
const action = `${b.base}/login`;
|
|
427
452
|
// ⚠️ SIGN IN AND CREATE AN ACCOUNT ARE TWO SCREENS (robin 11-06: 「登录和注册放在
|
|
428
453
|
// 同一页很怪,要分开」): one link, `&view=register` the second - each with the
|
|
@@ -430,7 +455,7 @@ export const loginPage = (b, { lang, short, code, csrf, words, error, form = 'in
|
|
|
430
455
|
const href = (view, l = lang) => `${b.base}/login?code=${encodeURIComponent(code)}${view === 'up' ? '&view=register' : ''}&lang=${l}`;
|
|
431
456
|
const title = say(lang, up ? 'Create {0} account' : 'Sign in to {0}', b.brand);
|
|
432
457
|
const signIn = `<form class="box" method="post" action="${esc(action)}" autocomplete="on">${hidden({ ...base, form: 'in' })}
|
|
433
|
-
${field('
|
|
458
|
+
${field('Email or user name', `<input name="account" autocomplete="username" required maxlength="120" value="${esc(values.account ?? '')}">`)}
|
|
434
459
|
${password('pw-in', 'current-password')}
|
|
435
460
|
${refusal}
|
|
436
461
|
<button class="primary" type="submit">${esc(say(lang, 'Sign in'))}</button>
|
|
@@ -502,11 +527,10 @@ const membershipsSection = (b, lang, csrf, rows) => {
|
|
|
502
527
|
*/
|
|
503
528
|
export const accountPage = (b, { lang, shown, csrf, memberships, }) => {
|
|
504
529
|
const name = shown.displayName || shown.userName || '';
|
|
505
|
-
// The card's facts, in its order
|
|
530
|
+
// The card's facts, in its order - what the sign-in said (0.62.0: no phone in it).
|
|
506
531
|
const facts = [
|
|
507
532
|
['User name', shown.userName],
|
|
508
533
|
['Email', shown.email],
|
|
509
|
-
['Phone', shown.mobile],
|
|
510
534
|
];
|
|
511
535
|
const body = `<h1>${esc(say(lang, 'Your {0} account', b.brand))}</h1>
|
|
512
536
|
<div class="box"><div class="who"><span class="av" aria-hidden="true">${esc(Array.from(name)[0]?.toUpperCase() ?? '?')}</span><span class="name">${esc(name || say(lang, 'finishedH'))}</span></div>
|
|
@@ -581,9 +605,9 @@ export const linkReauthPage = (b, o) => {
|
|
|
581
605
|
const field = (label, input) => `<label class="field"><span>${esc(say(lang, label))}</span>${input}</label>`;
|
|
582
606
|
const body = `${groupHead(o.group, o.logo, say(lang, 'First, sign in to your {0} account', b.brand))}
|
|
583
607
|
<p>${esc(say(lang, 'reauthLine', b.brand, o.group))}</p>
|
|
584
|
-
${o.error
|
|
608
|
+
${refusalOf(o.error, o.said)}
|
|
585
609
|
<form class="box" method="post" action="${esc(`${b.base}/login`)}" autocomplete="on">${hidden({ code: o.code, csrf: o.csrf, lang, form: 'reauth' })}
|
|
586
|
-
${field('
|
|
610
|
+
${field('Email or user name', '<input name="account" autocomplete="username" required maxlength="120">')}
|
|
587
611
|
<div class="pw">${field('Password', '<input id="pw-re" name="password" type="password" autocomplete="current-password" required maxlength="128">')}${revealButton(lang, 'pw-re')}</div>
|
|
588
612
|
<button class="primary" type="submit">${esc(say(lang, 'Sign in'))}</button>
|
|
589
613
|
</form>
|
|
@@ -623,7 +647,7 @@ export const linkGroupPage = (b, o) => {
|
|
|
623
647
|
</form>
|
|
624
648
|
<p class="switch">${esc(say(lang, 'Already a member?'))} <a href="${esc(href('in'))}">${esc(say(lang, 'Link membership'))}</a></p>`;
|
|
625
649
|
const body = `${groupHead(o.group, o.logo, line)}
|
|
626
|
-
${o.error
|
|
650
|
+
${refusalOf(o.error, o.said)}
|
|
627
651
|
${up ? join : signIn}
|
|
628
652
|
<p class="note">${esc(say(lang, 'linkPrivacyNote', b.brand, o.group))}</p>
|
|
629
653
|
<script>${REVEAL_SCRIPT}</script>`;
|