index-ticketing
Version:
Automatic error tracking and ticketing system integration
78 lines • 2.52 kB
TypeScript
import { ClientErrorHandler } from './client/error-handler';
import { IndexTicketingConfig } from './types';
export * from './types';
export * from './integrations/react';
export { generateFingerprint } from './utils/fingerprint';
export { BreadcrumbBuffer } from './utils/breadcrumbs';
/**
* Main IndexTicketing class
*/
export declare class IndexTicketing {
private errorHandler;
private apiClient;
private config;
constructor(config: IndexTicketingConfig);
/**
* Install global error handlers
*/
install(): void;
/**
* Uninstall global error handlers
*/
uninstall(): void;
/**
* Manually capture an error
*/
captureError(error: Error, extra?: Record<string, any>): Promise<void>;
/**
* Capture a message
*/
captureMessage(message: string, level?: 'info' | 'warning' | 'error' | 'debug', extra?: Record<string, any>): Promise<void>;
/**
* Add a breadcrumb
*/
addBreadcrumb(message: string, category?: string, level?: 'info' | 'warning' | 'error' | 'debug', data?: Record<string, any>): void;
/**
* Set user context
*/
setUser(user: {
id?: string;
email?: string;
name?: string;
}): void;
/**
* Set tags
*/
setTags(tags: Record<string, string>): void;
/**
* Update configuration
*/
configure(newConfig: Partial<IndexTicketingConfig>): void;
/**
* Test connection to ticketing system
*/
testConnection(): Promise<boolean>;
/**
* Get the underlying error handler (for advanced usage)
*/
getErrorHandler(): ClientErrorHandler;
}
/**
* Initialize IndexTicketing globally
*/
export declare function init(config: IndexTicketingConfig): IndexTicketing;
/**
* Get the global instance
*/
export declare function getCurrentHub(): IndexTicketing | null;
export declare function captureError(error: Error, extra?: Record<string, any>): Promise<void>;
export declare function captureMessage(message: string, level?: 'info' | 'warning' | 'error' | 'debug', extra?: Record<string, any>): Promise<void>;
export declare function addBreadcrumb(message: string, category?: string, level?: 'info' | 'warning' | 'error' | 'debug', data?: Record<string, any>): void;
export declare function setUser(user: {
id?: string;
email?: string;
name?: string;
}): void;
export declare function setTags(tags: Record<string, string>): void;
export default IndexTicketing;
//# sourceMappingURL=index.d.ts.map