import { ReactNode } from "react"; import { z } from "zod/v4/mini"; //#region ../validators/dist/questions/routing.d.ts declare const binaryOperatorConditionSchema: z.ZodMiniObject<{ type: z.ZodMiniLiteral<"binary-operator">; operator: z.ZodMiniUnion, z.ZodMiniLiteral<"not-equal">, z.ZodMiniLiteral<"greater">, z.ZodMiniLiteral<"greater-or-equal">, z.ZodMiniLiteral<"less">, z.ZodMiniLiteral<"less-or-equal">, z.ZodMiniLiteral<"contains">, z.ZodMiniLiteral<"not-contains">]>; value: z.ZodMiniObject<{ type: z.ZodMiniLiteral<"value">; value: z.ZodMiniUnion, z.ZodMiniNumber]>; }, z.core.$strip>; target: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{ type: z.ZodMiniLiteral<"next">; }, z.core.$strip>, z.ZodMiniObject<{ type: z.ZodMiniLiteral<"jump">; target: z.ZodMiniNumber; }, z.core.$strip>, z.ZodMiniObject<{ type: z.ZodMiniLiteral<"end">; }, z.core.$strip>], "type">; }, z.core.$strip>; type BinaryOperatorCondition = z.infer; //#endregion //#region ../validators/dist/questions/properties.d.ts declare const ratingQuestionPropertiesSchema: z.ZodMiniObject<{ type: z.ZodMiniLiteral<"rating">; buttonLabel: z.ZodMiniOptional>; shouldAutoProgress: z.ZodMiniOptional>; scale: z.ZodMiniNumber; labels: z.ZodMiniOptional, z.ZodMiniTransform>>; upper: z.ZodMiniOptional, z.ZodMiniTransform>>; }, z.core.$strip>>; display: z.ZodMiniOptional>; }, z.core.$strip>; type RatingQuestionProperties = z.infer; declare const textQuestionPropertiesSchema: z.ZodMiniObject<{ type: z.ZodMiniLiteral<"open-ended">; placeholder: z.ZodMiniOptional>; buttonLabel: z.ZodMiniOptional>; max: z.ZodMiniNumber; }, z.core.$strip>; type TextQuestionProperties = z.infer; declare const singleSelectQuestionPropertiesSchema: z.ZodMiniObject<{ type: z.ZodMiniLiteral<"single-select">; shouldAutoProgress: z.ZodMiniOptional>; options: z.ZodMiniArray; description: z.ZodMiniOptional>; }, z.core.$strip>>; buttonLabel: z.ZodMiniOptional>; editable: z.ZodMiniNullable; max: z.ZodMiniNumber; description: z.ZodMiniOptional>; }, z.core.$strip>>; }, z.core.$strip>; type SingleSelectQuestionProperties = z.infer; declare const multiSelectQuestionPropertiesSchema: z.ZodMiniObject<{ type: z.ZodMiniLiteral<"multi-select">; buttonLabel: z.ZodMiniOptional>; options: z.ZodMiniArray; description: z.ZodMiniOptional>; }, z.core.$strip>>; editable: z.ZodMiniNullable; max: z.ZodMiniNumber; description: z.ZodMiniOptional>; }, z.core.$strip>>; max: z.ZodMiniOptional>; display: z.ZodMiniOptional>; }, z.core.$strip>; type MultiSelectQuestionProperties = z.infer; declare const statementQuestionPropertiesSchema: z.ZodMiniObject<{ type: z.ZodMiniLiteral<"statement">; buttonLabel: z.ZodMiniOptional>; buttonUrl: z.ZodMiniOptional>; }, z.core.$strip>; type StatementQuestionProperties = z.infer; //#endregion //#region ../validators/dist/questions/answers.d.ts declare const bugReportAnswerSchema: z.ZodMiniObject<{ title: z.ZodMiniString; description: z.ZodMiniOptional>; screenshotDataUrl: z.ZodMiniOptional>; recordingEventsJson: z.ZodMiniOptional>; metadata: z.ZodMiniOptional>; screenResolution: z.ZodMiniOptional>; viewportSize: z.ZodMiniOptional>; pageUrl: z.ZodMiniOptional>; pageTitle: z.ZodMiniOptional>; referrer: z.ZodMiniOptional>; datadogTraceId: z.ZodMiniOptional>>; datadogSessionId: z.ZodMiniOptional>>; datadogSessionReplayLink: z.ZodMiniOptional>>; }, z.core.$catchall>>>>; }, z.core.$strip>; type BugReportAnswer = z.infer; declare const ratingAnswerSchemaFactory: ({ scale }: { scale: number; }, { required }: { required: boolean; }) => z.ZodMiniNumber | z.ZodMiniOptional>; type RatingAnswer = z.infer>; declare const singleSelectAnswerSchemaFactory: ({ maxLength }: { maxLength?: number; }, { required }: { required: boolean; }) => z.ZodMiniString | z.ZodMiniOptional>; type SingleSelectAnswer = z.infer>; declare const multiSelectAnswerSchemaFactory: ({ maxSelected, maxLength }: { maxSelected?: number; maxLength?: number; }, { required }: { required: boolean; }) => z.ZodMiniArray>; type MultiSelectAnswer = z.infer>; //#endregion //#region ../validators/dist/survey.d.ts declare const publicGetSurveyOutputSchema: z.ZodMiniObject<{ title: z.ZodMiniString; description: z.ZodMiniNullable>; questions: z.ZodMiniArray; title: z.ZodMiniString; description: z.ZodMiniNullable>; position: z.ZodMiniNumber; required: z.ZodMiniBoolean; properties: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{ type: z.ZodMiniLiteral<"rating">; buttonLabel: z.ZodMiniOptional>; shouldAutoProgress: z.ZodMiniOptional>; scale: z.ZodMiniNumber; labels: z.ZodMiniOptional, z.ZodMiniTransform>>; upper: z.ZodMiniOptional, z.ZodMiniTransform>>; }, z.core.$strip>>; display: z.ZodMiniOptional>; }, z.core.$strip>, z.ZodMiniObject<{ type: z.ZodMiniLiteral<"single-select">; shouldAutoProgress: z.ZodMiniOptional>; options: z.ZodMiniArray; description: z.ZodMiniOptional>; }, z.core.$strip>>; buttonLabel: z.ZodMiniOptional>; editable: z.ZodMiniNullable; max: z.ZodMiniNumber; description: z.ZodMiniOptional>; }, z.core.$strip>>; }, z.core.$strip>, z.ZodMiniObject<{ type: z.ZodMiniLiteral<"open-ended">; placeholder: z.ZodMiniOptional>; buttonLabel: z.ZodMiniOptional>; max: z.ZodMiniNumber; }, z.core.$strip>, z.ZodMiniObject<{ type: z.ZodMiniLiteral<"multi-select">; buttonLabel: z.ZodMiniOptional>; options: z.ZodMiniArray; description: z.ZodMiniOptional>; }, z.core.$strip>>; editable: z.ZodMiniNullable; max: z.ZodMiniNumber; description: z.ZodMiniOptional>; }, z.core.$strip>>; max: z.ZodMiniOptional>; display: z.ZodMiniOptional>; }, z.core.$strip>, z.ZodMiniObject<{ type: z.ZodMiniLiteral<"statement">; buttonLabel: z.ZodMiniOptional>; buttonUrl: z.ZodMiniOptional>; }, z.core.$strip>, z.ZodMiniObject<{ type: z.ZodMiniLiteral<"bug-report">; placeholder: z.ZodMiniOptional>; buttonLabel: z.ZodMiniOptional>; enableScreenshot: z.ZodMiniBoolean; enableRecording: z.ZodMiniBoolean; detailsLabel: z.ZodMiniString; detailsPlaceholder: z.ZodMiniOptional>; redactClasses: z.ZodMiniOptional>>; }, z.core.$strip>], "type">; routingLogic: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{ type: z.ZodMiniLiteral<"always">; target: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{ type: z.ZodMiniLiteral<"next">; }, z.core.$strip>, z.ZodMiniObject<{ type: z.ZodMiniLiteral<"jump">; target: z.ZodMiniNumber; }, z.core.$strip>, z.ZodMiniObject<{ type: z.ZodMiniLiteral<"end">; }, z.core.$strip>], "type">; }, z.core.$strip>, z.ZodMiniObject<{ type: z.ZodMiniLiteral<"switch">; cases: z.ZodMiniArray; operator: z.ZodMiniUnion, z.ZodMiniLiteral<"not-equal">, z.ZodMiniLiteral<"greater">, z.ZodMiniLiteral<"greater-or-equal">, z.ZodMiniLiteral<"less">, z.ZodMiniLiteral<"less-or-equal">, z.ZodMiniLiteral<"contains">, z.ZodMiniLiteral<"not-contains">]>; value: z.ZodMiniObject<{ type: z.ZodMiniLiteral<"value">; value: z.ZodMiniUnion, z.ZodMiniNumber]>; }, z.core.$strip>; target: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{ type: z.ZodMiniLiteral<"next">; }, z.core.$strip>, z.ZodMiniObject<{ type: z.ZodMiniLiteral<"jump">; target: z.ZodMiniNumber; }, z.core.$strip>, z.ZodMiniObject<{ type: z.ZodMiniLiteral<"end">; }, z.core.$strip>], "type">; }, z.core.$strip>>; default: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{ type: z.ZodMiniLiteral<"next">; }, z.core.$strip>, z.ZodMiniObject<{ type: z.ZodMiniLiteral<"jump">; target: z.ZodMiniNumber; }, z.core.$strip>, z.ZodMiniObject<{ type: z.ZodMiniLiteral<"end">; }, z.core.$strip>], "type">; }, z.core.$strip>], "type">; }, z.core.$strip>>; confirmation: z.ZodMiniObject<{ title: z.ZodMiniString; description: z.ZodMiniString; buttonText: z.ZodMiniString; }, z.core.$strip>; }, z.core.$strip>; type PublicGetSurveyOutput = z.infer; //#endregion //#region src/core/types.d.ts type Question = { visible: boolean; error?: string; } & PublicGetSurveyOutput['questions'][number]; type Answer = BugReportAnswer | RatingAnswer | MultiSelectAnswer | SingleSelectAnswer; interface ConfettiState { questions: Question[]; current: number; update: ({ question, answer }: { question: number; answer: Answer; }) => { next?: number; error?: string; }; submit: () => void; isCompleted: boolean; isSubmitted: boolean; errors: Record; } interface Proxyable { /** * Origin of the proxy that forwards Confetti API requests. The hosted * templates also load the widget bundle and stylesheet from it. */ proxyUrl?: string; } type WithProxyable = Omit & Proxyable; interface Finishable { /** * Callback is invoked after the survey response is submitted and the * submission network call settles. */ onFinished?: () => void; } interface Closable { /** * Callback is invoked whenever the survey closes, regardless of how it was closed. */ onClose?: () => void; } /** * Wraps the rendered survey in a consumer-provided container. Receives an * object holding the survey node and returns the wrapped tree. The object * shape leaves room to pass extra render data in the future. */ type ConfettiContainer = (props: { survey: ReactNode; }) => ReactNode; interface Containable { /** * Wraps the rendered survey in a consumer-provided container for theming. * Only invoked once the survey passes its visibility gates, so the container * never renders while the survey is hidden, and unmounts when the survey * closes. * * Prefer an inline function. To carry state or animation, render your own * component inside it: `container={({ survey }) => {survey}}`. */ container?: ConfettiContainer; } interface Dismissable extends Closable { /** * The widget will automatically close this many milliseconds * after the survey is finished. * Set to `null` to disable automatic closing. * @default 3000 */ closeOnFinishMs?: number | null; /** * Callback is invoked when the user dismisses the survey before submitting. * Closing after submission is not a dismissal and does not invoke this. */ onDismiss?: () => void; } interface OptionallyDismissable extends Dismissable { /** * Allows the user to dismiss the modal via the close button and the * overlay. * @default true */ isDismissable?: boolean; } //#endregion export { TextQuestionProperties as _, Containable as a, OptionallyDismissable as c, WithProxyable as d, PublicGetSurveyOutput as f, StatementQuestionProperties as g, SingleSelectQuestionProperties as h, ConfettiState as i, Proxyable as l, RatingQuestionProperties as m, Closable as n, Dismissable as o, MultiSelectQuestionProperties as p, ConfettiContainer as r, Finishable as s, Answer as t, Question as u, BinaryOperatorCondition as v };