@bagelink/auth 1.6.51 → 1.6.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +284 -219
  2. package/dist/Callback-BHqVaZZm.cjs +4 -0
  3. package/dist/Callback-C-XghN_z.js +4 -0
  4. package/dist/ForgotPasswordPage-BV9tyhHl.cjs +4 -0
  5. package/dist/ForgotPasswordPage-DvttMGb0.js +4 -0
  6. package/dist/LoginPage-hv1wc54S.cjs +4 -0
  7. package/dist/LoginPage-klj1NV4J.js +4 -0
  8. package/dist/ResetPasswordPage-COPrJmW8.cjs +4 -0
  9. package/dist/ResetPasswordPage-nvQ4uupb.js +4 -0
  10. package/dist/SignupPage-m36w9PLJ.cjs +4 -0
  11. package/dist/SignupPage-oUFYApYW.js +4 -0
  12. package/dist/api.d.ts +115 -0
  13. package/dist/components/auth/ForgotPasswordForm.vue.d.ts +23 -0
  14. package/dist/components/auth/LoginForm.vue.d.ts +58 -0
  15. package/dist/components/auth/ResetPasswordForm.vue.d.ts +28 -0
  16. package/dist/components/auth/SignupForm.vue.d.ts +34 -0
  17. package/dist/components/index.d.ts +4 -0
  18. package/dist/constants.d.ts +34 -0
  19. package/dist/index.cjs +1227 -30
  20. package/dist/index.d.ts +16 -631
  21. package/dist/index.mjs +1242 -24
  22. package/dist/pages/Callback.vue.d.ts +2 -0
  23. package/dist/pages/ForgotPasswordPage.vue.d.ts +13 -0
  24. package/dist/pages/LoginPage.vue.d.ts +38 -0
  25. package/dist/pages/ResetPasswordPage.vue.d.ts +13 -0
  26. package/dist/pages/SignupPage.vue.d.ts +16 -0
  27. package/dist/routes.d.ts +49 -0
  28. package/dist/sso.d.ts +145 -0
  29. package/dist/types/index.d.ts +41 -0
  30. package/dist/types.d.ts +254 -0
  31. package/dist/useAuth.d.ts +112 -0
  32. package/dist/utils.d.ts +11 -0
  33. package/package.json +11 -13
  34. package/src/components/auth/ForgotPasswordForm.vue +97 -0
  35. package/src/components/auth/LoginForm.vue +257 -0
  36. package/src/components/auth/ResetPasswordForm.vue +146 -0
  37. package/src/components/auth/SignupForm.vue +224 -0
  38. package/src/components/index.ts +5 -0
  39. package/src/constants.ts +10 -0
  40. package/src/index.ts +26 -1
  41. package/src/pages/Callback.vue +183 -0
  42. package/src/pages/ForgotPasswordPage.vue +42 -0
  43. package/src/pages/LoginPage.vue +68 -0
  44. package/src/pages/ResetPasswordPage.vue +47 -0
  45. package/src/pages/SignupPage.vue +46 -0
  46. package/src/routes.ts +122 -0
  47. package/src/types/index.ts +45 -0
  48. package/dist/index.d.cts +0 -631
  49. package/dist/index.d.mts +0 -631
