import type { TResponseData, TResponseUpdate } from "../types/response"; import type { TFileUploadParams, TUploadFileConfig } from "../types/storage"; import type { TOverlay } from "./common"; import type { TWorkspaceStyling } from "./workspace"; export interface TJsFileUploadParams { file: { type: string; name: string; base64: string; }; params: { maxSizeInMB?: number; folder?: string; allowedExtensions?: string[]; }; } export interface SurveyBaseProps { survey: TSurvey; styling: TSurvey["styling"] | TWorkspaceStyling; isBrandingEnabled: boolean; getSetIsError?: (getSetError: (value: boolean) => void) => void; getSetIsResponseSendingFinished?: (getSetIsResponseSendingFinished: (value: boolean) => void) => void; getSetQuestionId?: (getSetQuestionId: (value: string) => void) => void; getSetResponseData?: (getSetResponseData: (value: TResponseData) => void) => void; onDisplay?: () => void; onResponse?: (response: TResponseUpdate) => void; onFinished?: () => void; onClose?: () => void; onRetry?: () => void; autoFocus?: boolean; isRedirectDisabled?: boolean; prefillResponseData?: TResponseData; skipPrefilled?: boolean; languageCode: string; onFileUpload: (file: TFileUploadParams["file"], config?: TUploadFileConfig) => Promise; responseCount?: number; isCardBorderVisible?: boolean; startAtQuestionId?: string; clickOutside?: boolean; overlay?: TOverlay; hiddenFieldsRecord?: TResponseData; shouldResetQuestionId?: boolean; fullSizeCards?: boolean; } export interface SurveyInlineProps extends SurveyBaseProps { containerId: string; placement: "bottomLeft" | "bottomRight" | "topLeft" | "topRight" | "center"; } export interface SurveyContainerProps extends Omit { appUrl?: string; /** @deprecated Use `workspaceId` instead. Still works as a backward-compatible alias. */ environmentId?: string; workspaceId?: string; userId?: string; contactId?: string; onDisplayCreated?: () => void | Promise; onResponseCreated?: () => void | Promise; onFileUpload?: (file: TJsFileUploadParams["file"], config?: TUploadFileConfig) => Promise; onOpenExternalURL?: (url: string) => void | Promise; mode?: "modal" | "inline"; containerId?: string; clickOutside?: boolean; overlay?: TOverlay; placement?: "bottomLeft" | "bottomRight" | "topLeft" | "topRight" | "center"; action?: string; singleUseId?: string; singleUseResponseId?: string; isWebEnvironment?: boolean; } export interface TSurvey { id: string; welcomeCard: { enabled: boolean; headline?: Record; html?: Record; fileUrl?: string; buttonLabel?: Record; timeToFinish: boolean; showResponseCount: boolean; videoUrl?: string; }; questions: { id: string; type: string; headline: Record; subheader?: Record; imageUrl?: string; videoUrl?: string; required: boolean; buttonLabel?: Record; backButtonLabel?: Record; scale?: "number" | "smiley" | "star"; range?: 3 | 4 | 5 | 7 | 10; logic?: unknown[]; logicFallback?: string; isDraft?: boolean; placeholder?: Record; longAnswer?: boolean; inputType?: "text" | "email" | "url" | "number" | "phone"; insightsEnabled?: boolean; charLimit?: { enabled: boolean; min?: number; max?: number; }; choices?: { id: string; label: Record; }[]; shuffleOption?: "none" | "all" | "exceptLast"; otherOptionPlaceholder?: Record; lowerLabel?: Record; upperLabel?: Record; html?: Record; buttonUrl?: string; buttonExternal?: boolean; dismissButtonLabel?: Record; allowMulti?: boolean; format?: "M-d-y" | "d-M-y" | "y-M-d"; allowMultipleFiles?: boolean; maxSizeInMB?: number; allowedFileExtensions?: string[]; calUserName?: string; calHost?: string; rows?: Record[]; columns?: Record[]; addressLine1?: { show: boolean; required: boolean; placeholder: Record; }; addressLine2?: { show: boolean; required: boolean; placeholder: Record; }; city?: { show: boolean; required: boolean; placeholder: Record; }; state?: { show: boolean; required: boolean; placeholder: Record; }; zip?: { show: boolean; required: boolean; placeholder: Record; }; country?: { show: boolean; required: boolean; placeholder: Record; }; firstName?: { show: boolean; required: boolean; placeholder: Record; }; lastName?: { show: boolean; required: boolean; placeholder: Record; }; email?: { show: boolean; required: boolean; placeholder: Record; }; phone?: { show: boolean; required: boolean; placeholder: Record; }; company?: { show: boolean; required: boolean; placeholder: Record; }; }[]; variables: { id: string; name: string; type: "number" | "text"; value: number | string; }[]; type: "link" | "app"; showLanguageSwitch: boolean | null; endings: { id: string; type: "endScreen" | "redirectToUrl"; headline?: Record; subheader?: Record; buttonLabel?: Record; buttonLink?: string; imageUrl?: string; videoUrl?: string; url?: string; label?: string; }[]; autoClose: number | null; status: "draft" | "scheduled" | "inProgress" | "paused" | "completed"; recontactDays: number | null; displayLimit: number | null; displayOption: "displayOnce" | "displayMultiple" | "respondMultiple" | "displaySome"; hiddenFields: { enabled: boolean; fieldIds?: string[]; }; delay: number; projectOverwrites: { brandColor?: string | null; highlightBorderColor?: string | null; placement?: "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "center" | null; clickOutsideClose?: boolean | null; overlay?: TOverlay | null; } | null; languages: { default: boolean; enabled: boolean; language: { id: string; createdAt: string; updatedAt: string; code: string; alias: string | null; projectId: string; }; }[]; triggers: { actionClass: { id: string; createdAt: string; updatedAt: string; name: string; description: string | null; type: "code" | "noCode"; key: string | null; noCodeConfig: { type: "click" | "pageView" | "exitIntent" | "fiftyPercentScroll"; urlFilters: { value: string; rule: "exactMatch" | "contains" | "startsWith" | "endsWith" | "notMatch" | "notContains"; }[]; elementSelector?: { cssSelector?: string; innerHtml?: string; }; } | null; environmentId: string; }; }[]; segment?: { id: string; hasFilters: boolean; } | null; displayPercentage: number; styling?: { brandColor?: { light: string; dark?: string | null; } | null; backgroundColor?: { light: string; dark?: string | null; } | null; highlightBorderColor?: { light: string; dark?: string | null; } | null; textColor?: { light: string; dark?: string | null; } | null; borderColor?: { light: string; dark?: string | null; } | null; overwriteThemeStyling?: boolean | null; }; interactionRefresh?: { onDisplay: boolean; onResponse: boolean; onFinished: boolean; }; } //# sourceMappingURL=survey.d.ts.map