@baliola/auth-sdk 0.4.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.md +17 -2
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +1 -1
- package/dist/{client-DU_DerYi.js → client-DxhQkQcE.js} +1 -1
- package/dist/{index-B2RuGLX_.d.ts → index-URk8yf8l.d.ts} +20 -19
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/requests-jRLgNXyf.d.ts +75 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/wallet/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/requests-eTORIjY5.d.ts +0 -42
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@baliola/auth-sdk` are documented here.
|
|
4
4
|
|
|
5
|
+
## 0.5.0
|
|
6
|
+
|
|
7
|
+
- feat(types): `auth.getProfile()` now returns `account.hasPassword`, a boolean
|
|
8
|
+
that is `true` when the account can sign in with a password and `false` for
|
|
9
|
+
Google-only or code-only accounts. Use it to decide between
|
|
10
|
+
`emailPassword.setPassword` and `emailPassword.changePassword`. `ProfileResult.account`
|
|
11
|
+
is typed as the new exported `ProfileAccount` (`Account & { hasPassword }`);
|
|
12
|
+
`Account` itself is unchanged. Requires baliola-auth with `hasPassword` on
|
|
13
|
+
`GET /profile`.
|
|
14
|
+
- feat(client): `auth.google.login` accepts `{ code }` in addition to
|
|
15
|
+
`{ idToken }`. `code` is the authorization code from Google's OAuth popup
|
|
16
|
+
code flow (`google.accounts.oauth2.initCodeClient`, `ux_mode: 'popup'`), which
|
|
17
|
+
the server exchanges for the ID token with its client secret.
|
|
18
|
+
`LoginWithGoogleInput` is now `{ idToken: string } | { code: string }`. The
|
|
19
|
+
server answers `invalid_google_code` (401) when the exchange fails and
|
|
20
|
+
`google_code_unsupported` (400) when it has no client secret configured; both
|
|
21
|
+
surface as `AuthError` with `code` preserved.
|
|
22
|
+
- types: `Profile`, `ProfileAccount`, and `ProfileResult` are now also exported
|
|
23
|
+
from the `./types` subpath, matching the root entry.
|
|
24
|
+
|
|
5
25
|
## 0.4.1
|
|
6
26
|
|
|
7
27
|
- chore(sdk): internal cleanup, no public API change. Removed dead code (the
|
package/README.md
CHANGED
|
@@ -99,8 +99,12 @@ auth.emailPassword.changePassword({ currentPassword, newPassword });
|
|
|
99
99
|
### `auth.google`
|
|
100
100
|
|
|
101
101
|
```ts
|
|
102
|
-
// idToken
|
|
102
|
+
// idToken comes from the Google Identity Services button or One Tap.
|
|
103
103
|
auth.google.login({ idToken }); // → AuthSession
|
|
104
|
+
|
|
105
|
+
// code comes from the OAuth popup code flow (google.accounts.oauth2.initCodeClient).
|
|
106
|
+
// The server exchanges it for the ID token with its client secret.
|
|
107
|
+
auth.google.login({ code }); // → AuthSession
|
|
104
108
|
```
|
|
105
109
|
|
|
106
110
|
### Custodial wallet (smart-account signer)
|
|
@@ -123,8 +127,10 @@ The private key never leaves baliola-auth; `owner.signMessage({ raw })` calls `P
|
|
|
123
127
|
|
|
124
128
|
```ts
|
|
125
129
|
const { account, profile } = await auth.getProfile(); // GET /profile (authenticated)
|
|
126
|
-
// account = { id, email, status }
|
|
130
|
+
// account = { id, email, status, hasPassword } (status is live, not a token-time snapshot)
|
|
127
131
|
// profile = { displayName, avatarUrl, primaryEmail, primaryPhone } | null
|
|
132
|
+
|
|
133
|
+
// hasPassword is false for Google-only or code-only accounts: offer setPassword, not changePassword.
|
|
128
134
|
```
|
|
129
135
|
|
|
130
136
|
### Session lifecycle
|
|
@@ -317,6 +323,15 @@ if (session) {
|
|
|
317
323
|
}
|
|
318
324
|
```
|
|
319
325
|
|
|
326
|
+
**`auth.getProfile` success (`ProfileResult`):**
|
|
327
|
+
|
|
328
|
+
```json
|
|
329
|
+
{
|
|
330
|
+
"account": { "id": "...", "email": "user@example.com", "status": "active", "hasPassword": true },
|
|
331
|
+
"profile": { "displayName": "Ada", "avatarUrl": null, "primaryEmail": "user@example.com", "primaryPhone": null }
|
|
332
|
+
}
|
|
333
|
+
```
|
|
334
|
+
|
|
320
335
|
**Verify-code failure (e.g. `OtpInvalidError`):**
|
|
321
336
|
|
|
322
337
|
```json
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as GoogleNamespace, c as WalletNamespace,
|
|
1
|
+
import { a as GoogleNamespace, c as WalletNamespace, i as EmailPasswordNamespace, l as createAuthClient, n as CreateAuthClientOptions, o as ProactiveRefreshConfig, r as EmailOtpNamespace, s as SubscribeOptions, t as AuthClient, u as AuthFetchInit } from "../index-URk8yf8l.js";
|
|
2
2
|
export { AuthClient, AuthFetchInit, CreateAuthClientOptions, EmailOtpNamespace, EmailPasswordNamespace, GoogleNamespace, ProactiveRefreshConfig, SubscribeOptions, WalletNamespace, createAuthClient };
|
package/dist/client/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createAuthClient } from "../client-
|
|
1
|
+
import { t as createAuthClient } from "../client-DxhQkQcE.js";
|
|
2
2
|
export { createAuthClient };
|
|
@@ -130,7 +130,7 @@ function createMethods(ctx) {
|
|
|
130
130
|
path: "/auth/google/login",
|
|
131
131
|
method: "POST",
|
|
132
132
|
authMode: "none",
|
|
133
|
-
body: withClientId({ idToken: input.idToken })
|
|
133
|
+
body: withClientId("idToken" in input ? { idToken: input.idToken } : { code: input.code })
|
|
134
134
|
}));
|
|
135
135
|
},
|
|
136
136
|
/** wallet.* */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as ResendCodeResult, l as SendLoginCodeResult, n as AuthSession, r as ErrorHandler, s as RegisterResult,
|
|
1
|
+
import { c as ResendCodeResult, l as SendLoginCodeResult, n as AuthSession, r as ErrorHandler, s as RegisterResult, u as SessionChangeHandler } from "./session-Cs_P7ojF.js";
|
|
2
2
|
import { n as SessionStore } from "./sessionStore-BDdEpbL8.js";
|
|
3
|
-
import { a as RegisterInput, c as SendLoginCodeInput, d as VerifyRegistrationCodeInput, i as LoginWithPasswordInput, l as SetPasswordInput, n as ChangePasswordInput, o as ResendLoginCodeInput, r as LoginWithGoogleInput, s as ResendRegistrationCodeInput, u as VerifyLoginCodeInput } from "./requests-
|
|
3
|
+
import { a as RegisterInput, c as SendLoginCodeInput, d as VerifyRegistrationCodeInput, i as LoginWithPasswordInput, l as SetPasswordInput, m as ProfileResult, n as ChangePasswordInput, o as ResendLoginCodeInput, r as LoginWithGoogleInput, s as ResendRegistrationCodeInput, u as VerifyLoginCodeInput } from "./requests-jRLgNXyf.js";
|
|
4
4
|
|
|
5
5
|
//#region src/client/transport.d.ts
|
|
6
6
|
type FetchLike = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
|
|
@@ -26,20 +26,6 @@ type AuthFetchInit = RequestInit & {
|
|
|
26
26
|
disableRefresh?: boolean;
|
|
27
27
|
};
|
|
28
28
|
//#endregion
|
|
29
|
-
//#region src/types/profile.d.ts
|
|
30
|
-
/** The account's profile record; every field is user-editable and nullable. */
|
|
31
|
-
type Profile = {
|
|
32
|
-
displayName: string | null;
|
|
33
|
-
avatarUrl: string | null;
|
|
34
|
-
primaryEmail: string | null;
|
|
35
|
-
primaryPhone: string | null;
|
|
36
|
-
};
|
|
37
|
-
/** Result of `auth.getProfile` — identity read for the token holder. */
|
|
38
|
-
type ProfileResult = {
|
|
39
|
-
/** `status` is the live account status, not a token-time snapshot. */account: Account; /** `null` when the account has no profile row yet. */
|
|
40
|
-
profile: Profile | null;
|
|
41
|
-
};
|
|
42
|
-
//#endregion
|
|
43
29
|
//#region src/client/index.d.ts
|
|
44
30
|
type ProactiveRefreshConfig = false | {
|
|
45
31
|
/** Refresh proactively if `expiresAt - now < leadTimeMs`. Defaults to 60_000 (60s). */leadTimeMs?: number;
|
|
@@ -131,6 +117,19 @@ type EmailPasswordNamespace = {
|
|
|
131
117
|
};
|
|
132
118
|
/** Google flow. */
|
|
133
119
|
type GoogleNamespace = {
|
|
120
|
+
/**
|
|
121
|
+
* Sign in with Google. Pass `{ idToken }` from the Google Identity Services
|
|
122
|
+
* button or One Tap, or `{ code }` from the OAuth popup code flow
|
|
123
|
+
* (`google.accounts.oauth2.initCodeClient`), which the server exchanges
|
|
124
|
+
* for the ID token using its client secret.
|
|
125
|
+
*
|
|
126
|
+
* @throws AuthError with code `invalid_google_code` (401) when the exchange
|
|
127
|
+
* fails, `google_code_unsupported` (400) when the server has no
|
|
128
|
+
* client secret configured, AccountSuspendedError, AuthError.
|
|
129
|
+
* @example
|
|
130
|
+
* await auth.google.login({ idToken });
|
|
131
|
+
* await auth.google.login({ code });
|
|
132
|
+
*/
|
|
134
133
|
login(input: LoginWithGoogleInput): Promise<AuthSession>;
|
|
135
134
|
};
|
|
136
135
|
/** Custodial wallet (Console tier). */
|
|
@@ -144,8 +143,10 @@ type AuthClient = {
|
|
|
144
143
|
google: GoogleNamespace;
|
|
145
144
|
wallet: WalletNamespace;
|
|
146
145
|
/**
|
|
147
|
-
* Fetch the token holder's identity: account (id, email, live status
|
|
148
|
-
* its profile record (`profile: null` when none exists
|
|
146
|
+
* Fetch the token holder's identity: account (id, email, live status,
|
|
147
|
+
* `hasPassword`) plus its profile record (`profile: null` when none exists
|
|
148
|
+
* yet). Use `account.hasPassword` to choose between
|
|
149
|
+
* `emailPassword.setPassword` and `emailPassword.changePassword`.
|
|
149
150
|
*
|
|
150
151
|
* @throws AuthError on 401 (missing/expired session) and other API errors.
|
|
151
152
|
*/
|
|
@@ -166,4 +167,4 @@ type AuthClient = {
|
|
|
166
167
|
};
|
|
167
168
|
declare function createAuthClient(options: CreateAuthClientOptions): AuthClient;
|
|
168
169
|
//#endregion
|
|
169
|
-
export { GoogleNamespace as a, WalletNamespace as c,
|
|
170
|
+
export { GoogleNamespace as a, WalletNamespace as c, EmailPasswordNamespace as i, createAuthClient as l, CreateAuthClientOptions as n, ProactiveRefreshConfig as o, EmailOtpNamespace as r, SubscribeOptions as s, AuthClient as t, AuthFetchInit as u };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as OtpInfo, c as ResendCodeResult, i as ErrorSource, l as SendLoginCodeResult, n as AuthSession, o as Project, r as ErrorHandler, s as RegisterResult, t as Account, u as SessionChangeHandler } from "./session-Cs_P7ojF.js";
|
|
2
|
-
import { a as GoogleNamespace, c as WalletNamespace,
|
|
2
|
+
import { a as GoogleNamespace, c as WalletNamespace, i as EmailPasswordNamespace, l as createAuthClient, n as CreateAuthClientOptions, o as ProactiveRefreshConfig, r as EmailOtpNamespace, s as SubscribeOptions, t as AuthClient, u as AuthFetchInit } from "./index-URk8yf8l.js";
|
|
3
3
|
import { i as memoryStore, n as SessionStore, r as localStorageStore, t as LocalStorageStoreOptions } from "./sessionStore-BDdEpbL8.js";
|
|
4
|
-
import { a as RegisterInput, c as SendLoginCodeInput, d as VerifyRegistrationCodeInput, i as LoginWithPasswordInput, l as SetPasswordInput, n as ChangePasswordInput, o as ResendLoginCodeInput, r as LoginWithGoogleInput, s as ResendRegistrationCodeInput, t as CaptchaArgs, u as VerifyLoginCodeInput } from "./requests-
|
|
4
|
+
import { a as RegisterInput, c as SendLoginCodeInput, d as VerifyRegistrationCodeInput, f as Profile, i as LoginWithPasswordInput, l as SetPasswordInput, m as ProfileResult, n as ChangePasswordInput, o as ResendLoginCodeInput, p as ProfileAccount, r as LoginWithGoogleInput, s as ResendRegistrationCodeInput, t as CaptchaArgs, u as VerifyLoginCodeInput } from "./requests-jRLgNXyf.js";
|
|
5
5
|
import { _ as authErrorFromFetchFailure, a as EmailAlreadyHasPasswordError, c as InvalidPasswordError, d as NoPasswordSetError, f as NoPendingOtpError, g as ResendCooldownError, h as RateLimitedError, i as CaptchaFailedError, l as MaxAttemptsError, m as OtpInvalidError, n as AuthError, o as InvalidCredentialsError, p as OtpExpiredError, r as AuthErrorInit, s as InvalidEmailError, t as AccountSuspendedError, u as MaxResendsError, v as authErrorFromResponse } from "./authError-DgPEjTfW.js";
|
|
6
6
|
import { n as AccessTokenPayloadProject, t as AccessTokenPayload } from "./tokens-BXrPLi5B.js";
|
|
7
7
|
|
|
@@ -16,4 +16,4 @@ type SignHashResult = {
|
|
|
16
16
|
address: string;
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
19
|
-
export { type AccessTokenPayload, type AccessTokenPayloadProject, type Account, AccountSuspendedError, type AuthClient, AuthError, type AuthErrorInit, type AuthFetchInit, type AuthSession, type CaptchaArgs, CaptchaFailedError, type ChangePasswordInput, type CreateAuthClientOptions, EmailAlreadyHasPasswordError, type EmailOtpNamespace, type EmailPasswordNamespace, type ErrorHandler, type ErrorSource, type GoogleNamespace, InvalidCredentialsError, InvalidEmailError, InvalidPasswordError, type LocalStorageStoreOptions, type LoginWithGoogleInput, type LoginWithPasswordInput, MaxAttemptsError, MaxResendsError, NoPasswordSetError, NoPendingOtpError, OtpExpiredError, type OtpInfo, OtpInvalidError, type ProactiveRefreshConfig, type Profile, type ProfileResult, type Project, RateLimitedError, type RegisterInput, type RegisterResult, type ResendCodeResult, ResendCooldownError, type ResendLoginCodeInput, type ResendRegistrationCodeInput, type SendLoginCodeInput, type SendLoginCodeResult, type SessionChangeHandler, type SessionStore, type SetPasswordInput, type SignHashResult, type SubscribeOptions, type VerifyLoginCodeInput, type VerifyRegistrationCodeInput, type WalletAddressResult, type WalletNamespace, authErrorFromFetchFailure, authErrorFromResponse, createAuthClient, localStorageStore, memoryStore };
|
|
19
|
+
export { type AccessTokenPayload, type AccessTokenPayloadProject, type Account, AccountSuspendedError, type AuthClient, AuthError, type AuthErrorInit, type AuthFetchInit, type AuthSession, type CaptchaArgs, CaptchaFailedError, type ChangePasswordInput, type CreateAuthClientOptions, EmailAlreadyHasPasswordError, type EmailOtpNamespace, type EmailPasswordNamespace, type ErrorHandler, type ErrorSource, type GoogleNamespace, InvalidCredentialsError, InvalidEmailError, InvalidPasswordError, type LocalStorageStoreOptions, type LoginWithGoogleInput, type LoginWithPasswordInput, MaxAttemptsError, MaxResendsError, NoPasswordSetError, NoPendingOtpError, OtpExpiredError, type OtpInfo, OtpInvalidError, type ProactiveRefreshConfig, type Profile, type ProfileAccount, type ProfileResult, type Project, RateLimitedError, type RegisterInput, type RegisterResult, type ResendCodeResult, ResendCooldownError, type ResendLoginCodeInput, type ResendRegistrationCodeInput, type SendLoginCodeInput, type SendLoginCodeResult, type SessionChangeHandler, type SessionStore, type SetPasswordInput, type SignHashResult, type SubscribeOptions, type VerifyLoginCodeInput, type VerifyRegistrationCodeInput, type WalletAddressResult, type WalletNamespace, authErrorFromFetchFailure, authErrorFromResponse, createAuthClient, localStorageStore, memoryStore };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as createAuthClient } from "./client-
|
|
1
|
+
import { t as createAuthClient } from "./client-DxhQkQcE.js";
|
|
2
2
|
import { _ as authErrorFromResponse, a as InvalidCredentialsError, c as MaxAttemptsError, d as NoPendingOtpError, f as OtpExpiredError, g as authErrorFromFetchFailure, h as ResendCooldownError, i as EmailAlreadyHasPasswordError, l as MaxResendsError, m as RateLimitedError, n as AuthError, o as InvalidEmailError, p as OtpInvalidError, r as CaptchaFailedError, s as InvalidPasswordError, t as AccountSuspendedError, u as NoPasswordSetError } from "./authError-CYUAl2Jt.js";
|
|
3
3
|
import { n as memoryStore, t as localStorageStore } from "./sessionStore-DD6lON9W.js";
|
|
4
4
|
export { AccountSuspendedError, AuthError, CaptchaFailedError, EmailAlreadyHasPasswordError, InvalidCredentialsError, InvalidEmailError, InvalidPasswordError, MaxAttemptsError, MaxResendsError, NoPasswordSetError, NoPendingOtpError, OtpExpiredError, OtpInvalidError, RateLimitedError, ResendCooldownError, authErrorFromFetchFailure, authErrorFromResponse, createAuthClient, localStorageStore, memoryStore };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { t as Account } from "./session-Cs_P7ojF.js";
|
|
2
|
+
|
|
3
|
+
//#region src/types/profile.d.ts
|
|
4
|
+
/** The account's profile record; every field is user-editable and nullable. */
|
|
5
|
+
type Profile = {
|
|
6
|
+
displayName: string | null;
|
|
7
|
+
avatarUrl: string | null;
|
|
8
|
+
primaryEmail: string | null;
|
|
9
|
+
primaryPhone: string | null;
|
|
10
|
+
};
|
|
11
|
+
/** The account as returned by `auth.getProfile`, with sign-in capability flags. */
|
|
12
|
+
type ProfileAccount = Account & {
|
|
13
|
+
/**
|
|
14
|
+
* `true` when the account can sign in with a password; `false` for
|
|
15
|
+
* Google-only or code-only accounts, which should call
|
|
16
|
+
* `auth.emailPassword.setPassword` rather than `changePassword`.
|
|
17
|
+
*/
|
|
18
|
+
hasPassword: boolean;
|
|
19
|
+
};
|
|
20
|
+
/** Result of `auth.getProfile`, the identity read for the token holder. */
|
|
21
|
+
type ProfileResult = {
|
|
22
|
+
/** `status` is the live account status, not a token-time snapshot. */account: ProfileAccount; /** `null` when the account has no profile row yet. */
|
|
23
|
+
profile: Profile | null;
|
|
24
|
+
};
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/types/requests.d.ts
|
|
27
|
+
/** Optional captcha argument shared by every public unauthenticated entrypoint. */
|
|
28
|
+
type CaptchaArgs = {
|
|
29
|
+
/** Cloudflare Turnstile token. Required when captcha is enabled on the server. */captchaToken?: string;
|
|
30
|
+
};
|
|
31
|
+
type SendLoginCodeInput = {
|
|
32
|
+
email: string;
|
|
33
|
+
} & CaptchaArgs;
|
|
34
|
+
type VerifyLoginCodeInput = {
|
|
35
|
+
email: string;
|
|
36
|
+
code: string;
|
|
37
|
+
};
|
|
38
|
+
type ResendLoginCodeInput = {
|
|
39
|
+
email: string;
|
|
40
|
+
} & CaptchaArgs;
|
|
41
|
+
type RegisterInput = {
|
|
42
|
+
email: string;
|
|
43
|
+
password: string;
|
|
44
|
+
} & CaptchaArgs;
|
|
45
|
+
type VerifyRegistrationCodeInput = {
|
|
46
|
+
email: string;
|
|
47
|
+
code: string;
|
|
48
|
+
};
|
|
49
|
+
type ResendRegistrationCodeInput = {
|
|
50
|
+
email: string;
|
|
51
|
+
} & CaptchaArgs;
|
|
52
|
+
type LoginWithPasswordInput = {
|
|
53
|
+
email: string;
|
|
54
|
+
password: string;
|
|
55
|
+
} & CaptchaArgs;
|
|
56
|
+
type SetPasswordInput = {
|
|
57
|
+
password: string;
|
|
58
|
+
};
|
|
59
|
+
type ChangePasswordInput = {
|
|
60
|
+
currentPassword: string;
|
|
61
|
+
newPassword: string;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Exactly one of the two shapes. `idToken` comes from Google Identity Services
|
|
65
|
+
* (`renderButton` / One Tap). `code` is the authorization code from
|
|
66
|
+
* `google.accounts.oauth2.initCodeClient` in popup mode; the server exchanges
|
|
67
|
+
* it for the ID token, so the client secret never reaches the browser.
|
|
68
|
+
*/
|
|
69
|
+
type LoginWithGoogleInput = {
|
|
70
|
+
idToken: string;
|
|
71
|
+
} | {
|
|
72
|
+
code: string;
|
|
73
|
+
};
|
|
74
|
+
//#endregion
|
|
75
|
+
export { RegisterInput as a, SendLoginCodeInput as c, VerifyRegistrationCodeInput as d, Profile as f, LoginWithPasswordInput as i, SetPasswordInput as l, ProfileResult as m, ChangePasswordInput as n, ResendLoginCodeInput as o, ProfileAccount as p, LoginWithGoogleInput as r, ResendRegistrationCodeInput as s, CaptchaArgs as t, VerifyLoginCodeInput as u };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { a as OtpInfo, c as ResendCodeResult, i as ErrorSource, l as SendLoginCodeResult, n as AuthSession, o as Project, r as ErrorHandler, s as RegisterResult, t as Account, u as SessionChangeHandler } from "../session-Cs_P7ojF.js";
|
|
2
|
-
import { a as RegisterInput, c as SendLoginCodeInput, d as VerifyRegistrationCodeInput, i as LoginWithPasswordInput, l as SetPasswordInput, n as ChangePasswordInput, o as ResendLoginCodeInput, r as LoginWithGoogleInput, s as ResendRegistrationCodeInput, t as CaptchaArgs, u as VerifyLoginCodeInput } from "../requests-
|
|
2
|
+
import { a as RegisterInput, c as SendLoginCodeInput, d as VerifyRegistrationCodeInput, f as Profile, i as LoginWithPasswordInput, l as SetPasswordInput, m as ProfileResult, n as ChangePasswordInput, o as ResendLoginCodeInput, p as ProfileAccount, r as LoginWithGoogleInput, s as ResendRegistrationCodeInput, t as CaptchaArgs, u as VerifyLoginCodeInput } from "../requests-jRLgNXyf.js";
|
|
3
3
|
import { n as AccessTokenPayloadProject, t as AccessTokenPayload } from "../tokens-BXrPLi5B.js";
|
|
4
|
-
export { type AccessTokenPayload, type AccessTokenPayloadProject, type Account, type AuthSession, type CaptchaArgs, type ChangePasswordInput, type ErrorHandler, type ErrorSource, type LoginWithGoogleInput, type LoginWithPasswordInput, type OtpInfo, type Project, type RegisterInput, type RegisterResult, type ResendCodeResult, type ResendLoginCodeInput, type ResendRegistrationCodeInput, type SendLoginCodeInput, type SendLoginCodeResult, type SessionChangeHandler, type SetPasswordInput, type VerifyLoginCodeInput, type VerifyRegistrationCodeInput };
|
|
4
|
+
export { type AccessTokenPayload, type AccessTokenPayloadProject, type Account, type AuthSession, type CaptchaArgs, type ChangePasswordInput, type ErrorHandler, type ErrorSource, type LoginWithGoogleInput, type LoginWithPasswordInput, type OtpInfo, type Profile, type ProfileAccount, type ProfileResult, type Project, type RegisterInput, type RegisterResult, type ResendCodeResult, type ResendLoginCodeInput, type ResendRegistrationCodeInput, type SendLoginCodeInput, type SendLoginCodeResult, type SessionChangeHandler, type SetPasswordInput, type VerifyLoginCodeInput, type VerifyRegistrationCodeInput };
|
package/dist/wallet/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
//#region src/types/requests.d.ts
|
|
2
|
-
/** Optional captcha argument shared by every public unauthenticated entrypoint. */
|
|
3
|
-
type CaptchaArgs = {
|
|
4
|
-
/** Cloudflare Turnstile token. Required when captcha is enabled on the server. */captchaToken?: string;
|
|
5
|
-
};
|
|
6
|
-
type SendLoginCodeInput = {
|
|
7
|
-
email: string;
|
|
8
|
-
} & CaptchaArgs;
|
|
9
|
-
type VerifyLoginCodeInput = {
|
|
10
|
-
email: string;
|
|
11
|
-
code: string;
|
|
12
|
-
};
|
|
13
|
-
type ResendLoginCodeInput = {
|
|
14
|
-
email: string;
|
|
15
|
-
} & CaptchaArgs;
|
|
16
|
-
type RegisterInput = {
|
|
17
|
-
email: string;
|
|
18
|
-
password: string;
|
|
19
|
-
} & CaptchaArgs;
|
|
20
|
-
type VerifyRegistrationCodeInput = {
|
|
21
|
-
email: string;
|
|
22
|
-
code: string;
|
|
23
|
-
};
|
|
24
|
-
type ResendRegistrationCodeInput = {
|
|
25
|
-
email: string;
|
|
26
|
-
} & CaptchaArgs;
|
|
27
|
-
type LoginWithPasswordInput = {
|
|
28
|
-
email: string;
|
|
29
|
-
password: string;
|
|
30
|
-
} & CaptchaArgs;
|
|
31
|
-
type SetPasswordInput = {
|
|
32
|
-
password: string;
|
|
33
|
-
};
|
|
34
|
-
type ChangePasswordInput = {
|
|
35
|
-
currentPassword: string;
|
|
36
|
-
newPassword: string;
|
|
37
|
-
};
|
|
38
|
-
type LoginWithGoogleInput = {
|
|
39
|
-
idToken: string;
|
|
40
|
-
};
|
|
41
|
-
//#endregion
|
|
42
|
-
export { RegisterInput as a, SendLoginCodeInput as c, VerifyRegistrationCodeInput as d, LoginWithPasswordInput as i, SetPasswordInput as l, ChangePasswordInput as n, ResendLoginCodeInput as o, LoginWithGoogleInput as r, ResendRegistrationCodeInput as s, CaptchaArgs as t, VerifyLoginCodeInput as u };
|