API参考
服务端
BaseNotificationChannel
是用户渠道类型的抽象类,定义了通知渠道需要的接口,扩展新的通知渠道类型需要继承此类,并实现其中的方法
PluginNotificationManagerServer
通知管理服务端插件,提供通知渠道类型注册方法和通知下发方法。
registerChannelType()
注册渠道类型的服务端,参考样例
签名
registerChannelType({ type, Channel }: {type: string, Channel: BaseNotificationChannel })
send()
通知下发方法,调用此方法可下发通知
签名
send(sendConfig: {channelName:String, message: Object, receivers: ReceiversType, triggerFrom: String })
接收人receivers目前只支持两种格式:NocoBase站内用户IDuserId和渠道特定配置channel-self-defined
详细信息
sendConfig
客户端
PluginNotificationManagerClient
channelTypes
已注册渠道类型库
签名
channelTypes: Registry<registerTypeOptions>
registerChannelType()
注册客户端渠道类型
签名
registerChannelType(params: registerTypeOptions)

