/**
 * # Auth Service
 *
 * This module provides all functionalities related to user authentication and authorization.
 *
 * ## Features:
 * - Validate tokens
 * - Refresh tokens
 * - Reset user passwords
 * - Manage user login and logout
 * - Send password reset emails
 *
 * Each function is described with its input parameters, output responses, and example usages.
 */
import { LoginResponse, RefreshTokenResponse, SettingsResponse, Store } from "./definitions";
import { IsTokenValidParameters, LoginParameters, RefreshTokenParameters, ResetPasswordParameters, SendResetPasswordEmailParameters, GetStoreParameters } from "./definitions.requests";
/**
 * 🔐 Validates if a token is still active and unexpired.
 *
 * This function checks whether the provided token is valid, ensuring it has not expired or been invalidated.
 *
 * 🛠 **Endpoint**: `GET /auth/is-token-valid [TOK-200]`
 *
 * | Parameter | Type     | Required | Description                         |
 * |-----------|----------|----------|-------------------------------------|
 * | `token`   | `string` | ✅       | The token to validate.              |
 *
 * 📤 **Returns**:
 * A `Promise<boolean>` resolving to `true` if the token is valid and active, or `false` otherwise.
 *
 * 🛠 **Example usage**:
 * ```ts
 * const isValid = await isTokenValid({
 *   token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
 * });
 * console.log(isValid); // true
 * ```
 *
 * @param {IsTokenValidParameters} params - The parameters for validating the token.
 * @throws {Error} If the required `token` parameter is missing.
 * @returns {Promise<boolean>} A promise that resolves to a boolean indicating whether the token is valid.
 */
export declare function isTokenValid({ token, }: IsTokenValidParameters): Promise<boolean>;
/**
 * 🔄 Requests a new access token using a refresh token.
 *
 * This function allows you to obtain a new access token by providing a valid refresh token.
 *
 * 🛠 **Endpoint**: `POST /auth/refresh-token [AUTH-102]`
 *
 * | Parameter       | Type     | Required | Description                                      |
 * |-----------------|----------|----------|--------------------------------------------------|
 * | `refreshToken`  | `string` | ✅       | The refresh token used to request a new access token. |
 *
 * 📤 **Returns**:
 * A `Promise<RefreshTokenResponse>` containing the new access token, its expiry time, and a refreshed token.
 *
 * 🛠 **Example usage**:
 * ```ts
 * const response = await refreshToken({
 *   refreshToken: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
 * });
 * ```
 *
 * @param {RefreshTokenParameters} params - The parameters for requesting a new token.
 * @throws {Error} If the required `refreshToken` parameter is missing.
 * @returns {Promise<RefreshTokenResponse>} A promise that resolves to the response containing the new token and user details.
 */
export declare function refreshToken({ refreshToken, }: RefreshTokenParameters): Promise<RefreshTokenResponse>;
/**
 * 🔑 Resets the password of a user.
 *
 * This function allows a user to reset their password by providing a new password along with a valid reset token.
 *
 * 🛠 **Endpoint**: `POST /auth/reset-password [PWD-102]`
 *
 * | Parameter             | Type     | Required | Description                                                  |
 * |-----------------------|----------|----------|--------------------------------------------------------------|
 * | `newPassword`         | `string` | ✅       | The new password to set for the user.                        |
 * | `resetPasswordToken`  | `string` | ✅       | The token required to authenticate the password reset process. |
 *
 * 📤 **Returns**:
 * A `Promise<void>` that resolves with a success message `"OK"` if the password is successfully reset.
 *
 * 🛠 **Example usage**:
 * ```ts
 * await resetPassword({
 *   newPassword: "mySecurePassword2025!",
 *   resetPasswordToken: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
 * });
 * ```
 *
 * @param {ResetPasswordParameters} params - The parameters required for resetting the password.
 * @throws {Error} If the required parameters `newPassword` or `resetPasswordToken` are missing.
 * @returns {Promise<void>} Resolves to `"OK"` if the password reset is successful.
 */
export declare function resetPassword({ newPassword, resetPasswordToken, }: ResetPasswordParameters): Promise<void>;
/**
 * 📧 Sends a reset password email to a user.
 *
 * This function sends an email containing a reset password link to the specified email address.
 *
 * 🛠 **Endpoint**: `POST /auth/send-reset-password-email [PWD-101]`
 *
 * | Parameter  | Type     | Required | Description                                        |
 * |------------|----------|----------|----------------------------------------------------|
 * | `email`    | `string` | ✅       | The email address to which the reset link will be sent. |
 *
 * 📤 **Returns**:
 * A `Promise<void>` that resolves when the reset password email is successfully sent.
 *
 * 🛠 **Example usage**:
 * ```ts
 * await sendResetPasswordEmail({
 *   email: "user@example.com",
 * });
 * ```
 *
 * @param {SendResetPasswordEmailParameters} params - The parameters required to send the reset password email.
 * @throws {Error} If the required parameter `email` is missing.
 * @returns {Promise<void>} Resolves when the reset email is successfully sent.
 */
