@wow-two-beta/fe-identity 0.0.2 → 0.0.3

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/README.md CHANGED
@@ -33,7 +33,7 @@ sources. Messages resolve through the fe sdk `LocaleProvider` under `IdentityKit
33
33
 
34
34
  - `getSignInOptions({ clientId, locale })` reads `GET /api/account/sign-in-options`: the hosted pages' look, whether
35
35
  sign-up is open, and each enabled method in layout order with its fields and fe sdk rules, the messages in the
36
- request's locale; an unknown `clientId` answers the instance's own look.
36
+ request's locale. The look is the instance's, one for every client; `clientId` goes to the sign-in log.
37
37
  - a cross-origin `baseUrl` sends the session cookie (`credentials: 'include'`); the service's CORS policy must allow
38
38
  the consumer's origin.
39
39
  - `PhoneCodeSignIn` shows an "Open Telegram" step when the phone has no linked chat; the bot sends the code once the
@@ -1,10 +1,10 @@
1
1
  const AccountRouteConstants = {
2
2
  /** The account API's mount point. */
3
3
  base: "/api/account",
4
- /** `POST`: creates an account while sign-up is on. */
5
- register: "/register",
6
- /** `POST`: signs in with a login and password. */
7
- login: "/login",
4
+ /** `POST`: signs an account up while sign-up is on. */
5
+ signUp: "/sign-up",
6
+ /** `POST`: signs in with an identifier and password. */
7
+ signIn: "/sign-in",
8
8
  /** `GET`: confirms an email with the emailed `userId` and `token`. */
9
9
  confirmEmail: "/confirm-email",
10
10
  /** `POST`: sends the confirmation email again; always `204`. */
@@ -26,12 +26,12 @@ const AccountRouteConstants = {
26
26
  /** `POST`: signs in with a phone and the code sent to it. */
27
27
  phoneSignIn: "/phone-sign-in",
28
28
  /** `POST`: ends the cookie's session. */
29
- logout: "/logout",
29
+ signOut: "/sign-out",
30
30
  /** `GET`, anonymous: the sign-in declaration, the look and the enabled methods with their rules; `?clientId=`, `?locale=`. */
31
31
  signInOptions: "/sign-in-options",
32
32
  /** The query parameter that asks a sign-in route for a cookie instead of a bearer session. */
33
33
  useCookiesParameter: "useCookies",
34
- /** The query parameter that names the OIDC client a sign-in serves, for the sign-in log and the app's look. */
34
+ /** The query parameter that names the OIDC client a sign-in serves, for the sign-in log; the look is the instance's. */
35
35
  clientIdParameter: "clientId",
36
36
  /** The query parameter that picks the locale of the declaration's messages: `uz`, `ru` or `en`. */
37
37
  localeParameter: "locale"
@@ -48,4 +48,4 @@ export {
48
48
  AccountRouteConstants as A,
49
49
  PasswordChangeConfirmationType as P
50
50
  };
51
- //# sourceMappingURL=PasswordChangeConfirmationType-xUIFj0b9.js.map
51
+ //# sourceMappingURL=PasswordChangeConfirmationType-Gtvfpkl5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PasswordChangeConfirmationType-Gtvfpkl5.js","sources":["../../src/contracts/AccountRouteConstants.ts","../../src/contracts/PasswordChangeConfirmationType.ts"],"sourcesContent":["/** Mirrors the account API's routes: relative to the service or consumer origin, under the contract's HTTP mirror. */\nexport const AccountRouteConstants = {\n /** The account API's mount point. */\n base: '/api/account',\n /** `POST`: signs an account up while sign-up is on. */\n signUp: '/sign-up',\n /** `POST`: signs in with an identifier and password. */\n signIn: '/sign-in',\n /** `GET`: confirms an email with the emailed `userId` and `token`. */\n confirmEmail: '/confirm-email',\n /** `POST`: sends the confirmation email again; always `204`. */\n resendConfirmationEmail: '/resend-confirmation-email',\n /** `POST`: sends a password reset email; always `204`. */\n forgotPassword: '/forgot-password',\n /** `POST`: sets a new password with the emailed reset token. */\n resetPassword: '/reset-password',\n /** `GET`: the signed-in account. */\n manageInfo: '/manage/info',\n /** `POST`: starts a password change, signed in or with a ticket, and answers how it is confirmed. */\n managePasswordConfirmation: '/manage/password/confirmation',\n /** `POST`: changes the password of the signed-in person or of the one a ticket names. */\n managePassword: '/manage/password',\n /** `POST`: changes a password with the one-time token a change link carries; anonymous. */\n passwordChange: '/password/change',\n /** `POST`: sends a phone sign-in code. */\n phoneSignInSend: '/phone-sign-in/send',\n /** `POST`: signs in with a phone and the code sent to it. */\n phoneSignIn: '/phone-sign-in',\n /** `POST`: ends the cookie's session. */\n signOut: '/sign-out',\n /** `GET`, anonymous: the sign-in declaration, the look and the enabled methods with their rules; `?clientId=`, `?locale=`. */\n signInOptions: '/sign-in-options',\n /** The query parameter that asks a sign-in route for a cookie instead of a bearer session. */\n useCookiesParameter: 'useCookies',\n /** The query parameter that names the OIDC client a sign-in serves, for the sign-in log; the look is the instance's. */\n clientIdParameter: 'clientId',\n /** The query parameter that picks the locale of the declaration's messages: `uz`, `ru` or `en`. */\n localeParameter: 'locale',\n} as const;\n","/** Mirrors `PasswordChangeConfirmationType` of the be contract: how a password change is confirmed. */\nexport const PasswordChangeConfirmationType = {\n /** The current password is the only proof; the change form opens at once. */\n None: 'None',\n /** A one-time code, sent to a verified channel, is entered beside the new password. */\n Code: 'Code',\n /** A one-time link, sent to a verified channel, is the only way to the change form. */\n Link: 'Link',\n} as const;\nexport type PasswordChangeConfirmationType =\n (typeof PasswordChangeConfirmationType)[keyof typeof PasswordChangeConfirmationType];\n"],"names":[],"mappings":"AACO,MAAM,wBAAwB;AAAA;AAAA,EAEnC,MAAM;AAAA;AAAA,EAEN,QAAQ;AAAA;AAAA,EAER,QAAQ;AAAA;AAAA,EAER,cAAc;AAAA;AAAA,EAEd,yBAAyB;AAAA;AAAA,EAEzB,gBAAgB;AAAA;AAAA,EAEhB,eAAe;AAAA;AAAA,EAEf,YAAY;AAAA;AAAA,EAEZ,4BAA4B;AAAA;AAAA,EAE5B,gBAAgB;AAAA;AAAA,EAEhB,gBAAgB;AAAA;AAAA,EAEhB,iBAAiB;AAAA;AAAA,EAEjB,aAAa;AAAA;AAAA,EAEb,SAAS;AAAA;AAAA,EAET,eAAe;AAAA;AAAA,EAEf,qBAAqB;AAAA;AAAA,EAErB,mBAAmB;AAAA;AAAA,EAEnB,iBAAiB;AACnB;ACrCO,MAAM,iCAAiC;AAAA;AAAA,EAE5C,MAAM;AAAA;AAAA,EAEN,MAAM;AAAA;AAAA,EAEN,MAAM;AACR;"}
@@ -2,7 +2,7 @@
2
2
  export interface AccountInfoDto {
3
3
  /** The user id. */
4
4
  readonly userId: string;
5
- /** The login name. */
5
+ /** The user name. */
6
6
  readonly userName: string | null;
7
7
  /** The email address. */
8
8
  readonly email: string | null;
@@ -2,10 +2,10 @@
2
2
  export declare const AccountRouteConstants: {
3
3
  /** The account API's mount point. */
4
4
  readonly base: "/api/account";
5
- /** `POST`: creates an account while sign-up is on. */
6
- readonly register: "/register";
7
- /** `POST`: signs in with a login and password. */
8
- readonly login: "/login";
5
+ /** `POST`: signs an account up while sign-up is on. */
6
+ readonly signUp: "/sign-up";
7
+ /** `POST`: signs in with an identifier and password. */
8
+ readonly signIn: "/sign-in";
9
9
  /** `GET`: confirms an email with the emailed `userId` and `token`. */
10
10
  readonly confirmEmail: "/confirm-email";
11
11
  /** `POST`: sends the confirmation email again; always `204`. */
@@ -27,12 +27,12 @@ export declare const AccountRouteConstants: {
27
27
  /** `POST`: signs in with a phone and the code sent to it. */
28
28
  readonly phoneSignIn: "/phone-sign-in";
29
29
  /** `POST`: ends the cookie's session. */
30
- readonly logout: "/logout";
30
+ readonly signOut: "/sign-out";
31
31
  /** `GET`, anonymous: the sign-in declaration, the look and the enabled methods with their rules; `?clientId=`, `?locale=`. */
32
32
  readonly signInOptions: "/sign-in-options";
33
33
  /** The query parameter that asks a sign-in route for a cookie instead of a bearer session. */
34
34
  readonly useCookiesParameter: "useCookies";
35
- /** The query parameter that names the OIDC client a sign-in serves, for the sign-in log and the app's look. */
35
+ /** The query parameter that names the OIDC client a sign-in serves, for the sign-in log; the look is the instance's. */
36
36
  readonly clientIdParameter: "clientId";
37
37
  /** The query parameter that picks the locale of the declaration's messages: `uz`, `ru` or `en`. */
38
38
  readonly localeParameter: "locale";
@@ -1,7 +1,7 @@
1
- /** Mirrors `SignInApiRequest` of the be contract: signs in with a login and password. */
1
+ /** Mirrors `SignInApiRequest` of the be contract: signs in with an identifier and password. */
2
2
  export interface SignInApiRequest {
3
3
  /** The user name or email. */
4
- readonly login: string;
4
+ readonly identifier: string;
5
5
  /** The password. */
6
6
  readonly password: string;
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import type { SignInRuleDto } from './SignInRuleDto';
2
2
  /** Mirrors `SignInFieldDto` of the be contract: one field of a method's form, named as its request names it. */
3
3
  export interface SignInFieldDto {
4
- /** The request property the field fills, such as `login`, `password`, `phone` or `code`. */
4
+ /** The request property the field fills, such as `identifier`, `password`, `phone` or `code`. */
5
5
  readonly name: string;
6
6
  /** The input the field takes: `text`, `password`, `phone` or `pin`. */
7
7
  readonly kind: string;
@@ -1,6 +1,6 @@
1
1
  /** Mirrors `SignInMethodIdConstants` of the be contract: the method ids the declaration lists, one kit component each. */
2
2
  export declare const SignInMethodIdConstants: {
3
- /** A login and password (`PasswordSignIn`). */
3
+ /** An identifier and password (`PasswordSignIn`). */
4
4
  readonly password: "password";
5
5
  /** A code sent to a phone's linked channel, the instance's Telegram bot (`PhoneCodeSignIn`). */
6
6
  readonly phoneCode: "phone-code";
@@ -7,7 +7,7 @@ import type { SignInRequirementsDto } from './SignInRequirementsDto';
7
7
  export interface SignInOptionsDto {
8
8
  /** The name the pages show, the instance owner's brand. */
9
9
  readonly brandName: string;
10
- /** The fe sdk theme by its registry id: the app's own, else the instance's. */
10
+ /** The fe sdk theme by its registry id: the instance's, the same for every client. */
11
11
  readonly theme: string;
12
12
  /** The image behind the card, a same-origin path or an HTTPS URL; `null` for the theme's own backdrop. */
13
13
  readonly backgroundUrl: string | null;
@@ -0,0 +1,9 @@
1
+ /** Mirrors `SignUpApiRequest` of the be contract: signs an account up with an email and password. */
2
+ export interface SignUpApiRequest {
3
+ /** The account email. */
4
+ readonly email: string;
5
+ /** The initial password. */
6
+ readonly password: string;
7
+ /** The user name; the email when omitted. */
8
+ readonly userName?: string;
9
+ }
@@ -1,5 +1,5 @@
1
- /** Mirrors `RegisteredAccountDto` of the be contract: the account a registration created. */
2
- export interface RegisteredAccountDto {
1
+ /** Mirrors `SignedUpAccountDto` of the be contract: the account a sign-up created. */
2
+ export interface SignedUpAccountDto {
3
3
  /** The new user id. */
4
4
  readonly userId: string;
5
5
  /** Whether a confirmation email was sent. */
@@ -12,8 +12,6 @@ export type { PasswordChangeRequiredDto } from './PasswordChangeRequiredDto';
12
12
  export type { PhoneSignInApiRequest } from './PhoneSignInApiRequest';
13
13
  export type { PhoneSignInSendApiRequest } from './PhoneSignInSendApiRequest';
14
14
  export type { PhoneSignInSentDto } from './PhoneSignInSentDto';
15
- export type { RegisterAccountApiRequest } from './RegisterAccountApiRequest';
16
- export type { RegisteredAccountDto } from './RegisteredAccountDto';
17
15
  export type { ResetPasswordApiRequest } from './ResetPasswordApiRequest';
18
16
  export type { SignInApiRequest } from './SignInApiRequest';
19
17
  export type { SignInFieldDto } from './SignInFieldDto';
@@ -22,3 +20,5 @@ export { SignInMethodIdConstants } from './SignInMethodIdConstants';
22
20
  export type { SignInOptionsDto } from './SignInOptionsDto';
23
21
  export type { SignInRequirementsDto } from './SignInRequirementsDto';
24
22
  export type { SignInRuleDto } from './SignInRuleDto';
23
+ export type { SignUpApiRequest } from './SignUpApiRequest';
24
+ export type { SignedUpAccountDto } from './SignedUpAccountDto';
@@ -1,4 +1,4 @@
1
- import { A, P } from "../chunks/PasswordChangeConfirmationType-xUIFj0b9.js";
1
+ import { A, P } from "../chunks/PasswordChangeConfirmationType-Gtvfpkl5.js";
2
2
  const HostedPageRouteConstants = {
3
3
  /** Signs a person in by every enabled method, then continues to `returnUrl`. */
4
4
  signIn: "/sign-in",
@@ -26,7 +26,7 @@ const HostedPageRouteConstants = {
26
26
  tokenParameter: "token"
27
27
  };
28
28
  const SignInMethodIdConstants = {
29
- /** A login and password (`PasswordSignIn`). */
29
+ /** An identifier and password (`PasswordSignIn`). */
30
30
  password: "password",
31
31
  /** A code sent to a phone's linked channel, the instance's Telegram bot (`PhoneCodeSignIn`). */
32
32
  phoneCode: "phone-code"
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/contracts/HostedPageRouteConstants.ts","../../src/contracts/SignInMethodIdConstants.ts"],"sourcesContent":["/** Holds the hosted pages the service serves and the parameters each one reads. */\nexport const HostedPageRouteConstants = {\n /** Signs a person in by every enabled method, then continues to `returnUrl`. */\n signIn: '/sign-in',\n /** Creates an account while sign-up is on. */\n signUp: '/sign-up',\n /** Confirms an email from the emailed link (`userId`, `token`). */\n confirmEmail: '/confirm-email',\n /** Sends a password reset email. */\n forgotPassword: '/forgot-password',\n /** Sets a new password from the emailed reset link (`email`, `token`). */\n resetPassword: '/reset-password',\n /** Spends a password change link; the token travels in the URL fragment (`#token=`). */\n changePassword: '/change-password',\n /** The signed-in person's security settings: the password change. */\n accountSecurity: '/account/security',\n /** The query parameter that carries the local path a page continues to. */\n returnUrlParameter: 'returnUrl',\n /** The query parameter of an OIDC authorization request that names its client. */\n clientIdParameter: 'client_id',\n /** The query parameter that carries an account id. */\n userIdParameter: 'userId',\n /** The query parameter that carries an email address. */\n emailParameter: 'email',\n /** The query or fragment parameter that carries a one-time token. */\n tokenParameter: 'token',\n} as const;\n","/** Mirrors `SignInMethodIdConstants` of the be contract: the method ids the declaration lists, one kit component each. */\nexport const SignInMethodIdConstants = {\n /** A login and password (`PasswordSignIn`). */\n password: 'password',\n /** A code sent to a phone's linked channel, the instance's Telegram bot (`PhoneCodeSignIn`). */\n phoneCode: 'phone-code',\n} as const;\n"],"names":[],"mappings":";AACO,MAAM,2BAA2B;AAAA;AAAA,EAEtC,QAAQ;AAAA;AAAA,EAER,QAAQ;AAAA;AAAA,EAER,cAAc;AAAA;AAAA,EAEd,gBAAgB;AAAA;AAAA,EAEhB,eAAe;AAAA;AAAA,EAEf,gBAAgB;AAAA;AAAA,EAEhB,iBAAiB;AAAA;AAAA,EAEjB,oBAAoB;AAAA;AAAA,EAEpB,mBAAmB;AAAA;AAAA,EAEnB,iBAAiB;AAAA;AAAA,EAEjB,gBAAgB;AAAA;AAAA,EAEhB,gBAAgB;AAClB;ACzBO,MAAM,0BAA0B;AAAA;AAAA,EAErC,UAAU;AAAA;AAAA,EAEV,WAAW;AACb;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/contracts/HostedPageRouteConstants.ts","../../src/contracts/SignInMethodIdConstants.ts"],"sourcesContent":["/** Holds the hosted pages the service serves and the parameters each one reads. */\nexport const HostedPageRouteConstants = {\n /** Signs a person in by every enabled method, then continues to `returnUrl`. */\n signIn: '/sign-in',\n /** Creates an account while sign-up is on. */\n signUp: '/sign-up',\n /** Confirms an email from the emailed link (`userId`, `token`). */\n confirmEmail: '/confirm-email',\n /** Sends a password reset email. */\n forgotPassword: '/forgot-password',\n /** Sets a new password from the emailed reset link (`email`, `token`). */\n resetPassword: '/reset-password',\n /** Spends a password change link; the token travels in the URL fragment (`#token=`). */\n changePassword: '/change-password',\n /** The signed-in person's security settings: the password change. */\n accountSecurity: '/account/security',\n /** The query parameter that carries the local path a page continues to. */\n returnUrlParameter: 'returnUrl',\n /** The query parameter of an OIDC authorization request that names its client. */\n clientIdParameter: 'client_id',\n /** The query parameter that carries an account id. */\n userIdParameter: 'userId',\n /** The query parameter that carries an email address. */\n emailParameter: 'email',\n /** The query or fragment parameter that carries a one-time token. */\n tokenParameter: 'token',\n} as const;\n","/** Mirrors `SignInMethodIdConstants` of the be contract: the method ids the declaration lists, one kit component each. */\nexport const SignInMethodIdConstants = {\n /** An identifier and password (`PasswordSignIn`). */\n password: 'password',\n /** A code sent to a phone's linked channel, the instance's Telegram bot (`PhoneCodeSignIn`). */\n phoneCode: 'phone-code',\n} as const;\n"],"names":[],"mappings":";AACO,MAAM,2BAA2B;AAAA;AAAA,EAEtC,QAAQ;AAAA;AAAA,EAER,QAAQ;AAAA;AAAA,EAER,cAAc;AAAA;AAAA,EAEd,gBAAgB;AAAA;AAAA,EAEhB,eAAe;AAAA;AAAA,EAEf,gBAAgB;AAAA;AAAA,EAEhB,iBAAiB;AAAA;AAAA,EAEjB,oBAAoB;AAAA;AAAA,EAEpB,mBAAmB;AAAA;AAAA,EAEnB,iBAAiB;AAAA;AAAA,EAEjB,gBAAgB;AAAA;AAAA,EAEhB,gBAAgB;AAClB;ACzBO,MAAM,0BAA0B;AAAA;AAAA,EAErC,UAAU;AAAA;AAAA,EAEV,WAAW;AACb;"}
@@ -1,6 +1,6 @@
1
1
  import { type ApiFailure } from '@wow-two-beta/fe/foundation/http';
