1
0
silverbullet/common/manifest.ts

26 lines
610 B
TypeScript
Raw Normal View History

2022-03-21 14:21:34 +00:00
import * as plugbox from "../plugbox/types";
2022-03-23 14:41:12 +00:00
import { EndpointHook } from "../plugbox/feature/endpoint";
import { CronHook } from "../plugbox/feature/node_cron";
2022-03-21 14:21:34 +00:00
export type CommandDef = {
// Function name to invoke
invoke: string;
// Bind to keyboard shortcut
key?: string;
mac?: string;
// If to show in slash invoked menu and if so, with what label
// should match slashCommandRegexp
slashCommand?: string;
};
export type SilverBulletHooks = {
commands?: {
[key: string]: CommandDef;
};
2022-03-23 14:41:12 +00:00
} & EndpointHook &
CronHook;
2022-03-21 14:21:34 +00:00
export type Manifest = plugbox.Manifest<SilverBulletHooks>;