/**
 * # 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
 * - Retrieve shop settings and store information
 *
 * Each method is described with its input parameters, output responses, and example usages.
 *
 * @module services/auth
 * @since 2.17.0
 */
import { BaseService } from "../base.service";
import type { RequestContext } from "../../client/transport";
import type { IsTokenValidParams, RefreshTokenParams, ResetPasswordParams, SendResetPasswordEmailParams, LoginParams, GetStoreParams, RefreshTokenResponse, LoginResponse, SettingsResponse, Store } from "./types";
/**
 * Service for authentication and authorization operations.
 *
 * Provides methods for:
 * - 🔐 User login/logout
 * - 🔄 Token validation and refresh
 * - 🔑 Password reset
 * - ⚙️ Shop settings and store information
 *
 * @example
 * ```typescript
 * import { createDjustClient } from '@djust-b2b/djust-front-sdk';
 *
 * const client = createDjustClient({
 *   baseUrl: 'https://api.djust.io',
 *   clientId: 'your-client-id',
 *   apiKey: 'your-api-key',
 * });
 *
 * // Login
 * const { token, user } = await client.auth.login({
 *   username: 'user@example.com',
 *   password: 'password123',
 * });
 *
 * // Validate token
 * const isValid = await client.auth.isTokenValid({ token: token.accessToken });
 * ```
 */
export declare class AuthService extends BaseService {
    readonly serviceName = "auth";
    /**
     * 🔐 Validates if a token is still active and unexpired.
     *
     * This method 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
     * ```typescript
     * const isValid = await client.auth.isTokenValid({
     *   token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
     * });
     * console.log(isValid); // true
     * ```
     *
     * @param params - The parameters for validating the token.
     * @param context - Optional request context for SSR.
     * @throws {ValidationError} If the required `token` parameter is missing.
     * @returns A promise that resolves to a boolean indicating whether the token is valid.
     */
    isTokenValid(params: IsTokenValidParams, context?: RequestContext): Promise<boolean>;
    /**
     * 🔄 Requests a new access token using a refresh token.
     *
     * This method 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
     * ```typescript
     * const response = await client.auth.refreshToken({
     *   refreshToken: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
     * });
     * console.log(response.token.accessToken);
     * console.log(response.token.expiresAt);
     * ```
     *
     * @param params - The parameters for requesting a new token.
     * @param context - Optional request context for SSR.
     * @throws {ValidationError} If the required `refreshToken` parameter is missing.
     * @returns A promise that resolves to the response containing the new token and user details.
     */
    refreshToken(params: RefreshTokenParams, context?: RequestContext): Promise<RefreshTokenResponse>;
    /**
     * 🔑 Resets the password of a user.
     *
     * This method 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 when the password is successfully reset.
     *
     * @example
     * ```typescript
     * await client.auth.resetPassword({
     *   newPassword: "mySecurePassword2025!",
     *   resetPasswordToken: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
     * });
     * ```
     *
     * @param params - The parameters required for resetting the password.
     * @param context - Optional request context for SSR.
     * @throws {ValidationError} If the required parameters `newPassword` or `resetPasswordToken` are missing.
     */
    resetPassword(params: ResetPasswordParams, context?: RequestContext): Promise<void>;
    /**
     * 📧 Sends a reset password email to a user.
     *
     * This method 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. |
     * | `redirectUrl` | `string` | ❌       | Optional URL to redirect after password reset.     |
     *
     * 📤 **Returns**:
     * A `Promise<void>` that resolves when the reset password email is successfully sent.
     *
     * @example
     * ```typescript
     * await client.auth.sendResetPasswordEmail({
     *   email: "user@example.com",
     *   redirectUrl: "https://myapp.com/reset-password",
     * });
     * ```
     *
     * @param params - The parameters required to send the reset password email.
     * @param context - Optional request context for SSR.
     * @throws {ValidationError} If the required parameter `email` is missing.
     */
    sendResetPasswordEmail(params: SendResetPasswordEmailParams, context?: RequestContext): Promise<void>;
    /**
     * 🔐 Logs in a user.
     *
     * This method 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` and details (if `withUser` is true).
     *
     * @example
     * ```typescript
     * const loginResponse = await client.auth.login({
     *   username: "user@example.com",
     *   password: "password123",
     * });
     *
     * console.log(loginResponse.token.accessToken);
     * console.log(loginResponse.user.id);
     * ```
     *
     * @param params - The parameters required for logging in the user.
     * @param context - Optional request context for SSR.
     * @throws {ValidationError} If the required parameters `username` or `password` are missing.
     * @throws {AuthError} If credentials are invalid.
     * @returns Resolves to an object containing the user's login information.
     */
    login(params: LoginParams, context?: RequestContext): Promise<LoginResponse>;
    /**
     * 🚪 Logs out the user.
     *
     * This method logs out the user by revoking their authentication token.
     *
     * 🛠 **Endpoint**: `POST /auth/revoke-token [AUTH-103]`
     *
     * | Parameter | Type | Required | Description |
     * |-----------|------|----------|-------------|
     * | *(none)*  | -    | -        | This method does not require any parameters. |
     *
     * 📤 **Returns**:
     * A `Promise<void>` that resolves when the user is successfully logged out.
     *
     * @example
     * ```typescript
     * await client.auth.logout();
     * // User is now logged out, token is revoked
     * ```
     *
     * @param context - Optional request context for SSR.
     * @throws {NetworkError} If there is an issue with the logout process.
     */
    logout(context?: RequestContext): Promise<void>;
    /**
     * ⚙️ Retrieves shop settings.
     *
     * This method retrieves the global configuration settings for the shop.
     *
     * 🛠 **Endpoint**: `GET /v1/shop/settings [SETTINGS-500]`
     *
     * 📤 **Returns**:
     * A `Promise<SettingsResponse>` containing the shop settings, including:
     * - `manualAccountCheck` (boolean): Indicates if manual account verification is enabled.
     *
     * @example
     * ```typescript
     * const settings = await client.auth.getSettings();
     * console.log(settings.manualAccountCheck); // true
     * ```
     *
     * @param context - Optional request context for SSR.
     * @returns A promise that resolves with the shop settings.
     */
    getSettings(context?: RequestContext): Promise<SettingsResponse>;
    /**
     * 🏪 Retrieves store information.
     *
     * This method retrieves detailed information about a specific store by its identifier.
     *
     * 🛠 **Endpoint**: `GET /v1/shop/stores/{storeId} [STORE-500]`
     *
     * | Parameter  | Type     | Required | Description                          |
     * |------------|----------|----------|--------------------------------------|
     * | `storeId`  | `string` | ✅       | The unique identifier of the store.  |
     *
     * 📤 **Returns**:
     * A `Promise<Store>` containing detailed store information, including:
     * - `active`: Store activation status
     * - `customFieldValues`: Custom field values
     * - `description`: Store description
     * - `externalId`: External identifier
     * - `id`: Internal identifier
     * - `name`: Store name
     * - `storeLocales`: Localization information
     *
     * @example
     * ```typescript
     * const store = await client.auth.getStore({
     *   storeId: "123e4567-e89b-12d3-a456-426614174000"
     * });
     * console.log(store.name); // "My Store"
     * console.log(store.active); // true
     * ```
     *
     * @param params - The parameters to retrieve the store.
     * @param context - Optional request context for SSR.
     * @throws {ValidationError} If the `storeId` parameter is missing.
     * @throws {NotFoundError} If the store is not found.
     * @returns A promise that resolves with the store information.
     */
    getStore(params: GetStoreParams, context?: RequestContext): Promise<Store>;
}
//# sourceMappingURL=auth.service.d.ts.map