@ever-works/telegram-channel-plugin 1.0.0 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +922 -0
- package/dist/index.d.cts +28 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +919 -0
- package/package.json +80 -70
- package/LICENSE +0 -661
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { INotificationChannelPlugin, PluginCategory, ChannelShape, JsonSchema, ChannelTargetConfig, ChannelOptions, ChannelVerification, ChannelSendInput, ChannelSendResult } from '@ever-works/plugin';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Telegram notification channel — sends via the official `grammy`
|
|
5
|
+
* SDK's lightweight `Api` client (typed Bot API calls, no bot/polling
|
|
6
|
+
* framework). `chatId` is the destination chat; discover it by having
|
|
7
|
+
* the user message the bot then reading `getUpdates` (see README).
|
|
8
|
+
*
|
|
9
|
+
* MarkdownV2 is forwarded when the caller supplies the
|
|
10
|
+
* `telegram-markdown` rich payload kind.
|
|
11
|
+
*/
|
|
12
|
+
declare class TelegramChannelPlugin implements INotificationChannelPlugin {
|
|
13
|
+
readonly id = "telegram-channel";
|
|
14
|
+
readonly name = "Telegram";
|
|
15
|
+
readonly version = "1.0.0";
|
|
16
|
+
readonly category: PluginCategory;
|
|
17
|
+
readonly capabilities: readonly ["notification-channel", "notification-channel-telegram"];
|
|
18
|
+
readonly shape: ChannelShape;
|
|
19
|
+
readonly settingsSchema: JsonSchema;
|
|
20
|
+
onLoad(): Promise<void>;
|
|
21
|
+
onUnload(): Promise<void>;
|
|
22
|
+
private readonly idempotencyCache;
|
|
23
|
+
verifyTarget(config: ChannelTargetConfig, _options: ChannelOptions): Promise<ChannelVerification>;
|
|
24
|
+
send(payload: ChannelSendInput, options: ChannelOptions): Promise<ChannelSendResult>;
|
|
25
|
+
}
|
|
26
|
+
declare const telegramChannelPlugin: TelegramChannelPlugin;
|
|
27
|
+
|
|
28
|
+
export { TelegramChannelPlugin, telegramChannelPlugin };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { INotificationChannelPlugin, PluginCategory, ChannelShape, JsonSchema, ChannelTargetConfig, ChannelOptions, ChannelVerification, ChannelSendInput, ChannelSendResult } from '@ever-works/plugin';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Telegram notification channel — sends via the official `grammy`
|
|
5
|
+
* SDK's lightweight `Api` client (typed Bot API calls, no bot/polling
|
|
6
|
+
* framework). `chatId` is the destination chat; discover it by having
|
|
7
|
+
* the user message the bot then reading `getUpdates` (see README).
|
|
8
|
+
*
|
|
9
|
+
* MarkdownV2 is forwarded when the caller supplies the
|
|
10
|
+
* `telegram-markdown` rich payload kind.
|
|
11
|
+
*/
|
|
12
|
+
declare class TelegramChannelPlugin implements INotificationChannelPlugin {
|
|
13
|
+
readonly id = "telegram-channel";
|
|
14
|
+
readonly name = "Telegram";
|
|
15
|
+
readonly version = "1.0.0";
|
|
16
|
+
readonly category: PluginCategory;
|
|
17
|
+
readonly capabilities: readonly ["notification-channel", "notification-channel-telegram"];
|
|
18
|
+
readonly shape: ChannelShape;
|
|
19
|
+
readonly settingsSchema: JsonSchema;
|
|
20
|
+
onLoad(): Promise<void>;
|
|
21
|
+
onUnload(): Promise<void>;
|
|
22
|
+
private readonly idempotencyCache;
|
|
23
|
+
verifyTarget(config: ChannelTargetConfig, _options: ChannelOptions): Promise<ChannelVerification>;
|
|
24
|
+
send(payload: ChannelSendInput, options: ChannelOptions): Promise<ChannelSendResult>;
|
|
25
|
+
}
|
|
26
|
+
declare const telegramChannelPlugin: TelegramChannelPlugin;
|
|
27
|
+
|
|
28
|
+
export { TelegramChannelPlugin, telegramChannelPlugin };
|