Flow Types

The exact top-level configuration and public type declarations released with BugDrop v1.56.3.

Configuration contract

Top-level flow configuration
CapabilityReleased contract
configVersion1
FlowConfig properties
RequiredconfigVersionidpresentationformsscreensissue
Optionalappearancecontentevidence
FlowForm properties
Requiredidtitlefields
Optionaldescription

Exported public types are labeled separately from the unexported structural helpers that their complete declarations extend.

Canonical public value types
CapabilityReleased contract
CheckboxField
Exported public typeinterface CheckboxField{id:string;type:'checkbox';label:string;helpText?:string;required?:boolean;initialValue?:boolean;layout?:{span?:1|2};}
AttachmentsField
Exported public typeinterface AttachmentsField{id:string;type:'attachments';label:string;helpText?:string;required?:boolean;maxFiles?:number;maxFileSize?:number;accept?:string[];layout?:{span?:1|2};}
FlowField
Exported public typetype FlowField = VariantField|CheckboxField|AttachmentsField;
FlowScalar
Exported public typetype FlowScalar = string|number|boolean|null;
FlowCondition
Exported public typetype FlowCondition =|{answer:string;equals:FlowScalar}|{context:string;equals:FlowScalar}|{all:FlowCondition[]}|{any:FlowCondition[]};
FlowForm
Exported public typeinterface FlowForm{id:string;title:string;description?:string;fields:FlowField[];}
BaseScreen
Unexported structural helperinterface BaseScreen{id:string;when?:FlowCondition;}
MessageScreen
Exported public typeinterface MessageScreen extends BaseScreen{type:'message';title:string;description?:string;continueLabel?:string;}
FormScreen
Exported public typeinterface FormScreen extends BaseScreen{type:'form';form:string;continueLabel?:string;backLabel?:string;}
ScreenshotScreen
Exported public typeinterface ScreenshotScreen extends BaseScreen{type:'screenshot';title?:string;description?:string;mode:'optional'|'auto'|'required';continueLabel?:string;backLabel?:string;}
FlowScreen
Exported public typetype FlowScreen = MessageScreen|FormScreen|ScreenshotScreen;
FlowScreenTransitionFrame
Exported public typeinterface FlowScreenTransitionFrame{opacity?:number;translateX?:number;translateY?:number;scale?:number;}
FlowScreenTransitionMotion
Exported public typeinterface FlowScreenTransitionMotion{enterFrom:FlowScreenTransitionFrame;exitTo:FlowScreenTransitionFrame;}
FlowScreenTransition
Exported public typetype 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 typetype 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 typeinterface 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 typeinterface FlowOpenOptions{context?:VariantContext;initialAnswers?:Record<string,unknown>;}
FlowOutcome
Exported public typetype FlowOutcome ={status:'submitted';result:SubmissionResult}|{status:'closed'}|{status:'busy'};
OpenedFlow
Exported public typeinterface OpenedFlow{readonly instanceId:string;readonly result:Promise<FlowOutcome>;close():void;}
FlowHandle
Exported public typeinterface FlowHandle{readonly id:string;open(options?:FlowOpenOptions):OpenedFlow;}
VariantTheme
Exported public typetype VariantTheme = 'light'|'dark'|'auto';
VariantContextValue
Exported public typetype VariantContextValue = string|number|boolean|null;
VariantContext
Exported public typetype VariantContext = Record<string,VariantContextValue>;
BaseField
Unexported structural helperinterface BaseField{id:string;label:string;helpText?:string;required?:boolean;layout?:{span?:1|2};}
ShortTextField
Exported public typeinterface ShortTextField extends BaseField{type:'shortText';placeholder?:string;minLength?:number;maxLength?:number;}
LongTextField
Exported public typeinterface LongTextField extends BaseField{type:'longText';placeholder?:string;rows?:number;minLength?:number;maxLength?:number;}
RatingField
Exported public typeinterface RatingField extends BaseField{type:'rating';scale?:5|10;icon?:'star'|'number';lowLabel?:string;highLabel?:string;}
SingleChoiceField
Exported public typeinterface SingleChoiceField extends BaseField{type:'singleChoice';options:Array<{value:string;label:string;description?:string}>;display?:'radio'|'cards'|'buttons';}
VariantField
Exported public typetype VariantField = ShortTextField|LongTextField|RatingField|SingleChoiceField;
SubmissionResult
Exported public typeinterface SubmissionResult{issueNumber:number;issueUrl:string;isPublic:boolean;labelMappingWarnings?:string[];}
BugDropPublicAPI.registerFlow
Exported public API memberregisterFlow(config:import('../flows/public-types').FlowConfig):import('../flows/public-types').FlowHandle;

See Fields & Screens for the building-block inventory developers use most often.