/** * This file is part of the NocoBase (R) project. * Copyright (c) 2020-2024 NocoBase Co., Ltd. * Authors: NocoBase Team. * * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License. * For more information, please refer to: https://www.nocobase.com/agreement. */ import type { Cache } from '@nocobase/cache'; import type { Logger } from '@nocobase/logger'; import { Transactionable } from '@nocobase/database'; import { Plugin } from '@nocobase/server'; import { RegisterServerTypeFnParams, SendOptions, SendUserOptions } from './types'; export declare class PluginNotificationManagerServer extends Plugin { private static readonly CHANNELS_CACHE_KEY; private manager; logger: Logger; cache: Cache; get sendQueueChannel(): string; private ensureCache; parseChannel(instance: any): any; loadChannels(options?: Transactionable): Promise; getChannel(name: string): Promise; get channelTypes(): import("@nocobase/utils").Registry<{ Channel: import("./types").NotificationChannelConstructor; useQueue: boolean; }>; registerChannelType(params: RegisterServerTypeFnParams): void; send(options: SendOptions): Promise<{ status: "success" | "failure"; reason: string; triggerFrom: string; channelName: string; receivers: import("./types").ReceiversOptions; queued: boolean; } | { status: "success"; triggerFrom: string; channelName: string; receivers: import("./types").ReceiversOptions; } | { status: "failure"; reason: string; triggerFrom: string; channelName: string; receivers: import("./types").ReceiversOptions; }>; sendNow(options: SendOptions): Promise; sendToUsers(options: SendUserOptions): Promise<({ status: "success" | "failure"; reason: string; triggerFrom: string; channelName: string; receivers: import("./types").ReceiversOptions; queued: boolean; } | { status: "success"; triggerFrom: string; channelName: string; receivers: import("./types").ReceiversOptions; } | { status: "failure"; reason: string; triggerFrom: string; channelName: string; receivers: import("./types").ReceiversOptions; })[]>; afterAdd(): Promise; beforeLoad(): Promise; load(): Promise; install(): Promise; afterEnable(): Promise; afterDisable(): Promise; remove(): Promise; } export default PluginNotificationManagerServer;