2
2
  import { type Result } from '@wow-two-beta/fe/foundation/results';
3
- import { type AccountInfoDto, type ConfirmEmailApiRequest, type EmailAddressApiRequest, type PasswordChangeApiRequest, type PasswordChangeConfirmationApiRequest, type PasswordChangeConfirmationDto, type PasswordChangeLinkApiRequest, type PasswordChangeRequiredDto, type PhoneSignInApiRequest, type PhoneSignInSendApiRequest, type PhoneSignInSentDto, type RegisterAccountApiRequest, type RegisteredAccountDto, type ResetPasswordApiRequest, type SignInApiRequest, type SignInOptionsDto } from '../../contracts';
3
+ import { type AccountInfoDto, type ConfirmEmailApiRequest, type EmailAddressApiRequest, type PasswordChangeApiRequest, type PasswordChangeConfirmationApiRequest, type PasswordChangeConfirmationDto, type PasswordChangeLinkApiRequest, type PasswordChangeRequiredDto, type PhoneSignInApiRequest, type PhoneSignInSendApiRequest, type PhoneSignInSentDto, type ResetPasswordApiRequest, type SignInApiRequest, type SignInOptionsDto, type SignUpApiRequest, type SignedUpAccountDto } from '../../contracts';
4
4
  /** Configures where the account API is reached. */
