@critters/next
Version:
Secure bug reporting library for Next.js applications
91 lines (90 loc) • 2.24 kB
TypeScript
import { BugTrackerConfigOptions } from "./types";
/**
* Configuration manager for the bug tracker
*/
export declare class BugTrackerConfig {
private static instance;
private _config;
private _initialized;
private constructor();
/**
* Initialize the configuration
*/
static init(config: BugTrackerConfigOptions): BugTrackerConfig;
/**
* Get the configuration instance
*/
static getInstance(): BugTrackerConfig;
/**
* Update configuration
*/
update(config: Partial<BugTrackerConfigOptions>): void;
/**
* Check if the bug tracker is initialized
*/
isInitialized(): boolean;
/**
* Check if the bug tracker is enabled
*/
isEnabled(): boolean;
/**
* Check if debug mode is enabled
*/
isDebugMode(): boolean;
/**
* Get the API key
*/
getApiKey(): string;
/**
* Get the secret key
*/
getSecretKey(): string | undefined;
/**
* Get the endpoint
*/
getEndpoint(): string;
/**
* Get the project ID
*/
getProjectId(): string | undefined;
/**
* Get the environment
*/
getEnvironment(): string;
/**
* Get the onBeforeReport hook
*/
getOnBeforeReport(): ((report: import("./types").BugReport) => import("./types").BugReport | false) | undefined;
/**
* Get the onAfterReport hook
*/
getOnAfterReport(): ((report: import("./types").BugReport, result: import("./types").ReportResult) => void) | undefined;
/**
* Check if console capture is enabled
*/
shouldCaptureConsole(): boolean;
/**
* Check if network request capture is enabled
*/
shouldCaptureNetworkRequests(): boolean;
/**
* Check if user interaction capture is enabled
*/
shouldCaptureUserInteractions(): boolean;
/**
* Check if application state capture is enabled
*/
shouldCaptureApplicationState(): boolean;
/**
* Get the full configuration
*/
getConfig(): BugTrackerConfigOptions;
/**
* Set the secret key
*/
setSecretKey(secretKey: string): void;
/**
* Set the project ID
*/
setProjectId(projectId: string): void;
}