UNPKG

@triagly/sdk

Version:

JavaScript SDK for Triagly - Turn user feedback into GitHub issues instantly

37 lines 919 B
import { TriaglyConfig, FeedbackData } from './types'; export declare class Triagly { private config; private widget; private api; private rateLimiter; private consoleLogger; constructor(config: TriaglyConfig); /** * Initialize the SDK */ private init; /** * Handle feedback submission */ private handleSubmit; /** * Programmatically open the feedback widget */ open(): void; /** * Programmatically close the feedback widget */ close(): void; /** * Submit feedback programmatically without UI * Note: When Turnstile is enabled, you must use the widget UI or provide a token */ submit(data: FeedbackData, turnstileToken?: string): Promise<void>; /** * Destroy the SDK instance */ destroy(): void; } export * from './types'; export default Triagly; //# sourceMappingURL=index.d.ts.map