tf-checkout-react 1.7.2 → 1.7.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.
@@ -3,3 +3,25 @@ export declare const signUp: (data: ISignupRequestData) => Promise<IProfileRespo
3
3
  export declare const register: (data: FormData) => Promise<IProfileResponse>;
4
4
  export declare const getProfileData: () => Promise<IProfileResponse>;
5
5
  export declare const logout: () => Promise<IAxiosResponseData>;
6
+ /**
7
+ * Checks whether a given email address already exists via the `/ajax/contact-email` endpoint.
8
+ *
9
+ * The underlying API is expected to return a JSON object containing:
10
+ * - `exists`: `1` if the email exists, `0` otherwise
11
+ * - `error`: `1` if an error occurred, `0` otherwise
12
+ * - `message`: an optional error message when `error === 1`
13
+ *
14
+ * This function normalizes that response to an object with:
15
+ * - `exists`: a boolean indicating whether the email exists
16
+ * - `error`: an optional string containing an error message, if any
17
+ *
18
+ * On network or unexpected errors, it returns `{ exists: false, error: 'Failed to check email' }`.
19
+ *
20
+ * @param {string} email - The email address to check for existence.
21
+ * @returns {Promise<{ exists: boolean; error?: string }>} A promise that resolves to the normalized
22
+ * result of the email existence check.
23
+ */
24
+ export declare const checkEmailExists: (email: string) => Promise<{
25
+ exists: boolean;
26
+ error?: string;
27
+ }>;
@@ -1,7 +1,7 @@
1
1
  import './interceptors';
2
2
  import { AxiosRequestConfig, AxiosResponse } from 'axios';
3
3
  import { GetNetverifyUrlResponseData, UpdateVerificationStatusResponseData, VerificationStatusResponseData } from '../types/verification';
4
- export { authorize, getProfileData, signUp, register, logout } from './auth';
4
+ export { authorize, getProfileData, signUp, register, logout, checkEmailExists } from './auth';
5
5
  export { setAxiosHeader, setBaseUrl } from './publicRequest';
6
6
  export { getOrders, getOrderDetails } from './orders';
7
7
  export { addToCart, getCart } from './cart';
@@ -13,6 +13,7 @@ export interface ILoginFormProps {
13
13
  showForgotPasswordButton?: boolean;
14
14
  showSignUpButton?: boolean;
15
15
  showPoweredByImage?: boolean;
16
+ registerUrl?: string;
16
17
  }
17
18
  export declare const setLoggedUserData: (data: IProfileData) => {
18
19
  id: React.ReactText;
@@ -17,5 +17,6 @@ export interface Props {
17
17
  showForgotPasswordButton?: boolean;
18
18
  showSignUpButton?: boolean;
19
19
  showPoweredByImage?: boolean;
20
+ registerUrl?: string;
20
21
  }
21
22
  export declare const LoginModal: FC<Props>;