export declare class SurvicateIntegrations { } declare class Survicate { static integrations: SurvicateIntegrations; static setWorkspaceKey(workspaceKey: string): void; static initializeSdk(): void; static invokeEvent(eventName: string, eventProperties?: Record): void; static enterScreen(screenName: string): void; static leaveScreen(screenName: string): void; /** * @deprecated Use setUserTrait(userTrait: UserTrait) method with `user_id' UserTrait instead. */ static setUserId(userId: string): void; /** * @deprecated Use setUserTrait(userTrait: UserTrait) method instead. */ static setUserTrait(traitName: string, traitValue: string): void; static setUserTrait(userTrait: UserTrait): void; static reset(): void; static addSurvicateEventListener(listener: SurvicateEventListener): () => void; /** * Sets the preferred locale used for survey translations and targeting filters. * The specified locale takes priority over the device's default locale. * * This method affects only the Survicate SDK and does not change in any way the app locale settings. * * @param languageTag An IETF language tag such as: * - Two-letter ISO 639 language code (e.g., "en", "fr") * - Three-letter ISO 639 language code for languages without the two-letter code (e.g., "haw", "yue") * - Language with region (e.g., "en-US", "pt-BR") * - Language with script (e.g., "zh-Hans") */ static setLocale(languageTag: string): void; /** * Sets the theme mode for survey appearance. * * @param themeMode The theme mode to apply: ThemeMode.light, ThemeMode.dark, or ThemeMode.auto (default). */ static setThemeMode(themeMode: ThemeMode): void; /** * Sets custom fonts for use in surveys. * * @param fontSystem A font configuration to apply. */ static setFonts(fontSystem: SurvicateFontSystem): void; /** * Shorthand version of {@link setResponseAttributes}. */ static setResponseAttribute(attribute: ResponseAttribute): void; /** * Sets response attributes that will be attached to survey responses. * * These can be arbitrary key-value pairs. Unlike {@link UserTrait}s, response attributes * are session-scoped and are cleared upon a new app session. Response attributes are sent * to the system along with the user's answers to survey questions. * * To change a {@link ResponseAttribute} send the same key with a different value. */ static setResponseAttributes(attributes: ResponseAttribute[]): void; } export declare class UserTrait { key: string; value: string; constructor(key: string, value: string | number | boolean | Date); } export type SurveyDisplayedEvent = { surveyId: string; }; export type QuestionAnsweredEvent = { surveyId: string; surveyName: string; visitorUuid: string; responseUuid: string; questionId: string; question: string | null; answer: SurvicateAnswer; panelAnswerUrl: string; }; export type SurvicateAnswer = { type: string | null; id: number | null; ids: number[]; value: string | null; }; export type SurveyCompletedEvent = { surveyId: string; }; export type SurveyClosedEvent = { surveyId: string; }; export interface SurvicateEventListener { onSurveyDisplayed?: (event: SurveyDisplayedEvent) => void; onQuestionAnswered?: (event: QuestionAnsweredEvent) => void; onSurveyCompleted?: (event: SurveyCompletedEvent) => void; onSurveyClosed?: (event: SurveyClosedEvent) => void; } export declare enum ThemeMode { light = "light", dark = "dark", auto = "auto" } /** * Represents a complete set of fonts used by the SDK. * * @property regular Standard font for normal body text. * @property regularItalic Standard font with italic slant. * @property bold Bold style font for emphasized content. * @property boldItalic Bold style font with italic slant. */ export type SurvicateFontSystem = { regular: string; regularItalic: string; bold: string; boldItalic: string; }; /** * Represents a response attribute attached to a survey response. * * @property name The attribute identifier. * @property value The attribute value. * @property provider Optional source or provider of the attribute. */ export declare class ResponseAttribute { name: string; value: string; provider?: string; constructor(name: string, value: string | number | boolean | Date, provider?: string); } export default Survicate; //# sourceMappingURL=index.d.ts.map