UNPKG

@cherish8change/naviot-fillingpoint_sdk

Version:

naviot埋点SDK

39 lines (37 loc) 1.12 kB
interface ReporStruct { reportId: string; userId: string; tag: string; moduleName: string; action: string; params: any; latitude: number; longitude: number; timestamp: number; mobile: boolean; userAgent: string; platform: string; } type CommStr = Pick<ReporStruct, 'reportId' | 'userId' | 'latitude' | 'longitude' | 'mobile' | 'userAgent' | 'platform'>; declare class FillingPointSDK { private data; private enable; private STORAGE_KEY; private timeout; private url; private headers; constructor(config: { url: string; userId: string; platform: string; mobile?: boolean; headers?: RequestInit['headers']; }); listenerGeoChange(): void; getData<T extends keyof CommStr>(key: T): CommStr[T]; setData<T extends keyof CommStr>(key: T, value: CommStr[T]): void; setTime(time: number): void; disable(): void; repor(tag: string, moduleName: ReporStruct['moduleName'], action: ReporStruct['action'], params?: ReporStruct['params']): void; } export { FillingPointSDK as default };