import { TokenHttpClientConfig } from "./http/tokenHttpClient"; import { AuthService } from "./services/authService"; import { CustomerService } from "./services/customerService"; import { AppraiserService } from "./services/appraiserService"; import { MeetingService } from "./services/meetingService"; /** * ErmisService – Main class for authenticated API operations. * * Manages Auth, Customer, and Appraiser modules using * Bearer token authentication. Works alongside `EkycService` * (which uses API key authentication). * * Uses the **Singleton pattern** to ensure only one instance * exists throughout the entire application. * * @example * ```typescript * // Initialize the service * const ermis = ErmisService.getInstance({ * baseUrl: 'https://api.example.com', * }); * * // Login * const authResult = await ermis.auth.login({ * username: 'admin', * password: 'password', * }); * * // Set the token after login * ermis.setToken(authResult.access_token); * * // Use authenticated APIs * const { data: customers } = await ermis.customers.getCustomers(); * const { data: appraisers } = await ermis.appraisers.getAppraisers(); * ``` */ export declare class ErmisService { private static instance; private readonly tokenHttpClient; /** Auth service – login, register, logout */ readonly auth: AuthService; /** Customer service – CRUD operations */ readonly customers: CustomerService; /** Appraiser service – list and create */ readonly appraisers: AppraiserService; /** Meeting service – appraisal sessions CRUD */ readonly meetings: MeetingService; private constructor(); /** * Get the singleton instance of ErmisService. * If no instance exists, a new one will be created with the provided config. * * @param config - Service configuration (required on first call) * @returns The singleton instance of ErmisService * @throws {EkycError} When called for the first time without config */ static getInstance(config?: TokenHttpClientConfig): ErmisService; /** * Reset the singleton instance (useful for testing or reconfiguration). */ static resetInstance(): void; /** * Set the authentication token (call after successful login). * * @param token - The access token from the login response */ setToken(token: string): void; /** * Clear the authentication token (call on logout). */ clearToken(): void; private validateConfig; } //# sourceMappingURL=ErmisService.d.ts.map