UNPKG

@peacockproject/core

Version:

Type definitions for Peacock's core.

28 lines (27 loc) 863 B
import { SyncBailHook } from "./hooksImpl"; type CommandResponseCache = { [key: string]: unknown; }; type CommandStatus = { CacheBuster: string; Commands: CommandResponseCache; IsConfirmed: boolean; LinkedEmail: string; IOIAccountId: string; IOIAccountBaseUrl: string; }; export type CommandFunction = (lastResponse: unknown | undefined, args: unknown) => unknown; declare class CommandService { handleCommand: SyncBailHook<[ /** lastResponse */ unknown, /** command */ string, /** args */ unknown ], unknown>; private commandResponseCache; constructor(); getCommandStatus(): CommandStatus; submitCommands(email: string): CommandStatus; handleCommandMap(name: string, commandMap: Map<string, CommandFunction>): void; } export declare const commandService: CommandService; export {};