@curless/hotel-storefront 0.61.1 → 0.63.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/dist/account/fake-ota.d.ts +78 -0
  2. package/dist/account/fake-ota.d.ts.map +1 -0
  3. package/dist/account/fake-ota.js +269 -0
  4. package/dist/account/fake-ota.js.map +1 -0
  5. package/dist/account/index.d.ts +60 -22
  6. package/dist/account/index.d.ts.map +1 -1
  7. package/dist/account/index.js +596 -197
  8. package/dist/account/index.js.map +1 -1
  9. package/dist/account/mask.d.ts +15 -0
  10. package/dist/account/mask.d.ts.map +1 -0
  11. package/dist/account/mask.js +51 -0
  12. package/dist/account/mask.js.map +1 -0
  13. package/dist/account/ota-member.d.ts +99 -14
  14. package/dist/account/ota-member.d.ts.map +1 -1
  15. package/dist/account/ota-member.js +167 -48
  16. package/dist/account/ota-member.js.map +1 -1
  17. package/dist/account/pages.d.ts +101 -1
  18. package/dist/account/pages.d.ts.map +1 -1
  19. package/dist/account/pages.js +238 -9
  20. package/dist/account/pages.js.map +1 -1
  21. package/dist/account/requests.d.ts +12 -2
  22. package/dist/account/requests.d.ts.map +1 -1
  23. package/dist/account/requests.js +4 -3
  24. package/dist/account/requests.js.map +1 -1
  25. package/dist/account/said.js +2 -2
  26. package/dist/account/said.js.map +1 -1
  27. package/dist/account/store.d.ts +16 -15
  28. package/dist/account/store.d.ts.map +1 -1
  29. package/dist/account/store.js +29 -23
  30. package/dist/account/store.js.map +1 -1
  31. package/dist/backend.d.ts +27 -0
  32. package/dist/backend.d.ts.map +1 -1
  33. package/dist/backend.js.map +1 -1
  34. package/dist/card.generated.d.ts +1 -1
  35. package/dist/card.generated.js +2 -2
  36. package/dist/card.generated.js.map +1 -1
  37. package/dist/config.d.ts +23 -0
  38. package/dist/config.d.ts.map +1 -1
  39. package/dist/config.js +10 -0
  40. package/dist/config.js.map +1 -1
  41. package/dist/legal.d.ts.map +1 -1
  42. package/dist/legal.js +34 -22
  43. package/dist/legal.js.map +1 -1
  44. package/dist/otaless/backend.d.ts +50 -4
  45. package/dist/otaless/backend.d.ts.map +1 -1
  46. package/dist/otaless/backend.js +77 -32
  47. package/dist/otaless/backend.js.map +1 -1
  48. package/dist/otaless/booking.d.ts +202 -0
  49. package/dist/otaless/booking.d.ts.map +1 -0
  50. package/dist/otaless/booking.js +1234 -0
  51. package/dist/otaless/booking.js.map +1 -0
  52. package/dist/otaless/client.d.ts +191 -0
  53. package/dist/otaless/client.d.ts.map +1 -1
  54. package/dist/otaless/client.js +185 -17
  55. package/dist/otaless/client.js.map +1 -1
  56. package/dist/otaless/fake.d.ts +73 -0
  57. package/dist/otaless/fake.d.ts.map +1 -1
  58. package/dist/otaless/fake.js +270 -2
  59. package/dist/otaless/fake.js.map +1 -1
  60. package/dist/otaless/make.d.ts +2 -0
  61. package/dist/otaless/make.d.ts.map +1 -1
  62. package/dist/otaless/make.js +49 -1
  63. package/dist/otaless/make.js.map +1 -1
  64. package/dist/server.d.ts +2 -2
  65. package/dist/server.d.ts.map +1 -1
  66. package/dist/server.js +76 -3
  67. package/dist/server.js.map +1 -1
  68. package/dist/surface.d.ts +6 -0
  69. package/dist/surface.d.ts.map +1 -1
  70. package/dist/surface.js +71 -23
  71. package/dist/surface.js.map +1 -1
  72. package/dist/tools.d.ts +230 -52
  73. package/dist/tools.d.ts.map +1 -1
  74. package/dist/tools.js +838 -225
  75. package/dist/tools.js.map +1 -1
  76. package/dist/types.d.ts +32 -0
  77. package/dist/types.d.ts.map +1 -1
  78. package/package.json +1 -1
  79. package/dist/account/fake-mall.d.ts +0 -61
  80. package/dist/account/fake-mall.d.ts.map +0 -1
  81. package/dist/account/fake-mall.js +0 -239
  82. package/dist/account/fake-mall.js.map +0 -1
  83. package/dist/account/mall.d.ts +0 -94
  84. package/dist/account/mall.d.ts.map +0 -1
  85. package/dist/account/mall.js +0 -255
  86. package/dist/account/mall.js.map +0 -1
