npaw-plugin-nwf
Version:
NPAW's Plugin
24 lines (23 loc) • 1 kB
TypeScript
import FastDataService from '../FastDataService';
import CoreStorage from '../storage/CoreStorage';
import { Method } from '../../common/Constants';
import CoreOptions from '../CoreOptions';
import { Service } from './Services';
import ExpirationManager from '../../common/ExpirationManager';
export default class NQSAnalyticsService {
private coreStorage;
private timeOfLastSentRequest?;
private options;
private fastDataService;
private timeWhenLastSentFromDatabase?;
private databaseSendingInterval;
private isDestroyed;
private servicesToWait;
private sentStart;
private readonly requestQueue;
constructor(options: CoreOptions, coreStorage: CoreStorage, fastDataService: FastDataService);
destroy(): void;
send(service: Service, method: Method, params: any, onSuccessCallback?: () => void, onFailCallback?: () => void, expirationManager?: ExpirationManager): void;
getTimeOfLastSentRequest(): number | undefined;
wasStartSent(): boolean;
}