Skip to content

Actions & hooks

Register declared contributions through ExtensionContext. Formatters return text for an undoable edit. Hooks require API 3.3 and return plans for the event document, with no ambient filesystem/network/DOM access. Hooks run after successful local changes; hook failures do not roll them back. Table actions must await declareOutputs before updates; cancellation retains completed writes.

Usage guide: actions. API index.

Signatures, parameters and return types are generated from the SDK. Optional members are not available in every host and context.

Source

Supported hosts: Lite Mobile

readonly event: FileHookEvent;

Supported hosts: Lite Mobile

readonly signal: AbortSignal;

Supported hosts: Lite Mobile

readonly settings: Readonly<Record<string, SettingValue>>;

Related types: FileHookEvent, SettingValue.

Source

Supported hosts: Lite Mobile

export type FileHookHandler = (context: FileHookContext) => FileHookPlan | void | Promise<FileHookPlan | void>;

Related types: FileHookContext, FileHookPlan.

Source

Supported hosts: Lite

format(input: FormatterInput): {
text: string;
} | Promise<{
text: string;
}>;
Parameter Type Required
input FormatterInput Yes

Returns: { text: string; } &#124; Promise<{ text: string; }>.

Related types: FormatterInput.

Source

Supported hosts: Lite Mobile

readonly eidos: {
readonly table: Pick<EidosTable, "tableId" | "viewId" | "readContext">;
readonly config: Pick<EidosConfig, "read">;
};

Supported hosts: Lite Mobile

readonly target: {
count: number;
readRows(options: {
offset: number;
limit: number;
fields: string[];
}): Promise<TableActionRecord[]>;
update(input: {
readToken: string;
values: Record<string, LogicalValue>;
}): Promise<void>;
};

Supported hosts: Lite Mobile

readonly connections: {
request(input: {
connection: string;
body: JsonObject;
}): Promise<JsonObject>;
};

Supported hosts: Lite Mobile

readonly task: {
declareOutputs(rows: Array<{
readToken: string;
values: Record<string, LogicalValue>;
}>): Promise<void>;
report(progress: {
completed: number;
message?: string;
}): Promise<void>;
};

Related types: EidosTable, EidosConfig, TableActionRecord.

Source

Supported hosts: Lite Mobile

getItems(context: {
readonly i18n: PluginI18n;
readonly signal: AbortSignal;
readonly capabilities: Pick<TableActionCapabilities, "eidos">;
}): Promise<TableActionItem[]> | TableActionItem[];
Parameter Type Required
context { readonly i18n: PluginI18n; readonly signal: AbortSignal; readonly capabilities: Pick<TableActionCapabilities, "eidos">; } Yes

Returns: Promise<TableActionItem[]> &#124; TableActionItem[].

Supported hosts: Lite Mobile

run(context: TableActionContext, itemId: string): Promise<void>;
Parameter Type Required
context TableActionContext Yes
itemId string Yes

Returns: Promise<void>.

Related types: PluginI18n, TableActionCapabilities, TableActionItem, TableActionContext.