@aws-amplify/core
Version:
Core category of aws-amplify
25 lines (24 loc) • 769 B
TypeScript
import { BufferedEvent, PinpointEventBufferConfig } from '../types/buffer';
import { AuthSession } from '../../../singleton/Auth/types';
export declare class PinpointEventBuffer {
private _config;
private _interval;
private _buffer;
private _pause;
private _flush;
constructor(config: PinpointEventBufferConfig);
push(event: BufferedEvent): void;
pause(): void;
resume(): void;
flush(): void;
identityHasChanged(identityId: AuthSession['identityId']): boolean;
flushAll(): void;
private _startLoop;
private _sendBatch;
private _putEvents;
private _generateBatchEventParams;
private _handlePutEventsFailure;
private _processPutEventsSuccessResponse;
private _retry;
private _bufferToMap;
}