@insforge/react 1.0.2-refresh.5 → 1.0.4

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.
@@ -1,10 +1,9 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { UserSchema } from '@insforge/sdk';
2
+ import { VerifyEmailResponse } from '@insforge/shared-schemas';
3
3
  import { ReactNode } from 'react';
4
4
  import { InsforgeUser } from '@insforge/shared';
5
5
  export { ForgotPasswordForm, ForgotPasswordFormProps, ResetPasswordForm, ResetPasswordFormProps, SignInForm, SignInFormProps, SignUpForm, SignUpFormProps, VerifyEmailStatus, VerifyEmailStatusProps } from './forms.cjs';
6
6
  export { AuthBranding, AuthContainer, AuthContainerProps, AuthDivider, AuthDividerProps, AuthEmailVerificationStep, AuthErrorBanner, AuthErrorBannerProps, AuthFormField, AuthFormFieldProps, AuthHeader, AuthHeaderProps, AuthLink, AuthLinkProps, AuthOAuthButton, AuthOAuthButtonProps, AuthOAuthProviders, AuthOAuthProvidersProps, AuthPasswordField, AuthPasswordFieldProps, AuthPasswordStrengthIndicator, AuthPasswordStrengthIndicatorProps, AuthResetPasswordVerificationStep, AuthSubmitButton, AuthSubmitButtonProps, AuthVerificationCodeInput, AuthVerificationCodeInputProps } from './atoms.cjs';
7
- import '@insforge/shared-schemas';
8
7
  import './types.cjs';
9
8
 
10
9
  interface SignInProps {
@@ -135,11 +134,7 @@ interface VerifyEmailProps {
135
134
  successMessage?: string;
136
135
  errorTitle?: string;
137
136
  /** Callback when verification is successful */
138
- onSuccess?: (data: {
139
- accessToken: string;
140
- user?: UserSchema;
141
- redirectTo?: string;
142
- }) => void;
137
+ onSuccess?: (data: VerifyEmailResponse) => void;
143
138
  /** Callback when verification fails */
144
139
  onError?: (error: Error) => void;
145
140
  }
@@ -1,10 +1,9 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { UserSchema } from '@insforge/sdk';
2
+ import { VerifyEmailResponse } from '@insforge/shared-schemas';
3
3
  import { ReactNode } from 'react';
4
4
  import { InsforgeUser } from '@insforge/shared';
5
5
  export { ForgotPasswordForm, ForgotPasswordFormProps, ResetPasswordForm, ResetPasswordFormProps, SignInForm, SignInFormProps, SignUpForm, SignUpFormProps, VerifyEmailStatus, VerifyEmailStatusProps } from './forms.js';
6
6
  export { AuthBranding, AuthContainer, AuthContainerProps, AuthDivider, AuthDividerProps, AuthEmailVerificationStep, AuthErrorBanner, AuthErrorBannerProps, AuthFormField, AuthFormFieldProps, AuthHeader, AuthHeaderProps, AuthLink, AuthLinkProps, AuthOAuthButton, AuthOAuthButtonProps, AuthOAuthProviders, AuthOAuthProvidersProps, AuthPasswordField, AuthPasswordFieldProps, AuthPasswordStrengthIndicator, AuthPasswordStrengthIndicatorProps, AuthResetPasswordVerificationStep, AuthSubmitButton, AuthSubmitButtonProps, AuthVerificationCodeInput, AuthVerificationCodeInputProps } from './atoms.js';
7
- import '@insforge/shared-schemas';
8
7
  import './types.js';
9
8
 
10
9
  interface SignInProps {
@@ -135,11 +134,7 @@ interface VerifyEmailProps {
135
134
  successMessage?: string;
136
135
  errorTitle?: string;
137
136
  /** Callback when verification is successful */
138
- onSuccess?: (data: {
139
- accessToken: string;
140
- user?: UserSchema;
141
- redirectTo?: string;
142
- }) => void;
137
+ onSuccess?: (data: VerifyEmailResponse) => void;
143
138
  /** Callback when verification fails */
144
139
  onError?: (error: Error) => void;
145
140
  }
@@ -4513,11 +4513,7 @@ function VerifyEmail({ token: token2, onSuccess, onError, ...uiProps }) {
4513
4513
  }
4514
4514
  setStatus("success");
4515
4515
  if (onSuccess) {
4516
- onSuccess({
4517
- accessToken: result.accessToken,
4518
- user: result.user,
4519
- redirectTo: result.redirectTo
4520
- });
4516
+ onSuccess(result);
4521
4517
  }
4522
4518
  } catch (err) {
4523
4519
  const errorMessage = err instanceof Error ? err.message : "Email verification failed";