@gibraltarsoftware/loupe-typescript
Version:
Loupe Agent for Web clients
83 lines (82 loc) • 3.82 kB
TypeScript
import { Header } from './Header';
import { ILocalPlatform } from './LocalPlatform';
import { LogMessageSeverity } from './LogMessageSeverity';
import { MethodSourceInfo } from './MethodSourceInfo';
export declare class LoupeAgent {
private readonly window?;
private readonly document?;
private readonly clientPlatform?;
propagateError: boolean;
readonly loupeAgentSessionIdHeader = "loupe-agent-sessionId";
readonly loupeSessionIdHeader = "LoupeSessionId";
sessionId: string;
agentSessionId: string;
private maxRequestSize;
private messageInterval;
private exceptionCategory;
private readonly loupeAgentSessionIdKey;
private existingOnError;
private sequenceNumber;
private messageStorage;
private storageAvailable;
private storageFull;
private corsOrigin;
private credentialsType;
private globalKeyList;
private headers;
constructor(window?: Window | null | undefined, document?: Document | null | undefined, clientPlatform?: ILocalPlatform | undefined);
verbose(category: string, caption: string, description: string, parameters?: any[] | null, exception?: any | null, details?: any | null, methodSourceInfo?: MethodSourceInfo | null): void;
information(category: string, caption: string, description: string, parameters?: any[] | null, exception?: any | null, details?: any | null, methodSourceInfo?: MethodSourceInfo | null): void;
warning(category: string, caption: string, description: string, parameters?: any[] | null, exception?: any | null, details?: any | null, methodSourceInfo?: MethodSourceInfo | null): void;
error(category: string, caption: string, description: string, parameters?: any[] | null, exception?: any | null, details?: any | null, methodSourceInfo?: MethodSourceInfo | null): void;
critical(category: string, caption: string, description: string, parameters?: any[] | null, exception?: any | null, details?: any | null, methodSourceInfo?: MethodSourceInfo | null): void;
recordException(exception: any, details?: any, category?: string): void;
write(severity: LogMessageSeverity, category: string, caption: string, description: string, parameters?: any[] | null, exception?: any | null, details?: any | null, methodSourceInfo?: MethodSourceInfo | null): void;
flushToServer(): void;
setSessionId(value: string): void;
setLogServer(value: string | null, credentialsType?: RequestCredentials): void;
addHeader(header: Header): void;
clientSessionHeader(): Header;
resetMessageInterval(interval: number): void;
private storageSupported;
private sanitiseArgument;
private buildMessageSourceInfo;
private setUpOnError;
private getPlatform;
private getStackTrace;
private createStackFromMessage;
private createStackFromError;
private stripLoupeStackFrames;
private userFramesStartAt;
private logError;
private isStorageQuotaReached;
private setUpClientSessionId;
private storeClientSessionId;
private getClientSessionHeader;
private setUpSequenceNumber;
private getNextSequenceNumber;
private getSequenceNumber;
private setSequenceNumber;
private createMessage;
private storeMessage;
private createExceptionFromError;
private createTimeStamp;
private generateUUID;
private truncateDetails;
private dropMessage;
private overSizeMessage;
private messageSort;
private getMessagesToSend;
private removeKeysFromGlobalList;
private removeMessagesFromStorage;
private setMessageInterval;
private debounce;
private logMessageToServer;
private afterRequest;
private requestSucceeded;
private requestFailed;
private getOrigin;
private sendMessageToServer;
private stripTrailingSlash;
private consoleLog;
}