1
0
silverbullet/common/manifest.ts

25 lines
629 B
TypeScript
Raw Normal View History

2022-03-27 09:31:12 +00:00
import * as plugos from "../plugos/types";
import { EndpointHook } from "../plugos/feature/endpoint";
import { CronHook } from "../plugos/feature/node_cron";
import { EventHook } from "../plugos/feature/event";
2022-03-21 14:21:34 +00:00
export type CommandDef = {
2022-03-27 09:26:13 +00:00
name: string;
2022-03-21 14:21:34 +00:00
// 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 = {
2022-03-27 09:26:13 +00:00
command?: CommandDef | CommandDef[];
2022-03-23 14:41:12 +00:00
} & EndpointHook &
2022-03-25 11:03:06 +00:00
CronHook &
EventHook;
2022-03-21 14:21:34 +00:00
2022-03-27 09:31:12 +00:00
export type Manifest = plugos.Manifest<SilverBulletHooks>;