import { IFrameCloseEvent, IFrameNotShownEvent } from './common'; import { ComponentDefinition } from './component-definition'; declare const Dropdown: "Dropdown"; declare const FacesRatingBar: "FacesRatingBar"; declare const TextInput: "TextInput"; declare const SegmentedToggle: "SegmentedToggle"; /** * @deprecated use ComponentDefinition */ export type ComponentType = typeof Dropdown | typeof FacesRatingBar | typeof TextInput | typeof SegmentedToggle; export interface IBaseComponentStructure { questionId: string; type: TType; label: string; placeholder?: string; } export interface ITextInputComponentStructure extends IBaseComponentStructure { } export interface IDropdownComponentStructure extends IBaseComponentStructure { options: { id: string; displayName: string; }[]; } export interface ISegmentedToggleComponentStructure extends IBaseComponentStructure { buttons: { id: 'negative' | 'positive'; displayName: string; }[]; } export interface IFacesRatingBarComponentStructure extends IBaseComponentStructure { tooltips?: [string, string, string, string, string]; } export type IStructure = { TextInput: ITextInputComponentStructure; Dropdown: IDropdownComponentStructure; SegmentedToggle: ISegmentedToggleComponentStructure; FacesRatingBar: IFacesRatingBarComponentStructure; }[TType]; type Prettify = { [K in keyof T]: T[K]; } & {}; type JSONPrimitive = string | number | boolean | null; type JSONValue = JSONPrimitive | JSONObject | JSONArray; type JSONArray = JSONValue[]; interface JSONObject { [prop: string]: JSONValue; } /** * @deprecated use ComponentDefinition */ export type Component = ITextInputComponentStructure | IDropdownComponentStructure | ISegmentedToggleComponentStructure | IFacesRatingBarComponentStructure; export interface IFeedbackFormStructure { id: string; title: string; components: ComponentDefinition[]; } export type IframePosition = 'center' | 'bottom-right'; export interface IFeedbackFormMetadata { uuid: string; language?: string; debug?: boolean; formVariantId?: string; origin?: string; appDefId?: string; editorType?: string; esi?: string; msid?: string; customFields?: JSONObject; position?: IframePosition; } interface FeedbackLoopOptionsBase extends Omit, IFeedbackFormMetadata { formSetId: string; title?: string; components?: ComponentDefinition[]; } /** * All available options for integrations */ export type FeedbackLoopOptions = Prettify; /** * Helper type for defining options for Public facing APIs */ export type RequestFeedbackLoopOptions = Prettify>; /** * Helper type for public facing `requestFeedbackLoop` integrations */ export type RequestFeedbackLoop = (options: TOptions) => OpenFeedbackFormReturn; /** * Public facing interface */ export type OpenFeedbackFormReturn = Promise; export {}; //# sourceMappingURL=types.d.ts.map