UNPKG

@blue-impact-engine/blue-impact-engine-client

Version:
88 lines 2.65 kB
/** * Blue Impact Engine Client * Main entry point for the Blue Impact Engine API client library * @packageDocumentation */ import { HttpClient } from './core'; import type { UserService } from './domains/users'; import { ProjectService } from './domains/projects'; import { ClientConfig, RequestOptions } from './core'; import { DonationService } from './domains/donations'; import { MediaService } from './domains/media'; /** * Blue Impact Engine API Client * Main client class that provides access to all API resources * * @example * ```typescript * import { BlueImpactClient } from '@blue-impact-engine/client'; * * const client = new BlueImpactClient({ * baseUrl: 'https://api.blue-impact-engine.com', * apiKey: 'your-api-key', * debug: true * }); * * // Use the client * const users = await client.users.getAll(); * const projects = await client.projects.getAll(); * const media = await client.media.getAll(); * ``` */ export declare class BlueImpactClient { private httpClient; users: UserService; projects: ProjectService; donations: DonationService; media: MediaService; /** * Create a new Blue Impact Engine client instance * @param config - Client configuration */ constructor(config: ClientConfig); /** * Get the underlying HTTP client * @returns HttpClient instance */ getHttpClient(): HttpClient; /** * Update client configuration * @param newConfig - New configuration options */ updateConfig(newConfig: Partial<ClientConfig>): void; /** * Get current client configuration * @returns Current configuration */ getConfig(): ClientConfig; /** * Set API key for authentication * @param apiKey - API key */ setApiKey(apiKey: string): void; /** * Clear API key */ clearApiKey(): void; /** * Test API connectivity * @param options - Request options * @returns Promise<boolean> - True if connection is successful */ testConnection(options?: RequestOptions): Promise<boolean>; /** * Get API version information * @param options - Request options * @returns Promise<ApiResponse<{ version: string; build: string; environment: string }>> */ getVersion(options?: RequestOptions): Promise<import("./core").ApiResponse<{ version: string; build: string; environment: string; }>>; } export default BlueImpactClient; export * as utils from './utils'; export declare const VERSION = "1.0.0"; export declare const SUPPORTED_API_VERSIONS: string[]; //# sourceMappingURL=blueImpactClient.d.ts.map