foundation-sdk 0.2.11 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth-auth0.cjs +1 -1
- package/dist/auth-auth0.cjs.map +1 -1
- package/dist/auth-auth0.d.cts +1 -1
- package/dist/auth-auth0.d.ts +1 -1
- package/dist/auth-auth0.js +1 -1
- package/dist/auth-auth0.js.map +1 -1
- package/dist/auth-cognito.cjs +1 -1
- package/dist/auth-cognito.cjs.map +1 -1
- package/dist/auth-cognito.d.cts +1 -1
- package/dist/auth-cognito.d.ts +1 -1
- package/dist/auth-cognito.js +1 -1
- package/dist/auth-cognito.js.map +1 -1
- package/dist/foundation-sdk.browser.auth0.global.js +1 -1
- package/dist/foundation-sdk.browser.auth0.global.js.map +1 -1
- package/dist/foundation-sdk.browser.global.js +1 -1
- package/dist/foundation-sdk.browser.global.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/{types-C9WPa35S.d.cts → types-BiBc2oYU.d.cts} +27 -7
- package/dist/{types-C9WPa35S.d.ts → types-BiBc2oYU.d.ts} +27 -7
- package/package.json +1 -1
|
@@ -68,6 +68,23 @@ interface FullConfig {
|
|
|
68
68
|
};
|
|
69
69
|
readonly raw: Record<string, unknown>;
|
|
70
70
|
}
|
|
71
|
+
type SignInStep = 'DONE' | 'CONFIRM_SIGN_UP' | 'CONFIRM_SIGN_IN_WITH_SMS_CODE' | 'CONFIRM_SIGN_IN_WITH_TOTP_CODE' | 'CONTINUE_SIGN_IN_WITH_MFA_SELECTION' | 'RESET_PASSWORD' | 'CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED' | string;
|
|
72
|
+
interface SignInResult {
|
|
73
|
+
isSignedIn: boolean;
|
|
74
|
+
nextStep?: {
|
|
75
|
+
signInStep: SignInStep;
|
|
76
|
+
[key: string]: unknown;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
type SignUpStep = 'DONE' | 'CONFIRM_SIGN_UP' | string;
|
|
80
|
+
interface SignUpResult {
|
|
81
|
+
isSignUpComplete: boolean;
|
|
82
|
+
userId?: string;
|
|
83
|
+
nextStep?: {
|
|
84
|
+
signUpStep: SignUpStep;
|
|
85
|
+
[key: string]: unknown;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
71
88
|
interface AuthClient {
|
|
72
89
|
login(options?: Record<string, unknown>): Promise<void>;
|
|
73
90
|
logout(options?: Record<string, unknown>): void | Promise<void>;
|
|
@@ -75,8 +92,8 @@ interface AuthClient {
|
|
|
75
92
|
getTokenSilently(options?: Record<string, unknown>): Promise<string>;
|
|
76
93
|
isAuthenticated(): Promise<boolean>;
|
|
77
94
|
handleCallback?(url?: string): Promise<void>;
|
|
78
|
-
signIn?(email: string, password: string): Promise<
|
|
79
|
-
signUp?(email: string, password: string, metadata?: Record<string, unknown>): Promise<
|
|
95
|
+
signIn?(email: string, password: string): Promise<SignInResult>;
|
|
96
|
+
signUp?(email: string, password: string, metadata?: Record<string, unknown>): Promise<SignUpResult>;
|
|
80
97
|
confirmSignUp?(email: string, code: string): Promise<void>;
|
|
81
98
|
resendSignUpCode?(email: string): Promise<void>;
|
|
82
99
|
forgotPassword?(email: string): Promise<void>;
|
|
@@ -89,10 +106,13 @@ interface AuthService {
|
|
|
89
106
|
/** Redirect-based login (Auth0 Universal Login / Cognito Hosted UI) */
|
|
90
107
|
login(options?: Record<string, unknown>): Promise<void>;
|
|
91
108
|
logout(options?: Record<string, unknown>): Promise<void>;
|
|
92
|
-
/** Direct sign in with credentials (for custom login forms)
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
109
|
+
/** Direct sign in with credentials (for custom login forms).
|
|
110
|
+
* Returns `{ isSignedIn, nextStep? }`. Check `isSignedIn` before navigating. */
|
|
111
|
+
signIn(email: string, password: string): Promise<SignInResult>;
|
|
112
|
+
/** Direct sign up (for custom registration forms).
|
|
113
|
+
* Returns `{ isSignUpComplete, nextStep? }`. If configured for unified verification,
|
|
114
|
+
* `isSignUpComplete` is true and the backend sends a verification email. */
|
|
115
|
+
signUp(email: string, password: string, metadata?: Record<string, unknown>): Promise<SignUpResult>;
|
|
96
116
|
/** Confirm sign up with verification code (Cognito email/SMS verification) */
|
|
97
117
|
confirmSignUp(email: string, code: string): Promise<void>;
|
|
98
118
|
/** Resend sign up verification code */
|
|
@@ -249,4 +269,4 @@ interface Foundation {
|
|
|
249
269
|
on(event: string, callback: (event: EntityChangeEvent) => void): () => void;
|
|
250
270
|
}
|
|
251
271
|
|
|
252
|
-
export type { AuthProvider as A, DbService as D, EntityChangeEvent as E, FoundationConfig as F, IntegrationService as I, LogService as L, OAuthService as O, User as U, Foundation as a, FullConfig as b, FileMetadata as c, AuthClient as d, AuthService as e,
|
|
272
|
+
export type { AuthProvider as A, DbService as D, EntityChangeEvent as E, FoundationConfig as F, IntegrationService as I, LogService as L, OAuthService as O, SignInResult as S, User as U, Foundation as a, FullConfig as b, FileMetadata as c, AuthClient as d, AuthService as e, SignInStep as f, SignUpResult as g, SignUpStep as h, FilesService as i, AccountService as j, Integration as k, IntegrationConnection as l, IntegrationDetail as m, OAuthClient as n, OAuthConsentParams as o, OpenApiService as p, AuthProviderContext as q };
|
|
@@ -68,6 +68,23 @@ interface FullConfig {
|
|
|
68
68
|
};
|
|
69
69
|
readonly raw: Record<string, unknown>;
|
|
70
70
|
}
|
|
71
|
+
type SignInStep = 'DONE' | 'CONFIRM_SIGN_UP' | 'CONFIRM_SIGN_IN_WITH_SMS_CODE' | 'CONFIRM_SIGN_IN_WITH_TOTP_CODE' | 'CONTINUE_SIGN_IN_WITH_MFA_SELECTION' | 'RESET_PASSWORD' | 'CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED' | string;
|
|
72
|
+
interface SignInResult {
|
|
73
|
+
isSignedIn: boolean;
|
|
74
|
+
nextStep?: {
|
|
75
|
+
signInStep: SignInStep;
|
|
76
|
+
[key: string]: unknown;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
type SignUpStep = 'DONE' | 'CONFIRM_SIGN_UP' | string;
|
|
80
|
+
interface SignUpResult {
|
|
81
|
+
isSignUpComplete: boolean;
|
|
82
|
+
userId?: string;
|
|
83
|
+
nextStep?: {
|
|
84
|
+
signUpStep: SignUpStep;
|
|
85
|
+
[key: string]: unknown;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
71
88
|
interface AuthClient {
|
|
72
89
|
login(options?: Record<string, unknown>): Promise<void>;
|
|
73
90
|
logout(options?: Record<string, unknown>): void | Promise<void>;
|
|
@@ -75,8 +92,8 @@ interface AuthClient {
|
|
|
75
92
|
getTokenSilently(options?: Record<string, unknown>): Promise<string>;
|
|
76
93
|
isAuthenticated(): Promise<boolean>;
|
|
77
94
|
handleCallback?(url?: string): Promise<void>;
|
|
78
|
-
signIn?(email: string, password: string): Promise<
|
|
79
|
-
signUp?(email: string, password: string, metadata?: Record<string, unknown>): Promise<
|
|
95
|
+
signIn?(email: string, password: string): Promise<SignInResult>;
|
|
96
|
+
signUp?(email: string, password: string, metadata?: Record<string, unknown>): Promise<SignUpResult>;
|
|
80
97
|
confirmSignUp?(email: string, code: string): Promise<void>;
|
|
81
98
|
resendSignUpCode?(email: string): Promise<void>;
|
|
82
99
|
forgotPassword?(email: string): Promise<void>;
|
|
@@ -89,10 +106,13 @@ interface AuthService {
|
|
|
89
106
|
/** Redirect-based login (Auth0 Universal Login / Cognito Hosted UI) */
|
|
90
107
|
login(options?: Record<string, unknown>): Promise<void>;
|
|
91
108
|
logout(options?: Record<string, unknown>): Promise<void>;
|
|
92
|
-
/** Direct sign in with credentials (for custom login forms)
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
109
|
+
/** Direct sign in with credentials (for custom login forms).
|
|
110
|
+
* Returns `{ isSignedIn, nextStep? }`. Check `isSignedIn` before navigating. */
|
|
111
|
+
signIn(email: string, password: string): Promise<SignInResult>;
|
|
112
|
+
/** Direct sign up (for custom registration forms).
|
|
113
|
+
* Returns `{ isSignUpComplete, nextStep? }`. If configured for unified verification,
|
|
114
|
+
* `isSignUpComplete` is true and the backend sends a verification email. */
|
|
115
|
+
signUp(email: string, password: string, metadata?: Record<string, unknown>): Promise<SignUpResult>;
|
|
96
116
|
/** Confirm sign up with verification code (Cognito email/SMS verification) */
|
|
97
117
|
confirmSignUp(email: string, code: string): Promise<void>;
|
|
98
118
|
/** Resend sign up verification code */
|
|
@@ -249,4 +269,4 @@ interface Foundation {
|
|
|
249
269
|
on(event: string, callback: (event: EntityChangeEvent) => void): () => void;
|
|
250
270
|
}
|
|
251
271
|
|
|
252
|
-
export type { AuthProvider as A, DbService as D, EntityChangeEvent as E, FoundationConfig as F, IntegrationService as I, LogService as L, OAuthService as O, User as U, Foundation as a, FullConfig as b, FileMetadata as c, AuthClient as d, AuthService as e,
|
|
272
|
+
export type { AuthProvider as A, DbService as D, EntityChangeEvent as E, FoundationConfig as F, IntegrationService as I, LogService as L, OAuthService as O, SignInResult as S, User as U, Foundation as a, FullConfig as b, FileMetadata as c, AuthClient as d, AuthService as e, SignInStep as f, SignUpResult as g, SignUpStep as h, FilesService as i, AccountService as j, Integration as k, IntegrationConnection as l, IntegrationDetail as m, OAuthClient as n, OAuthConsentParams as o, OpenApiService as p, AuthProviderContext as q };
|