21 lines
656 B
TypeScript
21 lines
656 B
TypeScript
import type { ClawdbotPluginApi } from "clawdbot/plugin-sdk";
|
|
import { emptyPluginConfigSchema } from "clawdbot/plugin-sdk";
|
|
|
|
import { zaloDock, zaloPlugin } from "./src/channel.js";
|
|
import { handleZaloWebhookRequest } from "./src/monitor.js";
|
|
import { setZaloRuntime } from "./src/runtime.js";
|
|
|
|
const plugin = {
|
|
id: "zalo",
|
|
name: "Zalo",
|
|
description: "Zalo channel plugin (Bot API)",
|
|
configSchema: emptyPluginConfigSchema(),
|
|
register(api: ClawdbotPluginApi) {
|
|
setZaloRuntime(api.runtime);
|
|
api.registerChannel({ plugin: zaloPlugin, dock: zaloDock });
|
|
api.registerHttpHandler(handleZaloWebhookRequest);
|
|
},
|
|
};
|
|
|
|
export default plugin;
|