@causalfoundry/js-sdk
Version:
Causal Foundry WEB SDK (JS/TS)
27 lines (26 loc) • 869 B
TypeScript
import { NetworkProxy } from '../drivers/network/typings';
import { Event, LogIngestorOptions } from "./typings";
export interface ISenderRepository {
add(userId: string, deviceId: string, event: Event, forceSend: boolean): void;
flush(): any;
}
export default class CfSender implements ISenderRepository {
private flushing;
private flushIntervalId;
private cfNetwork;
private debug;
private options;
private endpointURL;
private userId;
private deviceId;
private queue;
constructor(cfNetwork: NetworkProxy, options: LogIngestorOptions);
private removeQueueItemsExceedMaxRetries;
private removeFromQueue;
private updateQueueCache;
private addRetries;
flush(): void;
private send;
private generateSessionID;
add(userId: string, deviceId: string, event: Event, forceSend?: boolean): void;
}