export declare function sendResetPasswordEmail({ email, }: SendResetPasswordEmailParameters): Promise<void>;
/**
 * 🔐 Logs in a user.
 *
 * This function allows a user to log in by providing their username and password, and returns their login information, including an access token and user details.
 *
 * 🛠 **Endpoint**: `POST /auth/token?withUser=true [AUTH-101]`
 *
 * | Parameter   | Type     | Required | Description                          |
 * |-------------|----------|----------|--------------------------------------|
 * | `username`  | `string` | ✅       | The username of the user to log in.  |
 * | `password`  | `string` | ✅       | The password of the user to log in.  |
 * | `withUser`  | `boolean`| ❌       | Whether to include user details in the response. Default: `true` |
 *
 * 📤 **Returns**:
 * A `Promise<LoginResponse>` that resolves to the user's login information, including:
 * - `token` (object): Contains the `accessToken`, `refreshToken`, and `expireAt` timestamp.
 * - `user` (object): Contains the user's `id`.
 *
 * 🛠 **Example usage**:
 * ```ts
 * const loginResponse = await login({
 *   username: "user@example.com",
 *   password: "password123",
 * });
 * ```
 *
 * @param {LoginParameters} params - The parameters required for logging in the user.
 * @throws {Error} If the required parameters `username` or `password` are missing.
 * @returns {Promise<LoginResponse>} Resolves to an object containing the user's login information.
 */
export declare function login({ username, password, withUser, }: LoginParameters): Promise<LoginResponse>;
/**
 * 🚪 Logs out the user.
 *
 * This function logs out the user by revoking their authentication token.
 *
 * 🛠 **Endpoint**: `POST /auth/revoke-token [AUTH-103]`
 *
 * | Parameter | Type | Required | Description |
 * |-----------|------|----------|-------------|
 * | *(none)*  | -    | -        | This function does not require any parameters. |
 *
 * 📤 **Returns**:
 * A `Promise<void>` that resolves when the user is successfully logged out. No additional data is returned.
 *
 * 🛠 **Example usage**:
 * ```ts
 * await logout();
 * ```
 *
 * @throws {Error} If there is an issue with the logout process (e.g., network error).
 * @returns {Promise<void>} Resolves when the logout is successful.
 */
export declare function logout(): Promise<void>;
/**
 * ⚙️ Récupère les paramètres globaux du shop.
 *
 * Cette fonction permet d'obtenir les paramètres de configuration du shop.
 *
 * 🛠 **Endpoint**: `GET /v1/shop/settings` [SETTINGS-500]
 *
 * 📤 **Returns**:
 * A `Promise<SettingsResponse>` contenant les paramètres du shop, notamment:
 * - `manualAccountCheck` (boolean): Indique si la vérification manuelle des comptes est activée.
 *
 * 🛠 **Example usage**:
 * ```ts
 * const settings = await getSettings();
 * console.log(settings.manualAccountCheck); // true
 * ```
 *
 * @returns {Promise<SettingsResponse>} Une promesse qui résout avec les paramètres du shop.
 */
export declare function getSettings(): Promise<SettingsResponse>;
/**
 * 🏪 Récupère les informations d'un magasin spécifique.
 *
 * Cette fonction permet d'obtenir les détails d'un magasin à partir de son identifiant.
 *
 * 🛠 **Endpoint**: `GET /v1/shop/stores/{storeId}` [STORE-500]
 *
 * | Parameter  | Type     | Required | Description                          |
 * |------------|----------|----------|--------------------------------------|
 * | `storeId`  | `string` | ✅       | L'identifiant unique du magasin.     |
 *
 * 📤 **Returns**:
 * A `Promise<Store>` contenant les informations détaillées du magasin, notamment:
 * - `active`: État d'activation du magasin
 * - `customFieldValues`: Valeurs des champs personnalisés
 * - `description`: Description du magasin
 * - `externalId`: Identifiant externe
 * - `id`: Identifiant interne
 * - `name`: Nom du magasin
 * - `storeLocales`: Informations de localisation
 *
 * 🛠 **Example usage**:
 * ```ts
 * const store = await getStore({
 *   storeId: "123e4567-e89b-12d3-a456-426614174000"
 * });
 * console.log(store.name); // "Mon Magasin"
 * ```
 *
 * @param {GetStoreParameters} params - Les paramètres pour récupérer le magasin.
 * @throws {Error} Si le paramètre `storeId` est manquant.
 * @returns {Promise<Store>} Une promesse qui résout avec les informations du magasin.
 */
export declare function getStore({ storeId, }: GetStoreParameters): Promise<Store>;
//# sourceMappingURL=index.d.ts.map