UNPKG

@mopinion/survey

Version:

Collect customer feedback with the Mopinion survey library

23 lines (19 loc) 714 B
declare module '@mopinion/survey' { export interface SurveyOptions { triggerMethod: 'passive' | 'proactive'; container: HTMLElement; domain: string; key: string; showButton?: boolean; forceType?: 'modal' | 'slide' | 'embed' } export type SurveyEvents = 'shown' | 'hidden' | 'loaded' | 'next' | 'previous' | 'feedback_sent' | 'redirect' | 'question_answered'; export interface MopinionSurvey { open(options: SurveyOptions): void; clearForm(formKey: string): void; addEventListener(event: SurveyEvents, fn: Function): void; removeEventListener(event: SurveyEvents, fn: Function): void; } const mopinionSurvey: MopinionSurvey; export default mopinionSurvey; }