1
0
silverbullet/common/manifest.ts
2022-03-23 15:41:12 +01:00

26 lines
610 B
TypeScript

import * as plugbox from "../plugbox/types";
import { EndpointHook } from "../plugbox/feature/endpoint";
import { CronHook } from "../plugbox/feature/node_cron";
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;
};
} & EndpointHook &
CronHook;
export type Manifest = plugbox.Manifest<SilverBulletHooks>;