1
0
silverbullet/common/manifest.ts

25 lines
635 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-25 11:03:06 +00:00
import { EventHook } from "../plugbox/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
export type Manifest = plugbox.Manifest<SilverBulletHooks>;