Flow Types
The exact top-level configuration and public type declarations released with BugDrop v1.56.3.
Configuration contract
| Capability | Released contract |
|---|---|
| configVersion | 1 |
| FlowConfig properties | Required configVersionidpresentationformsscreensissueOptional appearancecontentevidence |
| FlowForm properties | Required idtitlefieldsOptional description |
Exported public types are labeled separately from the unexported structural helpers that their complete declarations extend.
| Capability | Released contract |
|---|---|
| CheckboxField | Exported public type interface CheckboxField{id:string;type:'checkbox';label:string;helpText?:string;required?:boolean;initialValue?:boolean;layout?:{span?:1|2};} |
| AttachmentsField | Exported public type interface AttachmentsField{id:string;type:'attachments';label:string;helpText?:string;required?:boolean;maxFiles?:number;maxFileSize?:number;accept?:string[];layout?:{span?:1|2};} |
| FlowField | Exported public type type FlowField = VariantField|CheckboxField|AttachmentsField; |
| FlowScalar | Exported public type type FlowScalar = string|number|boolean|null; |
| FlowCondition | Exported public type type FlowCondition =|{answer:string;equals:FlowScalar}|{context:string;equals:FlowScalar}|{all:FlowCondition[]}|{any:FlowCondition[]}; |
| FlowForm | Exported public type interface FlowForm{id:string;title:string;description?:string;fields:FlowField[];} |
| BaseScreen | Unexported structural helper interface BaseScreen{id:string;when?:FlowCondition;} |
| MessageScreen | Exported public type interface MessageScreen extends BaseScreen{type:'message';title:string;description?:string;continueLabel?:string;} |
| FormScreen | Exported public type interface FormScreen extends BaseScreen{type:'form';form:string;continueLabel?:string;backLabel?:string;} |
| ScreenshotScreen | Exported public type interface ScreenshotScreen extends BaseScreen{type:'screenshot';title?:string;description?:string;mode:'optional'|'auto'|'required';continueLabel?:string;backLabel?:string;} |
| FlowScreen | Exported public type type FlowScreen = MessageScreen|FormScreen|ScreenshotScreen; |
| FlowScreenTransitionFrame | Exported public type interface FlowScreenTransitionFrame{opacity?:number;translateX?:number;translateY?:number;scale?:number;} |
| FlowScreenTransitionMotion | Exported public type interface FlowScreenTransitionMotion{enterFrom:FlowScreenTransitionFrame;exitTo:FlowScreenTransitionFrame;} |
| FlowScreenTransition | Exported public type type FlowScreenTransition =|{kind:'none'}|{kind:'slide-horizontal'|'slide-vertical'|'fade'|'scale-fade';durationMs?:number;}|{kind:'custom';durationMs?:number;easing?:'standard'|'linear'|'ease-in'|'ease-out'|'ease-in-out';forward:FlowScreenTransitionMotion;backward:FlowScreenTransitionMotion;}; |
| FlowIssueSection | Exported public type type FlowIssueSection =|{heading:string;answer:string;format?:'text'|'quote'|'stars'|'choice'|'code';omitWhenEmpty?:boolean;}|{heading:string;context:string;format?:'text'|'code';omitWhenEmpty?:boolean;}; |
| FlowConfig | Exported public type interface FlowConfig{configVersion:1;id:string;presentation:{kind:'modal';size?:'compact'|'default'|'wide';columns?:1|2;screenTransition?:FlowScreenTransition;};appearance?:{theme?:VariantTheme;accentColor?:string;density?:'compact'|'comfortable';};content?:{successTitle?:string;successMessage?:string;cancelLabel?:string;};forms:FlowForm[];screens:FlowScreen[];issue:{classification?:'bug'|'feature'|'question';title:string;sections?:FlowIssueSection[];};evidence?:{attachments?:string;sendConsoleLogs?:string;submitter?:{name?:string;email?:string};};} |
| FlowOpenOptions | Exported public type interface FlowOpenOptions{context?:VariantContext;initialAnswers?:Record<string,unknown>;} |
| FlowOutcome | Exported public type type FlowOutcome ={status:'submitted';result:SubmissionResult}|{status:'closed'}|{status:'busy'}; |
| OpenedFlow | Exported public type interface OpenedFlow{readonly instanceId:string;readonly result:Promise<FlowOutcome>;close():void;} |
| FlowHandle | Exported public type interface FlowHandle{readonly id:string;open(options?:FlowOpenOptions):OpenedFlow;} |
| VariantTheme | Exported public type type VariantTheme = 'light'|'dark'|'auto'; |
| VariantContextValue | Exported public type type VariantContextValue = string|number|boolean|null; |
| VariantContext | Exported public type type VariantContext = Record<string,VariantContextValue>; |
| BaseField | Unexported structural helper interface BaseField{id:string;label:string;helpText?:string;required?:boolean;layout?:{span?:1|2};} |
| ShortTextField | Exported public type interface ShortTextField extends BaseField{type:'shortText';placeholder?:string;minLength?:number;maxLength?:number;} |
| LongTextField | Exported public type interface LongTextField extends BaseField{type:'longText';placeholder?:string;rows?:number;minLength?:number;maxLength?:number;} |
| RatingField | Exported public type interface RatingField extends BaseField{type:'rating';scale?:5|10;icon?:'star'|'number';lowLabel?:string;highLabel?:string;} |
| SingleChoiceField | Exported public type interface SingleChoiceField extends BaseField{type:'singleChoice';options:Array<{value:string;label:string;description?:string}>;display?:'radio'|'cards'|'buttons';} |
| VariantField | Exported public type type VariantField = ShortTextField|LongTextField|RatingField|SingleChoiceField; |
| SubmissionResult | Exported public type interface SubmissionResult{issueNumber:number;issueUrl:string;isPublic:boolean;labelMappingWarnings?:string[];} |
| BugDropPublicAPI.registerFlow | Exported public API member registerFlow(config:import('../flows/public-types').FlowConfig):import('../flows/public-types').FlowHandle; |
See Fields & Screens for the building-block inventory developers use most often.