Enums
Overview
Enumerations of standard values used in the API. Enums are used to make logical and structural distinctions between different parts of the API.
- From version: 2020.20
Enumerations
Enumerations
AttachmentType
AttachmentType: {[id:string]: AttachmentType}
The attachment file's type.
if(workflowApi.currentThread.entries[0].attachments[0].attachmentType === workflowApi.enums.AttachmentType.Text) {
console.log("You can change your design here, so it will be specially adapted to Text attachment");
}
ContactType
ContactType: {[id:string]: ContactType}
The contact type can be either a user or a role.
const roles = workflowApi.utilities.getUsersAndRoles().filter( e => e.type === workflowApi.enums.ContactType.Role);
ThemeType
ThemeType: {[id:string]: ThemeType}
The Workflow's design theme can be either a "Dark Mode" or "Light Mode".
if(workflowApi.session.theme === workflowApi.enums.ThemeType.Dark) {
console.log("You can change your design here, so it will be specially adapted to Dark theme");
}
WorkflowThreadType
WorkflowThreadType: {[id:string]: WorkflowThreadType}
The thread type that explains in which context it was created : Cell , Member , Document and Component.
if(workflowApi.currentThread.type === workflowApi.enums.WorkflowThreadType.Component) {
console.log("You can change your design here, so it will be specially adapted to Component thread type");
}