@the-it-dept/bugsplat-react 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,13 @@
1
+ import { SplatConfig } from './types';
2
+
3
+ interface WidgetProps {
4
+ config: SplatConfig;
5
+ /** When true, use absolute positioning (for container mode) */
6
+ contained?: boolean;
7
+ /** External open state for trigger mode */
8
+ externalOpen?: boolean;
9
+ /** Callback when widget requests to close in trigger mode */
10
+ onClose?: () => void;
11
+ }
12
+ export declare function Widget({ config, contained, externalOpen, onClose }: WidgetProps): import("react/jsx-runtime").JSX.Element | null;
13
+ export {};
@@ -0,0 +1,24 @@
1
+ import { ReportSummary, ReportDetail, WidgetConfig, ReportMetadata } from '../types';
2
+
3
+ export declare class SplatClient {
4
+ private apiKey;
5
+ private baseUrl;
6
+ private reporterToken;
7
+ constructor(apiKey: string, apiUrl?: string);
8
+ setReporterToken(token: string | null): void;
9
+ private request;
10
+ submitReport(data: {
11
+ title: string;
12
+ description: string;
13
+ email: string;
14
+ screenshot?: string;
15
+ metadata?: ReportMetadata;
16
+ }): Promise<{
17
+ report_id: string;
18
+ reporter_token: string;
19
+ status: string;
20
+ }>;
21
+ getReports(): Promise<ReportSummary[]>;
22
+ getReport(id: string): Promise<ReportDetail>;
23
+ getConfig(): Promise<WidgetConfig>;
24
+ }