silverbullet/common/manifest.ts

25 lines
635 B
TypeScript
Raw Normal View History

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