/** Dependencies */ import { WizardStepDef } from "../../wizardStep/wizardStepDef"; /** * The Wizard interface command interface */ export interface Command { /** * The Command execution method that will be implemented by a concrete command */ execute(): Promise; } /** * The interface that defines actions that the wizard receiver can perform */ export interface Wizardable { /** * Starts the wizard and instructs all validation tasks to be bound to a validation context that encloses the wizard * * @param {string} [validationContext] Validation context */ start(validationContext: string): Promise; /** * Moves to the next step */ next(skipValidation: boolean): Promise; /** * Moves back one step */ back(): Promise; /** * Finishes the wizard */ finish(): Promise; /** * Moves to a specific step, not necessarily the previous or next one * * @param {WizardStepDef} [wizardStep] Wizard step to jump to */ jumpTo(wizardStep: WizardStepDef): Promise; /** * Invalidates the wizard */ invalidate(): Promise; /** * Reactivates wizard after an invalidation - so the wizard can start all over again */ activate(): Promise; /** * Closes the wizard */ close(): Promise; /** * Cancels the wizard */ cancel(): Promise; /** * Jumps to Results step */ jumpToResults(): Promise; }