light-sentry-sdk/dist/utils/env.d.ts

50 lines
1.2 KiB
TypeScript

export interface BrowserInfo {
name: string;
version: string;
major: string;
}
export interface OSInfo {
name: string;
version: string;
}
export interface DeviceInfo {
type: 'desktop' | 'mobile' | 'tablet';
vendor: string;
model: string;
}
export interface EnvInfo {
browser: BrowserInfo;
os: OSInfo;
device: DeviceInfo;
url: string;
referrer: string;
title: string;
language: string;
user_agent: string;
screen_width: number;
screen_height: number;
viewport_width: number;
viewport_height: number;
}
export declare function getEnvInfo(): EnvInfo;
export declare function getPageUrl(): string;
export declare function getReferrer(): string;
export declare function sanitizeUrl(url: string): string;
export declare function shouldIgnoreUrl(url: string, ignoreUrls?: (string | RegExp)[]): boolean;
export declare function getContexts(): {
browser: {
name: string;
version: string;
};
os: {
name: string;
version: string;
};
device: {
type: "desktop" | "mobile" | "tablet";
brand: string;
model: string;
};
};
export declare function getContextId(): string;