quala-widget
Version:
Smart feedback widget for SaaS trial optimization
49 lines • 1.21 kB
TypeScript
export type Question = {
id: string;
text: string;
required?: boolean;
type?: 'text' | 'textarea' | 'rating' | 'multiple_choice' | 'boolean';
options?: string[];
placeholder?: string;
};
export type ModalStyle = {
modalColor?: string;
modalBoxColor?: string;
triggerColor?: string;
progressBarColor?: string;
progressTrackColor?: string;
buttonColor?: string;
backButtonColor?: string;
inputFocusColor?: string;
};
export type QualaUser = {
userId: string;
email?: string;
trialStartDate?: string;
};
export type TriggerConditions = {
minTrialDays?: number;
delayMs?: number;
};
export interface InitResponse {
sessionToken: string;
shouldShow: boolean;
questionGroupId?: string;
projectName?: string;
}
export interface QuestionsResponse {
questions: Array<{
id: string;
type: 'text' | 'textarea' | 'rating' | 'multiple_choice' | 'boolean';
text: string;
required: boolean;
options?: string[];
placeholder?: string;
}>;
}
export interface SubmitResponse {
success: boolean;
responseId?: string;
message?: string;
}
//# sourceMappingURL=types.d.ts.map