import IStorage from "./storage/storage"; import IReporter from "./reporter/reporter"; export default class Tracer { private config; private storage; private reporter; readonly debug: boolean; readonly url: string; readonly appVersion: string; readonly appKey: string; userid: string; env: Env; readonly offlineMaxNum: number; readonly offlineLog: boolean; readonly delay: number; constructor(option: Option); push(action: Action): void; nav(navigation: Navigation): void; reportOffline(): void; report(action: Action): void; private send; private normalize; private checkOption; } export declare const CategoryTypes: { reserved: string; navigation: string; event: string; eventStart: string; eventEnd: string; }; export declare type Action = { id: string; name?: string; category?: string; desc?: string; ext?: string; tags?: string[]; }; export declare type Navigation = { id: string; name?: string; category?: "navigation"; from: string; desc?: string; ext?: string; tags?: string[]; }; export declare type Record = (Action | Navigation) & { timestamp: string; userid: string; ip: string; networkMode: string; }; export declare type ReportData = { appVersion: string; appKey: string; uniqueId: string; channel: string; env: Env; logs: Record[]; }; declare type Storage = IStorage; declare type Reporter = IReporter; export declare type Option = { debug?: boolean; appVersion: string; appKey: string; channel: string; env?: Env; delay?: number; beforeSend?: (records: Record[]) => Record[]; afterSend?: () => void; userid?: string; offlineMaxNum?: number; offlineLog?: boolean; storage?: Storage; reporter?: Reporter; }; export declare type Config = { debug: boolean; appVersion: string; appKey: string; channel: string; env: Env; delay: number; beforeSend?: (records: Record[]) => Record[]; afterSend?: () => void; userid: string; offlineMaxNum: number; offlineLog: boolean; }; export declare type Env = "dev" | "test" | "release"; export {};