@aacebo/echo
Advanced tools
Comparing version 0.0.32 to 0.0.33
import { Chat, Message, User } from './models'; | ||
export interface ActionHandlerArgs<T extends keyof ActionValues> { | ||
chat: Chat; | ||
message: Message | null; | ||
user: User; | ||
block_id: string; | ||
value: ActionValues[T]; | ||
ack: () => void; | ||
export type ActionHandler<BlockType extends keyof ActionValues, BlockValue = any, ContextType extends keyof ActionHandlerArgs<BlockType, BlockValue> = 'chat'> = (args: ActionHandlerArgs<BlockType, BlockValue>[ContextType]) => void | Promise<void> | undefined; | ||
export interface ActionHandlerArgs<BlockType extends keyof ActionValues, BlockValue = any> { | ||
chat: { | ||
chat: Chat; | ||
user: User; | ||
block_id: string; | ||
value: ActionValues<BlockValue>[BlockType]; | ||
ack: () => void; | ||
}; | ||
message: { | ||
chat: Chat; | ||
message: Message; | ||
user: User; | ||
block_id: string; | ||
value: ActionValues<BlockValue>[BlockType]; | ||
ack: () => void; | ||
}; | ||
} | ||
export type ActionHandler<T extends keyof ActionValues> = (args: ActionHandlerArgs<T>) => void | Promise<void> | undefined; | ||
export interface ActionValues<T = any> { | ||
@@ -12,0 +21,0 @@ button: T; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWN0aW9ucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9hY3Rpb25zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBU0MsQ0FBQyJ9 | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWN0aW9ucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9hY3Rpb25zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBd0JDLENBQUMifQ== |
import debug from 'debug'; | ||
import { EventHandlers } from './events'; | ||
import { Api } from './api'; | ||
import { ActionHandler, ActionValues } from './actions'; | ||
import { ShortcutHandler } from './shortcuts'; | ||
import { ActionHandler, ActionHandlerArgs, ActionValues } from './actions'; | ||
import { ShortcutHandler, ShortcutHandlerArgs } from './shortcuts'; | ||
import * as models from './models'; | ||
@@ -38,4 +38,4 @@ export interface AppOptions { | ||
event<Name extends keyof EventHandlers>(name: Name, handler: EventHandlers[Name]): void; | ||
action<T extends keyof ActionValues>(name: string, handler: ActionHandler<T>): void; | ||
shortcut(name: string, handler: ShortcutHandler): void; | ||
action<BlockType extends keyof ActionValues, BlockValue = any, ContextType extends keyof ActionHandlerArgs<BlockType, BlockValue> = 'chat'>(name: string, handler: ActionHandler<BlockType, BlockValue, ContextType>): void; | ||
shortcut<ContextType extends keyof ShortcutHandlerArgs>(name: string, handler: ShortcutHandler<ContextType>): void; | ||
private _onOpen; | ||
@@ -42,0 +42,0 @@ private _onClose; |
@@ -192,2 +192,2 @@ "use strict"; | ||
exports.App = App; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2FwcC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSxrREFBMEI7QUFDMUIsNENBQTJCO0FBQzNCLDRDQUFvQjtBQUdwQiwrQkFBNEI7QUFLNUIsTUFBTSxRQUFRLEdBQUcsT0FBTyxDQUFDLEdBQUcsQ0FBQyxhQUFhLElBQUksK0JBQStCLENBQUM7QUFjOUUsTUFBYSxHQUFHO0lBOENPO0lBN0NaLEdBQUcsQ0FBaUI7SUFFN0IsSUFBSSxHQUFHO1FBQ0wsSUFBSSxDQUFDLElBQUksQ0FBQyxJQUFJLEVBQUU7WUFDZCxNQUFNLElBQUksS0FBSyxDQUFDLHNEQUFzRCxDQUFDLENBQUM7U0FDekU7UUFFRCxPQUFPLElBQUksQ0FBQyxJQUFJLENBQ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JBQ2pCLE9BQU8sRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLE9BQU87Z0JBQ3ZCLElBQUksRUFBRSxDQUFDLENBQUMsT0FBUTtnQkFDaEIsS0FBSyxFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsS0FBSztnQkFDbkIsR0FBRyxFQUFFLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDO2FBQ2xCLENBQUMsQ0FBQztTQUNKO1FBRUQsSUFBSSxDQUFDLEdBQUcsQ0FBQyx1QkFBdUIsQ0FBQyxDQUFDLElBQUksQ0FBQyxJQUFJLFlBQVksQ0FBQyxDQUFDO0lBQzNELENBQUM7SUFFTyxJQUFJLENBQUMsQ0FBUTtRQUNuQixPQUFPLEdBQUcsRUFBRTtZQUNWLElBQUksQ0FBQyxDQUFDLENBQUMsTUFBTTtnQkFBRSxPQUFPO1lBRXRCLElBQUksQ0FBQyxHQUFHLEVBQUUsSUFBSSxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUM7Z0JBQzVCLE1BQU0sRUFBRSxDQUFDLENBQUMsTUFBTTtnQkFDaEIsSUFBSSxFQUFFLEtBQUs7YUFDWixDQUFDLENBQUMsQ0FBQztRQUNOLENBQUMsQ0FBQztJQUNKLENBQUM7Q0FDRjtBQTFORCxrQkEwTkMifQ== |
import { Chat, Message, User } from './models'; | ||
export interface ShortcutHandlerArgs { | ||
chat: Chat; | ||
message: Message | null; | ||
user: User; | ||
draft: string | null; | ||
ack: () => void; | ||
chat: { | ||
chat: Chat; | ||
user: User; | ||
draft: string; | ||
ack: () => void; | ||
}; | ||
message: { | ||
chat: Chat; | ||
message: Message; | ||
user: User; | ||
ack: () => void; | ||
}; | ||
} | ||
export type ShortcutHandler = (args: ShortcutHandlerArgs) => void | Promise<void> | undefined; | ||
export type ShortcutHandler<ContextType extends keyof ShortcutHandlerArgs> = (args: ShortcutHandlerArgs[ContextType]) => void | Promise<void> | undefined; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2hvcnRjdXRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3Nob3J0Y3V0cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQVFDLENBQUMifQ== | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2hvcnRjdXRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3Nob3J0Y3V0cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQWVDLENBQUMifQ== |
{ | ||
"name": "@aacebo/echo", | ||
"version": "0.0.32", | ||
"version": "0.0.33", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "author": "", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
49209
985