Types
Updated on Aug 18, 2025
84 minutes to read
AiMessage
interface AiMessage {
/**
* Sender role in the conversation
*/
role: 'user' | 'system' | 'assistant';
/**
* Text content of the message
*/
content: string;
}
AiPrompt
interface AiPrompt {
/** Conversation history passed to the model */
messages: Array<AiMessage>;
}
AiResponseMessage
type AiResponseMessage = {
message: {
/** Unique message identifier */
id: string;
/** Reference to parent thread */
threadId: string;
/** Assistant that produced this message */
assistantId: string;
/** Main textual content of the message */
content: string;
/** Array of generated answers or variations */
answers: string[];
/** Current message status */
status: 'queued' | 'completed' | 'failed';
/** Creation timestamp (epoch ms) */
createdAt: number;
};
}
Application
interface Application {
/** Unique identifier of the application */
id: string;
/** Human-readable name of the application */
name: string;
/** Optional description of the application */
description: string | null;
/** Optional semantic version (e.g. "1.0.3") */
version: string | null;
/** Vendor or company name that provides the application */
vendor: string | null;
/** Vendor unique identifier (if available) */
vendorId: string | null;
/** Relative base URL of the application (may be context-dependent) */
baseUrl: string;
/** Absolute base URL of the application */
absoluteBaseUrl: string;
/** Optional URL pointing to the application’s logo (relative) */
logoUrl: string | null;
/** Optional absolute URL pointing to the application’s logo */
absoluteLogoUrl: string | null;
}
BackgroundVariants
type BackgroundVariants = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark' | 'white'
BadgeVariants
type BadgeVariants = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark'
BarcodeConfig
interface BarcodeConfig {
/**
* Barcode type.
*/
type: string;
/**
* The data to encode.
*/
value: string;
/**
* Width of the barcode.
*/
width: number;
/**
* Height of the barcode.
*/
height: number;
/**
* Hex color of the barcode.
*/
color?: string;
}
BarcodeTypes
type BarcodeTypes =
| 'C39'
| 'C39+'
| 'C39E'
| 'C39E+'
| 'C93'
| 'S25'
| 'S25+'
| 'I25'
| 'I25+'
| 'C128'
| 'C128A'
| 'C128B'
| 'C128C'
| 'EAN2'
| 'EAN5'
| 'EAN8'
| 'EAN13'
| 'UPCA'
| 'UPCE'
| 'MSI'
| 'MSI+'
| 'POSTNET'
| 'PLANET'
| 'RMS4CC'
| 'KIX'
| 'IMB'
| 'IMBPRE'
| 'CODABAR'
| 'CODE11'
| 'PHARMA'
| 'PHARMA2T'
| 'DATAMATRIX'
| 'PDF417'
| 'QRCODE,L'
| 'QRCODE,M'
| 'QRCODE,Q'
| 'QRCODE,H'
BaseFileParams
interface BaseFileParams {
/**
* If true, returns the file as an inline resource (displayed in the browser)
* instead of forcing a download.
*/
inline?: boolean,
/**
* Full file name (with extension) to use for the generated file.
* If both `filename` and `basename` are provided, `basename` takes priority.
*/
basename?: string,
/**
* File name without extension. The file extension will PNG
*/
filename?: string,
}
BaseQuery
/**
* Core query operations shared by SELECT‑style queries and command statements.
*/
interface BaseQuery {
/**
* Return all rows.
*
* @param params Optional. Parameters to control the query result.
*/
all(params?: QueryResultParams): Promise<object[]>;
/**
* Return the first row or null.
*
* @param params Optional. Parameters to control the query result.
*/
one(params?: QueryResultParams): Promise<object | null>;
/**
* True if at least one row matches.
*
* @param params Optional. Parameters to control the query result.
*/
exists(params?: QueryResultParams): Promise<boolean>;
/**
* Sum of a column.
*
* @param column The column name to sum.
* @param params Optional. Parameters to control the query result.
*/
sum(column: string, params?: QueryResultParams): Promise<number | null>;
/**
* Minimum value of a column.
*
* @param column The column name to get the minimum value of.
* @param params Optional. Parameters to control the query result.
*/
min(column: string, params?: QueryResultParams): Promise<any>;
/**
* Maximum value of a column.
*
* @param column The column name to get the maximum value of.
* @param params Optional. Parameters to control the query result.
*/
max(column: string, params?: QueryResultParams): Promise<any>;
/**
* Average of a column.
*
* @param column The column name to calculate the average of.
* @param params Optional. Parameters to control the query result.
*/
avg(column: string, params?: QueryResultParams): Promise<number | null>;
/**
* Count of rows.
*
* @param params Optional. Parameters to control the query result.
*/
count(params?: QueryResultParams): Promise<number>;
/**
* Single scalar value (first column of first row).
*
* @param params Optional. Parameters to control the query result.
*/
scalar(params?: QueryResultParams): Promise<any>;
/**
* Array of first‑column values.
*
* @param params Optional. Parameters to control the query result.
*/
column(params?: QueryResultParams): Promise<any[]>;
/**
* Cancel the running query.
*/
cancel(): void;
}
Column
/** Plain column name or an aliased column definition. */
type Column = string | ColumnWithAlias;
ColumnWithAlias
/** Alias → column name or nested Expression. */
type ColumnWithAlias = {
[key: string]: string | Expression
};
Command
/**
* Builder for command‑style statements (INSERT, UPDATE, DELETE, …).
*/
interface Command extends BaseQuery {
/**
* Set a named parameter.
*
* @param name The name of the parameter.
* @param value The value to assign to the parameter.
*/
setParam(name: string, value: any): Command;
/**
* Set multiple parameters at once.
*
* @param params An object containing key-value pairs of parameters.
*/
setParams(params: object): Command;
/**
* Remove all parameters.
*/
clearParams(): Command;
}
CommandBarAction
/**
* Union type for any action that can be placed on the command bar.
*/
type CommandBarAction = CommandBarButton | CommandBarDropdown;
/**
* Base interface for all command bar buttons.
*/
interface CommandBarBaseButton {
/**
* Sets the unique identifier of the button.
*
* @param value The ID to assign to the button.
*/
id(value: string): CommandBarButton;
/**
* Gets the unique identifier of the button.
*/
id(): string;
/**
* Sets the internal name of the button.
*
* @param value The internal name to assign.
*/
name(value: string): CommandBarButton;
/**
* Gets the internal name of the button.
*/
name(): string;
/**
* Sets the visible label of the button.
*
* @param value The label text.
*/
label(value: string): CommandBarButton;
/**
* Gets the visible label of the button.
*/
label(): string;
/**
* Sets the icon displayed on the button.
*
* @param value The icon name.
*/
icon(value: E8IconName): CommandBarButton;
/**
* Gets the icon displayed on the button.
*/
icon(): E8IconName;
/**
* Sets the click handler function for the button.
*
* @param value The function to call on click.
*/
onClick(value: Function): CommandBarButton;
/**
* Gets the click handler function for the button.
*/
onClick(): Function;
/**
* Sets the URL to navigate to when clicked.
*
* @param value The target URL.
*/
url(value: string): CommandBarButton;
/**
* Gets the URL to navigate to when clicked.
*/
url(): string;
/**
* Sets the target for the URL (_blank, _self, etc.).
*
* @param value The target attribute.
*/
target(value: string): CommandBarButton;
/**
* Gets the target for the URL (_blank, _self, etc.).
*/
target(): string;
/**
* Sets a custom CSS class.
*
* @param value The CSS class name.
*/
class(value: string): CommandBarButton;
/**
* Gets a custom CSS class.
*/
class(): string;
/**
* Sets whether the button is the default action.
*
* @param value True if default, false otherwise.
*/
default(value: boolean): CommandBarButton;
/**
* Gets whether the button is the default action.
*/
default(): boolean;
/**
* Sets whether the button modifies data when clicked.
*
* @param value True if it modifies data.
*/
modifyData(value: boolean): CommandBarButton;
/**
* Gets whether the button modifies data when clicked.
*/
modifyData(): boolean;
/**
* Sets whether the button is disabled.
*
* @param value True to disable the button.
*/
disabled(value: boolean): CommandBarButton;
/**
* Gets whether the button is disabled.
*/
disabled(): boolean;
/**
* Removes the button from the command bar.
*/
remove(): void;
}
interface CommandBarButton extends CommandBarBaseButton {
/**
* Sets whether the button is outlined.
*
* @param value True to make the button outlined.
*/
outlined(value: boolean): CommandBarButton;
/**
* Gets whether the button is outlined.
*/
outlined(): boolean;
/**
* Sets the visual variant of the button (primary, secondary, etc.).
*
* @param value The variant name.
*/
variant(value: E8ButtonColorVariants): CommandBarButton;
/**
* Gets the visual variant of the button (primary, secondary, etc.).
*/
variant(): E8ButtonColorVariants;
/**
* Sets whether the label is hidden on extra small screens.
*
* @param value True to hide the label on xs screens.
*/
hideLabelOnXs(value: boolean): CommandBarButton;
/**
* Gets whether the label is hidden on extra small screens.
*/
hideLabelOnXs(): boolean;
/**
* Sets whether the button itself is hidden on extra small screens.
*
* @param value True to hide the button on xs screens.
*/
hideOnXs(value: boolean): CommandBarButton;
/**
* Gets whether the button itself is hidden on extra small screens.
*/
hideOnXs(): boolean;
/**
* Sets whether the button has a circular shape.
*
* @param value True to make the button circular.
*/
circle(value: boolean): CommandBarButton;
/**
* Gets whether the button has a circular shape.
*/
circle(): boolean;
/**
* Removes the button from the command bar.
*/
remove(): void;
}
CommandBarDropdown
interface CommandBarDropdown {
/**
* Sets the dropdown label.
*
* @param value The label text.
*/
label(value: string): CommandBarDropdown;
/**
* Gets the dropdown label.
*/
label(): string;
/**
* Sets the dropdown icon.
*
* @param value The icon name.
*/
icon(value: E8IconName): CommandBarDropdown;
/**
* Gets the dropdown icon.
*/
icon(): E8IconName;
/**
* Sets a custom CSS class for the dropdown.
*
* @param value The CSS class name.
*/
class(value: string): CommandBarDropdown;
/**
* Gets a custom CSS class for the dropdown.
*/
class(): string;
/**
* Sets whether the dropdown is outlined.
*
* @param value True to make the dropdown outlined.
*/
outlined(value: boolean): CommandBarDropdown;
/**
* Gets whether the dropdown is outlined.
*/
outlined(): boolean;
/**
* Sets the visual variant of the dropdown.
*
* @param value The variant name.
*/
variant(value: E8ButtonColorVariants): CommandBarDropdown;
/**
* Gets the visual variant of the dropdown.
*/
variant(): E8ButtonColorVariants;
/**
* Sets whether the label is hidden on extra small screens.
*
* @param value True to hide the label on xs screens.
*/
hideLabelOnXs(value: boolean): CommandBarDropdown;
/**
* Gets whether the label is hidden on extra small screens.
*/
hideLabelOnXs(): boolean;
/**
* Sets whether the dropdown itself is hidden on extra small screens.
*
* @param value True to hide the dropdown on xs screens.
*/
hideOnXs(value: boolean): CommandBarDropdown;
/**
* Gets whether the dropdown itself is hidden on extra small screens.
*/
hideOnXs(): boolean;
/**
* Adds a button to the dropdown.
*/
addButton(): CommandBarDropdownButton;
/**
* Prepends a button to the beginning of the dropdown.
*/
prependButton(): CommandBarDropdownButton;
/**
* Inserts a button at a specified index.
*
* @param index The index at which to insert the button.
*/
insertButton(index: number): CommandBarDropdownButton;
/**
* Adds a new group to the dropdown.
*/
addGroup(): CommandBarDropdownGroup;
/**
* Prepends a new group to the beginning of the dropdown.
*/
prependGroup(): CommandBarDropdownGroup;
/**
* Inserts a group at a specified index.
*
* @param index The index at which to insert the group.
*/
insertGroup(index: number): CommandBarDropdownGroup;
/**
* Adds a visual divider to the dropdown.
*/
addDivider(): CommandBarDropdownDivider;
/**
* Inserts a divider at a specified index.
*
* @param index The index at which to insert the divider.
*/
insertDivider(index: number): CommandBarDropdownDivider;
/**
* Returns all items in the dropdown.
*/
getItems(): CommandBarDropdownItem[];
/**
* Sets whether the dropdown is circular.
*
* @param value True to make the dropdown circular.
*/
circle(value: boolean): CommandBarDropdown;
/**
* Gets whether the dropdown is circular.
*/
circle(): boolean;
/**
* Sets whether the dropdown is disabled.
*
* @param value True to disable the dropdown.
*/
disabled(value: boolean): CommandBarDropdown;
/**
* Gets whether the dropdown is disabled.
*/
disabled(): boolean;
/**
* Removes the dropdown from the command bar.
*/
remove(): void;
/**
* Finds an item inside the dropdown by ID.
*
* @param id The ID of the item to find.
*/
findById(id: string): CommandBarDropdownItem;
}
/**
* Dropdown button that can contain nested items.
*/
interface CommandBarDropdownButton extends CommandBarBaseButton {
/**
* Finds a nested button by its ID within the dropdown
*
* @param id The ID of the nested button to find.
*/
findById(id: string): CommandBarDropdownButton;
}
CommandBarDropdownDivider
/**
* Visual divider used inside a dropdown.
*/
interface CommandBarDropdownDivider {
/**
* Removes the divider
*/
remove(): void;
}
CommandBarDropdownGroup
/**
* Group of items inside a dropdown.
*/
interface CommandBarDropdownGroup {
/**
* Sets the label for the group.
*
* @param value The label text.
*/
label(value: string): CommandBarButton;
/**
* Gets the label for the group.
*/
label(): string;
/**
* Sets the icon for the group.
*
* @param value The icon name.
*/
icon(value: E8IconName): CommandBarButton;
/**
* Gets the icon for the group.
*/
icon(): E8IconName;
/**
* Sets a custom CSS class for the group.
*
* @param value The CSS class name.
*/
class(value: string): CommandBarButton;
/**
* Gets a custom CSS class for the group.
*/
class(): string;
/**
* Adds a new button to the group.
*/
addButton(): CommandBarDropdownButton;
/**
* Prepends a new button to the beginning of the group.
*/
prependButton(): CommandBarDropdownButton;
/**
* Inserts a button at a specified index.
*
* @param index The index at which to insert the button.
*/
insertButton(index: number): CommandBarDropdownButton;
/**
* Returns all buttons in the group.
*/
getItems(): CommandBarDropdownButton[];
/**
* Removes the group.
*/
remove(): void;
/**
* Finds a button within the group by ID.
*
* @param id The ID of the button to find.
*/
findById(id: string): CommandBarButton;
}
CommandBarDropdownItem
/**
* Union type representing any possible item that can live inside a dropdown.
*/
type CommandBarDropdownItem =
CommandBarDropdownButton
| CommandBarDropdownDivider
| CommandBarDropdownGroup;
Conditions
/** Various forms of WHERE/HAVING clauses (array, Expression, hash, etc.). */
type Conditions = any[] | Expression | Expression[] | HashCondition | HashCondition[];
DateUnit
type DateUnit =
| 'year'
| 'years'
| 'quarter'
| 'quarters'
| 'month'
| 'months'
| 'week'
| 'weeks'
| 'day'
| 'days';
DeviceInfo
/**
* Represents detailed information about the device and user environment.
*/
interface DeviceInfo {
/**
* Information about the device platform.
*/
platform: {
/** The operating system (e.g., iOS, Android, Mac). */
os: string;
/** The version of the operating system. */
version: string | number;
};
/**
* Basic information about the physical device.
*/
device: {
/** The brand of the device (e.g., Apple, Samsung). */
brand: string;
/** The specific model of the device (e.g., iPhone 14, Galaxy S22). */
model: string;
};
/**
* Permission statuses for various system features.
*/
permissions: {
/** Camera permission status. */
camera: PermissionInfo;
/** Foreground location permission status. */
foregroundLocation: PermissionInfo;
/** Media library (gallery) permission status. */
mediaLibrary: PermissionInfo;
/** Notifications permission status. */
notifications: PermissionInfo;
};
/**
* Information about the mobile application, if available.
*/
mobileApp?: {
/** The name of the mobile app. */
name: string;
/** The version of the mobile app. */
version: string;
/** The push notification token assigned to the app. */
pushToken: string;
};
/**
* Optional error message if device information could not be retrieved.
*/
error?: string;
}
DialogDismissReason
enum DialogDismissReason {
/** User clicked the cancel button. */
cancel,
/** User clicked on the backdrop area. */
backdrop,
/** User clicked the close (X) button. */
close,
/** User pressed the Escape key. */
esc,
/** Dialog was dismissed automatically by a timer. */
timer,
}
DialogResult
interface DialogResult {
/** Indicates the reason for dismissal, if the dialog was dismissed. */
readonly dismiss?: DialogDismissReason;
/** True if the dialog action was confirmed. */
readonly isConfirmed: boolean;
/** True if the dialog was dismissed without confirmation. */
readonly isDismissed: boolean;
/** The returned value, if any, usually from confirmation dialogs. */
readonly value?: boolean;
}
DownloadFileParams
interface DownloadFileParams extends BaseFileParams {
/** Open in a new tab */
newTab?: boolean;
}
E8BackgroundColorVariants
type E8BackgroundColorVariants =
| 'primary'
| 'secondary'
| 'success'
| 'danger'
| 'warning'
| 'info'
| 'light'
| 'dark'
| 'white';
E8BadgeColorVariants
type E8BadgeColorVariants =
| 'primary'
| 'secondary'
| 'success'
| 'danger'
| 'warning'
| 'info'
| 'light'
| 'dark';
E8BorderColorVariants
type E8BorderColorVariants =
| 'primary'
| 'secondary'
| 'success'
| 'danger'
| 'warning'
| 'info'
| 'light'
| 'dark'
| 'white';
type E8ButtonColorVariants =
| 'primary'
| 'secondary'
| 'success'
| 'danger'
| 'warning'
| 'info'
| 'light'
| 'dark'
| 'white'
| 'link';
E8CalendarEvent
interface E8CalendarEvent {
/** Unique identifier for the event (string or numeric). */
id: string | number;
/** Whether the event lasts all day (true) or has specific times (false). */
allDay: boolean;
/** Event start date (without time). */
startDate: E8Date;
/** Event start time (used only if allDay = false). */
startTime: E8Time;
/** Event end date (without time). */
endDate: E8Date;
/** Event end time (used only if allDay = false). */
endTime: E8Time;
/** Event title, displayed in the calendar and popups. */
title: string;
/** Detailed description of the event. */
description: string;
/** Primary color of the event (legacy field, prefer backgroundColor). */
color: string;
/** Text color for the event’s title/labels. */
textColor: string;
/** Border color for the event block. */
borderColor: string;
/** Background color for the event block. */
backgroundColor: string;
/** Marks the event as read-only (cannot be edited). */
readonly: boolean;
/** Whether the event can be dragged to another date/time. */
draggable: boolean;
/** Whether the event can be resized (to change duration). */
resizable: boolean;
/** Whether the event can be edited (general flag for editing). */
editable: boolean;
/** Whether the event can be deleted. */
deletable: boolean;
/** Full start timestamp (date + time). */
start: E8Timestamp;
/** Full end timestamp (date + time). */
end: E8Timestamp;
}
E8CalendarEventDisplaysVariants
type E8CalendarEventDisplaysVariants =
| 'auto'
| 'block'
| 'list-item'
| 'background'
| 'inverse-background'
| 'none';
E8CalendarViewVariants
type E8CalendarViewVariants =
| 'timeGridDay'
| 'timeGridWeek'
| 'dayGridMonth'
| 'dayGridYear';
E8CalendarYearViewVariants
type E8CalendarYearViewVariants =
| 'continuos'
| 'grid'
| 'stack';
E8Date
/**
* Date in the format 'YYYY-MM-DD'
*/
type E8Date = string;
E8IconName
/**
* Represents the name of an icon from the E8Icon collection.
*/
type E8IconName = string;
E8ImageSourceTypes
type E8ImageSourceTypes =
| 'file'
| 'icon'
| 'image'
| 'url';
E8ObjectId
/**
* Numeric identifier of a list object
*/
type E8ObjectId = number;
E8ScriptAlias
/**
* Script alias of a metadata object (e.g., form, list, report)
*/
type E8ScriptAlias = string;
E8TextColorVariants
type E8TextColorVariants =
| 'primary'
| 'secondary'
| 'success'
| 'danger'
| 'warning'
| 'info'
| 'light'
| 'dark'
| 'white'
| 'muted';
E8Time
/**
* Time in the format 'HH:mm:ss'
*/
type E8Time = string;
E8Timestamp
/**
* Standard Unix timestamp (milliseconds since the epoch)
*/
type E8Timestamp = number;
ElementSizes
type ElementSizes = 'small' | 'default' | 'large';
Email
interface Email {
/** Unique email ID */
id: number,
/** Sender address */
from: string | null,
/** Recipients in "To" field */
to: string[],
/** Recipients in "Cc" field */
cc: string[],
/** Recipients in "Bcc" field */
bcc: string[],
/** Email subject */
subject: string | null,
/** Attached files */
attachments: FileInfo[],
/** Body content of the email */
body: string | null,
/** Unix timestamp when the email was created */
createdAt: number,
/** Unix timestamp when the email was sent, null if not yet sent */
sentAt: number | null,
/** Current status of the email (e.g. sent, draft, failed) */
status: string,
/** Email account used to send/receive */
account: EmailAccount | null,
}
EmailAccount
interface EmailAccount {
/** Unique account ID */
id: string,
/** Display name of the account */
name: string,
/** Whether this account is private */
private: boolean,
/** Whether this account is the default one */
default: boolean,
/** Sender details */
from: {
/** Display name of the sender */
name: string,
/** Sender email address */
email: string,
},
/** Default signature associated with this account */
signature: EmailSignature | null,
}
EmailApiClient
interface EmailApiClient {
/**
* Sets the active folder for subsequent queries.
*
* @param folderId The ID of the folder to select.
*/
setFolder(folderId: string): EmailApiClient;
/**
* Adds filtering conditions to the query.
*
* @param conditions The conditions to filter messages.
*/
where(conditions: Conditions): EmailApiClient;
/**
* Adds AND filtering conditions to the query.
*
* @param conditions The conditions to add with AND logic.
*/
andWhere(conditions: Conditions): EmailApiClient;
/**
* Adds OR filtering conditions to the query.
*
* @param conditions The conditions to add with OR logic.
*/
orWhere(conditions: Conditions): EmailApiClient;
/**
* Retrieves the list of available folders.
*/
getFolders(): Promise<EmailApiClientFolder[]>;
/**
* Retrieves a paginated list of messages from the selected folder.
*
* @param pageToken Token for the page to fetch; null for the first page.
*/
getMessages(pageToken: string | null): Promise<EmailApiClientMessages>;
/**
* Retrieves details of a single message by its ID.
*
* @param messageId The ID of the message.
*/
getMessage(messageId: string): Promise<EmailApiClientMessage>;
/**
* Retrieves attachments of a specific message.
*
* @param messageId The ID of the message to fetch attachments for.
*/
getAttachments(messageId: string): Promise<EmailApiClientAttachment[]>;
/**
* Marks a specific message as read.
*
* @param messageId The ID of the message to mark as read.
*/
markMessageAsRead(messageId: string): Promise<void>;
}
EmailApiClientAttachment
interface EmailApiClientAttachment {
/** Unique attachment ID */
id: string | null,
/** Filename of the attachment */
filename: string | null,
/** MIME type of the attachment */
mimeType: string | null,
/** Size of the file in bytes */
size: number | null,
/** Base64-encoded content of the attachment */
base64String: string | null,
/** Content ID for inline attachments (e.g. images) */
contentId: string | null,
/** Provider-specific raw attachment data */
rawData: object
}
EmailApiClientConfig
interface EmailApiClientConfig {
/** ID of the email account to connect */
accountId: string,
}
EmailApiClientFolder
interface EmailApiClientFolder {
/** Unique ID of the folder, null if not applicable */
id: string | null,
/** Folder name, null if not available */
name: string | null,
/** Provider-specific raw folder data */
rawData: object
}
EmailApiClientMessage
interface EmailApiClientMessage {
/** Unique message ID */
id: string | null,
/** Conversation/thread ID */
conversationId: string | null,
/** Unix timestamp of when the message was created */
dateCreated: number | null,
/** Whether the message has attachments */
hasAttachments: boolean | null,
/** Sender address */
from: string | null,
/** List of recipient addresses in "To" field */
to: [string] | null,
/** List of recipient addresses in "Cc" field */
cc: [string] | null,
/** List of recipient addresses in "Bcc" field */
bcc: [string] | null,
/** Subject of the message */
subject: string | null,
/** Plain text body */
bodyText: string | null,
/** HTML body */
bodyHtml: string | null,
/** Provider-specific raw message data */
rawData: object
}
EmailApiClientMessages
interface EmailApiClientMessages {
/** Token to retrieve the next page of messages; null/false if no more pages */
nextPageToken: string | null | false,
/** List of messages */
values: EmailApiClientMessagesItem[]
}
EmailApiClientMessagesItem
interface EmailApiClientMessagesItem {
/** Unique message ID */
id: string | null,
/** Conversation/thread ID */
conversationId: string | null,
/** Provider-specific raw message data */
rawData: object
}
EmailConfig
interface EmailConfig {
/** ID of the email account to send from */
accountId?: number,
/** ID of the signature to use, or false to disable signature */
signatureId?: number | false,
/** Recipient email(s) in the "To" field */
to?: string | string[],
/** Recipient email(s) in the "Cc" field */
cc?: string | string[],
/** Recipient email(s) in the "Bcc" field */
bcc?: string | string[],
/** Email subject */
subject?: string,
/** Email body in plain text or HTML */
body?: string,
/** List of file ids for attachments */
attachments?: string[],
}
EmailSignature
interface EmailSignature {
/** Unique ID of the signature */
id: number,
/** Display name of the signature */
name: string,
/** Signature content (HTML or plain text) */
signature: string,
}
EmailTemplate
interface EmailTemplate {
/** Unique ID of the template */
id: number,
/** Display name of the template */
name: string,
/** Template content (HTML or plain text) */
template: string,
}
Expression
/** Arbitrary SQL fragment with optional bound parameters. */
type Expression = {
__expr__: string,
__params__?: object,
}
FileInfo
interface FileInfo {
/**
* Unique identifier of the file.
*/
id: string;
/**
* File name including its extension (e.g., "document.pdf").
*/
name: string;
/**
* File extension without the dot (e.g., "pdf", "png").
*/
extension: string;
/**
* File size in bytes.
*/
size: number;
/**
* MIME type of the file (e.g., "application/pdf", "image/png").
*/
mimeType: string;
/**
* True if the file is an image format.
*/
isImage: boolean;
/**
* True if the file is a video format.
*/
isVideo: boolean;
/**
* True if the file is publicly accessible via a direct link.
*/
isPublic: boolean;
}
declare enum FormSizes {
small = 'small',
large = 'large',
extraLarge = 'extraLarge',
full = 'full',
maximized = 'maximized',
}
GoSignGetPackageParams
interface GoSignGetPackageParams {
includeRecipients?: boolean;
includeDocuments?: boolean;
includeFields?: boolean;
}
HashCondition
/** Simple hash‑style condition object (e.g., {id: 5, status: 'ok'}). */
type HashCondition = object;
interface Metadata {
id: number,
type: string,
name: string,
scriptAlias: string,
description: string,
canView: boolean,
canInsert: boolean,
canUpdate: boolean,
canDelete: boolean,
canExport: boolean,
attachFiles: boolean,
baseUrl: string | null,
absoluteBaseUrl: string | null,
/** @deprecated Use param {include: [E8App.$metadata.T_ENUMERATION_VALUE]} of E8App.$metadata.get method to retrieve enumeration values. */
values?: object,
children?: Metadata[],
owner: Metadata | null,
}
interface MetadataObjectParams extends MetadataParams {
include?: string[],
}
interface MetadataParams {
silent?: boolean,
}
ObjectParams
interface ObjectParams {
silent?: boolean,
}
PermissionInfo
/**
* Represents the current permission status for a given feature (camera, location, etc.).
*/
interface PermissionInfo {
/**
* The current status of the permission.
* - `granted`: The permission has been granted.
* - `undetermined`: The user has not yet been prompted or made a decision.
* - `denied`: The permission was explicitly denied.
*/
status: 'granted' | 'undetermined' | 'denied';
/**
* Convenience boolean indicating whether the permission is granted.
*/
isGranted: boolean;
}
PreviewFileParams
interface PreviewFileParams {
/** Script alias of owner */
scriptAlias?: E8ScriptAlias;
/** Object ID of file */
id?: E8ObjectId;
/** Disable download button */
disableDownload?: boolean;
/** Disable share button */
disableShare?: boolean;
/** Disable print button */
disablePrint?: boolean;
/** Disable send button */
disableSend?: boolean;
}
interface PrintFormParams {
/**
* If true, returns the file as an inline resource (displayed in the browser)
* instead of forcing a download.
*/
inline?: boolean,
/**
* Full file name (with extension) to use for the generated file.
* If both `filename` and `basename` are provided, `basename` takes priority.
*/
basename?: string,
/**
* File name without extension. The file extension will PDF
*/
filename?: string,
}
interface PrintFormResult {
// Unique identifier of the print form
id: string;
// Text content of the form (e.g., HTML or plain text)
text: string;
// Primary recipients
to: Recipient[];
// Carbon copy recipients
cc: Recipient[];
// Blind carbon copy recipients
bcc: Recipient[];
}
PublicFileParams
interface PublicFileParams {
/** Target directory */
dir?: string;
}
Query
/**
* Builder for SELECT‑style queries.
*/
interface Query extends BaseQuery {
/**
* Set a named parameter.
*
* @param name The name of the parameter.
* @param value The value to assign to the parameter.
*/
setParam(name: string, value: any): Query;
/**
* Set multiple parameters at once.
*
* @param params An object containing key-value pairs of parameters.
*/
setParams(params: object): Query;
/**
* Remove all parameters.
*/
clearParams(): Query;
/**
* Define SELECT columns.
*
* @param columns The columns or expressions to select.
*/
select(columns: SelectExpression): Query;
/**
* Append columns to the existing SELECT list.
*
* @param column The column or expression to add.
*/
addSelect(column: SelectExpression): Query;
/**
* Specify the FROM table.
*
* @param table The table to select from.
*/
from(table: Table): Query;
/**
* LEFT JOIN with a condition.
*
* @param table The table to join.
* @param on The join condition.
*/
leftJoin(table: Table, on: Conditions): Query;
/**
* RIGHT JOIN with a condition.
*
* @param table The table to join.
* @param on The join condition.
*/
rightJoin(table: Table, on: Conditions): Query;
/**
* INNER JOIN with a condition.
*
* @param table The table to join.
* @param on The join condition.
*/
innerJoin(table: Table, on: Conditions): Query;
/**
* Apply a WHERE clause.
*
* @param conditions The conditions for the WHERE clause.
*/
where(conditions: Conditions): Query;
/**
* Add an AND condition to WHERE.
*
* @param conditions The conditions to append with AND.
*/
andWhere(conditions: Conditions): Query;
/**
* Add an OR condition to WHERE.
*
* @param conditions The conditions to append with OR.
*/
orWhere(conditions: Conditions): Query;
/**
* ORDER BY (string, Expression, or array).
*
* @param orderBy The column(s) or expression(s) to order by.
* @param direction Optional. The direction ('ASC' or 'DESC').
*/
orderBy(orderBy: string | Expression | any[], direction?: string): Query;
/**
* ORDER BY using an object map {column: direction}.
*
* @param orderBy Object mapping columns to directions.
*/
orderBy(orderBy: object): Query;
/**
* Append another ORDER BY clause.
*
* @param orderBy The column(s) or expression(s) to append.
* @param direction Optional. The direction ('ASC' or 'DESC').
*/
addOrderBy(orderBy: string | Expression | any[], direction?: string): Query;
/**
* Append ORDER BY via object map.
*
* @param orderBy Object mapping columns to directions.
*/
addOrderBy(orderBy: object): Query;
/**
* GROUP BY clause.
*
* @param groupBy Column(s) or expression(s) to group by.
*/
groupBy(groupBy: string | Expression | any[]): Query;
/**
* Append additional GROUP BY fields.
*
* @param groupBy Column(s) or expression(s) to add.
*/
addGroupBy(groupBy: string | Expression | any[]): Query;
/**
* HAVING clause.
*
* @param conditions Conditions for the HAVING clause.
*/
having(conditions: Conditions): Query;
/**
* Add an AND HAVING condition.
*
* @param conditions Conditions to append with AND.
*/
andHaving(conditions: Conditions): Query;
/**
* Add an OR HAVING condition.
*
* @param conditions Conditions to append with OR.
*/
orHaving(conditions: Conditions): Query;
/**
* Limit number of rows.
*
* @param limit Maximum number of rows to return.
*/
limit(limit: number): Query;
/**
* Offset for pagination.
*
* @param offset Number of rows to skip.
*/
offset(offset: number): Query;
/**
* Toggle DISTINCT (default true).
*
* @param distinct Whether to apply DISTINCT.
*/
distinct(distinct?: boolean): Query;
/**
* UNION with another query.
*
* @param union The query to union with.
*/
union(union: Query): Query;
/**
* UNION ALL with another query.
*
* @param union The query to union all with.
*/
unionAll(union: Query): Query;
}
QueryResultParams
/** Options for result‑fetching calls. */
interface QueryResultParams {
/** Suppress errors and return null/undefined instead. */
silent?: boolean;
}
Recipient
interface Recipient {
// Display name of the recipient
name: string;
// Email address of the recipient
email: string;
}
SelectDateRangeOptions
interface SelectDateRangeOptions {
/** The initial start date in the format 'YYYY-MM-DD'. */
readonly startDate: E8Date;
/** The initial end date in the format 'YYYY-MM-DD'. */
readonly endDate: E8Date;
}
SelectDateRangeResult
interface SelectDateRangeResult {
/** The selected start date in the format 'YYYY-MM-DD'. */
readonly startDate: E8Date;
/** The selected end date in the format 'YYYY-MM-DD'. */
readonly endDate: E8Date;
}
SelectExpression
/** SELECT target – a single column (or alias) or an array of them. */
type SelectExpression = Column | Column[];
SmsPhone
/** Representation of a phone number that can be used for SMS. */
interface SmsPhone {
id: number,
number: string,
}
SmsQuery
/** Query parameters for fetching sent SMS messages. */
interface SmsQuery {
accountToken: string,
phoneToken: string,
phoneNumber?: string,
sid?: string,
page?: number,
pageSize?: number,
}
SmsRequest
/** Request payload for sending an SMS. */
interface SmsRequest {
accountToken: string,
phoneToken: string,
phoneNumber: string,
body: string,
}
SmsResponse
/** Response object returned after sending an SMS. */
interface SmsResponse {
id: number,
sid: string,
type: string,
status: string,
phone_id: number,
phone_number: string,
body: string,
created_at: number,
}
Table
/** Table reference – plain name or an aliased definition. */
type Table = string | TableWithAlias;
TableWithAlias
/** Alias → table name or sub‑query (virtual table). */
type TableWithAlias = {
[key: string]: string | Query
};
TextVariants
type TextVariants = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark' | 'white' | 'muted'
ThumbnailFileParams
interface ThumbnailFileParams {
/** Keep original aspect ratio */
keepAspectRatio?: boolean;
}
TimeUnit
type TimeUnit = 'hour' | 'hours' | 'minute' | 'minutes' | 'second' | 'seconds';
UploadBase64Data
interface UploadBase64Data {
/** Base file name including extension */
basename: string;
/** Base64 encoded file content */
base64str: string;
}
UploadBase64DataParams
interface UploadBase64DataParams {
/** Optional upload URL */
urlUpload?: string;
/** Owner script alias */
ownerScriptAlias?: string;
/** Attribute script alias */
attrScriptAlias?: string;
/** Base64 string to upload */
base64str: string;
/** File name */
fileName: string;
/** Optional progress callback function */
progressCallback?: Function;
}
WatchOptions
interface WatchOptions {
/**
* Handler function or expression to invoke when the watched source changes
*/
handler: string | Function,
/** Deep watch flag – watches nested properties */
deep?: boolean,
/**
* Immediate flag – invokes the handler right away with the current value
*/
immediate?: boolean,
}
WebSocketCallback
/** Callback signature for remote procedure calls over WebSocket. */
type WebSocketCallback = (data) => void;
WebSocketClient
/**
* Client‑side wrapper around a WebSocket connection, exposing a typed event API.
*/
interface WebSocketClient extends EventTarget {
/**
* Connects to the WebSocket server.
*/
connect(): void;
/**
* Disconnects from the WebSocket server.
*/
disconnect(): void;
/**
* Publishes data to connected sessions with optional include/exclude filters.
*
* @param data The data to send.
* @param options Optional filters and options for publishing.
*/
publish(data: any, options?: WebSocketDataOptions): void;
/**
* Makes a call to another session and returns a promise with the response.
*
* @param sessionId The target session ID.
* @param params Parameters to send with the call.
*/
call(sessionId: string, params: any): Promise<any>;
/**
* Responds to a call received from another session.
*
* @param callId The ID of the call to respond to.
* @param sessionId The session ID that made the call.
* @param params Parameters to send in response.
*/
respond(callId: string, sessionId: string, params: any): void;
/**
* Typed event registration for known WebSocket events.
*
* @param type The event type to listen for.
* @param listener The event handler function.
* @param options Optional listener options or boolean.
*/
addEventListener<K extends keyof WebSocketClientEventMap>(
type: K,
listener: (this: WebSocketClient, ev: WebSocketClientEventMap[K]) => any,
options?: boolean | AddEventListenerOptions
): void;
/**
* Generic event registration.
*
* @param type The event type to listen for.
* @param listener The event handler.
* @param options Optional listener options or boolean.
*/
addEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions
): void;
/**
* Typed event removal for known WebSocket events.
*
* @param type The event type to remove.
* @param listener The event handler to remove.
* @param options Optional listener options or boolean.
*/
removeEventListener<K extends keyof WebSocketClientEventMap>(
type: K,
listener: (this: WebSocketClient, ev: WebSocketClientEventMap[K]) => any,
options?: boolean | EventListenerOptions
): void;
/**
* Generic event removal.
*
* @param type The event type to remove.
* @param listener The event handler to remove.
* @param options Optional listener options or boolean.
*/
removeEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions
): void;
}
WebSocketClientEventMap
/**
* Mapping of WebSocket client events to their payload types.
*/
interface WebSocketClientEventMap {
/**
* Fired when the client successfully connects.
*/
connect: CustomEvent<{ session: WebSocketSession }>;
/**
* Fired when the client disconnects.
*/
disconnect: CustomEvent;
/**
* Fired when a session joins.
*/
join: CustomEvent<{ session: WebSocketSession }>;
/**
* Fired when a session leaves.
*/
leave: CustomEvent<{ session: WebSocketSession }>;
/**
* Fired when a message is received from another session.
*/
message: CustomEvent<{ from: WebSocketSession, data: any }>;
/**
* Fired when a call is received from another session.
*/
call: CustomEvent<{ from: WebSocketSession, params: any, callback: WebSocketCallback }>;
/**
* Fired when an error occurs.
*/
error: CustomEvent<Event | Error>;
}
WebSocketDataOptions
/**
* Options to filter which sessions receive published data.
*/
interface WebSocketDataOptions {
/**
* List of session IDs to receive data.
*/
include?: string[];
/**
* List of session IDs to exclude from receiving data.
*/
exclude?: string[];
}
WebSocketSession
/**
* Information about a single WebSocket session.
*/
interface WebSocketSession {
/**
* Unique identification of a session.
*/
id: string;
/**
* Refers to the identification of a session between a client and a server.
*/
identity: any;
}