package/dist/api.d.ts ADDED
@@ -0,0 +1,115 @@
1
+ import { RegisterRequest, UpdateAccountRequest, ChangePasswordRequest, ResetPasswordRequest, SendVerificationRequest, AuthenticationAccount, LoginResponse, RegisterResponse, LogoutResponse, GetMeResponse, UpdateMeResponse, DeleteMeResponse, GetAccountResponse, UpdateAccountResponse, DeleteAccountResponse, ActivateAccountResponse, DeactivateAccountResponse, ChangePasswordResponse, ForgotPasswordResponse, ResetPasswordResponse, VerifyResetTokenResponse, SendVerificationResponse, VerifyEmailResponse, RefreshSessionResponse, GetSessionsResponse, DeleteSessionResponse, DeleteAllSessionsResponse, CleanupSessionsResponse, GetMethodsResponse, SSOProvider, SSOInitiateRequest, SSOCallbackRequest, SSOLinkRequest, SSOInitiateResponse, SSOCallbackResponse, SSOLinkResponse, SSOUnlinkResponse } from './types';
2
+ export declare class AuthApi {
3
+ private api;
4
+ constructor(baseURL?: string);
5
+ private setupInterceptors;
6
+ /**
7
+ * Get available authentication methods
8
+ */
9
+ getAuthMethods(): Promise<GetMethodsResponse>;
10
+ /**
11
+ * Register a new account
12
+ */
13
+ register(data: RegisterRequest): Promise<RegisterResponse>;
14
+ /**
15
+ * Login with password
16
+ */
17
+ login(email: string, password: string): Promise<LoginResponse>;
18
+ /**
19
+ * Logout and clear session
20
+ */
21
+ logout(): Promise<LogoutResponse>;
22
+ /**
23
+ * Refresh current session
24
+ */
25
+ refreshSession(): Promise<RefreshSessionResponse>;
26
+ /**
27
+ * Initiate SSO login flow
28
+ * Returns authorization URL to redirect user to
29
+ */
30
+ initiateSSO(data: SSOInitiateRequest): Promise<SSOInitiateResponse>;
31
+ /**
32
+ * Complete SSO login after callback from provider
33
+ */
34
+ ssoCallback(data: SSOCallbackRequest): Promise<SSOCallbackResponse>;
35
+ /**
36
+ * Link an SSO provider to existing account
37
+ */
38
+ linkSSOProvider(data: SSOLinkRequest): Promise<SSOLinkResponse>;
39
+ /**
40
+ * Unlink an SSO provider from account
41
+ */
42
+ unlinkSSOProvider(provider: SSOProvider): Promise<SSOUnlinkResponse>;
43
+ /**
44
+ * Get current user account info
45
+ */
46
+ getCurrentUser(): Promise<GetMeResponse>;
47
+ /**
48
+ * Update current user profile
49
+ */
50
+ updateCurrentUser(data: UpdateAccountRequest): Promise<UpdateMeResponse>;
51
+ /**
52
+ * Delete current user account
53
+ */
54
+ deleteCurrentUser(): Promise<DeleteMeResponse>;
55
+ /**
56
+ * Get account information by ID
57
+ */
58
+ getAccount(accountId: string): Promise<GetAccountResponse>;
59
+ /**
60
+ * Update account by ID
61
+ */
62
+ updateAccount(accountId: string, data: UpdateAccountRequest): Promise<UpdateAccountResponse>;
63
+ /**
64
+ * Delete account by ID
65
+ */
66
+ deleteAccount(accountId: string): Promise<DeleteAccountResponse>;
67
+ /**
68
+ * Activate account by ID
69
+ */
70
+ activateAccount(accountId: string): Promise<ActivateAccountResponse>;
71
+ /**
72
+ * Deactivate account by ID
73
+ */
74
+ deactivateAccount(accountId: string): Promise<DeactivateAccountResponse>;
75
+ /**
76
+ * Change password (requires current password)
77
+ */
78
+ changePassword(data: ChangePasswordRequest): Promise<ChangePasswordResponse>;
79
+ /**
80
+ * Initiate forgot password flow
81
+ */
82
+ forgotPassword(email: string): Promise<ForgotPasswordResponse>;
83
+ /**
84
+ * Verify password reset token
85
+ */
86
+ verifyResetToken(token: string): Promise<VerifyResetTokenResponse>;
87
+ /**
88
+ * Reset password with token
89
+ */
90
+ resetPassword(data: ResetPasswordRequest): Promise<ResetPasswordResponse>;
91
+ /**
92
+ * Send email verification
93
+ */
94
+ sendVerification(data?: SendVerificationRequest, user?: AuthenticationAccount): Promise<SendVerificationResponse>;
95
+ /**
96
+ * Verify email with token
97
+ */
98
+ verifyEmail(token: string): Promise<VerifyEmailResponse>;
99
+ /**
100
+ * Get sessions for an account
101
+ */
102
+ getSessions(accountId: string): Promise<GetSessionsResponse>;
103
+ /**
104
+ * Revoke a specific session
105
+ */
106
+ revokeSession(sessionToken: string): Promise<DeleteSessionResponse>;
107
+ /**
108
+ * Revoke all sessions for an account
109
+ */
110
+ revokeAllSessions(accountId: string): Promise<DeleteAllSessionsResponse>;
111
+ /**
112
+ * Cleanup expired sessions (admin)
113
+ */
114
+ cleanupSessions(): Promise<CleanupSessionsResponse>;
115
+ }
@@ -0,0 +1,23 @@
1
+ export interface ForgotPasswordTexts {
2
+ title?: string;
3
+ emailLabel?: string;
4
+ submitButton?: string;
5
+ backToLogin?: string;
6
+ emailSentTitle?: string;
7
+ emailSentMessage?: string;
8
+ }
9
+ interface Props {
10
+ emailSent?: boolean;
11
+ useHebrewDefaults?: boolean;
12
+ texts?: Partial<ForgotPasswordTexts>;
13
+ }
14
+ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
15
+ switchForm: (form: string) => any;
16
+ }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
17
+ onSwitchForm?: ((form: string) => any) | undefined;
18
+ }>, {
19
+ emailSent: boolean;
20
+ useHebrewDefaults: boolean;
21
+ texts: Partial<ForgotPasswordTexts>;
22
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
23
+ export default _default;
@@ -0,0 +1,58 @@
1
+ export interface LoginTexts {
2
+ title?: string;
3
+ emailLabel?: string;
4
+ passwordLabel?: string;
5
+ forgotPassword?: string;
6
+ loginButton?: string;
7
+ signupButton?: string;
8
+ orText?: string;
9
+ githubButton?: string;
10
+ googleButton?: string;
11
+ microsoftButton?: string;
12
+ appleButton?: string;
13
+ oktaButton?: string;
14
+ facebookButton?: string;
15
+ }
16
+ interface Props {
17
+ hideRegularLogin?: boolean;
18
+ showForgotPassword?: boolean;
19
+ showSignupButton?: boolean;
20
+ github?: boolean;
21
+ google?: boolean;
22
+ microsoft?: boolean;
23
+ apple?: boolean;
24
+ okta?: boolean;
25
+ facebook?: boolean;
26
+ ssoOutline?: boolean;
27
+ ssoShowValue?: boolean;
28
+ ssoSize?: 'xs' | 's' | 'm' | 'l' | 'xl' | 'extra-small' | 'small' | 'medium' | 'large' | 'extra-large';
29
+ ssoAlign?: boolean;
30
+ ssoBrandBackground?: boolean;
31
+ useHebrewDefaults?: boolean;
32
+ errorState?: 'normal' | 'email-required' | 'email-invalid' | 'password-required' | 'invalid-credentials' | 'server-error';
33
+ texts?: Partial<LoginTexts>;
34
+ }
35
+ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
36
+ switchForm: (form: string) => any;
37
+ }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
38
+ onSwitchForm?: ((form: string) => any) | undefined;
39
+ }>, {
40
+ google: boolean;
41
+ microsoft: boolean;
42
+ github: boolean;
43
+ okta: boolean;
44
+ apple: boolean;
45
+ facebook: boolean;
46
+ useHebrewDefaults: boolean;
47
+ texts: Partial<LoginTexts>;
48
+ hideRegularLogin: boolean;
49
+ showForgotPassword: boolean;
50
+ showSignupButton: boolean;
51
+ ssoOutline: boolean;
52
+ ssoShowValue: boolean;
53
+ ssoSize: "xs" | "s" | "m" | "l" | "xl" | "extra-small" | "small" | "medium" | "large" | "extra-large";
54
+ ssoAlign: boolean;
55
+ ssoBrandBackground: boolean;
56
+ errorState: "normal" | "email-required" | "email-invalid" | "password-required" | "invalid-credentials" | "server-error";
57
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLFormElement>;
58
+ export default _default;
@@ -0,0 +1,28 @@
1
+ export interface ResetPasswordTexts {
2
+ title?: string;
3
+ invalidLinkTitle?: string;
4
+ invalidLinkMessage?: string;
5
+ newPasswordLabel?: string;
6
+ confirmPasswordLabel?: string;
7
+ submitButton?: string;
8
+ backToLogin?: string;
9
+ passwordMismatchError?: string;
10
+ invalidTokenError?: string;
11
+ successTitle?: string;
12
+ successMessage?: string;
13
+ goToLogin?: string;
14
+ }
15
+ interface Props {
16
+ token?: string;
17
+ showSuccess?: boolean;
18
+ useHebrewDefaults?: boolean;
19
+ texts?: Partial<ResetPasswordTexts>;
20
+ }
21
+ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
22
+ switchForm: (form: string) => any;
23
+ }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
24
+ onSwitchForm?: ((form: string) => any) | undefined;
25
+ }>, {
26
+ useHebrewDefaults: boolean;
27
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
28
+ export default _default;
@@ -0,0 +1,34 @@
1
+ export interface SignupTexts {
2
+ title?: string;
3
+ firstNameLabel?: string;
4
+ lastNameLabel?: string;
5
+ emailLabel?: string;
6
+ passwordLabel?: string;
7
+ confirmPasswordLabel?: string;
8
+ signupButton?: string;
9
+ alreadyHaveAccount?: string;
10
+ emailRequiredError?: string;
11
+ emailInvalidError?: string;
12
+ passwordRequiredError?: string;
13
+ passwordTooShortError?: string;
14
+ passwordMismatchError?: string;
15
+ firstNameRequiredError?: string;
16
+ lastNameRequiredError?: string;
17
+ }
18
+ interface Props {
19
+ showNames?: boolean;
20
+ useHebrewDefaults?: boolean;
21
+ errorState?: 'normal' | 'email-required' | 'email-invalid' | 'password-short' | 'password-mismatch' | 'name-required' | 'server-error';
22
+ texts?: Partial<SignupTexts>;
23
+ }
24
+ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
25
+ switchForm: (form: string) => any;
26
+ }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
27
+ onSwitchForm?: ((form: string) => any) | undefined;
28
+ }>, {
29
+ useHebrewDefaults: boolean;
30
+ texts: Partial<SignupTexts>;
31
+ errorState: "normal" | "email-required" | "email-invalid" | "password-short" | "password-mismatch" | "name-required" | "server-error";
32
+ showNames: boolean;
33
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLFormElement>;
34
+ export default _default;
@@ -0,0 +1,4 @@
1
+ export { default as ForgotPasswordForm } from './auth/ForgotPasswordForm.vue';
2
+ export { default as LoginForm } from './auth/LoginForm.vue';
3
+ export { default as ResetPasswordForm } from './auth/ResetPasswordForm.vue';
4
+ export { default as SignupForm } from './auth/SignupForm.vue';
@@ -0,0 +1,34 @@
1
+ export declare const INTAKE_WORKFLOW_ID = "fdba1933-0964-4850-b52a-7a4324175790";
2
+ export declare const DEFAULT_AGENT_ID = "fdba1933-0964-4850-b52a-7a4324175790";
3
+ export declare const providers: {
4
+ github: {
5
+ name: string;
6
+ icon: string;
7
+ color: string;
8
+ };
9
+ google: {
10
+ name: string;
11
+ icon: string;
12
+ color: string;
13
+ };
14
+ microsoft: {
15
+ name: string;
16
+ icon: string;
17
+ color: string;
18
+ };
19
+ apple: {
20
+ name: string;
21
+ icon: string;
22
+ color: string;
23
+ };
24
+ okta: {
25
+ name: string;
26
+ icon: string;
27
+ color: string;
28
+ };
29
+ facebook: {
30
+ name: string;
31
+ icon: string;
32
+ color: string;
33
+ };
34
+ };