zcatalyst-integ-cliq
Version:
Node.js SDK for integrating Zoho Catalyst with Zoho Cliq
30 lines (29 loc) • 1.32 kB
TypeScript
import { Access, Chat, Environment, File, Location, Mention, User, CommandSuggestion as ICommandSuggestion } from '../common.js';
import HandlerResponse from '../response-objects/handler-response.js';
import CommandSuggestion from '../response-objects/command-suggestion.js';
interface CommandHandlerRequest {
name: string;
location: Location;
mentions: Array<Mention>;
user: User;
chat: Chat;
environment: Environment;
access: Access;
arguments: string;
options: Record<string, string>;
selections: Array<ICommandSuggestion>;
attachments: Array<File>;
}
export default class CommandHandler {
executionHandler(handler: (req: CommandHandlerRequest, res: HandlerResponse, ...args: Array<unknown>) => Promise<unknown>): void;
suggestionHandler(handler: (req: CommandHandlerRequest, res: Array<CommandSuggestion>, ...args: Array<unknown>) => Promise<typeof res | undefined>): void;
newHandlerResponse(): HandlerResponse;
/**
* @deprecated - function name has been misspelled
*
* Use {@link newCommandSuggestion} function instead
*/
newCommandSugestion(title?: string, description?: string, imageurl?: string): CommandSuggestion;
newCommandSuggestion(title?: string, description?: string, imageurl?: string): CommandSuggestion;
}
export {};