IChatRunner interface
đ Descriptionâ
Interface for controlling the runner. This interface describes the controller reference returned by the run
function.
đ Type declarationâ
interface IChatRunner { definition: IDefinition; styles: IChatStyles; l10n: IL10n; view: "live" | "test" | "preview"; instance: Instance | undefined;Readonly fingerprint: string;Readonly snapshot: ISnapshot | undefined;Readonly isRunning: boolean;Readonly isFinishing: boolean;Readonly isPausing: boolean;Readonly allowStart: boolean;Readonly allowRestart: boolean;Readonly allowPause: boolean;Readonly allowStop: boolean;Readonly start: () => void;Function restart: () => void;Function pause: () => ISnapshot | Promise<ISnapshot> | undefined;Function stop: () => void;Function doPreview: (data: TRunnerPreviewData) => void;Function openChat: () => void;Function closeChat: () => void;Function destroy: () => void;Function }
đī¸ Propertiesâ
đˇī¸ allowPause
â
Retrieves if the runner allows pausing the form.
Typeâ
boolean
đˇī¸ allowRestart
â
Retrieves if the runner allows restarting the form.
Typeâ
boolean
đˇī¸ allowStart
â
Retrieves if the runner allows starting the form.
Typeâ
boolean
đˇī¸ allowStop
â
Retrieves if the runner allows stopping the form.
Typeâ
boolean
đˇī¸ definition
â
Sets or retrieves the current form definition of the runner.
Typeâ
đˇī¸ fingerprint
â
Retrieves the unique fingerprint of the current form definition. This is a SHA-256 hash of the form that is stable as long as the structure of the form is not changed. Textual changes in the content of the form definition will not alter the fingerprint hash. But adding, removing or reordering elements does.
Typeâ
string
Read the Form fingerprint guide for more information about the form fingerprint.
đˇī¸ instance
â
Reference to the active form instance.
Typeâ
Instance
| undefined
This property is undefined
when no form has started yet.
đˇī¸ isFinishing
â
Retrieves if an active form instance is currently finishing. This property is true
when a respondent completes the form and the runner is submitting the response data to an endpoint.
Typeâ
boolean
đˇī¸ isPausing
â
Retrieves if an active form instance is currently pausing. This property is true
when a respondent requests to pause the form and the runner is submitting the snapshot data to an endpoint.
Typeâ
boolean
đˇī¸ isRunning
â
Retrieves if an active form instance is running.
Typeâ
boolean
đˇī¸ l10n
â
Sets or retrieves the current locale and translation settings.
Typeâ
Read the Localization guide for more information about locales and translations.
đˇī¸ snapshot
â
Retrieves a snapshot of the active form instance. A snapshot can be used to restore/resume a form later on.
Typeâ
Read the Pause and resume guide for more information about pausing and resuming runners.
đˇī¸ styles
â
Sets or retrieves the current style (colors, font, size, etc.) of the runner.
Typeâ
Read the Style forms guide for more information about the runner styles.
đˇī¸ view
â
Sets or retrieves the current view mode of the runner. It can be one of the following values:
live
: The form is running in normal (production) mode;test
: The form is running in test mode (no response data is submitted);preview
: The form is running in preview mode, which shows all blocks in a single view.
Typeâ
"live" | "test" | "preview"