5
5
  export interface AccountClientOptions {
6
6
  /** The origin serving the API: empty for the consumer's own backend (Form 1), the service's URL otherwise. */
@@ -22,7 +22,7 @@ export interface AccountSignInOptions {
22
22
  }
23
23
  /** Describes a sign-in declaration request. */
24
24
  export interface SignInOptionsQuery {
25
- /** The OIDC client the sign-in serves: its own theme and background replace the instance's. */
25
+ /** The OIDC client the sign-in serves, recorded by the sign-in log; the look stays the instance's. */
26
26
  readonly clientId?: string | null;
27
27
  /** The locale of the rule messages (`uz`, `ru`, `en`); the browser's `Accept-Language` when omitted. */
28
28
  readonly locale?: string | null;
@@ -33,14 +33,14 @@ export interface SignInOptionsQuery {
33
33
  export interface AccountClient {
34
34
  /**
35
35
  * Reads the sign-in declaration: the hosted pages' look, whether sign-up is open, and each enabled method in layout
36
- * order with its fields and rules. An unknown `clientId` answers the instance's own look.
36
+ * order with its fields and rules. The look is the instance's, whatever `clientId` names.
37
37
  */
38
38
  getSignInOptions(query?: SignInOptionsQuery): Promise<Result<SignInOptionsDto, ApiFailure>>;
39
- /** Creates an account while sign-up is on; `403` while it is closed. */
40
- register(request: RegisterAccountApiRequest, signal?: AbortSignal): Promise<Result<RegisteredAccountDto, ApiFailure>>;
39
+ /** Signs an account up while sign-up is on; `403` while it is closed. */
40
+ signUp(request: SignUpApiRequest, signal?: AbortSignal): Promise<Result<SignedUpAccountDto, ApiFailure>>;
41
41
  /**
42
- * Signs in with a login and password: `null` once the session cookie is set, or the ticket of a required password
43
- * change, which sets no session.
42
+ * Signs in with an identifier and password: `null` once the session cookie is set, or the ticket of a required
43
+ * password change, which sets no session.
44
44
  */
45
45
  signIn(request: SignInApiRequest, options?: AccountSignInOptions): Promise<Result<PasswordChangeRequiredDto | null, ApiFailure>>;
46
46
  /** Confirms an email with the emailed token. */
package/dist/kit/index.js CHANGED
@@ -2,7 +2,7 @@ import { defineComponent, computed, openBlock, createBlock, unref, withCtx, crea
2
2
  import { Button } from "@wow-two-beta/fe/presentation/actions";
3
3
  import { AlertSimple } from "@wow-two-beta/fe/presentation/feedback";
4
4
  import { Field, PasswordInput, TextInput, EmailInput, PhoneInput } from "@wow-two-beta/fe/presentation/forms";
5
- import { A as AccountRouteConstants, P as PasswordChangeConfirmationType } from "../chunks/PasswordChangeConfirmationType-xUIFj0b9.js";
5
+ import { A as AccountRouteConstants, P as PasswordChangeConfirmationType } from "../chunks/PasswordChangeConfirmationType-Gtvfpkl5.js";
6
6
  import { createApiClient, ApiFailureFactory, ApiFailureExtensions } from "@wow-two-beta/fe/foundation/http";
7
7
  import { ResultExtensions, AppErrorType, AppErrorFactory } from "@wow-two-beta/fe/foundation/results";
8
8
  import { useLocale } from "@wow-two-beta/fe/foundation/i18n";
@@ -11,7 +11,7 @@ const protocolFailure = () => ResultExtensions.fail(ApiFailureFactory.create("pr
11
11
  function record(value) {
12
12
  return value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
13
13
  }
14
- function decodeRegistered(value) {
14
+ function decodeSignedUp(value) {
15
15
  const body = record(value);
16
16
  if (body && typeof body.userId === "string") {
17
17
  return ResultExtensions.ok({ userId: body.userId, isConfirmationSent: body.isConfirmationSent === true });
@@ -142,9 +142,9 @@ function createAccountClient(options = {}) {
142
142
  signal,
143
143
  decode: decodeSignInOptions
144
144
  }),
145
- register: (request, signal) => client.post(AccountRouteConstants.register, { body: request, signal, decode: decodeRegistered }),
145
+ signUp: (request, signal) => client.post(AccountRouteConstants.signUp, { body: request, signal, decode: decodeSignedUp }),
146
146
  async signIn(request, { clientId, signal } = {}) {
147
- const answered = await client.post(AccountRouteConstants.login, {
147
+ const answered = await client.post(AccountRouteConstants.signIn, {
148
148
  query: signInQuery(clientId),
149
149
  body: request,
150
150
  response: "text",
@@ -171,7 +171,7 @@ function createAccountClient(options = {}) {
171
171
  response: "empty",
172
172
  signal
173
173
  }),
174
- signOut: (signal) => client.post(AccountRouteConstants.logout, { response: "empty", signal })
174
+ signOut: (signal) => client.post(AccountRouteConstants.signOut, { response: "empty", signal })
175
175
  };
176
176
  }
177
177
  function useAccountClient(source) {
@@ -556,7 +556,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
556
556
  baseUrl: { default: void 0 },
557
557
  clientId: { default: null },
558
558
  forgotPasswordHref: { default: void 0 },
559
- initialLogin: { default: "" }
559
+ initialIdentifier: { default: "" }
560
560
  },
561
561
  emits: ["signedIn", "passwordChangeRequired"],
562
562
  setup(__props, { emit: __emit }) {
@@ -568,7 +568,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
568
568
  const isResent = shallowRef(false);
569
569
  const isResending = shallowRef(false);
570
570
  const form = useAppForm({
571
- defaultValues: { login: props.initialLogin, password: "" },
571
+ defaultValues: { identifier: props.initialIdentifier, password: "" },
572
572
  onSubmit: async (values, { signal }) => {
573
573
  unconfirmedEmail.value = null;
574
574
  isResent.value = false;
@@ -576,7 +576,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
576
576
  if (result.ok) {
577
577
  if (result.value) emit("passwordChangeRequired", result.value);
578
578
  else emit("signedIn");
579
- } else if (result.failure.status === 403 && values.login.includes("@")) unconfirmedEmail.value = values.login;
579
+ } else if (result.failure.status === 403 && values.identifier.includes("@")) {
580
+ unconfirmedEmail.value = values.identifier;
581
+ }
580
582
  return result;
581
583
  }
582
584
  });
@@ -595,18 +597,18 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
595
597
  (...args) => unref(form).handleSubmit && unref(form).handleSubmit(...args))
596
598
  }, [
597
599
  createVNode(unref(form).Field, {
598
- name: "login",
600
+ name: "identifier",
599
601
  "is-required": ""
600
602
  }, {
601
603
  default: withCtx((field) => [
602
604
  createVNode(unref(Field), {
603
- label: unref(t)("PasswordSignIn.login", "Email or user name")
605
+ label: unref(t)("PasswordSignIn.identifier", "Email or user name")
604
606
  }, {
605
607
  default: withCtx(() => [
606
608
  createVNode(unref(TextInput), {
607
609
  modelValue: field.value,
608
610
  "onUpdate:modelValue": ($event) => field.value = $event,
609
- name: "login",
611
+ name: "identifier",
610
612
  autocomplete: "username",
611
613
  onBlur: field.onBlur
612
614
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onBlur"])
@@ -1078,25 +1080,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1078
1080
  const emit = __emit;
1079
1081
  const client = useAccountClient(props);
1080
1082
  const t = useAccountText();
1081
- const registered = shallowRef(null);
1083
+ const created = shallowRef(null);
1082
1084
  const form = useAppForm({
1083
1085
  defaultValues: { email: "", password: "" },
1084
1086
  onSubmit: async (values, { signal }) => {
1085
- const result = await client.register(values, signal);
1087
+ const result = await client.signUp(values, signal);
1086
1088
  if (result.ok) {
1087
- registered.value = { account: result.value, email: values.email };
1089
+ created.value = { account: result.value, email: values.email };
1088
1090
  emit("signedUp", result.value);
1089
1091
  }
1090
1092
  return result;
1091
1093
  }
1092
1094
  });
1093
1095
  return (_ctx, _cache) => {
1094
- return registered.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
1096
+ return created.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
1095
1097
  createVNode(unref(AlertSimple), { severity: "success" }, {
1096
1098
  default: withCtx(() => [
1097
- registered.value.account.isConfirmationSent ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1099
+ created.value.account.isConfirmationSent ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1098
1100
  createTextVNode(toDisplayString(unref(t)("SignUpForm.confirmationSent", "Check your inbox: we sent a link to {email} to confirm the address.", {
1099
- email: registered.value.email
1101
+ email: created.value.email
1100
1102
  })), 1)
1101
1103
  ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1102
1104
  createTextVNode(toDisplayString(unref(t)("SignUpForm.created", "Your account is ready.")), 1)
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/kit/account/CreateAccountClient.ts","../../src/kit/account/hooks/UseAccountClient.ts","../../src/kit/account/hooks/UseAccountText.ts","../../src/kit/presentation/feedback/failureAlert/FailureAlert.vue","../../src/kit/presentation/forms/changePasswordForm/ChangePasswordStage.ts","../../src/kit/presentation/forms/changePasswordForm/ChangePasswordForm.vue","../../src/kit/presentation/forms/forgotPasswordForm/ForgotPasswordForm.vue","../../src/kit/presentation/forms/passwordSignIn/PasswordSignIn.vue","../../src/kit/presentation/forms/phoneCodeSignIn/PhoneSignInStep.ts","../../src/kit/presentation/forms/phoneCodeSignIn/PhoneCodeSignIn.vue","../../src/kit/presentation/forms/resetPasswordForm/ResetPasswordForm.vue","../../src/kit/presentation/forms/signUpForm/SignUpForm.vue"],"sourcesContent":["import { ApiFailureFactory, createApiClient, type ApiFailure } from '@wow-two-beta/fe/foundation/http';\nimport { ResultExtensions, type Result } from '@wow-two-beta/fe/foundation/results';\nimport {\n AccountRouteConstants,\n PasswordChangeConfirmationType,\n type AccountInfoDto,\n type ConfirmEmailApiRequest,\n type EmailAddressApiRequest,\n type PasswordChangeApiRequest,\n type PasswordChangeConfirmationApiRequest,\n type PasswordChangeConfirmationDto,\n type PasswordChangeLinkApiRequest,\n type PasswordChangeRequiredDto,\n type PhoneSignInApiRequest,\n type PhoneSignInSendApiRequest,\n type PhoneSignInSentDto,\n type RegisterAccountApiRequest,\n type RegisteredAccountDto,\n type ResetPasswordApiRequest,\n type SignInApiRequest,\n type SignInFieldDto,\n type SignInMethodDto,\n type SignInOptionsDto,\n type SignInRuleDto,\n} from '../../contracts';\n\n/** Configures where the account API is reached. */\nexport interface AccountClientOptions {\n /** The origin serving the API: empty for the consumer's own backend (Form 1), the service's URL otherwise. */\n readonly baseUrl?: string;\n /**\n * Whether the browser sends the session cookie. Default `same-origin`, or `include` when `baseUrl` is set, which\n * the service's CORS policy must allow.\n */\n readonly credentials?: RequestCredentials;\n /** Replaces the global fetch, for tests. */\n readonly fetch?: typeof globalThis.fetch;\n}\n\n/** Describes a sign-in call beyond its body. */\nexport interface AccountSignInOptions {\n /** The OIDC client the sign-in serves, recorded by the sign-in log. */\n readonly clientId?: string | null;\n /** Cancels the request. */\n readonly signal?: AbortSignal;\n}\n\n/** Describes a sign-in declaration request. */\nexport interface SignInOptionsQuery {\n /** The OIDC client the sign-in serves: its own theme and background replace the instance's. */\n readonly clientId?: string | null;\n /** The locale of the rule messages (`uz`, `ru`, `en`); the browser's `Accept-Language` when omitted. */\n readonly locale?: string | null;\n /** Cancels the request. */\n readonly signal?: AbortSignal;\n}\n\n/** Calls the account API over HTTP, signing in with cookie sessions. */\nexport interface AccountClient {\n /**\n * Reads the sign-in declaration: the hosted pages' look, whether sign-up is open, and each enabled method in layout\n * order with its fields and rules. An unknown `clientId` answers the instance's own look.\n */\n getSignInOptions(query?: SignInOptionsQuery): Promise<Result<SignInOptionsDto, ApiFailure>>;\n /** Creates an account while sign-up is on; `403` while it is closed. */\n register(request: RegisterAccountApiRequest, signal?: AbortSignal): Promise<Result<RegisteredAccountDto, ApiFailure>>;\n /**\n * Signs in with a login and password: `null` once the session cookie is set, or the ticket of a required password\n * change, which sets no session.\n */\n signIn(\n request: SignInApiRequest,\n options?: AccountSignInOptions,\n ): Promise<Result<PasswordChangeRequiredDto | null, ApiFailure>>;\n /** Confirms an email with the emailed token. */\n confirmEmail(request: ConfirmEmailApiRequest, signal?: AbortSignal): Promise<Result<void, ApiFailure>>;\n /** Sends the confirmation email again; succeeds whether or not the account exists. */\n resendConfirmationEmail(request: EmailAddressApiRequest, signal?: AbortSignal): Promise<Result<void, ApiFailure>>;\n /** Sends a password reset email; succeeds whether or not the account exists. */\n forgotPassword(request: EmailAddressApiRequest, signal?: AbortSignal): Promise<Result<void, ApiFailure>>;\n /** Sets a new password with the emailed reset token. */\n resetPassword(request: ResetPasswordApiRequest, signal?: AbortSignal): Promise<Result<void, ApiFailure>>;\n /** Reads the signed-in account; `401` when nobody is signed in. */\n getAccountInfo(signal?: AbortSignal): Promise<Result<AccountInfoDto, ApiFailure>>;\n /**\n * Starts a password change, signed in or with a required change's ticket: answers how it is confirmed, and sends the\n * code or link the setting asks for.\n */\n startPasswordChange(\n request?: PasswordChangeConfirmationApiRequest,\n signal?: AbortSignal,\n ): Promise<Result<PasswordChangeConfirmationDto, ApiFailure>>;\n /** Changes the password of the signed-in person, or of the one a required change's ticket names. */\n changePassword(request: PasswordChangeApiRequest, signal?: AbortSignal): Promise<Result<void, ApiFailure>>;\n /** Changes a password with the one-time token a change link carries. */\n changePasswordWithLink(\n request: PasswordChangeLinkApiRequest,\n signal?: AbortSignal,\n ): Promise<Result<void, ApiFailure>>;\n /** Sends a phone sign-in code, or answers the Telegram link that sends one once the contact is shared. */\n sendPhoneSignInCode(\n request: PhoneSignInSendApiRequest,\n signal?: AbortSignal,\n ): Promise<Result<PhoneSignInSentDto, ApiFailure>>;\n /** Signs in with a phone and its code and sets the session cookie. */\n signInWithPhone(request: PhoneSignInApiRequest, options?: AccountSignInOptions): Promise<Result<void, ApiFailure>>;\n /** Ends the cookie's session. */\n signOut(signal?: AbortSignal): Promise<Result<void, ApiFailure>>;\n}\n\ntype Decoded<T> = Result<T, ApiFailure>;\n\nconst protocolFailure = () => ResultExtensions.fail(ApiFailureFactory.create('protocol'));\n\nfunction record(value: unknown): Readonly<Record<string, unknown>> | null {\n return value !== null && typeof value === 'object' && !Array.isArray(value)\n ? (value as Record<string, unknown>)\n : null;\n}\n\nfunction decodeRegistered(value: unknown): Decoded<RegisteredAccountDto> {\n const body = record(value);\n if (body && typeof body.userId === 'string') {\n return ResultExtensions.ok({ userId: body.userId, isConfirmationSent: body.isConfirmationSent === true });\n }\n return protocolFailure();\n}\n\nfunction decodeAccountInfo(value: unknown): Decoded<AccountInfoDto> {\n const body = record(value);\n if (body && typeof body.userId === 'string') {\n return ResultExtensions.ok({\n userId: body.userId,\n userName: typeof body.userName === 'string' ? body.userName : null,\n email: typeof body.email === 'string' ? body.email : null,\n isEmailConfirmed: body.isEmailConfirmed === true,\n isTwoFactorEnabled: body.isTwoFactorEnabled === true,\n });\n }\n return protocolFailure();\n}\n\nconst confirmationTypes = Object.values(PasswordChangeConfirmationType);\n\n/** Reads a confirmation type whatever its case; `undefined` for anything else. */\nfunction confirmationOf(value: unknown): PasswordChangeConfirmationType | undefined {\n return typeof value === 'string'\n ? confirmationTypes.find((type) => type.toLowerCase() === value.toLowerCase())\n : undefined;\n}\n\nfunction decodeConfirmation(value: unknown): Decoded<PasswordChangeConfirmationDto> {\n const body = record(value);\n const confirmation = confirmationOf(body?.confirmation);\n if (body && confirmation) return ResultExtensions.ok({ confirmation, isSent: body.isSent === true });\n return protocolFailure();\n}\n\nfunction decodeCodeSent(value: unknown): Decoded<PhoneSignInSentDto> {\n const body = record(value);\n if (!body) return protocolFailure();\n const link =\n typeof body.telegramLinkUrl === 'string' && body.telegramLinkUrl.length > 0 ? body.telegramLinkUrl : null;\n return ResultExtensions.ok({ isCodeSent: body.isCodeSent === true, telegramLinkUrl: link });\n}\n\nfunction text(value: unknown): string | null {\n return typeof value === 'string' ? value : null;\n}\n\nfunction strings(value: unknown): ReadonlyArray<string> | null {\n return Array.isArray(value) && value.every((item): item is string => typeof item === 'string') ? value : null;\n}\n\n/** Decodes each item of a list, or `null` when it is no list or any item fails. */\nfunction list<T>(value: unknown, decode: (item: unknown) => T | null): ReadonlyArray<T> | null {\n if (!Array.isArray(value)) return null;\n const items = value.map(decode);\n return items.every((item): item is T => item !== null) ? items : null;\n}\n\nfunction decodeRule(value: unknown): SignInRuleDto | null {\n const body = record(value);\n const code = text(body?.code);\n const message = text(body?.message);\n return body && code && message !== null ? { code, params: record(body.params), message } : null;\n}\n\nfunction decodeField(value: unknown): SignInFieldDto | null {\n const body = record(value);\n const name = text(body?.name);\n const kind = text(body?.kind);\n const rules = list(body?.rules, decodeRule);\n return body && name && kind && rules ? { name, kind, countries: strings(body.countries), rules } : null;\n}\n\nfunction decodeMethod(value: unknown): SignInMethodDto | null {\n const body = record(value);\n const id = text(body?.id);\n const fields = list(body?.fields, decodeField);\n if (!body || !id || !fields) return null;\n const passwordRules = body.passwordRules == null ? null : list(body.passwordRules, decodeRule);\n if (body.passwordRules != null && passwordRules === null) return null;\n return { id, channels: strings(body.channels) ?? [], fields, passwordRules };\n}\n\nfunction decodeSignInOptions(value: unknown): Decoded<SignInOptionsDto> {\n const body = record(value);\n const brandName = text(body?.brandName);\n const theme = text(body?.theme);\n const methods = list(body?.methods, decodeMethod);\n if (!body || !brandName || !theme || !methods) return protocolFailure();\n const requirements = record(body.requirements);\n return ResultExtensions.ok({\n brandName,\n theme,\n backgroundUrl: text(body.backgroundUrl) || null,\n isSignUpEnabled: body.isSignUpEnabled === true,\n locale: text(body.locale) ?? 'en',\n locales: strings(body.locales) ?? [],\n methods,\n requirements: {\n isConfirmedEmailRequired: requirements?.isConfirmedEmailRequired === true,\n isConfirmedPhoneNumberRequired: requirements?.isConfirmedPhoneNumberRequired === true,\n isSecondFactorRequired: requirements?.isSecondFactorRequired === true,\n },\n });\n}\n\n/**\n * Reads a cookie sign-in's answer: `204` set the session; a body flagged `isPasswordChangeRequired`, enveloped or\n * bare, holds the change's ticket instead.\n */\nfunction decodeSignedIn(text: string): Decoded<PasswordChangeRequiredDto | null> {\n if (text.trim() === '') return ResultExtensions.ok(null);\n let parsed: unknown;\n try {\n parsed = JSON.parse(text);\n } catch {\n return protocolFailure();\n }\n const outer = record(parsed);\n const body = record(outer?.data) ?? outer;\n if (body?.isPasswordChangeRequired !== true) return body ? ResultExtensions.ok(null) : protocolFailure();\n if (typeof body.ticket !== 'string' || body.ticket === '') return protocolFailure();\n return ResultExtensions.ok({\n isPasswordChangeRequired: true,\n confirmation: confirmationOf(body.confirmation) ?? PasswordChangeConfirmationType.None,\n ticket: body.ticket,\n });\n}\n\n/** Creates a client for the account API at `baseUrl` (same origin by default). */\nexport function createAccountClient(options: AccountClientOptions = {}): AccountClient {\n const baseUrl = options.baseUrl?.replace(/\\/+$/, '') ?? '';\n const credentials = options.credentials ?? (baseUrl ? 'include' : undefined);\n const client = createApiClient({\n baseUrl: `${baseUrl}${AccountRouteConstants.base}`,\n ...(credentials !== undefined ? { credentials } : {}),\n ...(options.fetch !== undefined ? { fetch: options.fetch } : {}),\n });\n const signInQuery = (clientId?: string | null) => ({\n [AccountRouteConstants.useCookiesParameter]: true,\n ...(clientId ? { [AccountRouteConstants.clientIdParameter]: clientId } : {}),\n });\n const send = (path: string, body: unknown, signal?: AbortSignal) =>\n client.post(path, { body, response: 'empty', signal });\n\n return {\n getSignInOptions: ({ clientId, locale, signal } = {}) =>\n client.get(AccountRouteConstants.signInOptions, {\n query: {\n ...(clientId ? { [AccountRouteConstants.clientIdParameter]: clientId } : {}),\n ...(locale ? { [AccountRouteConstants.localeParameter]: locale } : {}),\n },\n signal,\n decode: decodeSignInOptions,\n }),\n register: (request, signal) =>\n client.post(AccountRouteConstants.register, { body: request, signal, decode: decodeRegistered }),\n async signIn(request, { clientId, signal } = {}) {\n const answered = await client.post(AccountRouteConstants.login, {\n query: signInQuery(clientId),\n body: request,\n response: 'text',\n signal,\n });\n return answered.ok ? decodeSignedIn(answered.value) : answered;\n },\n confirmEmail: (request, signal) =>\n client.get(AccountRouteConstants.confirmEmail, { query: { ...request }, response: 'empty', signal }),\n resendConfirmationEmail: (request, signal) => send(AccountRouteConstants.resendConfirmationEmail, request, signal),\n forgotPassword: (request, signal) => send(AccountRouteConstants.forgotPassword, request, signal),\n resetPassword: (request, signal) => send(AccountRouteConstants.resetPassword, request, signal),\n getAccountInfo: (signal) => client.get(AccountRouteConstants.manageInfo, { signal, decode: decodeAccountInfo }),\n startPasswordChange: (request, signal) =>\n client.post(AccountRouteConstants.managePasswordConfirmation, {\n body: request ?? {},\n signal,\n decode: decodeConfirmation,\n }),\n changePassword: (request, signal) => send(AccountRouteConstants.managePassword, request, signal),\n changePasswordWithLink: (request, signal) => send(AccountRouteConstants.passwordChange, request, signal),\n sendPhoneSignInCode: (request, signal) =>\n client.post(AccountRouteConstants.phoneSignInSend, { body: request, signal, decode: decodeCodeSent }),\n signInWithPhone: (request, { clientId, signal } = {}) =>\n client.post(AccountRouteConstants.phoneSignIn, {\n query: signInQuery(clientId),\n body: request,\n response: 'empty',\n signal,\n }),\n signOut: (signal) => client.post(AccountRouteConstants.logout, { response: 'empty', signal }),\n };\n}\n","import { createAccountClient, type AccountClient } from '../CreateAccountClient';\n\n/** Names where a kit component reaches the account API. */\nexport interface AccountClientSource {\n /** The client to call; built from `baseUrl` when omitted. */\n readonly client?: AccountClient;\n /** The service's origin; the consumer's own origin (Form 1) when omitted. */\n readonly baseUrl?: string;\n}\n\n/** Returns the component's account client, read once at setup: the given one, or one for `baseUrl`. */\nexport function useAccountClient(source: AccountClientSource): AccountClient {\n return source.client ?? createAccountClient(source.baseUrl ? { baseUrl: source.baseUrl } : {});\n}\n","import { useLocale } from '@wow-two-beta/fe/foundation/i18n';\n\n/** Resolves one kit message: its key under `IdentityKit.`, the English fallback, and the values it interpolates. */\nexport type AccountText = (key: string, fallback: string, values?: Readonly<Record<string, string | number>>) => string;\n\n/**\n * Returns the kit's message resolver: the consumer's `LocaleProvider` messages for `IdentityKit.{key}`, else the\n * English fallback. Call it in `setup()`.\n */\nexport function useAccountText(): AccountText {\n const locale = useLocale();\n return (key, fallback, values) => locale.t(`IdentityKit.${key}`, values, fallback);\n}\n","<script setup lang=\"ts\">\nimport { ApiFailureExtensions } from '@wow-two-beta/fe/foundation/http';\nimport { AppErrorType, type AppError } from '@wow-two-beta/fe/foundation/results';\nimport { AlertSimple } from '@wow-two-beta/fe/presentation/feedback';\nimport { computed } from 'vue';\n\n/** Says why a request failed: the problem's own text, else the failure's display-safe message. */\ndefineOptions({ name: 'FailureAlert' });\n\nconst props = defineProps<{\n /** The failure to explain; nothing renders without one. */\n failure: AppError | null;\n}>();\n\nconst reason = computed(() =>\n props.failure && props.failure.type !== AppErrorType.Cancelled ? ApiFailureExtensions.reason(props.failure) : '',\n);\n</script>\n\n<template>\n <AlertSimple v-if=\"reason\" severity=\"danger\">{{ reason }}</AlertSimple>\n</template>\n","/** Defines where a password change stands. */\nexport const ChangePasswordStage = {\n /** Refers to the change not started: the instance has not said how it is confirmed. */\n Idle: 'idle',\n /** Refers to the change form, with the code field under the `Code` confirmation. */\n Form: 'form',\n /** Refers to the `Link` confirmation: only the emailed link opens the form. */\n LinkSent: 'link-sent',\n /** Refers to the password changed. */\n Done: 'done',\n} as const;\nexport type ChangePasswordStage = (typeof ChangePasswordStage)[keyof typeof ChangePasswordStage];\n","<script setup lang=\"ts\">\nimport type { AppError } from '@wow-two-beta/fe/foundation/results';\nimport { Button } from '@wow-two-beta/fe/presentation/actions';\nimport { AlertSimple } from '@wow-two-beta/fe/presentation/feedback';\nimport { Field, PasswordInput, TextInput } from '@wow-two-beta/fe/presentation/forms';\nimport { computed, onMounted, shallowRef } from 'vue';\nimport { PasswordChangeConfirmationType, type PasswordChangeConfirmationDto } from '../../../../contracts';\nimport type { AccountClient } from '../../../account';\nimport { useAccountClient, useAccountForm, useAccountText } from '../../../account/hooks';\nimport { FailureAlert } from '../../feedback/failureAlert';\nimport { ChangePasswordStage } from './ChangePasswordStage';\n\n/**\n * Changes a password under the instance's confirmation setting. Signed in, it starts the change and asks for the\n * current password, plus the sent code under `Code`, or says a link went out under `Link`. With the ticket of a\n * sign-in that requires the change, it starts at once and skips the current password. With the token a change link\n * carried, it asks only for the new password.\n */\ndefineOptions({ name: 'ChangePasswordForm' });\n\nconst props = withDefaults(\n defineProps<{\n /** The account API to call; built from `baseUrl` when omitted. */\n client?: AccountClient;\n /** The service's origin; the consumer's own origin when omitted. */\n baseUrl?: string;\n /** The one-time token a change link carried. */\n token?: string | null;\n /** The ticket a sign-in answered with when the password breaks the current rules. */\n ticket?: string | null;\n /** How the ticket's change is confirmed, as the sign-in answered; asked of the instance when omitted. */\n confirmation?: PasswordChangeConfirmationType | null;\n }>(),\n { client: undefined, baseUrl: undefined, token: null, ticket: null, confirmation: null },\n);\n\nconst emit = defineEmits<{\n /** Fires once the password is changed. */\n changed: [];\n}>();\n\nconst client = useAccountClient(props);\nconst t = useAccountText();\n/** The ticketed change under `None` needs no round trip: the sign-in already said so, and nothing is sent. */\nconst isOpenAtOnce = Boolean(props.ticket) && props.confirmation === PasswordChangeConfirmationType.None;\nconst stage = shallowRef<ChangePasswordStage>(\n props.token || isOpenAtOnce ? ChangePasswordStage.Form : ChangePasswordStage.Idle,\n);\n/** How the change is confirmed, once known, and whether its code or link went out. */\nconst started = shallowRef<PasswordChangeConfirmationDto | null>(\n isOpenAtOnce ? { confirmation: PasswordChangeConfirmationType.None, isSent: false } : null,\n);\nconst isStarting = shallowRef(false);\nconst startFailure = shallowRef<AppError | null>(null);\nconst isCodeRequired = computed(() => started.value?.confirmation === PasswordChangeConfirmationType.Code);\n\nconst form = useAccountForm({\n defaultValues: { currentPassword: '', newPassword: '', code: '' },\n onSubmit: async (values, { signal }) => {\n const result = props.token\n ? await client.changePasswordWithLink({ token: props.token, newPassword: values.newPassword }, signal)\n : await client.changePassword(\n {\n ...(props.ticket ? { ticket: props.ticket } : { currentPassword: values.currentPassword }),\n newPassword: values.newPassword,\n ...(isCodeRequired.value ? { code: values.code.trim() } : {}),\n },\n signal,\n );\n if (result.ok) {\n stage.value = ChangePasswordStage.Done;\n emit('changed');\n }\n return result;\n },\n});\n\n/** Asks the instance how the change is confirmed, which sends the code or link that setting calls for. */\nasync function start() {\n isStarting.value = true;\n startFailure.value = null;\n const result = await client.startPasswordChange(props.ticket ? { ticket: props.ticket } : undefined);\n isStarting.value = false;\n if (!result.ok) {\n startFailure.value = result.failure;\n return;\n }\n started.value = result.value;\n stage.value =\n result.value.confirmation === PasswordChangeConfirmationType.Link\n ? ChangePasswordStage.LinkSent\n : ChangePasswordStage.Form;\n}\n\nonMounted(() => {\n if (props.ticket && !isOpenAtOnce) void start();\n});\n</script>\n\n<template>\n <div class=\"flex flex-col gap-4\">\n <p v-if=\"ticket && stage !== ChangePasswordStage.Done\" class=\"text-sm text-muted-foreground\">\n {{\n t(\n 'ChangePasswordForm.required',\n 'Your password no longer meets the rules here. Choose a new one, then sign in with it.',\n )\n }}\n </p>\n\n <template v-if=\"stage === ChangePasswordStage.Idle\">\n <FailureAlert :failure=\"startFailure\" />\n <Button type=\"button\" is-full-width :is-loading=\"isStarting\" @click=\"start\">\n {{ t('ChangePasswordForm.start', 'Change the password') }}\n </Button>\n </template>\n\n <template v-else-if=\"stage === ChangePasswordStage.LinkSent\">\n <AlertSimple v-if=\"started?.isSent\" severity=\"info\">\n {{ t('ChangePasswordForm.linkSent', 'We sent you a link to change the password. Open it to continue.') }}\n </AlertSimple>\n <AlertSimple v-else severity=\"warning\">\n {{ t('ChangePasswordForm.linkNotSent', 'We could not send the link. Try again in a minute.') }}\n </AlertSimple>\n <FailureAlert :failure=\"startFailure\" />\n <Button type=\"button\" variant=\"outline\" tone=\"neutral\" :is-loading=\"isStarting\" @click=\"start\">\n {{ t('ChangePasswordForm.resendLink', 'Send the link again') }}\n </Button>\n </template>\n\n <form\n v-else-if=\"stage === ChangePasswordStage.Form\"\n class=\"flex flex-col gap-4\"\n novalidate\n @submit=\"form.handleSubmit\"\n >\n <template v-if=\"isCodeRequired\">\n <AlertSimple v-if=\"started?.isSent\" severity=\"info\">\n {{ t('ChangePasswordForm.codeSent', 'We sent you a code. Enter it beside the new password.') }}\n </AlertSimple>\n <AlertSimple v-else severity=\"warning\">\n {{ t('ChangePasswordForm.codeNotSent', 'We could not send a code. Try again in a minute.') }}\n </AlertSimple>\n </template>\n <form.Field v-if=\"!token && !ticket\" v-slot=\"field\" name=\"currentPassword\" is-required>\n <Field :label=\"t('ChangePasswordForm.currentPassword', 'Current password')\">\n <PasswordInput\n v-model=\"field.value\"\n name=\"currentPassword\"\n autocomplete=\"current-password\"\n @blur=\"field.onBlur\"\n />\n </Field>\n </form.Field>\n <form.Field v-slot=\"field\" name=\"newPassword\" is-required>\n <Field :label=\"t('ChangePasswordForm.newPassword', 'New password')\">\n <PasswordInput v-model=\"field.value\" name=\"newPassword\" autocomplete=\"new-password\" @blur=\"field.onBlur\" />\n </Field>\n </form.Field>\n <form.Field v-if=\"isCodeRequired\" v-slot=\"field\" name=\"code\" is-required>\n <Field :label=\"t('ChangePasswordForm.code', 'Code')\">\n <TextInput\n v-model=\"field.value\"\n name=\"code\"\n inputmode=\"numeric\"\n autocomplete=\"one-time-code\"\n @blur=\"field.onBlur\"\n />\n </Field>\n </form.Field>\n <FailureAlert :failure=\"form.state.submitError\" />\n <FailureAlert :failure=\"startFailure\" />\n <Button type=\"submit\" is-full-width :is-loading=\"form.state.isSubmitting\">\n {{ t('ChangePasswordForm.submit', 'Change the password') }}\n </Button>\n <Button\n v-if=\"isCodeRequired\"\n type=\"button\"\n variant=\"ghost\"\n tone=\"neutral\"\n :is-loading=\"isStarting\"\n @click=\"start\"\n >\n {{ t('ChangePasswordForm.resendCode', 'Send a new code') }}\n </Button>\n </form>\n\n <AlertSimple v-else severity=\"success\">\n {{ t('ChangePasswordForm.done', 'Your password is changed.') }}\n </AlertSimple>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { Button } from '@wow-two-beta/fe/presentation/actions';\nimport { AlertSimple } from '@wow-two-beta/fe/presentation/feedback';\nimport { EmailInput, Field } from '@wow-two-beta/fe/presentation/forms';\nimport { shallowRef } from 'vue';\nimport type { AccountClient } from '../../../account';\nimport { useAccountClient, useAccountForm, useAccountText } from '../../../account/hooks';\nimport { FailureAlert } from '../../feedback/failureAlert';\n\n/** Sends a password reset link to an email; it says the same whether or not an account uses it. */\ndefineOptions({ name: 'ForgotPasswordForm' });\n\nconst props = withDefaults(\n defineProps<{\n /** The account API to call; built from `baseUrl` when omitted. */\n client?: AccountClient;\n /** The service's origin; the consumer's own origin when omitted. */\n baseUrl?: string;\n /** The email the field starts with. */\n initialEmail?: string;\n }>(),\n { client: undefined, baseUrl: undefined, initialEmail: '' },\n);\n\nconst emit = defineEmits<{\n /** Fires once the reset email is requested. */\n sent: [email: string];\n}>();\n\nconst client = useAccountClient(props);\nconst t = useAccountText();\nconst sentTo = shallowRef<string | null>(null);\n\nconst form = useAccountForm({\n defaultValues: { email: props.initialEmail },\n onSubmit: async (values, { signal }) => {\n const result = await client.forgotPassword(values, signal);\n if (result.ok) {\n sentTo.value = values.email;\n emit('sent', values.email);\n }\n return result;\n },\n});\n</script>\n\n<template>\n <AlertSimple v-if=\"sentTo\" severity=\"success\">\n {{\n t('ForgotPasswordForm.sent', 'If an account uses {email}, we sent it a link to reset the password.', {\n email: sentTo,\n })\n }}\n </AlertSimple>\n <form v-else class=\"flex flex-col gap-4\" novalidate @submit=\"form.handleSubmit\">\n <form.Field v-slot=\"field\" name=\"email\" is-required>\n <Field :label=\"t('ForgotPasswordForm.email', 'Email')\">\n <EmailInput v-model=\"field.value\" name=\"email\" autocomplete=\"email\" @blur=\"field.onBlur\" />\n </Field>\n </form.Field>\n <FailureAlert :failure=\"form.state.submitError\" />\n <Button type=\"submit\" is-full-width :is-loading=\"form.state.isSubmitting\">\n {{ t('ForgotPasswordForm.submit', 'Send the reset link') }}\n </Button>\n </form>\n</template>\n","<script setup lang=\"ts\">\nimport { Button } from '@wow-two-beta/fe/presentation/actions';\nimport { AlertSimple } from '@wow-two-beta/fe/presentation/feedback';\nimport { Field, PasswordInput, TextInput } from '@wow-two-beta/fe/presentation/forms';\nimport { shallowRef } from 'vue';\nimport type { PasswordChangeRequiredDto } from '../../../../contracts';\nimport type { AccountClient } from '../../../account';\nimport { useAccountClient, useAccountForm, useAccountText } from '../../../account/hooks';\nimport { FailureAlert } from '../../feedback/failureAlert';\n\n/** Signs a person in with a login and password, by cookie session — on the hosted page or embedded in a product. */\ndefineOptions({ name: 'PasswordSignIn' });\n\nconst props = withDefaults(\n defineProps<{\n /** The account API to call; built from `baseUrl` when omitted. */\n client?: AccountClient;\n /** The service's origin; the consumer's own origin when omitted. */\n baseUrl?: string;\n /** The OIDC client the sign-in serves, recorded by the sign-in log. */\n clientId?: string | null;\n /** Where \"Forgot your password?\" leads; no link when omitted. */\n forgotPasswordHref?: string;\n /** The login the field starts with. */\n initialLogin?: string;\n }>(),\n { client: undefined, baseUrl: undefined, clientId: null, forgotPasswordHref: undefined, initialLogin: '' },\n);\n\nconst emit = defineEmits<{\n /** Fires once the session cookie is set. */\n signedIn: [];\n /** Fires when the password matched but breaks the current rules: no session, only the change's ticket. */\n passwordChangeRequired: [required: PasswordChangeRequiredDto];\n}>();\n\nconst client = useAccountClient(props);\nconst t = useAccountText();\n/** The email of an account that must confirm it before signing in, when the login was one. */\nconst unconfirmedEmail = shallowRef<string | null>(null);\nconst isResent = shallowRef(false);\nconst isResending = shallowRef(false);\n\nconst form = useAccountForm({\n defaultValues: { login: props.initialLogin, password: '' },\n onSubmit: async (values, { signal }) => {\n unconfirmedEmail.value = null;\n isResent.value = false;\n const result = await client.signIn(values, { clientId: props.clientId, signal });\n if (result.ok) {\n if (result.value) emit('passwordChangeRequired', result.value);\n else emit('signedIn');\n } else if (result.failure.status === 403 && values.login.includes('@')) unconfirmedEmail.value = values.login;\n return result;\n },\n});\n\nasync function resendConfirmation() {\n if (!unconfirmedEmail.value) return;\n isResending.value = true;\n const result = await client.resendConfirmationEmail({ email: unconfirmedEmail.value });\n isResending.value = false;\n isResent.value = result.ok;\n}\n</script>\n\n<template>\n <form class=\"flex flex-col gap-4\" novalidate @submit=\"form.handleSubmit\">\n <form.Field v-slot=\"field\" name=\"login\" is-required>\n <Field :label=\"t('PasswordSignIn.login', 'Email or user name')\">\n <TextInput v-model=\"field.value\" name=\"login\" autocomplete=\"username\" @blur=\"field.onBlur\" />\n </Field>\n </form.Field>\n <form.Field v-slot=\"field\" name=\"password\" is-required>\n <Field :label=\"t('PasswordSignIn.password', 'Password')\">\n <PasswordInput v-model=\"field.value\" name=\"password\" autocomplete=\"current-password\" @blur=\"field.onBlur\" />\n </Field>\n </form.Field>\n <a\n v-if=\"forgotPasswordHref\"\n :href=\"forgotPasswordHref\"\n class=\"-mt-2 self-end text-sm text-primary underline-offset-4 hover:underline\"\n >\n {{ t('PasswordSignIn.forgotPassword', 'Forgot your password?') }}\n </a>\n <FailureAlert :failure=\"form.state.submitError\" />\n <template v-if=\"unconfirmedEmail\">\n <AlertSimple v-if=\"isResent\" severity=\"success\">\n {{\n t('PasswordSignIn.confirmationResent', 'We sent the confirmation link to {email} again.', {\n email: unconfirmedEmail,\n })\n }}\n </AlertSimple>\n <Button\n v-else\n type=\"button\"\n variant=\"outline\"\n tone=\"neutral\"\n :is-loading=\"isResending\"\n @click=\"resendConfirmation\"\n >\n {{ t('PasswordSignIn.resendConfirmation', 'Send the confirmation email again') }}\n </Button>\n </template>\n <Button type=\"submit\" is-full-width :is-loading=\"form.state.isSubmitting\">\n {{ t('PasswordSignIn.submit', 'Sign in') }}\n </Button>\n </form>\n</template>\n","/** Defines where a phone sign-in stands. */\nexport const PhoneSignInStep = {\n /** Refers to entering the phone a code goes to. */\n Phone: 'phone',\n /** Refers to opening the Telegram bot and sharing the contact, after which the bot sends the code. */\n Telegram: 'telegram',\n /** Refers to entering the code. */\n Code: 'code',\n} as const;\nexport type PhoneSignInStep = (typeof PhoneSignInStep)[keyof typeof PhoneSignInStep];\n","<script setup lang=\"ts\">\nimport { AppErrorFactory, ResultExtensions, type AppError } from '@wow-two-beta/fe/foundation/results';\nimport { Button } from '@wow-two-beta/fe/presentation/actions';\nimport { AlertSimple } from '@wow-two-beta/fe/presentation/feedback';\nimport { Field, PhoneInput, TextInput } from '@wow-two-beta/fe/presentation/forms';\nimport { shallowRef } from 'vue';\nimport type { AccountClient } from '../../../account';\nimport { useAccountClient, useAccountForm, useAccountText } from '../../../account/hooks';\nimport { FailureAlert } from '../../feedback/failureAlert';\nimport { PhoneSignInStep } from './PhoneSignInStep';\n\n/**\n * Signs a person in by a code sent to their phone: the phone first, then the code. A phone with no linked Telegram\n * chat first opens the bot, where sharing the contact links it and brings the code.\n */\ndefineOptions({ name: 'PhoneCodeSignIn' });\n\nconst props = withDefaults(\n defineProps<{\n /** The account API to call; built from `baseUrl` when omitted. */\n client?: AccountClient;\n /** The service's origin; the consumer's own origin when omitted. */\n baseUrl?: string;\n /** The OIDC client the sign-in serves, recorded by the sign-in log. */\n clientId?: string | null;\n /** The ISO codes of the countries a phone may come from, in display order; every country when omitted. */\n countries?: ReadonlyArray<string>;\n /** The ISO code selected first; the first allowed country when omitted. */\n defaultCountry?: string;\n }>(),\n { client: undefined, baseUrl: undefined, clientId: null, countries: undefined, defaultCountry: undefined },\n);\n\nconst emit = defineEmits<{\n /** Fires once the session cookie is set. */\n signedIn: [];\n}>();\n\nconst client = useAccountClient(props);\nconst t = useAccountText();\nconst step = shallowRef<PhoneSignInStep>(PhoneSignInStep.Phone);\n/** The phone the current code was sent to. */\nconst phone = shallowRef('');\nconst telegramLinkUrl = shallowRef<string | null>(null);\nconst isResending = shallowRef(false);\nconst isResent = shallowRef(false);\nconst resendFailure = shallowRef<AppError | null>(null);\n\nconst notSent = () =>\n ResultExtensions.fail({\n ...AppErrorFactory.unavailable(),\n message: t('PhoneCodeSignIn.notSent', 'We could not send a code. Try again in a minute.'),\n });\n\nasync function send(value: string, signal?: AbortSignal) {\n const result = await client.sendPhoneSignInCode({ phone: value }, signal);\n if (!result.ok) return result;\n if (!result.value.isCodeSent && !result.value.telegramLinkUrl) return notSent();\n phone.value = value;\n telegramLinkUrl.value = result.value.telegramLinkUrl;\n return result;\n}\n\nconst phoneForm = useAccountForm({\n defaultValues: { phone: '' },\n onSubmit: async (values, { signal }) => {\n const result = await send(values.phone, signal);\n if (result.ok) {\n codeForm.reset();\n isResent.value = false;\n resendFailure.value = null;\n step.value = telegramLinkUrl.value ? PhoneSignInStep.Telegram : PhoneSignInStep.Code;\n }\n return result;\n },\n});\n\nconst codeForm = useAccountForm({\n defaultValues: { code: '' },\n onSubmit: async (values, { signal }) => {\n const result = await client.signInWithPhone(\n { phone: phone.value, code: values.code.trim() },\n { clientId: props.clientId, signal },\n );\n if (result.ok) emit('signedIn');\n return result;\n },\n});\n\nasync function resend() {\n isResending.value = true;\n isResent.value = false;\n resendFailure.value = null;\n const result = await send(phone.value);\n isResending.value = false;\n if (result.ok) isResent.value = true;\n else resendFailure.value = result.failure;\n}\n\nfunction useAnotherPhone() {\n step.value = PhoneSignInStep.Phone;\n telegramLinkUrl.value = null;\n}\n</script>\n\n<template>\n <form v-if=\"step === PhoneSignInStep.Phone\" class=\"flex flex-col gap-4\" novalidate @submit=\"phoneForm.handleSubmit\">\n <phoneForm.Field v-slot=\"field\" name=\"phone\" is-required>\n <Field :label=\"t('PhoneCodeSignIn.phone', 'Phone number')\">\n <PhoneInput\n v-model=\"field.value\"\n name=\"phone\"\n class=\"w-full [&>span]:shrink-0 [&>span]:whitespace-nowrap\"\n :countries=\"countries\"\n :placeholder=\"t('PhoneCodeSignIn.phonePlaceholder', '')\"\n :default-country=\"defaultCountry\"\n @blur=\"field.onBlur\"\n />\n </Field>\n </phoneForm.Field>\n <FailureAlert :failure=\"phoneForm.state.submitError\" />\n <Button type=\"submit\" is-full-width :is-loading=\"phoneForm.state.isSubmitting\">\n {{ t('PhoneCodeSignIn.send', 'Send a code') }}\n </Button>\n </form>\n\n <div v-else-if=\"step === PhoneSignInStep.Telegram\" class=\"flex flex-col gap-4\">\n <p class=\"text-sm text-muted-foreground\">\n {{\n t(\n 'PhoneCodeSignIn.telegramIntro',\n 'Open our Telegram bot, press Start and share your contact. The bot then sends your code for {phone}.',\n { phone },\n )\n }}\n </p>\n <Button as-child is-full-width>\n <a\n :href=\"telegramLinkUrl ?? undefined\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n @click=\"step = PhoneSignInStep.Code\"\n >\n {{ t('PhoneCodeSignIn.openTelegram', 'Open Telegram') }}\n </a>\n </Button>\n <Button type=\"button\" variant=\"outline\" tone=\"neutral\" is-full-width @click=\"step = PhoneSignInStep.Code\">\n {{ t('PhoneCodeSignIn.haveCode', 'I have the code') }}\n </Button>\n <Button type=\"button\" variant=\"ghost\" tone=\"neutral\" @click=\"useAnotherPhone\">\n {{ t('PhoneCodeSignIn.otherPhone', 'Use another number') }}\n </Button>\n </div>\n\n <form v-else class=\"flex flex-col gap-4\" novalidate @submit=\"codeForm.handleSubmit\">\n <p class=\"text-sm text-muted-foreground\">\n <template v-if=\"telegramLinkUrl\">\n {{ t('PhoneCodeSignIn.codeFromTelegram', 'Enter the code the bot sent you in Telegram.') }}\n <a\n :href=\"telegramLinkUrl\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"text-primary underline-offset-4 hover:underline\"\n >\n {{ t('PhoneCodeSignIn.openTelegramAgain', 'Open Telegram') }}\n </a>\n </template>\n <template v-else>{{ t('PhoneCodeSignIn.codeSent', 'We sent a code to {phone}.', { phone }) }}</template>\n </p>\n <codeForm.Field v-slot=\"field\" name=\"code\" is-required>\n <Field :label=\"t('PhoneCodeSignIn.code', 'Code')\">\n <TextInput\n v-model=\"field.value\"\n name=\"code\"\n inputmode=\"numeric\"\n autocomplete=\"one-time-code\"\n @blur=\"field.onBlur\"\n />\n </Field>\n </codeForm.Field>\n <FailureAlert :failure=\"codeForm.state.submitError\" />\n <FailureAlert :failure=\"resendFailure\" />\n <AlertSimple v-if=\"isResent\" severity=\"success\">\n {{ t('PhoneCodeSignIn.resent', 'We sent a new code.') }}\n </AlertSimple>\n <Button type=\"submit\" is-full-width :is-loading=\"codeForm.state.isSubmitting\">\n {{ t('PhoneCodeSignIn.submit', 'Sign in') }}\n </Button>\n <div class=\"flex flex-wrap justify-between gap-2\">\n <Button type=\"button\" variant=\"ghost\" tone=\"neutral\" :is-loading=\"isResending\" @click=\"resend\">\n {{ t('PhoneCodeSignIn.resend', 'Send a new code') }}\n </Button>\n <Button type=\"button\" variant=\"ghost\" tone=\"neutral\" @click=\"useAnotherPhone\">\n {{ t('PhoneCodeSignIn.otherPhone', 'Use another number') }}\n </Button>\n </div>\n </form>\n</template>\n","<script setup lang=\"ts\">\nimport { Button } from '@wow-two-beta/fe/presentation/actions';\nimport { AlertSimple } from '@wow-two-beta/fe/presentation/feedback';\nimport { Field, PasswordInput } from '@wow-two-beta/fe/presentation/forms';\nimport { shallowRef } from 'vue';\nimport type { AccountClient } from '../../../account';\nimport { useAccountClient, useAccountForm, useAccountText } from '../../../account/hooks';\nimport { FailureAlert } from '../../feedback/failureAlert';\n\n/** Sets a new password with the token a reset email carried. */\ndefineOptions({ name: 'ResetPasswordForm' });\n\nconst props = withDefaults(\n defineProps<{\n /** The account API to call; built from `baseUrl` when omitted. */\n client?: AccountClient;\n /** The service's origin; the consumer's own origin when omitted. */\n baseUrl?: string;\n /** The account email the reset link named. */\n email: string;\n /** The reset token the link carried. */\n token: string;\n /** Where the person signs in once the password is set; no link when omitted. */\n signInHref?: string;\n }>(),\n { client: undefined, baseUrl: undefined, signInHref: undefined },\n);\n\nconst emit = defineEmits<{\n /** Fires once the new password is set. */\n reset: [];\n}>();\n\nconst client = useAccountClient(props);\nconst t = useAccountText();\nconst isReset = shallowRef(false);\n\nconst form = useAccountForm({\n defaultValues: { newPassword: '' },\n onSubmit: async (values, { signal }) => {\n const result = await client.resetPassword(\n { email: props.email, resetToken: props.token, newPassword: values.newPassword },\n signal,\n );\n if (result.ok) {\n isReset.value = true;\n emit('reset');\n }\n return result;\n },\n});\n</script>\n\n<template>\n <div v-if=\"isReset\" class=\"flex flex-col gap-4\">\n <AlertSimple severity=\"success\">{{ t('ResetPasswordForm.done', 'Your password is changed.') }}</AlertSimple>\n <Button v-if=\"signInHref\" as-child is-full-width>\n <a :href=\"signInHref\">{{ t('ResetPasswordForm.signIn', 'Sign in') }}</a>\n </Button>\n </div>\n <form v-else class=\"flex flex-col gap-4\" novalidate @submit=\"form.handleSubmit\">\n <p class=\"text-sm text-muted-foreground\">\n {{ t('ResetPasswordForm.intro', 'Choose a new password for {email}.', { email }) }}\n </p>\n <form.Field v-slot=\"field\" name=\"newPassword\" is-required>\n <Field :label=\"t('ResetPasswordForm.newPassword', 'New password')\">\n <PasswordInput v-model=\"field.value\" name=\"newPassword\" autocomplete=\"new-password\" @blur=\"field.onBlur\" />\n </Field>\n </form.Field>\n <FailureAlert :failure=\"form.state.submitError\" />\n <Button type=\"submit\" is-full-width :is-loading=\"form.state.isSubmitting\">\n {{ t('ResetPasswordForm.submit', 'Set the password') }}\n </Button>\n </form>\n</template>\n","<script setup lang=\"ts\">\nimport { Button } from '@wow-two-beta/fe/presentation/actions';\nimport { AlertSimple } from '@wow-two-beta/fe/presentation/feedback';\nimport { EmailInput, Field, PasswordInput } from '@wow-two-beta/fe/presentation/forms';\nimport { shallowRef } from 'vue';\nimport type { RegisteredAccountDto } from '../../../../contracts';\nimport type { AccountClient } from '../../../account';\nimport { useAccountClient, useAccountForm, useAccountText } from '../../../account/hooks';\nimport { FailureAlert } from '../../feedback/failureAlert';\n\n/** Creates an account with an email and password while the instance keeps sign-up on, then says what comes next. */\ndefineOptions({ name: 'SignUpForm' });\n\nconst props = withDefaults(\n defineProps<{\n /** The account API to call; built from `baseUrl` when omitted. */\n client?: AccountClient;\n /** The service's origin; the consumer's own origin when omitted. */\n baseUrl?: string;\n /** Where the person signs in once the account exists; no link when omitted. */\n signInHref?: string;\n }>(),\n { client: undefined, baseUrl: undefined, signInHref: undefined },\n);\n\nconst emit = defineEmits<{\n /** Fires with the account a registration created. */\n signedUp: [account: RegisteredAccountDto];\n}>();\n\nconst client = useAccountClient(props);\nconst t = useAccountText();\nconst registered = shallowRef<{ account: RegisteredAccountDto; email: string } | null>(null);\n\nconst form = useAccountForm({\n defaultValues: { email: '', password: '' },\n onSubmit: async (values, { signal }) => {\n const result = await client.register(values, signal);\n if (result.ok) {\n registered.value = { account: result.value, email: values.email };\n emit('signedUp', result.value);\n }\n return result;\n },\n});\n</script>\n\n<template>\n <div v-if=\"registered\" class=\"flex flex-col gap-4\">\n <AlertSimple severity=\"success\">\n <template v-if=\"registered.account.isConfirmationSent\">\n {{\n t('SignUpForm.confirmationSent', 'Check your inbox: we sent a link to {email} to confirm the address.', {\n email: registered.email,\n })\n }}\n </template>\n <template v-else>{{ t('SignUpForm.created', 'Your account is ready.') }}</template>\n </AlertSimple>\n <Button v-if=\"signInHref\" as-child is-full-width>\n <a :href=\"signInHref\">{{ t('SignUpForm.signIn', 'Sign in') }}</a>\n </Button>\n </div>\n <form v-else class=\"flex flex-col gap-4\" novalidate @submit=\"form.handleSubmit\">\n <form.Field v-slot=\"field\" name=\"email\" is-required>\n <Field :label=\"t('SignUpForm.email', 'Email')\">\n <EmailInput v-model=\"field.value\" name=\"email\" autocomplete=\"email\" @blur=\"field.onBlur\" />\n </Field>\n </form.Field>\n <form.Field v-slot=\"field\" name=\"password\" is-required>\n <Field :label=\"t('SignUpForm.password', 'Password')\">\n <PasswordInput v-model=\"field.value\" name=\"password\" autocomplete=\"new-password\" @blur=\"field.onBlur\" />\n </Field>\n </form.Field>\n <FailureAlert :failure=\"form.state.submitError\" />\n <Button type=\"submit\" is-full-width :is-loading=\"form.state.isSubmitting\">\n {{ t('SignUpForm.submit', 'Create the account') }}\n </Button>\n </form>\n</template>\n"],"names":["text","_createBlock","_unref","useAccountForm","_openBlock","_createElementBlock","_hoisted_1","_hoisted_2","_toDisplayString","_Fragment","_createVNode","FailureAlert","_withCtx","_createElementVNode","_hoisted_3","_createTextVNode"],"mappings":";;;;;;;;;AAgHA,MAAM,kBAAkB,MAAM,iBAAiB,KAAK,kBAAkB,OAAO,UAAU,CAAC;AAExF,SAAS,OAAO,OAA0D;AACxE,SAAO,UAAU,QAAQ,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,KAAK,IACrE,QACD;AACN;AAEA,SAAS,iBAAiB,OAA+C;AACvE,QAAM,OAAO,OAAO,KAAK;AACzB,MAAI,QAAQ,OAAO,KAAK,WAAW,UAAU;AAC3C,WAAO,iBAAiB,GAAG,EAAE,QAAQ,KAAK,QAAQ,oBAAoB,KAAK,uBAAuB,MAAM;AAAA,EAC1G;AACA,SAAO,gBAAA;AACT;AAEA,SAAS,kBAAkB,OAAyC;AAClE,QAAM,OAAO,OAAO,KAAK;AACzB,MAAI,QAAQ,OAAO,KAAK,WAAW,UAAU;AAC3C,WAAO,iBAAiB,GAAG;AAAA,MACzB,QAAQ,KAAK;AAAA,MACb,UAAU,OAAO,KAAK,aAAa,WAAW,KAAK,WAAW;AAAA,MAC9D,OAAO,OAAO,KAAK,UAAU,WAAW,KAAK,QAAQ;AAAA,MACrD,kBAAkB,KAAK,qBAAqB;AAAA,MAC5C,oBAAoB,KAAK,uBAAuB;AAAA,IAAA,CACjD;AAAA,EACH;AACA,SAAO,gBAAA;AACT;AAEA,MAAM,oBAAoB,OAAO,OAAO,8BAA8B;AAGtE,SAAS,eAAe,OAA4D;AAClF,SAAO,OAAO,UAAU,WACpB,kBAAkB,KAAK,CAAC,SAAS,KAAK,YAAA,MAAkB,MAAM,YAAA,CAAa,IAC3E;AACN;AAEA,SAAS,mBAAmB,OAAwD;AAClF,QAAM,OAAO,OAAO,KAAK;AACzB,QAAM,eAA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ACvBF,YAEQR,MAAA,KAAA,GAAA;AAAA,cAFA,OAAOA,MAAA,CAAA,EAAC,oBAAA,OAAA;AAAA,YAAA;+BACd,MAA2F;AAAA,gBAA3FQ,YAA2FR,MAAA,UAAA,GAAA;AAAA,kBAAtE,YAAA,MAAM;AAAA,kBAAN,uBAAA,CAAA,WAAA,MAAM,QAAK;AAAA,kBAAE,MAAK;AAAA,kBAAQ,cAAa;AAAA,kBAAS,QAAM,MAAM;AAAA,gBAAA;;;;;;;QAGrFQ,YAIaR,MAAA,IAAA,EAAA,OAAA;AAAA,UAJc,MAAK;AAAA,UAAW,eAAA;AAAA,QAAA;UACzC,SAAAU,QAAA,CADkB,UAAK;AAAA,YACvBF,YAEQR,MAAA,KAAA,GAAA;AAAA,cAFA,OAAOA,MAAA,CAAA,EAAC,uBAAA,UAAA;AAAA,YAAA;+BACd,MAAwG;AAAA,gBAAxGQ,YAAwGR,MAAA,aAAA,GAAA;AAAA,kBAAhF,YAAA,MAAM;AAAA,kBAAN,uBAAA,CAAA,WAAA,MAAM,QAAK;AAAA,kBAAE,MAAK;AAAA,kBAAW,cAAa;AAAA,kBAAgB,QAAM,MAAM;AAAA,gBAAA;;;;;;;QAGlGQ,YAAkDR,MAAAS,WAAA,GAAA;AAAA,UAAnC,SAAST,MAAA,IAAA,EAAK,MAAM;AAAA,QAAA;QACnCQ,YAESR,MAAA,MAAA,GAAA;AAAA,UAFD,MAAK;AAAA,UAAS,iBAAA;AAAA,UAAe,cAAYA,MAAA,IAAA,EAAK,MAAM;AAAA,QAAA;2BAC1D,MAAkD;AAAA,4CAA/CA,MAAA,CAAA,EAAC,qBAAA,oBAAA,CAAA,GAAA,CAAA;AAAA,UAAA;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/kit/account/CreateAccountClient.ts","../../src/kit/account/hooks/UseAccountClient.ts","../../src/kit/account/hooks/UseAccountText.ts","../../src/kit/presentation/feedback/failureAlert/FailureAlert.vue","../../src/kit/presentation/forms/changePasswordForm/ChangePasswordStage.ts","../../src/kit/presentation/forms/changePasswordForm/ChangePasswordForm.vue","../../src/kit/presentation/forms/forgotPasswordForm/ForgotPasswordForm.vue","../../src/kit/presentation/forms/passwordSignIn/PasswordSignIn.vue","../../src/kit/presentation/forms/phoneCodeSignIn/PhoneSignInStep.ts","../../src/kit/presentation/forms/phoneCodeSignIn/PhoneCodeSignIn.vue","../../src/kit/presentation/forms/resetPasswordForm/ResetPasswordForm.vue","../../src/kit/presentation/forms/signUpForm/SignUpForm.vue"],"sourcesContent":["import { ApiFailureFactory, createApiClient, type ApiFailure } from '@wow-two-beta/fe/foundation/http';\nimport { ResultExtensions, type Result } from '@wow-two-beta/fe/foundation/results';\nimport {\n AccountRouteConstants,\n PasswordChangeConfirmationType,\n type AccountInfoDto,\n type ConfirmEmailApiRequest,\n type EmailAddressApiRequest,\n type PasswordChangeApiRequest,\n type PasswordChangeConfirmationApiRequest,\n type PasswordChangeConfirmationDto,\n type PasswordChangeLinkApiRequest,\n type PasswordChangeRequiredDto,\n type PhoneSignInApiRequest,\n type PhoneSignInSendApiRequest,\n type PhoneSignInSentDto,\n type ResetPasswordApiRequest,\n type SignInApiRequest,\n type SignInFieldDto,\n type SignInMethodDto,\n type SignInOptionsDto,\n type SignInRuleDto,\n type SignUpApiRequest,\n type SignedUpAccountDto,\n} from '../../contracts';\n\n/** Configures where the account API is reached. */\nexport interface AccountClientOptions {\n /** The origin serving the API: empty for the consumer's own backend (Form 1), the service's URL otherwise. */\n readonly baseUrl?: string;\n /**\n * Whether the browser sends the session cookie. Default `same-origin`, or `include` when `baseUrl` is set, which\n * the service's CORS policy must allow.\n */\n readonly credentials?: RequestCredentials;\n /** Replaces the global fetch, for tests. */\n readonly fetch?: typeof globalThis.fetch;\n}\n\n/** Describes a sign-in call beyond its body. */\nexport interface AccountSignInOptions {\n /** The OIDC client the sign-in serves, recorded by the sign-in log. */\n readonly clientId?: string | null;\n /** Cancels the request. */\n readonly signal?: AbortSignal;\n}\n\n/** Describes a sign-in declaration request. */\nexport interface SignInOptionsQuery {\n /** The OIDC client the sign-in serves, recorded by the sign-in log; the look stays the instance's. */\n readonly clientId?: string | null;\n /** The locale of the rule messages (`uz`, `ru`, `en`); the browser's `Accept-Language` when omitted. */\n readonly locale?: string | null;\n /** Cancels the request. */\n readonly signal?: AbortSignal;\n}\n\n/** Calls the account API over HTTP, signing in with cookie sessions. */\nexport interface AccountClient {\n /**\n * Reads the sign-in declaration: the hosted pages' look, whether sign-up is open, and each enabled method in layout\n * order with its fields and rules. The look is the instance's, whatever `clientId` names.\n */\n getSignInOptions(query?: SignInOptionsQuery): Promise<Result<SignInOptionsDto, ApiFailure>>;\n /** Signs an account up while sign-up is on; `403` while it is closed. */\n signUp(request: SignUpApiRequest, signal?: AbortSignal): Promise<Result<SignedUpAccountDto, ApiFailure>>;\n /**\n * Signs in with an identifier and password: `null` once the session cookie is set, or the ticket of a required\n * password change, which sets no session.\n */\n signIn(\n request: SignInApiRequest,\n options?: AccountSignInOptions,\n ): Promise<Result<PasswordChangeRequiredDto | null, ApiFailure>>;\n /** Confirms an email with the emailed token. */\n confirmEmail(request: ConfirmEmailApiRequest, signal?: AbortSignal): Promise<Result<void, ApiFailure>>;\n /** Sends the confirmation email again; succeeds whether or not the account exists. */\n resendConfirmationEmail(request: EmailAddressApiRequest, signal?: AbortSignal): Promise<Result<void, ApiFailure>>;\n /** Sends a password reset email; succeeds whether or not the account exists. */\n forgotPassword(request: EmailAddressApiRequest, signal?: AbortSignal): Promise<Result<void, ApiFailure>>;\n /** Sets a new password with the emailed reset token. */\n resetPassword(request: ResetPasswordApiRequest, signal?: AbortSignal): Promise<Result<void, ApiFailure>>;\n /** Reads the signed-in account; `401` when nobody is signed in. */\n getAccountInfo(signal?: AbortSignal): Promise<Result<AccountInfoDto, ApiFailure>>;\n /**\n * Starts a password change, signed in or with a required change's ticket: answers how it is confirmed, and sends the\n * code or link the setting asks for.\n */\n startPasswordChange(\n request?: PasswordChangeConfirmationApiRequest,\n signal?: AbortSignal,\n ): Promise<Result<PasswordChangeConfirmationDto, ApiFailure>>;\n /** Changes the password of the signed-in person, or of the one a required change's ticket names. */\n changePassword(request: PasswordChangeApiRequest, signal?: AbortSignal): Promise<Result<void, ApiFailure>>;\n /** Changes a password with the one-time token a change link carries. */\n changePasswordWithLink(\n request: PasswordChangeLinkApiRequest,\n signal?: AbortSignal,\n ): Promise<Result<void, ApiFailure>>;\n /** Sends a phone sign-in code, or answers the Telegram link that sends one once the contact is shared. */\n sendPhoneSignInCode(\n request: PhoneSignInSendApiRequest,\n signal?: AbortSignal,\n ): Promise<Result<PhoneSignInSentDto, ApiFailure>>;\n /** Signs in with a phone and its code and sets the session cookie. */\n signInWithPhone(request: PhoneSignInApiRequest, options?: AccountSignInOptions): Promise<Result<void, ApiFailure>>;\n /** Ends the cookie's session. */\n signOut(signal?: AbortSignal): Promise<Result<void, ApiFailure>>;\n}\n\ntype Decoded<T> = Result<T, ApiFailure>;\n\nconst protocolFailure = () => ResultExtensions.fail(ApiFailureFactory.create('protocol'));\n\nfunction record(value: unknown): Readonly<Record<string, unknown>> | null {\n return value !== null && typeof value === 'object' && !Array.isArray(value)\n ? (value as Record<string, unknown>)\n : null;\n}\n\nfunction decodeSignedUp(value: unknown): Decoded<SignedUpAccountDto> {\n const body = record(value);\n if (body && typeof body.userId === 'string') {\n return ResultExtensions.ok({ userId: body.userId, isConfirmationSent: body.isConfirmationSent === true });\n }\n return protocolFailure();\n}\n\nfunction decodeAccountInfo(value: unknown): Decoded<AccountInfoDto> {\n const body = record(value);\n if (body && typeof body.userId === 'string') {\n return ResultExtensions.ok({\n userId: body.userId,\n userName: typeof body.userName === 'string' ? body.userName : null,\n email: typeof body.email === 'string' ? body.email : null,\n isEmailConfirmed: body.isEmailConfirmed === true,\n isTwoFactorEnabled: body.isTwoFactorEnabled === true,\n });\n }\n return protocolFailure();\n}\n\nconst confirmationTypes = Object.values(PasswordChangeConfirmationType);\n\n/** Reads a confirmation type whatever its case; `undefined` for anything else. */\nfunction confirmationOf(value: unknown): PasswordChangeConfirmationType | undefined {\n return typeof value === 'string'\n ? confirmationTypes.find((type) => type.toLowerCase() === value.toLowerCase())\n : undefined;\n}\n\nfunction decodeConfirmation(value: unknown): Decoded<PasswordChangeConfirmationDto> {\n const body = record(value);\n const confirmation = confirmationOf(body?.confirmation);\n if (body && confirmation) return ResultExtensions.ok({ confirmation, isSent: body.isSent === true });\n return protocolFailure();\n}\n\nfunction decodeCodeSent(value: unknown): Decoded<PhoneSignInSentDto> {\n const body = record(value);\n if (!body) return protocolFailure();\n const link =\n typeof body.telegramLinkUrl === 'string' && body.telegramLinkUrl.length > 0 ? body.telegramLinkUrl : null;\n return ResultExtensions.ok({ isCodeSent: body.isCodeSent === true, telegramLinkUrl: link });\n}\n\nfunction text(value: unknown): string | null {\n return typeof value === 'string' ? value : null;\n}\n\nfunction strings(value: unknown): ReadonlyArray<string> | null {\n return Array.isArray(value) && value.every((item): item is string => typeof item === 'string') ? value : null;\n}\n\n/** Decodes each item of a list, or `null` when it is no list or any item fails. */\nfunction list<T>(value: unknown, decode: (item: unknown) => T | null): ReadonlyArray<T> | null {\n if (!Array.isArray(value)) return null;\n const items = value.map(decode);\n return items.every((item): item is T => item !== null) ? items : null;\n}\n\nfunction decodeRule(value: unknown): SignInRuleDto | null {\n const body = record(value);\n const code = text(body?.code);\n const message = text(body?.message);\n return body && code && message !== null ? { code, params: record(body.params), message } : null;\n}\n\nfunction decodeField(value: unknown): SignInFieldDto | null {\n const body = record(value);\n const name = text(body?.name);\n const kind = text(body?.kind);\n const rules = list(body?.rules, decodeRule);\n return body && name && kind && rules ? { name, kind, countries: strings(body.countries), rules } : null;\n}\n\nfunction decodeMethod(value: unknown): SignInMethodDto | null {\n const body = record(value);\n const id = text(body?.id);\n const fields = list(body?.fields, decodeField);\n if (!body || !id || !fields) return null;\n const passwordRules = body.passwordRules == null ? null : list(body.passwordRules, decodeRule);\n if (body.passwordRules != null && passwordRules === null) return null;\n return { id, channels: strings(body.channels) ?? [], fields, passwordRules };\n}\n\nfunction decodeSignInOptions(value: unknown): Decoded<SignInOptionsDto> {\n const body = record(value);\n const brandName = text(body?.brandName);\n const theme = text(body?.theme);\n const methods = list(body?.methods, decodeMethod);\n if (!body || !brandName || !theme || !methods) return protocolFailure();\n const requirements = record(body.requirements);\n return ResultExtensions.ok({\n brandName,\n theme,\n backgroundUrl: text(body.backgroundUrl) || null,\n isSignUpEnabled: body.isSignUpEnabled === true,\n locale: text(body.locale) ?? 'en',\n locales: strings(body.locales) ?? [],\n methods,\n requirements: {\n isConfirmedEmailRequired: requirements?.isConfirmedEmailRequired === true,\n isConfirmedPhoneNumberRequired: requirements?.isConfirmedPhoneNumberRequired === true,\n isSecondFactorRequired: requirements?.isSecondFactorRequired === true,\n },\n });\n}\n\n/**\n * Reads a cookie sign-in's answer: `204` set the session; a body flagged `isPasswordChangeRequired`, enveloped or\n * bare, holds the change's ticket instead.\n */\nfunction decodeSignedIn(text: string): Decoded<PasswordChangeRequiredDto | null> {\n if (text.trim() === '') return ResultExtensions.ok(null);\n let parsed: unknown;\n try {\n parsed = JSON.parse(text);\n } catch {\n return protocolFailure();\n }\n const outer = record(parsed);\n const body = record(outer?.data) ?? outer;\n if (body?.isPasswordChangeRequired !== true) return body ? ResultExtensions.ok(null) : protocolFailure();\n if (typeof body.ticket !== 'string' || body.ticket === '') return protocolFailure();\n return ResultExtensions.ok({\n isPasswordChangeRequired: true,\n confirmation: confirmationOf(body.confirmation) ?? PasswordChangeConfirmationType.None,\n ticket: body.ticket,\n });\n}\n\n/** Creates a client for the account API at `baseUrl` (same origin by default). */\nexport function createAccountClient(options: AccountClientOptions = {}): AccountClient {\n const baseUrl = options.baseUrl?.replace(/\\/+$/, '') ?? '';\n const credentials = options.credentials ?? (baseUrl ? 'include' : undefined);\n const client = createApiClient({\n baseUrl: `${baseUrl}${AccountRouteConstants.base}`,\n ...(credentials !== undefined ? { credentials } : {}),\n ...(options.fetch !== undefined ? { fetch: options.fetch } : {}),\n });\n const signInQuery = (clientId?: string | null) => ({\n [AccountRouteConstants.useCookiesParameter]: true,\n ...(clientId ? { [AccountRouteConstants.clientIdParameter]: clientId } : {}),\n });\n const send = (path: string, body: unknown, signal?: AbortSignal) =>\n client.post(path, { body, response: 'empty', signal });\n\n return {\n getSignInOptions: ({ clientId, locale, signal } = {}) =>\n client.get(AccountRouteConstants.signInOptions, {\n query: {\n ...(clientId ? { [AccountRouteConstants.clientIdParameter]: clientId } : {}),\n ...(locale ? { [AccountRouteConstants.localeParameter]: locale } : {}),\n },\n signal,\n decode: decodeSignInOptions,\n }),\n signUp: (request, signal) =>\n client.post(AccountRouteConstants.signUp, { body: request, signal, decode: decodeSignedUp }),\n async signIn(request, { clientId, signal } = {}) {\n const answered = await client.post(AccountRouteConstants.signIn, {\n query: signInQuery(clientId),\n body: request,\n response: 'text',\n signal,\n });\n return answered.ok ? decodeSignedIn(answered.value) : answered;\n },\n confirmEmail: (request, signal) =>\n client.get(AccountRouteConstants.confirmEmail, { query: { ...request }, response: 'empty', signal }),\n resendConfirmationEmail: (request, signal) => send(AccountRouteConstants.resendConfirmationEmail, request, signal),\n forgotPassword: (request, signal) => send(AccountRouteConstants.forgotPassword, request, signal),\n resetPassword: (request, signal) => send(AccountRouteConstants.resetPassword, request, signal),\n getAccountInfo: (signal) => client.get(AccountRouteConstants.manageInfo, { signal, decode: decodeAccountInfo }),\n startPasswordChange: (request, signal) =>\n client.post(AccountRouteConstants.managePasswordConfirmation, {\n body: request ?? {},\n signal,\n decode: decodeConfirmation,\n }),\n changePassword: (request, signal) => send(AccountRouteConstants.managePassword, request, signal),\n changePasswordWithLink: (request, signal) => send(AccountRouteConstants.passwordChange, request, signal),\n sendPhoneSignInCode: (request, signal) =>\n client.post(AccountRouteConstants.phoneSignInSend, { body: request, signal, decode: decodeCodeSent }),\n signInWithPhone: (request, { clientId, signal } = {}) =>\n client.post(AccountRouteConstants.phoneSignIn, {\n query: signInQuery(clientId),\n body: request,\n response: 'empty',\n signal,\n }),\n signOut: (signal) => client.post(AccountRouteConstants.signOut, { response: 'empty', signal }),\n };\n}\n","import { createAccountClient, type AccountClient } from '../CreateAccountClient';\n\n/** Names where a kit component reaches the account API. */\nexport interface AccountClientSource {\n /** The client to call; built from `baseUrl` when omitted. */\n readonly client?: AccountClient;\n /** The service's origin; the consumer's own origin (Form 1) when omitted. */\n readonly baseUrl?: string;\n}\n\n/** Returns the component's account client, read once at setup: the given one, or one for `baseUrl`. */\nexport function useAccountClient(source: AccountClientSource): AccountClient {\n return source.client ?? createAccountClient(source.baseUrl ? { baseUrl: source.baseUrl } : {});\n}\n","import { useLocale } from '@wow-two-beta/fe/foundation/i18n';\n\n/** Resolves one kit message: its key under `IdentityKit.`, the English fallback, and the values it interpolates. */\nexport type AccountText = (key: string, fallback: string, values?: Readonly<Record<string, string | number>>) => string;\n\n/**\n * Returns the kit's message resolver: the consumer's `LocaleProvider` messages for `IdentityKit.{key}`, else the\n * English fallback. Call it in `setup()`.\n */\nexport function useAccountText(): AccountText {\n const locale = useLocale();\n return (key, fallback, values) => locale.t(`IdentityKit.${key}`, values, fallback);\n}\n","<script setup lang=\"ts\">\nimport { ApiFailureExtensions } from '@wow-two-beta/fe/foundation/http';\nimport { AppErrorType, type AppError } from '@wow-two-beta/fe/foundation/results';\nimport { AlertSimple } from '@wow-two-beta/fe/presentation/feedback';\nimport { computed } from 'vue';\n\n/** Says why a request failed: the problem's own text, else the failure's display-safe message. */\ndefineOptions({ name: 'FailureAlert' });\n\nconst props = defineProps<{\n /** The failure to explain; nothing renders without one. */\n failure: AppError | null;\n}>();\n\nconst reason = computed(() =>\n props.failure && props.failure.type !== AppErrorType.Cancelled ? ApiFailureExtensions.reason(props.failure) : '',\n);\n</script>\n\n<template>\n <AlertSimple v-if=\"reason\" severity=\"danger\">{{ reason }}</AlertSimple>\n</template>\n","/** Defines where a password change stands. */\nexport const ChangePasswordStage = {\n /** Refers to the change not started: the instance has not said how it is confirmed. */\n Idle: 'idle',\n /** Refers to the change form, with the code field under the `Code` confirmation. */\n Form: 'form',\n /** Refers to the `Link` confirmation: only the emailed link opens the form. */\n LinkSent: 'link-sent',\n /** Refers to the password changed. */\n Done: 'done',\n} as const;\nexport type ChangePasswordStage = (typeof ChangePasswordStage)[keyof typeof ChangePasswordStage];\n","<script setup lang=\"ts\">\nimport type { AppError } from '@wow-two-beta/fe/foundation/results';\nimport { Button } from '@wow-two-beta/fe/presentation/actions';\nimport { AlertSimple } from '@wow-two-beta/fe/presentation/feedback';\nimport { Field, PasswordInput, TextInput } from '@wow-two-beta/fe/presentation/forms';\nimport { computed, onMounted, shallowRef } from 'vue';\nimport { PasswordChangeConfirmationType, type PasswordChangeConfirmationDto } from '../../../../contracts';\nimport type { AccountClient } from '../../../account';\nimport { useAccountClient, useAccountForm, useAccountText } from '../../../account/hooks';\nimport { FailureAlert } from '../../feedback/failureAlert';\nimport { ChangePasswordStage } from './ChangePasswordStage';\n\n/**\n * Changes a password under the instance's confirmation setting. Signed in, it starts the change and asks for the\n * current password, plus the sent code under `Code`, or says a link went out under `Link`. With the ticket of a\n * sign-in that requires the change, it starts at once and skips the current password. With the token a change link\n * carried, it asks only for the new password.\n */\ndefineOptions({ name: 'ChangePasswordForm' });\n\nconst props = withDefaults(\n defineProps<{\n /** The account API to call; built from `baseUrl` when omitted. */\n client?: AccountClient;\n /** The service's origin; the consumer's own origin when omitted. */\n baseUrl?: string;\n /** The one-time token a change link carried. */\n token?: string | null;\n /** The ticket a sign-in answered with when the password breaks the current rules. */\n ticket?: string | null;\n /** How the ticket's change is confirmed, as the sign-in answered; asked of the instance when omitted. */\n confirmation?: PasswordChangeConfirmationType | null;\n }>(),\n { client: undefined, baseUrl: undefined, token: null, ticket: null, confirmation: null },\n);\n\nconst emit = defineEmits<{\n /** Fires once the password is changed. */\n changed: [];\n}>();\n\nconst client = useAccountClient(props);\nconst t = useAccountText();\n/** The ticketed change under `None` needs no round trip: the sign-in already said so, and nothing is sent. */\nconst isOpenAtOnce = Boolean(props.ticket) && props.confirmation === PasswordChangeConfirmationType.None;\nconst stage = shallowRef<ChangePasswordStage>(\n props.token || isOpenAtOnce ? ChangePasswordStage.Form : ChangePasswordStage.Idle,\n);\n/** How the change is confirmed, once known, and whether its code or link went out. */\nconst started = shallowRef<PasswordChangeConfirmationDto | null>(\n isOpenAtOnce ? { confirmation: PasswordChangeConfirmationType.None, isSent: false } : null,\n);\nconst isStarting = shallowRef(false);\nconst startFailure = shallowRef<AppError | null>(null);\nconst isCodeRequired = computed(() => started.value?.confirmation === PasswordChangeConfirmationType.Code);\n\nconst form = useAccountForm({\n defaultValues: { currentPassword: '', newPassword: '', code: '' },\n onSubmit: async (values, { signal }) => {\n const result = props.token\n ? await client.changePasswordWithLink({ token: props.token, newPassword: values.newPassword }, signal)\n : await client.changePassword(\n {\n ...(props.ticket ? { ticket: props.ticket } : { currentPassword: values.currentPassword }),\n newPassword: values.newPassword,\n ...(isCodeRequired.value ? { code: values.code.trim() } : {}),\n },\n signal,\n );\n if (result.ok) {\n stage.value = ChangePasswordStage.Done;\n emit('changed');\n }\n return result;\n },\n});\n\n/** Asks the instance how the change is confirmed, which sends the code or link that setting calls for. */\nasync function start() {\n isStarting.value = true;\n startFailure.value = null;\n const result = await client.startPasswordChange(props.ticket ? { ticket: props.ticket } : undefined);\n isStarting.value = false;\n if (!result.ok) {\n startFailure.value = result.failure;\n return;\n }\n started.value = result.value;\n stage.value =\n result.value.confirmation === PasswordChangeConfirmationType.Link\n ? ChangePasswordStage.LinkSent\n : ChangePasswordStage.Form;\n}\n\nonMounted(() => {\n if (props.ticket && !isOpenAtOnce) void start();\n});\n</script>\n\n<template>\n <div class=\"flex flex-col gap-4\">\n <p v-if=\"ticket && stage !== ChangePasswordStage.Done\" class=\"text-sm text-muted-foreground\">\n {{\n t(\n 'ChangePasswordForm.required',\n 'Your password no longer meets the rules here. Choose a new one, then sign in with it.',\n )\n }}\n </p>\n\n <template v-if=\"stage === ChangePasswordStage.Idle\">\n <FailureAlert :failure=\"startFailure\" />\n <Button type=\"button\" is-full-width :is-loading=\"isStarting\" @click=\"start\">\n {{ t('ChangePasswordForm.start', 'Change the password') }}\n </Button>\n </template>\n\n <template v-else-if=\"stage === ChangePasswordStage.LinkSent\">\n <AlertSimple v-if=\"started?.isSent\" severity=\"info\">\n {{ t('ChangePasswordForm.linkSent', 'We sent you a link to change the password. Open it to continue.') }}\n </AlertSimple>\n <AlertSimple v-else severity=\"warning\">\n {{ t('ChangePasswordForm.linkNotSent', 'We could not send the link. Try again in a minute.') }}\n </AlertSimple>\n <FailureAlert :failure=\"startFailure\" />\n <Button type=\"button\" variant=\"outline\" tone=\"neutral\" :is-loading=\"isStarting\" @click=\"start\">\n {{ t('ChangePasswordForm.resendLink', 'Send the link again') }}\n </Button>\n </template>\n\n <form\n v-else-if=\"stage === ChangePasswordStage.Form\"\n class=\"flex flex-col gap-4\"\n novalidate\n @submit=\"form.handleSubmit\"\n >\n <template v-if=\"isCodeRequired\">\n <AlertSimple v-if=\"started?.isSent\" severity=\"info\">\n {{ t('ChangePasswordForm.codeSent', 'We sent you a code. Enter it beside the new password.') }}\n </AlertSimple>\n <AlertSimple v-else severity=\"warning\">\n {{ t('ChangePasswordForm.codeNotSent', 'We could not send a code. Try again in a minute.') }}\n </AlertSimple>\n </template>\n <form.Field v-if=\"!token && !ticket\" v-slot=\"field\" name=\"currentPassword\" is-required>\n <Field :label=\"t('ChangePasswordForm.currentPassword', 'Current password')\">\n <PasswordInput\n v-model=\"field.value\"\n name=\"currentPassword\"\n autocomplete=\"current-password\"\n @blur=\"field.onBlur\"\n />\n </Field>\n </form.Field>\n <form.Field v-slot=\"field\" name=\"newPassword\" is-required>\n <Field :label=\"t('ChangePasswordForm.newPassword', 'New password')\">\n <PasswordInput v-model=\"field.value\" name=\"newPassword\" autocomplete=\"new-password\" @blur=\"field.onBlur\" />\n </Field>\n </form.Field>\n <form.Field v-if=\"isCodeRequired\" v-slot=\"field\" name=\"code\" is-required>\n <Field :label=\"t('ChangePasswordForm.code', 'Code')\">\n <TextInput\n v-model=\"field.value\"\n name=\"code\"\n inputmode=\"numeric\"\n autocomplete=\"one-time-code\"\n @blur=\"field.onBlur\"\n />\n </Field>\n </form.Field>\n <FailureAlert :failure=\"form.state.submitError\" />\n <FailureAlert :failure=\"startFailure\" />\n <Button type=\"submit\" is-full-width :is-loading=\"form.state.isSubmitting\">\n {{ t('ChangePasswordForm.submit', 'Change the password') }}\n </Button>\n <Button\n v-if=\"isCodeRequired\"\n type=\"button\"\n variant=\"ghost\"\n tone=\"neutral\"\n :is-loading=\"isStarting\"\n @click=\"start\"\n >\n {{ t('ChangePasswordForm.resendCode', 'Send a new code') }}\n </Button>\n </form>\n\n <AlertSimple v-else severity=\"success\">\n {{ t('ChangePasswordForm.done', 'Your password is changed.') }}\n </AlertSimple>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { Button } from '@wow-two-beta/fe/presentation/actions';\nimport { AlertSimple } from '@wow-two-beta/fe/presentation/feedback';\nimport { EmailInput, Field } from '@wow-two-beta/fe/presentation/forms';\nimport { shallowRef } from 'vue';\nimport type { AccountClient } from '../../../account';\nimport { useAccountClient, useAccountForm, useAccountText } from '../../../account/hooks';\nimport { FailureAlert } from '../../feedback/failureAlert';\n\n/** Sends a password reset link to an email; it says the same whether or not an account uses it. */\ndefineOptions({ name: 'ForgotPasswordForm' });\n\nconst props = withDefaults(\n defineProps<{\n /** The account API to call; built from `baseUrl` when omitted. */\n client?: AccountClient;\n /** The service's origin; the consumer's own origin when omitted. */\n baseUrl?: string;\n /** The email the field starts with. */\n initialEmail?: string;\n }>(),\n { client: undefined, baseUrl: undefined, initialEmail: '' },\n);\n\nconst emit = defineEmits<{\n /** Fires once the reset email is requested. */\n sent: [email: string];\n}>();\n\nconst client = useAccountClient(props);\nconst t = useAccountText();\nconst sentTo = shallowRef<string | null>(null);\n\nconst form = useAccountForm({\n defaultValues: { email: props.initialEmail },\n onSubmit: async (values, { signal }) => {\n const result = await client.forgotPassword(values, signal);\n if (result.ok) {\n sentTo.value = values.email;\n emit('sent', values.email);\n }\n return result;\n },\n});\n</script>\n\n<template>\n <AlertSimple v-if=\"sentTo\" severity=\"success\">\n {{\n t('ForgotPasswordForm.sent', 'If an account uses {email}, we sent it a link to reset the password.', {\n email: sentTo,\n })\n }}\n </AlertSimple>\n <form v-else class=\"flex flex-col gap-4\" novalidate @submit=\"form.handleSubmit\">\n <form.Field v-slot=\"field\" name=\"email\" is-required>\n <Field :label=\"t('ForgotPasswordForm.email', 'Email')\">\n <EmailInput v-model=\"field.value\" name=\"email\" autocomplete=\"email\" @blur=\"field.onBlur\" />\n </Field>\n </form.Field>\n <FailureAlert :failure=\"form.state.submitError\" />\n <Button type=\"submit\" is-full-width :is-loading=\"form.state.isSubmitting\">\n {{ t('ForgotPasswordForm.submit', 'Send the reset link') }}\n </Button>\n </form>\n</template>\n","<script setup lang=\"ts\">\nimport { Button } from '@wow-two-beta/fe/presentation/actions';\nimport { AlertSimple } from '@wow-two-beta/fe/presentation/feedback';\nimport { Field, PasswordInput, TextInput } from '@wow-two-beta/fe/presentation/forms';\nimport { shallowRef } from 'vue';\nimport type { PasswordChangeRequiredDto } from '../../../../contracts';\nimport type { AccountClient } from '../../../account';\nimport { useAccountClient, useAccountForm, useAccountText } from '../../../account/hooks';\nimport { FailureAlert } from '../../feedback/failureAlert';\n\n/** Signs a person in with an identifier and password, by cookie session — on the hosted page or embedded in a product. */\ndefineOptions({ name: 'PasswordSignIn' });\n\nconst props = withDefaults(\n defineProps<{\n /** The account API to call; built from `baseUrl` when omitted. */\n client?: AccountClient;\n /** The service's origin; the consumer's own origin when omitted. */\n baseUrl?: string;\n /** The OIDC client the sign-in serves, recorded by the sign-in log. */\n clientId?: string | null;\n /** Where \"Forgot your password?\" leads; no link when omitted. */\n forgotPasswordHref?: string;\n /** The identifier the field starts with. */\n initialIdentifier?: string;\n }>(),\n { client: undefined, baseUrl: undefined, clientId: null, forgotPasswordHref: undefined, initialIdentifier: '' },\n);\n\nconst emit = defineEmits<{\n /** Fires once the session cookie is set. */\n signedIn: [];\n /** Fires when the password matched but breaks the current rules: no session, only the change's ticket. */\n passwordChangeRequired: [required: PasswordChangeRequiredDto];\n}>();\n\nconst client = useAccountClient(props);\nconst t = useAccountText();\n/** The email of an account that must confirm it before signing in, when the identifier was one. */\nconst unconfirmedEmail = shallowRef<string | null>(null);\nconst isResent = shallowRef(false);\nconst isResending = shallowRef(false);\n\nconst form = useAccountForm({\n defaultValues: { identifier: props.initialIdentifier, password: '' },\n onSubmit: async (values, { signal }) => {\n unconfirmedEmail.value = null;\n isResent.value = false;\n const result = await client.signIn(values, { clientId: props.clientId, signal });\n if (result.ok) {\n if (result.value) emit('passwordChangeRequired', result.value);\n else emit('signedIn');\n } else if (result.failure.status === 403 && values.identifier.includes('@')) {\n unconfirmedEmail.value = values.identifier;\n }\n return result;\n },\n});\n\nasync function resendConfirmation() {\n if (!unconfirmedEmail.value) return;\n isResending.value = true;\n const result = await client.resendConfirmationEmail({ email: unconfirmedEmail.value });\n isResending.value = false;\n isResent.value = result.ok;\n}\n</script>\n\n<template>\n <form class=\"flex flex-col gap-4\" novalidate @submit=\"form.handleSubmit\">\n <form.Field v-slot=\"field\" name=\"identifier\" is-required>\n <Field :label=\"t('PasswordSignIn.identifier', 'Email or user name')\">\n <TextInput v-model=\"field.value\" name=\"identifier\" autocomplete=\"username\" @blur=\"field.onBlur\" />\n </Field>\n </form.Field>\n <form.Field v-slot=\"field\" name=\"password\" is-required>\n <Field :label=\"t('PasswordSignIn.password', 'Password')\">\n <PasswordInput v-model=\"field.value\" name=\"password\" autocomplete=\"current-password\" @blur=\"field.onBlur\" />\n </Field>\n </form.Field>\n <a\n v-if=\"forgotPasswordHref\"\n :href=\"forgotPasswordHref\"\n class=\"-mt-2 self-end text-sm text-primary underline-offset-4 hover:underline\"\n >\n {{ t('PasswordSignIn.forgotPassword', 'Forgot your password?') }}\n </a>\n <FailureAlert :failure=\"form.state.submitError\" />\n <template v-if=\"unconfirmedEmail\">\n <AlertSimple v-if=\"isResent\" severity=\"success\">\n {{\n t('PasswordSignIn.confirmationResent', 'We sent the confirmation link to {email} again.', {\n email: unconfirmedEmail,\n })\n }}\n </AlertSimple>\n <Button\n v-else\n type=\"button\"\n variant=\"outline\"\n tone=\"neutral\"\n :is-loading=\"isResending\"\n @click=\"resendConfirmation\"\n >\n {{ t('PasswordSignIn.resendConfirmation', 'Send the confirmation email again') }}\n </Button>\n </template>\n <Button type=\"submit\" is-full-width :is-loading=\"form.state.isSubmitting\">\n {{ t('PasswordSignIn.submit', 'Sign in') }}\n </Button>\n </form>\n</template>\n","/** Defines where a phone sign-in stands. */\nexport const PhoneSignInStep = {\n /** Refers to entering the phone a code goes to. */\n Phone: 'phone',\n /** Refers to opening the Telegram bot and sharing the contact, after which the bot sends the code. */\n Telegram: 'telegram',\n /** Refers to entering the code. */\n Code: 'code',\n} as const;\nexport type PhoneSignInStep = (typeof PhoneSignInStep)[keyof typeof PhoneSignInStep];\n","<script setup lang=\"ts\">\nimport { AppErrorFactory, ResultExtensions, type AppError } from '@wow-two-beta/fe/foundation/results';\nimport { Button } from '@wow-two-beta/fe/presentation/actions';\nimport { AlertSimple } from '@wow-two-beta/fe/presentation/feedback';\nimport { Field, PhoneInput, TextInput } from '@wow-two-beta/fe/presentation/forms';\nimport { shallowRef } from 'vue';\nimport type { AccountClient } from '../../../account';\nimport { useAccountClient, useAccountForm, useAccountText } from '../../../account/hooks';\nimport { FailureAlert } from '../../feedback/failureAlert';\nimport { PhoneSignInStep } from './PhoneSignInStep';\n\n/**\n * Signs a person in by a code sent to their phone: the phone first, then the code. A phone with no linked Telegram\n * chat first opens the bot, where sharing the contact links it and brings the code.\n */\ndefineOptions({ name: 'PhoneCodeSignIn' });\n\nconst props = withDefaults(\n defineProps<{\n /** The account API to call; built from `baseUrl` when omitted. */\n client?: AccountClient;\n /** The service's origin; the consumer's own origin when omitted. */\n baseUrl?: string;\n /** The OIDC client the sign-in serves, recorded by the sign-in log. */\n clientId?: string | null;\n /** The ISO codes of the countries a phone may come from, in display order; every country when omitted. */\n countries?: ReadonlyArray<string>;\n /** The ISO code selected first; the first allowed country when omitted. */\n defaultCountry?: string;\n }>(),\n { client: undefined, baseUrl: undefined, clientId: null, countries: undefined, defaultCountry: undefined },\n);\n\nconst emit = defineEmits<{\n /** Fires once the session cookie is set. */\n signedIn: [];\n}>();\n\nconst client = useAccountClient(props);\nconst t = useAccountText();\nconst step = shallowRef<PhoneSignInStep>(PhoneSignInStep.Phone);\n/** The phone the current code was sent to. */\nconst phone = shallowRef('');\nconst telegramLinkUrl = shallowRef<string | null>(null);\nconst isResending = shallowRef(false);\nconst isResent = shallowRef(false);\nconst resendFailure = shallowRef<AppError | null>(null);\n\nconst notSent = () =>\n ResultExtensions.fail({\n ...AppErrorFactory.unavailable(),\n message: t('PhoneCodeSignIn.notSent', 'We could not send a code. Try again in a minute.'),\n });\n\nasync function send(value: string, signal?: AbortSignal) {\n const result = await client.sendPhoneSignInCode({ phone: value }, signal);\n if (!result.ok) return result;\n if (!result.value.isCodeSent && !result.value.telegramLinkUrl) return notSent();\n phone.value = value;\n telegramLinkUrl.value = result.value.telegramLinkUrl;\n return result;\n}\n\nconst phoneForm = useAccountForm({\n defaultValues: { phone: '' },\n onSubmit: async (values, { signal }) => {\n const result = await send(values.phone, signal);\n if (result.ok) {\n codeForm.reset();\n isResent.value = false;\n resendFailure.value = null;\n step.value = telegramLinkUrl.value ? PhoneSignInStep.Telegram : PhoneSignInStep.Code;\n }\n return result;\n },\n});\n\nconst codeForm = useAccountForm({\n defaultValues: { code: '' },\n onSubmit: async (values, { signal }) => {\n const result = await client.signInWithPhone(\n { phone: phone.value, code: values.code.trim() },\n { clientId: props.clientId, signal },\n );\n if (result.ok) emit('signedIn');\n return result;\n },\n});\n\nasync function resend() {\n isResending.value = true;\n isResent.value = false;\n resendFailure.value = null;\n const result = await send(phone.value);\n isResending.value = false;\n if (result.ok) isResent.value = true;\n else resendFailure.value = result.failure;\n}\n\nfunction useAnotherPhone() {\n step.value = PhoneSignInStep.Phone;\n telegramLinkUrl.value = null;\n}\n</script>\n\n<template>\n <form v-if=\"step === PhoneSignInStep.Phone\" class=\"flex flex-col gap-4\" novalidate @submit=\"phoneForm.handleSubmit\">\n <phoneForm.Field v-slot=\"field\" name=\"phone\" is-required>\n <Field :label=\"t('PhoneCodeSignIn.phone', 'Phone number')\">\n <PhoneInput\n v-model=\"field.value\"\n name=\"phone\"\n class=\"w-full [&>span]:shrink-0 [&>span]:whitespace-nowrap\"\n :countries=\"countries\"\n :placeholder=\"t('PhoneCodeSignIn.phonePlaceholder', '')\"\n :default-country=\"defaultCountry\"\n @blur=\"field.onBlur\"\n />\n </Field>\n </phoneForm.Field>\n <FailureAlert :failure=\"phoneForm.state.submitError\" />\n <Button type=\"submit\" is-full-width :is-loading=\"phoneForm.state.isSubmitting\">\n {{ t('PhoneCodeSignIn.send', 'Send a code') }}\n </Button>\n </form>\n\n <div v-else-if=\"step === PhoneSignInStep.Telegram\" class=\"flex flex-col gap-4\">\n <p class=\"text-sm text-muted-foreground\">\n {{\n t(\n 'PhoneCodeSignIn.telegramIntro',\n 'Open our Telegram bot, press Start and share your contact. The bot then sends your code for {phone}.',\n { phone },\n )\n }}\n </p>\n <Button as-child is-full-width>\n <a\n :href=\"telegramLinkUrl ?? undefined\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n @click=\"step = PhoneSignInStep.Code\"\n >\n {{ t('PhoneCodeSignIn.openTelegram', 'Open Telegram') }}\n </a>\n </Button>\n <Button type=\"button\" variant=\"outline\" tone=\"neutral\" is-full-width @click=\"step = PhoneSignInStep.Code\">\n {{ t('PhoneCodeSignIn.haveCode', 'I have the code') }}\n </Button>\n <Button type=\"button\" variant=\"ghost\" tone=\"neutral\" @click=\"useAnotherPhone\">\n {{ t('PhoneCodeSignIn.otherPhone', 'Use another number') }}\n </Button>\n </div>\n\n <form v-else class=\"flex flex-col gap-4\" novalidate @submit=\"codeForm.handleSubmit\">\n <p class=\"text-sm text-muted-foreground\">\n <template v-if=\"telegramLinkUrl\">\n {{ t('PhoneCodeSignIn.codeFromTelegram', 'Enter the code the bot sent you in Telegram.') }}\n <a\n :href=\"telegramLinkUrl\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"text-primary underline-offset-4 hover:underline\"\n >\n {{ t('PhoneCodeSignIn.openTelegramAgain', 'Open Telegram') }}\n </a>\n </template>\n <template v-else>{{ t('PhoneCodeSignIn.codeSent', 'We sent a code to {phone}.', { phone }) }}</template>\n </p>\n <codeForm.Field v-slot=\"field\" name=\"code\" is-required>\n <Field :label=\"t('PhoneCodeSignIn.code', 'Code')\">\n <TextInput\n v-model=\"field.value\"\n name=\"code\"\n inputmode=\"numeric\"\n autocomplete=\"one-time-code\"\n @blur=\"field.onBlur\"\n />\n </Field>\n </codeForm.Field>\n <FailureAlert :failure=\"codeForm.state.submitError\" />\n <FailureAlert :failure=\"resendFailure\" />\n <AlertSimple v-if=\"isResent\" severity=\"success\">\n {{ t('PhoneCodeSignIn.resent', 'We sent a new code.') }}\n </AlertSimple>\n <Button type=\"submit\" is-full-width :is-loading=\"codeForm.state.isSubmitting\">\n {{ t('PhoneCodeSignIn.submit', 'Sign in') }}\n </Button>\n <div class=\"flex flex-wrap justify-between gap-2\">\n <Button type=\"button\" variant=\"ghost\" tone=\"neutral\" :is-loading=\"isResending\" @click=\"resend\">\n {{ t('PhoneCodeSignIn.resend', 'Send a new code') }}\n </Button>\n <Button type=\"button\" variant=\"ghost\" tone=\"neutral\" @click=\"useAnotherPhone\">\n {{ t('PhoneCodeSignIn.otherPhone', 'Use another number') }}\n </Button>\n </div>\n </form>\n</template>\n","<script setup lang=\"ts\">\nimport { Button } from '@wow-two-beta/fe/presentation/actions';\nimport { AlertSimple } from '@wow-two-beta/fe/presentation/feedback';\nimport { Field, PasswordInput } from '@wow-two-beta/fe/presentation/forms';\nimport { shallowRef } from 'vue';\nimport type { AccountClient } from '../../../account';\nimport { useAccountClient, useAccountForm, useAccountText } from '../../../account/hooks';\nimport { FailureAlert } from '../../feedback/failureAlert';\n\n/** Sets a new password with the token a reset email carried. */\ndefineOptions({ name: 'ResetPasswordForm' });\n\nconst props = withDefaults(\n defineProps<{\n /** The account API to call; built from `baseUrl` when omitted. */\n client?: AccountClient;\n /** The service's origin; the consumer's own origin when omitted. */\n baseUrl?: string;\n /** The account email the reset link named. */\n email: string;\n /** The reset token the link carried. */\n token: string;\n /** Where the person signs in once the password is set; no link when omitted. */\n signInHref?: string;\n }>(),\n { client: undefined, baseUrl: undefined, signInHref: undefined },\n);\n\nconst emit = defineEmits<{\n /** Fires once the new password is set. */\n reset: [];\n}>();\n\nconst client = useAccountClient(props);\nconst t = useAccountText();\nconst isReset = shallowRef(false);\n\nconst form = useAccountForm({\n defaultValues: { newPassword: '' },\n onSubmit: async (values, { signal }) => {\n const result = await client.resetPassword(\n { email: props.email, resetToken: props.token, newPassword: values.newPassword },\n signal,\n );\n if (result.ok) {\n isReset.value = true;\n emit('reset');\n }\n return result;\n },\n});\n</script>\n\n<template>\n <div v-if=\"isReset\" class=\"flex flex-col gap-4\">\n <AlertSimple severity=\"success\">{{ t('ResetPasswordForm.done', 'Your password is changed.') }}</AlertSimple>\n <Button v-if=\"signInHref\" as-child is-full-width>\n <a :href=\"signInHref\">{{ t('ResetPasswordForm.signIn', 'Sign in') }}</a>\n </Button>\n </div>\n <form v-else class=\"flex flex-col gap-4\" novalidate @submit=\"form.handleSubmit\">\n <p class=\"text-sm text-muted-foreground\">\n {{ t('ResetPasswordForm.intro', 'Choose a new password for {email}.', { email }) }}\n </p>\n <form.Field v-slot=\"field\" name=\"newPassword\" is-required>\n <Field :label=\"t('ResetPasswordForm.newPassword', 'New password')\">\n <PasswordInput v-model=\"field.value\" name=\"newPassword\" autocomplete=\"new-password\" @blur=\"field.onBlur\" />\n </Field>\n </form.Field>\n <FailureAlert :failure=\"form.state.submitError\" />\n <Button type=\"submit\" is-full-width :is-loading=\"form.state.isSubmitting\">\n {{ t('ResetPasswordForm.submit', 'Set the password') }}\n </Button>\n </form>\n</template>\n","<script setup lang=\"ts\">\nimport { Button } from '@wow-two-beta/fe/presentation/actions';\nimport { AlertSimple } from '@wow-two-beta/fe/presentation/feedback';\nimport { EmailInput, Field, PasswordInput } from '@wow-two-beta/fe/presentation/forms';\nimport { shallowRef } from 'vue';\nimport type { SignedUpAccountDto } from '../../../../contracts';\nimport type { AccountClient } from '../../../account';\nimport { useAccountClient, useAccountForm, useAccountText } from '../../../account/hooks';\nimport { FailureAlert } from '../../feedback/failureAlert';\n\n/** Creates an account with an email and password while the instance keeps sign-up on, then says what comes next. */\ndefineOptions({ name: 'SignUpForm' });\n\nconst props = withDefaults(\n defineProps<{\n /** The account API to call; built from `baseUrl` when omitted. */\n client?: AccountClient;\n /** The service's origin; the consumer's own origin when omitted. */\n baseUrl?: string;\n /** Where the person signs in once the account exists; no link when omitted. */\n signInHref?: string;\n }>(),\n { client: undefined, baseUrl: undefined, signInHref: undefined },\n);\n\nconst emit = defineEmits<{\n /** Fires with the account a sign-up created. */\n signedUp: [account: SignedUpAccountDto];\n}>();\n\nconst client = useAccountClient(props);\nconst t = useAccountText();\nconst created = shallowRef<{ account: SignedUpAccountDto; email: string } | null>(null);\n\nconst form = useAccountForm({\n defaultValues: { email: '', password: '' },\n onSubmit: async (values, { signal }) => {\n const result = await client.signUp(values, signal);\n if (result.ok) {\n created.value = { account: result.value, email: values.email };\n emit('signedUp', result.value);\n }\n return result;\n },\n});\n</script>\n\n<template>\n <div v-if=\"created\" class=\"flex flex-col gap-4\">\n <AlertSimple severity=\"success\">\n <template v-if=\"created.account.isConfirmationSent\">\n {{\n t('SignUpForm.confirmationSent', 'Check your inbox: we sent a link to {email} to confirm the address.', {\n email: created.email,\n })\n }}\n </template>\n <template v-else>{{ t('SignUpForm.created', 'Your account is ready.') }}</template>\n </AlertSimple>\n <Button v-if=\"signInHref\" as-child is-full-width>\n <a :href=\"signInHref\">{{ t('SignUpForm.signIn', 'Sign in') }}</a>\n </Button>\n </div>\n <form v-else class=\"flex flex-col gap-4\" novalidate @submit=\"form.handleSubmit\">\n <form.Field v-slot=\"field\" name=\"email\" is-required>\n <Field :label=\"t('SignUpForm.email', 'Email')\">\n <EmailInput v-model=\"field.value\" name=\"email\" autocomplete=\"email\" @blur=\"field.onBlur\" />\n </Field>\n </form.Field>\n <form.Field v-slot=\"field\" name=\"password\" is-required>\n <Field :label=\"t('SignUpForm.password', 'Password')\">\n <PasswordInput v-model=\"field.value\" name=\"password\" autocomplete=\"new-password\" @blur=\"field.onBlur\" />\n </Field>\n </form.Field>\n <FailureAlert :failure=\"form.state.submitError\" />\n <Button type=\"submit\" is-full-width :is-loading=\"form.state.isSubmitting\">\n {{ t('SignUpForm.submit', 'Create the account') }}\n </Button>\n </form>\n</template>\n"],"names":["text","_createBlock","_unref","useAccountForm","_openBlock","_createElementBlock","_hoisted_1","_hoisted_2","_toDisplayString","_Fragment","_createVNode","FailureAlert","_withCtx","_createElementVNode","_hoisted_3","_createTextVNode"],"mappings":";;;;;;;;;AAgHA,MAAM,kBAAkB,MAAM,iBAAiB,KAAK,kBAAkB,OAAO,UAAU,CAAC;AAExF,SAAS,OAAO,OAA0D;AACxE,SAAO,UAAU,QAAQ,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,KAAK,IACrE,QACD;AACN;AAEA,SAAS,eAAe,OAA6C;AACnE,QAAM,OAAO,OAAO,KAAK;AACzB,MAAI,QAAQ,OAAO,KAAK,WAAW,UAAU;AAC3C,WAAO,iBAAiB,GAAG,EAAE,QAAQ,KAAK,QAAQ,oBAAoB,KAAK,uBAAuB,MAAM;AAAA,EAC1G;AACA,SAAO,gBAAA;AACT;AAEA,SAAS,kBAAkB,OAAyC;AAClE,QAAM,OAAO,OAAO,KAAK;AACzB,MAAI,QAAQ,OAAO,KAAK,WAAW,UAAU;AAC3C,WAAO,iBAAiB,GAAG;AAAA,MACzB,QAAQ,KAAK;AAAA,M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;;;;;QAGlGQ,YAAkDR,MAAAS,WAAA,GAAA;AAAA,UAAnC,SAAST,MAAA,IAAA,EAAK,MAAM;AAAA,QAAA;QACnCQ,YAESR,MAAA,MAAA,GAAA;AAAA,UAFD,MAAK;AAAA,UAAS,iBAAA;AAAA,UAAe,cAAYA,MAAA,IAAA,EAAK,MAAM;AAAA,QAAA;2BAC1D,MAAkD;AAAA,4CAA/CA,MAAA,CAAA,EAAC,qBAAA,oBAAA,CAAA,GAAA,CAAA;AAAA,UAAA;;;;;;;"}
@@ -9,8 +9,8 @@ type __VLS_Props = {
9
9
  clientId?: string | null;
10
10
  /** Where "Forgot your password?" leads; no link when omitted. */
11
11
  forgotPasswordHref?: string;
12
- /** The login the field starts with. */
13
- initialLogin?: string;
12
+ /** The identifier the field starts with. */
13
+ initialIdentifier?: string;
14
14
  };
15
15
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
16
  signedIn: () => any;
@@ -23,6 +23,6 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
23
23
  baseUrl: string;
24
24
  client: AccountClient;
25
25
  forgotPasswordHref: string;
26
- initialLogin: string;
26
+ initialIdentifier: string;
27
27
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
28
  export default _default;
@@ -1,4 +1,4 @@
1
- import type { RegisteredAccountDto } from '../../../../contracts';
1
+ import type { SignedUpAccountDto } from '../../../../contracts';
2
2
  import type { AccountClient } from '../../../account';
3
3
  type __VLS_Props = {
4
4
  /** The account API to call; built from `baseUrl` when omitted. */
@@ -9,9 +9,9 @@ type __VLS_Props = {
9
9
  signInHref?: string;
10
10
  };
11
11
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
- signedUp: (account: RegisteredAccountDto) => any;
12
+ signedUp: (account: SignedUpAccountDto) => any;
13
13
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
14
- onSignedUp?: ((account: RegisteredAccountDto) => any) | undefined;
14
+ onSignedUp?: ((account: SignedUpAccountDto) => any) | undefined;
15
15
  }>, {
16
16
  baseUrl: string;
17
17
  client: AccountClient;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wow-two-beta/fe-identity",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "Identity domain UI: the account API contract, an account client and one embeddable component per sign-in and password step.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1 +0,0 @@
1
- {"version":3,"file":"PasswordChangeConfirmationType-xUIFj0b9.js","sources":["../../src/contracts/AccountRouteConstants.ts","../../src/contracts/PasswordChangeConfirmationType.ts"],"sourcesContent":["/** Mirrors the account API's routes: relative to the service or consumer origin, under the contract's HTTP mirror. */\nexport const AccountRouteConstants = {\n /** The account API's mount point. */\n base: '/api/account',\n /** `POST`: creates an account while sign-up is on. */\n register: '/register',\n /** `POST`: signs in with a login and password. */\n login: '/login',\n /** `GET`: confirms an email with the emailed `userId` and `token`. */\n confirmEmail: '/confirm-email',\n /** `POST`: sends the confirmation email again; always `204`. */\n resendConfirmationEmail: '/resend-confirmation-email',\n /** `POST`: sends a password reset email; always `204`. */\n forgotPassword: '/forgot-password',\n /** `POST`: sets a new password with the emailed reset token. */\n resetPassword: '/reset-password',\n /** `GET`: the signed-in account. */\n manageInfo: '/manage/info',\n /** `POST`: starts a password change, signed in or with a ticket, and answers how it is confirmed. */\n managePasswordConfirmation: '/manage/password/confirmation',\n /** `POST`: changes the password of the signed-in person or of the one a ticket names. */\n managePassword: '/manage/password',\n /** `POST`: changes a password with the one-time token a change link carries; anonymous. */\n passwordChange: '/password/change',\n /** `POST`: sends a phone sign-in code. */\n phoneSignInSend: '/phone-sign-in/send',\n /** `POST`: signs in with a phone and the code sent to it. */\n phoneSignIn: '/phone-sign-in',\n /** `POST`: ends the cookie's session. */\n logout: '/logout',\n /** `GET`, anonymous: the sign-in declaration, the look and the enabled methods with their rules; `?clientId=`, `?locale=`. */\n signInOptions: '/sign-in-options',\n /** The query parameter that asks a sign-in route for a cookie instead of a bearer session. */\n useCookiesParameter: 'useCookies',\n /** The query parameter that names the OIDC client a sign-in serves, for the sign-in log and the app's look. */\n clientIdParameter: 'clientId',\n /** The query parameter that picks the locale of the declaration's messages: `uz`, `ru` or `en`. */\n localeParameter: 'locale',\n} as const;\n","/** Mirrors `PasswordChangeConfirmationType` of the be contract: how a password change is confirmed. */\nexport const PasswordChangeConfirmationType = {\n /** The current password is the only proof; the change form opens at once. */\n None: 'None',\n /** A one-time code, sent to a verified channel, is entered beside the new password. */\n Code: 'Code',\n /** A one-time link, sent to a verified channel, is the only way to the change form. */\n Link: 'Link',\n} as const;\nexport type PasswordChangeConfirmationType =\n (typeof PasswordChangeConfirmationType)[keyof typeof PasswordChangeConfirmationType];\n"],"names":[],"mappings":"AACO,MAAM,wBAAwB;AAAA;AAAA,EAEnC,MAAM;AAAA;AAAA,EAEN,UAAU;AAAA;AAAA,EAEV,OAAO;AAAA;AAAA,EAEP,cAAc;AAAA;AAAA,EAEd,yBAAyB;AAAA;AAAA,EAEzB,gBAAgB;AAAA;AAAA,EAEhB,eAAe;AAAA;AAAA,EAEf,YAAY;AAAA;AAAA,EAEZ,4BAA4B;AAAA;AAAA,EAE5B,gBAAgB;AAAA;AAAA,EAEhB,gBAAgB;AAAA;AAAA,EAEhB,iBAAiB;AAAA;AAAA,EAEjB,aAAa;AAAA;AAAA,EAEb,QAAQ;AAAA;AAAA,EAER,eAAe;AAAA;AAAA,EAEf,qBAAqB;AAAA;AAAA,EAErB,mBAAmB;AAAA;AAAA,EAEnB,iBAAiB;AACnB;ACrCO,MAAM,iCAAiC;AAAA;AAAA,EAE5C,MAAM;AAAA;AAAA,EAEN,MAAM;AAAA;AAAA,EAEN,MAAM;AACR;"}
@@ -1,9 +0,0 @@
1
- /** Mirrors `RegisterAccountApiRequest` of the be contract: registers an account with an email and password. */
2
- export interface RegisterAccountApiRequest {
3
- /** The account email. */
4
- readonly email: string;
5
- /** The initial password. */
6
- readonly password: string;
7
- /** The login name; the email when omitted. */
8
- readonly userName?: string;
9
- }