UNPKG

@2l/ewa-analytics-web-sdk

Version:

A lightweight TypeScript SDK for tracking user events and analytics data in web applications. Provides real-time event tracking with support for both WebSocket and HTTP transport methods.

15 lines 534 B
import type { ClientConfig, RequestOptions } from './types'; export declare class ApiClient { private readonly baseURL?; private headers?; constructor(config?: ClientConfig); private buildUrl; private isValidUrl; private buildRequestOptions; private sendRequest; private handleErrorResponse; private fetch; setHeaders(headers: Record<string, string>, replace?: boolean): void; post<T>(path: string, body: object, options?: RequestOptions): Promise<T>; } //# sourceMappingURL=client.d.ts.map