@trlogic/tracker-web
Version:
Formica Tracker Web SDK
13 lines (12 loc) • 451 B
TypeScript
import { Event } from "src/core/model/Event";
import { EventResult } from "src/core/model/EventResult";
import { TrackerConfig } from "src/core/model/TrackerConfig";
/**
* Contract for HTTP communication with the backend.
* Mirrors Android NetworkService interface.
*/
export interface NetworkService {
fetchConfiguration(): Promise<TrackerConfig>;
sendEvent(event: Event): Promise<EventResult | null>;
isNetworkAvailable(): boolean;
}