@@ -5,6 +5,32 @@ export type OtaMemberOptions = {
5
5
  now?: () => number;
6
6
  timeoutMs?: number;
7
7
  };
8
+ /**
9
+ * One signed-in session of the backend's, for one channel (`provider`) - in this
10
+ * process's memory only. ⚠️ Its tokens are credentials: never shown, logged, put
11
+ * in an answer or a URL, or sent anywhere but to the backend.
12
+ */
13
+ export type OtaSession = {
14
+ /** The channel it was signed in on - its `providerCode`. */
15
+ provider: string;
16
+ /** Their local session token (`accessToken`): `Authorization: Bearer` on every call after. */
17
+ access: string;
18
+ /** When it ends, by this process's clock: their `expireIn`, held to our own limit. */
19
+ expires: number;
20
+ /** Their member_user id, as a string (`memberUserId`). */
21
+ memberUserId?: string;
22
+ /** The MCP transport session (`mcpSessionId`) - `Mcp-Session-Id` on a booking. */
23
+ mcpSessionId?: string;
24
+ /** The channel's own session token (`mcpToken`): kept only because signing out needs it. */
25
+ mcpToken?: string;
26
+ };
27
+ /** Who the sign-in's answer says signed in - what the account page may show, before masking. */
28
+ export type OtaProfile = {
29
+ username?: string;
30
+ name?: string;
31
+ email?: string;
32
+ accountLabel?: string;
33
+ };
8
34
  /** A linked membership as this connector keeps it - in memory, beside the account. */
