UNPKG

apptise-core

Version:

Core library for Apptise unified notification system

88 lines 2.47 kB
import { NotificationPlugin } from '../base/plugin.js'; import type { NotificationMessage, NotificationResult, PluginConfig, PluginRegistration } from '../base/types.js'; declare const MASTODON_MESSAGE_VISIBILITIES: readonly ["default", "direct", "private", "unlisted", "public"]; type MastodonVisibility = typeof MASTODON_MESSAGE_VISIBILITIES[number]; export declare class MastodonPlugin extends NotificationPlugin { readonly registration: PluginRegistration; private readonly serviceConfig; templates: string[]; templateTokens: { host: { name: string; type: "string"; required: boolean; }; token: { name: string; type: "string"; required: boolean; private: boolean; }; port: { name: string; type: "int"; min: number; max: number; }; target_user: { name: string; type: "string"; prefix: string; mapTo: string; }; targets: { name: string; type: "list:string"; }; }; templateArgs: { token: { aliasOf: string; }; visibility: { name: string; type: "choice:string"; values: readonly ["default", "direct", "private", "unlisted", "public"]; default: MastodonVisibility; }; cache: { name: string; type: "bool"; default: boolean; }; batch: { name: string; type: "bool"; default: boolean; }; sensitive: { name: string; type: "bool"; default: boolean; }; spoiler: { name: string; type: "string"; }; key: { name: string; type: "string"; }; language: { name: string; type: "string"; }; to: { aliasOf: string; }; }; private whoamiCache; private rateLimitRemaining; private rateLimitReset; parseUrl(url: string): PluginConfig; send(config: PluginConfig, message: NotificationMessage): Promise<NotificationResult>; private whoami; } export declare const mastodonPlugin: MastodonPlugin; export default mastodonPlugin; //# sourceMappingURL=mastodon.d.ts.map