9
35
  export type OtaLink = {
10
36
  group: string;
@@ -14,49 +40,95 @@ export type OtaLink = {
14
40
  numberMasked?: string;
15
41
  /** The backend's token for this account's group prices (`accessToken`) - never shown, logged or sent but to it. */
16
42
  token: string;
17
- /** The group's own session token: kept only because signing out needs it (questions #9). */
43
+ /** The group's own session token (`mcpToken`): kept only because signing out needs it (questions #9). */
18
44
  session?: string;
45
+ /** The MCP transport session of this group's sign-in (`mcpSessionId`) - for a booking. */
46
+ mcpSessionId?: string;
19
47
  /** When the group's session ends, by this process's clock. */
20
48
  expires: number;
21
49
  linkedAt: number;
22
50
  };
23
51
  export declare class OtaMemberError extends Error {
24
- /** HTTP's, the envelope's, or ours: `timeout`, `unreachable`, `not_signed_in`, `wrong_group`, `form`. */
52
+ /**
53
+ * HTTP's, the envelope's, or ours: `timeout`, `unreachable`, `not_json`,
54
+ * `not_signed_in`, `wrong_group`, `form`, `not_registered`.
55
+ */
25
56
  readonly code: string | number;
26
57
  /**
27
58
  * The code came from the backend's envelope (an HTTP 200 that says no), not from
28
- * HTTP itself: its envelope says 500 for "wrong password" as the mall's does (apidev) -
29
- * so that 500 is an answer, not a service that did not answer.
59
+ * HTTP itself: its envelope says 500 for "wrong password" (apidev) - so that 500
60
+ * is an answer, not a service that did not answer.
30
61
  */
31
62
  readonly envelope: boolean;
32
63
  /**
33
- * The backend's `msg` (0.61.1, questions #55), cleaned by `saidOf` - for the
34
- * log line and, as they wrote it, the page. Never a body.
64
+ * The backend's words for its no (0.61.1, questions #55) - the envelope's `msg`,
65
+ * or, where the envelope said yes and the answer `success: false`, its `message`
66
+ * or `summary` - cleaned by `saidOf`: for the log line and, as they wrote it,
67
+ * the page. Never a body.
35
68
  */
36
69
  readonly said?: string | undefined;
37
70
  constructor(
38
- /** HTTP's, the envelope's, or ours: `timeout`, `unreachable`, `not_signed_in`, `wrong_group`, `form`. */
71
+ /**
72
+ * HTTP's, the envelope's, or ours: `timeout`, `unreachable`, `not_json`,
73
+ * `not_signed_in`, `wrong_group`, `form`, `not_registered`.
74
+ */
39
75
  code: string | number,
40
76
  /**
41
77
  * The code came from the backend's envelope (an HTTP 200 that says no), not from
42
- * HTTP itself: its envelope says 500 for "wrong password" as the mall's does (apidev) -
43
- * so that 500 is an answer, not a service that did not answer.
78
+ * HTTP itself: its envelope says 500 for "wrong password" (apidev) - so that 500
79
+ * is an answer, not a service that did not answer.
44
80
  */
45
81
  envelope?: boolean,
46
82
  /**
47
- * The backend's `msg` (0.61.1, questions #55), cleaned by `saidOf` - for the
48
- * log line and, as they wrote it, the page. Never a body.
83
+ * The backend's words for its no (0.61.1, questions #55) - the envelope's `msg`,
84
+ * or, where the envelope said yes and the answer `success: false`, its `message`
85
+ * or `summary` - cleaned by `saidOf`: for the log line and, as they wrote it,
86
+ * the page. Never a body.
49
87
  */
50
88
  said?: string | undefined);
51
89
  }
90
+ /** A user name, an email or a phone; a password - as our pages' forms cap them. */
91
+ export declare const LIMITS: {
92
+ account: number;
93
+ userName: number;
94
+ email: number;
95
+ password: number;
96
+ mobile: number;
97
+ nickname: number;
98
+ };
52
99
  export type OtaMembers = {
100
+ /**
101
+ * The account, made on every channel the backend has on (`/ota/register` with
102
+ * no providerCode). Answers how each channel took it, by code - for the log.
103
+ */
104
+ registerAccount(input: {
105
+ userName: string;
106
+ email: string;
107
+ password: string;
108
+ name?: string;
109
+ phone?: string;
110
+ lang: 'zh' | 'en';
111
+ }): Promise<{
112
+ channels: {
113
+ code: string;
114
+ ok: boolean;
115
+ }[];
116
+ }>;
117
+ /**
118
+ * Signed in on one channel (`/ota/sign-in`). With `auth` - the account's own
119
+ * token - it is a hotel group's membership linked to that account's session.
120
+ */
53
121
  signIn(input: {
54
122
  group: string;
55
123
  identity: string;
56
124
  password: string;
57
- /** The Otaless account's token - `Authorization: Bearer`. */
58
- auth: string;
59
- }): Promise<OtaLink>;
125
+ auth?: string;
126
+ lang?: 'zh' | 'en';
127
+ }): Promise<{
128
+ session: OtaSession;
129
+ profile: OtaProfile;
130
+ }>;
131
+ /** A hotel group's loyalty membership made (`/ota/member/register`), with the account's token. */
60
132
  register(input: {
61
133
  group: string;
62
134
  name: string;
@@ -68,6 +140,7 @@ export type OtaMembers = {
68
140
  alreadyRegistered: boolean;
69
141
  memberNo?: string;
70
142
  }>;
143
+ /** A channel's session ended (`/ota/sign-out`), with the token it was signed in under. */
71
144
  signOut(input: {
72
145
  group: string;
73
146
  session?: string;
@@ -78,5 +151,17 @@ export type OtaMembers = {
78
151
  export declare const maskLabel: (label: string) => string;
79
152
  /** A membership number hidden but for its ends. */
80
153
  export declare const maskNumber: (n: string) => string;
154
+ /** A link built from a group's sign-in. */
155
+ export declare const linkOf: (group: string, session: OtaSession, profile: OtaProfile, at: number) => OtaLink;
156
+ /** The longest a session is believed: the backend's word, held to a day (our own limit). */
157
+ export declare const MAX_SESSION_S: number;
158
+ /**
159
+ * Their `memberUserId` as the digits they sent (0.62.0). ⚠️ A JAVA LONG IS NOT A
160
+ * JS NUMBER: past 2^53 JSON.parse rounds it, and two members whose ids are a
161
+ * rounding apart would read the same - the same owner of a booking (booking.ts
162
+ * hashes it). So the digits are taken from the answer as it came, where they
163
+ * agree with the parsed number; else the number as parsed, or a string as sent.
164
+ */
165
+ export declare const exactId: (v: unknown, text: string) => string;
81
166
  export declare const makeOtaMembers: (opts: OtaMemberOptions) => OtaMembers;
82
167
  //# sourceMappingURL=ota-member.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ota-member.d.ts","sourceRoot":"","sources":["../../src/account/ota-member.ts"],"names":[],"mappings":"AAoBA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,sFAAsF;AACtF,MAAM,MAAM,OAAO,GAAG;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,mGAAmG;IACnG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mGAAmG;IACnG,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mHAAmH;IACnH,KAAK,EAAE,MAAM,CAAC;IACd,4FAA4F;IAC5F,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8DAA8D;IAC9D,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,qBAAa,cAAe,SAAQ,KAAK;IAErC,yGAAyG;IACzG,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,QAAQ;IACjB;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM;;IAZtB,yGAAyG;IAChG,IAAI,E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,CAAC;KACd,GAAG,OAAO,CAAC;QAAE,iBAAiB,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/D,0FAA0F;IAC1F,OAAO,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAClF,CAAC;AAEF,yGAAyG;AACzG,eAAO,MAAM,SAAS,GAAI,OAAO,MAAM,KAAG,MAGvC,CAAC;AACJ,mDAAmD;AACnD,eAAO,MAAM,UAAU,GAAI,GAAG,MAAM,KAAG,MACoC,CAAC;AAE5E,2CAA2C;AAC3C,eAAO,MAAM,MAAM,GACjB,OAAO,MAAM,EACb,SAAS,UAAU,EACnB,SAAS,UAAU,EACnB,IAAI,MAAM,KACT,OAQD,CAAC;AAGH,4FAA4F;AAC5F,eAAO,MAAM,aAAa,QAAe,CAAC;AA8B1C;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,GAAI,GAAG,OAAO,EAAE,MAAM,MAAM,KAAG,MAKlD,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,MAAM,gBAAgB,KAAG,UAuLvD,CAAC"}
@@ -1,37 +1,54 @@
1
- // A HOTEL GROUP'S MEMBERSHIP, LINKED TO THE OTALESS ACCOUNT (0.58.0, robin 11-06:
2
- // 「otaless 登陆之后,可以关联登陆别的酒店,比如再登陆亚朵会员拿到亚朵的折扣」).
3
- // The backend's own three - `POST /api/v1/ota/sign-in`, `/ota/member/register`,
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
- // ⚠️ THE GROUP'S PASSWORD IS IN ONE REQUEST'S MEMORY AND NOWHERE ELSE: the body
8
- // of one POST to the backend, built here and dropped. Never logged, never kept,
9
- // never in an error - a failure here carries a code and the backend's own words
10
- // for it (`said`, 0.61.1), cleaned by `saidOf`: no email, name or phone of ours
11
- // in them, and none at all if they hold the password or a token.
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.
12
24
  //
13
25
  // ⚠️ "SIGNED IN" IS PROVED, NOT TAKEN AT ITS WORD (questions #48): the backend
14
26
  // answered `signedIn: true` with a token for a sign-in that sent no credentials
15
- // at all, the group's own answer being a sign-in form. A link counts only when
16
- // every part of the answer agrees: success, signed in, the group's own session
17
- // token, the group asked for, and no form in its place.
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.
18
30
  import { msgIn, saidOf } from './said.js';
19
31
  export class OtaMemberError extends Error {
20
32
  code;
21
33
  envelope;
22
34
  said;
23
35
  constructor(
24
- /** HTTP's, the envelope's, or ours: `timeout`, `unreachable`, `not_signed_in`, `wrong_group`, `form`. */
36
+ /**
37
+ * HTTP's, the envelope's, or ours: `timeout`, `unreachable`, `not_json`,
38
+ * `not_signed_in`, `wrong_group`, `form`, `not_registered`.
39
+ */
25
40
  code,
26
41
  /**
27
42
  * The code came from the backend's envelope (an HTTP 200 that says no), not from
28
- * HTTP itself: its envelope says 500 for "wrong password" as the mall's does (apidev) -
29
- * so that 500 is an answer, not a service that did not answer.
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.
30
45
  */
31
46
  envelope = false,
32
47
  /**
33
- * The backend's `msg` (0.61.1, questions #55), cleaned by `saidOf` - for the
34
- * log line and, as they wrote it, the page. Never a body.
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.
35
52
  */
36
53
  said) {
37
54
  super(`the Otaless member service refused (${String(code).slice(0, 24)})`);
@@ -41,13 +58,71 @@ export class OtaMemberError extends Error {
41
58
  this.name = 'OtaMemberError';
42
59
  }
43
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
+ };
44
70
  /** "ASR Member (AS829836)" → "ASR Member (AS82••36)": a number in a label is hidden but for its ends. */
45
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)}`);
46
72
  /** A membership number hidden but for its ends. */
47
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
+ });
48
84
  const LABEL_MAX = 60;
49
- /** The longest a group session is believed: the backend's word, held to a day. */
50
- 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
+ };
51
126
  export const makeOtaMembers = (opts) => {
52
127
  const base = opts.baseUrl.replace(/\/+$/, '');
53
128
  const doFetch = opts.fetch ?? fetch;
@@ -65,13 +140,12 @@ export const makeOtaMembers = (opts) => {
65
140
  accept: 'application/json',
66
141
  'content-type': 'application/json;charset=UTF-8',
67
142
  'X-Tenant-Id': opts.tenant,
68
- Authorization: `Bearer ${auth}`,
143
+ ...(auth ? { Authorization: `Bearer ${auth}` } : {}),
69
144
  },
70
145
  body: JSON.stringify(body),
71
146
  signal: AbortSignal.timeout(timeoutMs),
72
- // ⚠️ NEVER AFTER A REDIRECT (总线程's review of 0.59.0, as mall.ts - Nexva's
73
- // M-28): a 307 / 308 sends the same body - the group's password - and the
74
- // 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.
75
149
  redirect: 'error',
76
150
  });
77
151
  }
@@ -83,20 +157,51 @@ export const makeOtaMembers = (opts) => {
83
157
  throw new OtaMemberError(res.status, false, said(msgIn(text)));
84
158
  }
85
159
  let env;
160
+ let raw = '';
86
161
  try {
87
- env = (await res.json());
162
+ raw = await res.text();
163
+ env = JSON.parse(raw);
88
164
  }
89
165
  catch {
90
166
  throw new OtaMemberError('not_json');
91
167
  }
92
- if (env?.code !== 200)
168
+ if (env?.code !== 200 && env?.code !== '200')
93
169
  throw new OtaMemberError(typeof env?.code === 'number' ? env.code : 'envelope', true, said(env?.msg));
94
- return (env.data ?? {});
170
+ const data = env.data && typeof env.data === 'object' ? env.data : {};
171
+ return { data, headers: res.headers, raw, said };
95
172
  };
96
- const str = (v) => (typeof v === 'string' ? v.trim() : '');
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);
97
175
  return {
98
- async signIn({ group, identity, password, auth }) {
99
- const d = await post('/api/v1/ota/sign-in', { providerCode: group, username: identity, password }, auth, { shown: [identity], secret: [password] });
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] });
100
205
  // ⚠️ EVERY PART MUST AGREE (questions #48) - see the top of this file.
101
206
  const raw = d.rawPayload;
102
207
  const aForm = !!raw &&
@@ -104,34 +209,48 @@ export const makeOtaMembers = (opts) => {
104
209
  ('_card' in raw || 'identity_field' in raw || 'form' in raw);
105
210
  if (aForm)
106
211
  throw new OtaMemberError('form');
107
- if (d.success !== true || d.signedIn !== true)
212
+ if (d.success !== true)
213
+ throw new OtaMemberError('not_signed_in', false, noSaid(d, said));
214
+ if (d.signedIn !== true)
108
215
  throw new OtaMemberError('not_signed_in');
109
216
  if (str(d.providerCode).toLowerCase() !== group.toLowerCase())
110
217
  throw new OtaMemberError('wrong_group');
111
- const session = str(d.mcpToken) || str(d.sessionToken);
112
- if (!session)
113
- throw new OtaMemberError('not_signed_in');
114
- const token = str(d.accessToken);
115
- if (!token)
218
+ const access = str(d.accessToken, 2000);
219
+ if (!access)
116
220
  throw new OtaMemberError('not_signed_in');
117
- const seconds = typeof d.expireIn === 'number' && d.expireIn > 0
118
- ? Math.min(d.expireIn, MAX_SESSION_S)
119
- : 2 * 60 * 60;
120
- const label = str(d.accountLabel).slice(0, LABEL_MAX);
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);
121
239
  return {
122
- group,
123
- ...(label ? { label: maskLabel(label) } : {}),
124
- token,
125
240
  session,
126
- expires: now() + seconds * 1000,
127
- linkedAt: now(),
241
+ profile: {
242
+ ...(username ? { username } : {}),
243
+ ...(name ? { name } : {}),
244
+ ...(email ? { email } : {}),
245
+ ...(accountLabel ? { accountLabel } : {}),
246
+ },
128
247
  };
129
248
  },
130
249
  async register({ group, name, email, password, phone, auth }) {
131
- const d = await post('/api/v1/ota/member/register', { providerCode: group, name, email, password, ...(phone ? { phone } : {}) }, auth, { shown: [name, email, phone], secret: [password] });
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] });
132
251
  if (d.success !== true)
133
- throw new OtaMemberError('not_registered');
134
- const memberNo = str(d.memberNo).slice(0, 40);
252
+ throw new OtaMemberError('not_registered', false, noSaid(d, said));
253
+ const memberNo = str(d.memberNo, 40);
135
254
  return { alreadyRegistered: d.alreadyRegistered === true, ...(memberNo ? { memberNo } : {}) };
136
255
  },
137
256
  async signOut({ group, session, auth }) {
@@ -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,gFAAgF;AAChF,gFAAgF;AAChF,iEAAiE;AACjE,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,+EAA+E;AAC/E,+EAA+E;AAC/E,wDAAwD;AAExD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AA0B1C,MAAM,OAAO,cAAe,SAAQ,KAAK;IAG5B;IAMA;IAKA;IAbX;IACE,yGAAyG;IAChG,IAAqB;IAC9B;;;;OAIG;IACM,WAAW,KAAK;IACzB;;;OAGG;IACM,IAAa;QAEtB,KAAK,CAAC,uCAAuC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC;QAblE,SAAI,GAAJ,IAAI,CAAiB;QAMrB,aAAQ,GAAR,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